Skip to content

Commit

Permalink
Merge branch 'main' into main-lmp-card-doc-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored Aug 29, 2022
2 parents 972f33a + bd91ea2 commit 1443105
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 42 deletions.
1 change: 1 addition & 0 deletions scss/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
//

.dropdown-toggle-split {
min-width: $dropdown-padding-x * 2 + $caret-width * 2; // Boosted mod
padding-right: subtract($dropdown-padding-x, $border-width);
padding-left: subtract($dropdown-padding-x, $border-width);
border-color: $black;
Expand Down
12 changes: 6 additions & 6 deletions site/content/docs/5.2/components/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ The recommended way of using an icon in a button is [an embedded SVG]({{< docsre
<svg width="1rem" height="1rem" fill="currentColor" aria-hidden="true" focusable="false" class="me-1 overflow-visible">
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#success"/>
</svg>
Secondary
Primary
</button>
<button type="button" class="btn btn-primary">
<svg width="1.25rem" height="1.25rem" fill="currentColor" aria-hidden="true" focusable="false" class="me-1">
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#success"/>
</svg>
Secondary
Primary
</button>
<button type="button" class="btn btn-primary btn-lg">
<svg width="1.25rem" height="1.25rem" fill="currentColor" aria-hidden="true" focusable="false" class="me-1 overflow-visible">
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#success"/>
</svg>
Secondary
Primary
</button>
{{< /example >}}

Expand Down Expand Up @@ -146,7 +146,7 @@ To get the inverted button behavior, simply add `.btn-inverse` to a `<button>` o
<svg width="1.25rem" height="1.25rem" fill="currentColor" aria-hidden="true" focusable="false" class="me-1">
<use xlink:href="/docs/{{< param docs_version >}}/assets/img/boosted-sprite.svg#success"/>
</svg>
Secondary
Primary
</button>
<button type="button" class="btn btn-icon btn-inverse btn-secondary">
<svg width="1.25rem" height="1.25rem" fill="currentColor" aria-hidden="true" focusable="false">
Expand Down Expand Up @@ -324,8 +324,8 @@ const bsButton = new boosted.Button('#myButton')
| Method | Description |
| --- | --- |
| `dispose` | Destroys an element's button. (Removes stored data on the DOM element) |
| `getInstance` | Static method which allows you to get the button instance associated to a DOM element, you can use it like this: `boosted.Button.getInstance(element)`|
| `getOrCreateInstance` | Static method which returns a button instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Button.getOrCreateInstance(element)` |
| `getInstance` | Static method which allows you to get the button instance associated to a DOM element, you can use it like this: `boosted.Button.getInstance(element)`. |
| `getOrCreateInstance` | Static method which returns a button instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Button.getOrCreateInstance(element)`. |
| `toggle` | Toggles push state. Gives the button the appearance that it has been activated. |
{{< /bs-table >}}

Expand Down
10 changes: 5 additions & 5 deletions site/content/docs/5.2/components/carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ const carousel = new boosted.Carousel('#myCarousel')
| `interval` | number | `5000` | The amount of time to delay between automatically cycling an item. |
| `keyboard` | boolean | `true` | Whether the carousel should react to keyboard events. |
| `pause` | string, boolean | `"hover"` | If set to `"hover"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`. If set to `false`, hovering over the carousel won't pause it. On touch-enabled devices, when set to `"hover"`, cycling will pause on `touchend` (once the user finished interacting with the carousel) for two intervals, before automatically resuming. This is in addition to the mouse behavior. |
| `pause-text` | string | `"Pause Carousel"` | Text needed for accessibility attributes of the pause button. If empty or missing, the default text will be `"Pause Carousel"`|
| `play-text` | string | `"Play Carousel"` | Text needed for accessibility attributes of the play button. If empty or missing, the default text will be `"Play Carousel"`|
| `pause-text` | string | `"Pause Carousel"` | Text needed for accessibility attributes of the pause button. If empty or missing, the default text will be `"Pause Carousel"`. |
| `play-text` | string | `"Play Carousel"` | Text needed for accessibility attributes of the play button. If empty or missing, the default text will be `"Play Carousel"`. |
| `ride` | string, boolean | `false` | If set to `true`, autoplays the carousel after the user manually cycles the first item. If set to `"carousel"`, autoplays the carousel on load. |
| `touch` | boolean | `true` | Whether the carousel should support left/right swipe interactions on touchscreen devices. |
| `wrap` | boolean | `true` | Whether the carousel should cycle continuously or have hard stops. |
Expand All @@ -414,10 +414,10 @@ const carousel = new boosted.Carousel(myCarouselElement, {
| --- | --- |
| `cycle` | Cycles through the carousel items from left to right. |
| `dispose` | Destroys an element's carousel. (Removes stored data on the DOM element) |
| `getInstance` | Static method which allows you to get the carousel instance associated to a DOM element, you can use it like this: `boosted.Carousel.getInstance(element)` |
| `getOrCreateInstance` | Static method which returns a carousel instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Carousel.getOrCreateInstance(element)` |
| `getInstance` | Static method which allows you to get the carousel instance associated to a DOM element, you can use it like this: `boosted.Carousel.getInstance(element)`. |
| `getOrCreateInstance` | Static method which returns a carousel instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Carousel.getOrCreateInstance(element)`. |
| `next` | Cycles to the next item. **Returns to the caller before the next item has been shown** (e.g., before the `slid.bs.carousel` event occurs). |
| `nextWhenVisible` | Don't cycle carousel to next when the page isn't visible or the carousel or its parent isn't visible. **Returns to the caller before the target item has been shown** |
| `nextWhenVisible` | Don't cycle carousel to next when the page isn't visible or the carousel or its parent isn't visible. **Returns to the caller before the target item has been shown**. |
| `pause` | Stops the carousel from cycling through items. |
| `prev` | Cycles to the previous item. **Returns to the caller before the previous item has been shown** (e.g., before the `slid.bs.carousel` event occurs). |
| `to` | Cycles the carousel to a particular frame (0 based, similar to an array). **Returns to the caller before the target item has been shown** (e.g., before the `slid.bs.carousel` event occurs). |
Expand Down
6 changes: 3 additions & 3 deletions site/content/docs/5.2/components/collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const collapseList = [...collapseElementList].map(collapseEl => new boosted.Coll
| Name | Type | Default | Description |
| --- | --- | --- | --- |
`parent` | selector, jQuery object, DOM element | `false` | If parent is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the `card` class). The attribute has to be set on the target collapsible area. |
`toggle` | boolean | `true` | Toggles the collapsible element on invocation |
`toggle` | boolean | `true` | Toggles the collapsible element on invocation. |
{{< /bs-table >}}

### Methods
Expand All @@ -170,8 +170,8 @@ const bsCollapse = new boosted.Collapse('#myCollapse', {
| Method | Description |
| --- | --- |
| `dispose` | Destroys an element's collapse. (Removes stored data on the DOM element) |
| `getInstance` | Static method which allows you to get the collapse instance associated to a DOM element, you can use it like this: `boosted.Collapse.getInstance(element)` |
| `getOrCreateInstance` | Static method which returns a collapse instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Collapse.getOrCreateInstance(element)` |
| `getInstance` | Static method which allows you to get the collapse instance associated to a DOM element, you can use it like this: `boosted.Collapse.getInstance(element)`. |
| `getOrCreateInstance` | Static method which returns a collapse instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Collapse.getOrCreateInstance(element)`. |
| `hide` | Hides a collapsible element. **Returns to the caller before the collapsible element has actually been hidden** (e.g., before the `hidden.bs.collapse` event occurs). |
| `show` | Shows a collapsible element. **Returns to the caller before the collapsible element has actually been shown** (e.g., before the `shown.bs.collapse` event occurs). |
| `toggle` | Toggles a collapsible element to shown or hidden. **Returns to the caller before the collapsible element has actually been shown or hidden** (i.e. before the `shown.bs.collapse` or `hidden.bs.collapse` event occurs). |
Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.2/components/dropdowns.md
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ Regardless of whether you call your dropdown via JavaScript or instead use the d
{{< bs-table "table" >}}
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `autoClose` | boolean, string | `true` | Configure the auto close behavior of the dropdown: <ul class="my-2"><li>`true` - the dropdown will be closed by clicking outside or inside the dropdown menu.</li><li>`false` - the dropdown will be closed by clicking the toggle button and manually calling `hide` or `toggle` method. (Also will not be closed by pressing <kbd>esc</kbd> key)</li><li>`'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.</li> <li>`'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.</li></ul> Note: the dropdown can always be closed with the <kbd>ESC</kbd> key |
| `autoClose` | boolean, string | `true` | Configure the auto close behavior of the dropdown: <ul class="my-2"><li>`true` - the dropdown will be closed by clicking outside or inside the dropdown menu.</li><li>`false` - the dropdown will be closed by clicking the toggle button and manually calling `hide` or `toggle` method. (Also will not be closed by pressing <kbd>esc</kbd> key)</li><li>`'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.</li> <li>`'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.</li></ul> Note: the dropdown can always be closed with the <kbd>ESC</kbd> key. |
| `boundary` | string, element | `'scrollParent'` | Overflow constraint boundary of the dropdown menu (applies only to Popper's preventOverflow modifier). By default it's `clippingParents` and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's [detectOverflow docs](https://popper.js.org/docs/v2/utils/detect-overflow/#boundary). |
| `display` | string | `'dynamic'` | By default, we use Popper for dynamic positioning. Disable this with `static`. |
| `offset` | number, string, function | `[0, 2]` | Offset of the dropdown relative to its target. You can pass a string in data attributes with comma separated values like: `data-bs-offset="10,20"`. When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: [skidding](https://popper.js.org/docs/v2/modifiers/offset/#skidding-1), [distance](https://popper.js.org/docs/v2/modifiers/offset/#distance-1). For more information refer to Popper's [offset docs](https://popper.js.org/docs/v2/modifiers/offset/#options). |
Expand All @@ -960,7 +960,7 @@ const dropdown = new boosted.Dropdown(element, {
| Method | Description |
| --- | --- |
| `dispose` | Destroys an element's dropdown. (Removes stored data on the DOM element) |
| `getInstance` | Static method which allows you to get the dropdown instance associated to a DOM element, you can use it like this: `boosted.Dropdown.getInstance(element)` |
| `getInstance` | Static method which allows you to get the dropdown instance associated to a DOM element, you can use it like this: `boosted.Dropdown.getInstance(element)`. |
| `getOrCreateInstance` | Static method which returns a dropdown instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `boosted.Dropdown.getOrCreateInstance(element)`. |
| `hide` | Hides the dropdown menu of a given navbar or tabbed navigation. |
| `show` | Shows the dropdown menu of a given navbar or tabbed navigation. |
Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.2/components/list-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,15 @@ Destroys an element's tab.

#### getInstance

*Static* method which allows you to get the tab instance associated with a DOM element
*Static* method which allows you to get the tab instance associated with a DOM element.

```js
const tab = boosted.Tab.getInstance('#trigger') // Returns a Boosted tab instance
```

#### getOrCreateInstance

*Static* method which allows you to get the tab instance associated with a DOM element, or create a new one in case it wasn't initialized
*Static* method which allows you to get the tab instance associated with a DOM element, or create a new one in case it wasn't initialized.

```js
const tab = boosted.Tab.getOrCreateInstance('#trigger') // Returns a Boosted tab instance
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.2/components/modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ const myModal = new boosted.Modal('#myModal', {
| `getInstance` | *Static* method which allows you to get the modal instance associated with a DOM element. |
| `getOrCreateInstance` | *Static* method which allows you to get the modal instance associated with a DOM element, or create a new one in case it wasn't initialized. |
| `hide` | Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs). |
| `show` | Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs). Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). (i.e. `const modalToggle = document.getElementById('toggleMyModal'); myModal.show(modalToggle)` |
| `show` | Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs). Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). (i.e. `const modalToggle = document.getElementById('toggleMyModal'); myModal.show(modalToggle)`. |
| `toggle` | Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs). |
{{< /bs-table >}}

Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.2/components/navs-tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -760,15 +760,15 @@ Destroys an element's tab.

#### getInstance

*Static* method which allows you to get the tab instance associated with a DOM element
*Static* method which allows you to get the tab instance associated with a DOM element.

```js
const tab = boosted.Tab.getInstance('#trigger') // Returns a Boosted tab instance
```

#### getOrCreateInstance

*Static* method which allows you to get the tab instance associated with a DOM element, or create a new one in case it wasn't initialized
*Static* method which allows you to get the tab instance associated with a DOM element, or create a new one in case it wasn't initialized.

```js
const tab = boosted.Tab.getOrCreateInstance('#trigger') // Returns a Boosted tab instance
Expand Down
12 changes: 6 additions & 6 deletions site/content/docs/5.2/components/offcanvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ const offcanvasList = [...offcanvasElementList].map(offcanvasEl => new boosted.O
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `backdrop` | boolean or the string `static` | `true` | Apply a backdrop on body while offcanvas is open. Alternatively, specify `static` for a backdrop which doesn't close the offcanvas when clicked. |
| `keyboard` | boolean | `true` | Closes the offcanvas when escape key is pressed |
| `scroll` | boolean | `false` | Allow body scrolling while offcanvas is open |
| `keyboard` | boolean | `true` | Closes the offcanvas when escape key is pressed. |
| `scroll` | boolean | `false` | Allow body scrolling while offcanvas is open. |
{{< /bs-table >}}

### Methods
Expand All @@ -336,10 +336,10 @@ const bsOffcanvas = new boosted.Offcanvas('#myOffcanvas')
{{< bs-table "table" >}}
| Method | Description |
| --- | --- |
| `getInstance` | *Static* method which allows you to get the offcanvas instance associated with a DOM element |
| `getOrCreateInstance` | *Static* method which allows you to get the offcanvas instance associated with a DOM element, or create a new one in case it wasn't initialized |
| `hide` | Hides an offcanvas element. **Returns to the caller before the offcanvas element has actually been hidden** (i.e. before the `hidden.bs.offcanvas` event occurs).|
| `show` | Shows an offcanvas element. **Returns to the caller before the offcanvas element has actually been shown** (i.e. before the `shown.bs.offcanvas` event occurs).|
| `getInstance` | *Static* method which allows you to get the offcanvas instance associated with a DOM element. |
| `getOrCreateInstance` | *Static* method which allows you to get the offcanvas instance associated with a DOM element, or create a new one in case it wasn't initialized. |
| `hide` | Hides an offcanvas element. **Returns to the caller before the offcanvas element has actually been hidden** (i.e. before the `hidden.bs.offcanvas` event occurs). |
| `show` | Shows an offcanvas element. **Returns to the caller before the offcanvas element has actually been shown** (i.e. before the `shown.bs.offcanvas` event occurs). |
| `toggle` | Toggles an offcanvas element to shown or hidden. **Returns to the caller before the offcanvas element has actually been shown or hidden** (i.e. before the `shown.bs.offcanvas` or `hidden.bs.offcanvas` event occurs). |
{{< /bs-table >}}

Expand Down
Loading

0 comments on commit 1443105

Please sign in to comment.