From 2c38800ea224327a063a8fd5c11df8d2ee2ca5a6 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Sat, 27 Jun 2020 12:28:21 +0100 Subject: [PATCH] Add code to method/property tables (#31130) Co-authored-by: XhmikosR --- site/content/docs/5.0/components/carousel.md | 24 +++---- site/content/docs/5.0/components/collapse.md | 16 ++--- site/content/docs/5.0/components/dropdowns.md | 24 +++---- .../content/docs/5.0/components/list-group.md | 8 +-- site/content/docs/5.0/components/modal.md | 34 ++++----- site/content/docs/5.0/components/navs.md | 8 +-- site/content/docs/5.0/components/popovers.md | 64 ++++++++--------- site/content/docs/5.0/components/scrollspy.md | 12 ++-- site/content/docs/5.0/components/toasts.md | 18 ++--- site/content/docs/5.0/components/tooltips.md | 70 +++++++++---------- 10 files changed, 139 insertions(+), 139 deletions(-) diff --git a/site/content/docs/5.0/components/carousel.md b/site/content/docs/5.0/components/carousel.md index 17d8bf1e39..935779238c 100644 --- a/site/content/docs/5.0/components/carousel.md +++ b/site/content/docs/5.0/components/carousel.md @@ -239,40 +239,40 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - interval + interval number - 5000 + 5000 The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. - keyboard + keyboard boolean - true + true Whether the carousel should react to keyboard events. - pause + pause string | boolean - "hover" + "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. Note that this is in addition to the above mouse behavior.

- slide + slide string | boolean - false + false Autoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load. - wrap + wrap boolean - true + true Whether the carousel should cycle continuously or have hard stops. - touch + touch boolean - true + true Whether the carousel should support left/right swipe interactions on touchscreen devices. diff --git a/site/content/docs/5.0/components/collapse.md b/site/content/docs/5.0/components/collapse.md index beb9486c9b..a182ab2301 100644 --- a/site/content/docs/5.0/components/collapse.md +++ b/site/content/docs/5.0/components/collapse.md @@ -171,15 +171,15 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - parent + parent selector | jQuery object | DOM element - false + 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 + toggle boolean - true + true Toggles the collapsible element on invocation @@ -246,19 +246,19 @@ Bootstrap's collapse class exposes a few events for hooking into collapse functi - show.bs.collapse + show.bs.collapse This event fires immediately when the show instance method is called. - shown.bs.collapse + shown.bs.collapse This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete). - hide.bs.collapse + hide.bs.collapse This event is fired immediately when the hide method has been called. - hidden.bs.collapse + hidden.bs.collapse This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete). diff --git a/site/content/docs/5.0/components/dropdowns.md b/site/content/docs/5.0/components/dropdowns.md index 5260831da9..02f4eaeecb 100644 --- a/site/content/docs/5.0/components/dropdowns.md +++ b/site/content/docs/5.0/components/dropdowns.md @@ -822,9 +822,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - offset + offset number | string | function - 0 + 0

Offset of the dropdown relative to its target.

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.

@@ -832,33 +832,33 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - flip + flip boolean - true + true Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to Popper.js's flip docs. - boundary + boundary string | element - 'scrollParent' + 'scrollParent' Overflow constraint boundary of the dropdown menu. Accepts the values of 'viewport', 'window', 'scrollParent', or an HTMLElement reference (JavaScript only). For more information refer to Popper.js's preventOverflow docs. - reference + reference string | element - 'toggle' + 'toggle' Reference element of the dropdown menu. Accepts the values of 'toggle', 'parent', or an HTMLElement reference. For more information refer to Popper.js's referenceObject docs. - display + display string - 'dynamic' + 'dynamic' By default, we use Popper.js for dynamic positioning. Disable this with static. - popperConfig + popperConfig null | object - null + null To change Bootstrap's default Popper.js config, see Popper.js's configuration diff --git a/site/content/docs/5.0/components/list-group.md b/site/content/docs/5.0/components/list-group.md index c050e164d4..a82bdddf79 100644 --- a/site/content/docs/5.0/components/list-group.md +++ b/site/content/docs/5.0/components/list-group.md @@ -445,19 +445,19 @@ If no tab was already active, the `hide.bs.tab` and `hidden.bs.tab` events will - show.bs.tab + show.bs.tab This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. - shown.bs.tab + shown.bs.tab This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. - hide.bs.tab + hide.bs.tab This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use event.target and event.relatedTarget to target the current active tab and the new soon-to-be-active tab, respectively. - hidden.bs.tab + hidden.bs.tab This event fires after a new tab is shown (and thus the previous active tab is hidden). Use event.target and event.relatedTarget to target the previous active tab and the new active tab, respectively. diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index 28977b20b4..19d0aae376 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -699,19 +699,19 @@ Another override is the option to pop up a modal that covers the user viewport, .modal-fullscreen-sm-down - Below 576px + Below 576px .modal-fullscreen-md-down - Below 768px + Below 768px .modal-fullscreen-lg-down - Below 992px + Below 992px .modal-fullscreen-xl-down - Below 1200px + Below 1200px @@ -878,27 +878,27 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - backdrop + backdrop boolean or the string 'static' - true + true Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click. - keyboard + keyboard boolean - true + true Closes the modal when escape key is pressed - focus + focus boolean - true + true Puts the focus on the modal when initialized. - show + show boolean - true + true Shows the modal when initialized. @@ -972,23 +972,23 @@ Bootstrap's modal class exposes a few events for hooking into modal functionalit - show.bs.modal + show.bs.modal This event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event. - shown.bs.modal + shown.bs.modal This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the relatedTarget property of the event. - hide.bs.modal + hide.bs.modal This event is fired immediately when the hide instance method has been called. - hidden.bs.modal + hidden.bs.modal This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). - hidePrevented.bs.modal + hidePrevented.bs.modal This event is fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option or data-keyboard set to false. diff --git a/site/content/docs/5.0/components/navs.md b/site/content/docs/5.0/components/navs.md index ad5753cb10..a52a11adc8 100644 --- a/site/content/docs/5.0/components/navs.md +++ b/site/content/docs/5.0/components/navs.md @@ -645,19 +645,19 @@ If no tab was already active, then the `hide.bs.tab` and `hidden.bs.tab` events - show.bs.tab + show.bs.tab This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. - shown.bs.tab + shown.bs.tab This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively. - hide.bs.tab + hide.bs.tab This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use event.target and event.relatedTarget to target the current active tab and the new soon-to-be-active tab, respectively. - hidden.bs.tab + hidden.bs.tab This event fires after a new tab is shown (and thus the previous active tab is hidden). Use event.target and event.relatedTarget to target the previous active tab and the new active tab, respectively. diff --git a/site/content/docs/5.0/components/popovers.md b/site/content/docs/5.0/components/popovers.md index 73be8ad10b..4af07a2232 100644 --- a/site/content/docs/5.0/components/popovers.md +++ b/site/content/docs/5.0/components/popovers.md @@ -164,32 +164,32 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - animation + animation boolean - true + true Apply a CSS fade transition to the popover - container + container string | element | false - false + false

