diff options
| author | Johann-S <[email protected]> | 2020-06-19 11:17:01 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-12-06 18:42:40 +0200 |
| commit | adfdf7160b5822aae12eea677e7dd3128d2569bf (patch) | |
| tree | dc09bbdff9ce3457867d28aadc583f0de6da0ec2 /site/content/docs | |
| parent | 5f89ea3a0f9b56547eb03b98afcd189b89d7e5a6 (diff) | |
| download | bootstrap-adfdf7160b5822aae12eea677e7dd3128d2569bf.tar.xz bootstrap-adfdf7160b5822aae12eea677e7dd3128d2569bf.zip | |
Update to popper.js v2.x
Diffstat (limited to 'site/content/docs')
| -rw-r--r-- | site/content/docs/5.0/components/dropdowns.md | 16 | ||||
| -rw-r--r-- | site/content/docs/5.0/components/tooltips.md | 20 | ||||
| -rw-r--r-- | site/content/docs/5.0/getting-started/webpack.md | 2 | ||||
| -rw-r--r-- | site/content/docs/5.0/migration.md | 2 |
4 files changed, 11 insertions, 29 deletions
diff --git a/site/content/docs/5.0/components/dropdowns.md b/site/content/docs/5.0/components/dropdowns.md index 69a7783dc..891c9a01b 100644 --- a/site/content/docs/5.0/components/dropdowns.md +++ b/site/content/docs/5.0/components/dropdowns.md @@ -873,32 +873,22 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap </thead> <tbody> <tr> - <td><code>offset</code></td> - <td>number | string | function</td> - <td><code>0</code></td> - <td> - <p>Offset of the dropdown relative to its target.</p> - <p>When a function is used to determine the offset, it is called with an object containing the offset data as its first argument. The function must return an object with the same structure. The triggering element DOM node is passed as the second argument.</p> - <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#modifiers..offset.offset">offset docs</a>.</p> - </td> - </tr> - <tr> <td><code>flip</code></td> <td>boolean</td> <td><code>true</code></td> - <td>Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#modifiers..flip.enabled">flip docs</a>.</td> + <td>Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/flip/">flip docs</a>.</td> </tr> <tr> <td><code>boundary</code></td> <td>string | element</td> <td><code>'scrollParent'</code></td> - <td>Overflow constraint boundary of the dropdown menu. Accepts the values of <code>'viewport'</code>, <code>'window'</code>, <code>'scrollParent'</code>, or an HTMLElement reference (JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#modifiers..preventOverflow.boundariesElement">preventOverflow docs</a>.</td> + <td>Overflow constraint boundary of the dropdown menu. By default it's <code>'clippingParents'</code> and can accept an HTMLElement reference (JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v2/utils/detect-overflow/#boundary">preventOverflow docs</a>.</td> </tr> <tr> <td><code>reference</code></td> <td>string | element</td> <td><code>'toggle'</code></td> - <td>Reference element of the dropdown menu. Accepts the values of <code>'toggle'</code>, <code>'parent'</code>, or an HTMLElement reference. For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#referenceObject">referenceObject docs</a>.</td> + <td>Reference element of the dropdown menu. Accepts the values of <code>'toggle'</code>, <code>'parent'</code>, or an HTMLElement reference. For more information refer to Popper's <a href="https://popper.js.org/docs/v2/constructors/#createpopper">constructor docs</a>.</td> </tr> <tr> <td><code>display</code></td> diff --git a/site/content/docs/5.0/components/tooltips.md b/site/content/docs/5.0/components/tooltips.md index 2ab684a22..e2a45c3ed 100644 --- a/site/content/docs/5.0/components/tooltips.md +++ b/site/content/docs/5.0/components/tooltips.md @@ -249,27 +249,17 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt </td> </tr> <tr> - <td><code>offset</code></td> - <td>number | string | function</td> - <td><code>0</code></td> - <td> - <p>Offset of the tooltip relative to its target.</p> - <p>When a function is used to determine the offset, it is called with an object containing the offset data as its first argument. The function must return an object with the same structure. The triggering element DOM node is passed as the second argument.</p> - <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#modifiers..offset.offset">offset docs</a>.</p> - </td> - </tr> - <tr> <td><code>fallbackPlacement</code></td> - <td>string | array</td> - <td><code>'flip'</code></td> + <td>null | array</td> + <td><code>null</code></td> <td>Allow to specify which position Popper will use on fallback. For more information refer to - Popper's <a href="https://popper.js.org/docs/v1/#modifiers..flip.behavior">behavior docs</a></td> + Popper's <a href="https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements">behavior docs</a></td> </tr> <tr> <td><code>boundary</code></td> <td>string | element</td> - <td><code>'scrollParent'</code></td> - <td>Overflow constraint boundary of the tooltip. Accepts the values of <code>'viewport'</code>, <code>'window'</code>, <code>'scrollParent'</code>, or an HTMLElement reference (JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#modifiers..preventOverflow.boundariesElement">preventOverflow docs</a>.</td> + <td><code>'clippingParents'</code></td> + <td>Overflow constraint boundary of the tooltip. By default it's <code>'clippingParents'</code> and can accept an HTMLElement reference (JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v2/utils/detect-overflow/#boundary">preventOverflow docs</a>.</td> </tr> <tr> <td><code>customClass</code></td> diff --git a/site/content/docs/5.0/getting-started/webpack.md b/site/content/docs/5.0/getting-started/webpack.md index 4b9c525dd..6998e1e99 100644 --- a/site/content/docs/5.0/getting-started/webpack.md +++ b/site/content/docs/5.0/getting-started/webpack.md @@ -27,7 +27,7 @@ import Alert from 'bootstrap/js/dist/alert'; ``` Bootstrap depends on [Popper](https://popper.js.org/), which is specified in the `peerDependencies` property. -This means that you will have to make sure to add it to your `package.json` using `npm install popper.js`. +This means that you will have to make sure to add it to your `package.json` using `npm install @popperjs/core`. ## Importing Styles diff --git a/site/content/docs/5.0/migration.md b/site/content/docs/5.0/migration.md index da554c332..7eef5504f 100644 --- a/site/content/docs/5.0/migration.md +++ b/site/content/docs/5.0/migration.md @@ -283,6 +283,8 @@ Changes to our source and compiled JavaScript files. - Dropped jQuery dependency and rewrote plugins to be in regular JavaScript. - Removed underscore from public static methods like `_getInstance()` → `getInstance()`. +- Moved from Popper v1.x to Popper v2.x +- Removed `offset` option from our Tooltip/Popover and Dropdown plugin, this can still be achieve using `popperConfig` parameter. ### Color system |
