From d459dfac74e90c29950d49a82edc19fd913d435e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Jul 2021 08:25:05 +0000 Subject: update to bootstrap 5.0.2 --- .../site/content/docs/5.0/components/accordion.md | 157 +++ .../site/content/docs/5.0/components/alerts.md | 264 +++++ .../site/content/docs/5.0/components/badge.md | 93 ++ .../site/content/docs/5.0/components/breadcrumb.md | 96 ++ .../content/docs/5.0/components/button-group.md | 268 +++++ .../site/content/docs/5.0/components/buttons.md | 246 ++++ .../site/content/docs/5.0/components/card.md | 729 ++++++++++++ .../site/content/docs/5.0/components/carousel.md | 471 ++++++++ .../content/docs/5.0/components/close-button.md | 38 + .../site/content/docs/5.0/components/collapse.md | 245 ++++ .../site/content/docs/5.0/components/dropdowns.md | 1210 ++++++++++++++++++++ .../site/content/docs/5.0/components/list-group.md | 542 +++++++++ .../site/content/docs/5.0/components/modal.md | 1004 ++++++++++++++++ .../site/content/docs/5.0/components/navbar.md | 670 +++++++++++ .../site/content/docs/5.0/components/navs-tabs.md | 680 +++++++++++ .../site/content/docs/5.0/components/offcanvas.md | 265 +++++ .../site/content/docs/5.0/components/pagination.md | 167 +++ .../site/content/docs/5.0/components/popovers.md | 443 +++++++ .../site/content/docs/5.0/components/progress.md | 151 +++ .../site/content/docs/5.0/components/scrollspy.md | 367 ++++++ .../site/content/docs/5.0/components/spinners.md | 195 ++++ .../site/content/docs/5.0/components/toasts.md | 446 ++++++++ .../site/content/docs/5.0/components/tooltips.md | 471 ++++++++ 23 files changed, 9218 insertions(+) create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/accordion.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/alerts.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/badge.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/breadcrumb.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/button-group.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/buttons.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/card.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/carousel.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/close-button.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/collapse.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/dropdowns.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/list-group.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/modal.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/navbar.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/navs-tabs.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/offcanvas.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/pagination.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/popovers.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/progress.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/scrollspy.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/spinners.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/toasts.md create mode 100644 vendor/twbs/bootstrap/site/content/docs/5.0/components/tooltips.md (limited to 'vendor/twbs/bootstrap/site/content/docs/5.0/components') diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/accordion.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/accordion.md new file mode 100644 index 000000000..a4ef8272e --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/accordion.md @@ -0,0 +1,157 @@ +--- +layout: docs +title: Accordion +description: Build vertically collapsing accordions in combination with our Collapse JavaScript plugin. +group: components +aliases: + - "/components/" + - "/docs/5.0/components/" +toc: true +--- + +## How it works + +The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally to make it collapsible. To render an accordion that's expanded, add the `.open` class on the `.accordion`. + +{{< callout info >}} +{{< partial "callout-info-prefersreducedmotion.md" >}} +{{< /callout >}} + +## Example + +Click the accordions below to expand/collapse the accordion content. + +{{< example >}} +
+
+

+ +

+
+
+ This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+

+ +

+
+
+ This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+

+ +

+
+
+ This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+{{< /example >}} + +### Flush + +Add `.accordion-flush` to remove the default `background-color`, some borders, and some rounded corners to render accordions edge-to-edge with their parent container. + +{{< example class="bg-light" >}} +
+
+

+ +

+
+
Placeholder content for this accordion, which is intended to demonstrate the .accordion-flush class. This is the first item's accordion body.
+
+
+
+

+ +

+
+
Placeholder content for this accordion, which is intended to demonstrate the .accordion-flush class. This is the second item's accordion body. Let's imagine this being filled with some actual content.
+
+
+
+

+ +

+
+
Placeholder content for this accordion, which is intended to demonstrate the .accordion-flush class. This is the third item's accordion body. Nothing more exciting happening here in terms of content, but just filling up the space to make it look, at least at first glance, a bit more representative of how this would look in a real-world application.
+
+
+
+{{< /example >}} + +### Always open + +Omit the `data-bs-parent` attribute on each `.accordion-collapse` to make accordion items stay open when another item is opened. + +{{< example >}} +
+
+

+ +

+
+
+ This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+

+ +

+
+
+ This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+

+ +