Appends the popover to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.

- content + content string | element | function - '' + ''

Default content value if data-content attribute isn't present.

If a function is given, it will be called with its this reference set to the element that the popover is attached to.

- delay + delay number | object - 0 + 0

Delay showing and hiding the popover (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

@@ -197,28 +197,28 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - html + html boolean - false + false Insert HTML into the popover. If false, innerText property will be used to insert content into the DOM. Use text if you're worried about XSS attacks. - placement + placement string | function - 'right' + 'right'

How to position the popover - auto | top | bottom | left | right.
When auto is specified, it will dynamically reorient the popover.

When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the popover instance.

- selector + selector string | false - false + false If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See this and an informative example. - template + template string '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>' @@ -230,61 +230,61 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - title + title string | element | function - '' + ''

Default title value if title attribute isn't present.

If a function is given, it will be called with its this reference set to the element that the popover is attached to.

- trigger + trigger string - 'click' + 'click' How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. manual cannot be combined with any other trigger. - offset + offset number | string - 0 + 0 Offset of the popover relative to its target. For more information refer to Popper.js's offset docs. - fallbackPlacement + fallbackPlacement string | array - 'flip' + 'flip' Allow to specify which position Popper will use on fallback. For more information refer to Popper.js's behavior docs - boundary + boundary string | element - 'scrollParent' + 'scrollParent' Overflow constraint boundary of the popover. Accepts the values of 'viewport', 'window', 'scrollParent', or an HTMLElement reference (JavaScript only). For more information refer to Popper.js's preventOverflow docs. - sanitize + sanitize boolean - true + true Enable or disable the sanitization. If activated 'template', 'content' and 'title' options will be sanitized. - allowList + allowList object }}">Default value Object which contains allowed attributes and tags - sanitizeFn + sanitizeFn null | function - null + null Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization. - popperConfig + popperConfig null | object - null + null To change Bootstrap's default Popper.js config, see Popper.js's configuration diff --git a/site/content/docs/5.0/components/scrollspy.md b/site/content/docs/5.0/components/scrollspy.md index 318a76b35d..94ea1f9e1f 100644 --- a/site/content/docs/5.0/components/scrollspy.md +++ b/site/content/docs/5.0/components/scrollspy.md @@ -311,19 +311,19 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - offset + offset number - 10 + 10 Pixels to offset from top when calculating position of scroll. - method + method string - auto + auto Finds which section the spied element is in. auto will choose the best method to get scroll coordinates. offset will use the Element.getBoundingClientRect() method to get scroll coordinates. position will use the HTMLElement.offsetTop and HTMLElement.offsetLeft properties to get scroll coordinates. - target + target string | jQuery object | DOM element Specifies element to apply Scrollspy plugin. @@ -342,7 +342,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - activate.bs.scrollspy + activate.bs.scrollspy This event fires on the scroll element whenever a new item becomes activated by the scrollspy. diff --git a/site/content/docs/5.0/components/toasts.md b/site/content/docs/5.0/components/toasts.md index 33b2cba199..8ac4a1c63b 100644 --- a/site/content/docs/5.0/components/toasts.md +++ b/site/content/docs/5.0/components/toasts.md @@ -294,19 +294,19 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap - animation + animation boolean - true + true Apply a CSS fade transition to the toast - autohide + autohide boolean - true + true Auto hide the toast - delay + delay number 500 @@ -352,19 +352,19 @@ Hides an element's toast. Your toast will remain on the DOM but won't show anymo - show.bs.toast + show.bs.toast This event fires immediately when the show instance method is called. - shown.bs.toast + shown.bs.toast This event is fired when the toast has been made visible to the user. - hide.bs.toast + hide.bs.toast This event is fired immediately when the hide instance method has been called. - hidden.bs.toast + hidden.bs.toast This event is fired when the toast has finished being hidden from the user. diff --git a/site/content/docs/5.0/components/tooltips.md b/site/content/docs/5.0/components/tooltips.md index 385ec99f00..947a50f88d 100644 --- a/site/content/docs/5.0/components/tooltips.md +++ b/site/content/docs/5.0/components/tooltips.md @@ -170,23 +170,23 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - animation + animation boolean - true + true Apply a CSS fade transition to the tooltip - container + container string | element | false - false + false

Appends the tooltip to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.

- delay + delay number | object - 0 + 0

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

@@ -194,9 +194,9 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - html + html boolean - false + false

Allow HTML in the tooltip.

If true, HTML tags in the tooltip's title will be rendered in the tooltip. If false, innerText property will be used to insert content into the DOM.

@@ -204,22 +204,22 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - placement + placement string | function - 'top' + 'top'

How to position the tooltip - auto | top | bottom | left | right.
When auto is specified, it will dynamically reorient the tooltip.

When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the tooltip instance.

- selector + selector string | false - false + false If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (jQuery.on support). See this and an informative example. - template + template string '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' @@ -230,18 +230,18 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - title + title string | element | function - '' + ''

Default title value if title attribute isn't present.

If a function is given, it will be called with its this reference set to the element that the tooltip is attached to.

- trigger + trigger string - 'hover focus' + 'hover focus'

How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.

'manual' indicates that the tooltip will be triggered programmatically via the .tooltip('show'), .tooltip('hide') and .tooltip('toggle') methods; this value cannot be combined with any other trigger.

@@ -249,9 +249,9 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - offset + offset number | string | function - 0 + 0

Offset of the tooltip relative to its target.

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.

@@ -259,40 +259,40 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt - fallbackPlacement + fallbackPlacement string | array - 'flip' + 'flip' Allow to specify which position Popper will use on fallback. For more information refer to Popper.js's behavior docs - boundary + boundary string | element - 'scrollParent' + 'scrollParent' Overflow constraint boundary of the tooltip. Accepts the values of 'viewport', 'window', 'scrollParent', or an HTMLElement reference (JavaScript only). For more information refer to Popper.js's preventOverflow docs. - sanitize + sanitize boolean - true + true Enable or disable the sanitization. If activated 'template' and 'title' options will be sanitized. - allowList + allowList object }}">Default value Object which contains allowed attributes and tags - sanitizeFn + sanitizeFn null | function - null + null Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization. - popperConfig + popperConfig null | object - null + null To change Bootstrap's default Popper.js config, see Popper.js's configuration @@ -369,23 +369,23 @@ Updates the position of an element's tooltip. - show.bs.tooltip + show.bs.tooltip This event fires immediately when the show instance method is called. - shown.bs.tooltip + shown.bs.tooltip This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete). - hide.bs.tooltip + hide.bs.tooltip This event is fired immediately when the hide instance method has been called. - hidden.bs.tooltip + hidden.bs.tooltip This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete). - inserted.bs.tooltip + inserted.bs.tooltip This event is fired after the show.bs.tooltip event when the tooltip template has been added to the DOM.