+
+
+ This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow. +
+
+
+
+{{< /example >}} + +## Accessibility + +Please read the [collapse accessibility section]({{< docsref "/components/collapse#accessibility" >}}) for more information. + +## Sass + +### Variables + +{{< scss-docs name="accordion-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/alerts.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/alerts.md new file mode 100644 index 000000000..a7e52f5f8 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/alerts.md @@ -0,0 +1,264 @@ +--- +layout: docs +title: Alerts +description: Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. +group: components +toc: true +--- + +## Examples + +Alerts are available for any length of text, as well as an optional close button. For proper styling, use one of the eight **required** contextual classes (e.g., `.alert-success`). For inline dismissal, use the [alerts JavaScript plugin](#dismissing). + +{{< example >}} +{{< alerts.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +{{- end -}} +{{< /alerts.inline >}} +{{< /example >}} + +{{< callout info >}} +{{< partial "callout-warning-color-assistive-technologies.md" >}} +{{< /callout >}} + +### Link color + +Use the `.alert-link` utility class to quickly provide matching colored links within any alert. + +{{< example >}} +{{< alerts.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +{{ end -}} +{{< /alerts.inline >}} +{{< /example >}} + +### Additional content + +Alerts can also contain additional HTML elements like headings, paragraphs and dividers. + +{{< example >}} + +{{< /example >}} + +### Icons + +Similarly, you can use [flexbox utilities]({{< docsref "/utilities/flex" >}}) and [Bootstrap Icons]({{< param icons >}}) to create alerts with icons. Depending on your icons and content, you may want to add more utilities or custom styles. + +{{< example >}} + +{{< /example >}} + +Need more than one icon for your alerts? Consider using more Bootstrap Icons and making a local SVG sprite like so to easily reference the same icons repeatedly. + +{{< example >}} + + + + + + + + + + + + + + + + +{{< /example >}} + +### Dismissing + +Using the alert JavaScript plugin, it's possible to dismiss any alert inline. Here's how: + +- Be sure you've loaded the alert plugin, or the compiled Bootstrap JavaScript. +- Add a [close button]({{< docsref "/components/close-button" >}}) and the `.alert-dismissible` class, which adds extra padding to the right of the alert and positions the close button. +- On the close button, add the `data-bs-dismiss="alert"` attribute, which triggers the JavaScript functionality. Be sure to use the ` + +{{< /example >}} + +{{< callout warning >}} +When an alert is dismissed, the element is completely removed from the page structure. If a keyboard user dismisses the alert using the close button, their focus will suddenly be lost and, depending on the browser, reset to the start of the page/document. For this reason, we recommend including additional JavaScript that listens for the `closed.bs.alert` event and programmatically sets `focus()` to the most appropriate location in the page. If you're planning to move focus to a non-interactive element that normally does not receive focus, make sure to add `tabindex="-1"` to the element. +{{< /callout >}} + +## Sass + +### Variables + +{{< scss-docs name="alert-variables" file="scss/_variables.scss" >}} + +### Variant mixin + +Used in combination with `$theme-colors` to create contextual modifier classes for our alerts. + +{{< scss-docs name="alert-variant-mixin" file="scss/mixins/_alert.scss" >}} + +### Loop + +Loop that generates the modifier classes with the `alert-variant()` mixin. + +{{< scss-docs name="alert-modifiers" file="scss/_alert.scss" >}} + +## JavaScript behavior + +### Triggers + +Enable dismissal of an alert via JavaScript: + +```js +var alertList = document.querySelectorAll('.alert') +alertList.forEach(function (alert) { + new bootstrap.Alert(alert) +}) +``` + +Or with `data` attributes on a button **within the alert**, as demonstrated above: + +```html + +``` + +Note that closing an alert will remove it from the DOM. + +### Methods + +You can create an alert instance with the alert constructor, for example: + +```js +var myAlert = document.getElementById('myAlert') +var bsAlert = new bootstrap.Alert(myAlert) +``` + +This makes an alert listen for click events on descendant elements which have the `data-bs-dismiss="alert"` attribute. (Not necessary when using the data-api's auto-initialization.) + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodDescription
+ close + + Closes an alert by removing it from the DOM. If the .fade and .show classes are present on the element, the alert will fade out before it is removed. +
+ dispose + + Destroys an element's alert. (Removes stored data on the DOM element) +
+ getInstance + + Static method which allows you to get the alert instance associated to a DOM element, you can use it like this: bootstrap.Alert.getInstance(alert) +
+ getOrCreateInstance + + Static method which returns an alert instance associated to a DOM element or create a new one in case it wasn't initialised. + You can use it like this: bootstrap.Alert.getOrCreateInstance(element) +
+ +```js +var alertNode = document.querySelector('.alert') +var alert = bootstrap.Alert.getInstance(alertNode) +alert.close() +``` + +### Events + +Bootstrap's alert plugin exposes a few events for hooking into alert functionality. + + + + + + + + + + + + + + + + + + +
EventDescription
close.bs.alert + Fires immediately when the close instance method is called. +
closed.bs.alert + Fired when the alert has been closed and CSS transitions have completed. +
+ +```js +var myAlert = document.getElementById('myAlert') +myAlert.addEventListener('closed.bs.alert', function () { + // do something, for instance, explicitly move focus to the most appropriate element, + // so it doesn't get lost/reset to the start of the page + // document.getElementById('...').focus() +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/badge.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/badge.md new file mode 100644 index 000000000..de80d3b27 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/badge.md @@ -0,0 +1,93 @@ +--- +layout: docs +title: Badges +description: Documentation and examples for badges, our small count and labeling component. +group: components +toc: true +--- + +## Examples + +Badges scale to match the size of the immediate parent element by using relative font sizing and `em` units. As of v5, badges no longer have focus or hover styles for links. + +### Headings + +{{< example >}} +

Example heading New

+

Example heading New

+

Example heading New

+

Example heading New

+
Example heading New
+
Example heading New
+{{< /example >}} + +### Buttons + +Badges can be used as part of links or buttons to provide a counter. + +{{< example >}} + +{{< /example >}} + +Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button. + +Unless the context is clear (as with the "Notifications" example, where it is understood that the "4" is the number of notifications), consider including additional context with a visually hidden piece of additional text. + +### Positioned + +Use utilities to modify a `.badge` and position it in the corner of a link or button. + +{{< example >}} + +{{< /example >}} + +You can also replace the `.badge` class with a few more utilities without a count for a more generic indicator. + +{{< example >}} + +{{< /example >}} + +## Background colors + +Use our background utility classes to quickly change the appearance of a badge. Please note that when using Bootstrap's default `.bg-light`, you'll likely need a text color utility like `.text-dark` for proper styling. This is because background utilities do not set anything but `background-color`. + +{{< example >}} +{{< badge.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +{{ .name | title }}{{- end -}} +{{< /badge.inline >}} +{{< /example >}} + +{{< callout info >}} +{{< partial "callout-warning-color-assistive-technologies.md" >}} +{{< /callout >}} + +## Pill badges + +Use the `.rounded-pill` utility class to make badges more rounded with a larger `border-radius`. + +{{< example >}} +{{< badge.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +{{ .name | title }}{{- end -}} +{{< /badge.inline >}} +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="badge-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/breadcrumb.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/breadcrumb.md new file mode 100644 index 000000000..9143e7612 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/breadcrumb.md @@ -0,0 +1,96 @@ +--- +layout: docs +title: Breadcrumb +description: Indicate the current page's location within a navigational hierarchy that automatically adds separators via CSS. +group: components +toc: true +--- + +## Example + +Use an ordered or unordered list with linked list items to create a minimally styled breadcrumb. Use our utilities to add additional styles as desired. + +{{< example >}} + + + + + +{{< /example >}} + +## Dividers + +Dividers are automatically added in CSS through [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`content`](https://developer.mozilla.org/en-US/docs/Web/CSS/content). They can be changed by modifying a local CSS custom property `--bs-breadcrumb-divider`, or through the `$breadcrumb-divider` Sass variable — and `$breadcrumb-divider-flipped` for its RTL counterpart, if needed. We default to our Sass variable, which is set as a fallback to the custom property. This way, you get a global divider that you can override without recompiling CSS at any time. + +{{< example >}} + +{{< /example >}} + +When modifying via Sass, the [quote](https://sass-lang.com/documentation/modules/string#quote) function is required to generate the quotes around a string. For example, using `>` as the divider, you can use this: + +```scss +$breadcrumb-divider: quote(">"); +``` + +It's also possible to use an **embedded SVG icon**. Apply it via our CSS custom property, or use the Sass variable. + +{{< example >}} + +{{< /example >}} + +```scss +$breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='currentColor'/%3E%3C/svg%3E"); +``` + +You can also remove the divider setting `--bs-breadcrumb-divider: '';` (empty strings in CSS custom properties counts as a value), or setting the Sass variable to `$breadcrumb-divider: none;`. + +{{< example >}} + +{{< /example >}} + + +```scss +$breadcrumb-divider: none; +``` + +## Accessibility + +Since breadcrumbs provide a navigation, it's a good idea to add a meaningful label such as `aria-label="breadcrumb"` to describe the type of navigation provided in the `