diff options
Diffstat (limited to 'vendor/twbs/bootstrap/site/content/docs')
227 files changed, 22440 insertions, 12568 deletions
diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/_index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/_index.html deleted file mode 100644 index b9b9f7cb3..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/_index.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: redirect -sitemap_exclude: true -redirect: "/docs/4.6/getting-started/introduction/" ---- diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/about/brand.md b/vendor/twbs/bootstrap/site/content/docs/4.6/about/brand.md deleted file mode 100644 index a640c180a..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/about/brand.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -layout: docs -title: Brand guidelines -description: Documentation and examples for Bootstrap's logo and brand usage guidelines. -group: about -toc: true ---- - -Have a need for Bootstrap's brand resources? Great! We have only a few guidelines we follow, and in turn ask you to follow as well. These guidelines were inspired by MailChimp's [Brand Assets](https://mailchimp.com/about/brand-assets/). - -## Mark and logo - -Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Bootstrap**). It should always appear in San Francisco Display Semibold. **Do not use the Twitter bird** in association with Bootstrap. - -<div class="bd-brand-logos"> - <div class="bd-brand-item"> - <img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144" loading="lazy"> - </div> - <div class="bd-brand-item inverse"> - <img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144" loading="lazy"> - </div> -</div> -<div class="bd-brand-logos"> - <div class="bd-brand-item"> - <span class="h1">Bootstrap</span> - </div> - <div class="bd-brand-item inverse"> - <span class="h1">Bootstrap</span> - </div> -</div> - -## Download mark - -Download the Bootstrap mark in one of three styles, each available as an SVG file. Right click, Save as. - -<div class="bd-brand-logos"> - <div class="bd-brand-item"> - <img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144" loading="lazy"> - </div> - <div class="bd-brand-item inverse"> - <img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144" loading="lazy"> - </div> - <div class="bd-brand-item inverse"> - <img class="svg" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-punchout.svg" alt="Bootstrap" width="144" height="144" loading="lazy"> - </div> -</div> - -## Name - -The project and framework should always be referred to as **Bootstrap**. No Twitter before it, no capital _s_, and no abbreviations except for one, a capital **B**. - -<div class="bd-brand-logos"> - <div class="bd-brand-item"> - <span class="h3">Bootstrap</span> - <strong class="text-success">Right</strong> - </div> - <div class="bd-brand-item"> - <span class="h3 text-muted">BootStrap</span> - <strong class="text-warning">Wrong</strong> - </div> - <div class="bd-brand-item"> - <span class="h3 text-muted">Twitter Bootstrap</span> - <strong class="text-warning">Wrong</strong> - </div> -</div> - -## Colors - -Our docs and branding use a handful of primary colors to differentiate what *is* Bootstrap from what *is in* Bootstrap. In other words, if it's purple, it's representative of Bootstrap. - -<div class="bd-brand"> - <div class="color-swatches"> - <div class="color-swatch bd-purple"></div> - <div class="color-swatch bd-purple-light"></div> - <div class="color-swatch bd-purple-lighter"></div> - <div class="color-swatch bd-gray"></div> - </div> -</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/browser-bugs.md b/vendor/twbs/bootstrap/site/content/docs/4.6/browser-bugs.md deleted file mode 100644 index 1180fb5e2..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/browser-bugs.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: docs -title: Wall of browser bugs -group: browser-bugs -aliases: "/browser-bugs/" ---- - -{{< callout danger >}} -##### Outdated content - -This page is outdated and is no longer applicable to the latest versions of Bootstrap. It's here purely for historical purposes now and will be removed in our next major release. -{{< /callout >}} - -Bootstrap currently works around several outstanding browser bugs in major browsers to deliver the best cross-browser experience possible. Some bugs, like those listed below, cannot be solved by us. - -We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs]({{< docsref "/getting-started/browsers-devices#supported-browsers" >}}). - -See also: - -* [Chromium issue 536263: [meta] Issues affecting Bootstrap](https://bugs.chromium.org/p/chromium/issues/detail?id=536263) -* [Mozilla bug 1230801: Fix the issues that affect Bootstrap](https://bugzilla.mozilla.org/show_bug.cgi?id=1230801) -* [WebKit bug 159753: [meta] Issues affecting Bootstrap](https://bugs.webkit.org/show_bug.cgi?id=159753) -* [jQuery's browser bug workarounds](https://docs.google.com/document/d/1LPaPA30bLUB_publLIMF0RlhdnPx_ePXm7oW02iiT6o) - - -{{< bug.inline >}} -{{- $type := .Get "type" | default "bug" -}} -{{- $data := .Get "data" | default "browser-bugs" -}} -<table class="bd-browser-bugs table table-bordered table-hover"> - <thead> - <tr> - <th>Browser(s)</th> - <th>Summary of {{ $type }}</th> - <th>Upstream issue(s)</th> - <th>Bootstrap issue(s)</th> - </tr> - </thead> - <tbody> - {{- range (index $.Site.Data $data) }} - <tr> - <td>{{ .browser | chomp }}</td> - <td>{{ .summary | markdownify }}</td> - <td>{{ partial "bugify" .upstream_bug }}</td> - <td>{{ partial "bugify" .origin }}</td> - </tr> - {{- end }} - </tbody> -</table> - {{< /bug.inline >}} - -# Most wanted features - -There are several features specified in Web standards which would allow us to make Bootstrap more robust, elegant, or performant, but aren't yet implemented in certain browsers, thus preventing us from taking advantage of them. - -We publicly list these "most wanted" feature requests here, in the hopes of expediting the process of getting them implemented. - -{{< bug.inline data="browser-features" type="feature" />}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/alerts.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/alerts.md deleted file mode 100644 index 8d6cb3983..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/alerts.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -layout: docs -title: Alerts -description: Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. -group: components -aliases: - - "/components/" - - "/docs/4.6/components/" -toc: true ---- - -## Examples - -Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the eight **required** contextual classes (e.g., `.alert-success`). For inline dismissal, use the [alerts jQuery plugin](#dismissing). - -{{< example >}} -{{< alerts.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<div class="alert alert-{{ .name }}" role="alert"> - A simple {{ .name }} alert—check it out! -</div>{{- end -}} -{{< /alerts.inline >}} -{{< /example >}} - -{{< callout warning >}} -{{< 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") }} -<div class="alert alert-{{ .name }}" role="alert"> - A simple {{ .name }} alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like. -</div>{{ end -}} -{{< /alerts.inline >}} -{{< /example >}} - -### Additional content - -Alerts can also contain additional HTML elements like headings, paragraphs and dividers. - -{{< example >}} -<div class="alert alert-success" role="alert"> - <h4 class="alert-heading">Well done!</h4> - <p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p> - <hr> - <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p> -</div> -{{< /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. -- If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). The compiled version includes this. -- Add a dismiss button and the `.alert-dismissible` class, which adds extra padding to the right of the alert and positions the `.close` button. -- On the dismiss button, add the `data-dismiss="alert"` attribute, which triggers the JavaScript functionality. Be sure to use the `<button>` element with it for proper behavior across all devices. -- To animate alerts when dismissing them, be sure to add the `.fade` and `.show` classes. - -You can see this in action with a live demo: - -{{< example >}} -<div class="alert alert-warning alert-dismissible fade show" role="alert"> - <strong>Holy guacamole!</strong> You should check in on some of those fields below. - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> -</div> -{{< /example >}} - -## JavaScript behavior - -### Triggers - -Enable dismissal of an alert via JavaScript: - -```js -$('.alert').alert() -``` - -Or with `data` attributes on a button **within the alert**, as demonstrated above: - -```html -<button type="button" class="close" data-dismiss="alert" aria-label="Close"> - <span aria-hidden="true">×</span> -</button> -``` - -Note that closing an alert will remove it from the DOM. - -### Methods - -| Method | Description | -| --- | --- | -| `$().alert()` | Makes an alert listen for click events on descendant elements which have the `data-dismiss="alert"` attribute. (Not necessary when using the data-api's auto-initialization.) | -| `$().alert('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. | -| `$().alert('dispose')` | Destroys an element's alert. | - -```js -$('.alert').alert('close') -``` - -### Events - -Bootstrap's alert plugin exposes a few events for hooking into alert functionality. - -| Event | Description | -| --- | --- | -| `close.bs.alert` | This event fires immediately when the `close` instance method is called. | -| `closed.bs.alert` | This event is fired when the alert has been closed (will wait for CSS transitions to complete). | - -```js -$('#myAlert').on('closed.bs.alert', function () { - // do something... -}) -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/badge.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/badge.md deleted file mode 100644 index 7d55cabcf..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/badge.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -layout: docs -title: Badges -description: Documentation and examples for badges, our small count and labeling component. -group: components -toc: true ---- - -## Example - -Badges scale to match the size of the immediate parent element by using relative font sizing and `em` units. - -{{< example >}} -<h1>Example heading <span class="badge badge-secondary">New</span></h1> -<h2>Example heading <span class="badge badge-secondary">New</span></h2> -<h3>Example heading <span class="badge badge-secondary">New</span></h3> -<h4>Example heading <span class="badge badge-secondary">New</span></h4> -<h5>Example heading <span class="badge badge-secondary">New</span></h5> -<h6>Example heading <span class="badge badge-secondary">New</span></h6> -{{< /example >}} - -Badges can be used as part of links or buttons to provide a counter. - -{{< example >}} -<button type="button" class="btn btn-primary"> - Notifications <span class="badge badge-light">4</span> -</button> -{{< /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. - -{{< example >}} -<button type="button" class="btn btn-primary"> - Profile <span class="badge badge-light">9</span> - <span class="sr-only">unread messages</span> -</button> -{{< /example >}} - -## Contextual variations - -Add any of the below mentioned modifier classes to change the appearance of a badge. - -{{< example >}} -{{< badge.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<span class="badge badge-{{ .name }}">{{ .name | title }}</span>{{- end -}} -{{< /badge.inline >}} -{{< /example >}} - -{{< callout warning >}} -{{< partial "callout-warning-color-assistive-technologies.md" >}} -{{< /callout >}} - -## Pill badges - -Use the `.badge-pill` modifier class to make badges more rounded (with a larger `border-radius` and additional horizontal `padding`). Useful if you miss the badges from v3. - -{{< example >}} -{{< badge.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<span class="badge badge-pill badge-{{ .name }}">{{ .name | title }}</span>{{- end -}} -{{< /badge.inline >}} -{{< /example >}} - -## Links - -Using the contextual `.badge-*` classes on an `<a>` element quickly provide _actionable_ badges with hover and focus states. - -{{< example >}} -{{< badge.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<a href="#" class="badge badge-{{ .name }}">{{ .name | title }}</a>{{- end -}} -{{< /badge.inline >}} -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/breadcrumb.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/breadcrumb.md deleted file mode 100644 index 9ed198fcd..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/breadcrumb.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: docs -title: Breadcrumb -description: Indicate the current page's location within a navigational hierarchy that automatically adds separators via CSS. -group: components ---- - -## Example - -{{< example >}} -<nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - <li class="breadcrumb-item active" aria-current="page">Home</li> - </ol> -</nav> - -<nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - <li class="breadcrumb-item"><a href="#">Home</a></li> - <li class="breadcrumb-item active" aria-current="page">Library</li> - </ol> -</nav> - -<nav aria-label="breadcrumb"> - <ol class="breadcrumb"> - <li class="breadcrumb-item"><a href="#">Home</a></li> - <li class="breadcrumb-item"><a href="#">Library</a></li> - <li class="breadcrumb-item active" aria-current="page">Data</li> - </ol> -</nav> -{{< /example >}} - -## Changing the separator - -Separators 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 changing `$breadcrumb-divider`. The [quote](https://sass-lang.com/documentation/modules/string#quote) function is needed to generate the quotes around a string, so if you want `>` as separator, you can use this: - -```scss -$breadcrumb-divider: quote(">"); -``` - -It's also possible to use a **base64 embedded SVG icon**: - -```scss -$breadcrumb-divider: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPjxwYXRoIGQ9Ik0yLjUgMEwxIDEuNSAzLjUgNCAxIDYuNSAyLjUgOGw0LTQtNC00eiIgZmlsbD0iY3VycmVudENvbG9yIi8+PC9zdmc+); -``` - -The separator can be removed by setting `$breadcrumb-divider` to `none`: - -```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 `<nav>` element, as well as applying an `aria-current="page"` to the last item of the set to indicate that it represents the current page. - -For more information, see the [WAI-ARIA Authoring Practices for the breadcrumb pattern](https://www.w3.org/TR/wai-aria-practices/#breadcrumb). diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/button-group.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/button-group.md deleted file mode 100644 index 07f60a9bb..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/button-group.md +++ /dev/null @@ -1,202 +0,0 @@ ---- -layout: docs -title: Button group -description: Group a series of buttons together on a single line with the button group, and super-power them with JavaScript. -group: components -toc: true ---- - -## Basic example - -Wrap a series of buttons with `.btn` in `.btn-group`. Add on optional JavaScript radio and checkbox style behavior with [our buttons plugin]({{< docsref "/components/buttons#button-plugin" >}}). - -{{< example >}} -<div class="btn-group" role="group" aria-label="Basic example"> - <button type="button" class="btn btn-secondary">Left</button> - <button type="button" class="btn btn-secondary">Middle</button> - <button type="button" class="btn btn-secondary">Right</button> -</div> -{{< /example >}} - -{{< callout warning >}} -##### Ensure correct `role` and provide a label - -In order for assistive technologies (such as screen readers) to convey that a series of buttons is grouped, an appropriate `role` attribute needs to be provided. For button groups, this would be `role="group"`, while toolbars should have a `role="toolbar"`. - -In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct role attribute. In the examples provided here, we use `aria-label`, but alternatives such as `aria-labelledby` can also be used. -{{< /callout >}} - -## Button toolbar - -Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more. - -{{< example >}} -<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups"> - <div class="btn-group mr-2" role="group" aria-label="First group"> - <button type="button" class="btn btn-secondary">1</button> - <button type="button" class="btn btn-secondary">2</button> - <button type="button" class="btn btn-secondary">3</button> - <button type="button" class="btn btn-secondary">4</button> - </div> - <div class="btn-group mr-2" role="group" aria-label="Second group"> - <button type="button" class="btn btn-secondary">5</button> - <button type="button" class="btn btn-secondary">6</button> - <button type="button" class="btn btn-secondary">7</button> - </div> - <div class="btn-group" role="group" aria-label="Third group"> - <button type="button" class="btn btn-secondary">8</button> - </div> -</div> -{{< /example >}} - -Feel free to mix input groups with button groups in your toolbars. Similar to the example above, you'll likely need some utilities though to space things properly. - -{{< example >}} -<div class="btn-toolbar mb-3" role="toolbar" aria-label="Toolbar with button groups"> - <div class="btn-group mr-2" role="group" aria-label="First group"> - <button type="button" class="btn btn-secondary">1</button> - <button type="button" class="btn btn-secondary">2</button> - <button type="button" class="btn btn-secondary">3</button> - <button type="button" class="btn btn-secondary">4</button> - </div> - <div class="input-group"> - <div class="input-group-prepend"> - <div class="input-group-text" id="btnGroupAddon">@</div> - </div> - <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon"> - </div> -</div> - -<div class="btn-toolbar justify-content-between" role="toolbar" aria-label="Toolbar with button groups"> - <div class="btn-group" role="group" aria-label="First group"> - <button type="button" class="btn btn-secondary">1</button> - <button type="button" class="btn btn-secondary">2</button> - <button type="button" class="btn btn-secondary">3</button> - <button type="button" class="btn btn-secondary">4</button> - </div> - <div class="input-group"> - <div class="input-group-prepend"> - <div class="input-group-text" id="btnGroupAddon2">@</div> - </div> - <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon2"> - </div> -</div> -{{< /example >}} - -## Sizing - -Instead of applying button sizing classes to every button in a group, just add `.btn-group-*` to each `.btn-group`, including each one when nesting multiple groups. - -<div class="bd-example"> - <div class="btn-group btn-group-lg" role="group" aria-label="Large button group"> - <button type="button" class="btn btn-secondary">Left</button> - <button type="button" class="btn btn-secondary">Middle</button> - <button type="button" class="btn btn-secondary">Right</button> - </div> - <br> - <div class="btn-group" role="group" aria-label="Default button group"> - <button type="button" class="btn btn-secondary">Left</button> - <button type="button" class="btn btn-secondary">Middle</button> - <button type="button" class="btn btn-secondary">Right</button> - </div> - <br> - <div class="btn-group btn-group-sm" role="group" aria-label="Small button group"> - <button type="button" class="btn btn-secondary">Left</button> - <button type="button" class="btn btn-secondary">Middle</button> - <button type="button" class="btn btn-secondary">Right</button> - </div> -</div> - -```html -<div class="btn-group btn-group-lg" role="group" aria-label="...">...</div> -<div class="btn-group" role="group" aria-label="...">...</div> -<div class="btn-group btn-group-sm" role="group" aria-label="...">...</div> -``` - -## Nesting - -Place a `.btn-group` within another `.btn-group` when you want dropdown menus mixed with a series of buttons. - -{{< example >}} -<div class="btn-group" role="group" aria-label="Button group with nested dropdown"> - <button type="button" class="btn btn-secondary">1</button> - <button type="button" class="btn btn-secondary">2</button> - - <div class="btn-group" role="group"> - <button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </button> - <div class="dropdown-menu" aria-labelledby="btnGroupDrop1"> - <a class="dropdown-item" href="#">Dropdown link</a> - <a class="dropdown-item" href="#">Dropdown link</a> - </div> - </div> -</div> -{{< /example >}} - -## Vertical variation - -Make a set of buttons appear vertically stacked rather than horizontally. **Split button dropdowns are not supported here.** - -<div class="bd-example"> - <div class="btn-group-vertical" role="group" aria-label="Vertical button group"> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - </div> -</div> - - -<div class="bd-example"> - <div class="btn-group-vertical" role="group" aria-label="Vertical button group"> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - <div class="btn-group" role="group"> - <button id="btnGroupVerticalDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </button> - <div class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop1"> - <a class="dropdown-item" href="#">Dropdown link</a> - <a class="dropdown-item" href="#">Dropdown link</a> - </div> - </div> - <button type="button" class="btn btn-secondary">Button</button> - <button type="button" class="btn btn-secondary">Button</button> - <div class="btn-group" role="group"> - <button id="btnGroupVerticalDrop2" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </button> - <div class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop2"> - <a class="dropdown-item" href="#">Dropdown link</a> - <a class="dropdown-item" href="#">Dropdown link</a> - </div> - </div> - <div class="btn-group" role="group"> - <button id="btnGroupVerticalDrop3" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </button> - <div class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop3"> - <a class="dropdown-item" href="#">Dropdown link</a> - <a class="dropdown-item" href="#">Dropdown link</a> - </div> - </div> - <div class="btn-group" role="group"> - <button id="btnGroupVerticalDrop4" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </button> - <div class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop4"> - <a class="dropdown-item" href="#">Dropdown link</a> - <a class="dropdown-item" href="#">Dropdown link</a> - </div> - </div> - </div> -</div> - -```html -<div class="btn-group-vertical"> - ... -</div> -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/buttons.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/buttons.md deleted file mode 100644 index a54482319..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/buttons.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -layout: docs -title: Buttons -description: Use Bootstrap's custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more. -group: components -toc: true ---- - -## Examples - -Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control. - -{{< example >}} -{{< buttons.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<button type="button" class="btn btn-{{ .name }}">{{ .name | title }}</button> -{{- end -}} -{{< /buttons.inline >}} - -<button type="button" class="btn btn-link">Link</button> -{{< /example >}} - -{{< callout warning >}} -{{< partial "callout-warning-color-assistive-technologies.md" >}} -{{< /callout >}} - -## Disable text wrapping - -If you don't want the button text to wrap, you can add the `.text-nowrap` class to the button. In Sass, you can set `$btn-white-space: nowrap` to disable text wrapping for each button. - -## Button tags - -The `.btn` classes are designed to be used with the `<button>` element. However, you can also use these classes on `<a>` or `<input>` elements (though some browsers may apply a slightly different rendering). - -When using button classes on `<a>` elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a `role="button"` to appropriately convey their purpose to assistive technologies such as screen readers. - -{{< example >}} -<a class="btn btn-primary" href="#" role="button">Link</a> -<button class="btn btn-primary" type="submit">Button</button> -<input class="btn btn-primary" type="button" value="Input"> -<input class="btn btn-primary" type="submit" value="Submit"> -<input class="btn btn-primary" type="reset" value="Reset"> -{{< /example >}} - -## Outline buttons - -In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the `.btn-outline-*` ones to remove all background images and colors on any button. - -{{< example >}} -{{< buttons.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<button type="button" class="btn btn-outline-{{ .name }}">{{ .name | title }}</button> -{{- end -}} -{{< /buttons.inline >}} -{{< /example >}} - -{{< callout info >}} -Some of the button styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast. -{{< /callout >}} - -## Sizes - -Fancy larger or smaller buttons? Add `.btn-lg` or `.btn-sm` for additional sizes. - -{{< example >}} -<button type="button" class="btn btn-primary btn-lg">Large button</button> -<button type="button" class="btn btn-secondary btn-lg">Large button</button> -{{< /example >}} - -{{< example >}} -<button type="button" class="btn btn-primary btn-sm">Small button</button> -<button type="button" class="btn btn-secondary btn-sm">Small button</button> -{{< /example >}} - -Create block level buttons—those that span the full width of a parent—by adding `.btn-block`. - -{{< example >}} -<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button> -<button type="button" class="btn btn-secondary btn-lg btn-block">Block level button</button> -{{< /example >}} - -## Active state - -Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. **There's no need to add a class to `<button>`s as they use a pseudo-class**. However, you can still force the same active appearance with `.active` (and include the <code>aria-pressed="true"</code> attribute) should you need to replicate the state programmatically. - -{{< example >}} -<a href="#" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Primary link</a> -<a href="#" class="btn btn-secondary btn-lg active" role="button" aria-pressed="true">Link</a> -{{< /example >}} - -## Disabled state - -Make buttons look inactive by adding the `disabled` boolean attribute to any `<button>` element. - -{{< example >}} -<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button> -<button type="button" class="btn btn-secondary btn-lg" disabled>Button</button> -{{< /example >}} - -Disabled buttons using the `<a>` element behave a bit different: - -- `<a>`s don't support the `disabled` attribute, so you must add the `.disabled` class to make it visually appear disabled. -- Some future-friendly styles are included to disable all `pointer-events` on anchor buttons. In browsers which support that property, you won't see the disabled cursor at all. -- Disabled buttons should include the `aria-disabled="true"` attribute to indicate the state of the element to assistive technologies. - -{{< example >}} -<a href="#" class="btn btn-primary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Primary link</a> -<a href="#" class="btn btn-secondary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Link</a> -{{< /example >}} - -{{< callout warning >}} -##### Link functionality caveat - -The `.disabled` class uses `pointer-events: none` to try to disable the link functionality of `<a>`s, but that CSS property is not yet standardized. In addition, even in browsers that do support `pointer-events: none`, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, add a `tabindex="-1"` attribute on these links (to prevent them from receiving keyboard focus) and use custom JavaScript to disable their functionality. -{{< /callout >}} - -## Button plugin - -Do more with buttons. Control button states or create groups of buttons for more components like toolbars. - -### Toggle states - -Add `data-toggle="button"` to toggle a button's `active` state. If you're pre-toggling a button, you must manually add the `.active` class **and** `aria-pressed="true"` to the `<button>`. - -{{< example >}} -<button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false"> - Single toggle -</button> -{{< /example >}} - -### Checkbox and radio buttons - -Bootstrap's `.button` styles can be applied to other elements, such as `<label>`s, to provide checkbox or radio style button toggling. Add `data-toggle="buttons"` to a `.btn-group` containing those modified buttons to enable their toggling behavior via JavaScript and add `.btn-group-toggle` to style the `<input>`s within your buttons. **Note that you can create single input-powered buttons or groups of them.** - -The checked state for these buttons is **only updated via `click` event** on the button. If you use another method to update the input—e.g., with `<input type="reset">` or by manually applying the input's `checked` property—you'll need to toggle `.active` on the `<label>` manually. - -Note that pre-checked buttons require you to manually add the `.active` class to the input's `<label>`. - -{{< example >}} -<div class="btn-group-toggle" data-toggle="buttons"> - <label class="btn btn-secondary active"> - <input type="checkbox" checked> Checked - </label> -</div> -{{< /example >}} - -{{< example >}} -<div class="btn-group btn-group-toggle" data-toggle="buttons"> - <label class="btn btn-secondary active"> - <input type="radio" name="options" id="option1" checked> Active - </label> - <label class="btn btn-secondary"> - <input type="radio" name="options" id="option2"> Radio - </label> - <label class="btn btn-secondary"> - <input type="radio" name="options" id="option3"> Radio - </label> -</div> -{{< /example >}} - -### Methods - -| Method | Description | -| --- | --- | -| `$().button('toggle')` | Toggles push state. Gives the button the appearance that it has been activated. | -| `$().button('dispose')` | Destroys an element's button. | diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/carousel.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/carousel.md deleted file mode 100644 index b8fac60d3..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/carousel.md +++ /dev/null @@ -1,395 +0,0 @@ ---- -layout: docs -title: Carousel -description: A slideshow component for cycling through elements—images or slides of text—like a carousel. -group: components -toc: true ---- - -## How it works - -The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators. - -In browsers where the [Page Visibility API](https://www.w3.org/TR/page-visibility/) is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.). - -{{< callout info >}} -{{< partial "callout-info-prefersreducedmotion.md" >}} -{{< /callout >}} - -Please be aware that nested carousels are not supported, and carousels are generally not compliant with accessibility standards. - -Lastly, if you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). - -## Example - -Carousels don't automatically normalize slide dimensions. As such, you may need to use additional utilities or custom styles to appropriately size content. While carousels support previous/next controls and indicators, they're not explicitly required. Add and customize as you see fit. - -**The `.active` class needs to be added to one of the slides** otherwise the carousel will not be visible. Also be sure to set a unique id on the `.carousel` for optional controls, especially if you're using multiple carousels on a single page. Control and indicator elements must have a `data-target` attribute (or `href` for links) that matches the id of the `.carousel` element. - -### Slides only - -Here's a carousel with slides only. Note the presence of the `.d-block` and `.w-100` on carousel images to prevent browser default image alignment. - -{{< example >}} -<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel"> - <div class="carousel-inner"> - <div class="carousel-item active"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - </div> - </div> -</div> -{{< /example >}} - -### With controls - -Adding in the previous and next controls: - -{{< example >}} -<div id="carouselExampleControls" class="carousel slide" data-ride="carousel"> - <div class="carousel-inner"> - <div class="carousel-item active"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - </div> - </div> - <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev"> - <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next"> - <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> -</div> -{{< /example >}} - -### With indicators - -You can also add the indicators to the carousel, alongside the controls, too. - -{{< example >}} -<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> - <ol class="carousel-indicators"> - <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> - <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> - <li data-target="#carouselExampleIndicators" data-slide-to="2"></li> - </ol> - <div class="carousel-inner"> - <div class="carousel-item active"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - </div> - </div> - <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> - <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> - <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> -</div> -{{< /example >}} - -### With captions - -Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. They can be easily hidden on smaller viewports, as shown below, with optional [display utilities]({{< docsref "/utilities/display" >}}). We hide them initially with `.d-none` and bring them back on medium-sized devices with `.d-md-block`. - -{{< example >}} -<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel"> - <ol class="carousel-indicators"> - <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li> - <li data-target="#carouselExampleCaptions" data-slide-to="1"></li> - <li data-target="#carouselExampleCaptions" data-slide-to="2"></li> - </ol> - <div class="carousel-inner"> - <div class="carousel-item active"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - <div class="carousel-caption d-none d-md-block"> - <h5>First slide label</h5> - <p>Some representative placeholder content for the first slide.</p> - </div> - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - <div class="carousel-caption d-none d-md-block"> - <h5>Second slide label</h5> - <p>Some representative placeholder content for the second slide.</p> - </div> - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - <div class="carousel-caption d-none d-md-block"> - <h5>Third slide label</h5> - <p>Some representative placeholder content for the third slide.</p> - </div> - </div> - </div> - <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev"> - <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next"> - <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> -</div> -{{< /example >}} - -### Crossfade - -Add `.carousel-fade` to your carousel to animate slides with a fade transition instead of a slide. - -{{< example >}} -<div id="carouselExampleFade" class="carousel slide carousel-fade" data-ride="carousel"> - <div class="carousel-inner"> - <div class="carousel-item active"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - </div> - </div> - <a class="carousel-control-prev" href="#carouselExampleFade" role="button" data-slide="prev"> - <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#carouselExampleFade" role="button" data-slide="next"> - <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> -</div> -{{< /example >}} - -### Individual `.carousel-item` interval - -Add `data-interval=""` to a `.carousel-item` to change the amount of time to delay between automatically cycling to the next item. - -{{< example >}} -<div id="carouselExampleInterval" class="carousel slide" data-ride="carousel"> - <div class="carousel-inner"> - <div class="carousel-item active" data-interval="10000"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - </div> - <div class="carousel-item" data-interval="2000"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - </div> - </div> - <a class="carousel-control-prev" href="#carouselExampleInterval" role="button" data-slide="prev"> - <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#carouselExampleInterval" role="button" data-slide="next"> - <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> -</div> -{{< /example >}} - -### Disable touch swiping - -Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled using the `data-touch` attribute. The example below also does not include the `data-ride` attribute and has `data-interval="false"` so it doesn't autoplay. - -{{< example >}} -<div id="carouselExampleControlsNoTouching" class="carousel slide" data-touch="false" data-interval="false"> - <div class="carousel-inner"> - <div class="carousel-item active"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} - </div> - <div class="carousel-item"> - {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} - </div> - </div> - <a class="carousel-control-prev" href="#carouselExampleControlsNoTouching" role="button" data-slide="prev"> - <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#carouselExampleControlsNoTouching" role="button" data-slide="next"> - <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> -</div> -{{< /example >}} - -## Usage - -### Via data attributes - -Use data attributes to easily control the position of the carousel. `data-slide` accepts the keywords `prev` or `next`, which alters the slide position relative to its current position. Alternatively, use `data-slide-to` to pass a raw slide index to the carousel `data-slide-to="2"`, which shifts the slide position to a particular index beginning with `0`. - -The `data-ride="carousel"` attribute is used to mark a carousel as animating starting at page load. If you don't use `data-ride="carousel"` to initialize your carousel, you have to initialize it yourself. **It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel.** - -### Via JavaScript - -Call carousel manually with: - -```js -$('.carousel').carousel() -``` - -### Options - -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-interval=""`. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 100px;">Name</th> - <th style="width: 50px;">Type</th> - <th style="width: 50px;">Default</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>interval</td> - <td>number</td> - <td>5000</td> - <td>The amount of time to delay between automatically cycling an item. If <code>false</code>, carousel will not automatically cycle.</td> - </tr> - <tr> - <td>keyboard</td> - <td>boolean</td> - <td>true</td> - <td>Whether the carousel should react to keyboard events.</td> - </tr> - <tr> - <td>pause</td> - <td>string | boolean</td> - <td>'hover'</td> - <td><p>If set to <code>'hover'</code>, pauses the cycling of the carousel on <code>mouseenter</code> and resumes the cycling of the carousel on <code>mouseleave</code>. If set to <code>false</code>, hovering over the carousel won't pause it.</p> - <p>On touch-enabled devices, when set to <code>'hover'</code>, cycling will pause on <code>touchend</code> (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.</p></td> - </tr> - <tr> - <td>ride</td> - <td>string</td> - <td>false</td> - <td>Autoplays the carousel after the user manually cycles the first item. If set to <code>'carousel'</code>, autoplays the carousel on load.</td> - </tr> - <tr> - <td>wrap</td> - <td>boolean</td> - <td>true</td> - <td>Whether the carousel should cycle continuously or have hard stops.</td> - </tr> - <tr> - <td>touch</td> - <td>boolean</td> - <td>true</td> - <td>Whether the carousel should support left/right swipe interactions on touchscreen devices.</td> - </tr> - </tbody> -</table> - -### Methods - -{{< callout danger >}} -{{< partial "callout-danger-async-methods.md" >}} -{{< /callout >}} - -#### `.carousel(options)` - -Initializes the carousel with an optional options `object` and starts cycling through items. - -```js -$('.carousel').carousel({ - interval: 2000 -}) -``` - -#### `.carousel('cycle')` - -Cycles through the carousel items from left to right. - -#### `.carousel('pause')` - -Stops the carousel from cycling through items. - -#### `.carousel(number)` - -Cycles the carousel to a particular frame (0 based, similar to an array). **Returns to the caller before the target item has been shown** (i.e. before the `slid.bs.carousel` event occurs). - -#### `.carousel('prev')` - -Cycles to the previous item. **Returns to the caller before the previous item has been shown** (i.e. before the `slid.bs.carousel` event occurs). - -#### `.carousel('next')` - -Cycles to the next item. **Returns to the caller before the next item has been shown** (i.e. before the `slid.bs.carousel` event occurs). - -#### `.carousel('dispose')` - -Destroys an element's carousel. - -#### `.carousel('nextWhenVisible')` - -Don't cycle the carousel to next when the page isn't visible or the carousel or its parent isn't visible. **Returns to the caller before the next item has been shown** (i.e. before the `slid.bs.carousel` event occurs). - -#### `.carousel('to')` - -Cycles the carousel to a particular frame (0 based, similar to an array). **Returns to the caller before the next item has been shown** (i.e. before the `slid.bs.carousel` event occurs). - -### Events - -Bootstrap's carousel class exposes two events for hooking into carousel functionality. Both events have the following additional properties: - -- `direction`: The direction in which the carousel is sliding (either `"left"` or `"right"`). -- `relatedTarget`: The DOM element that is being slid into place as the active item. -- `from`: The index of the current item -- `to`: The index of the next item - -All carousel events are fired at the carousel itself (i.e. at the `<div class="carousel">`). - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 150px;">Event Type</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>slide.bs.carousel</td> - <td>This event fires immediately when the <code>slide</code> instance method is invoked.</td> - </tr> - <tr> - <td>slid.bs.carousel</td> - <td>This event is fired when the carousel has completed its slide transition.</td> - </tr> - </tbody> -</table> - -```js -$('#myCarousel').on('slide.bs.carousel', function () { - // do something... -}) -``` - -### Change transition duration - -The transition duration of `.carousel-item` can be changed with the `$carousel-transition` Sass variable before compiling or custom styles if you're using the compiled CSS. If multiple transitions are applied, make sure the transform transition is defined first (eg. `transition: transform 2s ease, opacity .5s ease-out`). diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/collapse.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/collapse.md deleted file mode 100644 index 020237cfd..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/collapse.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -layout: docs -title: Collapse -description: Toggle the visibility of content across your project with a few classes and our JavaScript plugins. -group: components -toc: true ---- - -## How it works - -The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific elements you toggle. Collapsing an element will animate the `height` from its current value to `0`. Given how CSS handles animations, you cannot use `padding` on a `.collapse` element. Instead, use the class as an independent wrapping element. - -{{< callout info >}} -{{< partial "callout-info-prefersreducedmotion.md" >}} -{{< /callout >}} - -## Example - -Click the buttons below to show and hide another element via class changes: - -- `.collapse` hides content -- `.collapsing` is applied during transitions -- `.collapse.show` shows content - -Generally, we recommend using a button with the `data-target` attribute. While not recommended from a semantic point of view, you can also use a link with the `href` attribute (and a `role="button"`). In both cases, the `data-toggle="collapse"` is required. - -{{< example >}} -<p> - <a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample"> - Link with href - </a> - <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> - Button with data-target - </button> -</p> -<div class="collapse" id="collapseExample"> - <div class="card card-body"> - Some placeholder content for the collapse component. This panel is hidden by default but revealed when the user activates the relevant trigger. - </div> -</div> -{{< /example >}} - -## Multiple targets - -A `<button>` or `<a>` can show and hide multiple elements by referencing them with a JQuery selector in its `href` or `data-target` attribute. -Multiple `<button>` or `<a>` can show and hide an element if they each reference it with their `href` or `data-target` attribute - -{{< example >}} -<p> - <a class="btn btn-primary" data-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Toggle first element</a> - <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#multiCollapseExample2" aria-expanded="false" aria-controls="multiCollapseExample2">Toggle second element</button> - <button class="btn btn-primary" type="button" data-toggle="collapse" data-target=".multi-collapse" aria-expanded="false" aria-controls="multiCollapseExample1 multiCollapseExample2">Toggle both elements</button> -</p> -<div class="row"> - <div class="col"> - <div class="collapse multi-collapse" id="multiCollapseExample1"> - <div class="card card-body"> - Some placeholder content for the first collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger. - </div> - </div> - </div> - <div class="col"> - <div class="collapse multi-collapse" id="multiCollapseExample2"> - <div class="card card-body"> - Some placeholder content for the second collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger. - </div> - </div> - </div> -</div> -{{< /example >}} - -## Accordion example - -Using the [card]({{< docsref "/components/card" >}}) component, you can extend the default collapse behavior to create an accordion. To properly achieve the accordion style, be sure to use `.accordion` as a wrapper. - -{{< example >}} -<div class="accordion" id="accordionExample"> - <div class="card"> - <div class="card-header" id="headingOne"> - <h2 class="mb-0"> - <button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> - Collapsible Group Item #1 - </button> - </h2> - </div> - - <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample"> - <div class="card-body"> - Some placeholder content for the first accordion panel. This panel is shown by default, thanks to the <code>.show</code> class. - </div> - </div> - </div> - <div class="card"> - <div class="card-header" id="headingTwo"> - <h2 class="mb-0"> - <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> - Collapsible Group Item #2 - </button> - </h2> - </div> - <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample"> - <div class="card-body"> - Some placeholder content for the second accordion panel. This panel is hidden by default. - </div> - </div> - </div> - <div class="card"> - <div class="card-header" id="headingThree"> - <h2 class="mb-0"> - <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> - Collapsible Group Item #3 - </button> - </h2> - </div> - <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample"> - <div class="card-body"> - And lastly, the placeholder content for the third and final accordion panel. This panel is hidden by default. - </div> - </div> - </div> -</div> -{{< /example >}} - -## Accessibility - -Be sure to add `aria-expanded` to the control element. This attribute explicitly conveys the current state of the collapsible element tied to the control to screen readers and similar assistive technologies. If the collapsible element is closed by default, the attribute on the control element should have a value of `aria-expanded="false"`. If you've set the collapsible element to be open by default using the `show` class, set `aria-expanded="true"` on the control instead. The plugin will automatically toggle this attribute on the control based on whether or not the collapsible element has been opened or closed (via JavaScript, or because the user triggered another control element also tied to the same collapsible element). If the control element's HTML element is not a button (e.g., an `<a>` or `<div>`), the attribute `role="button"` should be added to the element. - -If your control element is targeting a single collapsible element – i.e. the `data-target` attribute is pointing to an `id` selector – you should add the `aria-controls` attribute to the control element, containing the `id` of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself. - -Note that Bootstrap's current implementation does not cover the various keyboard interactions described in the [WAI-ARIA Authoring Practices 1.1 accordion pattern](https://www.w3.org/TR/wai-aria-practices-1.1/#accordion) - you will need to include these yourself with custom JavaScript. - -## Usage - -The collapse plugin utilizes a few classes to handle the heavy lifting: - -- `.collapse` hides the content -- `.collapse.show` shows the content -- `.collapsing` is added when the transition starts, and removed when it finishes - -These classes can be found in `_transitions.scss`. - -### Via data attributes - -Just add `data-toggle="collapse"` and a `data-target` to the element to automatically assign control of one or more collapsible elements. The `data-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `show`. - -To add accordion-like group management to a collapsible area, add the data attribute `data-parent="#selector"`. Refer to the demo to see this in action. - -### Via JavaScript - -Enable manually with: - -```js -$('.collapse').collapse() -``` - -### Options - -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-parent=""`. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 100px;">Name</th> - <th style="width: 50px;">Type</th> - <th style="width: 50px;">Default</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>parent</td> - <td>selector | jQuery object | DOM element </td> - <td>false</td> - <td>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 <code>card</code> class). The attribute has to be set on the target collapsible area.</td> - </tr> - <tr> - <td>toggle</td> - <td>boolean</td> - <td>true</td> - <td>Toggles the collapsible element on invocation</td> - </tr> - </tbody> -</table> - -### Methods - -{{< callout danger >}} -{{< partial "callout-danger-async-methods.md" >}} -{{< /callout >}} - -#### `.collapse(options)` - -Activates your content as a collapsible element. Accepts an optional options `object`. - -```js -$('#myCollapsible').collapse({ - toggle: false -}) -``` - -#### `.collapse('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). - -#### `.collapse('show')` - -Shows a collapsible element. **Returns to the caller before the collapsible element has actually been shown** (i.e. before the `shown.bs.collapse` event occurs). - -#### `.collapse('hide')` - -Hides a collapsible element. **Returns to the caller before the collapsible element has actually been hidden** (i.e. before the `hidden.bs.collapse` event occurs). - -#### `.collapse('dispose')` - -Destroys an element's collapse. - -### Events - -Bootstrap's collapse class exposes a few events for hooking into collapse functionality. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 150px;">Event Type</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>show.bs.collapse</td> - <td>This event fires immediately when the <code>show</code> instance method is called.</td> - </tr> - <tr> - <td>shown.bs.collapse</td> - <td>This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).</td> - </tr> - <tr> - <td>hide.bs.collapse</td> - <td>This event is fired immediately when the <code>hide</code> method has been called.</td> - </tr> - <tr> - <td>hidden.bs.collapse</td> - <td>This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).</td> - </tr> - </tbody> -</table> - -```js -$('#myCollapsible').on('hidden.bs.collapse', function () { - // do something... -}) -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/dropdowns.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/dropdowns.md deleted file mode 100644 index ea7c226f2..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/dropdowns.md +++ /dev/null @@ -1,895 +0,0 @@ ---- -layout: docs -title: Dropdowns -description: Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin. -group: components -toc: true ---- - -## Overview - -Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision](https://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/). - -Dropdowns are built on a third party library, [Popper](https://popper.js.org/), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{< param "cdn.popper" >}}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper. Popper isn't used to position dropdowns in navbars though as dynamic positioning isn't required. - -If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). - -## Accessibility - -The [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr>](https://www.w3.org/TR/wai-aria/) standard defines an actual [`role="menu"` widget](https://www.w3.org/WAI/PF/aria/roles#menu), but this is specific to application-like menus which trigger actions or functions. <abbr title="Accessible Rich Internet Applications">ARIA</abbr> menus can only contain menu items, checkbox menu items, radio button menu items, radio button groups, and sub-menus. - -Bootstrap's dropdowns, on the other hand, are designed to be generic and applicable to a variety of situations and markup structures. For instance, it is possible to create dropdowns that contain additional inputs and form controls, such as search fields or login forms. For this reason, Bootstrap does not expect (nor automatically add) any of the `role` and `aria-` attributes required for true <abbr title="Accessible Rich Internet Applications">ARIA</abbr> menus. Authors will have to include these more specific attributes themselves. - -However, Bootstrap does add built-in support for most standard keyboard menu interactions, such as the ability to move through individual `.dropdown-item` elements using the cursor keys and close the menu with the <kbd>ESC</kbd> key. - -## Examples - -Wrap the dropdown's toggle (your button or link) and the dropdown menu within `.dropdown`, or another element that declares `position: relative;`. Dropdowns can be triggered from `<a>` or `<button>` elements to better fit your potential needs. - -### Single button - -Any single `.btn` can be turned into a dropdown toggle with some markup changes. Here's how you can put them to work with either `<button>` elements: - -{{< example >}} -<div class="dropdown"> - <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown button - </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> -</div> -{{< /example >}} - -And with `<a>` elements: - -{{< example >}} -<div class="dropdown"> - <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown link - </a> - - <div class="dropdown-menu" aria-labelledby="dropdownMenuLink"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> -</div> -{{< /example >}} - -The best part is you can do this with any button variant, too: - -<div class="bd-example"> - <div class="btn-group"> - <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Primary</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Secondary</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Success</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Info</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Warning</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Danger</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> -</div> - -```html -<!-- Example single danger button --> -<div class="btn-group"> - <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Action - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> -</div> -``` - -### Split button - -Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of `.dropdown-toggle-split` for proper spacing around the dropdown caret. - -We use this extra class to reduce the horizontal `padding` on either side of the caret by 25% and remove the `margin-left` that's added for regular button dropdowns. Those extra changes keep the caret centered in the split button and provide a more appropriately sized hit area next to the main button. - -<div class="bd-example"> - <div class="btn-group"> - <button type="button" class="btn btn-primary">Primary</button> - <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-secondary">Secondary</button> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-success">Success</button> - <button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-info">Info</button> - <button type="button" class="btn btn-info dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-warning">Warning</button> - <button type="button" class="btn btn-warning dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> - <div class="btn-group"> - <button type="button" class="btn btn-danger">Danger</button> - <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div><!-- /btn-group --> -</div> - -```html -<!-- Example split danger button --> -<div class="btn-group"> - <button type="button" class="btn btn-danger">Action</button> - <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> -</div> -``` - -## Sizing - -Button dropdowns work with buttons of all sizes, including default and split dropdown buttons. - -<div class="bd-example"> - <div class="btn-group"> - <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Large button - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <div class="btn-group"> - <button type="button" class="btn btn-lg btn-secondary">Large split button</button> - <button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> - -```html -<!-- Large button groups (default and split) --> -<div class="btn-group"> - <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Large button - </button> - <div class="dropdown-menu"> - ... - </div> -</div> -<div class="btn-group"> - <button class="btn btn-secondary btn-lg" type="button"> - Large split button - </button> - <button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - ... - </div> -</div> -``` - -<div class="bd-example"> - <div class="btn-group"> - <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Small button - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <div class="btn-group"> - <button type="button" class="btn btn-sm btn-secondary">Small split button</button> - <button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> - -```html -<!-- Small button groups (default and split) --> -<div class="btn-group"> - <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Small button - </button> - <div class="dropdown-menu"> - ... - </div> -</div> -<div class="btn-group"> - <button class="btn btn-secondary btn-sm" type="button"> - Small split button - </button> - <button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - ... - </div> -</div> -``` - -## Directions - -### Dropup - -Trigger dropdown menus above elements by adding `.dropup` to the parent element. - -<div class="bd-example"> - <div class="btn-group dropup"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropup - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <div class="btn-group dropup"> - <button type="button" class="btn btn-secondary"> - Split dropup - </button> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> - -```html -<!-- Default dropup button --> -<div class="btn-group dropup"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropup - </button> - <div class="dropdown-menu"> - <!-- Dropdown menu links --> - </div> -</div> - -<!-- Split dropup button --> -<div class="btn-group dropup"> - <button type="button" class="btn btn-secondary"> - Split dropup - </button> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <!-- Dropdown menu links --> - </div> -</div> -``` - -### Dropright - -Trigger dropdown menus at the right of the elements by adding `.dropright` to the parent element. - -<div class="bd-example"> - <div class="btn-group dropright"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropright - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <div class="btn-group dropright"> - <button type="button" class="btn btn-secondary"> - Split dropright - </button> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropright</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> - -```html -<!-- Default dropright button --> -<div class="btn-group dropright"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropright - </button> - <div class="dropdown-menu"> - <!-- Dropdown menu links --> - </div> -</div> - -<!-- Split dropright button --> -<div class="btn-group dropright"> - <button type="button" class="btn btn-secondary"> - Split dropright - </button> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropright</span> - </button> - <div class="dropdown-menu"> - <!-- Dropdown menu links --> - </div> -</div> -``` - -### Dropleft - -Trigger dropdown menus at the left of the elements by adding `.dropleft` to the parent element. - -<div class="bd-example"> - <div class="btn-group dropleft"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropleft - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <div class="btn-group"> - <div class="btn-group dropleft" role="group"> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropleft</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <button type="button" class="btn btn-secondary"> - Split dropleft - </button> - </div> -</div> - -```html -<!-- Default dropleft button --> -<div class="btn-group dropleft"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropleft - </button> - <div class="dropdown-menu"> - <!-- Dropdown menu links --> - </div> -</div> - -<!-- Split dropleft button --> -<div class="btn-group"> - <div class="btn-group dropleft" role="group"> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropleft</span> - </button> - <div class="dropdown-menu"> - <!-- Dropdown menu links --> - </div> - </div> - <button type="button" class="btn btn-secondary"> - Split dropleft - </button> -</div> -``` - -## Menu items - -Historically dropdown menu contents *had* to be links, but that's no longer the case with v4. Now you can optionally use `<button>` elements in your dropdowns instead of just `<a>`s. - -{{< example >}} -<div class="dropdown"> - <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenu2"> - <button class="dropdown-item" type="button">Action</button> - <button class="dropdown-item" type="button">Another action</button> - <button class="dropdown-item" type="button">Something else here</button> - </div> -</div> -{{< /example >}} - -You can also create non-interactive dropdown items with `.dropdown-item-text`. Feel free to style further with custom CSS or text utilities. - -{{< example >}} -<div class="dropdown-menu"> - <span class="dropdown-item-text">Dropdown item text</span> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> -</div> -{{< /example >}} - -### Active - -Add `.active` to items in the dropdown to **style them as active**. - -{{< example >}} -<div class="dropdown-menu"> - <a class="dropdown-item" href="#">Regular link</a> - <a class="dropdown-item active" href="#">Active link</a> - <a class="dropdown-item" href="#">Another link</a> -</div> -{{< /example >}} - -### Disabled - -Add `.disabled` to items in the dropdown to **style them as disabled**. - -{{< example >}} -<div class="dropdown-menu"> - <a class="dropdown-item" href="#">Regular link</a> - <a class="dropdown-item disabled" href="#" tabindex="-1" aria-disabled="true">Disabled link</a> - <a class="dropdown-item" href="#">Another link</a> -</div> -{{< /example >}} - -## Menu alignment - -By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu. - -{{< callout info >}} -**Heads up!** Dropdowns are positioned thanks to Popper (except when they are contained in a navbar). -{{< /callout >}} - -{{< example >}} -<div class="btn-group"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Right-aligned menu - </button> - <div class="dropdown-menu dropdown-menu-right"> - <button class="dropdown-item" type="button">Action</button> - <button class="dropdown-item" type="button">Another action</button> - <button class="dropdown-item" type="button">Something else here</button> - </div> -</div> -{{< /example >}} - -### Responsive alignment - -If you want to use responsive alignment, disable dynamic positioning by adding the `data-display="static"` attribute and use the responsive variation classes. - -To align **right** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu{-sm|-md|-lg|-xl}-right`. - -{{< example >}} -<div class="btn-group"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-display="static" aria-haspopup="true" aria-expanded="false"> - Left-aligned but right aligned when large screen - </button> - <div class="dropdown-menu dropdown-menu-lg-right"> - <button class="dropdown-item" type="button">Action</button> - <button class="dropdown-item" type="button">Another action</button> - <button class="dropdown-item" type="button">Something else here</button> - </div> -</div> -{{< /example >}} - -To align **left** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu-right` and `.dropdown-menu{-sm|-md|-lg|-xl}-left`. - -{{< example >}} -<div class="btn-group"> - <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-display="static" aria-haspopup="true" aria-expanded="false"> - Right-aligned but left aligned when large screen - </button> - <div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-left"> - <button class="dropdown-item" type="button">Action</button> - <button class="dropdown-item" type="button">Another action</button> - <button class="dropdown-item" type="button">Something else here</button> - </div> -</div> -{{< /example >}} - -Note that you don't need to add a `data-display="static"` attribute to dropdown buttons in navbars, since Popper isn't used in navbars. - -## Menu content - -### Headers - -Add a header to label sections of actions in any dropdown menu. - -{{< example >}} -<div class="dropdown-menu"> - <h6 class="dropdown-header">Dropdown header</h6> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> -</div> -{{< /example >}} - -### Dividers - -Separate groups of related menu items with a divider. - -{{< example >}} -<div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> -</div> -{{< /example >}} - -### Text - -Place any freeform text within a dropdown menu with text and use [spacing utilities]({{< docsref "/utilities/spacing" >}}). Note that you'll likely need additional sizing styles to constrain the menu width. - -{{< example >}} -<div class="dropdown-menu p-4 text-muted" style="max-width: 200px;"> - <p> - Some example text that's free-flowing within the dropdown menu. - </p> - <p class="mb-0"> - And this is more example text. - </p> -</div> -{{< /example >}} - -### Forms - -Put a form within a dropdown menu, or make it into a dropdown menu, and use [margin or padding utilities]({{< docsref "/utilities/spacing" >}}) to give it the negative space you require. - -{{< example >}} -<div class="dropdown-menu"> - <form class="px-4 py-3"> - <div class="form-group"> - <label for="exampleDropdownFormEmail1">Email address</label> - <input type="email" class="form-control" id="exampleDropdownFormEmail1" placeholder="email@example.com"> - </div> - <div class="form-group"> - <label for="exampleDropdownFormPassword1">Password</label> - <input type="password" class="form-control" id="exampleDropdownFormPassword1" placeholder="Password"> - </div> - <div class="form-group"> - <div class="form-check"> - <input type="checkbox" class="form-check-input" id="dropdownCheck"> - <label class="form-check-label" for="dropdownCheck"> - Remember me - </label> - </div> - </div> - <button type="submit" class="btn btn-primary">Sign in</button> - </form> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">New around here? Sign up</a> - <a class="dropdown-item" href="#">Forgot password?</a> -</div> -{{< /example >}} - -{{< example >}} -<form class="dropdown-menu p-4"> - <div class="form-group"> - <label for="exampleDropdownFormEmail2">Email address</label> - <input type="email" class="form-control" id="exampleDropdownFormEmail2" placeholder="email@example.com"> - </div> - <div class="form-group"> - <label for="exampleDropdownFormPassword2">Password</label> - <input type="password" class="form-control" id="exampleDropdownFormPassword2" placeholder="Password"> - </div> - <div class="form-group"> - <div class="form-check"> - <input type="checkbox" class="form-check-input" id="dropdownCheck2"> - <label class="form-check-label" for="dropdownCheck2"> - Remember me - </label> - </div> - </div> - <button type="submit" class="btn btn-primary">Sign in</button> -</form> -{{< /example >}} - -## Dropdown options - -Use `data-offset` or `data-reference` to change the location of the dropdown. - -{{< example >}} -<div class="d-flex"> - <div class="dropdown mr-1"> - <button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuOffset" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="10,20"> - Offset - </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenuOffset"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </div> - <div class="btn-group"> - <button type="button" class="btn btn-secondary">Reference</button> - <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" id="dropdownMenuReference" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-reference="parent"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenuReference"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> -{{< /example >}} - -## Usage - -Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.show` class on the parent `.dropdown-menu`. The `data-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it. - -{{< callout info >}} -On touch-enabled devices, opening a dropdown adds empty (`$.noop`) `mouseover` handlers to the immediate children of the `<body>` element. This admittedly ugly hack is necessary to work around a [quirk in iOS' event delegation](https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html), which would otherwise prevent a tap anywhere outside of the dropdown from triggering the code that closes the dropdown. Once the dropdown is closed, these additional empty `mouseover` handlers are removed. -{{< /callout >}} - -### Via data attributes - -Add `data-toggle="dropdown"` to a link or button to toggle a dropdown. - -```html -<div class="dropdown"> - <button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown trigger - </button> - <div class="dropdown-menu" aria-labelledby="dLabel"> - ... - </div> -</div> -``` - -### Via JavaScript - -Call the dropdowns via JavaScript: - -```js -$('.dropdown-toggle').dropdown() -``` - -{{< callout info >}} -##### `data-toggle="dropdown"` still required - -Regardless of whether you call your dropdown via JavaScript or instead use the data-api, `data-toggle="dropdown"` is always required to be present on the dropdown's trigger element. -{{< /callout >}} - -### Options - -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-offset=""`. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 100px;">Name</th> - <th style="width: 100px;">Type</th> - <th style="width: 50px;">Default</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>offset</td> - <td>number | string | function</td> - <td>0</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>flip</td> - <td>boolean</td> - <td>true</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> - </tr> - <tr> - <td>boundary</td> - <td>string | element</td> - <td>'scrollParent'</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> - </tr> - <tr> - <td>reference</td> - <td>string | element</td> - <td>'toggle'</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> - </tr> - <tr> - <td>display</td> - <td>string</td> - <td>'dynamic'</td> - <td>By default, we use Popper for dynamic positioning. Disable this with <code>static</code>.</td> - </tr> - <tr> - <td>popperConfig</td> - <td>null | object</td> - <td>null</td> - <td>To change Bootstrap's default Popper config, see <a href="https://popper.js.org/docs/v1/#Popper.Defaults">Popper's configuration</a></td> - </tr> - </tbody> -</table> - -Note when `boundary` is set to any value other than `'scrollParent'`, the style `position: static` is applied to the `.dropdown` container. - -### Methods - -| Method | Description | -| --- | --- | -| `$().dropdown('toggle')` | Toggles the dropdown menu of a given navbar or tabbed navigation. | -| `$().dropdown('show')` | Shows the dropdown menu of a given navbar or tabbed navigation. | -| `$().dropdown('hide')` | Hides the dropdown menu of a given navbar or tabbed navigation. | -| `$().dropdown('update')` | Updates the position of an element's dropdown. | -| `$().dropdown('dispose')` | Destroys an element's dropdown. | - -### Events - -All dropdown events are fired at the `.dropdown-menu`'s parent element and have a `relatedTarget` property, whose value is the toggling anchor element. -`hide.bs.dropdown` and `hidden.bs.dropdown` events have a `clickEvent` property (only when the original event type is `click`) that contains an Event Object for the click event. - -| Event | Description | -| --- | --- | -| `show.bs.dropdown` | This event fires immediately when the show instance method is called. | -| `shown.bs.dropdown` | This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). | -| `hide.bs.dropdown` | This event is fired immediately when the hide instance method has been called. | -| `hidden.bs.dropdown`| This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). | - -```js -$('#myDropdown').on('show.bs.dropdown', function () { - // do something... -}) -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/forms.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/forms.md deleted file mode 100644 index b44ce67ad..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/forms.md +++ /dev/null @@ -1,1360 +0,0 @@ ---- -layout: docs -title: Forms -description: Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms. -group: components -toc: true ---- - -## Overview - -Bootstrap's form controls expand on [our Rebooted form styles]({{< docsref "/content/reboot#forms" >}}) with classes. Use these classes to opt into their customized displays for a more consistent rendering across browsers and devices. - -Be sure to use an appropriate `type` attribute on all inputs (e.g., `email` for email address or `number` for numerical information) to take advantage of newer input controls like email verification, number selection, and more. - -Here's a quick example to demonstrate Bootstrap's form styles. Keep reading for documentation on required classes, form layout, and more. - -{{< example >}} -<form> - <div class="form-group"> - <label for="exampleInputEmail1">Email address</label> - <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp"> - <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> - </div> - <div class="form-group"> - <label for="exampleInputPassword1">Password</label> - <input type="password" class="form-control" id="exampleInputPassword1"> - </div> - <div class="form-group form-check"> - <input type="checkbox" class="form-check-input" id="exampleCheck1"> - <label class="form-check-label" for="exampleCheck1">Check me out</label> - </div> - <button type="submit" class="btn btn-primary">Submit</button> -</form> -{{< /example >}} - -## Form controls - -Textual form controls—like `<input>`s, `<select>`s, and `<textarea>`s—are styled with the `.form-control` class. Included are styles for general appearance, focus state, sizing, and more. - -Be sure to explore our [custom forms](#custom-forms) to further style `<select>`s. - -{{< example >}} -<form> - <div class="form-group"> - <label for="exampleFormControlInput1">Email address</label> - <input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name@example.com"> - </div> - <div class="form-group"> - <label for="exampleFormControlSelect1">Example select</label> - <select class="form-control" id="exampleFormControlSelect1"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - </div> - <div class="form-group"> - <label for="exampleFormControlSelect2">Example multiple select</label> - <select multiple class="form-control" id="exampleFormControlSelect2"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - </select> - </div> - <div class="form-group"> - <label for="exampleFormControlTextarea1">Example textarea</label> - <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea> - </div> -</form> -{{< /example >}} - -For file inputs, swap the `.form-control` for `.form-control-file`. - -{{< example >}} -<form> - <div class="form-group"> - <label for="exampleFormControlFile1">Example file input</label> - <input type="file" class="form-control-file" id="exampleFormControlFile1"> - </div> -</form> -{{< /example >}} - -### Sizing - -Set heights using classes like `.form-control-lg` and `.form-control-sm`. - -{{< example >}} -<input class="form-control form-control-lg" type="text" placeholder=".form-control-lg"> -<input class="form-control" type="text" placeholder="Default input"> -<input class="form-control form-control-sm" type="text" placeholder=".form-control-sm"> -{{< /example >}} - -{{< example >}} -<select class="form-control form-control-lg"> - <option>Large select</option> -</select> -<select class="form-control"> - <option>Default select</option> -</select> -<select class="form-control form-control-sm"> - <option>Small select</option> -</select> -{{< /example >}} - -### Readonly - -Add the `readonly` boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor. - -{{< example >}} -<input class="form-control" type="text" placeholder="Readonly input here..." readonly> -{{< /example >}} - -### Readonly plain text - -If you want to have `<input readonly>` elements in your form styled as plain text, use the `.form-control-plaintext` class to remove the default form field styling and preserve the correct margin and padding. - -{{< example >}} -<form> - <div class="form-group row"> - <label for="staticEmail" class="col-sm-2 col-form-label">Email</label> - <div class="col-sm-10"> - <input type="text" readonly class="form-control-plaintext" id="staticEmail" value="email@example.com"> - </div> - </div> - <div class="form-group row"> - <label for="inputPassword" class="col-sm-2 col-form-label">Password</label> - <div class="col-sm-10"> - <input type="password" class="form-control" id="inputPassword"> - </div> - </div> -</form> -{{< /example >}} - -{{< example >}} -<form class="form-inline"> - <div class="form-group mb-2"> - <label for="staticEmail2" class="sr-only">Email</label> - <input type="text" readonly class="form-control-plaintext" id="staticEmail2" value="email@example.com"> - </div> - <div class="form-group mx-sm-3 mb-2"> - <label for="inputPassword2" class="sr-only">Password</label> - <input type="password" class="form-control" id="inputPassword2" placeholder="Password"> - </div> - <button type="submit" class="btn btn-primary mb-2">Confirm identity</button> -</form> -{{< /example >}} - -## Range Inputs - -Set horizontally scrollable range inputs using `.form-control-range`. - -{{< example >}} -<form> - <div class="form-group"> - <label for="formControlRange">Example Range input</label> - <input type="range" class="form-control-range" id="formControlRange"> - </div> -</form> -{{< /example >}} - -## Checkboxes and radios - -Default checkboxes and radios are improved upon with the help of `.form-check`, **a single class for both input types that improves the layout and behavior of their HTML elements**. Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many. - -Disabled checkboxes and radios are supported. The `disabled` attribute will apply a lighter color to help indicate the input's state. - -Checkboxes and radio buttons support HTML-based form validation and provide concise, accessible labels. As such, our `<input>`s and `<label>`s are sibling elements as opposed to an `<input>` within a `<label>`. This is slightly more verbose as you must specify `id` and `for` attributes to relate the `<input>` and `<label>`. - -### Default (stacked) - -By default, any number of checkboxes and radios that are immediate sibling will be vertically stacked and appropriately spaced with `.form-check`. - -{{< example >}} -<div class="form-check"> - <input class="form-check-input" type="checkbox" value="" id="defaultCheck1"> - <label class="form-check-label" for="defaultCheck1"> - Default checkbox - </label> -</div> -<div class="form-check"> - <input class="form-check-input" type="checkbox" value="" id="defaultCheck2" disabled> - <label class="form-check-label" for="defaultCheck2"> - Disabled checkbox - </label> -</div> -{{< /example >}} - -{{< example >}} -<div class="form-check"> - <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked> - <label class="form-check-label" for="exampleRadios1"> - Default radio - </label> -</div> -<div class="form-check"> - <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2"> - <label class="form-check-label" for="exampleRadios2"> - Second default radio - </label> -</div> -<div class="form-check"> - <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios3" value="option3" disabled> - <label class="form-check-label" for="exampleRadios3"> - Disabled radio - </label> -</div> -{{< /example >}} - -### Inline - -Group checkboxes or radios on the same horizontal row by adding `.form-check-inline` to any `.form-check`. - -{{< example >}} -<div class="form-check form-check-inline"> - <input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1"> - <label class="form-check-label" for="inlineCheckbox1">1</label> -</div> -<div class="form-check form-check-inline"> - <input class="form-check-input" type="checkbox" id="inlineCheckbox2" value="option2"> - <label class="form-check-label" for="inlineCheckbox2">2</label> -</div> -<div class="form-check form-check-inline"> - <input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3" disabled> - <label class="form-check-label" for="inlineCheckbox3">3 (disabled)</label> -</div> -{{< /example >}} - -{{< example >}} -<div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> - <label class="form-check-label" for="inlineRadio1">1</label> -</div> -<div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> - <label class="form-check-label" for="inlineRadio2">2</label> -</div> -<div class="form-check form-check-inline"> - <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3" disabled> - <label class="form-check-label" for="inlineRadio3">3 (disabled)</label> -</div> -{{< /example >}} - -### Without labels - -Add `.position-static` to inputs within `.form-check` that don't have any label text. Remember to still provide some form of accessible name for assistive technologies (for instance, using `aria-label`). - -{{< example >}} -<div class="form-check"> - <input class="form-check-input position-static" type="checkbox" id="blankCheckbox" value="option1" aria-label="..."> -</div> -<div class="form-check"> - <input class="form-check-input position-static" type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="..."> -</div> -{{< /example >}} - -## Layout - -Since Bootstrap applies `display: block` and `width: 100%` to almost all our form controls, forms will by default stack vertically. Additional classes can be used to vary this layout on a per-form basis. - -### Form groups - -The `.form-group` class is the easiest way to add some structure to forms. It provides a flexible class that encourages proper grouping of labels, controls, optional help text, and form validation messaging. By default it only applies `margin-bottom`, but it picks up additional styles in `.form-inline` as needed. Use it with `<fieldset>`s, `<div>`s, or nearly any other element. - -{{< example >}} -<form> - <div class="form-group"> - <label for="formGroupExampleInput">Example label</label> - <input type="text" class="form-control" id="formGroupExampleInput" placeholder="Example input placeholder"> - </div> - <div class="form-group"> - <label for="formGroupExampleInput2">Another label</label> - <input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input placeholder"> - </div> -</form> -{{< /example >}} - -### Form grid - -More complex forms can be built using our grid classes. Use these for form layouts that require multiple columns, varied widths, and additional alignment options. - -{{< example >}} -<form> - <div class="row"> - <div class="col"> - <input type="text" class="form-control" placeholder="First name"> - </div> - <div class="col"> - <input type="text" class="form-control" placeholder="Last name"> - </div> - </div> -</form> -{{< /example >}} - -#### Form row - -You may also swap `.row` for `.form-row`, a variation of our standard grid row that overrides the default column gutters for tighter and more compact layouts. - -{{< example >}} -<form> - <div class="form-row"> - <div class="col"> - <input type="text" class="form-control" placeholder="First name"> - </div> - <div class="col"> - <input type="text" class="form-control" placeholder="Last name"> - </div> - </div> -</form> -{{< /example >}} - -More complex layouts can also be created with the grid system. - -{{< example >}} -<form> - <div class="form-row"> - <div class="form-group col-md-6"> - <label for="inputEmail4">Email</label> - <input type="email" class="form-control" id="inputEmail4"> - </div> - <div class="form-group col-md-6"> - <label for="inputPassword4">Password</label> - <input type="password" class="form-control" id="inputPassword4"> - </div> - </div> - <div class="form-group"> - <label for="inputAddress">Address</label> - <input type="text" class="form-control" id="inputAddress" placeholder="1234 Main St"> - </div> - <div class="form-group"> - <label for="inputAddress2">Address 2</label> - <input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor"> - </div> - <div class="form-row"> - <div class="form-group col-md-6"> - <label for="inputCity">City</label> - <input type="text" class="form-control" id="inputCity"> - </div> - <div class="form-group col-md-4"> - <label for="inputState">State</label> - <select id="inputState" class="form-control"> - <option selected>Choose...</option> - <option>...</option> - </select> - </div> - <div class="form-group col-md-2"> - <label for="inputZip">Zip</label> - <input type="text" class="form-control" id="inputZip"> - </div> - </div> - <div class="form-group"> - <div class="form-check"> - <input class="form-check-input" type="checkbox" id="gridCheck"> - <label class="form-check-label" for="gridCheck"> - Check me out - </label> - </div> - </div> - <button type="submit" class="btn btn-primary">Sign in</button> -</form> -{{< /example >}} - -#### Horizontal form - -Create horizontal forms with the grid by adding the `.row` class to form groups and using the `.col-*-*` classes to specify the width of your labels and controls. Be sure to add `.col-form-label` to your `<label>`s as well so they're vertically centered with their associated form controls. - -At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we've removed the `padding-top` on our stacked radio inputs label to better align the text baseline. - -{{< example >}} -<form> - <div class="form-group row"> - <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label> - <div class="col-sm-10"> - <input type="email" class="form-control" id="inputEmail3"> - </div> - </div> - <div class="form-group row"> - <label for="inputPassword3" class="col-sm-2 col-form-label">Password</label> - <div class="col-sm-10"> - <input type="password" class="form-control" id="inputPassword3"> - </div> - </div> - <fieldset class="form-group row"> - <legend class="col-form-label col-sm-2 float-sm-left pt-0">Radios</legend> - <div class="col-sm-10"> - <div class="form-check"> - <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked> - <label class="form-check-label" for="gridRadios1"> - First radio - </label> - </div> - <div class="form-check"> - <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2"> - <label class="form-check-label" for="gridRadios2"> - Second radio - </label> - </div> - <div class="form-check disabled"> - <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios3" value="option3" disabled> - <label class="form-check-label" for="gridRadios3"> - Third disabled radio - </label> - </div> - </div> - </fieldset> - <div class="form-group row"> - <div class="col-sm-10 offset-sm-2"> - <div class="form-check"> - <input class="form-check-input" type="checkbox" id="gridCheck1"> - <label class="form-check-label" for="gridCheck1"> - Example checkbox - </label> - </div> - </div> - </div> - <div class="form-group row"> - <div class="col-sm-10"> - <button type="submit" class="btn btn-primary">Sign in</button> - </div> - </div> -</form> -{{< /example >}} - -##### Horizontal form label sizing - -Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s or `<legend>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`. - -{{< example >}} -<form> - <div class="form-group row"> - <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Email</label> - <div class="col-sm-10"> - <input type="email" class="form-control form-control-sm" id="colFormLabelSm" placeholder="col-form-label-sm"> - </div> - </div> - <div class="form-group row"> - <label for="colFormLabel" class="col-sm-2 col-form-label">Email</label> - <div class="col-sm-10"> - <input type="email" class="form-control" id="colFormLabel" placeholder="col-form-label"> - </div> - </div> - <div class="form-group row"> - <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Email</label> - <div class="col-sm-10"> - <input type="email" class="form-control form-control-lg" id="colFormLabelLg" placeholder="col-form-label-lg"> - </div> - </div> -</form> -{{< /example >}} - -#### Column sizing - -As shown in the previous examples, our grid system allows you to place any number of `.col`s within a `.row` or `.form-row`. They'll split the available width equally between them. You may also pick a subset of your columns to take up more or less space, while the remaining `.col`s equally split the rest, with specific column classes like `.col-7`. - -{{< example >}} -<form> - <div class="form-row"> - <div class="col-7"> - <input type="text" class="form-control" placeholder="City"> - </div> - <div class="col"> - <input type="text" class="form-control" placeholder="State"> - </div> - <div class="col"> - <input type="text" class="form-control" placeholder="Zip"> - </div> - </div> -</form> -{{< /example >}} - -#### Auto-sizing - -The example below uses a flexbox utility to vertically center the contents and changes `.col` to `.col-auto` so that your columns only take up as much space as needed. Put another way, the column sizes itself based on the contents. - -{{< example >}} -<form> - <div class="form-row align-items-center"> - <div class="col-auto"> - <label class="sr-only" for="inlineFormInput">Name</label> - <input type="text" class="form-control mb-2" id="inlineFormInput" placeholder="Jane Doe"> - </div> - <div class="col-auto"> - <label class="sr-only" for="inlineFormInputGroup">Username</label> - <div class="input-group mb-2"> - <div class="input-group-prepend"> - <div class="input-group-text">@</div> - </div> - <input type="text" class="form-control" id="inlineFormInputGroup" placeholder="Username"> - </div> - </div> - <div class="col-auto"> - <div class="form-check mb-2"> - <input class="form-check-input" type="checkbox" id="autoSizingCheck"> - <label class="form-check-label" for="autoSizingCheck"> - Remember me - </label> - </div> - </div> - <div class="col-auto"> - <button type="submit" class="btn btn-primary mb-2">Submit</button> - </div> - </div> -</form> -{{< /example >}} - -You can then remix that once again with size-specific column classes. - -{{< example >}} -<form> - <div class="form-row align-items-center"> - <div class="col-sm-3 my-1"> - <label class="sr-only" for="inlineFormInputName">Name</label> - <input type="text" class="form-control" id="inlineFormInputName" placeholder="Jane Doe"> - </div> - <div class="col-sm-3 my-1"> - <label class="sr-only" for="inlineFormInputGroupUsername">Username</label> - <div class="input-group"> - <div class="input-group-prepend"> - <div class="input-group-text">@</div> - </div> - <input type="text" class="form-control" id="inlineFormInputGroupUsername" placeholder="Username"> - </div> - </div> - <div class="col-auto my-1"> - <div class="form-check"> - <input class="form-check-input" type="checkbox" id="autoSizingCheck2"> - <label class="form-check-label" for="autoSizingCheck2"> - Remember me - </label> - </div> - </div> - <div class="col-auto my-1"> - <button type="submit" class="btn btn-primary">Submit</button> - </div> - </div> -</form> -{{< /example >}} - -And of course [custom form controls](#custom-forms) are supported. - -{{< example >}} -<form> - <div class="form-row align-items-center"> - <div class="col-auto my-1"> - <label class="mr-sm-2 sr-only" for="inlineFormCustomSelect">Preference</label> - <select class="custom-select mr-sm-2" id="inlineFormCustomSelect"> - <option selected>Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> - </div> - <div class="col-auto my-1"> - <div class="custom-control custom-checkbox mr-sm-2"> - <input type="checkbox" class="custom-control-input" id="customControlAutosizing"> - <label class="custom-control-label" for="customControlAutosizing">Remember my preference</label> - </div> - </div> - <div class="col-auto my-1"> - <button type="submit" class="btn btn-primary">Submit</button> - </div> - </div> -</form> -{{< /example >}} - -### Inline forms - -Use the `.form-inline` class to display a series of labels, form controls, and buttons on a single horizontal row. Form controls within inline forms vary slightly from their default states. - -- Controls are `display: flex`, collapsing any HTML white space and allowing you to provide alignment control with [spacing]({{< docsref "/utilities/spacing" >}}) and [flexbox]({{< docsref "/utilities/flex" >}}) utilities. -- Controls and input groups receive `width: auto` to override the Bootstrap default `width: 100%`. -- Controls **only appear inline in viewports that are at least 576px wide** to account for narrow viewports on mobile devices. - -You may need to manually address the width and alignment of individual form controls with [spacing utilities]({{< docsref "/utilities/spacing" >}}) (as shown below). Lastly, be sure to always include a `<label>` with each form control, even if you need to hide it from non-screenreader visitors with `.sr-only`. - -{{< example >}} -<form class="form-inline"> - <label class="sr-only" for="inlineFormInputName2">Name</label> - <input type="text" class="form-control mb-2 mr-sm-2" id="inlineFormInputName2" placeholder="Jane Doe"> - - <label class="sr-only" for="inlineFormInputGroupUsername2">Username</label> - <div class="input-group mb-2 mr-sm-2"> - <div class="input-group-prepend"> - <div class="input-group-text">@</div> - </div> - <input type="text" class="form-control" id="inlineFormInputGroupUsername2" placeholder="Username"> - </div> - - <div class="form-check mb-2 mr-sm-2"> - <input class="form-check-input" type="checkbox" id="inlineFormCheck"> - <label class="form-check-label" for="inlineFormCheck"> - Remember me - </label> - </div> - - <button type="submit" class="btn btn-primary mb-2">Submit</button> -</form> -{{< /example >}} - -Custom form controls and selects are also supported. - -{{< example >}} -<form class="form-inline"> - <label class="my-1 mr-2" for="inlineFormCustomSelectPref">Preference</label> - <select class="custom-select my-1 mr-sm-2" id="inlineFormCustomSelectPref"> - <option selected>Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> - - <div class="custom-control custom-checkbox my-1 mr-sm-2"> - <input type="checkbox" class="custom-control-input" id="customControlInline"> - <label class="custom-control-label" for="customControlInline">Remember my preference</label> - </div> - - <button type="submit" class="btn btn-primary my-1">Submit</button> -</form> -{{< /example >}} - -{{< callout warning >}} -##### Alternatives to hidden labels -Assistive technologies such as screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class. There are further alternative methods of providing a label for assistive technologies, such as the `aria-label`, `aria-labelledby` or `title` attribute. If none of these are present, assistive technologies may resort to using the `placeholder` attribute, if present, but note that use of `placeholder` as a replacement for other labelling methods is not advised. -{{< /callout >}} - -## Help text - -Block-level help text in forms can be created using `.form-text` (previously known as `.help-block` in v3). Inline help text can be flexibly implemented using any inline HTML element and utility classes like `.text-muted`. - -{{< callout warning >}} -##### Associating help text with form controls - -Help text should be explicitly associated with the form control it relates to using the `aria-describedby` attribute. This will ensure that assistive technologies—such as screen readers—will announce this help text when the user focuses or enters the control. -{{< /callout >}} - -Help text below inputs can be styled with `.form-text`. This class includes `display: block` and adds some top margin for easy spacing from the inputs above. - -{{< example >}} -<label for="inputPassword5">Password</label> -<input type="password" id="inputPassword5" class="form-control" aria-describedby="passwordHelpBlock"> -<small id="passwordHelpBlock" class="form-text text-muted"> - Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji. -</small> -{{< /example >}} - -Inline text can use any typical inline HTML element (be it a `<small>`, `<span>`, or something else) with nothing more than a utility class. - -{{< example >}} -<form class="form-inline"> - <div class="form-group"> - <label for="inputPassword6">Password</label> - <input type="password" id="inputPassword6" class="form-control mx-sm-3" aria-describedby="passwordHelpInline"> - <small id="passwordHelpInline" class="text-muted"> - Must be 8-20 characters long. - </small> - </div> -</form> -{{< /example >}} - -## Disabled forms - -Add the `disabled` boolean attribute on an input to prevent user interactions and make it appear lighter. - -```html -<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled> -``` - -Add the `disabled` attribute to a `<fieldset>` to disable all the controls within. - -{{< example >}} -<form> - <fieldset disabled> - <legend>Disabled fieldset example</legend> - <div class="form-group"> - <label for="disabledTextInput">Disabled input</label> - <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input"> - </div> - <div class="form-group"> - <label for="disabledSelect">Disabled select menu</label> - <select id="disabledSelect" class="form-control"> - <option>Disabled select</option> - </select> - </div> - <div class="form-group"> - <div class="form-check"> - <input class="form-check-input" type="checkbox" id="disabledFieldsetCheck" disabled> - <label class="form-check-label" for="disabledFieldsetCheck"> - Can't check this - </label> - </div> - </div> - <button type="submit" class="btn btn-primary">Submit</button> - </fieldset> -</form> -{{< /example >}} - -{{< callout warning >}} -##### Caveat with anchors - -Browsers treat all native form controls (`<input>`, `<select>`, and `<button>` elements) inside a `<fieldset disabled>` as disabled, preventing both keyboard and mouse interactions on them. - -However, if your form also includes custom button-like elements such as `<a ... class="btn btn-*">`, these will only be given a style of `pointer-events: none`. As noted in the section about [disabled state for buttons]({{< docsref "/components/buttons#disabled-state" >}}) (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Internet Explorer 10. The anchor-based controls will also still be focusable and operable using the keyboard. You must manually modify these controls by adding `tabindex="-1"` to prevent them from receiving focus and `aria-disabled="disabled"` to signal their state to assistive technologies. -{{< /callout >}} - -{{< callout danger >}} -#### Cross-browser compatibility - -While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the `disabled` attribute on a `<fieldset>`. Use custom JavaScript to disable the fieldset in these browsers. -{{< /callout >}} - -## Validation - -Provide valuable, actionable feedback to your users with HTML5 form validation–[available in all our supported browsers](https://caniuse.com/form-validation). Choose from the browser default validation feedback, or implement custom messages with our built-in classes and starter JavaScript. - -{{< callout warning >}} -We are aware that currently the client-side custom validation styles and tooltips are not accessible, since they are not exposed to assistive technologies. While we work on a solution, we'd recommend either using the server-side option or the default browser validation method. -{{< /callout >}} - -### How it works - -Here's how form validation works with Bootstrap: - -- HTML form validation is applied via CSS's two pseudo-classes, `:invalid` and `:valid`. It applies to `<input>`, `<select>`, and `<textarea>` elements. -- Bootstrap scopes the `:invalid` and `:valid` styles to parent `.was-validated` class, usually applied to the `<form>`. Otherwise, any required field without a value shows up as invalid on page load. This way, you may choose when to activate them (typically after form submission is attempted). -- To reset the appearance of the form (for instance, in the case of dynamic form submissions using AJAX), remove the `.was-validated` class from the `<form>` again after submission. -- As a fallback, `.is-invalid` and `.is-valid` classes may be used instead of the pseudo-classes for [server side validation](#server-side). They do not require a `.was-validated` parent class. -- Due to constraints in how CSS works, we cannot (at present) apply styles to a `<label>` that comes before a form control in the DOM without the help of custom JavaScript. -- All modern browsers support the [constraint validation API](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-constraint-validation-api), a series of JavaScript methods for validating form controls. -- Feedback messages may utilize the [browser defaults](#browser-defaults) (different for each browser, and unstylable via CSS) or our custom feedback styles with additional HTML and CSS. -- You may provide custom validity messages with `setCustomValidity` in JavaScript. - -With that in mind, consider the following demos for our custom form validation styles, optional server side classes, and browser defaults. - -### Custom styles - -For custom Bootstrap form validation messages, you'll need to add the `novalidate` boolean attribute to your `<form>`. This disables the browser default feedback tooltips, but still provides access to the form validation APIs in JavaScript. Try to submit the form below; our JavaScript will intercept the submit button and relay feedback to you. When attempting to submit, you'll see the `:invalid` and `:valid` styles applied to your form controls. - -Custom feedback styles apply custom colors, borders, focus styles, and background icons to better communicate feedback. Background icons for `<select>`s are only available with `.custom-select`, and not `.form-control`. - -{{< example >}} -<form class="needs-validation" novalidate> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationCustom01">First name</label> - <input type="text" class="form-control" id="validationCustom01" value="Mark" required> - <div class="valid-feedback"> - Looks good! - </div> - </div> - <div class="col-md-6 mb-3"> - <label for="validationCustom02">Last name</label> - <input type="text" class="form-control" id="validationCustom02" value="Otto" required> - <div class="valid-feedback"> - Looks good! - </div> - </div> - </div> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationCustom03">City</label> - <input type="text" class="form-control" id="validationCustom03" required> - <div class="invalid-feedback"> - Please provide a valid city. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="validationCustom04">State</label> - <select class="custom-select" id="validationCustom04" required> - <option selected disabled value="">Choose...</option> - <option>...</option> - </select> - <div class="invalid-feedback"> - Please select a valid state. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="validationCustom05">Zip</label> - <input type="text" class="form-control" id="validationCustom05" required> - <div class="invalid-feedback"> - Please provide a valid zip. - </div> - </div> - </div> - <div class="form-group"> - <div class="form-check"> - <input class="form-check-input" type="checkbox" value="" id="invalidCheck" required> - <label class="form-check-label" for="invalidCheck"> - Agree to terms and conditions - </label> - <div class="invalid-feedback"> - You must agree before submitting. - </div> - </div> - </div> - <button class="btn btn-primary" type="submit">Submit form</button> -</form> - -<script> -// Example starter JavaScript for disabling form submissions if there are invalid fields -(function() { - 'use strict'; - window.addEventListener('load', function() { - // Fetch all the forms we want to apply custom Bootstrap validation styles to - var forms = document.getElementsByClassName('needs-validation'); - // Loop over them and prevent submission - var validation = Array.prototype.filter.call(forms, function(form) { - form.addEventListener('submit', function(event) { - if (form.checkValidity() === false) { - event.preventDefault(); - event.stopPropagation(); - } - form.classList.add('was-validated'); - }, false); - }); - }, false); -})(); -</script> -{{< /example >}} - -### Browser defaults - -Not interested in custom validation feedback messages or writing JavaScript to change form behaviors? All good, you can use the browser defaults. Try submitting the form below. Depending on your browser and OS, you'll see a slightly different style of feedback. - -While these feedback styles cannot be styled with CSS, you can still customize the feedback text through JavaScript. - -{{< example >}} -<form> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationDefault01">First name</label> - <input type="text" class="form-control" id="validationDefault01" value="Mark" required> - </div> - <div class="col-md-6 mb-3"> - <label for="validationDefault02">Last name</label> - <input type="text" class="form-control" id="validationDefault02" value="Otto" required> - </div> - </div> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationDefault03">City</label> - <input type="text" class="form-control" id="validationDefault03" required> - </div> - <div class="col-md-3 mb-3"> - <label for="validationDefault04">State</label> - <select class="custom-select" id="validationDefault04" required> - <option selected disabled value="">Choose...</option> - <option>...</option> - </select> - </div> - <div class="col-md-3 mb-3"> - <label for="validationDefault05">Zip</label> - <input type="text" class="form-control" id="validationDefault05" required> - </div> - </div> - <div class="form-group"> - <div class="form-check"> - <input class="form-check-input" type="checkbox" value="" id="invalidCheck2" required> - <label class="form-check-label" for="invalidCheck2"> - Agree to terms and conditions - </label> - </div> - </div> - <button class="btn btn-primary" type="submit">Submit form</button> -</form> -{{< /example >}} - -### Server side - -We recommend using client-side validation, but in case you require server-side validation, you can indicate invalid and valid form fields with `.is-invalid` and `.is-valid`. Note that `.invalid-feedback` is also supported with these classes. - -For invalid fields, ensure that the invalid feedback/error message is associated with the relevant form field using `aria-describedby`. This attribute allows more than one `id` to be referenced, in case the field already points to additional form text. - -{{< example >}} -<form> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationServer01">First name</label> - <input type="text" class="form-control is-valid" id="validationServer01" value="Mark" required> - <div class="valid-feedback"> - Looks good! - </div> - </div> - <div class="col-md-6 mb-3"> - <label for="validationServer02">Last name</label> - <input type="text" class="form-control is-valid" id="validationServer02" value="Otto" required> - <div class="valid-feedback"> - Looks good! - </div> - </div> - </div> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationServer03">City</label> - <input type="text" class="form-control is-invalid" id="validationServer03" aria-describedby="validationServer03Feedback" required> - <div id="validationServer03Feedback" class="invalid-feedback"> - Please provide a valid city. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="validationServer04">State</label> - <select class="custom-select is-invalid" id="validationServer04" aria-describedby="validationServer04Feedback" required> - <option selected disabled value="">Choose...</option> - <option>...</option> - </select> - <div id="validationServer04Feedback" class="invalid-feedback"> - Please select a valid state. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="validationServer05">Zip</label> - <input type="text" class="form-control is-invalid" id="validationServer05" aria-describedby="validationServer05Feedback" required> - <div id="validationServer05Feedback" class="invalid-feedback"> - Please provide a valid zip. - </div> - </div> - </div> - <div class="form-group"> - <div class="form-check"> - <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" aria-describedby="invalidCheck3Feedback" required> - <label class="form-check-label" for="invalidCheck3"> - Agree to terms and conditions - </label> - <div id="invalidCheck3Feedback" class="invalid-feedback"> - You must agree before submitting. - </div> - </div> - </div> - <button class="btn btn-primary" type="submit">Submit form</button> -</form> -{{< /example >}} - -### Supported elements - -Validation styles are available for the following form controls and components: - -- `<input>`s and `<textarea>`s with `.form-control` -- `<select>`s with `.form-control` or `.custom-select` -- `.form-check`s -- `.custom-checkbox`s and `.custom-radio`s -- `.custom-file` - -{{< example >}} -<form class="was-validated"> - <div class="mb-3"> - <label for="validationTextarea">Textarea</label> - <textarea class="form-control is-invalid" id="validationTextarea" placeholder="Required example textarea" required></textarea> - <div class="invalid-feedback"> - Please enter a message in the textarea. - </div> - </div> - - <div class="custom-control custom-checkbox mb-3"> - <input type="checkbox" class="custom-control-input" id="customControlValidation1" required> - <label class="custom-control-label" for="customControlValidation1">Check this custom checkbox</label> - <div class="invalid-feedback">Example invalid feedback text</div> - </div> - - <div class="custom-control custom-radio"> - <input type="radio" class="custom-control-input" id="customControlValidation2" name="radio-stacked" required> - <label class="custom-control-label" for="customControlValidation2">Toggle this custom radio</label> - </div> - <div class="custom-control custom-radio mb-3"> - <input type="radio" class="custom-control-input" id="customControlValidation3" name="radio-stacked" required> - <label class="custom-control-label" for="customControlValidation3">Or toggle this other custom radio</label> - <div class="invalid-feedback">More example invalid feedback text</div> - </div> - - <div class="mb-3"> - <select class="custom-select" required> - <option value="">Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> - <div class="invalid-feedback">Example invalid custom select feedback</div> - </div> - - <div class="custom-file mb-3"> - <input type="file" class="custom-file-input" id="validatedCustomFile" required> - <label class="custom-file-label" for="validatedCustomFile">Choose file...</label> - <div class="invalid-feedback">Example invalid custom file feedback</div> - </div> - - <div class="mb-3"> - <div class="input-group is-invalid"> - <div class="input-group-prepend"> - <span class="input-group-text" id="validatedInputGroupPrepend">@</span> - </div> - <input type="text" class="form-control is-invalid" aria-describedby="validatedInputGroupPrepend" required> - </div> - <div class="invalid-feedback"> - Example invalid input group feedback - </div> - </div> - - <div class="mb-3"> - <div class="input-group is-invalid"> - <div class="input-group-prepend"> - <label class="input-group-text" for="validatedInputGroupSelect">Options</label> - </div> - <select class="custom-select" id="validatedInputGroupSelect" required> - <option value="">Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> - </div> - <div class="invalid-feedback"> - Example invalid input group feedback - </div> - </div> - - <div class="input-group is-invalid"> - <div class="custom-file"> - <input type="file" class="custom-file-input" id="validatedInputGroupCustomFile" required> - <label class="custom-file-label" for="validatedInputGroupCustomFile">Choose file...</label> - </div> - <div class="input-group-append"> - <button class="btn btn-outline-secondary" type="button">Button</button> - </div> - </div> - <div class="invalid-feedback"> - Example invalid input group feedback - </div> -</form> -{{< /example >}} - -### Tooltips - -If your form layout allows it, you can swap the `.{valid|invalid}-feedback` classes for `.{valid|invalid}-tooltip` classes to display validation feedback in a styled tooltip. Be sure to have a parent with `position: relative` on it for tooltip positioning. In the example below, our column classes have this already, but your project may require an alternative setup. - -{{< example >}} -<form class="needs-validation" novalidate> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationTooltip01">First name</label> - <input type="text" class="form-control" id="validationTooltip01" value="Mark" required> - <div class="valid-tooltip"> - Looks good! - </div> - </div> - <div class="col-md-6 mb-3"> - <label for="validationTooltip02">Last name</label> - <input type="text" class="form-control" id="validationTooltip02" value="Otto" required> - <div class="valid-tooltip"> - Looks good! - </div> - </div> - </div> - <div class="form-row"> - <div class="col-md-6 mb-3"> - <label for="validationTooltip03">City</label> - <input type="text" class="form-control" id="validationTooltip03" required> - <div class="invalid-tooltip"> - Please provide a valid city. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="validationTooltip04">State</label> - <select class="custom-select" id="validationTooltip04" required> - <option selected disabled value="">Choose...</option> - <option>...</option> - </select> - <div class="invalid-tooltip"> - Please select a valid state. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="validationTooltip05">Zip</label> - <input type="text" class="form-control" id="validationTooltip05" required> - <div class="invalid-tooltip"> - Please provide a valid zip. - </div> - </div> - </div> - <button class="btn btn-primary" type="submit">Submit form</button> -</form> -{{< /example >}} - -### Customizing - -Validation states can be customized via Sass with the `$form-validation-states` map. Located in our `_variables.scss` file, this Sass map is looped over to generate the default `valid`/`invalid` validation states. Included is a nested map for customizing each state's color and icon. While no other states are supported by browsers, those using custom styles can easily add more complex form feedback. - -Please note that we do not recommend customizing these values without also modifying the `form-validation-state` mixin. - -```scss -// Sass map from `_variables.scss` -// Override this and recompile your Sass to generate different states -$form-validation-states: map-merge( - ( - "valid": ( - "color": $form-feedback-valid-color, - "icon": $form-feedback-icon-valid - ), - "invalid": ( - "color": $form-feedback-invalid-color, - "icon": $form-feedback-icon-invalid - ) - ), - $form-validation-states -); - -// Loop from `_forms.scss` -// Any modifications to the above Sass map will be reflected in your compiled -// CSS via this loop. -@each $state, $data in $form-validation-states { - @include form-validation-state($state, map-get($data, color), map-get($data, icon)); -} -``` - -### Input group validation - -To detect what elements need rounded corners inside an input group with validation, an input group requires an additional `.has-validation` class. - -```html -<div class="input-group has-validation"> - <div class="input-group-prepend"> - <span class="input-group-text">@</span> - </div> - <input type="text" class="form-control" required> - <div class="invalid-feedback"> - Please choose a username. - </div> -</div> -``` - -<div class="bd-example bd-example-forms-input-group-workaround"> - <div class="input-group has-validation"> - <div class="input-group-prepend"> - <span class="input-group-text">@</span> - </div> - <input type="text" class="form-control is-invalid" required> - <div class="invalid-feedback"> - Please choose a username. - </div> - </div> -</div> - -## Custom forms - -For even more customization and cross browser consistency, use our completely custom form elements to replace the browser defaults. They're built on top of semantic and accessible markup, so they're solid replacements for any default form control. - -### Checkboxes and radios - -Each checkbox and radio `<input>` and `<label>` pairing is wrapped in a `<div>` to create our custom control. Structurally, this is the same approach as our default `.form-check`. - -We use the sibling selector (`~`) for all our `<input>` states—like `:checked`—to properly style our custom form indicator. When combined with the `.custom-control-label` class, we can also style the text for each item based on the `<input>`'s state. - -We hide the default `<input>` with `opacity` and use the `.custom-control-label` to build a new custom form indicator in its place with `::before` and `::after`. Unfortunately we can't build a custom one from just the `<input>` because CSS's `content` doesn't work on that element. - -In the checked states, we use **base64 embedded SVG icons** from [Open Iconic](https://github.com/iconic/open-iconic). This provides us the best control for styling and positioning across browsers and devices. - -#### Checkboxes - -{{< example >}} -<div class="custom-control custom-checkbox"> - <input type="checkbox" class="custom-control-input" id="customCheck1"> - <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label> -</div> -{{< /example >}} - -Custom checkboxes can also utilize the `:indeterminate` pseudo class when manually set via JavaScript (there is no available HTML attribute for specifying it). - -<div class="bd-example bd-example-indeterminate"> - <div class="custom-control custom-checkbox"> - <input type="checkbox" class="custom-control-input" id="customCheck2"> - <label class="custom-control-label" for="customCheck2">Check this custom checkbox</label> - </div> -</div> - -If you're using jQuery, something like this should suffice: - -```js -$('.your-checkbox').prop('indeterminate', true) -``` - -#### Radios - -{{< example >}} -<div class="custom-control custom-radio"> - <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input"> - <label class="custom-control-label" for="customRadio1">Toggle this custom radio</label> -</div> -<div class="custom-control custom-radio"> - <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input"> - <label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label> -</div> -{{< /example >}} - -#### Inline - -{{< example >}} -<div class="custom-control custom-radio custom-control-inline"> - <input type="radio" id="customRadioInline1" name="customRadioInline" class="custom-control-input"> - <label class="custom-control-label" for="customRadioInline1">Toggle this custom radio</label> -</div> -<div class="custom-control custom-radio custom-control-inline"> - <input type="radio" id="customRadioInline2" name="customRadioInline" class="custom-control-input"> - <label class="custom-control-label" for="customRadioInline2">Or toggle this other custom radio</label> -</div> -{{< /example >}} - -#### Disabled - -Custom checkboxes and radios can also be disabled. Add the `disabled` boolean attribute to the `<input>` and the custom indicator and label description will be automatically styled. - -{{< example >}} -<div class="custom-control custom-checkbox"> - <input type="checkbox" class="custom-control-input" id="customCheckDisabled1" disabled> - <label class="custom-control-label" for="customCheckDisabled1">Check this custom checkbox</label> -</div> - -<div class="custom-control custom-radio"> - <input type="radio" name="radioDisabled" id="customRadioDisabled2" class="custom-control-input" disabled> - <label class="custom-control-label" for="customRadioDisabled2">Toggle this custom radio</label> -</div> -{{< /example >}} - -### Switches - -A switch has the markup of a custom checkbox but uses the `.custom-switch` class to render a toggle switch. Switches also support the `disabled` attribute. - -{{< example >}} -<div class="custom-control custom-switch"> - <input type="checkbox" class="custom-control-input" id="customSwitch1"> - <label class="custom-control-label" for="customSwitch1">Toggle this switch element</label> -</div> -<div class="custom-control custom-switch"> - <input type="checkbox" class="custom-control-input" disabled id="customSwitch2"> - <label class="custom-control-label" for="customSwitch2">Disabled switch element</label> -</div> -{{< /example >}} - -### Select menu - -Custom `<select>` menus need only a custom class, `.custom-select` to trigger the custom styles. Custom styles are limited to the `<select>`'s initial appearance and cannot modify the `<option>`s due to browser limitations. - -{{< example >}} -<select class="custom-select"> - <option selected>Open this select menu</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> -</select> -{{< /example >}} - -You may also choose from small and large custom selects to match our similarly sized text inputs. - -{{< example >}} -<select class="custom-select custom-select-lg mb-3"> - <option selected>Open this select menu</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> -</select> - -<select class="custom-select custom-select-sm"> - <option selected>Open this select menu</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> -</select> -{{< /example >}} - -The `multiple` attribute is also supported: - -{{< example >}} -<select class="custom-select" multiple> - <option selected>Open this select menu</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> -</select> -{{< /example >}} - -As is the `size` attribute: - -{{< example >}} -<select class="custom-select" size="3"> - <option selected>Open this select menu</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> -</select> -{{< /example >}} - -### Range - -Create custom `<input type="range">` controls with `.custom-range`. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only IE and Firefox support "filling" their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it. - -{{< example >}} -<label for="customRange1">Example range</label> -<input type="range" class="custom-range" id="customRange1"> -{{< /example >}} - -Range inputs have implicit values for `min` and `max`—`0` and `100`, respectively. You may specify new values for those using the `min` and `max` attributes. - -{{< example >}} -<label for="customRange2">Example range</label> -<input type="range" class="custom-range" min="0" max="5" id="customRange2"> -{{< /example >}} - -By default, range inputs "snap" to integer values. To change this, you can specify a `step` value. In the example below, we double the number of steps by using `step="0.5"`. - -{{< example >}} -<label for="customRange3">Example range</label> -<input type="range" class="custom-range" min="0" max="5" step="0.5" id="customRange3"> -{{< /example >}} - -### File browser - -{{< callout info >}} -The recommended plugin to animate custom file input: [bs-custom-file-input](https://www.npmjs.com/package/bs-custom-file-input), that's what we are using currently here in our docs. -{{< /callout >}} - -The file input is the most gnarly of the bunch and requires additional JavaScript if you'd like to hook them up with functional *Choose file...* and selected file name text. - -{{< example >}} -<div class="custom-file"> - <input type="file" class="custom-file-input" id="customFile"> - <label class="custom-file-label" for="customFile">Choose file</label> -</div> -{{< /example >}} - -We hide the default file `<input>` via `opacity` and instead style the `<label>`. The button is generated and positioned with `::after`. Lastly, we declare a `width` and `height` on the `<input>` for proper spacing for surrounding content. - -#### Translating or customizing the strings with SCSS - -The [`:lang()` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:lang) is used to allow for translation of the "Browse" text into other languages. Override or add entries to the `$custom-file-text` Sass variable with the relevant [language tag](https://en.wikipedia.org/wiki/IETF_language_tag) and localized strings. The English strings can be customized the same way. For example, here's how one might add a Spanish translation (Spanish's language code is `es`): - -```scss -$custom-file-text: ( - en: "Browse", - es: "Elegir" -); -``` - -Here's `lang(es)` in action on the custom file input for a Spanish translation: - -{{< example >}} -<div class="custom-file"> - <input type="file" class="custom-file-input" id="customFileLang" lang="es"> - <label class="custom-file-label" for="customFileLang">Seleccionar Archivo</label> -</div> -{{< /example >}} - -You'll need to set the language of your document (or subtree thereof) correctly in order for the correct text to be shown. This can be done using [the `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) on the `<html>` element or the [`Content-Language` HTTP header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.12), among other methods. - -#### Translating or customizing the strings with HTML - -Bootstrap also provides a way to translate the "Browse" text in HTML with the `data-browse` attribute which can be added to the custom input label (example in Dutch): - -{{< example >}} -<div class="custom-file"> - <input type="file" class="custom-file-input" id="customFileLangHTML"> - <label class="custom-file-label" for="customFileLangHTML" data-browse="Bestand kiezen">Voeg je document toe</label> -</div> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/input-group.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/input-group.md deleted file mode 100644 index 28edd86f0..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/input-group.md +++ /dev/null @@ -1,377 +0,0 @@ ---- -layout: docs -title: Input group -description: Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs. -group: components -toc: true ---- - -## Basic example - -Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place `<label>`s outside the input group. - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text" id="basic-addon1">@</span> - </div> - <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1"> -</div> - -<div class="input-group mb-3"> - <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2"> - <div class="input-group-append"> - <span class="input-group-text" id="basic-addon2">@example.com</span> - </div> -</div> - -<label for="basic-url">Your vanity URL</label> -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text" id="basic-addon3">https://example.com/users/</span> - </div> - <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"> -</div> - -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text">$</span> - </div> - <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)"> - <div class="input-group-append"> - <span class="input-group-text">.00</span> - </div> -</div> - -<div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text">With textarea</span> - </div> - <textarea class="form-control" aria-label="With textarea"></textarea> -</div> -{{< /example >}} - -## Wrapping - -Input groups wrap by default via `flex-wrap: wrap` in order to accommodate custom form field validation within an input group. You may disable this with `.flex-nowrap`. - -{{< example >}} -<div class="input-group flex-nowrap"> - <div class="input-group-prepend"> - <span class="input-group-text" id="addon-wrapping">@</span> - </div> - <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="addon-wrapping"> -</div> -{{< /example >}} - -## Sizing - -Add the relative form sizing classes to the `.input-group` itself and contents within will automatically resize—no need for repeating the form control size classes on each element. - -**Sizing on the individual input group elements isn't supported.** - -{{< example >}} -<div class="input-group input-group-sm mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text" id="inputGroup-sizing-sm">Small</span> - </div> - <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm"> -</div> - -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text" id="inputGroup-sizing-default">Default</span> - </div> - <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default"> -</div> - -<div class="input-group input-group-lg"> - <div class="input-group-prepend"> - <span class="input-group-text" id="inputGroup-sizing-lg">Large</span> - </div> - <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-lg"> -</div> -{{< /example >}} - -## Checkboxes and radios - -Place any checkbox or radio option within an input group's addon instead of text. - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <div class="input-group-text"> - <input type="checkbox" aria-label="Checkbox for following text input"> - </div> - </div> - <input type="text" class="form-control" aria-label="Text input with checkbox"> -</div> - -<div class="input-group"> - <div class="input-group-prepend"> - <div class="input-group-text"> - <input type="radio" aria-label="Radio button for following text input"> - </div> - </div> - <input type="text" class="form-control" aria-label="Text input with radio button"> -</div> -{{< /example >}} - -## Multiple inputs - -While multiple `<input>`s are supported visually, validation styles are only available for input groups with a single `<input>`. - -{{< example >}} -<div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text">First and last name</span> - </div> - <input type="text" aria-label="First name" class="form-control"> - <input type="text" aria-label="Last name" class="form-control"> -</div> -{{< /example >}} - -## Multiple addons - -Multiple add-ons are supported and can be mixed with checkbox and radio input versions. - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text">$</span> - <span class="input-group-text">0.00</span> - </div> - <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)"> -</div> - -<div class="input-group"> - <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)"> - <div class="input-group-append"> - <span class="input-group-text">$</span> - <span class="input-group-text">0.00</span> - </div> -</div> -{{< /example >}} - -## Button addons - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <button class="btn btn-outline-secondary" type="button" id="button-addon1">Button</button> - </div> - <input type="text" class="form-control" placeholder="" aria-label="Example text with button addon" aria-describedby="button-addon1"> -</div> - -<div class="input-group mb-3"> - <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="button-addon2"> - <div class="input-group-append"> - <button class="btn btn-outline-secondary" type="button" id="button-addon2">Button</button> - </div> -</div> - -<div class="input-group mb-3"> - <div class="input-group-prepend" id="button-addon3"> - <button class="btn btn-outline-secondary" type="button">Button</button> - <button class="btn btn-outline-secondary" type="button">Button</button> - </div> - <input type="text" class="form-control" placeholder="" aria-label="Example text with two button addons" aria-describedby="button-addon3"> -</div> - -<div class="input-group"> - <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username with two button addons" aria-describedby="button-addon4"> - <div class="input-group-append" id="button-addon4"> - <button class="btn btn-outline-secondary" type="button">Button</button> - <button class="btn btn-outline-secondary" type="button">Button</button> - </div> -</div> -{{< /example >}} - -## Buttons with dropdowns - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div role="separator" class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <input type="text" class="form-control" aria-label="Text input with dropdown button"> -</div> - -<div class="input-group"> - <input type="text" class="form-control" aria-label="Text input with dropdown button"> - <div class="input-group-append"> - <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div role="separator" class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> -{{< /example >}} - -## Segmented buttons - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <button type="button" class="btn btn-outline-secondary">Action</button> - <button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div role="separator" class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> - <input type="text" class="form-control" aria-label="Text input with segmented dropdown button"> -</div> - -<div class="input-group"> - <input type="text" class="form-control" aria-label="Text input with segmented dropdown button"> - <div class="input-group-append"> - <button type="button" class="btn btn-outline-secondary">Action</button> - <button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - <span class="sr-only">Toggle Dropdown</span> - </button> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div role="separator" class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> - </div> -</div> -{{< /example >}} - -## Custom forms - -Input groups include support for custom selects and custom file inputs. Browser default versions of these are not supported. - -### Custom select - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <label class="input-group-text" for="inputGroupSelect01">Options</label> - </div> - <select class="custom-select" id="inputGroupSelect01"> - <option selected>Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> -</div> - -<div class="input-group mb-3"> - <select class="custom-select" id="inputGroupSelect02"> - <option selected>Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> - <div class="input-group-append"> - <label class="input-group-text" for="inputGroupSelect02">Options</label> - </div> -</div> - -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <button class="btn btn-outline-secondary" type="button">Button</button> - </div> - <select class="custom-select" id="inputGroupSelect03" aria-label="Example select with button addon"> - <option selected>Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> -</div> - -<div class="input-group"> - <select class="custom-select" id="inputGroupSelect04" aria-label="Example select with button addon"> - <option selected>Choose...</option> - <option value="1">One</option> - <option value="2">Two</option> - <option value="3">Three</option> - </select> - <div class="input-group-append"> - <button class="btn btn-outline-secondary" type="button">Button</button> - </div> -</div> -{{< /example >}} - -### Custom file input - -{{< callout info >}} -This example uses the [custom file browser]({{< docsref "/components/forms#file-browser" >}}) component, which relies on the separate [bs-custom-file-input](https://www.npmjs.com/package/bs-custom-file-input) plugin. -{{< /callout >}} - -{{< example >}} -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <span class="input-group-text" id="inputGroupFileAddon01">Upload</span> - </div> - <div class="custom-file"> - <input type="file" class="custom-file-input" id="inputGroupFile01" aria-describedby="inputGroupFileAddon01"> - <label class="custom-file-label" for="inputGroupFile01">Choose file</label> - </div> -</div> - -<div class="input-group mb-3"> - <div class="custom-file"> - <input type="file" class="custom-file-input" id="inputGroupFile02"> - <label class="custom-file-label" for="inputGroupFile02" aria-describedby="inputGroupFileAddon02">Choose file</label> - </div> - <div class="input-group-append"> - <span class="input-group-text" id="inputGroupFileAddon02">Upload</span> - </div> -</div> - -<div class="input-group mb-3"> - <div class="input-group-prepend"> - <button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon03">Button</button> - </div> - <div class="custom-file"> - <input type="file" class="custom-file-input" id="inputGroupFile03" aria-describedby="inputGroupFileAddon03"> - <label class="custom-file-label" for="inputGroupFile03">Choose file</label> - </div> -</div> - -<div class="input-group"> - <div class="custom-file"> - <input type="file" class="custom-file-input" id="inputGroupFile04" aria-describedby="inputGroupFileAddon04"> - <label class="custom-file-label" for="inputGroupFile04">Choose file</label> - </div> - <div class="input-group-append"> - <button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon04">Button</button> - </div> -</div> -{{< /example >}} - -## Accessibility - -Ensure that all form controls have an appropriate accessible name so that their purpose can be conveyed to users of assistive technologies. The simplest way to achieve this is to use a `<label>` element, or—in the case of buttons—to include sufficiently descriptive text as part of the `<button>...</button>` content. - -For situations where it's not possible to include a visible `<label>` or appropriate text content, there are alternative ways of still providing an accessible name, such as: - -- `<label>` elements hidden using the `.sr-only` class -- Pointing to an existing element that can act as a label using `aria-labelledby` -- Providing a `title` attribute -- Explicitly setting the accessible name on an element using `aria-label` - -If none of these are present, assistive technologies may resort to using the `placeholder` attribute as a fallback for the accessible name on `<input>` and `<textarea>` elements. The examples in this section provide a few suggested, case-specific approaches. - -While using visually hidden content (`.sr-only`, `aria-label`, and even `placeholder` content, which disappears once a form field has content) will benefit assistive technology users, a lack of visible label text may still be problematic for certain users. Some form of visible label is generally the best approach, both for accessibility and usability. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/jumbotron.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/jumbotron.md deleted file mode 100644 index 9810be418..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/jumbotron.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: docs -title: Jumbotron -description: Lightweight, flexible component for showcasing hero unit style content. -group: components ---- - -A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site. - -{{< example >}} -<div class="jumbotron"> - <h1 class="display-4">Hello, world!</h1> - <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p> - <hr class="my-4"> - <p>It uses utility classes for typography and spacing to space content out within the larger container.</p> - <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a> -</div> -{{< /example >}} - -To make the jumbotron full width, and without rounded corners, add the `.jumbotron-fluid` modifier class and add a `.container` or `.container-fluid` within. - -{{< example >}} -<div class="jumbotron jumbotron-fluid"> - <div class="container"> - <h1 class="display-4">Fluid jumbotron</h1> - <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p> - </div> -</div> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/media-object.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/media-object.md deleted file mode 100644 index 9c8b7584f..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/media-object.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -layout: docs -title: Media object -description: Documentation and examples for Bootstrap's media object to construct highly repetitive components like blog comments, tweets, and the like. -group: components -toc: true ---- - -## Example - -The [media object](http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/) helps build complex and repetitive components where some media is positioned alongside content that doesn't wrap around said media. Plus, it does this with only two required classes thanks to flexbox. - -Below is an example of a single media object. Only two classes are required—the wrapping `.media` and the `.media-body` around your content. Optional padding and margin can be controlled through [spacing utilities]({{< docsref "/utilities/spacing" >}}). - -{{< example >}} -<div class="media"> - {{< placeholder width="64" height="64" class="mr-3" >}} - <div class="media-body"> - <h5 class="mt-0">Media heading</h5> - <p>Will you do the same for me? It's time to face the music I'm no longer your muse. Heard it's beautiful, be the judge and my girls gonna take a vote. I can feel a phoenix inside of me. Heaven is jealous of our love, angels are crying from up above. Yeah, you take me to utopia.</p> - </div> -</div> -{{< /example >}} - -{{< callout warning >}} -##### Flexbug #12: Inline elements aren't treated as flex items - -Internet Explorer 10-11 do not render inline elements like links or images (or `::before` and `::after` pseudo-elements) as flex items. The only workaround is to set a non-inline `display` value (e.g., `block`, `inline-block`, or `flex`). We suggest using `.d-flex`, one of our [display utilities]({{< docsref "/utilities/display" >}}), as an easy fix. - -**Source:** [Flexbugs on GitHub](https://github.com/philipwalton/flexbugs#flexbug-12) -{{< /callout >}} - -## Nesting - -Media objects can be infinitely nested, though we suggest you stop at some point. Place nested `.media` within the `.media-body` of a parent media object. - -{{< example >}} -<div class="media"> - {{< placeholder width="64" height="64" class="mr-3" >}} - <div class="media-body"> - <h5 class="mt-0">Media heading</h5> - <p>Standing on the frontline when the bombs start to fall. Heaven is jealous of our love, angels are crying from up above. Can't replace you with a million rings. Boy, when you're with me I'll give you a taste. There’s no going back. Before you met me I was alright but things were kinda heavy. Heavy is the head that wears the crown.</p> - - <div class="media mt-3"> - <a class="mr-3" href="#"> - {{< placeholder width="64" height="64" >}} - </a> - <div class="media-body"> - <h5 class="mt-0">Media heading</h5> - <p>Greetings loved ones let's take a journey. Yes, we make angels cry, raining down on earth from up above. Give you something good to celebrate. I used to bite my tongue and hold my breath. I'm ma get your heart racing in my skin-tight jeans. As I march alone to a different beat. Summer after high school when we first met. You're so hypnotizing, could you be the devil? Could you be an angel? It's time to bring out the big balloons. Thought that I was the exception. Bikinis, zucchinis, Martinis, no weenies.</p> - </div> - </div> - </div> -</div> -{{< /example >}} - -## Alignment - -Media in a media object can be aligned with flexbox utilities to the top (default), middle, or end of your `.media-body` content. - -{{< example >}} -<div class="media"> - {{< placeholder width="64" height="64" class="align-self-start mr-3" >}} - <div class="media-body"> - <h5 class="mt-0">Top-aligned media</h5> - <p>I’m gon’ put her in a coma. You give a hundred reasons why, and you say you're really gonna try. So I sat quietly, agreed politely. Suiting up for my crowning battle. And on my 18th Birthday we got matching tattoos. So très chic, yeah, she's a classic. I am ready for the road less traveled.</p> - <p>I'm walking on air (tonight). But down to earth. You're original, cannot be replaced. But in another life I would be your girl. We drove to Cali and got drunk on the beach. We can dance, until we die, you and I, will be young forever. Saw you downtown singing the Blues.</p> - </div> -</div> -{{< /example >}} - -{{< example >}} -<div class="media"> - {{< placeholder width="64" height="64" class="align-self-center mr-3" >}} - <div class="media-body"> - <h5 class="mt-0">Center-aligned media</h5> - <p>She'll turn cold as a freezer. At the eh-end of it all. Stinging like a bee I earned my stripes. Bikinis, zucchinis, Martinis, no weenies. I hope you got a healthy appetite. We can dance, until we die, you and I, will be young forever. We're living the life. We're doing it right. Word on the street, you got somethin' to show me, me.</p> - <p class="mb-0">Wanna see the show in 3D, a movie. They say, be afraid you're not like the others, futuristic lover. Open up your heart. So I sat quietly, agreed politely. Last Friday night. Yeah, you're lucky if you're on her plane. I'll be your gift, give you something good to celebrate.</p> - </div> -</div> -{{< /example >}} - -{{< example >}} -<div class="media"> - {{< placeholder width="64" height="64" class="align-self-end mr-3" >}} - <div class="media-body"> - <h5 class="mt-0">Bottom-aligned media</h5> - <p>Come on, let your colours burst. I can feel this light that's inside of me. All night they're playing, your song. From Tokyo to Mexico, to Rio. There’s no going back. But down to earth. Magical, colorful, Mr. Mystery, ee. Different DNA, they don't understand you.</p> - <p class="mb-0">But down to earth. She's got that, je ne sais quoi, you know it. I can see the writing on the wall. The boys break their necks try'na to creep a little sneak peek. Take me, ta-ta-take me. Open up your heart. Thought that I was the exception. Boom, boom, boom. Venice beach and Palm Springs, summertime is everything. Bring the beat back. (This is how we do)</p> - </div> -</div> -{{< /example >}} - -## Order - -Change the order of content in media objects by modifying the HTML itself, or by adding some custom flexbox CSS to set the `order` property (to an integer of your choosing). - -{{< example >}} -<div class="media"> - <div class="media-body"> - <h5 class="mt-0 mb-1">Media object</h5> - <p>I know there will be sacrifice but that's the price. Are you brave enough to let me see your peacock? Be your teenage dream tonight. Uh-huh, I see you. There’s no going back. Yeah, we maxed our credit cards and got kicked out of the bar. So let me get you in your birthday suit. You may fall in love when you meet her. Had the world in the palm of your hands. Don't let the greatness get you down, oh, oh yeah. Now we talking astrology, getting our nails did, all Japanese-y. Make me your Aphrodite.</p> - </div> - {{< placeholder width="64" height="64" class="ml-3" >}} -</div> -{{< /example >}} - -## Media list - -Because the media object has so few structural requirements, you can also use these classes on list HTML elements. On your `<ul>` or `<ol>`, add the `.list-unstyled` to remove any browser default list styles, and then apply `.media` to your `<li>`s. As always, use spacing utilities wherever needed to fine tune. - -{{< example >}} -<ul class="list-unstyled"> - <li class="media"> - {{< placeholder width="64" height="64" class="mr-3" >}} - <div class="media-body"> - <h5 class="mt-0 mb-1">List-based media object</h5> - <p>All my girls vintage Chanel baby. So you can have your cake. Tonight, tonight, tonight, I'm walking on air. Slowly swallowing down my fear, yeah yeah. Growing fast into a bolt of lightning. So hot and heavy, 'Til dawn. That fairy tale ending with a knight in shining armor. Heavy is the head that wears the crown.</p> - </div> - </li> - <li class="media my-4"> - {{< placeholder width="64" height="64" class="mr-3" >}} - <div class="media-body"> - <h5 class="mt-0 mb-1">List-based media object</h5> - <p>Maybe a reason why all the doors are closed. Cause once you’re mine, once you’re mine. Be your teenage dream tonight. Heavy is the head that wears the crown. It's not even a holiday, nothing to celebrate. A perfect storm, perfect storm.</p> - </div> - </li> - <li class="media"> - {{< placeholder width="64" height="64" class="mr-3" >}} - <div class="media-body"> - <h5 class="mt-0 mb-1">List-based media object</h5> - <p>Are you brave enough to let me see your peacock? There’s no going back. This is the last time you say, after the last line you break. At the eh-end of it all.</p> - </div> - </li> -</ul> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/navbar.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/navbar.md deleted file mode 100644 index 25c571885..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/navbar.md +++ /dev/null @@ -1,602 +0,0 @@ ---- -layout: docs -title: Navbar -description: Documentation and examples for Bootstrap's powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, including support for our collapse plugin. -group: components -toc: true ---- - -## How it works - -Here's what you need to know before getting started with the navbar: - -- Navbars require a wrapping `.navbar` with `.navbar-expand{-sm|-md|-lg|-xl}` for responsive collapsing and [color scheme](#color-schemes) classes. -- Navbars and their contents are fluid by default. Use [optional containers](#containers) to limit their horizontal width. -- Use our [spacing]({{< docsref "/utilities/spacing" >}}) and [flex]({{< docsref "/utilities/flex" >}}) utility classes for controlling spacing and alignment within navbars. -- Navbars are responsive by default, but you can easily modify them to change that. Responsive behavior depends on our Collapse JavaScript plugin. -- Navbars are hidden by default when printing. Force them to be printed by adding `.d-print` to the `.navbar`. See the [display]({{< docsref "/utilities/display" >}}) utility class. -- Ensure accessibility by using a `<nav>` element or, if using a more generic element such as a `<div>`, add a `role="navigation"` to every navbar to explicitly identify it as a landmark region for users of assistive technologies. - -{{< callout info >}} -{{< partial "callout-info-prefersreducedmotion.md" >}} -{{< /callout >}} - -## Supported content - -Navbars come with built-in support for a handful of sub-components. Choose from the following as needed: - -- `.navbar-brand` for your company, product, or project name. -- `.navbar-nav` for a full-height and lightweight navigation (including support for dropdowns). -- `.navbar-toggler` for use with our collapse plugin and other [navigation toggling](#responsive-behaviors) behaviors. -- `.form-inline` for any form controls and actions. -- `.navbar-text` for adding vertically centered strings of text. -- `.collapse.navbar-collapse` for grouping and hiding navbar contents by a parent breakpoint. - -Here's an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the `lg` (large) breakpoint. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarSupportedContent"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </a> - <div class="dropdown-menu" aria-labelledby="navbarDropdown"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> -{{< /example >}} - -This example uses [color]({{< docsref "/utilities/colors" >}}) (`bg-light`) and [spacing]({{< docsref "/utilities/spacing" >}}) (`my-2`, `my-lg-0`, `mr-sm-0`, `my-sm-0`) utility classes. - -### Brand - -The `.navbar-brand` can be applied to most elements, but an anchor works best, as some elements might require utility classes or custom styles. - -{{< example >}} -<!-- As a link --> -<nav class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> -</nav> - -<!-- As a heading --> -<nav class="navbar navbar-light bg-light"> - <span class="navbar-brand mb-0 h1">Navbar</span> -</nav> -{{< /example >}} - -Adding images to the `.navbar-brand` will likely always require custom styles or utilities to properly size. Here are some examples to demonstrate. - -{{< example >}} -<!-- Just an image --> -<nav class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#"> - <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" alt=""> - </a> -</nav> -{{< /example >}} - -{{< example >}} -<!-- Image and text --> -<nav class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#"> - <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" width="30" height="30" class="d-inline-block align-top" alt=""> - Bootstrap - </a> -</nav> -{{< /example >}} - -### Nav - -Navbar navigation links build on our `.nav` options with their own modifier class and require the use of [toggler classes](#toggler) for proper responsive styling. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned. - -Active states—with `.active`—to indicate the current page can be applied directly to `.nav-link`s or their immediate parent `.nav-item`s. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarNav"> - <ul class="navbar-nav"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - </div> -</nav> -{{< /example >}} - -And because we use classes for our navs, you can avoid the list-based approach entirely if you like. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarNavAltMarkup"> - <div class="navbar-nav"> - <a class="nav-link active" href="#">Home <span class="sr-only">(current)</span></a> - <a class="nav-link" href="#">Features</a> - <a class="nav-link" href="#">Pricing</a> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </div> - </div> -</nav> -{{< /example >}} - -You can also use dropdowns in your navbar. Dropdown menus require a wrapping element for positioning, so be sure to use separate and nested elements for `.nav-item` and `.nav-link` as shown below. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarNavDropdown"> - <ul class="navbar-nav"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown link - </a> - <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - </div> -</nav> -{{< /example >}} - -### Forms - -Place various form controls and components within a navbar with `.form-inline`. - -{{< example >}} -<nav class="navbar navbar-light bg-light"> - <form class="form-inline"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> -</nav> -{{< /example >}} - -Immediate child elements of `.navbar` use flex layout and will default to `justify-content: space-between`. Use additional [flex utilities]({{< docsref "/utilities/flex" >}}) as needed to adjust this behavior. - -{{< example >}} -<nav class="navbar navbar-light bg-light"> - <a class="navbar-brand">Navbar</a> - <form class="form-inline"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> -</nav> -{{< /example >}} - -Input groups work, too: - -{{< example >}} -<nav class="navbar navbar-light bg-light"> - <form class="form-inline"> - <div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text" id="basic-addon1">@</span> - </div> - <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1"> - </div> - </form> -</nav> -{{< /example >}} - -Various buttons are supported as part of these navbar forms, too. This is also a great reminder that vertical alignment utilities can be used to align different sized elements. - -{{< example >}} -<nav class="navbar navbar-light bg-light"> - <form class="form-inline"> - <button class="btn btn-outline-success" type="button">Main button</button> - <button class="btn btn-sm btn-outline-secondary" type="button">Smaller button</button> - </form> -</nav> -{{< /example >}} - -### Text - -Navbars may contain bits of text with the help of `.navbar-text`. This class adjusts vertical alignment and horizontal spacing for strings of text. - -{{< example >}} -<nav class="navbar navbar-light bg-light"> - <span class="navbar-text"> - Navbar text with an inline element - </span> -</nav> -{{< /example >}} - -Mix and match with other components and utilities as needed. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar w/ text</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarText"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - </ul> - <span class="navbar-text"> - Navbar text with an inline element - </span> - </div> -</nav> -{{< /example >}} - -## Color schemes - -Theming the navbar has never been easier thanks to the combination of theming classes and `background-color` utilities. Choose from `.navbar-light` for use with light background colors, or `.navbar-dark` for dark background colors. Then, customize with `.bg-*` utilities. - -<div class="bd-example"> - <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarColor01"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">About</a> - </li> - </ul> - <form class="form-inline"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-info my-2 my-sm-0" type="submit">Search</button> - </form> - </div> - </nav> - - <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarColor02"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">About</a> - </li> - </ul> - <form class="form-inline"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-light my-2 my-sm-0" type="submit">Search</button> - </form> - </div> - </nav> - - <nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor03" aria-controls="navbarColor03" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarColor03"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">About</a> - </li> - </ul> - <form class="form-inline"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-primary my-2 my-sm-0" type="submit">Search</button> - </form> - </div> - </nav> -</div> - -```html -<nav class="navbar navbar-dark bg-dark"> - <!-- Navbar content --> -</nav> - -<nav class="navbar navbar-dark bg-primary"> - <!-- Navbar content --> -</nav> - -<nav class="navbar navbar-light" style="background-color: #e3f2fd;"> - <!-- Navbar content --> -</nav> -``` - -## Containers - -Although it's not required, you can wrap a navbar in a `.container` to center it on a page. Or you can add a container inside the `.navbar` to only center the contents of a [fixed or static top navbar](#placement). - -{{< example >}} -<div class="container"> - <nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - </nav> -</div> -{{< /example >}} - -When the container is within your navbar, its horizontal padding is removed at breakpoints lower than your specified `.navbar-expand{-sm|-md|-lg|-xl}` class. This ensures we're not doubling up on padding unnecessarily on lower viewports when your navbar is collapsed. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <div class="container"> - <a class="navbar-brand" href="#">Navbar</a> - </div> -</nav> -{{< /example >}} - -## Placement - -Use our [position utilities]({{< docsref "/utilities/position" >}}) to place navbars in non-static positions. Choose from fixed to the top, fixed to the bottom, or stickied to the top (scrolls with the page until it reaches the top, then stays there). Fixed navbars use `position: fixed`, meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., `padding-top` on the `<body>`) to prevent overlap with other elements. - -Also note that **`.sticky-top` uses `position: sticky`, which [isn't fully supported in every browser](https://caniuse.com/css-sticky)**. - -{{< example >}} -<nav class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#">Default</a> -</nav> -{{< /example >}} - -{{< example >}} -<nav class="navbar fixed-top navbar-light bg-light"> - <a class="navbar-brand" href="#">Fixed top</a> -</nav> -{{< /example >}} - -{{< example >}} -<nav class="navbar fixed-bottom navbar-light bg-light"> - <a class="navbar-brand" href="#">Fixed bottom</a> -</nav> -{{< /example >}} - -{{< example >}} -<nav class="navbar sticky-top navbar-light bg-light"> - <a class="navbar-brand" href="#">Sticky top</a> -</nav> -{{< /example >}} - -## Scrolling - -Add `.navbar-nav-scroll` to a `.navbar-collapse` (or other navbar sub-component) to enable vertical scrolling within the toggleable contents of a collapsed navbar. By default, scrolling kicks in at `75vh` (or 75% of the viewport height), but you can override that with inline or custom styles. At larger viewports when the navbar is expanded, content will appear as it does in a default navbar. - -Please note that this behavior comes with a potential drawback of `overflow`—when setting `overflow-y: auto` (required to scroll the content here), `overflow-x` is the equivalent of `auto`, which will crop some horizontal content. - -Here's an example navbar using `.navbar-nav-scroll` with `style="max-height: 100px;"`, with some extra margin utilities for optimum spacing. - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar scroll</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarScroll" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarScroll"> - <ul class="navbar-nav mr-auto my-2 my-lg-0 navbar-nav-scroll" style="max-height: 100px;"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="navbarScrollingDropdown" role="button" data-toggle="dropdown" aria-expanded="false"> - Link - </a> - <ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown"> - <li><a class="dropdown-item" href="#">Action</a></li> - <li><a class="dropdown-item" href="#">Another action</a></li> - <li><hr class="dropdown-divider"></li> - <li><a class="dropdown-item" href="#">Something else here</a></li> - </ul> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Link</a> - </li> - </ul> - <form class="d-flex"> - <input class="form-control mr-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success" type="submit">Search</button> - </form> - </div> -</nav> -{{< /example >}} - -## Responsive behaviors - -Navbars can use `.navbar-toggler`, `.navbar-collapse`, and `.navbar-expand{-sm|-md|-lg|-xl}` classes to determine when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements. - -For navbars that never collapse, add the `.navbar-expand` class on the navbar. For navbars that always collapse, don't add any `.navbar-expand` class. - -### Toggler - -Navbar togglers are left-aligned by default, but should they follow a sibling element like a `.navbar-brand`, they'll automatically be aligned to the far right. Reversing your markup will reverse the placement of the toggler. Below are examples of different toggle styles. - -With no `.navbar-brand` shown at the smallest breakpoint: - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarTogglerDemo01"> - <a class="navbar-brand" href="#">Hidden brand</a> - <ul class="navbar-nav mr-auto mt-2 mt-lg-0"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> -{{< /example >}} - -With a brand name shown on the left and toggler on the right: - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarTogglerDemo02"> - <ul class="navbar-nav mr-auto mt-2 mt-lg-0"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="search" placeholder="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> -{{< /example >}} - -With a toggler on the left and brand name on the right: - -{{< example >}} -<nav class="navbar navbar-expand-lg navbar-light bg-light"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <a class="navbar-brand" href="#">Navbar</a> - - <div class="collapse navbar-collapse" id="navbarTogglerDemo03"> - <ul class="navbar-nav mr-auto mt-2 mt-lg-0"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> -{{< /example >}} - -### External content - -Sometimes you want to use the collapse plugin to trigger a container element for content that structurally sits outside of the `.navbar` . Because our plugin works on the `id` and `data-target` matching, that's easily done! - -{{< example >}} -<div class="fixed-top"> - <div class="collapse" id="navbarToggleExternalContent"> - <div class="bg-dark p-4"> - <h5 class="text-white h4">Collapsed content</h5> - <span class="text-muted">Toggleable via the navbar brand.</span> - </div> - </div> - <nav class="navbar navbar-dark bg-dark"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - </nav> -</div> -{{< /example >}} - -When you do this, we recommend including additional JavaScript to move the focus programmatically to the container when it is opened. Otherwise, keyboard users and users of assistive technologies will likely have a hard time finding the newly revealed content - particularly if the container that was opened comes *before* the toggler in the document's structure. We also recommend making sure that the toggler has the `aria-controls` attribute, pointing to the `id` of the content container. In theory, this allows assistive technology users to jump directly from the toggler to the container it controls–but support for this is currently quite patchy. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/scrollspy.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/scrollspy.md deleted file mode 100644 index 223257c9c..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/scrollspy.md +++ /dev/null @@ -1,341 +0,0 @@ ---- -layout: docs -title: Scrollspy -description: Automatically update Bootstrap navigation or list group components based on scroll position to indicate which link is currently active in the viewport. -group: components -toc: true ---- - -## How it works - -Scrollspy has a few requirements to function properly: - -- If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). -- It must be used on a Bootstrap [nav component]({{< docsref "/components/navs" >}}) or [list group]({{< docsref "/components/list-group" >}}). -- Scrollspy requires `position: relative;` on the element you're spying on, usually the `<body>`. -- When spying on elements other than the `<body>`, be sure to have a `height` set and `overflow-y: scroll;` applied. -- Anchors (`<a>`) are required and must point to an element with that `id`. - -When successfully implemented, your nav or list group will update accordingly, moving the `.active` class from one item to the next based on their associated targets. - -## Example in navbar - -Scroll the area below the navbar and watch the active class change. The dropdown items will be highlighted as well. - -<div class="bd-example"> - <nav id="navbar-example2" class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <ul class="nav nav-pills"> - <li class="nav-item"> - <a class="nav-link" href="#fat">@fat</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#mdo">@mdo</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#one">one</a> - <a class="dropdown-item" href="#two">two</a> - <div role="separator" class="dropdown-divider"></div> - <a class="dropdown-item" href="#three">three</a> - </div> - </li> - </ul> - </nav> - <div data-spy="scroll" data-target="#navbar-example2" data-offset="0" class="scrollspy-example"> - <h4 id="fat">@fat</h4> - <p>Placeholder content for the scrollspy example. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.</p> - <h4 id="mdo">@mdo</h4> - <p>Placeholder content for the scrollspy example. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk.</p> - <h4 id="one">one</h4> - <p>Placeholder content for the scrollspy example. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.</p> - <h4 id="two">two</h4> - <p>Placeholder content for the scrollspy example. It's time to bring out the big balloons. I'm walking, I'm walking on air (tonight). Yeah, we maxed our credit cards and got kicked out of the bar. Yo, shout out to all you kids, buying bottle service, with your rent money. I'm ma get your heart racing in my skin-tight jeans. If you get the chance you better keep her. Yo, shout out to all you kids, buying bottle service, with your rent money.</p> - <h4 id="three">three</h4> - <p>Placeholder content for the scrollspy example. If you wanna dance, if you want it all, you know that I'm the girl that you should call. Walk through the storm I would. So let me get you in your birthday suit. The one that got away. Last Friday night, yeah I think we broke the law, always say we're gonna stop. 'Cause she's a little bit of Yoko, And she's a little bit of 'Oh no'. I want the jaw droppin', eye poppin', head turnin', body shockin'. Yeah, we maxed our credit cards and got kicked out of the bar.</p> - <p>And some more placeholder content, for good measure.</p> - </div> -</div> - -```html -<nav id="navbar-example2" class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <ul class="nav nav-pills"> - <li class="nav-item"> - <a class="nav-link" href="#fat">@fat</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#mdo">@mdo</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#one">one</a> - <a class="dropdown-item" href="#two">two</a> - <div role="separator" class="dropdown-divider"></div> - <a class="dropdown-item" href="#three">three</a> - </div> - </li> - </ul> -</nav> -<div data-spy="scroll" data-target="#navbar-example2" data-offset="0"> - <h4 id="fat">@fat</h4> - <p>...</p> - <h4 id="mdo">@mdo</h4> - <p>...</p> - <h4 id="one">one</h4> - <p>...</p> - <h4 id="two">two</h4> - <p>...</p> - <h4 id="three">three</h4> - <p>...</p> -</div> -``` - -## Example with nested nav - -Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its parents will also be `.active`. Scroll the area next to the navbar and watch the active class change. - -<div class="bd-example"> - <div class="row"> - <div class="col-4"> - <nav id="navbar-example3" class="navbar navbar-light bg-light flex-column"> - <a class="navbar-brand" href="#">Navbar</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link" href="#item-1">Item 1</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link ml-3 my-1" href="#item-1-1">Item 1-1</a> - <a class="nav-link ml-3 my-1" href="#item-1-2">Item 1-2</a> - </nav> - <a class="nav-link" href="#item-2">Item 2</a> - <a class="nav-link" href="#item-3">Item 3</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link ml-3 my-1" href="#item-3-1">Item 3-1</a> - <a class="nav-link ml-3 my-1" href="#item-3-2">Item 3-2</a> - </nav> - </nav> - </nav> - </div> - <div class="col-8"> - <div data-spy="scroll" data-target="#navbar-example3" data-offset="0" class="scrollspy-example-2"> - <h4 id="item-1">Item 1</h4> - <p>Placeholder content for the scrollspy example. This one relates to item 1. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.</p> - <h5 id="item-1-1">Item 1-1</h5> - <p>Placeholder content for the scrollspy example. This one relates to the item 1-1. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.</p> - <h5 id="item-1-2">Item 1-2</h5> - <p>Placeholder content for the scrollspy example. This one relates to the item 1-2. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.</p> - <h4 id="item-2">Item 2</h4> - <p>Placeholder content for the scrollspy example. This one relates to item 2. Don't need apologies. There is no fear now, let go and just be free, I will love you unconditionally. Last Friday night. Don't be a shy kinda guy I'll bet it's beautiful. Summer after high school when we first met. 'Cause she's the muse and the artist. What? Wait. No, no, no, no. Thought that I was the exception.</p> - <h4 id="item-3">Item 3</h4> - <p>Placeholder content for the scrollspy example. This one relates to item 3. Word on the street, you got somethin' to show me, me. All this money can't buy me a time machine. Make it like your birthday everyday. So we hit the boulevard. You make me feel like I'm livin' a teenage dream, the way you turn me on Skip the talk, heard it all, time to walk the walk. Word on the street, you got somethin' to show me, me. It's no big deal, it's no big deal, it's no big deal.</p> - <h5 id="item-3-1">Item 3-1</h5> - <p>Placeholder content for the scrollspy example. This one relates to item 3-1. Baby do you dare to do this? This is no big deal. Yeah, you're lucky if you're on her plane. Just own the night like the 4th of July! Standing on the frontline when the bombs start to fall. So just be sure before you give it all to me.</p> - <h5 id="item-3-2">Item 3-2</h5> - <p>Placeholder content for the scrollspy example. This one relates to item 3-2. You're original, cannot be replaced. All night they're playing, your song. California girls we're undeniable. Like a bird without a cage. There is no fear now, let go and just be free, I will love you unconditionally. I can see the writing on the wall. You could travel the world but nothing comes close to the golden coast.</p> - </div> - </div> - </div> -</div> - -```html -<nav id="navbar-example3" class="navbar navbar-light bg-light"> - <a class="navbar-brand" href="#">Navbar</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link" href="#item-1">Item 1</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link ml-3 my-1" href="#item-1-1">Item 1-1</a> - <a class="nav-link ml-3 my-1" href="#item-1-2">Item 1-2</a> - </nav> - <a class="nav-link" href="#item-2">Item 2</a> - <a class="nav-link" href="#item-3">Item 3</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link ml-3 my-1" href="#item-3-1">Item 3-1</a> - <a class="nav-link ml-3 my-1" href="#item-3-2">Item 3-2</a> - </nav> - </nav> -</nav> - -<div data-spy="scroll" data-target="#navbar-example3" data-offset="0"> - <h4 id="item-1">Item 1</h4> - <p>...</p> - <h5 id="item-1-1">Item 1-1</h5> - <p>...</p> - <h5 id="item-1-2">Item 1-2</h5> - <p>...</p> - <h4 id="item-2">Item 2</h4> - <p>...</p> - <h4 id="item-3">Item 3</h4> - <p>...</p> - <h5 id="item-3-1">Item 3-1</h5> - <p>...</p> - <h5 id="item-3-2">Item 3-2</h5> - <p>...</p> -</div> -``` - -## Example with list-group - -Scrollspy also works with `.list-group`s. Scroll the area next to the list group and watch the active class change. - -<div class="bd-example"> - <div class="row"> - <div class="col-4"> - <div id="list-example" class="list-group"> - <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> - <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a> - <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a> - <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a> - </div> - </div> - <div class="col-8"> - <div data-spy="scroll" data-target="#list-example" data-offset="0" class="scrollspy-example"> - <h4 id="list-item-1">Item 1</h4> - <p>Placeholder content for the scrollspy list-group example. This one relates to item 1. Don't need apologies. There is no fear now, let go and just be free, I will love you unconditionally. Last Friday night. Don't be a shy kinda guy I'll bet it's beautiful. Summer after high school when we first met. 'Cause she's the muse and the artist. What? Wait. Thought that I was the exception.</p> - <h4 id="list-item-2">Item 2</h4> - <p>Placeholder content for the scrollspy list-group example. This one relates to item 2. Yeah, she dances to her own beat. Oh, no. You could've been the greatest. 'Cause, baby, you're a firework. Maybe a reason why all the doors are closed. Open up your heart and just let it begin. So très chic, yeah, she's a classic.</p> - <h4 id="list-item-3">Item 3</h4> - <p>Placeholder content for the scrollspy list-group example. This one relates to item 3. We go higher and higher. Never one without the other, we made a pact. I'm walking on air. Someone said you had your tattoo removed. Now I’m floating like a butterfly. Tone, tan fit and ready, turn it up cause its gettin' heavy. Cause once you’re mine, once you’re mine. You just gotta ignite the light and let it shine! So we hit the boulevard. Do you ever feel, feel so paper thin. I see it all, I see it now.</p> - <h4 id="list-item-4">Item 4</h4> - <p>Placeholder content for the scrollspy list-group example. This one relates to item 4. Summer after high school when we first met. There is no fear now, let go and just be free, I will love you unconditionally. Sun-kissed skin so hot we'll melt your popsicle. This love will make you levitate.</p> - </div> - </div> - </div> -</div> - -```html -<div id="list-example" class="list-group"> - <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> - <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a> - <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a> - <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a> -</div> -<div data-spy="scroll" data-target="#list-example" data-offset="0" class="scrollspy-example"> - <h4 id="list-item-1">Item 1</h4> - <p>...</p> - <h4 id="list-item-2">Item 2</h4> - <p>...</p> - <h4 id="list-item-3">Item 3</h4> - <p>...</p> - <h4 id="list-item-4">Item 4</h4> - <p>...</p> -</div> -``` - -## Usage - -### Via data attributes - -To easily add scrollspy behavior to your topbar navigation, add `data-spy="scroll"` to the element you want to spy on (most typically this would be the `<body>`). Then add the `data-target` attribute with the ID or class of the parent element of any Bootstrap `.nav` component. - -```css -body { - position: relative; -} -``` - -```html -<body data-spy="scroll" data-target="#navbar-example"> - ... - <div id="navbar-example"> - <ul class="nav nav-tabs" role="tablist"> - ... - </ul> - </div> - ... -</body> -``` - -### Via JavaScript - -After adding `position: relative;` in your CSS, call the scrollspy via JavaScript: - -```js -$('body').scrollspy({ target: '#navbar-example' }) -``` - -{{< callout danger >}} -#### Resolvable ID targets required - -Navbar links must have resolvable id targets. For example, a `<a href="#home">home</a>` must correspond to something in the DOM like `<div id="home"></div>`. -{{< /callout >}} - -{{< callout info >}} -#### Non-`:visible` target elements ignored - -Target elements that are not [`:visible` according to jQuery](https://api.jquery.com/visible-selector/) will be ignored and their corresponding nav items will never be highlighted. -{{< /callout >}} - -### Methods - -#### `.scrollspy('refresh')` - -When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so: - -```js -$('[data-spy="scroll"]').each(function () { - var $spy = $(this).scrollspy('refresh') -}) -``` - -#### `.scrollspy('dispose')` - -Destroys an element's scrollspy. - -### Options - -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-offset=""`. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 100px;">Name</th> - <th style="width: 100px;">Type</th> - <th style="width: 50px;">Default</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>offset</td> - <td>number</td> - <td>10</td> - <td>Pixels to offset from top when calculating position of scroll.</td> - </tr> - <tr> - <td>method</td> - <td>string</td> - <td>auto</td> - <td>Finds which section the spied element is in. <code>auto</code> will choose the best method to get scroll coordinates. <code>offset</code> will use jQuery offset method to get scroll coordinates. <code>position</code> will use jQuery position method to get scroll coordinates.</td> - </tr> - <tr> - <td>target</td> - <td>string | jQuery object | DOM element</td> - <td></td> - <td>Specifies element to apply Scrollspy plugin.</td> - </tr> - </tbody> -</table> - -### Events - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 150px;">Event Type</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>activate.bs.scrollspy</td> - <td>This event fires on the scroll element whenever a new item becomes activated by the scrollspy.</td> - </tr> - </tbody> -</table> - -```js -$('[data-spy="scroll"]').on('activate.bs.scrollspy', function () { - // do something... -}) -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/toasts.md b/vendor/twbs/bootstrap/site/content/docs/4.6/components/toasts.md deleted file mode 100644 index 73e8bc41d..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/toasts.md +++ /dev/null @@ -1,379 +0,0 @@ ---- -layout: docs -title: Toasts -description: Push notifications to your visitors with a toast, a lightweight and easily customizable alert message. -group: components -toc: true ---- - -Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems. They're built with flexbox, so they're easy to align and position. - -## Overview - -Things to know when using the toast plugin: - -- If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). -- Toasts are opt-in for performance reasons, so **you must initialize them yourself**. -- **Please note that you are responsible for positioning toasts.** -- Toasts will automatically hide if you do not specify `autohide: false`. - -{{< callout info >}} -{{< partial "callout-info-prefersreducedmotion.md" >}} -{{< /callout >}} - -## Examples - -### Basic - -To encourage extensible and predictable toasts, we recommend a header and body. Toast headers use `display: flex`, allowing easy alignment of content thanks to our margin and flexbox utilities. - -Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your "toasted" content and strongly encourage a dismiss button. - -{{< example class="bg-light" >}} -<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small>11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> -</div> -{{< /example >}} - -### Live - -Click the button the below to show as toast (positioning with our utilities in the lower right corner) that has been hidden by default with `.hide`. - -<div class="position-fixed bottom-0 right-0 p-3" style="z-index: 5; right: 0; bottom: 0;"> - <div id="liveToast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true" data-delay="2000"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text="false" title="false" >}} - <strong class="mr-auto">Bootstrap</strong> - <small>11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> - </div> -</div> - -<div class="bd-example"> - <button type="button" class="btn btn-primary" id="liveToastBtn">Show live toast</button> -</div> - -```html -<button type="button" class="btn btn-primary" id="liveToastBtn">Show live toast</button> - -<div class="position-fixed bottom-0 right-0 p-3" style="z-index: 5; right: 0; bottom: 0;"> - <div id="liveToast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true" data-delay="2000"> - <div class="toast-header"> - <img src="..." class="rounded mr-2" alt="..."> - <strong class="mr-auto">Bootstrap</strong> - <small>11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> - </div> -</div> -``` - -### Translucent - -Toasts are slightly translucent, too, so they blend over whatever they might appear over. For browsers that support the `backdrop-filter` CSS property, we'll also attempt to blur the elements under a toast. - -{{< example class="bg-dark" >}} -<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small class="text-muted">11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> -</div> -{{< /example >}} - -### Stacking - -When you have multiple toasts, we default to vertically stacking them in a readable manner. - -{{< example class="bg-light" >}} -<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small class="text-muted">just now</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - See? Just like this. - </div> -</div> - -<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small class="text-muted">2 seconds ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Heads up, toasts will stack automatically - </div> -</div> -{{< /example >}} - -## Placement - -Place toasts with custom CSS as you need them. The top right is often used for notifications, as is the top middle. If you're only ever going to show one toast at a time, put the positioning styles right on the `.toast`. - -{{< example class="bg-dark" >}} -<div aria-live="polite" aria-atomic="true" style="position: relative; min-height: 200px;"> - <div class="toast" style="position: absolute; top: 0; right: 0;"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small>11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> - </div> -</div> -{{< /example >}} - -For systems that generate more notifications, consider using a wrapping element so they can easily stack. - -{{< example class="bg-dark" >}} -<div aria-live="polite" aria-atomic="true" style="position: relative; min-height: 200px;"> - <!-- Position it --> - <div style="position: absolute; top: 0; right: 0;"> - - <!-- Then put toasts within --> - <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small class="text-muted">just now</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - See? Just like this. - </div> - </div> - - <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small class="text-muted">2 seconds ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Heads up, toasts will stack automatically - </div> - </div> - </div> -</div> -{{< /example >}} - -You can also get fancy with flexbox utilities to align toasts horizontally and/or vertically. - -{{< example class="bg-dark" >}} -<!-- Flexbox container for aligning the toasts --> -<div aria-live="polite" aria-atomic="true" class="d-flex justify-content-center align-items-center" style="height: 200px;"> - - <!-- Then put toasts within --> - <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small>11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> - </div> -</div> -{{< /example >}} - -## Accessibility - -Toasts are intended to be small interruptions to your visitors or users, so to help those with screen readers and similar assistive technologies, you should wrap your toasts in an [`aria-live` region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions). Changes to live regions (such as injecting/updating a toast component) are automatically announced by screen readers without needing to move the user's focus or otherwise interrupt the user. Additionally, include `aria-atomic="true"` to ensure that the entire toast is always announced as a single (atomic) unit, rather than announcing what was changed (which could lead to problems if you only update part of the toast's content, or if displaying the same toast content at a later point in time). If the information needed is important for the process, e.g. for a list of errors in a form, then use the [alert component]({{< docsref "/components/alerts" >}}) instead of toast. - -Note that the live region needs to be present in the markup *before* the toast is generated or updated. If you dynamically generate both at the same time and inject them into the page, they will generally not be announced by assistive technologies. - -You also need to adapt the `role` and `aria-live` level depending on the content. If it's an important message like an error, use `role="alert" aria-live="assertive"`, otherwise use `role="status" aria-live="polite"` attributes. - -As the content you're displaying changes, be sure to update the [`delay` timeout](#options) to ensure people have enough time to read the toast. - -```html -<div class="toast" role="alert" aria-live="polite" aria-atomic="true" data-delay="10000"> - <div role="alert" aria-live="assertive" aria-atomic="true">...</div> -</div> -``` - -When using `autohide: false`, you must add a close button to allow users to dismiss the toast. - -{{< example class="bg-light" >}} -<div role="alert" aria-live="assertive" aria-atomic="true" class="toast" data-autohide="false"> - <div class="toast-header"> - {{< placeholder width="20" height="20" background="#007aff" class="rounded mr-2" text=" " title=" " >}} - <strong class="mr-auto">Bootstrap</strong> - <small>11 mins ago</small> - <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - </div> - <div class="toast-body"> - Hello, world! This is a toast message. - </div> -</div> -{{< /example >}} - -## JavaScript behavior - -### Usage - -Initialize toasts via JavaScript: - -```js -$('.toast').toast(option) -``` - -### Options - -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 100px;">Name</th> - <th style="width: 100px;">Type</th> - <th style="width: 50px;">Default</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>animation</td> - <td>boolean</td> - <td>true</td> - <td>Apply a CSS fade transition to the toast</td> - </tr> - <tr> - <td>autohide</td> - <td>boolean</td> - <td>true</td> - <td>Auto hide the toast</td> - </tr> - <tr> - <td>delay</td> - <td>number</td> - <td> - <code>500</code> - </td> - <td>Delay hiding the toast (ms)</td> - </tr> - </tbody> -</table> - -### Methods - -{{< callout danger >}} -{{< partial "callout-danger-async-methods.md" >}} -{{< /callout >}} - -#### `$().toast(options)` - -Attaches a toast handler to an element collection. - -#### `.toast('show')` - -Reveals an element's toast. **Returns to the caller before the toast has actually been shown** (i.e. before the `shown.bs.toast` event occurs). -You have to manually call this method, instead your toast won't show. - -```js -$('#element').toast('show') -``` - -#### `.toast('hide')` - -Hides an element's toast. **Returns to the caller before the toast has actually been hidden** (i.e. before the `hidden.bs.toast` event occurs). You have to manually call this method if you made `autohide` to `false`. - -```js -$('#element').toast('hide') -``` - -#### `.toast('dispose')` - -Hides an element's toast. Your toast will remain on the DOM but won't show anymore. - -```js -$('#element').toast('dispose') -``` - -### Events - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th style="width: 150px;">Event Type</th> - <th>Description</th> - </tr> - </thead> - <tbody> - <tr> - <td>show.bs.toast</td> - <td>This event fires immediately when the <code>show</code> instance method is called.</td> - </tr> - <tr> - <td>shown.bs.toast</td> - <td>This event is fired when the toast has been made visible to the user.</td> - </tr> - <tr> - <td>hide.bs.toast</td> - <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td> - </tr> - <tr> - <td>hidden.bs.toast</td> - <td>This event is fired when the toast has finished being hidden from the user.</td> - </tr> - </tbody> -</table> - -```js -$('#myToast').on('hidden.bs.toast', function () { - // do something... -}) -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/content/code.md b/vendor/twbs/bootstrap/site/content/docs/4.6/content/code.md deleted file mode 100644 index c0ddf5839..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/content/code.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: docs -title: Code -description: Documentation and examples for displaying inline and multiline blocks of code with Bootstrap. -group: content -toc: true ---- - -## Inline code - -Wrap inline snippets of code with `<code>`. Be sure to escape HTML angle brackets. - -{{< example >}} -For example, <code><section></code> should be wrapped as inline. -{{< /example >}} - -## Code blocks - -Use `<pre>`s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper rendering. You may optionally add the `.pre-scrollable` class, which will set a max-height of 340px and provide a y-axis scrollbar. - -{{< example >}} -<pre><code><p>Sample text here...</p> -<p>And another line of sample text here...</p> -</code></pre> -{{< /example >}} - -## Variables - -For indicating variables use the `<var>` tag. - -{{< example >}} -<var>y</var> = <var>m</var><var>x</var> + <var>b</var> -{{< /example >}} - -## User input - -Use the `<kbd>` to indicate input that is typically entered via keyboard. - -{{< example >}} -To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br> -To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd> -{{< /example >}} - -## Sample output - -For indicating sample output from a program use the `<samp>` tag. - -{{< example >}} -<samp>This text is meant to be treated as sample output from a computer program.</samp> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/content/tables.md b/vendor/twbs/bootstrap/site/content/docs/4.6/content/tables.md deleted file mode 100644 index 9129c3c68..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/content/tables.md +++ /dev/null @@ -1,837 +0,0 @@ ---- -layout: docs -title: Tables -description: Documentation and examples for opt-in styling of tables (given their prevalent use in JavaScript plugins) with Bootstrap. -group: content -toc: true ---- - -## Examples - -Due to the widespread use of tables across third-party widgets like calendars and date pickers, we've designed our tables to be **opt-in**. Just add the base class `.table` to any `<table>`, then extend with custom styles or our various included modifier classes. - -Using the most basic table markup, here's how `.table`-based tables look in Bootstrap. **All table styles are inherited in Bootstrap 4**, meaning any nested tables will be styled in the same manner as the parent. - -{{< example >}} -<table class="table"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -You can also invert the colors—with light text on dark backgrounds—with `.table-dark`. - -{{< example >}} -<table class="table table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Table head options - -Similar to tables and dark tables, use the modifier classes `.thead-light` or `.thead-dark` to make `<thead>`s appear light or dark gray. - -{{< example >}} -<table class="table"> - <thead class="thead-dark"> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> - -<table class="table"> - <thead class="thead-light"> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Striped rows - -Use `.table-striped` to add zebra-striping to any table row within the `<tbody>`. - -{{< example >}} -<table class="table table-striped"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -{{< example >}} -<table class="table table-striped table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Bordered table - -Add `.table-bordered` for borders on all sides of the table and cells. - -{{< example >}} -<table class="table table-bordered"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -{{< example >}} -<table class="table table-bordered table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Borderless table - -Add `.table-borderless` for a table without borders. - -{{< example >}} -<table class="table table-borderless"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -`.table-borderless` can also be used on dark tables. - -{{< example >}} -<table class="table table-borderless table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Hoverable rows - -Add `.table-hover` to enable a hover state on table rows within a `<tbody>`. - -{{< example >}} -<table class="table table-hover"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -{{< example >}} -<table class="table table-hover table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Small table - -Add `.table-sm` to make tables more compact by cutting cell padding in half. - -{{< example >}} -<table class="table table-sm"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -{{< example >}} -<table class="table table-sm table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td colspan="2">Larry the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Contextual classes - -Use contextual classes to color table rows or individual cells. - -<div class="bd-example"> - <table class="table"> - <thead> - <tr> - <th scope="col">Class</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - </tr> - </thead> - <tbody> - <tr class="table-active"> - <th scope="row">Active</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">Default</th> - <td>Cell</td> - <td>Cell</td> - </tr> - {{< table.inline >}} - {{- range (index $.Site.Data "theme-colors") }} - <tr class="table-{{ .name }}"> - <th scope="row">{{ .name | title }}</th> - <td>Cell</td> - <td>Cell</td> - </tr> - {{- end -}} - {{< /table.inline >}} - </tbody> - </table> -</div> - -{{< highlight html >}} -<!-- On rows --> -<tr class="table-active">...</tr>{{< table.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<tr class="table-{{ .name }}">...</tr> -{{- end -}} -{{< /table.inline >}} - -<!-- On cells (`td` or `th`) --> -<tr> - <td class="table-active">...</td>{{< table.inline >}} -{{- range (index $.Site.Data "theme-colors") }} - <td class="table-{{ .name }}">...</td> -{{- end -}} -{{< /table.inline >}} -</tr> -{{< /highlight >}} - -Regular table background variants are not available with the dark table, however, you may use [text or background utilities]({{< docsref "/utilities/colors" >}}) to achieve similar styles. - -<div class="bd-example"> - <table class="table table-dark"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - </tr> - </thead> - <tbody> - <tr class="bg-primary"> - <th scope="row">1</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr class="bg-success"> - <th scope="row">3</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">4</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr class="bg-info"> - <th scope="row">5</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">6</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr class="bg-warning"> - <th scope="row">7</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">8</th> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr class="bg-danger"> - <th scope="row">9</th> - <td>Cell</td> - <td>Cell</td> - </tr> - </tbody> - </table> -</div> - -```html -<!-- On rows --> -<tr class="bg-primary">...</tr> -<tr class="bg-success">...</tr> -<tr class="bg-warning">...</tr> -<tr class="bg-danger">...</tr> -<tr class="bg-info">...</tr> - -<!-- On cells (`td` or `th`) --> -<tr> - <td class="bg-primary">...</td> - <td class="bg-success">...</td> - <td class="bg-warning">...</td> - <td class="bg-danger">...</td> - <td class="bg-info">...</td> -</tr> -``` - -{{< callout warning >}} -{{< partial "callout-warning-color-assistive-technologies.md" >}} -{{< /callout >}} - -Create responsive tables by wrapping any `.table` with `.table-responsive{-sm|-md|-lg|-xl}`, making the table scroll horizontally at each `max-width` breakpoint of up to (but not including) 576px, 768px, 992px, and 1120px, respectively. - -{{< callout info >}} -{{< partial "callout-info-mediaqueries-breakpoints.md" >}} -{{< /callout >}} - -## Captions - -A `<caption>` functions like a heading for a table. It helps users with screen readers to find a table and understand what it's about and decide if they want to read it. - -{{< example >}} -<table class="table"> - <caption>List of users</caption> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">First</th> - <th scope="col">Last</th> - <th scope="col">Handle</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Mark</td> - <td>Otto</td> - <td>@mdo</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Jacob</td> - <td>Thornton</td> - <td>@fat</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Larry</td> - <td>the Bird</td> - <td>@twitter</td> - </tr> - </tbody> -</table> -{{< /example >}} - -## Responsive tables - -Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a `.table` with `.table-responsive`. Or, pick a maximum breakpoint with which to have a responsive table up to by using `.table-responsive{-sm|-md|-lg|-xl}`. - -{{< callout warning >}} -##### Vertical clipping/truncation - -Responsive tables make use of `overflow-y: hidden`, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets. -{{< /callout >}} - -### Always responsive - -Across every breakpoint, use `.table-responsive` for horizontally scrolling tables. - -<div class="bd-example"> - <div class="table-responsive"> - <table class="table"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - </tr> - </tbody> - </table> - </div> -</div> - -```html -<div class="table-responsive"> - <table class="table"> - ... - </table> -</div> -``` - -### Breakpoint specific - -Use `.table-responsive{-sm|-md|-lg|-xl}` as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally. - -**These tables may appear broken until their responsive styles apply at specific viewport widths.** - -{{< tables.inline >}} -{{ range $.Site.Data.breakpoints }} -{{ if not (eq .breakpoint "xs") }} -<div class="bd-example"> -<div class="table-responsive{{ .abbr }}"> - <table class="table"> - <thead> - <tr> - <th scope="col">#</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - <th scope="col">Heading</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">1</th> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">2</th> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - </tr> - <tr> - <th scope="row">3</th> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - <td>Cell</td> - </tr> - </tbody> - </table> -</div> -</div> -{{ end -}} -{{- end -}} -{{< /tables.inline >}} - -{{< highlight html >}} -{{< tables.inline >}} -{{- range $.Site.Data.breakpoints -}} -{{- if not (eq .breakpoint "xs") }} -<div class="table-responsive{{ .abbr }}"> - <table class="table"> - ... - </table> -</div> -{{ end -}} -{{- end -}} -{{< /tables.inline >}} -{{< /highlight >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/album/album.css b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/album/album.css deleted file mode 100644 index bc81349c5..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/album/album.css +++ /dev/null @@ -1,33 +0,0 @@ -.jumbotron { - padding-top: 3rem; - padding-bottom: 3rem; - margin-bottom: 0; - background-color: #fff; -} -@media (min-width: 768px) { - .jumbotron { - padding-top: 6rem; - padding-bottom: 6rem; - } -} - -.jumbotron p:last-child { - margin-bottom: 0; -} - -.jumbotron h1 { - font-weight: 300; -} - -.jumbotron .container { - max-width: 40rem; -} - -footer { - padding-top: 3rem; - padding-bottom: 3rem; -} - -footer p { - margin-bottom: .25rem; -} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/blog/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/blog/index.html deleted file mode 100644 index 0f27397dd..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/blog/index.html +++ /dev/null @@ -1,200 +0,0 @@ ---- -layout: examples -title: Blog Template -extra_css: - - "https://fonts.googleapis.com/css?family=Playfair+Display:700,900" - - "blog.css" -include_js: false ---- - -<div class="container"> - <header class="blog-header py-3"> - <div class="row flex-nowrap justify-content-between align-items-center"> - <div class="col-4 pt-1"> - <a class="text-muted" href="#">Subscribe</a> - </div> - <div class="col-4 text-center"> - <a class="blog-header-logo text-dark" href="#">Large</a> - </div> - <div class="col-4 d-flex justify-content-end align-items-center"> - <a class="text-muted" href="#" aria-label="Search"> - <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="mx-3" role="img" viewBox="0 0 24 24" focusable="false"><title>Search</title><circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2"/></svg> - </a> - <a class="btn btn-sm btn-outline-secondary" href="#">Sign up</a> - </div> - </div> - </header> - - <div class="nav-scroller py-1 mb-2"> - <nav class="nav d-flex justify-content-between"> - <a class="p-2 text-muted" href="#">World</a> - <a class="p-2 text-muted" href="#">U.S.</a> - <a class="p-2 text-muted" href="#">Technology</a> - <a class="p-2 text-muted" href="#">Design</a> - <a class="p-2 text-muted" href="#">Culture</a> - <a class="p-2 text-muted" href="#">Business</a> - <a class="p-2 text-muted" href="#">Politics</a> - <a class="p-2 text-muted" href="#">Opinion</a> - <a class="p-2 text-muted" href="#">Science</a> - <a class="p-2 text-muted" href="#">Health</a> - <a class="p-2 text-muted" href="#">Style</a> - <a class="p-2 text-muted" href="#">Travel</a> - </nav> - </div> - - <div class="jumbotron p-4 p-md-5 text-white rounded bg-dark"> - <div class="col-md-6 px-0"> - <h1 class="display-4 font-italic">Title of a longer featured blog post</h1> - <p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p> - <p class="lead mb-0"><a href="#" class="text-white font-weight-bold">Continue reading...</a></p> - </div> - </div> - - <div class="row mb-2"> - <div class="col-md-6"> - <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> - <div class="col p-4 d-flex flex-column position-static"> - <strong class="d-inline-block mb-2 text-primary">World</strong> - <h3 class="mb-0">Featured post</h3> - <div class="mb-1 text-muted">Nov 12</div> - <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> - <a href="#" class="stretched-link">Continue reading</a> - </div> - <div class="col-auto d-none d-lg-block"> - {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}} - </div> - </div> - </div> - <div class="col-md-6"> - <div class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> - <div class="col p-4 d-flex flex-column position-static"> - <strong class="d-inline-block mb-2 text-success">Design</strong> - <h3 class="mb-0">Post title</h3> - <div class="mb-1 text-muted">Nov 11</div> - <p class="mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> - <a href="#" class="stretched-link">Continue reading</a> - </div> - <div class="col-auto d-none d-lg-block"> - {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}} - </div> - </div> - </div> - </div> -</div> - -<main role="main" class="container"> - <div class="row"> - <div class="col-md-8 blog-main"> - <h3 class="pb-4 mb-4 font-italic border-bottom"> - From the Firehose - </h3> - - <div class="blog-post"> - <h2 class="blog-post-title">Sample blog post</h2> - <p class="blog-post-meta">January 1, 2014 by <a href="#">Mark</a></p> - - <p>This blog post shows a few different types of content that’s supported and styled with Bootstrap. Basic typography, images, and code are all supported.</p> - <hr> - <p>Yeah, she dances to her own beat. Oh, no. You could've been the greatest. 'Cause, baby, <a href="#">you're a firework</a>. Maybe a reason why all the doors are closed. Open up your heart and just let it begin. So très chic, yeah, she's a classic.</p> - <blockquote> - <p>Bikinis, zucchinis, Martinis, no weenies. I know there will be sacrifice but that's the price. <strong>This is how we do it</strong>. I'm not sticking around to watch you go down. You think you're so rock and roll, but you're really just a joke. I know one spark will shock the world, yeah yeah. Can't replace you with a million rings.</p> - </blockquote> - <p>Trying to connect the dots, don't know what to tell my boss. Before you met me I was alright but things were kinda heavy. You just gotta ignite the light and let it shine. Glitter all over the room <em>pink flamingos</em> in the pool. </p> - <h2>Heading</h2> - <p>Suiting up for my crowning battle. If you only knew what the future holds. Bring the beat back. Peach-pink lips, yeah, everybody stares.</p> - <h3>Sub-heading</h3> - <p>You give a hundred reasons why, and you say you're really gonna try. Straight stuntin' yeah we do it like that. Calling out my name. ‘Cause I, I’m capable of anything.</p> - <pre><code>Example code block</code></pre> - <p>Before you met me I was alright but things were kinda heavy. You just gotta ignite the light and let it shine.</p> - <h3>Sub-heading</h3> - <p>You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out.</p> - <ul> - <li>Got a motel and built a fort out of sheets.</li> - <li>Your kiss is cosmic, every move is magic.</li> - <li>Suiting up for my crowning battle.</li> - </ul> - <p>Takes you miles high, so high, 'cause she’s got that one international smile.</p> - <ol> - <li>Scared to rock the boat and make a mess.</li> - <li>I could have rewrite your addiction.</li> - <li>I know you get me so I let my walls come down.</li> - </ol> - <p>After a hurricane comes a rainbow.</p> - </div><!-- /.blog-post --> - - <div class="blog-post"> - <h2 class="blog-post-title">Another blog post</h2> - <p class="blog-post-meta">December 23, 2013 by <a href="#">Jacob</a></p> - - <p>I am ready for the road less traveled. Already <a href="#">brushing off the dust</a>. Yeah, you're lucky if you're on her plane. I used to bite my tongue and hold my breath. Uh, She’s a beast. I call her Karma (come back). Black ray-bans, you know she's with the band. I can't sleep let's run away and don't ever look back, don't ever look back.</p> - <blockquote> - <p>Growing fast into a <strong>bolt of lightning</strong>. Be careful Try not to lead her on</p> - </blockquote> - <p>I'm intrigued, for a peek, heard it's fascinating. Oh oh! Wanna be a victim ready for abduction. She's got that international smile, oh yeah, she's got that one international smile. Do you ever feel, feel so paper thin. I’m gon’ put her in a coma. Sun-kissed skin so hot we'll melt your popsicle.</p> - <p>This is transcendental, on another level, boy, you're my lucky star.</p> - </div><!-- /.blog-post --> - - <div class="blog-post"> - <h2 class="blog-post-title">New feature</h2> - <p class="blog-post-meta">December 14, 2013 by <a href="#">Chris</a></p> - - <p>From Tokyo to Mexico, to Rio. Yeah, you take me to utopia. I'm walking on air. We'd make out in your Mustang to Radiohead. I mean the ones, I mean like she's the one. Sun-kissed skin so hot we'll melt your popsicle. Slow cooking pancakes for my boy, still up, still fresh as a Daisy.</p> - <ul> - <li>I hope you got a healthy appetite.</li> - <li>You're never gonna be unsatisfied.</li> - <li>Got a motel and built a fort out of sheets.</li> - </ul> - <p>Don't need apologies. Boy, you're an alien your touch so foreign, it's <em>supernatural</em>, extraterrestrial. Talk about our future like we had a clue. I can feel a phoenix inside of me.</p> - </div><!-- /.blog-post --> - - <nav class="blog-pagination"> - <a class="btn btn-outline-primary" href="#">Older</a> - <a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Newer</a> - </nav> - - </div><!-- /.blog-main --> - - <aside class="col-md-4 blog-sidebar"> - <div class="p-4 mb-3 bg-light rounded"> - <h4 class="font-italic">About</h4> - <p class="mb-0">Saw you downtown singing the Blues. Watch you circle the drain. Why don't you let me stop by? Heavy is the head that <em>wears the crown</em>. Yes, we make angels cry, raining down on earth from up above.</p> - </div> - - <div class="p-4"> - <h4 class="font-italic">Archives</h4> - <ol class="list-unstyled mb-0"> - <li><a href="#">March 2014</a></li> - <li><a href="#">February 2014</a></li> - <li><a href="#">January 2014</a></li> - <li><a href="#">December 2013</a></li> - <li><a href="#">November 2013</a></li> - <li><a href="#">October 2013</a></li> - <li><a href="#">September 2013</a></li> - <li><a href="#">August 2013</a></li> - <li><a href="#">July 2013</a></li> - <li><a href="#">June 2013</a></li> - <li><a href="#">May 2013</a></li> - <li><a href="#">April 2013</a></li> - </ol> - </div> - - <div class="p-4"> - <h4 class="font-italic">Elsewhere</h4> - <ol class="list-unstyled"> - <li><a href="#">GitHub</a></li> - <li><a href="#">Twitter</a></li> - <li><a href="#">Facebook</a></li> - </ol> - </div> - </aside><!-- /.blog-sidebar --> - - </div><!-- /.row --> - -</main><!-- /.container --> - -<footer class="blog-footer"> - <p>Blog template built for <a href="https://getbootstrap.com/">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p> - <p> - <a href="#">Back to top</a> - </p> -</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/form-validation.css b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/form-validation.css deleted file mode 100644 index 7a6246fae..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/form-validation.css +++ /dev/null @@ -1,5 +0,0 @@ -.container { - max-width: 960px; -} - -.lh-condensed { line-height: 1.25; } diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/form-validation.js b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/form-validation.js deleted file mode 100644 index 59291c8b3..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/form-validation.js +++ /dev/null @@ -1,21 +0,0 @@ -// Example starter JavaScript for disabling form submissions if there are invalid fields -(function () { - 'use strict' - - window.addEventListener('load', function () { - // Fetch all the forms we want to apply custom Bootstrap validation styles to - var forms = document.getElementsByClassName('needs-validation') - - // Loop over them and prevent submission - Array.prototype.filter.call(forms, function (form) { - form.addEventListener('submit', function (event) { - if (form.checkValidity() === false) { - event.preventDefault() - event.stopPropagation() - } - - form.classList.add('was-validated') - }, false) - }) - }, false) -})() diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/index.html deleted file mode 100644 index 353111883..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/checkout/index.html +++ /dev/null @@ -1,225 +0,0 @@ ---- -layout: examples -title: Checkout example -extra_css: - - "form-validation.css" -extra_js: - - "form-validation.js" -body_class: "bg-light" ---- - -<div class="container"> - <div class="py-5 text-center"> - <img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72"> - <h2>Checkout form</h2> - <p class="lead">Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.</p> - </div> - - <div class="row"> - <div class="col-md-4 order-md-2 mb-4"> - <h4 class="d-flex justify-content-between align-items-center mb-3"> - <span class="text-muted">Your cart</span> - <span class="badge badge-secondary badge-pill">3</span> - </h4> - <ul class="list-group mb-3"> - <li class="list-group-item d-flex justify-content-between lh-condensed"> - <div> - <h6 class="my-0">Product name</h6> - <small class="text-muted">Brief description</small> - </div> - <span class="text-muted">$12</span> - </li> - <li class="list-group-item d-flex justify-content-between lh-condensed"> - <div> - <h6 class="my-0">Second product</h6> - <small class="text-muted">Brief description</small> - </div> - <span class="text-muted">$8</span> - </li> - <li class="list-group-item d-flex justify-content-between lh-condensed"> - <div> - <h6 class="my-0">Third item</h6> - <small class="text-muted">Brief description</small> - </div> - <span class="text-muted">$5</span> - </li> - <li class="list-group-item d-flex justify-content-between bg-light"> - <div class="text-success"> - <h6 class="my-0">Promo code</h6> - <small>EXAMPLECODE</small> - </div> - <span class="text-success">-$5</span> - </li> - <li class="list-group-item d-flex justify-content-between"> - <span>Total (USD)</span> - <strong>$20</strong> - </li> - </ul> - - <form class="card p-2"> - <div class="input-group"> - <input type="text" class="form-control" placeholder="Promo code"> - <div class="input-group-append"> - <button type="submit" class="btn btn-secondary">Redeem</button> - </div> - </div> - </form> - </div> - <div class="col-md-8 order-md-1"> - <h4 class="mb-3">Billing address</h4> - <form class="needs-validation" novalidate> - <div class="row"> - <div class="col-md-6 mb-3"> - <label for="firstName">First name</label> - <input type="text" class="form-control" id="firstName" placeholder="" value="" required> - <div class="invalid-feedback"> - Valid first name is required. - </div> - </div> - <div class="col-md-6 mb-3"> - <label for="lastName">Last name</label> - <input type="text" class="form-control" id="lastName" placeholder="" value="" required> - <div class="invalid-feedback"> - Valid last name is required. - </div> - </div> - </div> - - <div class="mb-3"> - <label for="username">Username</label> - <div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text">@</span> - </div> - <input type="text" class="form-control" id="username" placeholder="Username" required> - <div class="invalid-feedback" style="width: 100%;"> - Your username is required. - </div> - </div> - </div> - - <div class="mb-3"> - <label for="email">Email <span class="text-muted">(Optional)</span></label> - <input type="email" class="form-control" id="email" placeholder="you@example.com"> - <div class="invalid-feedback"> - Please enter a valid email address for shipping updates. - </div> - </div> - - <div class="mb-3"> - <label for="address">Address</label> - <input type="text" class="form-control" id="address" placeholder="1234 Main St" required> - <div class="invalid-feedback"> - Please enter your shipping address. - </div> - </div> - - <div class="mb-3"> - <label for="address2">Address 2 <span class="text-muted">(Optional)</span></label> - <input type="text" class="form-control" id="address2" placeholder="Apartment or suite"> - </div> - - <div class="row"> - <div class="col-md-5 mb-3"> - <label for="country">Country</label> - <select class="custom-select d-block w-100" id="country" required> - <option value="">Choose...</option> - <option>United States</option> - </select> - <div class="invalid-feedback"> - Please select a valid country. - </div> - </div> - <div class="col-md-4 mb-3"> - <label for="state">State</label> - <select class="custom-select d-block w-100" id="state" required> - <option value="">Choose...</option> - <option>California</option> - </select> - <div class="invalid-feedback"> - Please provide a valid state. - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="zip">Zip</label> - <input type="text" class="form-control" id="zip" placeholder="" required> - <div class="invalid-feedback"> - Zip code required. - </div> - </div> - </div> - <hr class="mb-4"> - <div class="custom-control custom-checkbox"> - <input type="checkbox" class="custom-control-input" id="same-address"> - <label class="custom-control-label" for="same-address">Shipping address is the same as my billing address</label> - </div> - <div class="custom-control custom-checkbox"> - <input type="checkbox" class="custom-control-input" id="save-info"> - <label class="custom-control-label" for="save-info">Save this information for next time</label> - </div> - <hr class="mb-4"> - - <h4 class="mb-3">Payment</h4> - - <div class="d-block my-3"> - <div class="custom-control custom-radio"> - <input id="credit" name="paymentMethod" type="radio" class="custom-control-input" checked required> - <label class="custom-control-label" for="credit">Credit card</label> - </div> - <div class="custom-control custom-radio"> - <input id="debit" name="paymentMethod" type="radio" class="custom-control-input" required> - <label class="custom-control-label" for="debit">Debit card</label> - </div> - <div class="custom-control custom-radio"> - <input id="paypal" name="paymentMethod" type="radio" class="custom-control-input" required> - <label class="custom-control-label" for="paypal">PayPal</label> - </div> - </div> - <div class="row"> - <div class="col-md-6 mb-3"> - <label for="cc-name">Name on card</label> - <input type="text" class="form-control" id="cc-name" placeholder="" required> - <small class="text-muted">Full name as displayed on card</small> - <div class="invalid-feedback"> - Name on card is required - </div> - </div> - <div class="col-md-6 mb-3"> - <label for="cc-number">Credit card number</label> - <input type="text" class="form-control" id="cc-number" placeholder="" required> - <div class="invalid-feedback"> - Credit card number is required - </div> - </div> - </div> - <div class="row"> - <div class="col-md-3 mb-3"> - <label for="cc-expiration">Expiration</label> - <input type="text" class="form-control" id="cc-expiration" placeholder="" required> - <div class="invalid-feedback"> - Expiration date required - </div> - </div> - <div class="col-md-3 mb-3"> - <label for="cc-cvv">CVV</label> - <input type="text" class="form-control" id="cc-cvv" placeholder="" required> - <div class="invalid-feedback"> - Security code required - </div> - </div> - </div> - <hr class="mb-4"> - <button class="btn btn-primary btn-lg btn-block" type="submit">Continue to checkout</button> - </form> - </div> - </div> - - <footer class="my-5 pt-5 text-muted text-center text-small"> - <p class="mb-1">© 2017-{{< year >}} Company Name</p> - <ul class="list-inline"> - <li class="list-inline-item"><a href="#">Privacy</a></li> - <li class="list-inline-item"><a href="#">Terms</a></li> - <li class="list-inline-item"><a href="#">Support</a></li> - </ul> - </footer> -</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/cover/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/cover/index.html deleted file mode 100644 index 67d8e8538..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/cover/index.html +++ /dev/null @@ -1,35 +0,0 @@ ---- -layout: examples -title: Cover Template -extra_css: - - "cover.css" -body_class: "text-center" -include_js: false ---- - -<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column"> - <header class="masthead mb-auto"> - <div class="inner"> - <h3 class="masthead-brand">Cover</h3> - <nav class="nav nav-masthead justify-content-center"> - <a class="nav-link active" href="#">Home</a> - <a class="nav-link" href="#">Features</a> - <a class="nav-link" href="#">Contact</a> - </nav> - </div> - </header> - - <main role="main" class="inner cover"> - <h1 class="cover-heading">Cover your page.</h1> - <p class="lead">Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo to make it your own.</p> - <p class="lead"> - <a href="#" class="btn btn-lg btn-secondary">Learn more</a> - </p> - </main> - - <footer class="mastfoot mt-auto"> - <div class="inner"> - <p>Cover template for <a href="https://getbootstrap.com/">Bootstrap</a>, by <a href="https://twitter.com/mdo">@mdo</a>.</p> - </div> - </footer> -</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/floating-labels/floating-labels.css b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/floating-labels/floating-labels.css deleted file mode 100644 index e08144d81..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/floating-labels/floating-labels.css +++ /dev/null @@ -1,130 +0,0 @@ -html, -body { - height: 100%; -} - -body { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - padding-top: 40px; - padding-bottom: 40px; - background-color: #f5f5f5; -} - -.form-signin { - width: 100%; - max-width: 420px; - padding: 15px; - margin: auto; -} - -.form-label-group { - position: relative; - margin-bottom: 1rem; -} - -.form-label-group input, -.form-label-group label { - height: 3.125rem; - padding: .75rem; -} - -.form-label-group label { - position: absolute; - top: 0; - left: 0; - display: block; - width: 100%; - margin-bottom: 0; /* Override default `<label>` margin */ - line-height: 1.5; - color: #495057; - pointer-events: none; - cursor: text; /* Match the input under the label */ - border: 1px solid transparent; - border-radius: .25rem; - transition: all .1s ease-in-out; -} - -.form-label-group input::-webkit-input-placeholder { - color: transparent; -} - -.form-label-group input::-moz-placeholder { - color: transparent; -} - -.form-label-group input:-ms-input-placeholder { - color: transparent; -} - -.form-label-group input::-ms-input-placeholder { - color: transparent; -} - -.form-label-group input::placeholder { - color: transparent; -} - -.form-label-group input:not(:-moz-placeholder-shown) { - padding-top: 1.25rem; - padding-bottom: .25rem; -} - -.form-label-group input:not(:-ms-input-placeholder) { - padding-top: 1.25rem; - padding-bottom: .25rem; -} - -.form-label-group input:not(:placeholder-shown) { - padding-top: 1.25rem; - padding-bottom: .25rem; -} - -.form-label-group input:not(:-moz-placeholder-shown) ~ label { - padding-top: .25rem; - padding-bottom: .25rem; - font-size: 12px; - color: #777; -} - -.form-label-group input:not(:-ms-input-placeholder) ~ label { - padding-top: .25rem; - padding-bottom: .25rem; - font-size: 12px; - color: #777; -} - -.form-label-group input:not(:placeholder-shown) ~ label { - padding-top: .25rem; - padding-bottom: .25rem; - font-size: 12px; - color: #777; -} - -.form-label-group input:-webkit-autofill ~ label { - padding-top: .25rem; - padding-bottom: .25rem; - font-size: 12px; - color: #777; -} - -/* Fallback for Edge --------------------------------------------------- */ -@supports (-ms-ime-align: auto) { - .form-label-group { - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column-reverse; - flex-direction: column-reverse; - } - - .form-label-group label { - position: static; - } - - .form-label-group input::-ms-input-placeholder { - color: #777; - } -} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/floating-labels/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/floating-labels/index.html deleted file mode 100644 index 7e6201629..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/floating-labels/index.html +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: examples -title: Floating labels example -extra_css: - - "floating-labels.css" -include_js: false ---- - -<form class="form-signin"> - <div class="text-center mb-4"> - <img class="mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72"> - <h1 class="h3 mb-3 font-weight-normal">Floating labels</h1> - <p>Build form controls with floating labels via the <code>:placeholder-shown</code> pseudo-element. <a href="https://caniuse.com/css-placeholder-shown">Works in latest Chrome, Safari, Firefox, and IE 10/11 (prefixed).</a></p> - </div> - - <div class="form-label-group"> - <input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus> - <label for="inputEmail">Email address</label> - </div> - - <div class="form-label-group"> - <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> - <label for="inputPassword">Password</label> - </div> - - <div class="checkbox mb-3"> - <label> - <input type="checkbox" value="remember-me"> Remember me - </label> - </div> - <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> - <p class="mt-5 mb-3 text-muted text-center">© 2017-{{< year >}}</p> -</form> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/grid/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/grid/index.html deleted file mode 100644 index 1440cb734..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/grid/index.html +++ /dev/null @@ -1,139 +0,0 @@ ---- -layout: examples -title: Grid Template -extra_css: - - "grid.css" -body_class: "py-4" -include_js: false ---- - -<div class="container"> - - <h1>Bootstrap grid examples</h1> - <p class="lead">Basic grid layouts to get you familiar with building within the Bootstrap grid system.</p> - <p>In these examples the <code>.themed-grid-col</code> class is added to the columns to add some theming. This is not a class that is available in Bootstrap by default.</p> - - <h2 class="mt-4">Five grid tiers</h2> - <p>There are five tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.</p> - - <div class="row mb-3"> - <div class="col-4 themed-grid-col">.col-4</div> - <div class="col-4 themed-grid-col">.col-4</div> - <div class="col-4 themed-grid-col">.col-4</div> - </div> - - <div class="row mb-3"> - <div class="col-sm-4 themed-grid-col">.col-sm-4</div> - <div class="col-sm-4 themed-grid-col">.col-sm-4</div> - <div class="col-sm-4 themed-grid-col">.col-sm-4</div> - </div> - - <div class="row mb-3"> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - </div> - - <div class="row mb-3"> - <div class="col-lg-4 themed-grid-col">.col-lg-4</div> - <div class="col-lg-4 themed-grid-col">.col-lg-4</div> - <div class="col-lg-4 themed-grid-col">.col-lg-4</div> - </div> - - <div class="row mb-3"> - <div class="col-xl-4 themed-grid-col">.col-xl-4</div> - <div class="col-xl-4 themed-grid-col">.col-xl-4</div> - <div class="col-xl-4 themed-grid-col">.col-xl-4</div> - </div> - - <h2 class="mt-4">Three equal columns</h2> - <p>Get three equal-width columns <strong>starting at desktops and scaling to large desktops</strong>. On mobile devices, tablets and below, the columns will automatically stack.</p> - <div class="row mb-3"> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - </div> - - <h2 class="mt-4">Three unequal columns</h2> - <p>Get three columns <strong>starting at desktops and scaling to large desktops</strong> of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.</p> - <div class="row mb-3"> - <div class="col-md-3 themed-grid-col">.col-md-3</div> - <div class="col-md-6 themed-grid-col">.col-md-6</div> - <div class="col-md-3 themed-grid-col">.col-md-3</div> - </div> - - <h2 class="mt-4">Two columns</h2> - <p>Get two columns <strong>starting at desktops and scaling to large desktops</strong>.</p> - <div class="row mb-3"> - <div class="col-md-8 themed-grid-col">.col-md-8</div> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - </div> - - <h2 class="mt-4">Full width, single column</h2> - <p class="text-warning"> - No grid classes are necessary for full-width elements. - </p> - - <hr class="my-4"> - - <h2 class="mt-4">Two columns with two nested columns</h2> - <p>Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns <strong>starting at desktops and scaling to large desktops</strong>, with another two (equal widths) within the larger column.</p> - <p>At mobile device sizes, tablets and down, these columns and their nested columns will stack.</p> - <div class="row mb-3"> - <div class="col-md-8 themed-grid-col"> - <div class="pb-3"> - .col-md-8 - </div> - <div class="row"> - <div class="col-md-6 themed-grid-col">.col-md-6</div> - <div class="col-md-6 themed-grid-col">.col-md-6</div> - </div> - </div> - <div class="col-md-4 themed-grid-col">.col-md-4</div> - </div> - - <hr class="my-4"> - - <h2 class="mt-4">Mixed: mobile and desktop</h2> - <p>The Bootstrap v4 grid system has five tiers of classes: xs (extra small, this class infix is not used), sm (small), md (medium), lg (large), and xl (extra large). You can use nearly any combination of these classes to create more dynamic and flexible layouts.</p> - <p>Each tier of classes scales up, meaning if you plan on setting the same widths for md, lg and xl, you only need to specify md.</p> - <div class="row mb-3"> - <div class="col-md-8 themed-grid-col">.col-md-8</div> - <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> - </div> - <div class="row mb-3"> - <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> - <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> - <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> - </div> - <div class="row mb-3"> - <div class="col-6 themed-grid-col">.col-6</div> - <div class="col-6 themed-grid-col">.col-6</div> - </div> - - <hr class="my-4"> - - <h2 class="mt-4">Mixed: mobile, tablet, and desktop</h2> - <div class="row mb-3"> - <div class="col-sm-6 col-lg-8 themed-grid-col">.col-sm-6 .col-lg-8</div> - <div class="col-6 col-lg-4 themed-grid-col">.col-6 .col-lg-4</div> - </div> - <div class="row mb-3"> - <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> - <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> - <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> - </div> - -</div> - -<div class="container" id="containers"> - <h2 class="mt-4">Containers</h2> - <p>Additional classes added in Bootstrap v4.4 allow containers that are 100% wide until a particular breakpoint.</p> -</div> - -<div class="container themed-container">.container</div> -<div class="container-sm themed-container">.container-sm</div> -<div class="container-md themed-container">.container-md</div> -<div class="container-lg themed-container">.container-lg</div> -<div class="container-xl themed-container">.container-xl</div> -<div class="container-fluid themed-container">.container-fluid</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/jumbotron/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/jumbotron/index.html deleted file mode 100644 index ff311a5a4..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/jumbotron/index.html +++ /dev/null @@ -1,80 +0,0 @@ ---- -layout: examples -title: Jumbotron Template -extra_css: - - "jumbotron.css" ---- - -<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExampleDefault"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown01"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> - -<main role="main"> - - <!-- Main jumbotron for a primary marketing message or call to action --> - <div class="jumbotron"> - <div class="container"> - <h1 class="display-3">Hello, world!</h1> - <p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p> - <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more »</a></p> - </div> - </div> - - <div class="container"> - <!-- Example row of columns --> - <div class="row"> - <div class="col-md-4"> - <h2>Heading</h2> - <p>Will you do the same for me? It's time to face the music I'm no longer your muse. Heard it's beautiful, be the judge and my girls gonna take a vote. I can feel a phoenix inside of me. Heaven is jealous of our love, angels are crying from up above. Yeah, you take me to utopia.</p> - <p><a class="btn btn-secondary" href="#" role="button">View details »</a></p> - </div> - <div class="col-md-4"> - <h2>Heading</h2> - <p>Standing on the frontline when the bombs start to fall. Heaven is jealous of our love, angels are crying from up above. Can't replace you with a million rings. Boy, when you're with me I'll give you a taste. There’s no going back. Before you met me I was alright but things were kinda heavy. Heavy is the head that wears the crown.</p> - <p><a class="btn btn-secondary" href="#" role="button">View details »</a></p> - </div> - <div class="col-md-4"> - <h2>Heading</h2> - <p>Playing ping pong all night long, everything's all neon and hazy. Yeah, she's so in demand. She's sweet as pie but if you break her heart. But down to earth. It's time to face the music I'm no longer your muse. I guess that I forgot I had a choice.</p> - <p><a class="btn btn-secondary" href="#" role="button">View details »</a></p> - </div> - </div> - - <hr> - - </div> <!-- /container --> - -</main> - -<footer class="container"> - <p>© Company 2017-{{< year >}}</p> -</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/jumbotron/jumbotron.css b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/jumbotron/jumbotron.css deleted file mode 100644 index d751264ef..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/jumbotron/jumbotron.css +++ /dev/null @@ -1,4 +0,0 @@ -/* Move down content because we have a fixed navbar that is 3.5rem tall */ -body { - padding-top: 3.5rem; -} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-bottom/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-bottom/index.html deleted file mode 100644 index 8364303ea..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-bottom/index.html +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: examples -title: Bottom navbar example ---- - -<div class="container"> - <div class="jumbotron mt-3"> - <h1>Bottom Navbar example</h1> - <p class="lead">This example is a quick exercise to illustrate how the bottom navbar works.</p> - <a class="btn btn-lg btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> - </div> -</div> -<nav class="navbar fixed-bottom navbar-expand-sm navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Bottom navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarCollapse"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropup"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown10" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropup</a> - <div class="dropdown-menu" aria-labelledby="dropdown10"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - </div> -</nav> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-fixed/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-fixed/index.html deleted file mode 100644 index 2ab51e348..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-fixed/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: examples -title: Fixed top navbar example -extra_css: - - "navbar-top-fixed.css" ---- - -<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> - <a class="navbar-brand" href="#">Fixed navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarCollapse"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline mt-2 mt-md-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> - -<main role="main" class="container"> - <div class="jumbotron"> - <h1>Navbar example</h1> - <p class="lead">This example is a quick exercise to illustrate how fixed to top navbar works. As you scroll, it will remain fixed to the top of your browser’s viewport.</p> - <a class="btn btn-lg btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> - </div> -</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-static/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-static/index.html deleted file mode 100644 index f0ee429a7..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-static/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: examples -title: Top navbar example -extra_css: - - "navbar-top.css" ---- - -<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4"> - <a class="navbar-brand" href="#">Top navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarCollapse"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline mt-2 mt-md-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> - -<main role="main" class="container"> - <div class="jumbotron"> - <h1>Navbar example</h1> - <p class="lead">This example is a quick exercise to illustrate how the top-aligned navbar works. As you scroll, this navbar remains in its original position and moves with the rest of the page.</p> - <a class="btn btn-lg btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> - </div> -</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbars/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbars/index.html deleted file mode 100644 index db84f1468..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbars/index.html +++ /dev/null @@ -1,362 +0,0 @@ ---- -layout: examples -title: Navbar Template -extra_css: - - "navbar.css" ---- - -<nav class="navbar navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Never expand</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample01" aria-controls="navbarsExample01" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample01"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown01"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search" aria-label="Search"> - </form> - </div> -</nav> - -<nav class="navbar navbar-expand navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Always expand</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample02" aria-controls="navbarsExample02" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample02"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search"> - </form> - </div> -</nav> - -<nav class="navbar navbar-expand-sm navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Expand at sm</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample03" aria-controls="navbarsExample03" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample03"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown03" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown03"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search"> - </form> - </div> -</nav> - -<nav class="navbar navbar-expand-md navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Expand at md</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample04" aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample04"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown04" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown04"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search"> - </form> - </div> -</nav> - -<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Expand at lg</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample05" aria-controls="navbarsExample05" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample05"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown05" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown05"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search"> - </form> - </div> -</nav> - -<nav class="navbar navbar-expand-xl navbar-dark bg-dark"> - <a class="navbar-brand" href="#">Expand at xl</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample06" aria-controls="navbarsExample06" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample06"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown06" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown06"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search"> - </form> - </div> -</nav> - -<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> - <div class="container"> - <a class="navbar-brand" href="#">Container</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07" aria-controls="navbarsExample07" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample07"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown07" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown07"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search" aria-label="Search"> - </form> - </div> - </div> -</nav> - -<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> - <div class="container-xl"> - <a class="navbar-brand" href="#">Container XL</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07XL" aria-controls="navbarsExample07XL" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample07XL"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown07XL" data-toggle="dropdown" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown07XL"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search" aria-label="Search"> - </form> - </div> - </div> -</nav> - -<div class="container-xl mt-n2 mb-3"> - Matching .container-xl... -</div> - -<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample08" aria-controls="navbarsExample08" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample08"> - <ul class="navbar-nav"> - <li class="nav-item active"> - <a class="nav-link" href="#">Centered nav only <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown08" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown08"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - </div> -</nav> - -<div class="container"> - <nav class="navbar navbar-expand-lg navbar-light bg-light rounded"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample09" aria-controls="navbarsExample09" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExample09"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown09" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown09"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-md-0"> - <input class="form-control" type="text" placeholder="Search" aria-label="Search"> - </form> - </div> - </nav> - - <nav class="navbar navbar-expand-lg navbar-light bg-light rounded"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample10" aria-controls="navbarsExample10" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample10"> - <ul class="navbar-nav"> - <li class="nav-item active"> - <a class="nav-link" href="#">Centered nav only <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown10" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown10"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - </div> - </nav> - - <main role="main"> - <div class="jumbotron"> - <div class="col-sm-8 mx-auto"> - <h1>Navbar examples</h1> - <p>This example is a quick exercise to illustrate how the navbar and its contents work. Some navbars extend the width of the viewport, others are confined within a <code>.container</code>. For positioning of navbars, checkout the <a href="{{< docsref "/examples/navbar-static" >}}">top</a> and <a href="{{< docsref "/examples/navbar-fixed" >}}">fixed top</a> examples.</p> - <p>At the smallest breakpoint, the collapse plugin is used to hide the links and show a menu button to toggle the collapsed content.</p> - <p> - <a class="btn btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> - </p> - </div> - </div> - </main> -</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/index.html deleted file mode 100644 index e90e429e7..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/index.html +++ /dev/null @@ -1,137 +0,0 @@ ---- -layout: examples -title: Offcanvas template -extra_css: - - "offcanvas.css" -extra_js: - - "offcanvas.js" -body_class: "bg-light" ---- - -<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark"> - <a class="navbar-brand mr-auto mr-lg-0" href="#">Offcanvas navbar</a> - <button class="navbar-toggler p-0 border-0" type="button" data-toggle="offcanvas"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="navbar-collapse offcanvas-collapse" id="navbarsExampleDefault"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Dashboard <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Notifications</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Profile</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Switch account</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Settings</a> - <div class="dropdown-menu" aria-labelledby="dropdown01"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> - -<div class="nav-scroller bg-white shadow-sm"> - <nav class="nav nav-underline"> - <a class="nav-link active" href="#">Dashboard</a> - <a class="nav-link" href="#"> - Friends - <span class="badge badge-pill bg-light align-text-bottom">27</span> - </a> - <a class="nav-link" href="#">Explore</a> - <a class="nav-link" href="#">Suggestions</a> - <a class="nav-link" href="#">Link</a> - <a class="nav-link" href="#">Link</a> - <a class="nav-link" href="#">Link</a> - <a class="nav-link" href="#">Link</a> - <a class="nav-link" href="#">Link</a> - </nav> -</div> - -<main role="main" class="container"> - <div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded shadow-sm"> - <img class="mr-3" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-outline.svg" alt="" width="48" height="48"> - <div class="lh-100"> - <h6 class="mb-0 text-white lh-100">Bootstrap</h6> - <small>Since 2011</small> - </div> - </div> - - <div class="my-3 p-3 bg-white rounded shadow-sm"> - <h6 class="border-bottom border-gray pb-2 mb-0">Recent updates</h6> - <div class="media text-muted pt-3"> - {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}} - <p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray"> - <strong class="d-block text-gray-dark">@username</strong> - Playing ping pong all night long, everything's all neon and hazy. Yeah, she's so in demand. She's sweet as pie but if you break her heart. But down to earth. It's time to face the music I'm no longer your muse. I guess that I forgot I had a choice. - </p> - </div> - <div class="media text-muted pt-3"> - {{< placeholder width="32" height="32" background="#e83e8c" color="#e83e8c" class="mr-2 rounded" >}} - <p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray"> - <strong class="d-block text-gray-dark">@username</strong> - Standing on the frontline when the bombs start to fall. Heaven is jealous of our love, angels are crying from up above. Can't replace you with a million rings. Boy, when you're with me I'll give you a taste. There’s no going back. Before you met me I was alright but things were kinda heavy. Heavy is the head that wears the crown. - </p> - </div> - <div class="media text-muted pt-3"> - {{< placeholder width="32" height="32" background="#6f42c1" color="#6f42c1" class="mr-2 rounded" >}} - <p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray"> - <strong class="d-block text-gray-dark">@username</strong> - Will you do the same for me? It's time to face the music I'm no longer your muse. Heard it's beautiful, be the judge and my girls gonna take a vote. I can feel a phoenix inside of me. Heaven is jealous of our love, angels are crying from up above. Yeah, you take me to utopia. - </p> - </div> - <small class="d-block text-right mt-3"> - <a href="#">All updates</a> - </small> - </div> - - <div class="my-3 p-3 bg-white rounded shadow-sm"> - <h6 class="border-bottom border-gray pb-2 mb-0">Suggestions</h6> - <div class="media text-muted pt-3"> - {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}} - <div class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray"> - <div class="d-flex justify-content-between align-items-center w-100"> - <strong class="text-gray-dark">Full Name</strong> - <a href="#">Follow</a> - </div> - <span class="d-block">@username</span> - </div> - </div> - <div class="media text-muted pt-3"> - {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}} - <div class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray"> - <div class="d-flex justify-content-between align-items-center w-100"> - <strong class="text-gray-dark">Full Name</strong> - <a href="#">Follow</a> - </div> - <span class="d-block">@username</span> - </div> - </div> - <div class="media text-muted pt-3"> - {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="mr-2 rounded" >}} - <div class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray"> - <div class="d-flex justify-content-between align-items-center w-100"> - <strong class="text-gray-dark">Full Name</strong> - <a href="#">Follow</a> - </div> - <span class="d-block">@username</span> - </div> - </div> - <small class="d-block text-right mt-3"> - <a href="#">All suggestions</a> - </small> - </div> -</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/offcanvas.js b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/offcanvas.js deleted file mode 100644 index bc3e46711..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/offcanvas.js +++ /dev/null @@ -1,7 +0,0 @@ -$(function () { - 'use strict' - - $('[data-toggle="offcanvas"]').on('click', function () { - $('.offcanvas-collapse').toggleClass('open') - }) -}) diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/pricing/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/pricing/index.html deleted file mode 100644 index 5cd295a80..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/pricing/index.html +++ /dev/null @@ -1,111 +0,0 @@ ---- -layout: examples -title: Pricing example -extra_css: - - "pricing.css" -include_js: false ---- - -<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm"> - <h5 class="my-0 mr-md-auto font-weight-normal">Company name</h5> - <nav class="my-2 my-md-0 mr-md-3"> - <a class="p-2 text-dark" href="#">Features</a> - <a class="p-2 text-dark" href="#">Enterprise</a> - <a class="p-2 text-dark" href="#">Support</a> - <a class="p-2 text-dark" href="#">Pricing</a> - </nav> - <a class="btn btn-outline-primary" href="#">Sign up</a> -</div> - -<div class="pricing-header px-3 py-3 pt-md-5 pb-md-4 mx-auto text-center"> - <h1 class="display-4">Pricing</h1> - <p class="lead">Quickly build an effective pricing table for your potential customers with this Bootstrap example. It’s built with default Bootstrap components and utilities with little customization.</p> -</div> - -<div class="container"> - <div class="card-deck mb-3 text-center"> - <div class="card mb-4 shadow-sm"> - <div class="card-header"> - <h4 class="my-0 font-weight-normal">Free</h4> - </div> - <div class="card-body"> - <h1 class="card-title pricing-card-title">$0 <small class="text-muted">/ mo</small></h1> - <ul class="list-unstyled mt-3 mb-4"> - <li>10 users included</li> - <li>2 GB of storage</li> - <li>Email support</li> - <li>Help center access</li> - </ul> - <button type="button" class="btn btn-lg btn-block btn-outline-primary">Sign up for free</button> - </div> - </div> - <div class="card mb-4 shadow-sm"> - <div class="card-header"> - <h4 class="my-0 font-weight-normal">Pro</h4> - </div> - <div class="card-body"> - <h1 class="card-title pricing-card-title">$15 <small class="text-muted">/ mo</small></h1> - <ul class="list-unstyled mt-3 mb-4"> - <li>20 users included</li> - <li>10 GB of storage</li> - <li>Priority email support</li> - <li>Help center access</li> - </ul> - <button type="button" class="btn btn-lg btn-block btn-primary">Get started</button> - </div> - </div> - <div class="card mb-4 shadow-sm"> - <div class="card-header"> - <h4 class="my-0 font-weight-normal">Enterprise</h4> - </div> - <div class="card-body"> - <h1 class="card-title pricing-card-title">$29 <small class="text-muted">/ mo</small></h1> - <ul class="list-unstyled mt-3 mb-4"> - <li>30 users included</li> - <li>15 GB of storage</li> - <li>Phone and email support</li> - <li>Help center access</li> - </ul> - <button type="button" class="btn btn-lg btn-block btn-primary">Contact us</button> - </div> - </div> - </div> - - <footer class="pt-4 my-md-5 pt-md-5 border-top"> - <div class="row"> - <div class="col-12 col-md"> - <img class="mb-2" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="24" height="24"> - <small class="d-block mb-3 text-muted">© 2017-{{< year >}}</small> - </div> - <div class="col-6 col-md"> - <h5>Features</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Cool stuff</a></li> - <li><a class="text-muted" href="#">Random feature</a></li> - <li><a class="text-muted" href="#">Team feature</a></li> - <li><a class="text-muted" href="#">Stuff for developers</a></li> - <li><a class="text-muted" href="#">Another one</a></li> - <li><a class="text-muted" href="#">Last time</a></li> - </ul> - </div> - <div class="col-6 col-md"> - <h5>Resources</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Resource</a></li> - <li><a class="text-muted" href="#">Resource name</a></li> - <li><a class="text-muted" href="#">Another resource</a></li> - <li><a class="text-muted" href="#">Final resource</a></li> - </ul> - </div> - <div class="col-6 col-md"> - <h5>About</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Team</a></li> - <li><a class="text-muted" href="#">Locations</a></li> - <li><a class="text-muted" href="#">Privacy</a></li> - <li><a class="text-muted" href="#">Terms</a></li> - </ul> - </div> - </div> - </footer> -</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/pricing/pricing.css b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/pricing/pricing.css deleted file mode 100644 index cbf0ec013..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/pricing/pricing.css +++ /dev/null @@ -1,20 +0,0 @@ -html { - font-size: 14px; -} -@media (min-width: 768px) { - html { - font-size: 16px; - } -} - -.container { - max-width: 960px; -} - -.pricing-header { - max-width: 700px; -} - -.card-deck .card { - min-width: 220px; -} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/product/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/product/index.html deleted file mode 100644 index 53aff6621..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/product/index.html +++ /dev/null @@ -1,146 +0,0 @@ ---- -layout: examples -title: Product example -extra_css: - - "product.css" ---- - -<nav class="site-header sticky-top py-1"> - <div class="container d-flex flex-column flex-md-row justify-content-between"> - <a class="py-2" href="#" aria-label="Product"> - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="d-block mx-auto" role="img" viewBox="0 0 24 24" focusable="false"><title>Product</title><circle cx="12" cy="12" r="10"/><path d="M14.31 8l5.74 9.94M9.69 8h11.48M7.38 12l5.74-9.94M9.69 16L3.95 6.06M14.31 16H2.83m13.79-4l-5.74 9.94"/></svg> - </a> - <a class="py-2 d-none d-md-inline-block" href="#">Tour</a> - <a class="py-2 d-none d-md-inline-block" href="#">Product</a> - <a class="py-2 d-none d-md-inline-block" href="#">Features</a> - <a class="py-2 d-none d-md-inline-block" href="#">Enterprise</a> - <a class="py-2 d-none d-md-inline-block" href="#">Support</a> - <a class="py-2 d-none d-md-inline-block" href="#">Pricing</a> - <a class="py-2 d-none d-md-inline-block" href="#">Cart</a> - </div> -</nav> - -<div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light"> - <div class="col-md-5 p-lg-5 mx-auto my-5"> - <h1 class="display-4 font-weight-normal">Punny headline</h1> - <p class="lead font-weight-normal">And an even wittier subheading to boot. Jumpstart your marketing efforts with this example based on Apple’s marketing pages.</p> - <a class="btn btn-outline-secondary" href="#">Coming soon</a> - </div> - <div class="product-device shadow-sm d-none d-md-block"></div> - <div class="product-device product-device-2 shadow-sm d-none d-md-block"></div> -</div> - -<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3"> - <div class="bg-dark mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> - <div class="my-3 py-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-light shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> - <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> - <div class="my-3 p-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> -</div> - -<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3"> - <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> - <div class="my-3 p-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> - <div class="bg-primary mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> - <div class="my-3 py-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-light shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> -</div> - -<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3"> - <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> - <div class="my-3 p-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-white shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> - <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> - <div class="my-3 py-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-white shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> -</div> - -<div class="d-md-flex flex-md-equal w-100 my-md-3 pl-md-3"> - <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> - <div class="my-3 p-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-white shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> - <div class="bg-light mr-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> - <div class="my-3 py-3"> - <h2 class="display-5">Another headline</h2> - <p class="lead">And an even wittier subheading.</p> - </div> - <div class="bg-white shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> - </div> -</div> - -<footer class="container py-5"> - <div class="row"> - <div class="col-12 col-md"> - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="d-block mb-2" role="img" viewBox="0 0 24 24" focusable="false"><title>Product</title><circle cx="12" cy="12" r="10"/><path d="M14.31 8l5.74 9.94M9.69 8h11.48M7.38 12l5.74-9.94M9.69 16L3.95 6.06M14.31 16H2.83m13.79-4l-5.74 9.94"/></svg> - <small class="d-block mb-3 text-muted">© 2017-{{< year >}}</small> - </div> - <div class="col-6 col-md"> - <h5>Features</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Cool stuff</a></li> - <li><a class="text-muted" href="#">Random feature</a></li> - <li><a class="text-muted" href="#">Team feature</a></li> - <li><a class="text-muted" href="#">Stuff for developers</a></li> - <li><a class="text-muted" href="#">Another one</a></li> - <li><a class="text-muted" href="#">Last time</a></li> - </ul> - </div> - <div class="col-6 col-md"> - <h5>Resources</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Resource</a></li> - <li><a class="text-muted" href="#">Resource name</a></li> - <li><a class="text-muted" href="#">Another resource</a></li> - <li><a class="text-muted" href="#">Final resource</a></li> - </ul> - </div> - <div class="col-6 col-md"> - <h5>Resources</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Business</a></li> - <li><a class="text-muted" href="#">Education</a></li> - <li><a class="text-muted" href="#">Government</a></li> - <li><a class="text-muted" href="#">Gaming</a></li> - </ul> - </div> - <div class="col-6 col-md"> - <h5>About</h5> - <ul class="list-unstyled text-small"> - <li><a class="text-muted" href="#">Team</a></li> - <li><a class="text-muted" href="#">Locations</a></li> - <li><a class="text-muted" href="#">Privacy</a></li> - <li><a class="text-muted" href="#">Terms</a></li> - </ul> - </div> - </div> -</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sign-in/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sign-in/index.html deleted file mode 100644 index c49ad12b0..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sign-in/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: examples -title: Signin Template -extra_css: - - "signin.css" -body_class: "text-center" -include_js: false ---- - -<form class="form-signin"> - <img class="mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72"> - <h1 class="h3 mb-3 font-weight-normal">Please sign in</h1> - <label for="inputEmail" class="sr-only">Email address</label> - <input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus> - <label for="inputPassword" class="sr-only">Password</label> - <input type="password" id="inputPassword" class="form-control" placeholder="Password" required> - <div class="checkbox mb-3"> - <label> - <input type="checkbox" value="remember-me"> Remember me - </label> - </div> - <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> - <p class="mt-5 mb-3 text-muted">© 2017-{{< year >}}</p> -</form> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/starter-template/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/starter-template/index.html deleted file mode 100644 index 568891437..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/starter-template/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: examples -title: Starter Template -extra_css: - - "starter-template.css" ---- - -<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> - <a class="navbar-brand" href="#">Navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - - <div class="collapse navbar-collapse" id="navbarsExampleDefault"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown01"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> - </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button> - </form> - </div> -</nav> - -<main role="main" class="container"> - - <div class="starter-template"> - <h1>Bootstrap starter template</h1> - <p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p> - </div> - -</main><!-- /.container --> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/starter-template/starter-template.css b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/starter-template/starter-template.css deleted file mode 100644 index 5f64cd294..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/starter-template/starter-template.css +++ /dev/null @@ -1,7 +0,0 @@ -body { - padding-top: 5rem; -} -.starter-template { - padding: 3rem 1.5rem; - text-align: center; -} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer-navbar/index.html b/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer-navbar/index.html deleted file mode 100644 index 2d412a587..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer-navbar/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: examples -title: Sticky Footer Navbar Template -extra_css: - - "sticky-footer-navbar.css" -html_class: "h-100" -body_class: "d-flex flex-column h-100" ---- - -<header> - <!-- Fixed navbar --> - <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> - <a class="navbar-brand" href="#">Fixed navbar</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarCollapse"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline mt-2 mt-md-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> - </div> - </nav> -</header> - -<!-- Begin page content --> -<main role="main" class="flex-shrink-0"> - <div class="container"> - <h1 class="mt-5">Sticky footer with fixed navbar</h1> - <p class="lead">Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>main > .container</code>.</p> - <p>Back to <a href="{{< docsref "/examples/sticky-footer" >}}">the default sticky footer</a> minus the navbar.</p> - </div> -</main> - -<footer class="footer mt-auto py-3"> - <div class="container"> - <span class="text-muted">Place sticky footer content here.</span> - </div> -</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/accessibility.md b/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/accessibility.md deleted file mode 100644 index e8fe84126..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/accessibility.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: docs -title: Accessibility -description: A brief overview of Bootstrap's features and limitations for the creation of accessible content. -group: getting-started -toc: true ---- - -Bootstrap provides an easy-to-use framework of ready-made styles, layout tools, and interactive components, allowing developers to create websites and applications that are visually appealing, functionally rich, and accessible out of the box. - -## Overview and Limitations - -The overall accessibility of any project built with Bootstrap depends in large part on the author's markup, additional styling, and scripting they've included. However, provided that these have been implemented correctly, it should be perfectly possible to create websites and applications with Bootstrap that fulfill [<abbr title="Web Content Accessibility Guidelines">WCAG</abbr> 2.0](https://www.w3.org/TR/WCAG20/) (A/AA/AAA), [Section 508](https://www.section508.gov/) and similar accessibility standards and requirements. - -### Structural markup - -Bootstrap's styling and layout can be applied to a wide range of markup structures. This documentation aims to provide developers with best practice examples to demonstrate the use of Bootstrap itself and illustrate appropriate semantic markup, including ways in which potential accessibility concerns can be addressed. - -### Interactive components - -Bootstrap's interactive components—such as modal dialogs, dropdown menus and custom tooltips—are designed to work for touch, mouse and keyboard users. Through the use of relevant [<abbr title="Web Accessibility Initiative">WAI</abbr>-<abbr title="Accessible Rich Internet Applications">ARIA</abbr>](https://www.w3.org/WAI/standards-guidelines/aria/) roles and attributes, these components should also be understandable and operable using assistive technologies (such as screen readers). - -Because Bootstrap's components are purposely designed to be fairly generic, authors may need to include further <abbr title="Accessible Rich Internet Applications">ARIA</abbr> roles and attributes, as well as JavaScript behavior, to more accurately convey the precise nature and functionality of their component. This is usually noted in the documentation. - -### Color contrast - -Most colors that currently make up Bootstrap's default palette—used throughout the framework for things such as button variations, alert variations, form validation indicators—lead to *insufficient* color contrast (below the recommended [WCAG 2.0 color contrast ratio of 4.5:1](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html)) when used against a light background. Authors will need to manually modify/extend these default colors to ensure adequate color contrast ratios. - -### Visually hidden content - -Content which should be visually hidden, but remain accessible to assistive technologies such as screen readers, can be styled using the `.sr-only` class. This can be useful in situations where additional visual information or cues (such as meaning denoted through the use of color) need to also be conveyed to non-visual users. - -```html -<p class="text-danger"> - <span class="sr-only">Danger: </span> - This action is not reversible -</p> -``` - -For visually hidden interactive controls, such as traditional "skip" links, `.sr-only` can be combined with the `.sr-only-focusable` class. This will ensure that the control becomes visible once focused (for sighted keyboard users). - -```html -<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a> -``` - -### Reduced motion - -Bootstrap includes support for the [`prefers-reduced-motion` media feature](https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion). In browsers/environments that allow the user to specify their preference for reduced motion, most CSS transition effects in Bootstrap (for instance, when a modal dialog is opened or closed, or the sliding animation in carousels) will be disabled, and meaningful animations (such as spinners) will be slowed down. - -## Additional resources - -- [Web Content Accessibility Guidelines (WCAG) 2.0](https://www.w3.org/TR/WCAG20/) -- [The A11Y Project](https://www.a11yproject.com/) -- [MDN accessibility documentation](https://developer.mozilla.org/en-US/docs/Web/Accessibility) -- [Tenon.io Accessibility Checker](https://tenon.io/) -- [Colour Contrast Analyser (CCA)](https://developer.paciellogroup.com/resources/contrastanalyser/) -- ["HTML Codesniffer" bookmarklet for identifying accessibility issues](https://github.com/squizlabs/HTML_CodeSniffer) diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/browsers-devices.md b/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/browsers-devices.md deleted file mode 100644 index e6cdd8fe2..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/browsers-devices.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -layout: docs -title: Browsers and devices -description: Learn about the browsers and devices, from modern to old, that are supported by Bootstrap, including known quirks and bugs for each. -group: getting-started -toc: true ---- - -## Supported browsers - -Bootstrap supports the **latest, stable releases** of all major browsers and platforms. On Windows, **we support Internet Explorer 10-11 / Microsoft Edge**. - -Alternative browsers which use the latest version of WebKit, Blink, or Gecko, whether directly or via the platform's web view API, are not explicitly supported. However, Bootstrap should (in most cases) display and function correctly in these browsers as well. More specific support information is provided below. - -You can find our supported range of browsers and their versions [in our `.browserslistrc file`]({{< param repo >}}/blob/v{{< param current_version >}}/.browserslistrc): - -```text -{{< rf.inline >}} -{{- readFile ".browserslistrc" | chomp | htmlEscape -}} -{{< /rf.inline >}} -``` - -We use [Autoprefixer](https://github.com/postcss/autoprefixer) to handle intended browser support via CSS prefixes, which uses [Browserslist](https://github.com/browserslist/browserslist) to manage these browser versions. Consult their documentation for how to integrate these tools into your projects. - -### Mobile devices - -Generally speaking, Bootstrap supports the latest versions of each major platform's default browsers. Note that proxy browsers (such as Opera Mini, Opera Mobile's Turbo mode, UC Browser Mini, Amazon Silk) are not supported. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <td></td> - <th>Chrome</th> - <th>Firefox</th> - <th>Safari</th> - <th>Android Browser & WebView</th> - <th>Microsoft Edge</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">Android</th> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-muted">N/A</td> - <td class="text-success">Android v5.0+ supported</td> - <td class="text-success">Supported</td> - </tr> - <tr> - <th scope="row">iOS</th> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-muted">N/A</td> - <td class="text-success">Supported</td> - </tr> - <tr> - <th scope="row">Windows 10 Mobile</th> - <td class="text-muted">N/A</td> - <td class="text-muted">N/A</td> - <td class="text-muted">N/A</td> - <td class="text-muted">N/A</td> - <td class="text-success">Supported</td> - </tr> - </tbody> -</table> - -### Desktop browsers - -Similarly, the latest versions of most desktop browsers are supported. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <td></td> - <th>Chrome</th> - <th>Firefox</th> - <th>Internet Explorer</th> - <th>Microsoft Edge</th> - <th>Opera</th> - <th>Safari</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row">Mac</th> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-muted">N/A</td> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - </tr> - <tr> - <th scope="row">Windows</th> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-success">Supported, IE10+</td> - <td class="text-success">Supported</td> - <td class="text-success">Supported</td> - <td class="text-danger">Not supported</td> - </tr> - </tbody> -</table> - -For Firefox, in addition to the latest normal stable release, we also support the latest [Extended Support Release (ESR)](https://www.mozilla.org/en-US/firefox/enterprise/) version of Firefox. - -Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 9, though they are not officially supported. - -For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs]({{< docsref "/browser-bugs" >}}). - -## Internet Explorer - -Internet Explorer 10+ is supported; IE9 and down is not. Please be aware that some CSS3 properties and HTML5 elements are not fully supported in IE10, or require prefixed properties for full functionality. Visit [Can I use...](https://caniuse.com/) for details on browser support of CSS3 and HTML5 features. **If you require IE8-9 support, use Bootstrap 3.** - -## Modals and dropdowns on mobile - -### Overflow and scrolling - -Support for `overflow: hidden;` on the `<body>` element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the `<body>` content will begin to scroll. See [Chrome bug #175502](https://bugs.chromium.org/p/chromium/issues/detail?id=175502) (fixed in Chrome v40) and [WebKit bug #153852](https://bugs.webkit.org/show_bug.cgi?id=153852). - -### iOS text fields and scrolling - -As of iOS 9.2, while a modal is open, if the initial touch of a scroll gesture is within the boundary of a textual `<input>` or a `<textarea>`, the `<body>` content underneath the modal will be scrolled instead of the modal itself. See [WebKit bug #153856](https://bugs.webkit.org/show_bug.cgi?id=153856). - -### Navbar Dropdowns - -The `.dropdown-backdrop` element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or [any other element which will fire a click event in iOS](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile)). - -## Browser zooming - -Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds. - -## Sticky `:hover`/`:focus` on iOS - -While `:hover` isn't possible on most touch devices, iOS emulates this behavior, resulting in "sticky" hover styles that persist after tapping one element. These hover styles are only removed when users tap another element. This behavior is considered largely undesirable and appears to not be an issue on Android or Windows devices. - -Throughout our v4 alpha and beta releases, we included incomplete and commented out code for opting into a media query shim that would disable hover styles in touch device browsers that emulate hovering. This work was never fully completed or enabled, but to avoid complete breakage, we've opted to deprecate [this shim](https://github.com/twbs/mq4-hover-shim) and keep the mixins as shortcuts for the pseudo-classes. - -## Printing - -Even in some modern browsers, printing can be quirky. - -As of Safari v8.0, use of the fixed-width `.container` class can cause Safari to use an unusually small font size when printing. See [issue #14868]({{< param repo >}}/issues/14868) and [WebKit bug #138192](https://bugs.webkit.org/show_bug.cgi?id=138192) for more details. One potential workaround is the following CSS: - -```css -@media print { - .container { - width: auto; - } -} -``` - -## Android stock browser - -Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general. - -### Select menu - -On `<select>` elements, the Android stock browser will not display the side controls if there is a `border-radius` and/or `border` applied. (See [this StackOverflow question](https://stackoverflow.com/questions/14744437/html-select-box-not-showing-drop-down-arrow-on-android-version-4-0-when-set-with) for details.) Use the snippet of code below to remove the offending CSS and render the `<select>` as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers. - -```html -<script> -$(function () { - var nua = navigator.userAgent - var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1) - if (isAndroid) { - $('select.form-control').removeClass('form-control').css('width', '100%') - } -}) -</script> -``` - -Want to see an example? [Check out this JS Bin demo](http://jsbin.com/OyaqoDO/2). - -## Validators - -In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com/) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement. - -These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings. - -Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of a workaround for [a certain Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072). diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/contents.md b/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/contents.md deleted file mode 100644 index a902ebb1d..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/contents.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -layout: docs -title: Contents -description: Discover what's included in Bootstrap, including our precompiled and source code flavors. Remember, Bootstrap's JavaScript plugins require jQuery. -group: getting-started -toc: true ---- - -## Precompiled Bootstrap - -Once downloaded, unzip the compressed folder and you'll see something like this: - -<!-- NOTE: This info is intentionally duplicated in the README. Copy any changes made here over to the README too, but be sure to keep in mind to add the `dist` folder. --> - -```text -bootstrap/ -├── css/ -│ ├── bootstrap-grid.css -│ ├── bootstrap-grid.css.map -│ ├── bootstrap-grid.min.css -│ ├── bootstrap-grid.min.css.map -│ ├── bootstrap-reboot.css -│ ├── bootstrap-reboot.css.map -│ ├── bootstrap-reboot.min.css -│ ├── bootstrap-reboot.min.css.map -│ ├── bootstrap.css -│ ├── bootstrap.css.map -│ ├── bootstrap.min.css -│ └── bootstrap.min.css.map -└── js/ - ├── bootstrap.bundle.js - ├── bootstrap.bundle.js.map - ├── bootstrap.bundle.min.js - ├── bootstrap.bundle.min.js.map - ├── bootstrap.js - ├── bootstrap.js.map - ├── bootstrap.min.js - └── bootstrap.min.js.map -``` - -This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/). - -## CSS files - -Bootstrap includes a handful of options for including some or all of our compiled CSS. - -<table class="table table-bordered"> - <thead> - <tr> - <th scope="col">CSS files</th> - <th scope="col">Layout</th> - <th scope="col">Content</th> - <th scope="col">Components</th> - <th scope="col">Utilities</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row"> - <div><code class="font-weight-normal text-nowrap">bootstrap.css</code></div> - <div><code class="font-weight-normal text-nowrap">bootstrap.min.css</code></div> - </th> - <td class="text-success">Included</td> - <td class="text-success">Included</td> - <td class="text-success">Included</td> - <td class="text-success">Included</td> - </tr> - <tr> - <th scope="row"> - <div><code class="font-weight-normal text-nowrap">bootstrap-grid.css</code></div> - <div><code class="font-weight-normal text-nowrap">bootstrap-grid.min.css</code></div> - </th> - <td><a class="text-warning" href="{{< docsref "/layout/grid" >}}">Only grid system</a></td> - <td class="bg-light text-muted">Not included</td> - <td class="bg-light text-muted">Not included</td> - <td><a class="text-warning" href="{{< docsref "/utilities/flex" >}}">Only flex utilities</a></td> - </tr> - <tr> - <th scope="row"> - <div><code class="font-weight-normal text-nowrap">bootstrap-reboot.css</code></div> - <div><code class="font-weight-normal text-nowrap">bootstrap-reboot.min.css</code></div> - </th> - <td class="bg-light text-muted">Not included</td> - <td><a class="text-warning" href="{{< docsref "/content/reboot" >}}">Only Reboot</a></td> - <td class="bg-light text-muted">Not included</td> - <td class="bg-light text-muted">Not included</td> - </tr> - </tbody> -</table> - -## JS files - -Similarly, we have options for including some or all of our compiled JavaScript. - -<table class="table table-bordered"> - <thead> - <tr> - <th scope="col">JS files</th> - <th scope="col">Popper</th> - <th scope="col">jQuery</th> - </tr> - </thead> - <tbody> - <tr> - <th scope="row"> - <div><code class="font-weight-normal text-nowrap">bootstrap.bundle.js</code></div> - <div><code class="font-weight-normal text-nowrap">bootstrap.bundle.min.js</code></div> - </th> - <td class="text-success">Included</td> - <td class="bg-light text-muted">Not included</td> - </tr> - <tr> - <th scope="row"> - <div><code class="font-weight-normal text-nowrap">bootstrap.js</code></div> - <div><code class="font-weight-normal text-nowrap">bootstrap.min.js</code></div> - </th> - <td class="bg-light text-muted">Not included</td> - <td class="bg-light text-muted">Not included</td> - </tr> - </tbody> -</table> - -## Bootstrap source code - -The Bootstrap source code download includes the precompiled CSS and JavaScript assets, along with source Sass, JavaScript, and documentation. More specifically, it includes the following and more: - -```text -bootstrap/ -├── dist/ -│ ├── css/ -│ └── js/ -├── site/ -│ └──content/ -| └──docs/ -| └── 4.6/ -| └── examples/ -├── js/ -└── scss/ -``` - -The `scss/` and `js/` are the source code for our CSS and JavaScript. The `dist/` folder includes everything listed in the precompiled download section above. The `site/docs/` folder includes the source code for our documentation, and `examples/` of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/theming.md b/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/theming.md deleted file mode 100644 index 8c48444da..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/theming.md +++ /dev/null @@ -1,501 +0,0 @@ ---- -layout: docs -title: Theming Bootstrap -description: Customize Bootstrap 4 with our new built-in Sass variables for global style preferences for easy theming and component changes. -group: getting-started -toc: true ---- - -## Introduction - -In Bootstrap 3, theming was largely driven by variable overrides in LESS, custom CSS, and a separate theme stylesheet that we included in our `dist` files. With some effort, one could completely redesign the look of Bootstrap 3 without touching the core files. Bootstrap 4 provides a familiar, but slightly different approach. - -Now, theming is accomplished by Sass variables, Sass maps, and custom CSS. There's no more dedicated theme stylesheet; instead, you can enable the built-in theme to add gradients, shadows, and more. - -## Sass - -Utilize our source Sass files to take advantage of variables, maps, mixins, and more when [compiling Sass]({{< docsref "/getting-started/build-tools#sass" >}}) using your own asset pipeline. - -### File structure - -Whenever possible, avoid modifying Bootstrap's core files. For Sass, that means creating your own stylesheet that imports Bootstrap so you can modify and extend it. Assuming you're using a package manager like npm, you'll have a file structure that looks like this: - -```text -your-project/ -├── scss -│ └── custom.scss -└── node_modules/ - └── bootstrap - ├── js - └── scss -``` - -If you've downloaded our source files and aren't using a package manager, you'll want to manually setup something similar to that structure, keeping Bootstrap's source files separate from your own. - -```text -your-project/ -├── scss -│ └── custom.scss -└── bootstrap/ - ├── js - └── scss -``` - -### Importing - -In your `custom.scss`, you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you need. We encourage the latter, though be aware there are some requirements and dependencies across our components. You also will need to include some JavaScript for our plugins. - -```scss -// Custom.scss -// Option A: Include all of Bootstrap - -@import "../node_modules/bootstrap/scss/bootstrap"; - -// Add custom code after this -``` - -```scss -// Custom.scss -// Option B: Include parts of Bootstrap - -// Required -@import "../node_modules/bootstrap/scss/functions"; -@import "../node_modules/bootstrap/scss/variables"; -@import "../node_modules/bootstrap/scss/mixins"; - -// Include custom variable default overrides here - -// Optional -@import "../node_modules/bootstrap/scss/reboot"; -@import "../node_modules/bootstrap/scss/type"; -@import "../node_modules/bootstrap/scss/images"; -@import "../node_modules/bootstrap/scss/code"; -@import "../node_modules/bootstrap/scss/grid"; -``` - -With that setup in place, you can begin to modify any of the Sass variables and maps in your `custom.scss`. You can also start to add parts of Bootstrap under the `// Optional` section as needed. We suggest using the full import stack from our `bootstrap.scss` file as your starting point. - -### Variable defaults - -Every Sass variable in Bootstrap includes the `!default` flag allowing you to override the variable's default value in your own Sass without modifying Bootstrap's source code. Copy and paste variables as needed, modify their values, and remove the `!default` flag. If a variable has already been assigned, then it won't be re-assigned by the default values in Bootstrap. - -You will find the complete list of Bootstrap's variables in `scss/_variables.scss`. Some variables are set to `null`, these variables don't output the property unless they are overridden in your configuration. - -Variable overrides must come after our functions, variables, and mixins are imported, but before the rest of the imports. - -Here's an example that changes the `background-color` and `color` for the `<body>` when importing and compiling Bootstrap via npm: - -```scss -// Required -@import "../node_modules/bootstrap/scss/functions"; -@import "../node_modules/bootstrap/scss/variables"; -@import "../node_modules/bootstrap/scss/mixins"; - -// Your variable overrides -$body-bg: #000; -$body-color: #111; - -// Bootstrap and its default variables - -// Optional -@import "../node_modules/bootstrap/scss/root"; -@import "../node_modules/bootstrap/scss/reboot"; -@import "../node_modules/bootstrap/scss/type"; -// etc -``` - -Repeat as necessary for any variable in Bootstrap, including the global options below. - -{{< callout info >}} -{{< partial "callout-info-npm-starter.md" >}} -{{< /callout >}} - -### Maps and loops - -Bootstrap 4 includes a handful of Sass maps, key value pairs that make it easier to generate families of related CSS. We use Sass maps for our colors, grid breakpoints, and more. Just like Sass variables, all Sass maps include the `!default` flag and can be overridden and extended. - -Some of our Sass maps are merged into empty ones by default. This is done to allow easy expansion of a given Sass map, but comes at the cost of making _removing_ items from a map slightly more difficult. - -#### Modify map - -To modify an existing color in our `$theme-colors` map, add the following to your custom Sass file: - -```scss -$theme-colors: ( - "primary": #0074d9, - "danger": #ff4136 -); -``` - -#### Add to map - -To add a new color to `$theme-colors`, add the new key and value: - -```scss -$theme-colors: ( - "custom-color": #900 -); -``` - -#### Remove from map - -To remove colors from `$theme-colors`, or any other map, use `map-remove`. Be aware you must insert it between our requirements and options: - -```scss -// Required -@import "../node_modules/bootstrap/scss/functions"; -@import "../node_modules/bootstrap/scss/variables"; -@import "../node_modules/bootstrap/scss/mixins"; - -$theme-colors: map-remove($theme-colors, "info", "light", "dark"); - -// Optional -@import "../node_modules/bootstrap/scss/root"; -@import "../node_modules/bootstrap/scss/reboot"; -@import "../node_modules/bootstrap/scss/type"; -... -``` - -#### Required keys - -Bootstrap assumes the presence of some specific keys within Sass maps as we used and extend these ourselves. As you customize the included maps, you may encounter errors where a specific Sass map's key is being used. - -For example, we use the `primary`, `success`, and `danger` keys from `$theme-colors` for links, buttons, and form states. Replacing the values of these keys should present no issues, but removing them may cause Sass compilation issues. In these instances, you'll need to modify the Sass code that makes use of those values. - -### Functions - -Bootstrap utilizes several Sass functions, but only a subset are applicable to general theming. We've included three functions for getting values from the color maps: - -```scss -@function color($key: "blue") { - @return map-get($colors, $key); -} - -@function theme-color($key: "primary") { - @return map-get($theme-colors, $key); -} - -@function gray($key: "100") { - @return map-get($grays, $key); -} -``` - -These allow you to pick one color from a Sass map much like how you'd use a color variable from v3. - -```scss -.custom-element { - color: gray("100"); - background-color: theme-color("dark"); -} -``` - -We also have another function for getting a particular _level_ of color from the `$theme-colors` map. Negative level values will lighten the color, while higher levels will darken. - -```scss -@function theme-color-level($color-name: "primary", $level: 0) { - $color: theme-color($color-name); - $color-base: if($level > 0, #000, #fff); - $level: abs($level); - - @return mix($color-base, $color, $level * $theme-color-interval); -} -``` - -In practice, you'd call the function and pass in two parameters: the name of the color from `$theme-colors` (e.g., primary or danger) and a numeric level. - -```scss -.custom-element { - color: theme-color-level(primary, -10); -} -``` - -Additional functions could be added in the future or your own custom Sass to create level functions for additional Sass maps, or even a generic one if you wanted to be more verbose. - -#### Color contrast - -An additional function we include in Bootstrap is the color contrast function, `color-yiq`. It utilizes the [YIQ color space](https://en.wikipedia.org/wiki/YIQ) to automatically return a light (`#fff`) or dark (`#111`) contrast color based on the specified base color. This function is especially useful for mixins or loops where you're generating multiple classes. - -For example, to generate color swatches from our `$theme-colors` map: - -```scss -@each $color, $value in $theme-colors { - .swatch-#{$color} { - color: color-yiq($value); - } -} -``` - -It can also be used for one-off contrast needs: - -```scss -.custom-element { - color: color-yiq(#000); // returns `color: #fff` -} -``` - -You can also specify a base color with our color map functions: - -```scss -.custom-element { - color: color-yiq(theme-color("dark")); // returns `color: #fff` -} -``` - -#### Escape SVG - -We use the `escape-svg` function to escape the `<`, `>` and `#` characters for SVG background images. These characters need to be escaped to properly render the background images in IE. When using the `escape-svg` function, data URIs must be quoted. - -#### Add and Subtract functions - -We use the `add` and `subtract` functions to wrap the CSS `calc` function. The primary purpose of these functions is to avoid errors when a "unitless" `0` value is passed into a `calc` expression. Expressions like `calc(10px - 0)` will return an error in all browsers, despite being mathematically correct. - -Example where the calc is valid: - -```scss -$border-radius: .25rem; -$border-width: 1px; - -.element { - // Output calc(.25rem - 1px) is valid - border-radius: calc($border-radius - $border-width); -} - -.element { - // Output the same calc(.25rem - 1px) as above - border-radius: subtract($border-radius, $border-width); -} -``` - -Example where the calc is invalid: - -```scss -$border-radius: .25rem; -$border-width: 0; - -.element { - // Output calc(.25rem - 0) is invalid - border-radius: calc($border-radius - $border-width); -} - -.element { - // Output .25rem - border-radius: subtract($border-radius, $border-width); -} -``` - -## Sass options - -Customize Bootstrap 4 with our built-in custom variables file and easily toggle global CSS preferences with new `$enable-*` Sass variables. Override a variable's value and recompile with `npm run test` as needed. - -You can find and customize these variables for key global options in Bootstrap's `scss/_variables.scss` file. - -| Variable | Values | Description | -| -------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------- | -| `$spacer` | `1rem` (default), or any value > 0 | Specifies the default spacer value to programmatically generate our [spacer utilities]({{< docsref "/utilities/spacing" >}}). | -| `$enable-rounded` | `true` (default) or `false` | Enables predefined `border-radius` styles on various components. | -| `$enable-shadows` | `true` or `false` (default) | Enables predefined decorative `box-shadow` styles on various components. Does not affect `box-shadow`s used for focus states. | -| `$enable-gradients` | `true` or `false` (default) | Enables predefined gradients via `background-image` styles on various components. | -| `$enable-transitions` | `true` (default) or `false` | Enables predefined `transition`s on various components. | -| `$enable-prefers-reduced-motion-media-query` | `true` (default) or `false` | Enables the [`prefers-reduced-motion` media query]({{< docsref "/getting-started/accessibility#reduced-motion" >}}), which suppresses certain animations/transitions based on the users' browser/operating system preferences. | -| `$enable-hover-media-query` | `true` or `false` (default) | **Deprecated** | -| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g., `.container`, `.row`, `.col-md-1`, etc.). | -| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. | -| `$enable-pointer-cursor-for-buttons` | `true` (default) or `false` | Add "hand" cursor to non-disabled button elements. | -| `$enable-print-styles` | `true` (default) or `false` | Enables styles for optimizing printing. | -| `$enable-responsive-font-sizes` | `true` or `false` (default) | Enables [responsive font sizes]({{< docsref "/content/typography#responsive-font-sizes" >}}). | -| `$enable-validation-icons` | `true` (default) or `false` | Enables `background-image` icons within textual inputs and some custom forms for validation states. | -| `$enable-deprecation-messages` | `true` or `false` (default) | Set to `true` to show warnings when using any of the deprecated mixins and functions that are planned to be removed in `v5`. | - -## Color - -Many of Bootstrap's various components and utilities are built through a series of colors defined in a Sass map. This map can be looped over in Sass to quickly generate a series of rulesets. - -### All colors - -All colors available in Bootstrap 4, are available as Sass variables and a Sass map in `scss/_variables.scss` file. This will be expanded upon in subsequent minor releases to add additional shades, much like the [grayscale palette](#grays) we already include. - -<div class="row"> - {{< theme-colors.inline >}} - {{- range $.Site.Data.colors }} - {{- if (and (not (eq .name "white")) (not (eq .name "gray")) (not (eq .name "gray-dark"))) }} - <div class="col-md-4"> - <div class="p-3 mb-3 text-monospace swatch-{{ .name }}"> - <strong class="d-block">${{ .name }}</strong> - <small>{{ .hex }}</small> - </div> - </div> - {{ end -}} - {{ end -}} - {{< /theme-colors.inline >}} -</div> - -Here's how you can use these in your Sass: - -```scss -// With variable -.alpha { color: $purple; } - -// From the Sass map with our `color()` function -.beta { color: color("purple"); } -``` - -[Color utility classes]({{< docsref "/utilities/colors" >}}) are also available for setting `color` and `background-color`. - -{{< callout info >}} -In the future, we'll aim to provide Sass maps and variables for shades of each color as we've done with the grayscale colors below. -{{< /callout >}} - -### Theme colors - -We use a subset of all colors to create a smaller color palette for generating color schemes, also available as Sass variables and a Sass map in Bootstrap's `scss/_variables.scss` file. - -<div class="row"> - {{< theme-colors.inline >}} - {{- range (index $.Site.Data "theme-colors") }} - <div class="col-md-4"> - <div class="p-3 mb-3 text-monospace bg-{{ .name }} {{ if (or (eq .name "light") (eq .name "warning")) }}text-dark{{ else }}text-white{{ end }}"> - <strong class="d-block">${{ .name }}</strong> - <small>{{ .hex }}</small> - </div> - </div> - {{ end -}} - {{< /theme-colors.inline >}} -</div> - -### Grays - -An expansive set of gray variables and a Sass map in `scss/_variables.scss` for consistent shades of gray across your project. Note that these are "cool grays", which tend towards a subtle blue tone, rather than neutral grays. - -<div class="row mb-3"> - <div class="col-md-4"> - {{< theme-colors.inline >}} - {{- range $.Site.Data.grays }} - <div class="p-3 text-monospace swatch-{{ .name }}"> - <strong class="d-block">$gray-{{ .name }}</strong> - <small>{{ .hex }}</small> - </div> - {{ end -}} - {{< /theme-colors.inline >}} - </div> -</div> - -Within `scss/_variables.scss`, you'll find Bootstrap's color variables and Sass map. Here's an example of the `$colors` Sass map: - -```scss -$colors: ( - "blue": $blue, - "indigo": $indigo, - "purple": $purple, - "pink": $pink, - "red": $red, - "orange": $orange, - "yellow": $yellow, - "green": $green, - "teal": $teal, - "cyan": $cyan, - "white": $white, - "gray": $gray-600, - "gray-dark": $gray-800 -) !default; -``` - -Add, remove, or modify values within the map to update how they're used in many other components. Unfortunately at this time, not _every_ component utilizes this Sass map. Future updates will strive to improve upon this. Until then, plan on making use of the `${color}` variables and this Sass map. - -## Components - -Many of Bootstrap's components and utilities are built with `@each` loops that iterate over a Sass map. This is especially helpful for generating variants of a component by our `$theme-colors` and creating responsive variants for each breakpoint. As you customize these Sass maps and recompile, you'll automatically see your changes reflected in these loops. - -### Modifiers - -Many of Bootstrap's components are built with a base-modifier class approach. This means the bulk of the styling is contained to a base class (e.g., `.btn`) while style variations are confined to modifier classes (e.g., `.btn-danger`). These modifier classes are built from the `$theme-colors` map to make customizing the number and name of our modifier classes. - -Here are two examples of how we loop over the `$theme-colors` map to generate modifiers to the `.alert` component and all our `.bg-*` background utilities. - -```scss -// Generate alert modifier classes -@each $color, $value in $theme-colors { - .alert-#{$color} { - @include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); - } -} - -// Generate `.bg-*` color utilities -@each $color, $value in $theme-colors { - @include bg-variant('.bg-#{$color}', $value); -} -``` - -### Responsive - -These Sass loops aren't limited to color maps, either. You can also generate responsive variations of your components or utilities. Take for example our responsive text alignment utilities where we mix an `@each` loop for the `$grid-breakpoints` Sass map with a media query include. - -```scss -@each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); - - .text#{$infix}-left { text-align: left !important; } - .text#{$infix}-right { text-align: right !important; } - .text#{$infix}-center { text-align: center !important; } - } -} -``` - -Should you need to modify your `$grid-breakpoints`, your changes will apply to all the loops iterating over that map. - -## CSS variables - -Bootstrap 4 includes around two dozen [CSS custom properties (variables)](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) in its compiled CSS. These provide easy access to commonly used values like our theme colors, breakpoints, and primary font stacks when working in your browser's Inspector, a code sandbox, or general prototyping. - -### Available variables - -Here are the variables we include (note that the `:root` is required). They're located in our `_root.scss` file. - -```css -{{< root.inline >}} -{{- $css := readFile "dist/css/bootstrap.css" -}} -{{- $match := findRE ":root {([^}]*)}" $css 1 -}} - -{{- if (eq (len $match) 0) -}} -{{- errorf "Got no matches for :root in %q!" $.Page.Path -}} -{{- end -}} - -{{- index $match 0 -}} - -{{< /root.inline >}} -``` - -### Examples - -CSS variables offer similar flexibility to Sass's variables, but without the need for compilation before being served to the browser. For example, here we're resetting our page's font and link styles with CSS variables. - -```css -body { - font: 1rem/1.5 var(--font-family-sans-serif); -} -a { - color: var(--blue); -} -``` - -### Breakpoint variables - -While we originally included breakpoints in our CSS variables (e.g., `--breakpoint-md`), **these are not supported in media queries**, but they can still be used _within_ rulesets in media queries. These breakpoint variables remain in the compiled CSS for backward compatibility given they can be utilized by JavaScript. [Learn more in the spec](https://www.w3.org/TR/css-variables-1/#using-variables). - -Here's an example of **what's not supported:** - -```css -@media (min-width: var(--breakpoint-sm)) { - ... -} -``` - -And here's an example of **what is supported:** - -```css -@media (min-width: 768px) { - .custom-element { - color: var(--primary); - } -} -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/layout/grid.md b/vendor/twbs/bootstrap/site/content/docs/4.6/layout/grid.md deleted file mode 100644 index 6281661c2..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/layout/grid.md +++ /dev/null @@ -1,824 +0,0 @@ ---- -layout: docs -title: Grid system -description: Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, five default responsive tiers, Sass variables and mixins, and dozens of predefined classes. -group: layout -toc: true ---- - -## How it works - -Bootstrap's grid system uses a series of containers, rows, and columns to layout and align content. It's built with [flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox) and is fully responsive. Below is an example and an in-depth look at how the grid comes together. - -**New to or unfamiliar with flexbox?** [Read this CSS Tricks flexbox guide](https://css-tricks.com/snippets/css/a-guide-to-flexbox/#flexbox-background) for background, terminology, guidelines, and code snippets. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-sm"> - One of three columns - </div> - <div class="col-sm"> - One of three columns - </div> - <div class="col-sm"> - One of three columns - </div> - </div> -</div> -{{< /example >}} - -The above example creates three equal-width columns on small, medium, large, and extra large devices using our predefined grid classes. Those columns are centered in the page with the parent `.container`. - -Breaking it down, here's how it works: - -- Containers provide a means to center and horizontally pad your site's contents. Use `.container` for a responsive pixel width or `.container-fluid` for `width: 100%` across all viewport and device sizes. -- Rows are wrappers for columns. Each column has horizontal `padding` (called a gutter) for controlling the space between them. This `padding` is then counteracted on the rows with negative margins. This way, all the content in your columns is visually aligned down the left side. -- In a grid layout, content must be placed within columns and only columns may be immediate children of rows. -- Thanks to flexbox, grid columns without a specified `width` will automatically layout as equal width columns. For example, four instances of `.col-sm` will each automatically be 25% wide from the small breakpoint and up. See the [auto-layout columns](#auto-layout-columns) section for more examples. -- Column classes indicate the number of columns you'd like to use out of the possible 12 per row. So, if you want three equal-width columns across, you can use `.col-4`. -- Column `width`s are set in percentages, so they're always fluid and sized relative to their parent element. -- Columns have horizontal `padding` to create the gutters between individual columns, however, you can remove the `margin` from rows and `padding` from columns with `.no-gutters` on the `.row`. -- To make the grid responsive, there are five grid breakpoints, one for each [responsive breakpoint]({{< docsref "/layout/overview#responsive-breakpoints" >}}): all breakpoints (extra small), small, medium, large, and extra large. -- Grid breakpoints are based on minimum width media queries, meaning **they apply to that one breakpoint and all those above it** (e.g., `.col-sm-4` applies to small, medium, large, and extra large devices, but not the first `xs` breakpoint). -- You can use predefined grid classes (like `.col-4`) or [Sass mixins](#sass-mixins) for more semantic markup. - -Be aware of the limitations and [bugs around flexbox](https://github.com/philipwalton/flexbugs), like the [inability to use some HTML elements as flex containers](https://github.com/philipwalton/flexbugs#flexbug-9). - -## Grid options - -While Bootstrap uses `em`s or `rem`s for defining most sizes, `px`s are used for grid breakpoints and container widths. This is because the viewport width is in pixels and does not change with the [font size](https://drafts.csswg.org/mediaqueries-3/#units). - -See how aspects of the Bootstrap grid system work across multiple devices with a handy table. - -<table class="table table-bordered table-striped"> - <thead> - <tr> - <th></th> - <th class="text-center"> - Extra small<br> - <small><576px</small> - </th> - <th class="text-center"> - Small<br> - <small>≥576px</small> - </th> - <th class="text-center"> - Medium<br> - <small>≥768px</small> - </th> - <th class="text-center"> - Large<br> - <small>≥992px</small> - </th> - <th class="text-center"> - Extra large<br> - <small>≥1200px</small> - </th> - </tr> - </thead> - <tbody> - <tr> - <th class="text-nowrap" scope="row">Max container width</th> - <td>None (auto)</td> - <td>540px</td> - <td>720px</td> - <td>960px</td> - <td>1140px</td> - </tr> - <tr> - <th class="text-nowrap" scope="row">Class prefix</th> - <td><code>.col-</code></td> - <td><code>.col-sm-</code></td> - <td><code>.col-md-</code></td> - <td><code>.col-lg-</code></td> - <td><code>.col-xl-</code></td> - </tr> - <tr> - <th class="text-nowrap" scope="row"># of columns</th> - <td colspan="5">12</td> - </tr> - <tr> - <th class="text-nowrap" scope="row">Gutter width</th> - <td colspan="5">30px (15px on each side of a column)</td> - </tr> - <tr> - <th class="text-nowrap" scope="row">Nestable</th> - <td colspan="5">Yes</td> - </tr> - <tr> - <th class="text-nowrap" scope="row">Column ordering</th> - <td colspan="5">Yes</td> - </tr> - </tbody> -</table> - -## Auto-layout columns - -Utilize breakpoint-specific column classes for easy column sizing without an explicit numbered class like `.col-sm-6`. - -### Equal-width - -For example, here are two grid layouts that apply to every device and viewport, from `xs` to `xl`. Add any number of unit-less classes for each breakpoint you need and every column will be the same width. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col"> - 1 of 2 - </div> - <div class="col"> - 2 of 2 - </div> - </div> - <div class="row"> - <div class="col"> - 1 of 3 - </div> - <div class="col"> - 2 of 3 - </div> - <div class="col"> - 3 of 3 - </div> - </div> -</div> -{{< /example >}} - -### Equal-width multi-line - -Create equal-width columns that span multiple lines by inserting a `.w-100` where you want the columns to break to a new line. Make the breaks responsive by mixing `.w-100` with some [responsive display utilities]({{< docsref "/utilities/display" >}}). - -There was a [Safari flexbox bug](https://github.com/philipwalton/flexbugs#flexbug-11) that prevented this from working without an explicit `flex-basis` or `border`. There are workarounds for older browser versions, but they shouldn't be necessary if your target browsers don't fall into the buggy versions. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col">col</div> - <div class="col">col</div> - <div class="w-100"></div> - <div class="col">col</div> - <div class="col">col</div> - </div> -</div> -{{< /example >}} - -### Setting one column width - -Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col"> - 1 of 3 - </div> - <div class="col-6"> - 2 of 3 (wider) - </div> - <div class="col"> - 3 of 3 - </div> - </div> - <div class="row"> - <div class="col"> - 1 of 3 - </div> - <div class="col-5"> - 2 of 3 (wider) - </div> - <div class="col"> - 3 of 3 - </div> - </div> -</div> -{{< /example >}} - -### Variable width content - -Use `col-{breakpoint}-auto` classes to size columns based on the natural width of their content. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row justify-content-md-center"> - <div class="col col-lg-2"> - 1 of 3 - </div> - <div class="col-md-auto"> - Variable width content - </div> - <div class="col col-lg-2"> - 3 of 3 - </div> - </div> - <div class="row"> - <div class="col"> - 1 of 3 - </div> - <div class="col-md-auto"> - Variable width content - </div> - <div class="col col-lg-2"> - 3 of 3 - </div> - </div> -</div> -{{< /example >}} - -## Responsive classes - -Bootstrap's grid includes five tiers of predefined classes for building complex responsive layouts. Customize the size of your columns on extra small, small, medium, large, or extra large devices however you see fit. - -### All breakpoints - -For grids that are the same from the smallest of devices to the largest, use the `.col` and `.col-*` classes. Specify a numbered class when you need a particularly sized column; otherwise, feel free to stick to `.col`. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col">col</div> - <div class="col">col</div> - <div class="col">col</div> - <div class="col">col</div> - </div> - <div class="row"> - <div class="col-8">col-8</div> - <div class="col-4">col-4</div> - </div> -</div> -{{< /example >}} - -### Stacked to horizontal - -Using a single set of `.col-sm-*` classes, you can create a basic grid system that starts out stacked and becomes horizontal at the small breakpoint (`sm`). - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-sm-8">col-sm-8</div> - <div class="col-sm-4">col-sm-4</div> - </div> - <div class="row"> - <div class="col-sm">col-sm</div> - <div class="col-sm">col-sm</div> - <div class="col-sm">col-sm</div> - </div> -</div> -{{< /example >}} - -### Mix and match - -Don't want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works. - -{{< example class="bd-example-row" >}} -<div class="container"> - <!-- Stack the columns on mobile by making one full-width and the other half-width --> - <div class="row"> - <div class="col-md-8">.col-md-8</div> - <div class="col-6 col-md-4">.col-6 .col-md-4</div> - </div> - - <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop --> - <div class="row"> - <div class="col-6 col-md-4">.col-6 .col-md-4</div> - <div class="col-6 col-md-4">.col-6 .col-md-4</div> - <div class="col-6 col-md-4">.col-6 .col-md-4</div> - </div> - - <!-- Columns are always 50% wide, on mobile and desktop --> - <div class="row"> - <div class="col-6">.col-6</div> - <div class="col-6">.col-6</div> - </div> -</div> -{{< /example >}} - -### Gutters - -Gutters can be responsively adjusted by breakpoint-specific padding and negative margin utility classes. To change the gutters in a given row, pair a negative margin utility on the `.row` and matching padding utilities on the `.col`s. The `.container` or `.container-fluid` parent may need to be adjusted too to avoid unwanted overflow, using again matching padding utility. - -Here's an example of customizing the Bootstrap grid at the large (`lg`) breakpoint and above. We've increased the `.col` padding with `.px-lg-5`, counteracted that with `.mx-lg-n5` on the parent `.row` and then adjusted the `.container` wrapper with `.px-lg-5`. - -{{< example >}} -<div class="container px-lg-5"> - <div class="row mx-lg-n5"> - <div class="col py-3 px-lg-5 border bg-light">Custom column padding</div> - <div class="col py-3 px-lg-5 border bg-light">Custom column padding</div> - </div> -</div> -{{< /example >}} - -### Row columns - -Use the responsive `.row-cols-*` classes to quickly set the number of columns that best render your content and layout. Whereas normal `.col-*` classes apply to the individual columns (e.g., `.col-md-4`), the row columns classes are set on the parent `.row` as a shortcut. - -Use these row columns classes to quickly create basic grid layouts or to control your card layouts. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row row-cols-2"> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - </div> -</div> -{{< /example >}} - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row row-cols-3"> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - </div> -</div> -{{< /example >}} - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row row-cols-4"> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - </div> -</div> -{{< /example >}} - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row row-cols-4"> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col-6">Column</div> - <div class="col">Column</div> - </div> -</div> -{{< /example >}} - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row row-cols-1 row-cols-sm-2 row-cols-md-4"> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - <div class="col">Column</div> - </div> -</div> -{{< /example >}} - -You can also use the accompanying Sass mixin, `row-cols()`: - -```scss -.element { - // Three columns to start - @include row-cols(3); - - // Five columns from medium breakpoint up - @include media-breakpoint-up(md) { - @include row-cols(5); - } -} -``` - -## Alignment - -Use flexbox alignment utilities to vertically and horizontally align columns. **Internet Explorer 10-11 do not support vertical alignment of flex items when the flex container has a `min-height` as shown below.** [See Flexbugs #3 for more details.](https://github.com/philipwalton/flexbugs#flexbug-3) - -### Vertical alignment - -{{< example class="bd-example-row bd-example-row-flex-cols" >}} -<div class="container"> - <div class="row align-items-start"> - <div class="col"> - One of three columns - </div> - <div class="col"> - One of three columns - </div> - <div class="col"> - One of three columns - </div> - </div> - <div class="row align-items-center"> - <div class="col"> - One of three columns - </div> - <div class="col"> - One of three columns - </div> - <div class="col"> - One of three columns - </div> - </div> - <div class="row align-items-end"> - <div class="col"> - One of three columns - </div> - <div class="col"> - One of three columns - </div> - <div class="col"> - One of three columns - </div> - </div> -</div> -{{< /example >}} - -{{< example class="bd-example-row bd-example-row-flex-cols" >}} -<div class="container"> - <div class="row"> - <div class="col align-self-start"> - One of three columns - </div> - <div class="col align-self-center"> - One of three columns - </div> - <div class="col align-self-end"> - One of three columns - </div> - </div> -</div> -{{< /example >}} - -### Horizontal alignment - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row justify-content-start"> - <div class="col-4"> - One of two columns - </div> - <div class="col-4"> - One of two columns - </div> - </div> - <div class="row justify-content-center"> - <div class="col-4"> - One of two columns - </div> - <div class="col-4"> - One of two columns - </div> - </div> - <div class="row justify-content-end"> - <div class="col-4"> - One of two columns - </div> - <div class="col-4"> - One of two columns - </div> - </div> - <div class="row justify-content-around"> - <div class="col-4"> - One of two columns - </div> - <div class="col-4"> - One of two columns - </div> - </div> - <div class="row justify-content-between"> - <div class="col-4"> - One of two columns - </div> - <div class="col-4"> - One of two columns - </div> - </div> -</div> -{{< /example >}} - -### No gutters - -The gutters between columns in our predefined grid classes can be removed with `.no-gutters`. This removes the negative `margin`s from `.row` and the horizontal `padding` from all immediate children columns. - -Here's the source code for creating these styles. Note that column overrides are scoped to only the first children columns and are targeted via [attribute selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). While this generates a more specific selector, column padding can still be further customized with [spacing utilities]({{< docsref "/utilities/spacing" >}}). - -**Need an edge-to-edge design?** Drop the parent `.container` or `.container-fluid`. - -```scss -.no-gutters { - margin-right: 0; - margin-left: 0; - - > .col, - > [class*="col-"] { - padding-right: 0; - padding-left: 0; - } -} -``` - -In practice, here's how it looks. Note you can continue to use this with all other predefined grid classes (including column widths, responsive tiers, reorders, and more). - -{{< example class="bd-example-row" >}} -<div class="row no-gutters"> - <div class="col-sm-6 col-md-8">.col-sm-6 .col-md-8</div> - <div class="col-6 col-md-4">.col-6 .col-md-4</div> -</div> -{{< /example >}} - -### Column wrapping - -If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-9">.col-9</div> - <div class="col-4">.col-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> - <div class="col-6">.col-6<br>Subsequent columns continue along the new line.</div> - </div> -</div> -{{< /example >}} - -### Column breaks - -Breaking columns to a new line in flexbox requires a small hack: add an element with `width: 100%` wherever you want to wrap your columns to a new line. Normally this is accomplished with multiple `.row`s, but not every implementation method can account for this. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> - <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> - - <!-- Force next columns to break to new line --> - <div class="w-100"></div> - - <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> - <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> - </div> -</div> -{{< /example >}} - -You may also apply this break at specific breakpoints with our [responsive display utilities]({{< docsref "/utilities/display" >}}). - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> - <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> - - <!-- Force next columns to break to new line at md breakpoint and up --> - <div class="w-100 d-none d-md-block"></div> - - <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> - <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> - </div> -</div> -{{< /example >}} - -## Reordering - -### Order classes - -Use `.order-` classes for controlling the **visual order** of your content. These classes are responsive, so you can set the `order` by breakpoint (e.g., `.order-1.order-md-2`). Includes support for `1` through `12` across all five grid tiers. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col"> - First in DOM, no order applied - </div> - <div class="col order-12"> - Second in DOM, with a larger order - </div> - <div class="col order-1"> - Third in DOM, with an order of 1 - </div> - </div> -</div> -{{< /example >}} - -There are also responsive `.order-first` and `.order-last` classes that change the `order` of an element by applying `order: -1` and `order: 13` (`order: $columns + 1`), respectively. These classes can also be intermixed with the numbered `.order-*` classes as needed. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col order-last"> - First in DOM, ordered last - </div> - <div class="col"> - Second in DOM, unordered - </div> - <div class="col order-first"> - Third in DOM, ordered first - </div> - </div> -</div> -{{< /example >}} - -### Offsetting columns - -You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities]({{< docsref "/utilities/spacing" >}}). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable. - -#### Offset classes - -Move columns to the right using `.offset-md-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.offset-md-4` moves `.col-md-4` over four columns. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-md-4">.col-md-4</div> - <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div> - </div> - <div class="row"> - <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div> - <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div> - </div> - <div class="row"> - <div class="col-md-6 offset-md-3">.col-md-6 .offset-md-3</div> - </div> -</div> -{{< /example >}} - -In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example]({{< docsref "/examples/grid" >}}). - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div> - <div class="col-sm-5 offset-sm-2 col-md-6 offset-md-0">.col-sm-5 .offset-sm-2 .col-md-6 .offset-md-0</div> - </div> - <div class="row"> - <div class="col-sm-6 col-md-5 col-lg-6">.col-sm-6 .col-md-5 .col-lg-6</div> - <div class="col-sm-6 col-md-5 offset-md-2 col-lg-6 offset-lg-0">.col-sm-6 .col-md-5 .offset-md-2 .col-lg-6 .offset-lg-0</div> - </div> -</div> -{{< /example >}} - -#### Margin utilities - -With the move to flexbox in v4, you can use margin utilities like `.mr-auto` to force sibling columns away from one another. - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-md-4">.col-md-4</div> - <div class="col-md-4 ml-auto">.col-md-4 .ml-auto</div> - </div> - <div class="row"> - <div class="col-md-3 ml-md-auto">.col-md-3 .ml-md-auto</div> - <div class="col-md-3 ml-md-auto">.col-md-3 .ml-md-auto</div> - </div> - <div class="row"> - <div class="col-auto mr-auto">.col-auto .mr-auto</div> - <div class="col-auto">.col-auto</div> - </div> -</div> -{{< /example >}} - -## Nesting - -To nest your content with the default grid, add a new `.row` and set of `.col-sm-*` columns within an existing `.col-sm-*` column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns). - -{{< example class="bd-example-row" >}} -<div class="container"> - <div class="row"> - <div class="col-sm-9"> - Level 1: .col-sm-9 - <div class="row"> - <div class="col-8 col-sm-6"> - Level 2: .col-8 .col-sm-6 - </div> - <div class="col-4 col-sm-6"> - Level 2: .col-4 .col-sm-6 - </div> - </div> - </div> - </div> -</div> -{{< /example >}} - -## Sass mixins - -When using Bootstrap's source Sass files, you have the option of using Sass variables and mixins to create custom, semantic, and responsive page layouts. Our predefined grid classes use these same variables and mixins to provide a whole suite of ready-to-use classes for fast responsive layouts. - -### Variables - -Variables and maps determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below. - -```scss -$grid-columns: 12; -$grid-gutter-width: 30px; - -$grid-breakpoints: ( - // Extra small screen / phone - xs: 0, - // Small screen / phone - sm: 576px, - // Medium screen / tablet - md: 768px, - // Large screen / desktop - lg: 992px, - // Extra large screen / wide desktop - xl: 1200px -); - -$container-max-widths: ( - sm: 540px, - md: 720px, - lg: 960px, - xl: 1140px -); -``` - -### Mixins - -Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns. - -```scss -// Creates a wrapper for a series of columns -@include make-row(); - -// Make the element grid-ready (applying everything but the width) -@include make-col-ready(); -@include make-col($size, $columns: $grid-columns); - -// Get fancy by offsetting, or changing the sort order -@include make-col-offset($size, $columns: $grid-columns); -``` - -### Example usage - -You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between. - -```scss -.example-container { - @include make-container(); - // Make sure to define this width after the mixin to override - // `width: 100%` generated by `make-container()` - width: 800px; -} - -.example-row { - @include make-row(); -} - -.example-content-main { - @include make-col-ready(); - - @include media-breakpoint-up(sm) { - @include make-col(6); - } - @include media-breakpoint-up(lg) { - @include make-col(8); - } -} - -.example-content-secondary { - @include make-col-ready(); - - @include media-breakpoint-up(sm) { - @include make-col(6); - } - @include media-breakpoint-up(lg) { - @include make-col(4); - } -} -``` - -{{< example >}} -<div class="example-container"> - <div class="example-row"> - <div class="example-content-main">Main content</div> - <div class="example-content-secondary">Secondary content</div> - </div> -</div> -{{< /example >}} - -## Customizing the grid - -Using our built-in grid Sass variables and maps, it's possible to completely customize the predefined grid classes. Change the number of tiers, the media query dimensions, and the container widths—then recompile. - -### Columns and gutters - -The number of grid columns can be modified via Sass variables. `$grid-columns` is used to generate the widths (in percent) of each individual column while `$grid-gutter-width` sets the width for the column gutters. - -```scss -$grid-columns: 12 !default; -$grid-gutter-width: 30px !default; -``` - -### Grid tiers - -Moving beyond the columns themselves, you may also customize the number of grid tiers. If you wanted just four grid tiers, you'd update the `$grid-breakpoints` and `$container-max-widths` to something like this: - -```scss -$grid-breakpoints: ( - xs: 0, - sm: 480px, - md: 768px, - lg: 1024px -); - -$container-max-widths: ( - sm: 420px, - md: 720px, - lg: 960px -); -``` - -When making any changes to the Sass variables or maps, you'll need to save your changes and recompile. Doing so will output a brand new set of predefined grid classes for column widths, offsets, and ordering. Responsive visibility utilities will also be updated to use the custom breakpoints. Make sure to set grid values in `px` (not `rem`, `em`, or `%`). diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/layout/overview.md b/vendor/twbs/bootstrap/site/content/docs/4.6/layout/overview.md deleted file mode 100644 index 7430ba15f..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/layout/overview.md +++ /dev/null @@ -1,277 +0,0 @@ ---- -layout: docs -title: Overview -description: Components and options for laying out your Bootstrap project, including wrapping containers, a powerful grid system, a flexible media object, and responsive utility classes. -group: layout -aliases: "/docs/4.6/layout/" -toc: true ---- - -## Containers - -Containers are the most basic layout element in Bootstrap and are **required when using our default grid system**. Containers are used to contain, pad, and (sometimes) center the content within them. While containers *can* be nested, most layouts do not require a nested container. - -Bootstrap comes with three different containers: - -- `.container`, which sets a `max-width` at each responsive breakpoint -- `.container-fluid`, which is `width: 100%` at all breakpoints -- `.container-{breakpoint}`, which is `width: 100%` until the specified breakpoint - -The table below illustrates how each container's `max-width` compares to the original `.container` and `.container-fluid` across each breakpoint. - -See them in action and compare them in our [Grid example]({{< docsref "/examples/grid#containers" >}}). - -<table class="table"> - <thead> - <tr> - <th></th> - <th> - Extra small<br> - <span class="font-weight-normal"><576px</span> - </th> - <th> - Small<br> - <span class="font-weight-normal">≥576px</span> - </th> - <th> - Medium<br> - <span class="font-weight-normal">≥768px</span> - </th> - <th> - Large<br> - <span class="font-weight-normal">≥992px</span> - </th> - <th> - Extra large<br> - <span class="font-weight-normal">≥1200px</span> - </th> - </tr> - </thead> - <tbody> - <tr> - <td><code>.container</code></td> - <td class="text-muted">100%</td> - <td>540px</td> - <td>720px</td> - <td>960px</td> - <td>1140px</td> - </tr> - <tr> - <td><code>.container-sm</code></td> - <td class="text-muted">100%</td> - <td>540px</td> - <td>720px</td> - <td>960px</td> - <td>1140px</td> - </tr> - <tr> - <td><code>.container-md</code></td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td>720px</td> - <td>960px</td> - <td>1140px</td> - </tr> - <tr> - <td><code>.container-lg</code></td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td>960px</td> - <td>1140px</td> - </tr> - <tr> - <td><code>.container-xl</code></td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td>1140px</td> - </tr> - <tr> - <td><code>.container-fluid</code></td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - <td class="text-muted">100%</td> - </tr> - </tbody> -</table> - -### All-in-one - -Our default `.container` class is a responsive, fixed-width container, meaning its `max-width` changes at each breakpoint. - -```html -<div class="container"> - <!-- Content here --> -</div> -``` - -### Fluid - -Use `.container-fluid` for a full width container, spanning the entire width of the viewport. - -```html -<div class="container-fluid"> - ... -</div> -``` - -### Responsive - -Responsive containers are new in Bootstrap v4.4. They allow you to specify a class that is 100% wide until the specified breakpoint is reached, after which we apply `max-width`s for each of the higher breakpoints. For example, `.container-sm` is 100% wide to start until the `sm` breakpoint is reached, where it will scale up with `md`, `lg`, and `xl`. - -```html -<div class="container-sm">100% wide until small breakpoint</div> -<div class="container-md">100% wide until medium breakpoint</div> -<div class="container-lg">100% wide until large breakpoint</div> -<div class="container-xl">100% wide until extra large breakpoint</div> -``` - -## Responsive breakpoints - -Since Bootstrap is developed to be mobile first, we use a handful of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) to create sensible breakpoints for our layouts and interfaces. These breakpoints are mostly based on minimum viewport widths and allow us to scale up elements as the viewport changes. - -Bootstrap primarily uses the following media query ranges—or breakpoints—in our source Sass files for our layout, grid system, and components. - -```scss -// Extra small devices (portrait phones, less than 576px) -// No media query for `xs` since this is the default in Bootstrap - -// Small devices (landscape phones, 576px and up) -@media (min-width: 576px) { ... } - -// Medium devices (tablets, 768px and up) -@media (min-width: 768px) { ... } - -// Large devices (desktops, 992px and up) -@media (min-width: 992px) { ... } - -// Extra large devices (large desktops, 1200px and up) -@media (min-width: 1200px) { ... } -``` - -Since we write our source CSS in Sass, all our media queries are available via Sass mixins: - -```scss -// No media query necessary for xs breakpoint as it's effectively `@media (min-width: 0) { ... }` -@include media-breakpoint-up(sm) { ... } -@include media-breakpoint-up(md) { ... } -@include media-breakpoint-up(lg) { ... } -@include media-breakpoint-up(xl) { ... } - -// Example: Hide starting at `min-width: 0`, and then show at the `sm` breakpoint -.custom-class { - display: none; -} -@include media-breakpoint-up(sm) { - .custom-class { - display: block; - } -} -``` - -We occasionally use media queries that go in the other direction (the given screen size *or smaller*): - -```scss -// Extra small devices (portrait phones, less than 576px) -@media (max-width: 575.98px) { ... } - -// Small devices (landscape phones, less than 768px) -@media (max-width: 767.98px) { ... } - -// Medium devices (tablets, less than 992px) -@media (max-width: 991.98px) { ... } - -// Large devices (desktops, less than 1200px) -@media (max-width: 1199.98px) { ... } - -// Extra large devices (large desktops) -// No media query since the extra-large breakpoint has no upper bound on its width -``` - -{{< callout info >}} -{{< partial "callout-info-mediaqueries-breakpoints.md" >}} -{{< /callout >}} - -Once again, these media queries are also available via Sass mixins: - -```scss -@include media-breakpoint-down(xs) { ... } -@include media-breakpoint-down(sm) { ... } -@include media-breakpoint-down(md) { ... } -@include media-breakpoint-down(lg) { ... } -// No media query necessary for xl breakpoint as it has no upper bound on its width - -// Example: Style from medium breakpoint and down -@include media-breakpoint-down(md) { - .custom-class { - display: block; - } -} -``` - -There are also media queries and mixins for targeting a single segment of screen sizes using the minimum and maximum breakpoint widths. - -```scss -// Extra small devices (portrait phones, less than 576px) -@media (max-width: 575.98px) { ... } - -// Small devices (landscape phones, 576px and up) -@media (min-width: 576px) and (max-width: 767.98px) { ... } - -// Medium devices (tablets, 768px and up) -@media (min-width: 768px) and (max-width: 991.98px) { ... } - -// Large devices (desktops, 992px and up) -@media (min-width: 992px) and (max-width: 1199.98px) { ... } - -// Extra large devices (large desktops, 1200px and up) -@media (min-width: 1200px) { ... } -``` - -These media queries are also available via Sass mixins: - -```scss -@include media-breakpoint-only(xs) { ... } -@include media-breakpoint-only(sm) { ... } -@include media-breakpoint-only(md) { ... } -@include media-breakpoint-only(lg) { ... } -@include media-breakpoint-only(xl) { ... } -``` - -Similarly, media queries may span multiple breakpoint widths: - -```scss -// Example -// Apply styles starting from medium devices and up to extra large devices -@media (min-width: 768px) and (max-width: 1199.98px) { ... } -``` - -The Sass mixin for targeting the same screen size range would be: - -```scss -@include media-breakpoint-between(md, xl) { ... } -``` - -## Z-index - -Several Bootstrap components utilize `z-index`, the CSS property that helps control layout by providing a third axis to arrange content. We utilize a default z-index scale in Bootstrap that's been designed to properly layer navigation, tooltips and popovers, modals, and more. - -These higher values start at an arbitrary number, high and specific enough to ideally avoid conflicts. We need a standard set of these across our layered components—tooltips, popovers, navbars, dropdowns, modals—so we can be reasonably consistent in the behaviors. There's no reason we couldn't have used `100`+ or `500`+. - -We don't encourage customization of these individual values; should you change one, you likely need to change them all. - -```scss -$zindex-dropdown: 1000 !default; -$zindex-sticky: 1020 !default; -$zindex-fixed: 1030 !default; -$zindex-modal-backdrop: 1040 !default; -$zindex-modal: 1050 !default; -$zindex-popover: 1060 !default; -$zindex-tooltip: 1070 !default; -``` - -To handle overlapping borders within components (e.g., buttons and inputs in input groups), we use low single digit `z-index` values of `1`, `2`, and `3` for default, hover, and active states. On hover/focus/active, we bring a particular element to the forefront with a higher `z-index` value to show their border over the sibling elements. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/migration.md b/vendor/twbs/bootstrap/site/content/docs/4.6/migration.md deleted file mode 100644 index 3ca4bea85..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/migration.md +++ /dev/null @@ -1,337 +0,0 @@ ---- -layout: docs -title: Migrating to v4 -description: Bootstrap 4 is a major rewrite of the entire project. The most notable changes are summarized below, followed by more specific changes to relevant components. -group: migration -aliases: "/migration/" -toc: true ---- - -## Stable changes - -Moving from Beta 3 to our stable v4.x release, there are no breaking changes, but there are some notable changes. - -### Printing -- Fixed broken print utilities. Previously, using a `.d-print-*` class would unexpectedly overrule any other `.d-*` class. Now, they match our other display utilities and only apply to that media (`@media print`). - -- Expanded available print display utilities to match other utilities. Beta 3 and older only had `block`, `inline-block`, `inline`, and `none`. Stable v4 added `flex`, `inline-flex`, `table`, `table-row`, and `table-cell`. - -- Fixed print preview rendering across browsers with new print styles that specify `@page` `size`. - -## Beta 3 changes - -While Beta 2 saw the bulk of our breaking changes during the beta phase, but we still have a few that needed to be addressed in the Beta 3 release. These changes apply if you're updating to Beta 3 from Beta 2 or any older version of Bootstrap. - -### Miscellaneous - -- Removed the unused `$thumbnail-transition` variable. We weren't transitioning anything, so it was just extra code. -- The npm package no longer includes any files other than our source and dist files; if you relied on them and were running our scripts via the `node_modules` folder, you should adapt your workflow. - -### Forms - -- Rewrote both custom and default checkboxes and radios. Now, both have matching HTML structure (outer `<div>` with sibling `<input>` and `<label>`) and the same layout styles (stacked default, inline with modifier class). This allows us to style the label based on the input's state, simplifying support for the `disabled` attribute (previously requiring a parent class) and better supporting our form validation. - - As part of this, we've changed the CSS for managing multiple `background-image`s on custom form checkboxes and radios. Previously, the now removed `.custom-control-indicator` element had the background color, gradient, and SVG icon. Customizing the background gradient meant replacing all of those every time you needed to change just one. Now, we have `.custom-control-label::before` for the fill and gradient and `.custom-control-label::after` handles the icon. - - To make a custom check inline, add `.custom-control-inline`. - -- Updated selector for input-based button groups. Instead of `[data-toggle="buttons"] { }` for style and behavior, we use the `data` attribute just for JS behaviors and rely on a new `.btn-group-toggle` class for styling. - -- Removed `.col-form-legend` in favor of a slightly improved `.col-form-label`. This way `.col-form-label-sm` and `.col-form-label-lg` can be used on `<legend>` elements with ease. - -- Custom file inputs received a change to their `$custom-file-text` Sass variable. It's no longer a nested Sass map and now only powers one string—the `Browse` button as that is now the only pseudo-element generated from our Sass. The `Choose file` text now comes from the `.custom-file-label`. - -### Input groups - -- Input group addons are now specific to their placement relative to an input. We've dropped `.input-group-addon` and `.input-group-btn` for two new classes, `.input-group-prepend` and `.input-group-append`. You must explicitly use an append or a prepend now, simplifying much of our CSS. Within an append or prepend, place your buttons as they would exist anywhere else, but wrap text in `.input-group-text`. - -- Validation styles are now supported, as are multiple inputs (though you can only validate one input per group). - -- Sizing classes must be on the parent `.input-group` and not the individual form elements. - -## Beta 2 changes - -While in beta, we aim to have no breaking changes. However, things don't always go as planned. Below are the breaking changes to bear in mind when moving from Beta 1 to Beta 2. - -### Breaking - -- Removed `$badge-color` variable and its usage on `.badge`. We use a color contrast function to pick a `color` based on the `background-color`, so the variable is unnecessary. -- Renamed `grayscale()` function to `gray()` to avoid breaking conflict with the CSS native `grayscale` filter. -- Renamed `.table-inverse`, `.thead-inverse`, and `.thead-default` to `.*-dark` and `.*-light`, matching our color schemes used elsewhere. -- Responsive tables now generate classes for each grid breakpoint. This breaks from Beta 1 in that the `.table-responsive` you've been using is more like `.table-responsive-md`. You may now use `.table-responsive` or `.table-responsive-{sm,md,lg,xl}` as needed. -- Dropped Bower support as the package manager has been deprecated for alternatives (e.g., Yarn or npm). [See bower/bower#2298](https://github.com/bower/bower/issues/2298) for details. -- Bootstrap still requires jQuery 1.9.1 or higher, but you're advised to use version 3.x since v3.x's supported browsers are the ones Bootstrap supports plus v3.x has some security fixes. -- Removed the unused `.form-control-label` class. If you did make use of this class, it was duplicate of the `.col-form-label` class that vertically centered a `<label>` with it's associated input in horizontal form layouts. -- Changed the `color-yiq` from a mixin that included the `color` property to a function that returns a value, allowing you to use it for any CSS property. For example, instead of `color-yiq(#000)`, you'd write `color: color-yiq(#000);`. - -### Highlights - -- Introduced new `pointer-events` usage on modals. The outer `.modal-dialog` passes through events with `pointer-events: none` for custom click handling (making it possible to just listen on the `.modal-backdrop` for any clicks), and then counteracts it for the actual `.modal-content` with `pointer-events: auto`. - - -## Summary - -Here are the big ticket items you'll want to be aware of when moving from v3 to v4. - -### Browser support - -- Dropped IE8, IE9, and iOS 6 support. v4 is now only IE10+ and iOS 7+. For sites needing either of those, use v3. -- Added official support for Android v5.0 Lollipop's Browser and WebView. Earlier versions of the Android Browser and WebView remain only unofficially supported. - -### Global changes - -- **Flexbox is enabled by default.** In general this means a move away from floats and more across our components. -- Switched from [Less](http://lesscss.org/) to [Sass](https://sass-lang.com/) for our source CSS files. -- Switched from `px` to `rem` as our primary CSS unit, though pixels are still used for media queries and grid behavior as device viewports are not affected by type size. -- Global font-size increased from `14px` to `16px`. -- Revamped grid tiers to add a fifth option (addressing smaller devices at `576px` and below) and removed the `-xs` infix from those classes. Example: `.col-6.col-sm-4.col-md-3`. -- Replaced the separate optional theme with configurable options via SCSS variables (e.g., `$enable-gradients: true`). -- Build system overhauled to use a series of npm scripts instead of Grunt. See `package.json` for all scripts, or our project readme for local development needs. -- Non-responsive usage of Bootstrap is no longer supported. -- Dropped the online Customizer in favor of more extensive setup documentation and customized builds. -- Added dozens of new [utility classes](/docs/{{< param docs_version >}}/utilities/) for common CSS property-value pairs and margin/padding spacing shortcuts. - -### Grid system - -- **Moved to flexbox.** - - Added support for flexbox in the grid mixins and predefined classes. - - As part of flexbox, included support for vertical and horizontal alignment classes. -- **Updated grid class names and a new grid tier.** - - Added a new `sm` grid tier below `768px` for more granular control. We now have `xs`, `sm`, `md`, `lg`, and `xl`. This also means every tier has been bumped up one level (so `.col-md-6` in v3 is now `.col-lg-6` in v4). - - `xs` grid classes have been modified to not require the infix to more accurately represent that they start applying styles at `min-width: 0` and not a set pixel value. Instead of `.col-xs-6`, it's now `.col-6`. All other grid tiers require the infix (e.g., `sm`). -- **Updated grid sizes, mixins, and variables.** - - Grid gutters now have a Sass map so you can specify specific gutter widths at each breakpoint. - - Updated grid mixins to utilize a `make-col-ready` prep mixin and a `make-col` to set the `flex` and `max-width` for individual column sizing. - - Changed grid system media query breakpoints and container widths to account for new grid tier and ensure columns are evenly divisible by `12` at their max width. - - Grid breakpoints and container widths are now handled via Sass maps (`$grid-breakpoints` and `$container-max-widths`) instead of a handful of separate variables. These replace the `@screen-*` variables entirely and allow you to fully customize the grid tiers. - - Media queries have also changed. Instead of repeating our media query declarations with the same value each time, we now have `@include media-breakpoint-up/down/only`. Now, instead of writing `@media (min-width: @screen-sm-min) { ... }`, you can write `@include media-breakpoint-up(sm) { ... }`. - -### Components - -- **Dropped panels, thumbnails, and wells** for a new all-encompassing component, [cards]({{< docsref "/components/card" >}}). -- **Dropped the Glyphicons icon font.** If you need icons, some options are: - - the upstream version of [Glyphicons](https://www.glyphicons.com/) - - [Octicons](https://octicons.github.com/) - - [Font Awesome](https://fontawesome.com/) - - See the [Extend page]({{< docsref "/extend/icons" >}}) for a list of alternatives. Have additional suggestions? Please open an issue or PR. -- **Dropped the Affix jQuery plugin.** - - We recommend using `position: sticky` instead. [See the HTML5 Please entry](https://html5please.com/#sticky) for details and specific polyfill recommendations. One suggestion is to use an `@supports` rule for implementing it (e.g., `@supports (position: sticky) { ... }`) - - If you were using Affix to apply additional, non-`position` styles, the polyfills might not support your use case. One option for such uses is the third-party [ScrollPos-Styler](https://github.com/acch/scrollpos-styler) library. -- **Dropped the pager component** as it was essentially slightly customized buttons. -- **Refactored nearly all components** to use more un-nested class selectors instead of over-specific children selectors. - -## By component - -This list highlights key changes by component between v3.x.x and v4.0.0. - -### Reboot - -New to Bootstrap 4 is the [Reboot]({{< docsref "/content/reboot" >}}), a new stylesheet that builds on Normalize with our own somewhat opinionated reset styles. Selectors appearing in this file only use elements—there are no classes here. This isolates our reset styles from our component styles for a more modular approach. Some of the most important resets this includes are the `box-sizing: border-box` change, moving from `em` to `rem` units on many elements, link styles, and many form element resets. - -### Typography - -- Moved all `.text-` utilities to the `_utilities.scss` file. -- Dropped `.page-header` as its styles can be applied via utilities. -- `.dl-horizontal` has been dropped. Instead, use `.row` on `<dl>` and use grid column classes (or mixins) on its `<dt>` and `<dd>` children. -- Redesigned blockquotes, moving their styles from the `<blockquote>` element to a single class, `.blockquote`. Dropped the `.blockquote-reverse` modifier for text utilities. -- `.list-inline` now requires that its children list items have the new `.list-inline-item` class applied to them. - -### Images - -- Renamed `.img-responsive` to `.img-fluid`. -- Renamed `.img-rounded` to `.rounded` -- Renamed `.img-circle` to `.rounded-circle` - -### Tables - -- Nearly all instances of the `>` selector have been removed, meaning nested tables will now automatically inherit styles from their parents. This greatly simplifies our selectors and potential customizations. -- Renamed `.table-condensed` to `.table-sm` for consistency. -- Added a new `.table-inverse` option. -- Added table header modifiers: `.thead-default` and `.thead-inverse`. -- Renamed contextual classes to have a `.table-`-prefix. Hence `.active`, `.success`, `.warning`, `.danger` and `.info` to `.table-active`, `.table-success`, `.table-warning`, `.table-danger` and `.table-info`. - -### Forms - -- Moved element resets to the `_reboot.scss` file. -- Renamed `.control-label` to `.col-form-label`. -- Renamed `.input-lg` and `.input-sm` to `.form-control-lg` and `.form-control-sm`, respectively. -- Dropped `.form-group-*` classes for simplicity's sake. Use `.form-control-*` classes instead now. -- Dropped `.help-block` and replaced it with `.form-text` for block-level help text. For inline help text and other flexible options, use utility classes like `.text-muted`. -- Dropped `.radio-inline` and `.checkbox-inline`. -- Consolidated `.checkbox` and `.radio` into `.form-check` and the various `.form-check-*` classes. -- Horizontal forms overhauled: - - Dropped the `.form-horizontal` class requirement. - - `.form-group` no longer applies styles from the `.row` via mixin, so `.row` is now required for horizontal grid layouts (e.g., `<div class="form-group row">`). - - Added new `.col-form-label` class to vertically center labels with `.form-control`s. - - Added new `.form-row` for compact form layouts with the grid classes (swap your `.row` for a `.form-row` and go). -- Added custom forms support (for checkboxes, radios, selects, and file inputs). -- Replaced `.has-error`, `.has-warning`, and `.has-success` classes with HTML5 form validation via CSS's `:invalid` and `:valid` pseudo-classes. -- Renamed `.form-control-static` to `.form-control-plaintext`. - -### Buttons - -- Renamed `.btn-default` to `.btn-secondary`. -- Dropped the `.btn-xs` class entirely as `.btn-sm` is proportionally much smaller than v3's. -- The [stateful button](https://getbootstrap.com/docs/3.3/javascript/#buttons-stateful) feature of the `button.js` jQuery plugin has been dropped. This includes the `$().button(string)` and `$().button('reset')` methods. We advise using a tiny bit of custom JavaScript instead, which will have the benefit of behaving exactly the way you want it to. - - Note that the other features of the plugin (button checkboxes, button radios, single-toggle buttons) have been retained in v4. -- Change buttons' `[disabled]` to `:disabled` as IE9+ supports `:disabled`. However `fieldset[disabled]` is still necessary because [native disabled fieldsets are still buggy in IE11](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#Browser_compatibility). - -### Button group - -- Rewrote component with flexbox. -- Removed `.btn-group-justified`. As a replacement you can use `<div class="btn-group d-flex" role="group"></div>` as a wrapper around elements with `.w-100`. -- Dropped the `.btn-group-xs` class entirely given removal of `.btn-xs`. -- Removed explicit spacing between button groups in button toolbars; use margin utilities now. -- Improved documentation for use with other components. - -### Dropdowns - -- Switched from parent selectors to singular classes for all components, modifiers, etc. -- Simplified dropdown styles to no longer ship with upward or downward facing arrows attached to the dropdown menu. -- Dropdowns can be built with `<div>`s or `<ul>`s now. -- Rebuilt dropdown styles and markup to provide easy, built-in support for `<a>` and `<button>` based dropdown items. -- Renamed `.divider` to `.dropdown-divider`. -- Dropdown items now require `.dropdown-item`. -- Dropdown toggles no longer require an explicit `<span class="caret"></span>`; this is now provided automatically via CSS's `::after` on `.dropdown-toggle`. - -### Grid system - -- Added a new `576px` grid breakpoint as `sm`, meaning there are now five total tiers (`xs`, `sm`, `md`, `lg`, and `xl`). -- Renamed the responsive grid modifier classes from `.col-{breakpoint}-{modifier}-{size}` to `.{modifier}-{breakpoint}-{size}` for simpler grid classes. -- Dropped push and pull modifier classes for the new flexbox-powered `order` classes. For example, instead of `.col-8.push-4` and `.col-4.pull-8`, you'd use `.col-8.order-2` and `.col-4.order-1`. -- Added flexbox utility classes for grid system and components. - -### List groups - -- Rewrote component with flexbox. -- Replaced `a.list-group-item` with an explicit class, `.list-group-item-action`, for styling link and button versions of list group items. -- Added `.list-group-flush` class for use with cards. - -### Modal - -- Rewrote component with flexbox. -- Given the move to flexbox, alignment of dismiss icons in the header is likely broken as we're no longer using floats. Floated content comes first, but with flexbox that's no longer the case. Update your dismiss icons to come after modal titles to fix. -- The `remote` option (which could be used to automatically load and inject external content into a modal) and the corresponding `loaded.bs.modal` event were removed. We recommend instead using client-side templating or a data binding framework, or calling [jQuery.load](https://api.jquery.com/load/) yourself. - -### Navs - -- Rewrote component with flexbox. -- Dropped nearly all `>` selectors for simpler styling via un-nested classes. -- Instead of HTML-specific selectors like `.nav > li > a`, we use separate classes for `.nav`s, `.nav-item`s, and `.nav-link`s. This makes your HTML more flexible while bringing along increased extensibility. - -### Navbar - -The navbar has been entirely rewritten in flexbox with improved support for alignment, responsiveness, and customization. - -- Responsive navbar behaviors are now applied to the `.navbar` class via the **required** `.navbar-expand-{breakpoint}` where you choose where to collapse the navbar. Previously this was a Less variable modification and required recompiling. -- `.navbar-default` is now `.navbar-light`, though `.navbar-dark` remains the same. **One of these is required on each navbar.** However, these classes no longer set `background-color`s; instead they essentially only affect `color`. -- Navbars now require a background declaration of some kind. Choose from our background utilities (`.bg-*`) or set your own with the light/inverse classes above [for mad customization]({{< docsref "/components/navbar#color-schemes" >}}). -- Given flexbox styles, navbars can now use flexbox utilities for easy alignment options. -- `.navbar-toggle` is now `.navbar-toggler` and has different styles and inner markup (no more three `<span>`s). -- Dropped the `.navbar-form` class entirely. It's no longer necessary; instead, just use `.form-inline` and apply margin utilities as necessary. -- Navbars no longer include `margin-bottom` or `border-radius` by default. Use utilities as necessary. -- All examples featuring navbars have been updated to include new markup. - -### Pagination - -- Rewrote component with flexbox. -- Explicit classes (`.page-item`, `.page-link`) are now required on the descendants of `.pagination`s -- Dropped the `.pager` component entirely as it was little more than customized outline buttons. - -### Breadcrumbs - -- An explicit class, `.breadcrumb-item`, is now required on the descendants of `.breadcrumb`s - -### Labels and badges - -- Consolidated `.label` and `.badge` to disambiguate from the `<label>` element and simplify related components. -- Added `.badge-pill` as modifier for rounded "pill" look. -- Badges are no longer floated automatically in list groups and other components. Utility classes are now required for that. -- `.badge-default` has been dropped and `.badge-secondary` added to match component modifier classes used elsewhere. - -### Panels, thumbnails, and wells - -Dropped entirely for the new card component. - -### Panels - -- `.panel` to `.card`, now built with flexbox. -- `.panel-default` removed and no replacement. -- `.panel-group` removed and no replacement. `.card-group` is not a replacement, it is different. -- `.panel-heading` to `.card-header` -- `.panel-title` to `.card-title`. Depending on the desired look, you may also want to use [heading elements or classes]({{< docsref "/content/typography#headings" >}}) (e.g. `<h3>`, `.h3`) or bold elements or classes (e.g. `<strong>`, `<b>`, [`.font-weight-bold`]({{< docsref "/utilities/text#font-weight-and-italics" >}})). Note that `.card-title`, while similarly named, produces a different look than `.panel-title`. -- `.panel-body` to `.card-body` -- `.panel-footer` to `.card-footer` -- `.panel-primary`, `.panel-success`, `.panel-info`, `.panel-warning`, and `.panel-danger` have been dropped for `.bg-`, `.text-`, and `.border` utilities generated from our `$theme-colors` Sass map. - -### Progress - -- Replaced contextual `.progress-bar-*` classes with `.bg-*` utilities. For example, `class="progress-bar progress-bar-danger"` becomes `class="progress-bar bg-danger"`. -- Replaced `.active` for animated progress bars with `.progress-bar-animated`. - -### Carousel - -- Overhauled the entire component to simplify design and styling. We have fewer styles for you to override, new indicators, and new icons. -- All CSS has been un-nested and renamed, ensuring each class is prefixed with `.carousel-`. - - For carousel items, `.next`, `.prev`, `.left`, and `.right` are now `.carousel-item-next`, `.carousel-item-prev`, `.carousel-item-left`, and `.carousel-item-right`. - - `.item` is also now `.carousel-item`. - - For prev/next controls, `.carousel-control.right` and `.carousel-control.left` are now `.carousel-control-next` and `.carousel-control-prev`, meaning they no longer require a specific base class. -- Removed all responsive styling, deferring to utilities (e.g., showing captions on certain viewports) and custom styles as needed. -- Removed image overrides for images in carousel items, deferring to utilities. -- Tweaked the Carousel example to include the new markup and styles. - -### Tables - -- Removed support for styled nested tables. All table styles are now inherited in v4 for simpler selectors. -- Added inverse table variant. - -### Utilities - -- **Display, hidden, and more:** - - Made display utilities responsive (e.g., `.d-none` and `d-{sm,md,lg,xl}-none`). - - Dropped the bulk of `.hidden-*` utilities for new [display utilities]({{< docsref "/utilities/display" >}}). For example, instead of `.hidden-sm-up`, use `.d-sm-none`. Renamed the `.hidden-print` utilities to use the display utility naming scheme. More info under the [Responsive utilities](#responsive-utilities) section of this page. - - Added `.float-{sm,md,lg,xl}-{left,right,none}` classes for responsive floats and removed `.pull-left` and `.pull-right` since they're redundant to `.float-left` and `.float-right`. -- **Type:** - - Added responsive variations to our text alignment classes `.text-{sm,md,lg,xl}-{left,center,right}`. -- **Alignment and spacing:** - - Added new [responsive margin and padding utilities]({{< docsref "/utilities/spacing" >}}) for all sides, plus vertical and horizontal shorthands. - - Added boatload of [flexbox utilities]({{< docsref "/utilities/flex" >}}). - - Dropped `.center-block` for the new `.mx-auto` class. -- Clearfix updated to drop support for older browser versions. - -### Vendor prefix mixins - -Bootstrap 3's [vendor prefix](https://www.lifewire.com/css-vendor-prefixes-3466867) mixins, which were deprecated in v3.2.0, have been removed in Bootstrap 4. Since we use [Autoprefixer](https://github.com/postcss/autoprefixer), they're no longer necessary. - -Removed the following mixins: `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-timing-function`, `backface-visibility`, `box-sizing`, `content-columns`, `hyphens`, `opacity`, `perspective`, `perspective-origin`, `rotate`, `rotateX`, `rotateY`, `scale`, `scaleX`, `scaleY`, `skew`, `transform-origin`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `transition-transform`, `translate`, `translate3d`, `user-select` - -## Documentation - -Our documentation received an upgrade across the board as well. Here's the low down: - -- We're still using Jekyll, but we have plugins in the mix: - - `bugify.rb` is used to efficiently list out the entries on our [browser bugs]({{< docsref "/browser-bugs" >}}) page. - - `example.rb` is a custom fork of the default `highlight.rb` plugin, allowing for easier example-code handling. - - `callout.rb` is a similar custom fork of that, but designed for our special docs callouts. - - [jekyll-toc](https://github.com/toshimaru/jekyll-toc) is used to generate our table of contents. -- All docs content has been rewritten in Markdown (instead of HTML) for easier editing. -- Pages have been reorganized for simpler content and a more approachable hierarchy. -- We moved from regular CSS to SCSS to take full advantage of Bootstrap's variables, mixins, and more. - -### Responsive utilities - -All `@screen-` variables have been removed in v4.0.0. Use the `media-breakpoint-up()`, `media-breakpoint-down()`, or `media-breakpoint-only()` Sass mixins or the `$grid-breakpoints` Sass map instead. - -Our responsive utility classes have largely been removed in favor of explicit `display` utilities. - -- The `.hidden` and `.show` classes have been removed because they conflicted with jQuery's `$(...).hide()` and `$(...).show()` methods. Instead, try toggling the `[hidden]` attribute or use inline styles like `style="display: none;"` and `style="display: block;"`. -- All `.hidden-` classes have been removed, save for the print utilities which have been renamed. - - Removed from v3: `.hidden-xs` `.hidden-sm` `.hidden-md` `.hidden-lg` `.visible-xs-block` `.visible-xs-inline` `.visible-xs-inline-block` `.visible-sm-block` `.visible-sm-inline` `.visible-sm-inline-block` `.visible-md-block` `.visible-md-inline` `.visible-md-inline-block` `.visible-lg-block` `.visible-lg-inline` `.visible-lg-inline-block` - - Removed from v4 alphas: `.hidden-xs-up` `.hidden-xs-down` `.hidden-sm-up` `.hidden-sm-down` `.hidden-md-up` `.hidden-md-down` `.hidden-lg-up` `.hidden-lg-down` -- Print utilities no longer start with `.hidden-` or `.visible-`, but with `.d-print-`. - - Old names: `.visible-print-block`, `.visible-print-inline`, `.visible-print-inline-block`, `.hidden-print` - - New classes: `.d-print-block`, `.d-print-inline`, `.d-print-inline-block`, `.d-print-none` - -Rather than using explicit `.visible-*` classes, you make an element visible by simply not hiding it at that screen size. You can combine one `.d-*-none` class with one `.d-*-block` class to show an element only on a given interval of screen sizes (e.g. `.d-none.d-md-block.d-xl-none` shows the element only on medium and large devices). - -Note that the changes to the grid breakpoints in v4 means that you'll need to go one breakpoint larger to achieve the same results. The new responsive utility classes don't attempt to accommodate less common cases where an element's visibility can't be expressed as a single contiguous range of viewport sizes; you will instead need to use custom CSS in such cases. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/borders.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/borders.md deleted file mode 100644 index c29d73d6a..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/borders.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -layout: docs -title: Borders -description: Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element. -group: utilities -aliases: "/docs/4.6/utilities/" -toc: true ---- - -## Border - -Use border utilities to add or remove an element's borders. Choose from all borders or one at a time. - -### Additive - -{{< example class="bd-example-border-utils">}} -<span class="border"></span> -<span class="border-top"></span> -<span class="border-right"></span> -<span class="border-bottom"></span> -<span class="border-left"></span> -{{< /example >}} - -### Subtractive - -{{< example class="bd-example-border-utils bd-example-border-utils-0" >}} -<span class="border-0"></span> -<span class="border-top-0"></span> -<span class="border-right-0"></span> -<span class="border-bottom-0"></span> -<span class="border-left-0"></span> -{{< /example >}} - -## Border color - -Change the border color using utilities built on our theme colors. - -{{< example class="bd-example-border-utils" >}} -{{< border.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<span class="border border-{{ .name }}"></span> -{{- end -}} -{{< /border.inline >}} -<span class="border border-white"></span> -{{< /example >}} - -## Border-radius - -Add classes to an element to easily round its corners. - -{{< example>}} -{{< placeholder width="75" height="75" class="rounded" title="Example rounded image" >}} -{{< placeholder width="75" height="75" class="rounded-top" title="Example top rounded image" >}} -{{< placeholder width="75" height="75" class="rounded-right" title="Example right rounded image" >}} -{{< placeholder width="75" height="75" class="rounded-bottom" title="Example bottom rounded image" >}} -{{< placeholder width="75" height="75" class="rounded-left" title="Example left rounded image" >}} -{{< placeholder width="75" height="75" class="rounded-circle" title="Completely round image" >}} -{{< placeholder width="150" height="75" class="rounded-pill" title="Rounded pill image" >}} -{{< placeholder width="75" height="75" class="rounded-0" title="Example non-rounded image (overrides rounding applied elsewhere)" >}} -{{< /example >}} - -## Sizes - -Use `.rounded-lg` or `.rounded-sm` for larger or smaller border-radius. - -{{< example >}} -{{< placeholder width="75" height="75" class="rounded-sm" title="Example small rounded image" >}} -{{< placeholder width="75" height="75" class="rounded-lg" title="Example large rounded image" >}} -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/close-icon.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/close-icon.md deleted file mode 100644 index 8329fd94b..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/close-icon.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: docs -title: Close icon -description: Use a generic close icon for dismissing content like modals and alerts. -group: utilities ---- - -**Be sure to include text for screen readers**, as we've done with `aria-label`. - -{{< example >}} -<button type="button" class="close" aria-label="Close"> - <span aria-hidden="true">×</span> -</button> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/colors.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/colors.md deleted file mode 100644 index 947411747..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/colors.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -layout: docs -title: Colors -description: Convey meaning through color with a handful of color utility classes. Includes support for styling links with hover states, too. -group: utilities -toc: true ---- - -{{< callout info >}} -#### Dealing with specificity - -Sometimes contextual classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a `<div>` with the class. -{{< /callout >}} - -{{< callout warning >}} -{{< partial "callout-warning-color-assistive-technologies.md" >}} -{{< /callout >}} - -## Color - -{{< example >}} -{{< colors.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<p class="text-{{ .name }}{{ if eq .name "light" }} bg-dark{{ end }}">.text-{{ .name }}</p> -{{- end -}} -{{< /colors.inline >}} -<p class="text-body">.text-body</p> -<p class="text-muted">.text-muted</p> -<p class="text-white bg-dark">.text-white</p> -<p class="text-black-50">.text-black-50</p> -<p class="text-white-50 bg-dark">.text-white-50</p> -{{< /example >}} - -Contextual text classes also work well on anchors with the provided hover and focus states. **Note that the `.text-white` and `.text-muted` class has no additional link styling beyond underline.** - -{{< example >}} -{{< colors.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<p><a href="#" class="text-{{ .name }}{{ if eq .name "light" }} bg-dark{{ end }}">{{ .name | title }} link</a></p> -{{- end -}} -{{< /colors.inline >}} -<p><a href="#" class="text-muted">Muted link</a></p> -<p><a href="#" class="text-white bg-dark">White link</a></p> -{{< /example >}} - -## Background color - -Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities. - -{{< example >}} -{{< colors.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -<div class="p-3 mb-2 bg-{{ .name }} {{ if or (eq .name "light") (eq .name "warning") }}text-dark{{ else }}text-white{{ end }}">.bg-{{ .name }}</div> -{{- end -}} -{{< /colors.inline >}} -<div class="p-3 mb-2 bg-white text-dark">.bg-white</div> -<div class="p-3 mb-2 bg-transparent text-dark">.bg-transparent</div> -{{< /example >}} - -## Background gradient - -When `$enable-gradients` is set to `true` (default is `false`), you can use `.bg-gradient-` utility classes. [Learn about our Sass options]({{< docsref "/getting-started/theming#sass-options" >}}) to enable these classes and more. - -{{< markdown >}} -{{< colors.inline >}} -{{- range (index $.Site.Data "theme-colors") }} -- `.bg-gradient-{{ .name }}` -{{- end -}} -{{< /colors.inline >}} -{{< /markdown >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/embed.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/embed.md deleted file mode 100644 index 860ea1953..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/embed.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -layout: docs -title: Embeds -description: Create responsive video or slideshow embeds based on the width of the parent by creating an intrinsic ratio that scales on any device. -group: utilities -toc: true ---- - -## About - -Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` elements; optionally use an explicit descendant class `.embed-responsive-item` when you want to match the styling for other attributes. - -**Pro-Tip!** You don't need to include `frameborder="0"` in your `<iframe>`s as we override that for you. - -## Example - -Wrap any embed like an `<iframe>` in a parent element with `.embed-responsive` and an aspect ratio. The `.embed-responsive-item` isn't strictly required, but we encourage it. - -{{< example >}} -<div class="embed-responsive embed-responsive-16by9"> - <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe> -</div> -{{< /example >}} - -## Aspect ratios - -Aspect ratios can be customized with modifier classes. By default the following ratio classes are provided: - -```html -<!-- 21:9 aspect ratio --> -<div class="embed-responsive embed-responsive-21by9"> - <iframe class="embed-responsive-item" src="..."></iframe> -</div> - -<!-- 16:9 aspect ratio --> -<div class="embed-responsive embed-responsive-16by9"> - <iframe class="embed-responsive-item" src="..."></iframe> -</div> - -<!-- 4:3 aspect ratio --> -<div class="embed-responsive embed-responsive-4by3"> - <iframe class="embed-responsive-item" src="..."></iframe> -</div> - -<!-- 1:1 aspect ratio --> -<div class="embed-responsive embed-responsive-1by1"> - <iframe class="embed-responsive-item" src="..."></iframe> -</div> -``` - -Within `_variables.scss`, you can change the aspect ratios you want to use. Here's an example of the `$embed-responsive-aspect-ratios` list: - -```scss -$embed-responsive-aspect-ratios: ( - (21 9), - (16 9), - (4 3), - (1 1) -) !default; -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/image-replacement.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/image-replacement.md deleted file mode 100644 index d3bdf63aa..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/image-replacement.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -layout: docs -title: Image replacement -description: Swap text for background images with the image replacement class. -group: utilities ---- - -{{< callout warning >}} -##### Warning - -The `text-hide()` class and mixin has been deprecated as of v4.1. It will be removed entirely in v5. -{{< /callout >}} - -Utilize the `.text-hide` class or mixin to help replace an element's text content with a background image. - -```html -<h1 class="text-hide">Custom heading</h1> -``` - -```scss -// Usage as a mixin -.heading { - @include text-hide; -} -``` - -Use the `.text-hide` class to maintain the accessibility and SEO benefits of heading tags, but want to utilize a `background-image` instead of text. - -<div class="bd-example"> - <h1 class="text-hide" style="background-image: url('/docs/{{< param docs_version >}}/assets/brand/bootstrap-solid.svg'); width: 50px; height: 50px;">Bootstrap</h1> -</div> - -```html -<h1 class="text-hide" style="background-image: url('...');">Bootstrap</h1> -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/interactions.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/interactions.md deleted file mode 100644 index b808dc5b6..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/interactions.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: docs -title: Interactions -description: Utility classes that change how users interact with the contents of a website. -group: utilities ---- - -## Text selection - -Change how the content is selected when the user interacts with it. Note that Internet Explorer and Legacy Edge have no support for the `all` value for `user-select`, and as such, **`.user-select-all` is not supported by either browser.** - -{{< example >}} -<p class="user-select-all">This paragraph will be entirely selected when clicked by the user.</p> -<p class="user-select-auto">This paragraph has the default select behavior.</p> -<p class="user-select-none">This paragraph will not be selectable when clicked by the user.</p> -{{< /example >}} - -Customize the available classes by changing the `$user-selects` Sass list in `_variables.scss`. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/overflow.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/overflow.md deleted file mode 100644 index 079da225e..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/overflow.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: docs -title: Overflow -description: Use these shorthand utilities for quickly configuring how content overflows an element. -group: utilities ---- - -Barebones `overflow` functionality is provided for two values by default, and they are not responsive. - -<div class="bd-example d-md-flex"> - <div class="overflow-auto p-3 mb-3 mb-md-0 mr-md-3 bg-light" style="max-width: 260px; max-height: 100px;"> - This is an example of using <code>.overflow-auto</code> on an element with set width and height dimensions. By design, this content will vertically scroll. - </div> - <div class="overflow-hidden p-3 bg-light" style="max-width: 260px; max-height: 100px;"> - This is an example of using <code>.overflow-hidden</code> on an element with set width and height dimensions. - </div> -</div> - -```html -<div class="overflow-auto">...</div> -<div class="overflow-hidden">...</div> -``` - -Using Sass variables, you may customize the overflow utilities by changing the `$overflows` variable in `_variables.scss`. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/screen-readers.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/screen-readers.md deleted file mode 100644 index 4e2260914..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/screen-readers.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: docs -title: Screen readers -description: Use screen reader utilities to hide elements on all devices except screen readers. -group: utilities ---- - -Hide an element to all devices **except screen readers** with `.sr-only`. Combine `.sr-only` with `.sr-only-focusable` to show the element again when it's focused (e.g. by a keyboard-only user). Can also be used as mixins. - -{{< example >}} -<a class="sr-only sr-only-focusable" href="#content">Skip to main content</a> -{{< /example >}} - -```scss -// Usage as a mixin -.skip-navigation { - @include sr-only; - @include sr-only-focusable; -} -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/shadows.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/shadows.md deleted file mode 100644 index 2803031d6..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/shadows.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -layout: docs -title: Shadows -description: Add or remove shadows to elements with box-shadow utilities. -group: utilities ---- - -## Examples - -While shadows on components are disabled by default in Bootstrap and can be enabled via `$enable-shadows`, you can also quickly add or remove a shadow with our `box-shadow` utility classes. Includes support for `.shadow-none` and three default sizes (which have associated variables to match). - -{{< example >}} -<div class="shadow-none p-3 mb-5 bg-light rounded">No shadow</div> -<div class="shadow-sm p-3 mb-5 bg-white rounded">Small shadow</div> -<div class="shadow p-3 mb-5 bg-white rounded">Regular shadow</div> -<div class="shadow-lg p-3 mb-5 bg-white rounded">Larger shadow</div> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/spacing.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/spacing.md deleted file mode 100644 index 01eeac67d..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/spacing.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -layout: docs -title: Spacing -description: Bootstrap includes a wide range of shorthand responsive margin and padding utility classes to modify an element's appearance. -group: utilities -toc: true ---- - -## How it works - -Assign responsive-friendly `margin` or `padding` values to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. Classes are built from a default Sass map ranging from `.25rem` to `3rem`. - -## Notation - -Spacing utilities that apply to all breakpoints, from `xs` to `xl`, have no breakpoint abbreviation in them. This is because those classes are applied from `min-width: 0` and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation. - -The classes are named using the format `{property}{sides}-{size}` for `xs` and `{property}{sides}-{breakpoint}-{size}` for `sm`, `md`, `lg`, and `xl`. - -Where *property* is one of: - -* `m` - for classes that set `margin` -* `p` - for classes that set `padding` - -Where *sides* is one of: - -* `t` - for classes that set `margin-top` or `padding-top` -* `b` - for classes that set `margin-bottom` or `padding-bottom` -* `l` - for classes that set `margin-left` or `padding-left` -* `r` - for classes that set `margin-right` or `padding-right` -* `x` - for classes that set both `*-left` and `*-right` -* `y` - for classes that set both `*-top` and `*-bottom` -* blank - for classes that set a `margin` or `padding` on all 4 sides of the element - -Where *size* is one of: - -* `0` - for classes that eliminate the `margin` or `padding` by setting it to `0` -* `1` - (by default) for classes that set the `margin` or `padding` to `$spacer * .25` -* `2` - (by default) for classes that set the `margin` or `padding` to `$spacer * .5` -* `3` - (by default) for classes that set the `margin` or `padding` to `$spacer` -* `4` - (by default) for classes that set the `margin` or `padding` to `$spacer * 1.5` -* `5` - (by default) for classes that set the `margin` or `padding` to `$spacer * 3` -* `auto` - for classes that set the `margin` to auto - -(You can add more sizes by adding entries to the `$spacers` Sass map variable.) - -## Examples - -Here are some representative examples of these classes: - -```scss -.mt-0 { - margin-top: 0 !important; -} - -.ml-1 { - margin-left: ($spacer * .25) !important; -} - -.px-2 { - padding-left: ($spacer * .5) !important; - padding-right: ($spacer * .5) !important; -} - -.p-3 { - padding: $spacer !important; -} -``` - -### Horizontal centering - -Additionally, Bootstrap also includes an `.mx-auto` class for horizontally centering fixed-width block level content—that is, content that has `display: block` and a `width` set—by setting the horizontal margins to `auto`. - -<div class="bd-example"> - <div class="mx-auto" style="width: 200px; background-color: rgba(86,61,124,.15);"> - Centered element - </div> -</div> - -```html -<div class="mx-auto" style="width: 200px;"> - Centered element -</div> -``` - -### Negative margin - -In CSS, `margin` properties can utilize negative values (`padding` cannot). As of 4.2, we've added negative margin utilities for every non-zero integer size listed above (e.g., `1`, `2`, `3`, `4`, `5`). These utilities are ideal for customizing grid column gutters across breakpoints. - -The syntax is nearly the same as the default, positive margin utilities, but with the addition of `n` before the requested size. Here's an example class that's the opposite of `.mt-1`: - -```scss -.mt-n1 { - margin-top: -0.25rem !important; -} -``` - -Here's an example of customizing the Bootstrap grid at the medium (`md`) breakpoint and above. We've increased the `.col` padding with `.px-md-5` and then counteracted that with `.mx-md-n5` on the parent `.row`. - -{{< example >}} -<div class="row mx-md-n5"> - <div class="col px-md-5"><div class="p-3 border bg-light">Custom column padding</div></div> - <div class="col px-md-5"><div class="p-3 border bg-light">Custom column padding</div></div> -</div> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/text.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/text.md deleted file mode 100644 index 8caf2019b..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/text.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -layout: docs -title: Text -description: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more. -group: utilities -toc: true ---- - -## Text alignment - -Easily realign text to components with text alignment classes. - -{{< example >}} -<p class="text-justify">Some placeholder text to demonstrate justified text alignment. Will you do the same for me? It's time to face the music I'm no longer your muse. Heard it's beautiful, be the judge and my girls gonna take a vote. I can feel a phoenix inside of me. Heaven is jealous of our love, angels are crying from up above. Yeah, you take me to utopia.</p> -{{< /example >}} - -For left, right, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system. - -{{< example >}} -<p class="text-left">Left aligned text on all viewport sizes.</p> -<p class="text-center">Center aligned text on all viewport sizes.</p> -<p class="text-right">Right aligned text on all viewport sizes.</p> - -<p class="text-sm-left">Left aligned text on viewports sized SM (small) or wider.</p> -<p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p> -<p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p> -<p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p> -{{< /example >}} - -## Text wrapping and overflow - -Wrap text with a `.text-wrap` class. - -{{< example >}} -<div class="badge badge-primary text-wrap" style="width: 6rem;"> - This text should wrap. -</div> -{{< /example >}} - -Prevent text from wrapping with a `.text-nowrap` class. - -{{< example >}} -<div class="text-nowrap bd-highlight" style="width: 8rem;"> - This text should overflow the parent. -</div> -{{< /example >}} - -For longer content, you can add a `.text-truncate` class to truncate the text with an ellipsis. **Requires `display: inline-block` or `display: block`.** - -{{< example >}} -<!-- Block level --> -<div class="row"> - <div class="col-2 text-truncate"> - Praeterea iter est quasdam res quas ex communi. - </div> -</div> - -<!-- Inline level --> -<span class="d-inline-block text-truncate" style="max-width: 150px;"> - Praeterea iter est quasdam res quas ex communi. -</span> -{{< /example >}} - -## Word break - -Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-wrap: break-word` and `word-break: break-word`. We use `word-wrap` instead of the more common `overflow-wrap` for wider browser support, and add the deprecated `word-break: break-word` to avoid issues with flex containers. - -{{< example >}} -<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p> -{{< /example >}} - -## Text transform - -Transform text in components with text capitalization classes. - -{{< example >}} -<p class="text-lowercase">Lowercased text.</p> -<p class="text-uppercase">Uppercased text.</p> -<p class="text-capitalize">CapiTaliZed text.</p> -{{< /example >}} - -Note how `.text-capitalize` only changes the first letter of each word, leaving the case of any other letters unaffected. - -## Font weight and italics - -Quickly change the weight (boldness) of text or italicize text. - -{{< example >}} -<p class="font-weight-bold">Bold text.</p> -<p class="font-weight-bolder">Bolder weight text (relative to the parent element).</p> -<p class="font-weight-normal">Normal weight text.</p> -<p class="font-weight-light">Light weight text.</p> -<p class="font-weight-lighter">Lighter weight text (relative to the parent element).</p> -<p class="font-italic">Italic text.</p> -{{< /example >}} - -## Monospace - -Change a selection to our monospace font stack with `.text-monospace`. - -{{< example >}} -<p class="text-monospace">This is in monospace</p> -{{< /example >}} - -## Reset color - -Reset a text or link's color with `.text-reset`, so that it inherits the color from its parent. - -{{< example >}} -<p class="text-muted"> - Muted text with a <a href="#" class="text-reset">reset link</a>. -</p> -{{< /example >}} - -## Text decoration - -Remove a text decoration with a `.text-decoration-none` class. - -{{< example >}} -<a href="#" class="text-decoration-none">Non-underlined link</a> -{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/visibility.md b/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/visibility.md deleted file mode 100644 index 68f8508fd..000000000 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/visibility.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: docs -title: Visibility -description: Control the visibility, without modifying the display, of elements with visibility utilities. -group: utilities ---- - -Set the `visibility` of elements with our visibility utilities. These utility classes do not modify the `display` value at all and do not affect layout – `.invisible` elements still take up space in the page. Content will be hidden both visually and for assistive technology/screen reader users. - -Apply `.visible` or `.invisible` as needed. - -```html -<div class="visible">...</div> -<div class="invisible">...</div> -``` - -```scss -// Class -.visible { - visibility: visible !important; -} -.invisible { - visibility: hidden !important; -} - -// Usage as a mixin -// Warning: The `invisible()` mixin has been deprecated as of v4.3.0. It will be removed entirely in v5. -.element { - @include invisible(visible); -} -.element { - @include invisible(hidden); -} -``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/_index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/_index.html new file mode 100644 index 000000000..0a758d2bf --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/_index.html @@ -0,0 +1,5 @@ +--- +layout: redirect +sitemap_exclude: true +redirect: "/docs/5.0/getting-started/introduction/" +--- diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/about/brand.md b/vendor/twbs/bootstrap/site/content/docs/5.0/about/brand.md new file mode 100644 index 000000000..80c613526 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/about/brand.md @@ -0,0 +1,47 @@ +--- +layout: docs +title: Brand guidelines +description: Documentation and examples for Bootstrap's logo and brand usage guidelines. +group: about +toc: true +--- + +Have a need for Bootstrap's brand resources? Great! We have only a few guidelines we follow, and in turn ask you to follow as well. + +## Logo + +When referencing Bootstrap, use our logo mark. Do not modify our logos in any way. Do not use Bootstrap's branding for your own open or closed source projects. **Do not use the Twitter name or logo** in association with Bootstrap. + +<div class="bd-brand-item px-2 py-5 mb-3 bg-light rounded-lg"> + <img class="d-block img-fluid mx-auto" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="Bootstrap" width="256" height="204"> +</div> + +Our logo mark is also available in black and white. All rules for our primary logo apply to these as well. + +<div class="bd-brand-logos d-sm-flex text-center bg-light rounded-lg overflow-hidden w-100 mb-3"> + <div class="bd-brand-item w-100 px-2 py-5"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-black.svg" alt="Bootstrap" width="128" height="102" loading="lazy"> + </div> + <div class="bd-brand-item w-100 px-2 py-5 inverse"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt="Bootstrap" width="128" height="102" loading="lazy"> + </div> +</div> + +## Name + +Bootstrap should always be referred to as just **Bootstrap**. No Twitter before it and no capital _s_. + +<div class="bd-brand-logos d-sm-flex text-center bg-light rounded-lg overflow-hidden w-100 mb-3"> + <div class="bd-brand-item w-100 p-3"> + <div class="h3">Bootstrap</div> + <strong class="text-success">Correct</strong> + </div> + <div class="bd-brand-item w-100 p-3"> + <div class="h3 text-muted">BootStrap</div> + <strong class="text-danger">Incorrect</strong> + </div> + <div class="bd-brand-item w-100 p-3"> + <div class="h3 text-muted">Twitter Bootstrap</div> + <strong class="text-danger">Incorrect</strong> + </div> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/about/license.md b/vendor/twbs/bootstrap/site/content/docs/5.0/about/license.md index c7f130203..07e60e00a 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/about/license.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/about/license.md @@ -7,18 +7,18 @@ group: about Bootstrap is released under the MIT license and is copyright {{< year >}} Twitter. Boiled down to smaller chunks, it can be described with the following conditions. -#### It requires you to: +## It requires you to: -* Keep the license and copyright notice included in Bootstrap's CSS and JavaScript files when you use them in your works +- Keep the license and copyright notice included in Bootstrap's CSS and JavaScript files when you use them in your works -#### It permits you to: +## It permits you to: - Freely download and use Bootstrap, in whole or in part, for personal, private, company internal, or commercial purposes - Use Bootstrap in packages or distributions that you create - Modify the source code - Grant a sublicense to modify and distribute Bootstrap to third parties not included in the license -#### It forbids you to: +## It forbids you to: - Hold the authors and license owners liable for damages as Bootstrap is provided without warranty - Hold the creators or copyright holders of Bootstrap liable @@ -26,7 +26,7 @@ Bootstrap is released under the MIT license and is copyright {{< year >}} Twitte - Use any marks owned by Twitter in any way that might state or imply that Twitter endorses your distribution - Use any marks owned by Twitter in any way that might state or imply that you created the Twitter software in question -#### It does not require you to: +## It does not require you to: - Include the source of Bootstrap itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it - Submit changes that you make to Bootstrap back to the Bootstrap project (though such feedback is encouraged) diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/about/overview.md b/vendor/twbs/bootstrap/site/content/docs/5.0/about/overview.md index 5fcea6a8b..0c2fc64c6 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/about/overview.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/about/overview.md @@ -5,7 +5,7 @@ description: Learn more about the team maintaining Bootstrap, how and why the pr group: about aliases: - "/about/" - - "/docs/4.6/about/" + - "/docs/5.0/about/" --- ## Team @@ -22,6 +22,8 @@ Originally [released](https://blog.twitter.com/developer/en_us/a/2011/bootstrap- With Bootstrap 4, we once again rewrote the project to account for two key architectural changes: a migration to Sass and the move to CSS's flexbox. Our intention is to help in a small way to move the web development community forward by pushing for newer CSS properties, fewer dependencies, and new technologies across more modern browsers. +Our latest release, Bootstrap 5, focuses on improving v4's codebase with as few major breaking changes as possible. We improved existing features and components, removed support for older browsers, dropped jQuery for regular JavaScript, and embraced more future-friendly technologies like CSS custom properties as part of our tooling. + ## Get involved Get involved with Bootstrap development by [opening an issue]({{< param repo >}}/issues/new) or submitting a pull request. Read our [contributing guidelines]({{< param repo >}}/blob/v{{< param current_version >}}/.github/CONTRIBUTING.md) for information on how we develop. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/about/team.md b/vendor/twbs/bootstrap/site/content/docs/5.0/about/team.md index fd1d6bfa6..3c1666f29 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/about/team.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/about/team.md @@ -11,7 +11,7 @@ Bootstrap is maintained by the founding team and a small group of invaluable cor <div class="list-group mb-3"> {{- range (index $.Site.Data "core-team") }} <a class="list-group-item list-group-item-action d-flex align-items-center" href="https://github.com/{{ .user }}"> - <img src="https://github.com/{{ .user }}.png" alt="@{{ .user }}" width="32" height="32" class="rounded mr-2" loading="lazy"> + <img src="https://github.com/{{ .user }}.png" alt="@{{ .user }}" width="32" height="32" class="rounded me-2" loading="lazy"> <span> <strong>{{ .name }}</strong> @{{ .user }} </span> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/about/translations.md b/vendor/twbs/bootstrap/site/content/docs/5.0/about/translations.md index e719e3a84..e719e3a84 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/about/translations.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/about/translations.md 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 >}} +<div class="accordion" id="accordionExample"> + <div class="accordion-item"> + <h2 class="accordion-header" id="headingOne"> + <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> + Accordion Item #1 + </button> + </h2> + <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>This is the first item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h2 class="accordion-header" id="headingTwo"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> + Accordion Item #2 + </button> + </h2> + <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>This is the second item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h2 class="accordion-header" id="headingThree"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> + Accordion Item #3 + </button> + </h2> + <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>This is the third item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> +</div> +{{< /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" >}} +<div class="accordion accordion-flush" id="accordionFlushExample"> + <div class="accordion-item"> + <h2 class="accordion-header" id="flush-headingOne"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false" aria-controls="flush-collapseOne"> + Accordion Item #1 + </button> + </h2> + <div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample"> + <div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the first item's accordion body.</div> + </div> + </div> + <div class="accordion-item"> + <h2 class="accordion-header" id="flush-headingTwo"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwo" aria-expanded="false" aria-controls="flush-collapseTwo"> + Accordion Item #2 + </button> + </h2> + <div id="flush-collapseTwo" class="accordion-collapse collapse" aria-labelledby="flush-headingTwo" data-bs-parent="#accordionFlushExample"> + <div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the second item's accordion body. Let's imagine this being filled with some actual content.</div> + </div> + </div> + <div class="accordion-item"> + <h2 class="accordion-header" id="flush-headingThree"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseThree" aria-expanded="false" aria-controls="flush-collapseThree"> + Accordion Item #3 + </button> + </h2> + <div id="flush-collapseThree" class="accordion-collapse collapse" aria-labelledby="flush-headingThree" data-bs-parent="#accordionFlushExample"> + <div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> 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.</div> + </div> + </div> +</div> +{{< /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 >}} +<div class="accordion" id="accordionPanelsStayOpenExample"> + <div class="accordion-item"> + <h2 class="accordion-header" id="panelsStayOpen-headingOne"> + <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseOne" aria-expanded="true" aria-controls="panelsStayOpen-collapseOne"> + Accordion Item #1 + </button> + </h2> + <div id="panelsStayOpen-collapseOne" class="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-headingOne"> + <div class="accordion-body"> + <strong>This is the first item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h2 class="accordion-header" id="panelsStayOpen-headingTwo"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseTwo" aria-expanded="false" aria-controls="panelsStayOpen-collapseTwo"> + Accordion Item #2 + </button> + </h2> + <div id="panelsStayOpen-collapseTwo" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingTwo"> + <div class="accordion-body"> + <strong>This is the second item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h2 class="accordion-header" id="panelsStayOpen-headingThree"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseThree" aria-expanded="false" aria-controls="panelsStayOpen-collapseThree"> + Accordion Item #3 + </button> + </h2> + <div id="panelsStayOpen-collapseThree" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingThree"> + <div class="accordion-body"> + <strong>This is the third item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> +</div> +{{< /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") }} +<div class="alert alert-{{ .name }}" role="alert"> + A simple {{ .name }} alert—check it out! +</div>{{- 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") }} +<div class="alert alert-{{ .name }}" role="alert"> + A simple {{ .name }} alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like. +</div>{{ end -}} +{{< /alerts.inline >}} +{{< /example >}} + +### Additional content + +Alerts can also contain additional HTML elements like headings, paragraphs and dividers. + +{{< example >}} +<div class="alert alert-success" role="alert"> + <h4 class="alert-heading">Well done!</h4> + <p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p> + <hr> + <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p> +</div> +{{< /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 >}} +<div class="alert alert-primary d-flex align-items-center" role="alert"> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2" viewBox="0 0 16 16" role="img" aria-label="Warning:"> + <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> + </svg> + <div> + An example alert with an icon + </div> +</div> +{{< /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 >}} +<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> + <symbol id="check-circle-fill" fill="currentColor" viewBox="0 0 16 16"> + <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/> + </symbol> + <symbol id="info-fill" fill="currentColor" viewBox="0 0 16 16"> + <path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/> + </symbol> + <symbol id="exclamation-triangle-fill" fill="currentColor" viewBox="0 0 16 16"> + <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/> + </symbol> +</svg> + +<div class="alert alert-primary d-flex align-items-center" role="alert"> + <svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-label="Info:"><use xlink:href="#info-fill"/></svg> + <div> + An example alert with an icon + </div> +</div> +<div class="alert alert-success d-flex align-items-center" role="alert"> + <svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-label="Success:"><use xlink:href="#check-circle-fill"/></svg> + <div> + An example success alert with an icon + </div> +</div> +<div class="alert alert-warning d-flex align-items-center" role="alert"> + <svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-label="Warning:"><use xlink:href="#exclamation-triangle-fill"/></svg> + <div> + An example warning alert with an icon + </div> +</div> +<div class="alert alert-danger d-flex align-items-center" role="alert"> + <svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-label="Danger:"><use xlink:href="#exclamation-triangle-fill"/></svg> + <div> + An example danger alert with an icon + </div> +</div> +{{< /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 `<button>` element with it for proper behavior across all devices. +- To animate alerts when dismissing them, be sure to add the `.fade` and `.show` classes. + +You can see this in action with a live demo: + +{{< example >}} +<div class="alert alert-warning alert-dismissible fade show" role="alert"> + <strong>Holy guacamole!</strong> You should check in on some of those fields below. + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> +</div> +{{< /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 +<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> +``` + +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.) + +<table class="table"> + <thead> + <tr> + <th>Method</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <code>close</code> + </td> + <td> + Closes an alert by removing it from the DOM. If the <code>.fade</code> and <code>.show</code> classes are present on the element, the alert will fade out before it is removed. + </td> + </tr> + <tr> + <td> + <code>dispose</code> + </td> + <td> + Destroys an element's alert. (Removes stored data on the DOM element) + </td> + </tr> + <tr> + <td> + <code>getInstance</code> + </td> + <td> + Static method which allows you to get the alert instance associated to a DOM element, you can use it like this: <code>bootstrap.Alert.getInstance(alert)</code> + </td> + </tr> + <tr> + <td> + <code>getOrCreateInstance</code> + </td> + <td> + 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: <code>bootstrap.Alert.getOrCreateInstance(element)</code> + </td> + </tr> + </tbody> +</table> + +```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. + +<table class="table"> + <thead> + <tr> + <th>Event</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>close.bs.alert</code></td> + <td> + Fires immediately when the <code>close</code> instance method is called. + </td> + </tr> + <tr> + <td><code>closed.bs.alert</code></td> + <td> + Fired when the alert has been closed and CSS transitions have completed. + </td> + </tr> + </tbody> +</table> + +```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 >}} +<h1>Example heading <span class="badge bg-secondary">New</span></h1> +<h2>Example heading <span class="badge bg-secondary">New</span></h2> +<h3>Example heading <span class="badge bg-secondary">New</span></h3> +<h4>Example heading <span class="badge bg-secondary">New</span></h4> +<h5>Example heading <span class="badge bg-secondary">New</span></h5> +<h6>Example heading <span class="badge bg-secondary">New</span></h6> +{{< /example >}} + +### Buttons + +Badges can be used as part of links or buttons to provide a counter. + +{{< example >}} +<button type="button" class="btn btn-primary"> + Notifications <span class="badge bg-secondary">4</span> +</button> +{{< /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 >}} +<button type="button" class="btn btn-primary position-relative"> + Inbox + <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger"> + 99+ + <span class="visually-hidden">unread messages</span> + </span> +</button> +{{< /example >}} + +You can also replace the `.badge` class with a few more utilities without a count for a more generic indicator. + +{{< example >}} +<button type="button" class="btn btn-primary position-relative"> + Profile + <span class="position-absolute top-0 start-100 translate-middle p-2 bg-danger border border-light rounded-circle"> + <span class="visually-hidden">New alerts</span> + </span> +</button> +{{< /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") }} +<span class="badge bg-{{ .name }}{{ with .contrast_color }} text-{{ . }}{{ end }}">{{ .name | title }}</span>{{- 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") }} +<span class="badge rounded-pill bg-{{ .name }}{{ with .contrast_color }} text-{{ . }}{{ end }}">{{ .name | title }}</span>{{- 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 >}} +<nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item active" aria-current="page">Home</li> + </ol> +</nav> + +<nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item active" aria-current="page">Library</li> + </ol> +</nav> + +<nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item"><a href="#">Library</a></li> + <li class="breadcrumb-item active" aria-current="page">Data</li> + </ol> +</nav> +{{< /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 >}} +<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item active" aria-current="page">Library</li> + </ol> +</nav> +{{< /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 >}} +<nav style="--bs-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");" aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item active" aria-current="page">Library</li> + </ol> +</nav> +{{< /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 >}} +<nav style="--bs-breadcrumb-divider: '';" aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item active" aria-current="page">Library</li> + </ol> +</nav> +{{< /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 `<nav>` element, as well as applying an `aria-current="page"` to the last item of the set to indicate that it represents the current page. + +For more information, see the [WAI-ARIA Authoring Practices for the breadcrumb pattern](https://www.w3.org/TR/wai-aria-practices/#breadcrumb). + +## Sass + +### Variables + +{{< scss-docs name="breadcrumb-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/button-group.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/button-group.md new file mode 100644 index 000000000..184ca4973 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/button-group.md @@ -0,0 +1,268 @@ +--- +layout: docs +title: Button group +description: Group a series of buttons together on a single line or stack them in a vertical column. +group: components +toc: true +--- + +## Basic example + +Wrap a series of buttons with `.btn` in `.btn-group`. + +{{< example >}} +<div class="btn-group" role="group" aria-label="Basic example"> + <button type="button" class="btn btn-primary">Left</button> + <button type="button" class="btn btn-primary">Middle</button> + <button type="button" class="btn btn-primary">Right</button> +</div> +{{< /example >}} + +{{< callout warning >}} +##### Ensure correct `role` and provide a label + +In order for assistive technologies (such as screen readers) to convey that a series of buttons is grouped, an appropriate `role` attribute needs to be provided. For button groups, this would be `role="group"`, while toolbars should have a `role="toolbar"`. + +In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct role attribute. In the examples provided here, we use `aria-label`, but alternatives such as `aria-labelledby` can also be used. +{{< /callout >}} + +These classes can also be added to groups of links, as an alternative to the [`.nav` navigation components]({{< docsref "/components/navs-tabs" >}}). + +{{< example >}} +<div class="btn-group"> + <a href="#" class="btn btn-primary active" aria-current="page">Active link</a> + <a href="#" class="btn btn-primary">Link</a> + <a href="#" class="btn btn-primary">Link</a> +</div> +{{< /example >}} + +## Mixed styles + +{{< example >}} +<div class="btn-group" role="group" aria-label="Basic mixed styles example"> + <button type="button" class="btn btn-danger">Left</button> + <button type="button" class="btn btn-warning">Middle</button> + <button type="button" class="btn btn-success">Right</button> +</div> +{{< /example >}} + +## Outlined styles + +{{< example >}} +<div class="btn-group" role="group" aria-label="Basic outlined example"> + <button type="button" class="btn btn-outline-primary">Left</button> + <button type="button" class="btn btn-outline-primary">Middle</button> + <button type="button" class="btn btn-outline-primary">Right</button> +</div> +{{< /example >}} + +## Checkbox and radio button groups + +Combine button-like checkbox and radio [toggle buttons]({{< docsref "/forms/checks-radios" >}}) into a seamless looking button group. + +{{< example >}} +<div class="btn-group" role="group" aria-label="Basic checkbox toggle button group"> + <input type="checkbox" class="btn-check" id="btncheck1" autocomplete="off"> + <label class="btn btn-outline-primary" for="btncheck1">Checkbox 1</label> + + <input type="checkbox" class="btn-check" id="btncheck2" autocomplete="off"> + <label class="btn btn-outline-primary" for="btncheck2">Checkbox 2</label> + + <input type="checkbox" class="btn-check" id="btncheck3" autocomplete="off"> + <label class="btn btn-outline-primary" for="btncheck3">Checkbox 3</label> +</div> +{{< /example >}} + +{{< example >}} +<div class="btn-group" role="group" aria-label="Basic radio toggle button group"> + <input type="radio" class="btn-check" name="btnradio" id="btnradio1" autocomplete="off" checked> + <label class="btn btn-outline-primary" for="btnradio1">Radio 1</label> + + <input type="radio" class="btn-check" name="btnradio" id="btnradio2" autocomplete="off"> + <label class="btn btn-outline-primary" for="btnradio2">Radio 2</label> + + <input type="radio" class="btn-check" name="btnradio" id="btnradio3" autocomplete="off"> + <label class="btn btn-outline-primary" for="btnradio3">Radio 3</label> +</div> +{{< /example >}} + +## Button toolbar + +Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more. + +{{< example >}} +<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups"> + <div class="btn-group me-2" role="group" aria-label="First group"> + <button type="button" class="btn btn-primary">1</button> + <button type="button" class="btn btn-primary">2</button> + <button type="button" class="btn btn-primary">3</button> + <button type="button" class="btn btn-primary">4</button> + </div> + <div class="btn-group me-2" role="group" aria-label="Second group"> + <button type="button" class="btn btn-secondary">5</button> + <button type="button" class="btn btn-secondary">6</button> + <button type="button" class="btn btn-secondary">7</button> + </div> + <div class="btn-group" role="group" aria-label="Third group"> + <button type="button" class="btn btn-info">8</button> + </div> +</div> +{{< /example >}} + +Feel free to mix input groups with button groups in your toolbars. Similar to the example above, you'll likely need some utilities though to space things properly. + +{{< example >}} +<div class="btn-toolbar mb-3" role="toolbar" aria-label="Toolbar with button groups"> + <div class="btn-group me-2" role="group" aria-label="First group"> + <button type="button" class="btn btn-outline-secondary">1</button> + <button type="button" class="btn btn-outline-secondary">2</button> + <button type="button" class="btn btn-outline-secondary">3</button> + <button type="button" class="btn btn-outline-secondary">4</button> + </div> + <div class="input-group"> + <div class="input-group-text" id="btnGroupAddon">@</div> + <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon"> + </div> +</div> + +<div class="btn-toolbar justify-content-between" role="toolbar" aria-label="Toolbar with button groups"> + <div class="btn-group" role="group" aria-label="First group"> + <button type="button" class="btn btn-outline-secondary">1</button> + <button type="button" class="btn btn-outline-secondary">2</button> + <button type="button" class="btn btn-outline-secondary">3</button> + <button type="button" class="btn btn-outline-secondary">4</button> + </div> + <div class="input-group"> + <div class="input-group-text" id="btnGroupAddon2">@</div> + <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon2"> + </div> +</div> +{{< /example >}} + +## Sizing + +Instead of applying button sizing classes to every button in a group, just add `.btn-group-*` to each `.btn-group`, including each one when nesting multiple groups. + +<div class="bd-example"> + <div class="btn-group btn-group-lg" role="group" aria-label="Large button group"> + <button type="button" class="btn btn-outline-dark">Left</button> + <button type="button" class="btn btn-outline-dark">Middle</button> + <button type="button" class="btn btn-outline-dark">Right</button> + </div> + <br> + <div class="btn-group" role="group" aria-label="Default button group"> + <button type="button" class="btn btn-outline-dark">Left</button> + <button type="button" class="btn btn-outline-dark">Middle</button> + <button type="button" class="btn btn-outline-dark">Right</button> + </div> + <br> + <div class="btn-group btn-group-sm" role="group" aria-label="Small button group"> + <button type="button" class="btn btn-outline-dark">Left</button> + <button type="button" class="btn btn-outline-dark">Middle</button> + <button type="button" class="btn btn-outline-dark">Right</button> + </div> +</div> + +```html +<div class="btn-group btn-group-lg" role="group" aria-label="...">...</div> +<div class="btn-group" role="group" aria-label="...">...</div> +<div class="btn-group btn-group-sm" role="group" aria-label="...">...</div> +``` + +## Nesting + +Place a `.btn-group` within another `.btn-group` when you want dropdown menus mixed with a series of buttons. + +{{< example >}} +<div class="btn-group" role="group" aria-label="Button group with nested dropdown"> + <button type="button" class="btn btn-primary">1</button> + <button type="button" class="btn btn-primary">2</button> + + <div class="btn-group" role="group"> + <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1"> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + </ul> + </div> +</div> +{{< /example >}} + +## Vertical variation + +Make a set of buttons appear vertically stacked rather than horizontally. **Split button dropdowns are not supported here.** + +<div class="bd-example"> + <div class="btn-group-vertical" role="group" aria-label="Vertical button group"> + <button type="button" class="btn btn-dark">Button</button> + <button type="button" class="btn btn-dark">Button</button> + <button type="button" class="btn btn-dark">Button</button> + <button type="button" class="btn btn-dark">Button</button> + <button type="button" class="btn btn-dark">Button</button> + <button type="button" class="btn btn-dark">Button</button> + </div> +</div> + +<div class="bd-example"> + <div class="btn-group-vertical" role="group" aria-label="Vertical button group"> + <button type="button" class="btn btn-primary">Button</button> + <button type="button" class="btn btn-primary">Button</button> + <div class="btn-group" role="group"> + <button id="btnGroupVerticalDrop1" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop1"> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + </ul> + </div> + <button type="button" class="btn btn-primary">Button</button> + <button type="button" class="btn btn-primary">Button</button> + <div class="btn-group" role="group"> + <button id="btnGroupVerticalDrop2" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop2"> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + </ul> + </div> + <div class="btn-group" role="group"> + <button id="btnGroupVerticalDrop3" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop3"> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + </ul> + </div> + <div class="btn-group" role="group"> + <button id="btnGroupVerticalDrop4" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="btnGroupVerticalDrop4"> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + <li><a class="dropdown-item" href="#">Dropdown link</a></li> + </ul> + </div> + </div> +</div> + +<div class="bd-example"> + <div class="btn-group-vertical" role="group" aria-label="Vertical radio toggle button group"> + <input type="radio" class="btn-check" name="vbtn-radio" id="vbtn-radio1" autocomplete="off" checked> + <label class="btn btn-outline-danger" for="vbtn-radio1">Radio 1</label> + <input type="radio" class="btn-check" name="vbtn-radio" id="vbtn-radio2" autocomplete="off"> + <label class="btn btn-outline-danger" for="vbtn-radio2">Radio 2</label> + <input type="radio" class="btn-check" name="vbtn-radio" id="vbtn-radio3" autocomplete="off"> + <label class="btn btn-outline-danger" for="vbtn-radio3">Radio 3</label> + </div> +</div> + +```html +<div class="btn-group-vertical"> + ... +</div> +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/buttons.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/buttons.md new file mode 100644 index 000000000..d62d6e2b6 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/buttons.md @@ -0,0 +1,246 @@ +--- +layout: docs +title: Buttons +description: Use Bootstrap's custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more. +group: components +toc: true +--- + +## Examples + +Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control. + +{{< example >}} +{{< buttons.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<button type="button" class="btn btn-{{ .name }}">{{ .name | title }}</button> +{{- end -}} +{{< /buttons.inline >}} + +<button type="button" class="btn btn-link">Link</button> +{{< /example >}} + +{{< callout info >}} +{{< partial "callout-warning-color-assistive-technologies.md" >}} +{{< /callout >}} + +## Disable text wrapping + +If you don't want the button text to wrap, you can add the `.text-nowrap` class to the button. In Sass, you can set `$btn-white-space: nowrap` to disable text wrapping for each button. + +## Button tags + +The `.btn` classes are designed to be used with the `<button>` element. However, you can also use these classes on `<a>` or `<input>` elements (though some browsers may apply a slightly different rendering). + +When using button classes on `<a>` elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a `role="button"` to appropriately convey their purpose to assistive technologies such as screen readers. + +{{< example >}} +<a class="btn btn-primary" href="#" role="button">Link</a> +<button class="btn btn-primary" type="submit">Button</button> +<input class="btn btn-primary" type="button" value="Input"> +<input class="btn btn-primary" type="submit" value="Submit"> +<input class="btn btn-primary" type="reset" value="Reset"> +{{< /example >}} + +## Outline buttons + +In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the `.btn-outline-*` ones to remove all background images and colors on any button. + +{{< example >}} +{{< buttons.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<button type="button" class="btn btn-outline-{{ .name }}">{{ .name | title }}</button> +{{- end -}} +{{< /buttons.inline >}} +{{< /example >}} + +{{< callout info >}} +Some of the button styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast. +{{< /callout >}} + +## Sizes + +Fancy larger or smaller buttons? Add `.btn-lg` or `.btn-sm` for additional sizes. + +{{< example >}} +<button type="button" class="btn btn-primary btn-lg">Large button</button> +<button type="button" class="btn btn-secondary btn-lg">Large button</button> +{{< /example >}} + +{{< example >}} +<button type="button" class="btn btn-primary btn-sm">Small button</button> +<button type="button" class="btn btn-secondary btn-sm">Small button</button> +{{< /example >}} + +## Disabled state + +Make buttons look inactive by adding the `disabled` boolean attribute to any `<button>` element. Disabled buttons have `pointer-events: none` applied to, preventing hover and active states from triggering. + +{{< example >}} +<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button> +<button type="button" class="btn btn-secondary btn-lg" disabled>Button</button> +{{< /example >}} + +Disabled buttons using the `<a>` element behave a bit different: + +- `<a>`s don't support the `disabled` attribute, so you must add the `.disabled` class to make it visually appear disabled. +- Some future-friendly styles are included to disable all `pointer-events` on anchor buttons. +- Disabled buttons should include the `aria-disabled="true"` attribute to indicate the state of the element to assistive technologies. + +{{< example >}} +<a href="#" class="btn btn-primary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Primary link</a> +<a href="#" class="btn btn-secondary btn-lg disabled" tabindex="-1" role="button" aria-disabled="true">Link</a> +{{< /example >}} + +{{< callout warning >}} +##### Link functionality caveat + +The `.disabled` class uses `pointer-events: none` to try to disable the link functionality of `<a>`s, but that CSS property is not yet standardized. In addition, even in browsers that do support `pointer-events: none`, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, in addition to `aria-disabled="true"`, also include a `tabindex="-1"` attribute on these links to prevent them from receiving keyboard focus, and use custom JavaScript to disable their functionality altogether. +{{< /callout >}} + +## Block buttons + +Create responsive stacks of full-width, "block buttons" like those in Bootstrap 4 with a mix of our display and gap utilities. By using utilities instead of button specific classes, we have much greater control over spacing, alignment, and responsive behaviors. + +{{< example >}} +<div class="d-grid gap-2"> + <button class="btn btn-primary" type="button">Button</button> + <button class="btn btn-primary" type="button">Button</button> +</div> +{{< /example >}} + +Here we create a responsive variation, starting with vertically stacked buttons until the `md` breakpoint, where `.d-md-block` replaces the `.d-grid` class, thus nullifying the `gap-2` utility. Resize your browser to see them change. + +{{< example >}} +<div class="d-grid gap-2 d-md-block"> + <button class="btn btn-primary" type="button">Button</button> + <button class="btn btn-primary" type="button">Button</button> +</div> +{{< /example >}} + +You can adjust the width of your block buttons with grid column width classes. For example, for a half-width "block button", use `.col-6`. Center it horizontally with `.mx-auto`, too. + +{{< example >}} +<div class="d-grid gap-2 col-6 mx-auto"> + <button class="btn btn-primary" type="button">Button</button> + <button class="btn btn-primary" type="button">Button</button> +</div> +{{< /example >}} + +Additional utilities can be used to adjust the alignment of buttons when horizontal. Here we've taken our previous responsive example and added some flex utilities and a margin utility on the button to right align the buttons when they're no longer stacked. + +{{< example >}} +<div class="d-grid gap-2 d-md-flex justify-content-md-end"> + <button class="btn btn-primary me-md-2" type="button">Button</button> + <button class="btn btn-primary" type="button">Button</button> +</div> +{{< /example >}} + +## Button plugin + +The button plugin allows you to create simple on/off toggle buttons. + +{{< callout info >}} +Visually, these toggle buttons are identical to the [checkbox toggle buttons]({{< docsref "/forms/checks-radios#checkbox-toggle-buttons" >}}). However, they are conveyed differently by assistive technologies: the checkbox toggles will be announced by screen readers as "checked"/"not checked" (since, despite their appearance, they are fundamentally still checkboxes), whereas these toggle buttons will be announced as "button"/"button pressed". The choice between these two approaches will depend on the type of toggle you are creating, and whether or not the toggle will make sense to users when announced as a checkbox or as an actual button. +{{< /callout >}} + +### Toggle states + +Add `data-bs-toggle="button"` to toggle a button's `active` state. If you're pre-toggling a button, you must manually add the `.active` class **and** `aria-pressed="true"` to ensure that it is conveyed appropriately to assistive technologies. + +{{< example >}} +<button type="button" class="btn btn-primary" data-bs-toggle="button" autocomplete="off">Toggle button</button> +<button type="button" class="btn btn-primary active" data-bs-toggle="button" autocomplete="off" aria-pressed="true">Active toggle button</button> +<button type="button" class="btn btn-primary" disabled data-bs-toggle="button" autocomplete="off">Disabled toggle button</button> +{{< /example >}} + +{{< example >}} +<a href="#" class="btn btn-primary" role="button" data-bs-toggle="button">Toggle link</a> +<a href="#" class="btn btn-primary active" role="button" data-bs-toggle="button" aria-pressed="true">Active toggle link</a> +<a href="#" class="btn btn-primary disabled" tabindex="-1" aria-disabled="true" role="button" data-bs-toggle="button">Disabled toggle link</a> +{{< /example >}} + +### Methods + +You can create a button instance with the button constructor, for example: + +```js +var button = document.getElementById('myButton') +var bsButton = new bootstrap.Button(button) +``` + +<table class="table"> + <thead> + <tr> + <th>Method</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <code>toggle</code> + </td> + <td> + Toggles push state. Gives the button the appearance that it has been activated. + </td> + </tr> + <tr> + <td> + <code>dispose</code> + </td> + <td> + Destroys an element's button. (Removes stored data on the DOM element) + </td> + </tr> + <tr> + <td> + <code>getInstance</code> + </td> + <td> + Static method which allows you to get the button instance associated to a DOM element, you can use it like this: <code>bootstrap.Button.getInstance(element)</code> + </td> + </tr> + <tr> + <td> + <code>getOrCreateInstance</code> + </td> + <td> + Static method which returns a button instance associated to a DOM element or create a new one in case it wasn't initialised. + You can use it like this: <code>bootstrap.Button.getOrCreateInstance(element)</code> + </td> + </tr> + </tbody> +</table> + +For example, to toggle all buttons + +```js +var buttons = document.querySelectorAll('.btn') +buttons.forEach(function (button) { + var button = new bootstrap.Button(button) + button.toggle() +}) +``` + +## Sass + +### Variables + +{{< scss-docs name="btn-variables" file="scss/_variables.scss" >}} + +### Mixins + +There are three mixins for buttons: button and button outline variant mixins (both based on `$theme-colors`), plus a button size mixin. + +{{< scss-docs name="btn-variant-mixin" file="scss/mixins/_buttons.scss" >}} + +{{< scss-docs name="btn-outline-variant-mixin" file="scss/mixins/_buttons.scss" >}} + +{{< scss-docs name="btn-size-mixin" file="scss/mixins/_buttons.scss" >}} + +### Loops + +Button variants (for regular and outline buttons) use their respective mixins with our `$theme-colors` map to generate the modifier classes in `scss/_buttons.scss`. + +{{< scss-docs name="btn-variant-loops" file="scss/_buttons.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/card.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/card.md index 8108d21b6..97bcf77d5 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/card.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/card.md @@ -285,7 +285,7 @@ You can quickly change the text alignment of any card—in its entirety or speci </div> </div> -<div class="card text-right" style="width: 18rem;"> +<div class="card text-end" style="width: 18rem;"> <div class="card-body"> <h5 class="card-title">Special title treatment</h5> <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> @@ -296,14 +296,14 @@ You can quickly change the text alignment of any card—in its entirety or speci ## Navigation -Add some navigation to a card's header (or block) with Bootstrap's [nav components]({{< docsref "/components/navs" >}}). +Add some navigation to a card's header (or block) with Bootstrap's [nav components]({{< docsref "/components/navs-tabs" >}}). {{< example >}} <div class="card text-center"> <div class="card-header"> <ul class="nav nav-tabs card-header-tabs"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="true" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -392,13 +392,13 @@ Note that content should not be larger than the height of the image. If content ## Horizontal -Using a combination of grid and utility classes, cards can be made horizontal in a mobile-friendly and responsive way. In the example below, we remove the grid gutters with `.no-gutters` and use `.col-md-*` classes to make the card horizontal at the `md` breakpoint. Further adjustments may be needed depending on your card content. +Using a combination of grid and utility classes, cards can be made horizontal in a mobile-friendly and responsive way. In the example below, we remove the grid gutters with `.g-0` and use `.col-md-*` classes to make the card horizontal at the `md` breakpoint. Further adjustments may be needed depending on your card content. {{< example >}} <div class="card mb-3" style="max-width: 540px;"> - <div class="row no-gutters"> + <div class="row g-0"> <div class="col-md-4"> - {{< placeholder width="100%" height="250" class="" text="Image" >}} + {{< placeholder width="100%" height="250" text="Image" class="img-fluid rounded-start" >}} </div> <div class="col-md-8"> <div class="card-body"> @@ -417,12 +417,12 @@ Cards include various options for customizing their backgrounds, borders, and co ### Background and color -Use [text and background utilities]({{< docsref "/utilities/colors" >}}) to change the appearance of a card. +Use [text color]({{< docsref "/utilities/colors" >}}) and [background utilities]({{< docsref "/utilities/background" >}}) to change the appearance of a card. {{< example >}} {{< card.inline >}} {{- range (index $.Site.Data "theme-colors") }} -<div class="card{{ if not (eq .name "light") }} text-white{{ end }} bg-{{ .name }} mb-3" style="max-width: 18rem;"> +<div class="card{{ if .contrast_color }} text-{{ .contrast_color }}{{ else }} text-white{{ end }} bg-{{ .name }} mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">{{ .name | title }} card title</h5> @@ -433,7 +433,7 @@ Use [text and background utilities]({{< docsref "/utilities/colors" >}}) to chan {{< /card.inline >}} {{< /example >}} -{{< callout warning >}} +{{< callout info >}} {{< partial "callout-warning-color-assistive-technologies.md" >}} {{< /callout >}} @@ -446,7 +446,7 @@ Use [border utilities]({{< docsref "/utilities/borders" >}}) to change just the {{- range (index $.Site.Data "theme-colors") }} <div class="card border-{{ .name }} mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> - <div class="card-body{{ if not (eq .name "light") }} text-{{ .name }}{{ end }}"> + <div class="card-body{{ if not .contrast_color }} text-{{ .name }}{{ end }}"> <h5 class="card-title">{{ .name | title }} card title</h5> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> </div> @@ -544,112 +544,42 @@ When using card groups with footers, their content will automatically line up. </div> {{< /example >}} -### Card decks - -Need a set of equal width and height cards that aren't attached to one another? Use card decks. - -{{< example >}} -<div class="card-deck"> - <div class="card"> - {{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> - <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> - </div> - </div> - <div class="card"> - {{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> - <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> - </div> - </div> - <div class="card"> - {{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> - <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> - </div> - </div> -</div> -{{< /example >}} - -Just like with card groups, card footers in decks will automatically line up. - -{{< example >}} -<div class="card-deck"> - <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> - </div> - <div class="card-footer"> - <small class="text-muted">Last updated 3 mins ago</small> - </div> - </div> - <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> - </div> - <div class="card-footer"> - <small class="text-muted">Last updated 3 mins ago</small> - </div> - </div> - <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> - </div> - <div class="card-footer"> - <small class="text-muted">Last updated 3 mins ago</small> - </div> - </div> -</div> -{{< /example >}} - ### Grid cards Use the Bootstrap grid system and its [`.row-cols` classes]({{< docsref "/layout/grid#row-columns" >}}) to control how many grid columns (wrapped around your cards) you show per row. For example, here's `.row-cols-1` laying out the cards on one column, and `.row-cols-md-2` splitting four cards to equal width across multiple rows, from the medium breakpoint up. {{< example >}} -<div class="row row-cols-1 row-cols-md-2"> - <div class="col mb-4"> +<div class="row row-cols-1 row-cols-md-2 g-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -662,37 +592,37 @@ Use the Bootstrap grid system and its [`.row-cols` classes]({{< docsref "/layout Change it to `.row-cols-3` and you'll see the fourth card wrap. {{< example >}} -<div class="row row-cols-1 row-cols-md-3"> - <div class="col mb-4"> +<div class="row row-cols-1 row-cols-md-3 g-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -705,37 +635,37 @@ Change it to `.row-cols-3` and you'll see the fourth card wrap. When you need equal height, add `.h-100` to the cards. If you want equal heights by default, you can set `$card-height: 100%` in Sass. {{< example >}} -<div class="row row-cols-1 row-cols-md-3"> - <div class="col mb-4"> +<div class="row row-cols-1 row-cols-md-3 g-4"> + <div class="col"> <div class="card h-100"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card h-100"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a short card.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card h-100"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content.</p> </div> </div> </div> - <div class="col mb-4"> + <div class="col"> <div class="card h-100"> - {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -745,88 +675,55 @@ When you need equal height, add `.h-100` to the cards. If you want equal heights </div> {{< /example >}} -### Card columns - -Cards can be organized into [Masonry](https://masonry.desandro.com/)-like columns with just CSS by wrapping them in `.card-columns`. Cards are built with CSS `column` properties instead of flexbox for easier alignment. Cards are ordered from top to bottom and left to right. - -**Heads up!** Your mileage with card columns may vary. To prevent cards breaking across columns, we must set them to `display: inline-block` as `column-break-inside: avoid` isn't a bulletproof solution yet. +Just like with card groups, card footers will automatically line up. {{< example >}} -<div class="card-columns"> - <div class="card"> - {{< placeholder width="100%" height="160" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title that wraps to a new line</h5> - <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> - </div> - </div> - <div class="card p-3"> - <blockquote class="blockquote mb-0 card-body"> - <p>A well-known quote, contained in a blockquote element.</p> - <footer class="blockquote-footer"> - <small class="text-muted"> - Someone famous in <cite title="Source Title">Source Title</cite> - </small> - </footer> - </blockquote> - </div> - <div class="card"> - {{< placeholder width="100%" height="160" class="card-img-top" text="Image cap" >}} - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> - <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> +<div class="row row-cols-1 row-cols-md-3 g-4"> + <div class="col"> + <div class="card h-100"> + {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> + </div> + <div class="card-footer"> + <small class="text-muted">Last updated 3 mins ago</small> + </div> </div> </div> - <div class="card bg-primary text-white text-center p-3"> - <blockquote class="blockquote mb-0"> - <p>A well-known quote, contained in a blockquote element.</p> - <footer class="blockquote-footer text-white"> - <small> - Someone famous in <cite title="Source Title">Source Title</cite> - </small> - </footer> - </blockquote> - </div> - <div class="card text-center"> - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This card has a regular title and short paragraphy of text below it.</p> - <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> + <div class="col"> + <div class="card h-100"> + {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> + </div> + <div class="card-footer"> + <small class="text-muted">Last updated 3 mins ago</small> + </div> </div> </div> - <div class="card"> - {{< placeholder width="100%" height="260" class="card-img" text="Card image" >}} - </div> - <div class="card p-3 text-right"> - <blockquote class="blockquote mb-0"> - <p>A well-known quote, contained in a blockquote element.</p> - <footer class="blockquote-footer"> - <small class="text-muted"> - Someone famous in <cite title="Source Title">Source Title</cite> - </small> - </footer> - </blockquote> - </div> - <div class="card"> - <div class="card-body"> - <h5 class="card-title">Card title</h5> - <p class="card-text">This is another card with title and supporting text below. This card has some additional content to make it slightly taller overall.</p> - <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> + <div class="col"> + <div class="card h-100"> + {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> + </div> + <div class="card-footer"> + <small class="text-muted">Last updated 3 mins ago</small> + </div> </div> </div> </div> {{< /example >}} -Card columns can also be extended and customized with some additional code. Shown below is an extension of the `.card-columns` class using the same CSS we use—CSS columns— to generate a set of responsive tiers for changing the number of columns. - -```scss -.card-columns { - @include media-breakpoint-only(lg) { - column-count: 4; - } - @include media-breakpoint-only(xl) { - column-count: 5; - } -} -``` +### Masonry + +In `v4` we used a CSS-only technique to mimic the behavior of [Masonry](https://masonry.desandro.com/)-like columns, but this technique came with lots of unpleasant [side effects](https://github.com/twbs/bootstrap/pull/28922). If you want to have this type of layout in `v5`, you can just make use of Masonry plugin. **Masonry is not included in Bootstrap**, but we've made a [demo example]({{< docsref "/examples/masonry" >}}) to help you get started. + +## Sass + +### Variables + +{{< scss-docs name="card-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/carousel.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/carousel.md new file mode 100644 index 000000000..e106e76c0 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/carousel.md @@ -0,0 +1,471 @@ +--- +layout: docs +title: Carousel +description: A slideshow component for cycling through elements—images or slides of text—like a carousel. +group: components +toc: true +--- + +## How it works + +The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators. + +In browsers where the [Page Visibility API](https://www.w3.org/TR/page-visibility/) is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.). + +{{< callout info >}} +{{< partial "callout-info-prefersreducedmotion.md" >}} +{{< /callout >}} + +Please be aware that nested carousels are not supported, and carousels are generally not compliant with accessibility standards. + +## Example + +Carousels don't automatically normalize slide dimensions. As such, you may need to use additional utilities or custom styles to appropriately size content. While carousels support previous/next controls and indicators, they're not explicitly required. Add and customize as you see fit. + +**The `.active` class needs to be added to one of the slides** otherwise the carousel will not be visible. Also be sure to set a unique `id` on the `.carousel` for optional controls, especially if you're using multiple carousels on a single page. Control and indicator elements must have a `data-bs-target` attribute (or `href` for links) that matches the `id` of the `.carousel` element. + +### Slides only + +Here's a carousel with slides only. Note the presence of the `.d-block` and `.w-100` on carousel images to prevent browser default image alignment. + +{{< example >}} +<div id="carouselExampleSlidesOnly" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + </div> + </div> +</div> +{{< /example >}} + +### With controls + +Adding in the previous and next controls. We recommend using `<button>` elements, but you can also use `<a>` elements with `role="button"`. + +{{< example >}} +<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +### With indicators + +You can also add the indicators to the carousel, alongside the controls, too. + +{{< example >}} +<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button> + <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button> + <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2" aria-label="Slide 3"></button> + </div> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +### With captions + +Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. They can be easily hidden on smaller viewports, as shown below, with optional [display utilities]({{< docsref "/utilities/display" >}}). We hide them initially with `.d-none` and bring them back on medium-sized devices with `.d-md-block`. + +{{< example >}} +<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2" aria-label="Slide 3"></button> + </div> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>First slide label</h5> + <p>Some representative placeholder content for the first slide.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>Second slide label</h5> + <p>Some representative placeholder content for the second slide.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>Third slide label</h5> + <p>Some representative placeholder content for the third slide.</p> + </div> + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +### Crossfade + +Add `.carousel-fade` to your carousel to animate slides with a fade transition instead of a slide. + +{{< example >}} +<div id="carouselExampleFade" class="carousel slide carousel-fade" data-bs-ride="carousel"> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +### Individual `.carousel-item` interval + +Add `data-bs-interval=""` to a `.carousel-item` to change the amount of time to delay between automatically cycling to the next item. + +{{< example >}} +<div id="carouselExampleInterval" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-inner"> + <div class="carousel-item active" data-bs-interval="10000"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + </div> + <div class="carousel-item" data-bs-interval="2000"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleInterval" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleInterval" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +### Disable touch swiping + +Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled using the `data-bs-touch` attribute. The example below also does not include the `data-bs-ride` attribute and has `data-bs-interval="false"` so it doesn't autoplay. + +{{< example >}} +<div id="carouselExampleControlsNoTouching" class="carousel slide" data-bs-touch="false" data-bs-interval="false"> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControlsNoTouching" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControlsNoTouching" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +## Dark variant + +Add `.carousel-dark` to the `.carousel` for darker controls, indicators, and captions. Controls have been inverted from their default white fill with the `filter` CSS property. Captions and controls have additional Sass variables that customize the `color` and `background-color`. + +{{< example >}} +<div id="carouselExampleDark" class="carousel carousel-dark slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button> + <button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="1" aria-label="Slide 2"></button> + <button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="2" aria-label="Slide 3"></button> + </div> + <div class="carousel-inner"> + <div class="carousel-item active" data-bs-interval="10000"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#aaa" background="#f5f5f5" text="First slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>First slide label</h5> + <p>Some representative placeholder content for the first slide.</p> + </div> + </div> + <div class="carousel-item" data-bs-interval="2000"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#bbb" background="#eee" text="Second slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>Second slide label</h5> + <p>Some representative placeholder content for the second slide.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#999" background="#e5e5e5" text="Third slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>Third slide label</h5> + <p>Some representative placeholder content for the third slide.</p> + </div> + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> +</div> +{{< /example >}} + +## Custom transition + +The transition duration of `.carousel-item` can be changed with the `$carousel-transition-duration` Sass variable before compiling or custom styles if you're using the compiled CSS. If multiple transitions are applied, make sure the transform transition is defined first (eg. `transition: transform 2s ease, opacity .5s ease-out`). + +## Sass + +### Variables + +{{< scss-docs name="carousel-variables" file="scss/_variables.scss" >}} + +## Usage + +### Via data attributes + +Use data attributes to easily control the position of the carousel. `data-bs-slide` accepts the keywords `prev` or `next`, which alters the slide position relative to its current position. Alternatively, use `data-bs-slide-to` to pass a raw slide index to the carousel `data-bs-slide-to="2"`, which shifts the slide position to a particular index beginning with `0`. + +The `data-bs-ride="carousel"` attribute is used to mark a carousel as animating starting at page load. If you don't use `data-bs-ride="carousel"` to initialize your carousel, you have to initialize it yourself. **It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel.** + +### Via JavaScript + +Call carousel manually with: + +```js +var myCarousel = document.querySelector('#myCarousel') +var carousel = new bootstrap.Carousel(myCarousel) +``` + +### Options + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-interval=""`. + +<table class="table"> + <thead> + <tr> + <th style="width: 100px;">Name</th> + <th style="width: 50px;">Type</th> + <th style="width: 50px;">Default</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>interval</code></td> + <td>number</td> + <td><code>5000</code></td> + <td>The amount of time to delay between automatically cycling an item. If <code>false</code>, carousel will not automatically cycle.</td> + </tr> + <tr> + <td><code>keyboard</code></td> + <td>boolean</td> + <td><code>true</code></td> + <td>Whether the carousel should react to keyboard events.</td> + </tr> + <tr> + <td><code>pause</code></td> + <td>string | boolean</td> + <td><code>'hover'</code></td> + <td><p>If set to <code>'hover'</code>, pauses the cycling of the carousel on <code>mouseenter</code> and resumes the cycling of the carousel on <code>mouseleave</code>. If set to <code>false</code>, hovering over the carousel won't pause it.</p> + <p>On touch-enabled devices, when set to <code>'hover'</code>, cycling will pause on <code>touchend</code> (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.</p></td> + </tr> + <tr> + <td><code>ride</code></td> + <td>string | boolean</td> + <td><code>false</code></td> + <td>Autoplays the carousel after the user manually cycles the first item. If set to <code>'carousel'</code>, autoplays the carousel on load.</td> + </tr> + <tr> + <td><code>wrap</code></td> + <td>boolean</td> + <td><code>true</code></td> + <td>Whether the carousel should cycle continuously or have hard stops.</td> + </tr> + <tr> + <td><code>touch</code></td> + <td>boolean</td> + <td><code>true</code></td> + <td>Whether the carousel should support left/right swipe interactions on touchscreen devices.</td> + </tr> + </tbody> +</table> + +### Methods + +{{< callout danger >}} +{{< partial "callout-danger-async-methods.md" >}} +{{< /callout >}} + +You can create a carousel instance with the carousel constructor, for example, to initialize with additional options and start cycling through items: + +```js +var myCarousel = document.querySelector('#myCarousel') +var carousel = new bootstrap.Carousel(myCarousel, { + interval: 2000, + wrap: false +}) +``` + +<table class="table"> + <thead> + <tr> + <th>Method</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>cycle</code></td> + <td>Cycles through the carousel items from left to right.</td> + </tr> + <tr> + <td><code>pause</code></td> + <td>Stops the carousel from cycling through items.</td> + </tr> + <tr> + <td><code>prev</code></td> + <td>Cycles to the previous item. <strong>Returns to the caller before the previous item has been shown</strong> (e.g., before the <code>slid.bs.carousel</code> event occurs).</td> + </tr> + <tr> + <td><code>next</code></td> + <td>Cycles to the next item. <strong>Returns to the caller before the next item has been shown</strong> (e.g., before the <code>slid.bs.carousel</code> event occurs).</td> + </tr> + <tr> + <td><code>nextWhenVisible</code></td> + <td>Don't cycle carousel to next when the page isn't visible or the carousel or its parent isn't visible. <strong>Returns to the caller before the target item has been shown</strong> + </tr> + <tr> + <td><code>to</code></td> + <td>Cycles the carousel to a particular frame (0 based, similar to an array). <strong>Returns to the caller before the target item has been shown</strong> (e.g., before the <code>slid.bs.carousel</code> event occurs).</td> + </tr> + <tr> + <td><code>dispose</code></td> + <td>Destroys an element's carousel. (Removes stored data on the DOM element)</td> + </tr> + <tr> + <td> + <code>getInstance</code> + </td> + <td> + Static method which allows you to get the carousel instance associated to a DOM element, you can use it like this: <code>bootstrap.Carousel.getInstance(element)</code> + </td> + </tr> + <tr> + <td> + <code>getOrCreateInstance</code> + </td> + <td> + Static method which returns a carousel instance associated to a DOM element or create a new one in case it wasn't initialised. + You can use it like this: <code>bootstrap.Carousel.getOrCreateInstance(element)</code> + </td> + </tr> + </tbody> +</table> + +### Events + +Bootstrap's carousel class exposes two events for hooking into carousel functionality. Both events have the following additional properties: + +- `direction`: The direction in which the carousel is sliding (either `"left"` or `"right"`). +- `relatedTarget`: The DOM element that is being slid into place as the active item. +- `from`: The index of the current item +- `to`: The index of the next item + +All carousel events are fired at the carousel itself (i.e. at the `<div class="carousel">`). + +<table class="table"> + <thead> + <tr> + <th style="width: 150px;">Event type</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>slide.bs.carousel</code></td> + <td>Fires immediately when the <code>slide</code> instance method is invoked.</td> + </tr> + <tr> + <td><code>slid.bs.carousel</code></td> + <td>Fired when the carousel has completed its slide transition.</td> + </tr> + </tbody> +</table> + +```js +var myCarousel = document.getElementById('myCarousel') + +myCarousel.addEventListener('slide.bs.carousel', function () { + // do something... +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/close-button.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/close-button.md new file mode 100644 index 000000000..f4a3ed071 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/close-button.md @@ -0,0 +1,38 @@ +--- +layout: docs +title: Close button +description: A generic close button for dismissing content like modals and alerts. +group: components +toc: true +--- + +## Example + +Provide an option to dismiss or close a component with `.btn-close`. Default styling is limited, but highly customizable. Modify the Sass variables to replace the default `background-image`. **Be sure to include text for screen readers**, as we've done with `aria-label`. + +{{< example >}} +<button type="button" class="btn-close" aria-label="Close"></button> +{{< /example >}} + +## Disabled state + +Disabled close buttons change their `opacity`. We've also applied `pointer-events: none` and `user-select: none` to preventing hover and active states from triggering. + +{{< example >}} +<button type="button" class="btn-close" disabled aria-label="Close"></button> +{{< /example >}} + +## White variant + +Change the default `.btn-close` to be white with the `.btn-close-white` class. This class uses the `filter` property to invert the `background-image`. + +{{< example class="bg-dark" >}} +<button type="button" class="btn-close btn-close-white" aria-label="Close"></button> +<button type="button" class="btn-close btn-close-white" disabled aria-label="Close"></button> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="close-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/collapse.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/collapse.md new file mode 100644 index 000000000..ac84ca964 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/collapse.md @@ -0,0 +1,245 @@ +--- +layout: docs +title: Collapse +description: Toggle the visibility of content across your project with a few classes and our JavaScript plugins. +group: components +toc: true +--- + +## How it works + +The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific elements you toggle. Collapsing an element will animate the `height` from its current value to `0`. Given how CSS handles animations, you cannot use `padding` on a `.collapse` element. Instead, use the class as an independent wrapping element. + +{{< callout info >}} +{{< partial "callout-info-prefersreducedmotion.md" >}} +{{< /callout >}} + +## Example + +Click the buttons below to show and hide another element via class changes: + +- `.collapse` hides content +- `.collapsing` is applied during transitions +- `.collapse.show` shows content + +Generally, we recommend using a button with the `data-bs-target` attribute. While not recommended from a semantic point of view, you can also use a link with the `href` attribute (and a `role="button"`). In both cases, the `data-bs-toggle="collapse"` is required. + +{{< example >}} +<p> + <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample"> + Link with href + </a> + <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> + Button with data-bs-target + </button> +</p> +<div class="collapse" id="collapseExample"> + <div class="card card-body"> + Some placeholder content for the collapse component. This panel is hidden by default but revealed when the user activates the relevant trigger. + </div> +</div> +{{< /example >}} + +## Multiple targets + +A `<button>` or `<a>` can show and hide multiple elements by referencing them with a selector in its `href` or `data-bs-target` attribute. +Multiple `<button>` or `<a>` can show and hide an element if they each reference it with their `href` or `data-bs-target` attribute + +{{< example >}} +<p> + <a class="btn btn-primary" data-bs-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Toggle first element</a> + <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#multiCollapseExample2" aria-expanded="false" aria-controls="multiCollapseExample2">Toggle second element</button> + <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target=".multi-collapse" aria-expanded="false" aria-controls="multiCollapseExample1 multiCollapseExample2">Toggle both elements</button> +</p> +<div class="row"> + <div class="col"> + <div class="collapse multi-collapse" id="multiCollapseExample1"> + <div class="card card-body"> + Some placeholder content for the first collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger. + </div> + </div> + </div> + <div class="col"> + <div class="collapse multi-collapse" id="multiCollapseExample2"> + <div class="card card-body"> + Some placeholder content for the second collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger. + </div> + </div> + </div> +</div> +{{< /example >}} + +## Accessibility + +Be sure to add `aria-expanded` to the control element. This attribute explicitly conveys the current state of the collapsible element tied to the control to screen readers and similar assistive technologies. If the collapsible element is closed by default, the attribute on the control element should have a value of `aria-expanded="false"`. If you've set the collapsible element to be open by default using the `show` class, set `aria-expanded="true"` on the control instead. The plugin will automatically toggle this attribute on the control based on whether or not the collapsible element has been opened or closed (via JavaScript, or because the user triggered another control element also tied to the same collapsible element). If the control element's HTML element is not a button (e.g., an `<a>` or `<div>`), the attribute `role="button"` should be added to the element. + +If your control element is targeting a single collapsible element – i.e. the `data-bs-target` attribute is pointing to an `id` selector – you should add the `aria-controls` attribute to the control element, containing the `id` of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself. + +Note that Bootstrap's current implementation does not cover the various *optional* keyboard interactions described in the [WAI-ARIA Authoring Practices 1.1 accordion pattern](https://www.w3.org/TR/wai-aria-practices-1.1/#accordion) - you will need to include these yourself with custom JavaScript. + +## Sass + +### Variables + +{{< scss-docs name="collapse-transition" file="scss/_variables.scss" >}} + +### Classes + +Collapse transition classes can be found in `scss/_transitions.scss` as these are shared across multiple components (collapse and accordion). + +{{< scss-docs name="collapse-classes" file="scss/_transitions.scss" >}} + +## Usage + +The collapse plugin utilizes a few classes to handle the heavy lifting: + +- `.collapse` hides the content +- `.collapse.show` shows the content +- `.collapsing` is added when the transition starts, and removed when it finishes + +These classes can be found in `_transitions.scss`. + +### Via data attributes + +Just add `data-bs-toggle="collapse"` and a `data-bs-target` to the element to automatically assign control of one or more collapsible elements. The `data-bs-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `show`. + +To add accordion-like group management to a collapsible area, add the data attribute `data-bs-parent="#selector"`. Refer to the demo to see this in action. + +### Via JavaScript + +Enable manually with: + +```js +var collapseElementList = [].slice.call(document.querySelectorAll('.collapse')) +var collapseList = collapseElementList.map(function (collapseEl) { + return new bootstrap.Collapse(collapseEl) +}) +``` + +### Options + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-parent=""`. + +<table class="table"> + <thead> + <tr> + <th style="width: 100px;">Name</th> + <th style="width: 50px;">Type</th> + <th style="width: 50px;">Default</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>parent</code></td> + <td>selector | jQuery object | DOM element </td> + <td><code>false</code></td> + <td>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 <code>card</code> class). The attribute has to be set on the target collapsible area.</td> + </tr> + <tr> + <td><code>toggle</code></td> + <td>boolean</td> + <td><code>true</code></td> + <td>Toggles the collapsible element on invocation</td> + </tr> + </tbody> +</table> + +### Methods + +{{< callout danger >}} +{{< partial "callout-danger-async-methods.md" >}} +{{< /callout >}} + +Activates your content as a collapsible element. Accepts an optional options `object`. + +You can create a collapse instance with the constructor, for example: + +```js +var myCollapse = document.getElementById('myCollapse') +var bsCollapse = new bootstrap.Collapse(myCollapse, { + toggle: false +}) +``` + +<table class="table"> + <thead> + <tr> + <th>Method</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>toggle</code></td> + <td>Toggles a collapsible element to shown or hidden. <strong>Returns to the caller before the collapsible element has actually been shown or hidden</strong> (i.e. before the <code>shown.bs.collapse</code> or <code>hidden.bs.collapse</code> event occurs).</td> + </tr> + <tr> + <td><code>show</code></td> + <td>Shows a collapsible element. <strong>Returns to the caller before the collapsible element has actually been shown</strong> (e.g., before the <code>shown.bs.collapse</code> event occurs). </td> + </tr> + <tr> + <td><code>hide</code></td> + <td>Hides a collapsible element. <strong>Returns to the caller before the collapsible element has actually been hidden</strong> (e.g., before the <code>hidden.bs.collapse</code> event occurs).</td> + </tr> + <tr> + <td><code>dispose</code></td> + <td>Destroys an element's collapse. (Removes stored data on the DOM element)</td> + </tr> + <tr> + <td> + <code>getInstance</code> + </td> + <td> + Static method which allows you to get the collapse instance associated to a DOM element, you can use it like this: <code>bootstrap.Collapse.getInstance(element)</code> + </td> + </tr> + <tr> + <td> + <code>getOrCreateInstance</code> + </td> + <td> + Static method which returns a collapse instance associated to a DOM element or create a new one in case it wasn't initialised. + You can use it like this: <code>bootstrap.Collapse.getOrCreateInstance(element)</code> + </td> + </tr> + </tbody> +</table> + +### Events + +Bootstrap's collapse class exposes a few events for hooking into collapse functionality. + +<table class="table"> + <thead> + <tr> + <th style="width: 150px;">Event type</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>show.bs.collapse</code></td> + <td>This event fires immediately when the <code>show</code> instance method is called.</td> + </tr> + <tr> + <td><code>shown.bs.collapse</code></td> + <td>This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).</td> + </tr> + <tr> + <td><code>hide.bs.collapse</code></td> + <td>This event is fired immediately when the <code>hide</code> method has been called.</td> + </tr> + <tr> + <td><code>hidden.bs.collapse</code></td> + <td>This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).</td> + </tr> + </tbody> +</table> + +```js +var myCollapsible = document.getElementById('myCollapsible') +myCollapsible.addEventListener('hidden.bs.collapse', function () { + // do something... +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/dropdowns.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/dropdowns.md new file mode 100644 index 000000000..1668ae7bd --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/dropdowns.md @@ -0,0 +1,1210 @@ +--- +layout: docs +title: Dropdowns +description: Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin. +group: components +toc: true +--- + +## Overview + +Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision](https://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/). + +Dropdowns are built on a third party library, [Popper](https://popper.js.org/), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js]({{< param "cdn.popper" >}}) before Bootstrap's JavaScript or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper. Popper isn't used to position dropdowns in navbars though as dynamic positioning isn't required. + +## Accessibility + +The [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr>](https://www.w3.org/TR/wai-aria/) standard defines an actual [`role="menu"` widget](https://www.w3.org/WAI/PF/aria/roles#menu), but this is specific to application-like menus which trigger actions or functions. <abbr title="Accessible Rich Internet Applications">ARIA</abbr> menus can only contain menu items, checkbox menu items, radio button menu items, radio button groups, and sub-menus. + +Bootstrap's dropdowns, on the other hand, are designed to be generic and applicable to a variety of situations and markup structures. For instance, it is possible to create dropdowns that contain additional inputs and form controls, such as search fields or login forms. For this reason, Bootstrap does not expect (nor automatically add) any of the `role` and `aria-` attributes required for true <abbr title="Accessible Rich Internet Applications">ARIA</abbr> menus. Authors will have to include these more specific attributes themselves. + +However, Bootstrap does add built-in support for most standard keyboard menu interactions, such as the ability to move through individual `.dropdown-item` elements using the cursor keys and close the menu with the <kbd>ESC</kbd> key. + +## Examples + +Wrap the dropdown's toggle (your button or link) and the dropdown menu within `.dropdown`, or another element that declares `position: relative;`. Dropdowns can be triggered from `<a>` or `<button>` elements to better fit your potential needs. The examples shown here use semantic `<ul>` elements where appropriate, but custom markup is supported. + +### Single button + +Any single `.btn` can be turned into a dropdown toggle with some markup changes. Here's how you can put them to work with either `<button>` elements: + +{{< example >}} +<div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown button + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> +</div> +{{< /example >}} + +And with `<a>` elements: + +{{< example >}} +<div class="dropdown"> + <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown link + </a> + + <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> +</div> +{{< /example >}} + +The best part is you can do this with any button variant, too: + +<div class="bd-example"> + <div class="btn-group"> + <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Primary</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Secondary</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Success</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Info</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-warning dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Warning</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Danger</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> +</div> + +```html +<!-- Example single danger button --> +<div class="btn-group"> + <button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Action + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> +</div> +``` + +### Split button + +Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of `.dropdown-toggle-split` for proper spacing around the dropdown caret. + +We use this extra class to reduce the horizontal `padding` on either side of the caret by 25% and remove the `margin-left` that's added for regular button dropdowns. Those extra changes keep the caret centered in the split button and provide a more appropriately sized hit area next to the main button. + +<div class="bd-example"> + <div class="btn-group"> + <button type="button" class="btn btn-primary">Primary</button> + <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-secondary">Secondary</button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-success">Success</button> + <button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-info">Info</button> + <button type="button" class="btn btn-info dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-warning">Warning</button> + <button type="button" class="btn btn-warning dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-danger">Danger</button> + <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div><!-- /btn-group --> +</div> + +```html +<!-- Example split danger button --> +<div class="btn-group"> + <button type="button" class="btn btn-danger">Action</button> + <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> +</div> +``` + +## Sizing + +Button dropdowns work with buttons of all sizes, including default and split dropdown buttons. + +<div class="bd-example"> + <div class="btn-group"> + <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> + Large button + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="btn-group"> + <button type="button" class="btn btn-lg btn-secondary">Large split button</button> + <button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> +</div> + +```html +<!-- Large button groups (default and split) --> +<div class="btn-group"> + <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> + Large button + </button> + <ul class="dropdown-menu"> + ... + </ul> +</div> +<div class="btn-group"> + <button class="btn btn-secondary btn-lg" type="button"> + Large split button + </button> + <button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + ... + </ul> +</div> +``` + +<div class="bd-example"> + <div class="btn-group"> + <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> + Small button + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-secondary">Small split button</button> + <button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> +</div> + +```html +<div class="btn-group"> + <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> + Small button + </button> + <ul class="dropdown-menu"> + ... + </ul> +</div> +<div class="btn-group"> + <button class="btn btn-secondary btn-sm" type="button"> + Small split button + </button> + <button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + ... + </ul> +</div> +``` + +## Dark dropdowns + +Opt into darker dropdowns to match a dark navbar or custom style by adding `.dropdown-menu-dark` onto an existing `.dropdown-menu`. No changes are required to the dropdown items. + +{{< example >}} +<div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown button + </button> + <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="dropdownMenuButton2"> + <li><a class="dropdown-item active" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> +</div> +{{< /example >}} + +And putting it to use in a navbar: + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDarkDropdown" aria-controls="navbarNavDarkDropdown" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarNavDarkDropdown"> + <ul class="navbar-nav"> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </a> + <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + </div> + </div> +</nav> +{{< /example >}} + +## Directions + +{{< callout info >}} +#### RTL +Directions are mirrored when using Bootstrap in RTL, meaning `.dropstart` will appear on the right side. +{{< /callout >}} + +### Dropup + +Trigger dropdown menus above elements by adding `.dropup` to the parent element. + +<div class="bd-example"> + <div class="btn-group dropup"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropup + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="btn-group dropup"> + <button type="button" class="btn btn-secondary"> + Split dropup + </button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> +</div> + +```html +<!-- Default dropup button --> +<div class="btn-group dropup"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropup + </button> + <ul class="dropdown-menu"> + <!-- Dropdown menu links --> + </ul> +</div> + +<!-- Split dropup button --> +<div class="btn-group dropup"> + <button type="button" class="btn btn-secondary"> + Split dropup + </button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <!-- Dropdown menu links --> + </ul> +</div> +``` + +### Dropright + +Trigger dropdown menus at the right of the elements by adding `.dropend` to the parent element. + +<div class="bd-example"> + <div class="btn-group dropend"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropright + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="btn-group dropend"> + <button type="button" class="btn btn-secondary"> + Split dropend + </button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropright</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> +</div> + +```html +<!-- Default dropend button --> +<div class="btn-group dropend"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropright + </button> + <ul class="dropdown-menu"> + <!-- Dropdown menu links --> + </ul> +</div> + +<!-- Split dropend button --> +<div class="btn-group dropend"> + <button type="button" class="btn btn-secondary"> + Split dropend + </button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropright</span> + </button> + <ul class="dropdown-menu"> + <!-- Dropdown menu links --> + </ul> +</div> +``` + +### Dropleft + +Trigger dropdown menus at the left of the elements by adding `.dropstart` to the parent element. + +<div class="bd-example"> + <div class="btn-group dropstart"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropleft + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="btn-group"> + <div class="btn-group dropstart" role="group"> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropleft</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <button type="button" class="btn btn-secondary"> + Split dropstart + </button> + </div> +</div> + +```html +<!-- Default dropstart button --> +<div class="btn-group dropstart"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropstart + </button> + <ul class="dropdown-menu"> + <!-- Dropdown menu links --> + </ul> +</div> + +<!-- Split dropstart button --> +<div class="btn-group"> + <div class="btn-group dropstart" role="group"> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropstart</span> + </button> + <ul class="dropdown-menu"> + <!-- Dropdown menu links --> + </ul> + </div> + <button type="button" class="btn btn-secondary"> + Split dropstart + </button> +</div> +``` + +## Menu items + +You can use `<a>` or `<button>` elements as dropdown items. + +{{< example >}} +<div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> + <li><button class="dropdown-item" type="button">Action</button></li> + <li><button class="dropdown-item" type="button">Another action</button></li> + <li><button class="dropdown-item" type="button">Something else here</button></li> + </ul> +</div> +{{< /example >}} + +You can also create non-interactive dropdown items with `.dropdown-item-text`. Feel free to style further with custom CSS or text utilities. + +{{< example >}} +<ul class="dropdown-menu"> + <li><span class="dropdown-item-text">Dropdown item text</span></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> +</ul> +{{< /example >}} + +### Active + +Add `.active` to items in the dropdown to **style them as active**. To convey the active state to assistive technologies, use the `aria-current` attribute — using the `page` value for the current page, or `true` for the current item in a set. + +{{< example >}} +<ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Regular link</a></li> + <li><a class="dropdown-item active" href="#" aria-current="true">Active link</a></li> + <li><a class="dropdown-item" href="#">Another link</a></li> +</ul> +{{< /example >}} + +### Disabled + +Add `.disabled` to items in the dropdown to **style them as disabled**. + +{{< example >}} +<ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Regular link</a></li> + <li><a class="dropdown-item disabled" href="#" tabindex="-1" aria-disabled="true">Disabled link</a></li> + <li><a class="dropdown-item" href="#">Another link</a></li> +</ul> +{{< /example >}} + +## Menu alignment + +By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. You can change this with the directional `.drop*` classes, but you can also control them with additional modifier classes. + +Add `.dropdown-menu-end` to a `.dropdown-menu` to right align the dropdown menu. Directions are mirrored when using Bootstrap in RTL, meaning `.dropdown-menu-end` will appear on the left side. + +{{< callout info >}} +**Heads up!** Dropdowns are positioned thanks to Popper except when they are contained in a navbar. +{{< /callout >}} + +{{< example >}} +<div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Right-aligned menu example + </button> + <ul class="dropdown-menu dropdown-menu-end"> + <li><button class="dropdown-item" type="button">Action</button></li> + <li><button class="dropdown-item" type="button">Another action</button></li> + <li><button class="dropdown-item" type="button">Something else here</button></li> + </ul> +</div> +{{< /example >}} + +### Responsive alignment + +If you want to use responsive alignment, disable dynamic positioning by adding the `data-bs-display="static"` attribute and use the responsive variation classes. + +To align **right** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu{-sm|-md|-lg|-xl|-xxl}-end`. + +{{< example >}} +<div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false"> + Left-aligned but right aligned when large screen + </button> + <ul class="dropdown-menu dropdown-menu-lg-end"> + <li><button class="dropdown-item" type="button">Action</button></li> + <li><button class="dropdown-item" type="button">Another action</button></li> + <li><button class="dropdown-item" type="button">Something else here</button></li> + </ul> +</div> +{{< /example >}} + +To align **left** the dropdown menu with the given breakpoint or larger, add `.dropdown-menu-end` and `.dropdown-menu{-sm|-md|-lg|-xl|-xxl}-start`. + +{{< example >}} +<div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false"> + Right-aligned but left aligned when large screen + </button> + <ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start"> + <li><button class="dropdown-item" type="button">Action</button></li> + <li><button class="dropdown-item" type="button">Another action</button></li> + <li><button class="dropdown-item" type="button">Something else here</button></li> + </ul> +</div> +{{< /example >}} + +Note that you don't need to add a `data-bs-display="static"` attribute to dropdown buttons in navbars, since Popper isn't used in navbars. + +### Alignment options + +Taking most of the options shown above, here's a small kitchen sink demo of various dropdown alignment options in one place. + +{{< example >}} +<div class="btn-group"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Right-aligned menu + </button> + <ul class="dropdown-menu dropdown-menu-end"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false"> + Left-aligned, right-aligned lg + </button> + <ul class="dropdown-menu dropdown-menu-lg-end"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false"> + Right-aligned, left-aligned lg + </button> + <ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group dropstart"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropstart + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group dropend"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropend + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group dropup"> + <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> + Dropup + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> +{{< /example >}} + +## Menu content + +### Headers + +Add a header to label sections of actions in any dropdown menu. + +{{< example >}} +<ul class="dropdown-menu"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> +</ul> +{{< /example >}} + +### Dividers + +Separate groups of related menu items with a divider. + +{{< example >}} +<ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> +</ul> +{{< /example >}} + +### Text + +Place any freeform text within a dropdown menu with text and use [spacing utilities]({{< docsref "/utilities/spacing" >}}). Note that you'll likely need additional sizing styles to constrain the menu width. + +{{< example >}} +<div class="dropdown-menu p-4 text-muted" style="max-width: 200px;"> + <p> + Some example text that's free-flowing within the dropdown menu. + </p> + <p class="mb-0"> + And this is more example text. + </p> +</div> +{{< /example >}} + +### Forms + +Put a form within a dropdown menu, or make it into a dropdown menu, and use [margin or padding utilities]({{< docsref "/utilities/spacing" >}}) to give it the negative space you require. + +{{< example >}} +<div class="dropdown-menu"> + <form class="px-4 py-3"> + <div class="mb-3"> + <label for="exampleDropdownFormEmail1" class="form-label">Email address</label> + <input type="email" class="form-control" id="exampleDropdownFormEmail1" placeholder="email@example.com"> + </div> + <div class="mb-3"> + <label for="exampleDropdownFormPassword1" class="form-label">Password</label> + <input type="password" class="form-control" id="exampleDropdownFormPassword1" placeholder="Password"> + </div> + <div class="mb-3"> + <div class="form-check"> + <input type="checkbox" class="form-check-input" id="dropdownCheck"> + <label class="form-check-label" for="dropdownCheck"> + Remember me + </label> + </div> + </div> + <button type="submit" class="btn btn-primary">Sign in</button> + </form> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="#">New around here? Sign up</a> + <a class="dropdown-item" href="#">Forgot password?</a> +</div> +{{< /example >}} + +{{< example >}} +<form class="dropdown-menu p-4"> + <div class="mb-3"> + <label for="exampleDropdownFormEmail2" class="form-label">Email address</label> + <input type="email" class="form-control" id="exampleDropdownFormEmail2" placeholder="email@example.com"> + </div> + <div class="mb-3"> + <label for="exampleDropdownFormPassword2" class="form-label">Password</label> + <input type="password" class="form-control" id="exampleDropdownFormPassword2" placeholder="Password"> + </div> + <div class="mb-3"> + <div class="form-check"> + <input type="checkbox" class="form-check-input" id="dropdownCheck2"> + <label class="form-check-label" for="dropdownCheck2"> + Remember me + </label> + </div> + </div> + <button type="submit" class="btn btn-primary">Sign in</button> +</form> +{{< /example >}} + +## Dropdown options + +Use `data-bs-offset` or `data-bs-reference` to change the location of the dropdown. + +{{< example >}} +<div class="d-flex"> + <div class="dropdown me-1"> + <button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuOffset" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="10,20"> + Offset + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuOffset"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div> + <div class="btn-group"> + <button type="button" class="btn btn-secondary">Reference</button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" id="dropdownMenuReference" data-bs-toggle="dropdown" aria-expanded="false" data-bs-reference="parent"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuReference"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> +</div> +{{< /example >}} + +### Auto close behavior + +By default, the dropdown menu is closed when clicking inside or outside the dropdown menu. You can use the `autoClose` option to change this behavior of the dropdown. + +{{< example >}} +<div class="btn-group"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="defaultDropdown" data-bs-toggle="dropdown" data-bs-auto-close="true" aria-expanded="false"> + Default dropdown + </button> + <ul class="dropdown-menu" aria-labelledby="defaultDropdown"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuClickableOutside" data-bs-toggle="dropdown" data-bs-auto-close="inside" aria-expanded="false"> + Clickable outside + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuClickableOutside"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuClickableInside" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false"> + Clickable inside + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuClickableInside"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> + +<div class="btn-group"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuClickable" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-expanded="false"> + Manual close + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuClickable"> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + <li><a class="dropdown-item" href="#">Menu item</a></li> + </ul> +</div> +{{< /example >}} + +## Sass + +### Variables + +Variables for all dropdowns: + +{{< scss-docs name="dropdown-variables" file="scss/_variables.scss" >}} + +Variables for the [dark dropdown](#dark-dropdowns): + +{{< scss-docs name="dropdown-dark-variables" file="scss/_variables.scss" >}} + +Variables for the CSS-based carets that indicate a dropdown's interactivity: + +{{< scss-docs name="caret-variables" file="scss/_variables.scss" >}} + +### Mixins + +Mixins are used to generate the CSS-based carets and can be found in `scss/mixins/_caret.scss`. + +{{< scss-docs name="caret-mixins" file="scss/mixins/_caret.scss" >}} + +## Usage + +Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.show` class on the parent `.dropdown-menu`. The `data-bs-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it. + +{{< callout info >}} +On touch-enabled devices, opening a dropdown adds empty `mouseover` handlers to the immediate children of the `<body>` element. This admittedly ugly hack is necessary to work around a [quirk in iOS' event delegation](https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html), which would otherwise prevent a tap anywhere outside of the dropdown from triggering the code that closes the dropdown. Once the dropdown is closed, these additional empty `mouseover` handlers are removed. +{{< /callout >}} + +### Via data attributes + +Add `data-bs-toggle="dropdown"` to a link or button to toggle a dropdown. + +```html +<div class="dropdown"> + <button id="dLabel" type="button" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown trigger + </button> + <ul class="dropdown-menu" aria-labelledby="dLabel"> + ... + </ul> +</div> +``` + +### Via JavaScript + +Call the dropdowns via JavaScript: + +```js +var dropdownElementList = [].slice.call(document.querySelectorAll('.dropdown-toggle')) +var dropdownList = dropdownElementList.map(function (dropdownToggleEl) { + return new bootstrap.Dropdown(dropdownToggleEl) +}) +``` + +{{< callout info >}} +##### `data-bs-toggle="dropdown"` still required + +Regardless of whether you call your dropdown via JavaScript or instead use the data-api, `data-bs-toggle="dropdown"` is always required to be present on the dropdown's trigger element. +{{< /callout >}} + +### Options + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-offset=""`. Make sure to change the case type of the option name from camelCase to kebab-case when passing the options via data attributes. For example, instead of using `data-bs-autoClose="false"`, use `data-bs-auto-close="false"`. + +<table class="table"> + <thead> + <tr> + <th style="width: 100px;">Name</th> + <th style="width: 100px;">Type</th> + <th style="width: 50px;">Default</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>boundary</code></td> + <td>string | element</td> + <td><code>'clippingParents'</code></td> + <td>Overflow constraint boundary of the dropdown menu (applies only to Popper's preventOverflow modifier). By default it's <code>'clippingParents'</code> and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v2/utils/detect-overflow/#boundary">detectOverflow docs</a>.</td> + </tr> + <tr> + <td><code>reference</code></td> + <td>string | element | object</td> + <td><code>'toggle'</code></td> + <td>Reference element of the dropdown menu. Accepts the values of <code>'toggle'</code>, <code>'parent'</code>, an HTMLElement reference or an object providing <code>getBoundingClientRect</code>. For more information refer to Popper's <a href="https://popper.js.org/docs/v2/constructors/#createpopper">constructor docs</a> and <a href="https://popper.js.org/docs/v2/virtual-elements/">virtual element docs</a>.</td> + </tr> + <tr> + <td><code>display</code></td> + <td>string</td> + <td><code>'dynamic'</code></td> + <td>By default, we use Popper for dynamic positioning. Disable this with <code>static</code>.</td> + </tr> + <tr> + <td><code>offset</code></td> + <td>array | string | function</td> + <td><code>[0, 2]</code></td> + <td> + <p>Offset of the dropdown relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p> + <p>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: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p> + <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p> + </td> + </tr> + <tr> + <td><code>autoClose</code></td> + <td>boolean | string</td> + <td><code>true</code></td> + <td> + <p>Configure the auto close behavior of the dropdown:</p> + <ul> + <li><code>true</code> - the dropdown will be closed by clicking outside or inside the dropdown menu.</li> + <li><code>false</code> - the dropdown will be closed by clicking the toggle button and manually calling <code>hide</code> or <code>toggle</code> method. (Also will not be closed by pressing <kbd>esc</kbd> key)</li> + <li><code>'inside'</code> - the dropdown will be closed (only) by clicking inside the dropdown menu.</li> + <li><code>'outside'</code> - the dropdown will be closed (only) by clicking outside the dropdown menu.</li> + </ul> + </td> + </tr> + <tr> + <td><code>popperConfig</code></td> + <td>null | object | function</td> + <td><code>null</code></td> + <td> + <p>To change Bootstrap's default Popper config, see <a href="https://popper.js.org/docs/v2/constructors/#options">Popper's configuration</a>.</p> + <p>When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper.</p> + </td> + </tr> + </tbody> +</table> + +#### Using function with `popperConfig` + +```js +var dropdown = new bootstrap.Dropdown(element, { + popperConfig: function (defaultBsPopperConfig) { + // var newPopperConfig = {...} + // use defaultBsPopperConfig if needed... + // return newPopperConfig + } +}) +``` + +### Methods + +<table class="table"> + <thead> + <tr> + <th>Method</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>toggle</code></td> + <td> + Toggles the dropdown menu of a given navbar or tabbed navigation. + </td> + </tr> + <tr> + <td><code>show</code></td> + <td> + Shows the dropdown menu of a given navbar or tabbed navigation. + </td> + </tr> + <tr> + <td><code>hide</code></td> + <td> + Hides the dropdown menu of a given navbar or tabbed navigation. + </td> + </tr> + <tr> + <td><code>update</code></td> + <td> + Updates the position of an element's dropdown. + </td> + </tr> + <tr> + <td><code>dispose</code></td> + <td> + Destroys an element's dropdown. (Removes stored data on the DOM element) + </td> + </tr> + <tr> + <td> + <code>getInstance</code> + </td> + <td> + Static method which allows you to get the dropdown instance associated to a DOM element, you can use it like this: <code>bootstrap.Dropdown.getInstance(element)</code> + </td> + </tr> + <tr> + <td> + <code>getOrCreateInstance</code> + </td> + <td> + Static method which returns a dropdown instance associated to a DOM element or create a new one in case it wasn't initialised. + You can use it like this: <code>bootstrap.Dropdown.getOrCreateInstance(element)</code> + </td> + </tr> + </tbody> +</table> + +### Events + +All dropdown events are fired at the toggling element and then bubbled up. So you can also add event listeners on the `.dropdown-menu`'s parent element. `hide.bs.dropdown` and `hidden.bs.dropdown` events have a `clickEvent` property (only when the original Event type is `click`) that contains an Event Object for the click event. + +<table class="table"> + <thead> + <tr> + <th>Method</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <code>show.bs.dropdown</code> + </td> + <td> + Fires immediately when the show instance method is called. + </td> + </tr> + <tr> + <td> + <code>shown.bs.dropdown</code> + </td> + <td> + Fired when the dropdown has been made visible to the user and CSS transitions have completed. + </td> + </tr> + <tr> + <td> + <code>hide.bs.dropdown</code> + </td> + <td> + Fires immediately when the hide instance method has been called. + </td> + </tr> + <tr> + <td> + <code>hidden.bs.dropdown</code> + </td> + <td> + Fired when the dropdown has finished being hidden from the user and CSS transitions have completed. + </td> + </tr> + </tbody> +</table> + +```js +var myDropdown = document.getElementById('myDropdown') +myDropdown.addEventListener('show.bs.dropdown', function () { + // do something... +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/list-group.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/list-group.md index 5f57d1625..c49541bdb 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/list-group.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/list-group.md @@ -94,9 +94,51 @@ Add `.list-group-flush` to remove some borders and rounded corners to render lis </ul> {{< /example >}} +## Numbered + +Add the `.list-group-numbered` modifier class (and optionally use an `<ol>` element) to opt into numbered list group items. Numbers are generated via CSS (as opposed to a `<ol>`s default browser styling) for better placement inside list group items and to allow for better customization. + +Numbers are generated by `counter-reset` on the `<ol>`, and then styled and placed with a `::before` pseudo-element on the `<li>` with `counter-increment` and `content`. + +{{< example >}} +<ol class="list-group list-group-numbered"> + <li class="list-group-item">Cras justo odio</li> + <li class="list-group-item">Cras justo odio</li> + <li class="list-group-item">Cras justo odio</li> +</ol> +{{< /example >}} + +These work great with custom content as well. + +{{< example >}} +<ol class="list-group list-group-numbered"> + <li class="list-group-item d-flex justify-content-between align-items-start"> + <div class="ms-2 me-auto"> + <div class="fw-bold">Subheading</div> + Cras justo odio + </div> + <span class="badge bg-primary rounded-pill">14</span> + </li> + <li class="list-group-item d-flex justify-content-between align-items-start"> + <div class="ms-2 me-auto"> + <div class="fw-bold">Subheading</div> + Cras justo odio + </div> + <span class="badge bg-primary rounded-pill">14</span> + </li> + <li class="list-group-item d-flex justify-content-between align-items-start"> + <div class="ms-2 me-auto"> + <div class="fw-bold">Subheading</div> + Cras justo odio + </div> + <span class="badge bg-primary rounded-pill">14</span> + </li> +</ol> +{{< /example >}} + ## Horizontal -Add `.list-group-horizontal` to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant `.list-group-horizontal-{sm|md|lg|xl}` to make a list group horizontal starting at that breakpoint's `min-width`. Currently **horizontal list groups cannot be combined with flush list groups.** +Add `.list-group-horizontal` to change the layout of list group items from vertical to horizontal across all breakpoints. Alternatively, choose a responsive variant `.list-group-horizontal-{sm|md|lg|xl|xxl}` to make a list group horizontal starting at that breakpoint's `min-width`. Currently **horizontal list groups cannot be combined with flush list groups.** **ProTip:** Want equal-width list group items when horizontal? Add `.flex-fill` to each list group item. @@ -140,7 +182,7 @@ Contextual classes also work with `.list-group-item-action`. Note the addition o </div> {{< /example >}} -{{< callout warning >}} +{{< callout info >}} {{< partial "callout-warning-color-assistive-technologies.md" >}} {{< /callout >}} @@ -152,15 +194,15 @@ Add badges to any list group item to show unread counts, activity, and more with <ul class="list-group"> <li class="list-group-item d-flex justify-content-between align-items-center"> A list item - <span class="badge badge-primary badge-pill">14</span> + <span class="badge bg-primary rounded-pill">14</span> </li> <li class="list-group-item d-flex justify-content-between align-items-center"> A second list item - <span class="badge badge-primary badge-pill">2</span> + <span class="badge bg-primary rounded-pill">2</span> </li> <li class="list-group-item d-flex justify-content-between align-items-center"> A third list item - <span class="badge badge-primary badge-pill">1</span> + <span class="badge bg-primary rounded-pill">1</span> </li> </ul> {{< /example >}} @@ -171,7 +213,7 @@ Add nearly any HTML within, even for linked list groups like the one below, with {{< example >}} <div class="list-group"> - <a href="#" class="list-group-item list-group-item-action active"> + <a href="#" class="list-group-item list-group-item-action active" aria-current="true"> <div class="d-flex w-100 justify-content-between"> <h5 class="mb-1">List group item heading</h5> <small>3 days ago</small> @@ -198,6 +240,80 @@ Add nearly any HTML within, even for linked list groups like the one below, with </div> {{< /example >}} +## Checkboxes and radios + +Place Bootstrap's checkboxes and radios within list group items and customize as needed. You can use them without `<label>`s, but please remember to include an `aria-label` attribute and value for accessibility. + +{{< example >}} +<ul class="list-group"> + <li class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value="" aria-label="..."> + First checkbox + </li> + <li class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value="" aria-label="..."> + Second checkbox + </li> + <li class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value="" aria-label="..."> + Third checkbox + </li> + <li class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value="" aria-label="..."> + Fourth checkbox + </li> + <li class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value="" aria-label="..."> + Fifth checkbox + </li> +</ul> +{{< /example >}} + +And if you want `<label>`s as the `.list-group-item` for large hit areas, you can do that, too. + +{{< example >}} +<div class="list-group"> + <label class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value=""> + First checkbox + </label> + <label class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value=""> + Second checkbox + </label> + <label class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value=""> + Third checkbox + </label> + <label class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value=""> + Fourth checkbox + </label> + <label class="list-group-item"> + <input class="form-check-input me-1" type="checkbox" value=""> + Fifth checkbox + </label> +</div> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="list-group-variables" file="scss/_variables.scss" >}} + +### Mixins + +Used in combination with `$theme-colors` to generate the [contextual variant classes](#contextual-classes) for `.list-group-item`s. + +{{< scss-docs name="list-group-mixin" file="scss/mixins/_list-group.scss" >}} + +### Loop + +Loop that generates the modifier classes with the `list-group-item-variant()` mixin. + +{{< scss-docs name="list-group-modifiers" file="scss/_list-group.scss" >}} + ## JavaScript behavior Use the tab JavaScript plugin—include it individually or through the compiled `bootstrap.js` file—to extend our list group to create tabbable panes of local content. @@ -206,10 +322,10 @@ Use the tab JavaScript plugin—include it individually or through the compiled <div class="row"> <div class="col-4"> <div class="list-group" id="list-tab" role="tablist"> - <a class="list-group-item list-group-item-action active" id="list-home-list" data-toggle="tab" href="#list-home" role="tab" aria-controls="list-home">Home</a> - <a class="list-group-item list-group-item-action" id="list-profile-list" data-toggle="tab" href="#list-profile" role="tab" aria-controls="list-profile">Profile</a> - <a class="list-group-item list-group-item-action" id="list-messages-list" data-toggle="tab" href="#list-messages" role="tab" aria-controls="list-messages">Messages</a> - <a class="list-group-item list-group-item-action" id="list-settings-list" data-toggle="tab" href="#list-settings" role="tab" aria-controls="list-settings">Settings</a> + <a class="list-group-item list-group-item-action active" id="list-home-list" data-bs-toggle="tab" href="#list-home" role="tab" aria-controls="list-home">Home</a> + <a class="list-group-item list-group-item-action" id="list-profile-list" data-bs-toggle="tab" href="#list-profile" role="tab" aria-controls="list-profile">Profile</a> + <a class="list-group-item list-group-item-action" id="list-messages-list" data-bs-toggle="tab" href="#list-messages" role="tab" aria-controls="list-messages">Messages</a> + <a class="list-group-item list-group-item-action" id="list-settings-list" data-bs-toggle="tab" href="#list-settings" role="tab" aria-controls="list-settings">Settings</a> </div> </div> <div class="col-8"> @@ -235,10 +351,10 @@ Use the tab JavaScript plugin—include it individually or through the compiled <div class="row"> <div class="col-4"> <div class="list-group" id="list-tab" role="tablist"> - <a class="list-group-item list-group-item-action active" id="list-home-list" data-toggle="list" href="#list-home" role="tab" aria-controls="home">Home</a> - <a class="list-group-item list-group-item-action" id="list-profile-list" data-toggle="list" href="#list-profile" role="tab" aria-controls="profile">Profile</a> - <a class="list-group-item list-group-item-action" id="list-messages-list" data-toggle="list" href="#list-messages" role="tab" aria-controls="messages">Messages</a> - <a class="list-group-item list-group-item-action" id="list-settings-list" data-toggle="list" href="#list-settings" role="tab" aria-controls="settings">Settings</a> + <a class="list-group-item list-group-item-action active" id="list-home-list" data-bs-toggle="list" href="#list-home" role="tab" aria-controls="list-home">Home</a> + <a class="list-group-item list-group-item-action" id="list-profile-list" data-bs-toggle="list" href="#list-profile" role="tab" aria-controls="list-profile">Profile</a> + <a class="list-group-item list-group-item-action" id="list-messages-list" data-bs-toggle="list" href="#list-messages" role="tab" aria-controls="list-messages">Messages</a> + <a class="list-group-item list-group-item-action" id="list-settings-list" data-bs-toggle="list" href="#list-settings" role="tab" aria-controls="list-settings">Settings</a> </div> </div> <div class="col-8"> @@ -254,16 +370,16 @@ Use the tab JavaScript plugin—include it individually or through the compiled ### Using data attributes -You can activate a list group navigation without writing any JavaScript by simply specifying `data-toggle="list"` or on an element. Use these data attributes on `.list-group-item`. +You can activate a list group navigation without writing any JavaScript by simply specifying `data-bs-toggle="list"` or on an element. Use these data attributes on `.list-group-item`. ```html <div role="tabpanel"> <!-- List group --> <div class="list-group" id="myList" role="tablist"> - <a class="list-group-item list-group-item-action active" data-toggle="list" href="#home" role="tab">Home</a> - <a class="list-group-item list-group-item-action" data-toggle="list" href="#profile" role="tab">Profile</a> - <a class="list-group-item list-group-item-action" data-toggle="list" href="#messages" role="tab">Messages</a> - <a class="list-group-item list-group-item-action" data-toggle="list" href="#settings" role="tab">Settings</a> + <a class="list-group-item list-group-item-action active" data-bs-toggle="list" href="#home" role="tab">Home</a> + <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#profile" role="tab">Profile</a> + <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#messages" role="tab">Messages</a> + <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#settings" role="tab">Settings</a> </div> <!-- Tab panes --> @@ -281,19 +397,25 @@ You can activate a list group navigation without writing any JavaScript by simpl Enable tabbable list item via JavaScript (each list item needs to be activated individually): ```js -$('#myList a').on('click', function (event) { - event.preventDefault() - $(this).tab('show') +var triggerTabList = [].slice.call(document.querySelectorAll('#myTab a')) +triggerTabList.forEach(function (triggerEl) { + var tabTrigger = new bootstrap.Tab(triggerEl) + + triggerEl.addEventListener('click', function (event) { + event.preventDefault() + tabTrigger.show() + }) }) ``` You can activate individual list item in several ways: ```js -$('#myList a[href="#profile"]').tab('show') // Select tab by name -$('#myList a:first-child').tab('show') // Select first tab -$('#myList a:last-child').tab('show') // Select last tab -$('#myList a:nth-child(3)').tab('show') // Select third tab +var triggerEl = document.querySelector('#myTab a[href="#profile"]') +bootstrap.Tab.getInstance(triggerEl).show() // Select tab by name + +var triggerFirstTabEl = document.querySelector('#myTab li:first-child a') +bootstrap.Tab.getInstance(triggerFirstTabEl).show() // Select first tab ``` ### Fade effect @@ -311,16 +433,16 @@ To make tabs panel fade in, add `.fade` to each `.tab-pane`. The first tab pane ### Methods -#### $().tab +#### constructor -Activates a list item element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the DOM. +Activates a list item element and content container. Tab should have either a `data-bs-target` or an `href` targeting a container node in the DOM. ```html <div class="list-group" id="myList" role="tablist"> - <a class="list-group-item list-group-item-action active" data-toggle="list" href="#home" role="tab">Home</a> - <a class="list-group-item list-group-item-action" data-toggle="list" href="#profile" role="tab">Profile</a> - <a class="list-group-item list-group-item-action" data-toggle="list" href="#messages" role="tab">Messages</a> - <a class="list-group-item list-group-item-action" data-toggle="list" href="#settings" role="tab">Settings</a> + <a class="list-group-item list-group-item-action active" data-bs-toggle="list" href="#home" role="tab">Home</a> + <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#profile" role="tab">Profile</a> + <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#messages" role="tab">Messages</a> + <a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#settings" role="tab">Settings</a> </div> <div class="tab-content"> @@ -331,18 +453,44 @@ Activates a list item element and content container. Tab should have either a `d </div> <script> - $(function () { - $('#myList a:last-child').tab('show') - }) + var firstTabEl = document.querySelector('#myTab a:last-child') + var firstTab = new bootstrap.Tab(firstTabEl) + + firstTab.show() </script> ``` -#### .tab('show') +#### show Selects the given list item and shows its associated pane. Any other list item that was previously selected becomes unselected and its associated pane is hidden. **Returns to the caller before the tab pane has actually been shown** (for example, before the `shown.bs.tab` event occurs). ```js -$('#someListItem').tab('show') + var someListItemEl = document.querySelector('#someListItem') + var tab = new bootstrap.Tab(someListItemEl) + + tab.show() +``` + +#### dispose + +Destroys an element's tab. + +#### getInstance + +*Static* method which allows you to get the tab instance associated with a DOM element + +```js +var triggerEl = document.querySelector('#trigger') +var tab = bootstrap.Tab.getInstance(triggerEl) // Returns a Bootstrap 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 initialised + +```js +var triggerEl = document.querySelector('#trigger') +var tab = bootstrap.Tab.getOrCreateInstance(triggerEl) // Returns a Bootstrap tab instance ``` ### Events @@ -356,7 +504,7 @@ When showing a new tab, the events fire in the following order: If no tab was already active, the `hide.bs.tab` and `hidden.bs.tab` events will not be fired. -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> <th style="width: 150px;">Event type</th> @@ -365,27 +513,30 @@ If no tab was already active, the `hide.bs.tab` and `hidden.bs.tab` events will </thead> <tbody> <tr> - <td>show.bs.tab</td> + <td><code>show.bs.tab</code></td> <td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td> </tr> <tr> - <td>shown.bs.tab</td> + <td><code>shown.bs.tab</code></td> <td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td> </tr> <tr> - <td>hide.bs.tab</td> + <td><code>hide.bs.tab</code></td> <td>This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the current active tab and the new soon-to-be-active tab, respectively.</td> </tr> <tr> - <td>hidden.bs.tab</td> + <td><code>hidden.bs.tab</code></td> <td>This event fires after a new tab is shown (and thus the previous active tab is hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the previous active tab and the new active tab, respectively.</td> </tr> </tbody> </table> ```js -$('a[data-toggle="list"]').on('shown.bs.tab', function (event) { - event.target // newly activated tab - event.relatedTarget // previous active tab -}) +var tabElms = document.querySelectorAll('a[data-bs-toggle="list"]') +tabElms.forEach(function(tabElm) { + tabElm.addEventListener('shown.bs.tab', function (event) { + event.target // newly activated tab + event.relatedTarget // previous active tab + }) +} ``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/modal.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/modal.md index 311952f58..e6a838aac 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/modal.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/modal.md @@ -18,8 +18,11 @@ Before getting started with Bootstrap's modal component, be sure to read the fol - Due to how HTML5 defines its semantics, [the `autofocus` HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus) has no effect in Bootstrap modals. To achieve the same effect, use some custom JavaScript: ```js -$('#myModal').on('shown.bs.modal', function () { - $('#myInput').trigger('focus') +var myModal = document.getElementById('myModal') +var myInput = document.getElementById('myInput') + +myModal.addEventListener('shown.bs.modal', function () { + myInput.focus() }) ``` @@ -41,15 +44,13 @@ Below is a _static_ modal example (meaning its `position` and `display` have bee <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <p>Modal body text goes here.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -63,15 +64,13 @@ Below is a _static_ modal example (meaning its `position` and `display` have bee <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <p>Modal body text goes here.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -88,15 +87,13 @@ Toggle a working modal demo by clicking the button below. It will slide down and <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLiveLabel">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <p>Woohoo, you're reading this text in a modal!</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -104,14 +101,14 @@ Toggle a working modal demo by clicking the button below. It will slide down and </div> <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLive"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalLive"> Launch demo modal </button> </div> ```html <!-- Button trigger modal --> -<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal"> Launch demo modal </button> @@ -121,15 +118,13 @@ Toggle a working modal demo by clicking the button below. It will slide down and <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -141,20 +136,18 @@ Toggle a working modal demo by clicking the button below. It will slide down and When backdrop is set to static, the modal will not close when clicking outside it. Click the button below to try it. -<div class="modal fade" id="staticBackdropLive" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLiveLabel" aria-hidden="true"> +<div class="modal fade" id="staticBackdropLive" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLiveLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLiveLabel">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <p>I will not close if you click outside me. Don't even try to press escape key.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Understood</button> </div> </div> @@ -162,32 +155,30 @@ When backdrop is set to static, the modal will not close when clicking outside i </div> <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#staticBackdropLive"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdropLive"> Launch static backdrop modal </button> </div> ```html <!-- Button trigger modal --> -<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#staticBackdrop"> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdrop"> Launch static backdrop modal </button> <!-- Modal --> -<div class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> +<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Understood</button> </div> </div> @@ -204,22 +195,13 @@ When modals become too long for the user's viewport or device, they scroll indep <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> - <div class="modal-body"> - <p>What follows is just some placeholder text for this modal dialog. Sipping on Rosé, Silver Lake sun, coming up all lazy. It’s in the palm of your hand now baby. So we hit the boulevard. So make a wish, I'll make it like your birthday everyday. Do you ever feel already buried deep six feet under? It's time to bring out the big balloons. You could've been the greatest. Passport stamps, she's cosmopolitan. Your kiss is cosmic, every move is magic.</p> - <p>We're living the life. We're doing it right. Open up your heart. I was tryna hit it and quit it. Her love is like a drug. Always leaves a trail of stardust. The girl's a freak, she drive a jeep in Laguna Beach. Fine, fresh, fierce, we got it on lock. All my girls vintage Chanel baby.</p> - <p>Before you met me I was alright but things were kinda heavy. Peach-pink lips, yeah, everybody stares. This is no big deal. Calling out my name. I could have rewrite your addiction. She's got that, je ne sais quoi, you know it. Heavy is the head that wears the crown. 'Cause, baby, you're a firework. Like thunder gonna shake the ground.</p> - <p>Just own the night like the 4th of July! I’m gon’ put her in a coma. What you're waiting for, it's time for you to show it off. Can't replace you with a million rings. You open my eyes and I'm ready to go, lead me into the light. And here you are. I’m gon’ put her in a coma. Come on, let your colours burst. So cover your eyes, I have a surprise. As I march alone to a different beat. Glitter all over the room pink flamingos in the pool.</p> - <p>You just gotta ignite the light and let it shine! Come just as you are to me. Just own the night like the 4th of July. Infect me with your love and fill me with your poison. Come just as you are to me. End of the rainbow looking treasure.</p> - <p>I can't sleep let's run away and don't ever look back, don't ever look back. I can't sleep let's run away and don't ever look back, don't ever look back. Yes, we make angels cry, raining down on earth from up above. I'm walking on air (tonight). Let you put your hands on me in my skin-tight jeans. Stinging like a bee I earned my stripes. I went from zero, to my own hero. Even brighter than the moon, moon, moon. Make 'em go, 'Aah, aah, aah' as you shoot across the sky-y-y! Why don't you let me stop by?</p> - <p>Boom, boom, boom. Never made me blink one time. Yeah, you're lucky if you're on her plane. Talk about our future like we had a clue. Oh my God no exaggeration. You're original, cannot be replaced. The girl's a freak, she drive a jeep in Laguna Beach. It's no big deal, it's no big deal, it's no big deal. In another life I would make you stay. I'm ma get your heart racing in my skin-tight jeans. I wanna walk on your wave length and be there when you vibrate Never made me blink one time.</p> - <p>We'd keep all our promises be us against the world. If you get the chance you better keep her. It's time to bring out the big, big, big, big, big, big balloons. I hope you got a healthy appetite. Don't let the greatness get you down, oh, oh yeah. Yeah, she's footloose and so fancy free. I want the jaw droppin', eye poppin', head turnin', body shockin'. End of the rainbow looking treasure.</p> + <div class="modal-body" style="min-height: 1500px"> + <p>This is some placeholder content to show the scrolling behavior for modals. Instead of repeating the text the modal, we use an inline style set a minimum height, thereby extending the length of the overall modal and demonstrating the overflow scrolling. When content becomes longer than the height of the viewport, scrolling will move the modal as needed.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -227,7 +209,7 @@ When modals become too long for the user's viewport or device, they scroll indep </div> <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalLong"> Launch demo modal </button> </div> @@ -239,22 +221,15 @@ You can also create a scrollable modal that allows scroll the modal body by addi <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalScrollableTitle">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> - <p>What follows is just some placeholder text for this modal dialog. You just gotta ignite the light and let it shine! Come just as you are to me. Just own the night like the 4th of July. Infect me with your love and fill me with your poison. Come just as you are to me. End of the rainbow looking treasure.</p> - <p>I can't sleep let's run away and don't ever look back, don't ever look back. I can't sleep let's run away and don't ever look back, don't ever look back. Yes, we make angels cry, raining down on earth from up above. I'm walking on air (tonight). Let you put your hands on me in my skin-tight jeans. Stinging like a bee I earned my stripes. I went from zero, to my own hero. Even brighter than the moon, moon, moon. Make 'em go, 'Aah, aah, aah' as you shoot across the sky-y-y! Why don't you let me stop by?</p> - <p>Boom, boom, boom. Never made me blink one time. Yeah, you're lucky if you're on her plane. Talk about our future like we had a clue. Oh my God no exaggeration. You're original, cannot be replaced. The girl's a freak, she drive a jeep in Laguna Beach. It's no big deal, it's no big deal, it's no big deal. In another life I would make you stay. I'm ma get your heart racing in my skin-tight jeans. I wanna walk on your wave length and be there when you vibrate Never made me blink one time.</p> - <p>We'd keep all our promises be us against the world. In another life I would be your girl. We can dance, until we die, you and I, will be young forever. And on my 18th Birthday we got matching tattoos. So open up your heart and just let it begin. 'Cause she's the muse and the artist. She eats your heart out. Like Jeffrey Dahmer (woo). Pop your confetti. (This is how we do) I know one spark will shock the world, yeah yeah. If you only knew what the future holds.</p> - <p>Sipping on Rosé, Silver Lake sun, coming up all lazy. It’s in the palm of your hand now baby. So we hit the boulevard. So make a wish, I'll make it like your birthday everyday. Do you ever feel already buried deep six feet under? It's time to bring out the big balloons. You could've been the greatest. Passport stamps, she's cosmopolitan. Your kiss is cosmic, every move is magic.</p> - <p>We're living the life. We're doing it right. Open up your heart. I was tryna hit it and quit it. Her love is like a drug. Always leaves a trail of stardust. The girl's a freak, she drive a jeep in Laguna Beach. Fine, fresh, fierce, we got it on lock. All my girls vintage Chanel baby.</p> - <p>Before you met me I was alright but things were kinda heavy. Peach-pink lips, yeah, everybody stares. This is no big deal. Calling out my name. I could have rewrite your addiction. She's got that, je ne sais quoi, you know it. Heavy is the head that wears the crown. 'Cause, baby, you're a firework. Like thunder gonna shake the ground.</p> - <p>Just own the night like the 4th of July! I’m gon’ put her in a coma. What you're waiting for, it's time for you to show it off. Can't replace you with a million rings. You open my eyes and I'm ready to go, lead me into the light. And here you are. I’m gon’ put her in a coma. Come on, let your colours burst. So cover your eyes, I have a surprise. As I march alone to a different beat. Glitter all over the room pink flamingos in the pool.</p> + <p>This is some placeholder content to show the scrolling behavior for modals. We use repeated line breaks to demonstrate how content can exceed minimum inner height, thereby showing inner scrolling. When content becomes longer than the prefedined max-height of modal, content will be cropped and scrollable within the modal.</p> + <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> + <p>This content should appear at the bottom after you scroll.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -262,7 +237,7 @@ You can also create a scrollable modal that allows scroll the modal body by addi </div> <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalScrollable"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalScrollable"> Launch demo modal </button> </div> @@ -283,15 +258,13 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalCenterTitle">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> - <p>Placeholder text for this demonstration of a vertically centered modal dialog.</p> + <p>This is a vertically centered modal.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -303,18 +276,15 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalCenteredScrollableTitle">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> - <p>Placeholder text for this demonstration of a vertically centered modal dialog.</p> - <p>In this case, the dialog has a bit more content, just to show how vertical centering can be added to a scrollable modal.</p> - <p>What follows is just some placeholder text for this modal dialog. Sipping on Rosé, Silver Lake sun, coming up all lazy. It’s in the palm of your hand now baby. So we hit the boulevard. So make a wish, I'll make it like your birthday everyday. Do you ever feel already buried deep six feet under? It's time to bring out the big balloons. You could've been the greatest. Passport stamps, she's cosmopolitan. Your kiss is cosmic, every move is magic.</p> - <p>We're living the life. We're doing it right. Open up your heart. I was tryna hit it and quit it. Her love is like a drug. Always leaves a trail of stardust. The girl's a freak, she drive a jeep in Laguna Beach. Fine, fresh, fierce, we got it on lock. All my girls vintage Chanel baby.</p> + <p>This is some placeholder content to show a vertically centered modal. We've added some extra copy here to show how vertically centering the modal works when combined with scrollable modals. We also use some repeated line breaks to quickly extend the height of the content, thereby triggering the scrolling. When content becomes longer than the prefedined max-height of modal, content will be cropped and scrollable within the modal.</p> + <br><br><br><br><br><br><br><br><br><br> + <p>Just like that.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -322,10 +292,10 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. </div> <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalCenter"> Vertically centered modal </button> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenteredScrollable"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalCenteredScrollable"> Vertically centered scrollable modal </button> </div> @@ -351,19 +321,17 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalPopoversLabel">Modal title</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <h5>Popover in a modal</h5> - <p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="Popover title" data-content="Popover body content is set in this attribute." data-container="#exampleModalPopovers">button</a> triggers a popover on click.</p> + <p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="Popover title" data-bs-content="Popover body content is set in this attribute." data-bs-container="#exampleModalPopovers">button</a> triggers a popover on click.</p> <hr> <h5>Tooltips in a modal</h5> - <p><a href="#" class="tooltip-test" title="Tooltip" data-container="#exampleModalPopovers">This link</a> and <a href="#" class="tooltip-test" title="Tooltip" data-container="#exampleModalPopovers">that link</a> have tooltips on hover.</p> + <p><a href="#" class="tooltip-test" title="Tooltip" data-bs-container="#exampleModalPopovers">This link</a> and <a href="#" class="tooltip-test" title="Tooltip" data-bs-container="#exampleModalPopovers">that link</a> have tooltips on hover.</p> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -371,7 +339,7 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. </div> <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalPopovers"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalPopovers"> Launch demo modal </button> </div> @@ -379,7 +347,7 @@ Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. ```html <div class="modal-body"> <h5>Popover in a modal</h5> - <p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="Popover title" data-content="Popover body content is set in this attribute.">button</a> triggers a popover on click.</p> + <p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="Popover title" data-bs-content="Popover body content is set in this attribute.">button</a> triggers a popover on click.</p> <hr> <h5>Tooltips in a modal</h5> <p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" title="Tooltip">that link</a> have tooltips on hover.</p> @@ -395,20 +363,20 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="gridModalLabel">Grids in modals</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="container-fluid bd-example-row"> <div class="row"> <div class="col-md-4">.col-md-4</div> - <div class="col-md-4 ml-auto">.col-md-4 .ml-auto</div> + <div class="col-md-4 ms-auto">.col-md-4 .ms-auto</div> </div> <div class="row"> - <div class="col-md-3 ml-auto">.col-md-3 .ml-auto</div> - <div class="col-md-2 ml-auto">.col-md-2 .ml-auto</div> + <div class="col-md-3 ms-auto">.col-md-3 .ms-auto</div> + <div class="col-md-2 ms-auto">.col-md-2 .ms-auto</div> </div> <div class="row"> - <div class="col-md-6 ml-auto">.col-md-6 .ml-auto</div> + <div class="col-md-6 ms-auto">.col-md-6 .ms-auto</div> </div> <div class="row"> <div class="col-sm-9"> @@ -426,7 +394,7 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w </div> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> @@ -434,7 +402,7 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w </div> <div class="bd-example"> -<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#gridSystemModal"> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#gridSystemModal"> Launch demo modal </button> </div> @@ -444,14 +412,14 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w <div class="container-fluid"> <div class="row"> <div class="col-md-4">.col-md-4</div> - <div class="col-md-4 ml-auto">.col-md-4 .ml-auto</div> + <div class="col-md-4 ms-auto">.col-md-4 .ms-auto</div> </div> <div class="row"> - <div class="col-md-3 ml-auto">.col-md-3 .ml-auto</div> - <div class="col-md-2 ml-auto">.col-md-2 .ml-auto</div> + <div class="col-md-3 ms-auto">.col-md-3 .ms-auto</div> + <div class="col-md-2 ms-auto">.col-md-2 .ms-auto</div> </div> <div class="row"> - <div class="col-md-6 ml-auto">.col-md-6 .ml-auto</div> + <div class="col-md-6 ms-auto">.col-md-6 .ms-auto</div> </div> <div class="row"> <div class="col-sm-9"> @@ -472,38 +440,36 @@ Utilize the Bootstrap grid system within a modal by nesting `.container-fluid` w ### Varying modal content -Have a bunch of buttons that all trigger the same modal with slightly different contents? Use `event.relatedTarget` and [HTML `data-*` attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes) (possibly [via jQuery](https://api.jquery.com/data/)) to vary the contents of the modal depending on which button was clicked. +Have a bunch of buttons that all trigger the same modal with slightly different contents? Use `event.relatedTarget` and [HTML `data-bs-*` attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes) to vary the contents of the modal depending on which button was clicked. Below is a live demo followed by example HTML and JavaScript. For more information, [read the modal events docs](#events) for details on `relatedTarget`. {{< example >}} -<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button> -<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button> -<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">Open modal for @getbootstrap</button> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" data-bs-whatever="@mdo">Open modal for @mdo</button> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" data-bs-whatever="@fat">Open modal for @fat</button> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal" data-bs-whatever="@getbootstrap">Open modal for @getbootstrap</button> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">New message</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <form> - <div class="form-group"> + <div class="mb-3"> <label for="recipient-name" class="col-form-label">Recipient:</label> <input type="text" class="form-control" id="recipient-name"> </div> - <div class="form-group"> + <div class="mb-3"> <label for="message-text" class="col-form-label">Message:</label> <textarea class="form-control" id="message-text"></textarea> </div> </form> </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Send message</button> </div> </div> @@ -512,17 +478,64 @@ Below is a live demo followed by example HTML and JavaScript. For more informati {{< /example >}} ```js -$('#exampleModal').on('show.bs.modal', function (event) { - var button = $(event.relatedTarget) // Button that triggered the modal - var recipient = button.data('whatever') // Extract info from data-* attributes - // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). - // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. - var modal = $(this) - modal.find('.modal-title').text('New message to ' + recipient) - modal.find('.modal-body input').val(recipient) +var exampleModal = document.getElementById('exampleModal') +exampleModal.addEventListener('show.bs.modal', function (event) { + // Button that triggered the modal + var button = event.relatedTarget + // Extract info from data-bs-* attributes + var recipient = button.getAttribute('data-bs-whatever') + // If necessary, you could initiate an AJAX request here + // and then do the updating in a callback. + // + // Update the modal's content. + var modalTitle = exampleModal.querySelector('.modal-title') + var modalBodyInput = exampleModal.querySelector('.modal-body input') + + modalTitle.textContent = 'New message to ' + recipient + modalBodyInput.value = recipient }) ``` +### Toggle between modals + +Toggle between multiple modals with some clever placement of the `data-bs-target` and `data-bs-toggle` attributes. For example, you could toggle a password reset modal from within an already open sign in modal. **Please note multiple modals cannot be open at the same time**—this method simply toggles between two separate modals. + +{{< example >}} +<div class="modal fade" id="exampleModalToggle" aria-hidden="true" aria-labelledby="exampleModalToggleLabel" tabindex="-1"> + <div class="modal-dialog modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="exampleModalToggleLabel">Modal 1</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + Show a second modal and hide this one with the button below. + </div> + <div class="modal-footer"> + <button class="btn btn-primary" data-bs-target="#exampleModalToggle2" data-bs-toggle="modal" data-bs-dismiss="modal">Open second modal</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="exampleModalToggle2" aria-hidden="true" aria-labelledby="exampleModalToggleLabel2" tabindex="-1"> + <div class="modal-dialog modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="exampleModalToggleLabel2">Modal 2</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + Hide this modal and show the first with the button below. + </div> + <div class="modal-footer"> + <button class="btn btn-primary" data-bs-target="#exampleModalToggle" data-bs-toggle="modal" data-bs-dismiss="modal">Back to first</button> + </div> + </div> + </div> +</div> +<a class="btn btn-primary" data-bs-toggle="modal" href="#exampleModalToggle" role="button">Open first modal</a> +{{< /example >}} + ### Change animation The `$modal-fade-transform` variable determines the transform state of `.modal-dialog` before the modal fade-in animation, the `$modal-show-transform` variable determines the transform of `.modal-dialog` at the end of the modal fade-in animation. @@ -541,7 +554,7 @@ For modals that simply appear rather than fade in to view, remove the `.fade` cl ### Dynamic heights -If the height of a modal changes while it is open, you should call `$('#myModal').modal('handleUpdate')` to readjust the modal's position in case a scrollbar appears. +If the height of a modal changes while it is open, you should call `myModal.handleUpdate()` to readjust the modal's position in case a scrollbar appears. ### Accessibility @@ -555,7 +568,7 @@ Embedding YouTube videos in modals requires additional JavaScript not in Bootstr Modals have three optional sizes, available via modifier classes to be placed on a `.modal-dialog`. These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports. -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> <th>Size</th> @@ -590,9 +603,9 @@ Modals have three optional sizes, available via modifier classes to be placed on Our default modal without modifier class constitutes the "medium" size modal. <div class="bd-example"> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalXl">Extra large modal</button> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLg">Large modal</button> - <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalSm">Small modal</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalXl">Extra large modal</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalLg">Large modal</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalSm">Small modal</button> </div> ```html @@ -606,9 +619,7 @@ Our default modal without modifier class constitutes the "medium" size modal. <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title h4" id="exampleModalXlLabel">Extra large modal</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> ... @@ -622,9 +633,7 @@ Our default modal without modifier class constitutes the "medium" size modal. <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title h4" id="exampleModalLgLabel">Large modal</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> ... @@ -638,42 +647,209 @@ Our default modal without modifier class constitutes the "medium" size modal. <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title h4" id="exampleModalSmLabel">Small modal</h5> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + </div> + </div> +</div> + +## Fullscreen Modal + +Another override is the option to pop up a modal that covers the user viewport, available via modifier classes that are placed on a `.modal-dialog`. + +<table class="table"> + <thead> + <tr> + <th>Class</th> + <th>Availability</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>.modal-fullscreen</code></td> + <td>Always</td> + </tr> + <tr> + <td><code>.modal-fullscreen-sm-down</code></td> + <td>Below <code>576px</code></td> + </tr> + <tr> + <td><code>.modal-fullscreen-md-down</code></td> + <td>Below <code>768px</code></td> + </tr> + <tr> + <td><code>.modal-fullscreen-lg-down</code></td> + <td>Below <code>992px</code></td> + </tr> + <tr> + <td><code>.modal-fullscreen-xl-down</code></td> + <td>Below <code>1200px</code></td> + </tr> + <tr> + <td><code>.modal-fullscreen-xxl-down</code></td> + <td>Below <code>1400px</code></td> + </tr> + </tbody> +</table> + +<div class="bd-example"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen">Full screen</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenSm">Full screen below sm</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenMd">Full screen below md</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenLg">Full screen below lg</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenXl">Full screen below xl</button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreenXxl">Full screen below xxl</button> +</div> + +```html +<!-- Full screen modal --> +<div class="modal-dialog modal-fullscreen-sm-down"> + ... +</div> +``` + +<div class="modal fade" id="exampleModalFullscreen" tabindex="-1" aria-labelledby="exampleModalFullscreenLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenLabel">Full screen modal</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> + +<div class="modal fade" id="exampleModalFullscreenSm" tabindex="-1" aria-labelledby="exampleModalFullscreenSmLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen-sm-down"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenSmLabel">Full screen below sm</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> + +<div class="modal fade" id="exampleModalFullscreenMd" tabindex="-1" aria-labelledby="exampleModalFullscreenMdLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen-md-down"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenMdLabel">Full screen below md</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> + +<div class="modal fade" id="exampleModalFullscreenLg" tabindex="-1" aria-labelledby="exampleModalFullscreenLgLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen-lg-down"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenLgLabel">Full screen below lg</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> ... </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> </div> </div> </div> +<div class="modal fade" id="exampleModalFullscreenXl" tabindex="-1" aria-labelledby="exampleModalFullscreenXlLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen-xl-down"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenXlLabel">Full screen below xl</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> + +<div class="modal fade" id="exampleModalFullscreenXxl" tabindex="-1" aria-labelledby="exampleModalFullscreenXxlLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen-xxl-down"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenXxlLabel">Full screen below xxl</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> + +## Sass + +### Variables + +{{< scss-docs name="modal-variables" file="scss/_variables.scss" >}} + +### Loop + +[Responsive fullscreen modals](#fullscreen-modal) are generated via the `$breakpoints` map and a loop in `scss/_modal.scss`. + +{{< scss-docs name="modal-fullscreen-loop" file="scss/_modal.scss" >}} + ## Usage -The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds `.modal-open` to the `<body>` to override default scrolling behavior and generates a `.modal-backdrop` to provide a click area for dismissing shown modals when clicking outside the modal. +The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also overrides default scrolling behavior and generates a `.modal-backdrop` to provide a click area for dismissing shown modals when clicking outside the modal. ### Via data attributes -Activate a modal without writing JavaScript. Set `data-toggle="modal"` on a controller element, like a button, along with a `data-target="#foo"` or `href="#foo"` to target a specific modal to toggle. +Activate a modal without writing JavaScript. Set `data-bs-toggle="modal"` on a controller element, like a button, along with a `data-bs-target="#foo"` or `href="#foo"` to target a specific modal to toggle. ```html -<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button> +<button type="button" data-bs-toggle="modal" data-bs-target="#myModal">Launch modal</button> ``` ### Via JavaScript -Call a modal with id `myModal` with a single line of JavaScript: +Create a modal with a single line of JavaScript: ```js -$('#myModal').modal(options) +var myModal = new bootstrap.Modal(document.getElementById('myModal'), options) ``` ### Options -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-backdrop=""`. +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-backdrop=""`. -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> <th style="width: 100px;">Name</th> @@ -684,29 +860,23 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap </thead> <tbody> <tr> - <td>backdrop</td> + <td><code>backdrop</code></td> <td>boolean or the string <code>'static'</code></td> - <td>true</td> + <td><code>true</code></td> <td>Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click.</td> </tr> <tr> - <td>keyboard</td> + <td><code>keyboard</code></td> <td>boolean</td> - <td>true</td> + <td><code>true</code></td> <td>Closes the modal when escape key is pressed</td> </tr> <tr> - <td>focus</td> + <td><code>focus</code></td> <td>boolean</td> - <td>true</td> + <td><code>true</code></td> <td>Puts the focus on the modal when initialized.</td> </tr> - <tr> - <td>show</td> - <td>boolean</td> - <td>true</td> - <td>Shows the modal when initialized.</td> - </tr> </tbody> </table> @@ -716,89 +886,119 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap {{< partial "callout-danger-async-methods.md" >}} {{< /callout >}} -#### `.modal(options)` +#### Passing options Activates your content as a modal. Accepts an optional options `object`. ```js -$('#myModal').modal({ +var myModal = new bootstrap.Modal(document.getElementById('myModal'), { keyboard: false }) ``` -#### `.modal('toggle')` +#### 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). ```js -$('#myModal').modal('toggle') +myModal.toggle() ``` -#### `.modal('show')` +#### 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). ```js -$('#myModal').modal('show') +myModal.show() +``` + +Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). + +```js +var modalToggle = document.getElementById('toggleMyModal') // relatedTarget +myModal.show(modalToggle) ``` -#### `.modal('hide')` +#### 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). ```js -$('#myModal').modal('hide') +myModal.hide() ``` -#### `.modal('handleUpdate')` +#### handleUpdate Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears). ```js -$('#myModal').modal('handleUpdate') +myModal.handleUpdate() ``` -#### `.modal('dispose')` +#### dispose + +Destroys an element's modal. (Removes stored data on the DOM element) + +```js +myModal.dispose() +``` -Destroys an element's modal. +#### getInstance + +*Static* method which allows you to get the modal instance associated with a DOM element + +```js +var myModalEl = document.getElementById('myModal') +var modal = bootstrap.Modal.getInstance(myModalEl) // Returns a Bootstrap modal instance +``` + +#### 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 initialised + +```js +var myModalEl = document.querySelector('#myModal') +var modal = bootstrap.Modal.getOrCreateInstance(myModalEl) // Returns a Bootstrap modal instance +``` ### Events Bootstrap's modal class exposes a few events for hooking into modal functionality. All modal events are fired at the modal itself (i.e. at the `<div class="modal">`). -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> - <th style="width: 150px;">Event Type</th> + <th style="width: 150px;">Event type</th> <th>Description</th> </tr> </thead> <tbody> <tr> - <td>show.bs.modal</td> + <td><code>show.bs.modal</code></td> <td>This event fires immediately when the <code>show</code> instance method is called. If caused by a click, the clicked element is available as the <code>relatedTarget</code> property of the event.</td> </tr> <tr> - <td>shown.bs.modal</td> + <td><code>shown.bs.modal</code></td> <td>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 <code>relatedTarget</code> property of the event.</td> </tr> <tr> - <td>hide.bs.modal</td> + <td><code>hide.bs.modal</code></td> <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td> </tr> <tr> - <td>hidden.bs.modal</td> + <td><code>hidden.bs.modal</code></td> <td>This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).</td> </tr> <tr> - <td>hidePrevented.bs.modal</td> - <td>This event is fired when the modal is shown, its backdrop is <code>static</code> and a click outside the modal or an escape key press is performed with the keyboard option or <code>data-keyboard</code> set to <code>false</code>.</td> + <td><code>hidePrevented.bs.modal</code></td> + <td>This event is fired when the modal is shown, its backdrop is <code>static</code> and a click outside the modal or an escape key press is performed with the keyboard option or <code>data-bs-keyboard</code> set to <code>false</code>.</td> </tr> </tbody> </table> ```js -$('#myModal').on('hidden.bs.modal', function (event) { +var myModalEl = document.getElementById('myModal') +myModalEl.addEventListener('hidden.bs.modal', function (event) { // do something... }) ``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/navbar.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/navbar.md new file mode 100644 index 000000000..7b57fd5c6 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/navbar.md @@ -0,0 +1,670 @@ +--- +layout: docs +title: Navbar +description: Documentation and examples for Bootstrap's powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, including support for our collapse plugin. +group: components +toc: true +--- + +## How it works + +Here's what you need to know before getting started with the navbar: + +- Navbars require a wrapping `.navbar` with `.navbar-expand{-sm|-md|-lg|-xl|-xxl}` for responsive collapsing and [color scheme](#color-schemes) classes. +- Navbars and their contents are fluid by default. Change the [container](#containers) to limit their horizontal width in different ways. +- Use our [spacing]({{< docsref "/utilities/spacing" >}}) and [flex]({{< docsref "/utilities/flex" >}}) utility classes for controlling spacing and alignment within navbars. +- Navbars are responsive by default, but you can easily modify them to change that. Responsive behavior depends on our Collapse JavaScript plugin. +- Ensure accessibility by using a `<nav>` element or, if using a more generic element such as a `<div>`, add a `role="navigation"` to every navbar to explicitly identify it as a landmark region for users of assistive technologies. +- Indicate the current item by using `aria-current="page"` for the current page or `aria-current="true"` for the current item in a set. + +{{< callout info >}} +{{< partial "callout-info-prefersreducedmotion.md" >}} +{{< /callout >}} + +## Supported content + +Navbars come with built-in support for a handful of sub-components. Choose from the following as needed: + +- `.navbar-brand` for your company, product, or project name. +- `.navbar-nav` for a full-height and lightweight navigation (including support for dropdowns). +- `.navbar-toggler` for use with our collapse plugin and other [navigation toggling](#responsive-behaviors) behaviors. +- Flex and spacing utilities for any form controls and actions. +- `.navbar-text` for adding vertically centered strings of text. +- `.collapse.navbar-collapse` for grouping and hiding navbar contents by a parent breakpoint. +- Add an optional `.navbar-scroll` to set a `max-height` and [scroll expanded navbar content](#scrolling). + +Here's an example of all the sub-components included in a responsive light-themed navbar that automatically collapses at the `lg` (large) breakpoint. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </a> + <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> +{{< /example >}} + +This example uses [background]({{< docsref "/utilities/background" >}}) (`bg-light`) and [spacing]({{< docsref "/utilities/spacing" >}}) (`my-2`, `my-lg-0`, `me-sm-0`, `my-sm-0`) utility classes. + +### Brand + +The `.navbar-brand` can be applied to most elements, but an anchor works best, as some elements might require utility classes or custom styles. + +#### Text + +Add your text within an element with the `.navbar-brand` class. + +{{< example >}} +<!-- As a link --> +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + </div> +</nav> + +<!-- As a heading --> +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <span class="navbar-brand mb-0 h1">Navbar</span> + </div> +</nav> +{{< /example >}} + +#### Image + +You can replace the text within the `.navbar-brand` with an `<img>`. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <div class="container"> + <a class="navbar-brand" href="#"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="30" height="24"> + </a> + </div> +</nav> +{{< /example >}} + +#### Image and text + +You can also make use of some additional utilities to add an image and text at the same time. Note the addition of `.d-inline-block` and `.align-text-top` on the `<img>`. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="30" height="24" class="d-inline-block align-text-top"> + Bootstrap + </a> + </div> +</nav> +{{< /example >}} + +### Nav + +Navbar navigation links build on our `.nav` options with their own modifier class and require the use of [toggler classes](#toggler) for proper responsive styling. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned. + +Add the `.active` class on `.nav-link` to indicate the current page. + +Please note that you should also add the `aria-current` attribute on the active `.nav-link`. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarNav"> + <ul class="navbar-nav"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Features</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Pricing</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + </div> + </div> +</nav> +{{< /example >}} + +And because we use classes for our navs, you can avoid the list-based approach entirely if you like. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarNavAltMarkup"> + <div class="navbar-nav"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + <a class="nav-link" href="#">Features</a> + <a class="nav-link" href="#">Pricing</a> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </div> + </div> + </div> +</nav> +{{< /example >}} + +You can also use dropdowns in your navbar. Dropdown menus require a wrapping element for positioning, so be sure to use separate and nested elements for `.nav-item` and `.nav-link` as shown below. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarNavDropdown"> + <ul class="navbar-nav"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Features</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Pricing</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown link + </a> + <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + </div> + </div> +</nav> +{{< /example >}} + +### Forms + +Place various form controls and components within a navbar: + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> +</nav> +{{< /example >}} + +Immediate child elements of `.navbar` use flex layout and will default to `justify-content: space-between`. Use additional [flex utilities]({{< docsref "/utilities/flex" >}}) as needed to adjust this behavior. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand">Navbar</a> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> +</nav> +{{< /example >}} + +Input groups work, too. If your navbar is an entire form, or mostly a form, you can use the `<form>` element as the container and save some HTML. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <form class="container-fluid"> + <div class="input-group"> + <span class="input-group-text" id="basic-addon1">@</span> + <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1"> + </div> + </form> +</nav> +{{< /example >}} + +Various buttons are supported as part of these navbar forms, too. This is also a great reminder that vertical alignment utilities can be used to align different sized elements. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <form class="container-fluid justify-content-start"> + <button class="btn btn-outline-success me-2" type="button">Main button</button> + <button class="btn btn-sm btn-outline-secondary" type="button">Smaller button</button> + </form> +</nav> +{{< /example >}} + +### Text + +Navbars may contain bits of text with the help of `.navbar-text`. This class adjusts vertical alignment and horizontal spacing for strings of text. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <span class="navbar-text"> + Navbar text with an inline element + </span> + </div> +</nav> +{{< /example >}} + +Mix and match with other components and utilities as needed. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar w/ text</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarText"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Features</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Pricing</a> + </li> + </ul> + <span class="navbar-text"> + Navbar text with an inline element + </span> + </div> + </div> +</nav> +{{< /example >}} + +## Color schemes + +Theming the navbar has never been easier thanks to the combination of theming classes and `background-color` utilities. Choose from `.navbar-light` for use with light background colors, or `.navbar-dark` for dark background colors. Then, customize with `.bg-*` utilities. + +<div class="bd-example"> + <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarColor01"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Features</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Pricing</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">About</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-light" type="submit">Search</button> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarColor02"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Features</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Pricing</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">About</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-light" type="submit">Search</button> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor03" aria-controls="navbarColor03" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarColor03"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Features</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Pricing</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">About</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-primary" type="submit">Search</button> + </form> + </div> + </div> + </nav> +</div> + +```html +<nav class="navbar navbar-dark bg-dark"> + <!-- Navbar content --> +</nav> + +<nav class="navbar navbar-dark bg-primary"> + <!-- Navbar content --> +</nav> + +<nav class="navbar navbar-light" style="background-color: #e3f2fd;"> + <!-- Navbar content --> +</nav> +``` + +## Containers + +Although it's not required, you can wrap a navbar in a `.container` to center it on a page–though note that an inner container is still required. Or you can add a container inside the `.navbar` to only center the contents of a [fixed or static top navbar](#placement). + +{{< example >}} +<div class="container"> + <nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + </div> + </nav> +</div> +{{< /example >}} + +Use any of the responsive containers to change how wide the content in your navbar is presented. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-md"> + <a class="navbar-brand" href="#">Navbar</a> + </div> +</nav> +{{< /example >}} + +## Placement + +Use our [position utilities]({{< docsref "/utilities/position" >}}) to place navbars in non-static positions. Choose from fixed to the top, fixed to the bottom, or stickied to the top (scrolls with the page until it reaches the top, then stays there). Fixed navbars use `position: fixed`, meaning they're pulled from the normal flow of the DOM and may require custom CSS (e.g., `padding-top` on the `<body>`) to prevent overlap with other elements. + +Also note that **`.sticky-top` uses `position: sticky`, which [isn't fully supported in every browser](https://caniuse.com/css-sticky)**. + +{{< example >}} +<nav class="navbar navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Default</a> + </div> +</nav> +{{< /example >}} + +{{< example >}} +<nav class="navbar fixed-top navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Fixed top</a> + </div> +</nav> +{{< /example >}} + +{{< example >}} +<nav class="navbar fixed-bottom navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Fixed bottom</a> + </div> +</nav> +{{< /example >}} + +{{< example >}} +<nav class="navbar sticky-top navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Sticky top</a> + </div> +</nav> +{{< /example >}} + +## Scrolling + +Add `.navbar-nav-scroll` to a `.navbar-nav` (or other navbar sub-component) to enable vertical scrolling within the toggleable contents of a collapsed navbar. By default, scrolling kicks in at `75vh` (or 75% of the viewport height), but you can override that with the local CSS custom property `--bs-navbar-height` or custom styles. At larger viewports when the navbar is expanded, content will appear as it does in a default navbar. + +Please note that this behavior comes with a potential drawback of `overflow`—when setting `overflow-y: auto` (required to scroll the content here), `overflow-x` is the equivalent of `auto`, which will crop some horizontal content. + +Here's an example navbar using `.navbar-nav-scroll` with `style="--bs-scroll-height: 100px;"`, with some extra margin utilities for optimum spacing. + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar scroll</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarScroll" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarScroll"> + <ul class="navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll" style="--bs-scroll-height: 100px;"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarScrollingDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + Link + </a> + <ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Link</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> +{{< /example >}} + +## Responsive behaviors + +Navbars can use `.navbar-toggler`, `.navbar-collapse`, and `.navbar-expand{-sm|-md|-lg|-xl|-xxl}` classes to determine when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements. + +For navbars that never collapse, add the `.navbar-expand` class on the navbar. For navbars that always collapse, don't add any `.navbar-expand` class. + +### Toggler + +Navbar togglers are left-aligned by default, but should they follow a sibling element like a `.navbar-brand`, they'll automatically be aligned to the far right. Reversing your markup will reverse the placement of the toggler. Below are examples of different toggle styles. + +With no `.navbar-brand` shown at the smallest breakpoint: + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarTogglerDemo01"> + <a class="navbar-brand" href="#">Hidden brand</a> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> +{{< /example >}} + +With a brand name shown on the left and toggler on the right: + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarTogglerDemo02"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> +{{< /example >}} + +With a toggler on the left and brand name on the right: + +{{< example >}} +<nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo03" aria-controls="navbarTogglerDemo03" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <a class="navbar-brand" href="#">Navbar</a> + <div class="collapse navbar-collapse" id="navbarTogglerDemo03"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> +{{< /example >}} + +### External content + +Sometimes you want to use the collapse plugin to trigger a container element for content that structurally sits outside of the `.navbar` . Because our plugin works on the `id` and `data-bs-target` matching, that's easily done! + +{{< example >}} +<div class="collapse" id="navbarToggleExternalContent"> + <div class="bg-dark p-4"> + <h5 class="text-white h4">Collapsed content</h5> + <span class="text-muted">Toggleable via the navbar brand.</span> + </div> +</div> +<nav class="navbar navbar-dark bg-dark"> + <div class="container-fluid"> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + </div> +</nav> +{{< /example >}} + +When you do this, we recommend including additional JavaScript to move the focus programmatically to the container when it is opened. Otherwise, keyboard users and users of assistive technologies will likely have a hard time finding the newly revealed content - particularly if the container that was opened comes *before* the toggler in the document's structure. We also recommend making sure that the toggler has the `aria-controls` attribute, pointing to the `id` of the content container. In theory, this allows assistive technology users to jump directly from the toggler to the container it controls–but support for this is currently quite patchy. + +## Sass + +### Variables + +{{< scss-docs name="navbar-variables" file="scss/_variables.scss" >}} + +{{< scss-docs name="navbar-theme-variables" file="scss/_variables.scss" >}} + +### Loop + +[Responsive navbar expand/collapse classes](#responsive-behaviors) (e.g., `.navbar-expand-lg`) are combined with the `$breakpoints` map and generated through a loop in `scss/_navbar.scss`. + +{{< scss-docs name="navbar-expand-loop" file="scss/_navbar.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/navs.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/navs-tabs.md index 5a1cdcc81..b839f9754 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/navs.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/navs-tabs.md @@ -1,8 +1,9 @@ --- layout: docs -title: Navs +title: Navs and tabs description: Documentation and examples for how to use Bootstrap's included navigation components. group: components +aliases: "/docs/5.0/components/navs/" toc: true --- @@ -14,12 +15,14 @@ The base `.nav` component is built with flexbox and provide a strong foundation {{< callout info >}} The base `.nav` component does not include any `.active` state. The following examples include the class, mainly to demonstrate that this particular class does not trigger any special styling. + +To convey the active state to assistive technologies, use the `aria-current` attribute — using the `page` value for current page, or `true` for the current item in a set. {{< /callout >}} {{< example >}} <ul class="nav"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -37,7 +40,7 @@ Classes are used throughout, so your markup can be super flexible. Use `<ul>`s l {{< example >}} <nav class="nav"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> <a class="nav-link" href="#">Link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> @@ -57,7 +60,7 @@ Centered with `.justify-content-center`: {{< example >}} <ul class="nav justify-content-center"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -76,7 +79,7 @@ Right-aligned with `.justify-content-end`: {{< example >}} <ul class="nav justify-content-end"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -97,7 +100,7 @@ Stack your navigation by changing the flex item direction with the `.flex-column {{< example >}} <ul class="nav flex-column"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -115,7 +118,7 @@ As always, vertical navigation is possible without `<ul>`s, too. {{< example >}} <nav class="nav flex-column"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> <a class="nav-link" href="#">Link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> @@ -129,7 +132,7 @@ Takes the basic nav from above and adds the `.nav-tabs` class to generate a tabb {{< example >}} <ul class="nav nav-tabs"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -150,7 +153,7 @@ Take that same HTML, but use `.nav-pills` instead: {{< example >}} <ul class="nav nav-pills"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -171,7 +174,7 @@ Force your `.nav`'s contents to extend the full available width one of two modif {{< example >}} <ul class="nav nav-pills nav-fill"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Much longer nav link</a> @@ -189,7 +192,7 @@ When using a `<nav>`-based navigation, you can safely omit `.nav-item` as only ` {{< example >}} <nav class="nav nav-pills nav-fill"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> <a class="nav-link" href="#">Much longer nav link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> @@ -201,7 +204,7 @@ For equal-width elements, use `.nav-justified`. All horizontal space will be occ {{< example >}} <ul class="nav nav-pills nav-justified"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Much longer nav link</a> @@ -219,7 +222,7 @@ Similar to the `.nav-fill` example using a `<nav>`-based navigation. {{< example >}} <nav class="nav nav-pills nav-justified"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> <a class="nav-link" href="#">Much longer nav link</a> <a class="nav-link" href="#">Link</a> <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> @@ -232,7 +235,7 @@ If you need responsive nav variations, consider using a series of [flexbox utili {{< example >}} <nav class="nav nav-pills flex-column flex-sm-row"> - <a class="flex-sm-fill text-sm-center nav-link active" href="#">Active</a> + <a class="flex-sm-fill text-sm-center nav-link active" aria-current="page" href="#">Active</a> <a class="flex-sm-fill text-sm-center nav-link" href="#">Longer nav link</a> <a class="flex-sm-fill text-sm-center nav-link" href="#">Link</a> <a class="flex-sm-fill text-sm-center nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> @@ -243,7 +246,7 @@ If you need responsive nav variations, consider using a series of [flexbox utili If you're using navs to provide a navigation bar, be sure to add a `role="navigation"` to the most logical parent container of the `<ul>`, or wrap a `<nav>` element around the whole navigation. Do not add the role to the `<ul>` itself, as this would prevent it from being announced as an actual list by assistive technologies. -Note that navigation bars, even if visually styled as tabs with the `.nav-tabs` class, should **not** be given `role="tablist"`, `role="tab"` or `role="tabpanel"` attributes. These are only appropriate for dynamic tabbed interfaces, as described in the [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr> Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel). See [JavaScript behavior](#javascript-behavior) for dynamic tabbed interfaces in this section for an example. +Note that navigation bars, even if visually styled as tabs with the `.nav-tabs` class, should **not** be given `role="tablist"`, `role="tab"` or `role="tabpanel"` attributes. These are only appropriate for dynamic tabbed interfaces, as described in the [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr> Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel). See [JavaScript behavior](#javascript-behavior) for dynamic tabbed interfaces in this section for an example. The `aria-current` attribute is not necessary on dynamic tabbed interfaces since our JavaScript handles the selected state by adding `aria-selected="true"` on the active tab. ## Using dropdowns @@ -254,17 +257,17 @@ Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin {{< example >}} <ul class="nav nav-tabs"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> + <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -280,17 +283,17 @@ Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin {{< example >}} <ul class="nav nav-pills"> <li class="nav-item"> - <a class="nav-link active" href="#">Active</a> + <a class="nav-link active" aria-current="page" href="#">Active</a> </li> <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#">Separated link</a> - </div> + <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> </li> <li class="nav-item"> <a class="nav-link" href="#">Link</a> @@ -301,37 +304,41 @@ Add dropdown menus with a little extra HTML and the [dropdowns JavaScript plugin </ul> {{< /example >}} +## Sass + +### Variables + +{{< scss-docs name="nav-variables" file="scss/_variables.scss" >}} + ## JavaScript behavior Use the tab JavaScript plugin—include it individually or through the compiled `bootstrap.js` file—to extend our navigational tabs and pills to create tabbable panes of local content. -If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). - -Dynamic tabbed interfaces, as described in the [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr> Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel), require `role="tablist"`, `role="tab"`, `role="tabpanel"`, and additional `aria-` attributes in order to convey their structure, functionality and current state to users of assistive technologies (such as screen readers). +Dynamic tabbed interfaces, as described in the [<abbr title="Web Accessibility Initiative">WAI</abbr> <abbr title="Accessible Rich Internet Applications">ARIA</abbr> Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel), require `role="tablist"`, `role="tab"`, `role="tabpanel"`, and additional `aria-` attributes in order to convey their structure, functionality and current state to users of assistive technologies (such as screen readers). As a best practice, we recommend using `<button>` elements for the tabs, as these are controls that trigger a dynamic change, rather than links that navigate to a new page or location. Note that dynamic tabbed interfaces should <em>not</em> contain dropdown menus, as this causes both usability and accessibility issues. From a usability perspective, the fact that the currently displayed tab's trigger element is not immediately visible (as it's inside the closed dropdown menu) can cause confusion. From an accessibility point of view, there is currently no sensible way to map this sort of construct to a standard WAI ARIA pattern, meaning that it cannot be easily made understandable to users of assistive technologies. -<div class="bd-example bd-example-tabs"> - <ul class="nav nav-tabs" id="myTab" role="tablist"> +<div class="bd-example"> + <ul class="nav nav-tabs mb-3" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> - <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a> + <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a> + <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a> + <button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button" role="tab" aria-controls="contact" aria-selected="false">Contact</button> </li> </ul> <div class="tab-content" id="myTabContent"> <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab"> - <p>Placeholder content for the tab panel. This one relates to the home tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.</p> + <p><strong>This is some placeholder content the Home tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> <div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab"> - <p>Placeholder content for the tab panel. This one relates to the profile tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.</p> + <p><strong>This is some placeholder content the Profile tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> <div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab"> - <p>Placeholder content for the tab panel. This one relates to the contact tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.</p> + <p><strong>This is some placeholder content the Contact tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> </div> </div> @@ -339,13 +346,13 @@ Note that dynamic tabbed interfaces should <em>not</em> contain dropdown menus, ```html <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> - <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a> + <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a> + <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a> + <button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button" role="tab" aria-controls="contact" aria-selected="false">Contact</button> </li> </ul> <div class="tab-content" id="myTabContent"> @@ -357,23 +364,23 @@ Note that dynamic tabbed interfaces should <em>not</em> contain dropdown menus, To help fit your needs, this works with `<ul>`-based markup, as shown above, or with any arbitrary "roll your own" markup. Note that if you're using `<nav>`, you shouldn't add `role="tablist"` directly to it, as this would override the element's native role as a navigation landmark. Instead, switch to an alternative element (in the example below, a simple `<div>`) and wrap the `<nav>` around it. -<div class="bd-example bd-example-tabs"> +<div class="bd-example"> <nav> - <div class="nav nav-tabs" id="nav-tab" role="tablist"> - <a class="nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a> - <a class="nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</a> - <a class="nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</a> + <div class="nav nav-tabs mb-3" id="nav-tab" role="tablist"> + <button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">Home</button> + <button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</button> + <button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</button> </div> </nav> <div class="tab-content" id="nav-tabContent"> <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab"> - <p>Placeholder content for the tab panel. This one relates to the home tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.</p> + <p><strong>This is some placeholder content the Home tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab"> - <p>Placeholder content for the tab panel. This one relates to the profile tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.</p> + <p><strong>This is some placeholder content the Profile tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> <div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab"> - <p>Placeholder content for the tab panel. This one relates to the contact tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.</p> + <p><strong>This is some placeholder content the Contact tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> </div> </div> @@ -381,9 +388,9 @@ To help fit your needs, this works with `<ul>`-based markup, as shown above, or ```html <nav> <div class="nav nav-tabs" id="nav-tab" role="tablist"> - <a class="nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a> - <a class="nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</a> - <a class="nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</a> + <button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">Home</button> + <button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</button> + <button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</button> </div> </nav> <div class="tab-content" id="nav-tabContent"> @@ -395,27 +402,27 @@ To help fit your needs, this works with `<ul>`-based markup, as shown above, or The tabs plugin also works with pills. -<div class="bd-example bd-example-tabs"> +<div class="bd-example"> <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist"> <li class="nav-item" role="presentation"> - <a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">Home</a> + <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Home</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab" aria-controls="pills-profile" aria-selected="false">Profile</a> + <button class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" data-bs-target="#pills-profile" type="button" role="tab" aria-controls="pills-profile" aria-selected="false">Profile</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</a> + <button class="nav-link" id="pills-contact-tab" data-bs-toggle="pill" data-bs-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</button> </li> </ul> <div class="tab-content" id="pills-tabContent"> <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab"> - <p>Placeholder content for the tab panel. This one relates to the home tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.</p> + <p><strong>This is some placeholder content the Home tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab"> - <p>Placeholder content for the tab panel. This one relates to the profile tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.</p> + <p><strong>This is some placeholder content the Profile tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab"> - <p>Placeholder content for the tab panel. This one relates to the contact tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.</p> + <p><strong>This is some placeholder content the Contact tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> </div> </div> @@ -423,13 +430,13 @@ The tabs plugin also works with pills. ```html <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist"> <li class="nav-item" role="presentation"> - <a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">Home</a> + <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Home</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab" aria-controls="pills-profile" aria-selected="false">Profile</a> + <button class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" data-bs-target="#pills-profile" type="button" role="tab" aria-controls="pills-profile" aria-selected="false">Profile</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</a> + <button class="nav-link" id="pills-contact-tab" data-bs-toggle="pill" data-bs-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</button> </li> </ul> <div class="tab-content" id="pills-tabContent"> @@ -441,74 +448,66 @@ The tabs plugin also works with pills. And with vertical pills. -<div class="bd-example bd-example-tabs"> - <div class="row"> - <div class="col-3"> - <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical"> - <a class="nav-link active" id="v-pills-home-tab" data-toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-selected="true">Home</a> - <a class="nav-link" id="v-pills-profile-tab" data-toggle="pill" href="#v-pills-profile" role="tab" aria-controls="v-pills-profile" aria-selected="false">Profile</a> - <a class="nav-link" id="v-pills-messages-tab" data-toggle="pill" href="#v-pills-messages" role="tab" aria-controls="v-pills-messages" aria-selected="false">Messages</a> - <a class="nav-link" id="v-pills-settings-tab" data-toggle="pill" href="#v-pills-settings" role="tab" aria-controls="v-pills-settings" aria-selected="false">Settings</a> - </div> +<div class="bd-example"> + <div class="d-flex align-items-start"> + <div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical"> + <button class="nav-link active" id="v-pills-home-tab" data-bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" aria-selected="true">Home</button> + <button class="nav-link" id="v-pills-profile-tab" data-bs-toggle="pill" data-bs-target="#v-pills-profile" type="button" role="tab" aria-controls="v-pills-profile" aria-selected="false">Profile</button> + <button class="nav-link" id="v-pills-messages-tab" data-bs-toggle="pill" data-bs-target="#v-pills-messages" type="button" role="tab" aria-controls="v-pills-messages" aria-selected="false">Messages</button> + <button class="nav-link" id="v-pills-settings-tab" data-bs-toggle="pill" data-bs-target="#v-pills-settings" type="button" role="tab" aria-controls="v-pills-settings" aria-selected="false">Settings</button> </div> - <div class="col-9"> - <div class="tab-content" id="v-pills-tabContent"> - <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab"> - <p>Placeholder content for the tab panel. This one relates to the home tab. Saw you downtown singing the Blues. Watch you circle the drain. Why don't you let me stop by? Heavy is the head that wears the crown. Yes, we make angels cry, raining down on earth from up above. Wanna see the show in 3D, a movie. Do you ever feel, feel so paper thin. It’s a yes or no, no maybe.</p> - </div> - <div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab"> - <p>Placeholder content for the tab panel. This one relates to the profile tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.</p> - </div> - <div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab"> - <p>Placeholder content for the tab panel. This one relates to the messages tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.</p> - </div> - <div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab"> - <p>Placeholder content for the tab panel. This one relates to the settings tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.</p> - </div> + <div class="tab-content" id="v-pills-tabContent"> + <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab"> + <p><strong>This is some placeholder content the Home tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> + </div> + <div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab"> + <p><strong>This is some placeholder content the Profile tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> + </div> + <div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab"> + <p><strong>This is some placeholder content the Messages tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> + </div> + <div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab"> + <p><strong>This is some placeholder content the Settings tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> </div> </div> </div> </div> ```html -<div class="row"> - <div class="col-3"> - <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical"> - <a class="nav-link active" id="v-pills-home-tab" data-toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-selected="true">Home</a> - <a class="nav-link" id="v-pills-profile-tab" data-toggle="pill" href="#v-pills-profile" role="tab" aria-controls="v-pills-profile" aria-selected="false">Profile</a> - <a class="nav-link" id="v-pills-messages-tab" data-toggle="pill" href="#v-pills-messages" role="tab" aria-controls="v-pills-messages" aria-selected="false">Messages</a> - <a class="nav-link" id="v-pills-settings-tab" data-toggle="pill" href="#v-pills-settings" role="tab" aria-controls="v-pills-settings" aria-selected="false">Settings</a> - </div> +<div class="d-flex align-items-start"> + <div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical"> + <button class="nav-link active" id="v-pills-home-tab" data-bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" aria-selected="true">Home</button> + <button class="nav-link" id="v-pills-profile-tab" data-bs-toggle="pill" data-bs-target="#v-pills-profile" type="button" role="tab" aria-controls="v-pills-profile" aria-selected="false">Profile</button> + <button class="nav-link" id="v-pills-messages-tab" data-bs-toggle="pill" data-bs-target="#v-pills-messages" type="button" role="tab" aria-controls="v-pills-messages" aria-selected="false">Messages</button> + <button class="nav-link" id="v-pills-settings-tab" data-bs-toggle="pill" data-bs-target="#v-pills-settings" type="button" role="tab" aria-controls="v-pills-settings" aria-selected="false">Settings</button> </div> - <div class="col-9"> - <div class="tab-content" id="v-pills-tabContent"> - <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">...</div> - <div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab">...</div> - <div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab">...</div> - <div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab">...</div> - </div> + <div class="tab-content" id="v-pills-tabContent"> + <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">...</div> + <div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab">...</div> + <div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab">...</div> + <div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab">...</div> </div> </div> ``` ### Using data attributes -You can activate a tab or pill navigation without writing any JavaScript by simply specifying `data-toggle="tab"` or `data-toggle="pill"` on an element. Use these data attributes on `.nav-tabs` or `.nav-pills`. +You can activate a tab or pill navigation without writing any JavaScript by simply specifying `data-bs-toggle="tab"` or `data-bs-toggle="pill"` on an element. Use these data attributes on `.nav-tabs` or `.nav-pills`. ```html <!-- Nav tabs --> <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> - <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a> + <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a> + <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="messages-tab" data-toggle="tab" href="#messages" role="tab" aria-controls="messages" aria-selected="false">Messages</a> + <button class="nav-link" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="messages" aria-selected="false">Messages</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a> + <button class="nav-link" id="settings-tab" data-bs-toggle="tab" data-bs-target="#settings" type="button" role="tab" aria-controls="settings" aria-selected="false">Settings</button> </li> </ul> @@ -526,19 +525,25 @@ You can activate a tab or pill navigation without writing any JavaScript by simp Enable tabbable tabs via JavaScript (each tab needs to be activated individually): ```js -$('#myTab a').on('click', function (event) { - event.preventDefault() - $(this).tab('show') +var triggerTabList = [].slice.call(document.querySelectorAll('#myTab a')) +triggerTabList.forEach(function (triggerEl) { + var tabTrigger = new bootstrap.Tab(triggerEl) + + triggerEl.addEventListener('click', function (event) { + event.preventDefault() + tabTrigger.show() + }) }) ``` You can activate individual tabs in several ways: ```js -$('#myTab a[href="#profile"]').tab('show') // Select tab by name -$('#myTab li:first-child a').tab('show') // Select first tab -$('#myTab li:last-child a').tab('show') // Select last tab -$('#myTab li:nth-child(3) a').tab('show') // Select third tab +var triggerEl = document.querySelector('#myTab a[href="#profile"]') +bootstrap.Tab.getInstance(triggerEl).show() // Select tab by name + +var triggerFirstTabEl = document.querySelector('#myTab li:first-child a') +bootstrap.Tab.getInstance(triggerFirstTabEl).show() // Select first tab ``` ### Fade effect @@ -560,23 +565,23 @@ To make tabs fade in, add `.fade` to each `.tab-pane`. The first tab pane must a {{< partial "callout-danger-async-methods.md" >}} {{< /callout >}} -#### $().tab +#### constructor -Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the DOM. +Activates a tab element and content container. Tab should have either a `data-bs-target` or, if using a link, an `href` attribute, targeting a container node in the DOM. ```html <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> - <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a> + <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a> + <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="messages-tab" data-toggle="tab" href="#messages" role="tab" aria-controls="messages" aria-selected="false">Messages</a> + <button class="nav-link" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="messages" aria-selected="false">Messages</button> </li> <li class="nav-item" role="presentation"> - <a class="nav-link" id="settings-tab" data-toggle="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false">Settings</a> + <button class="nav-link" id="settings-tab" data-bs-toggle="tab" data-bs-target="#settings" type="button" role="tab" aria-controls="settings" aria-selected="false">Settings</button> </li> </ul> @@ -588,24 +593,46 @@ Activates a tab element and content container. Tab should have either a `data-ta </div> <script> - $(function () { - $('#myTab li:last-child a').tab('show') - }) + var firstTabEl = document.querySelector('#myTab li:last-child a') + var firstTab = new bootstrap.Tab(firstTabEl) + + firstTab.show() </script> ``` -#### .tab('show') +#### show Selects the given tab and shows its associated pane. Any other tab that was previously selected becomes unselected and its associated pane is hidden. **Returns to the caller before the tab pane has actually been shown** (i.e. before the `shown.bs.tab` event occurs). ```js -$('#someTab').tab('show') + var someTabTriggerEl = document.querySelector('#someTabTrigger') + var tab = new bootstrap.Tab(someTabTriggerEl) + + tab.show() ``` -#### .tab('dispose') +#### dispose Destroys an element's tab. +#### getInstance + +*Static* method which allows you to get the tab instance associated with a DOM element + +```js +var triggerEl = document.querySelector('#trigger') +var tab = bootstrap.Tab.getInstance(triggerEl) // Returns a Bootstrap 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 initialised + +```js +var triggerEl = document.querySelector('#trigger') +var tab = bootstrap.Tab.getOrCreateInstance(triggerEl) // Returns a Bootstrap tab instance +``` + ### Events When showing a new tab, the events fire in the following order: @@ -617,35 +644,36 @@ When showing a new tab, the events fire in the following order: If no tab was already active, then the `hide.bs.tab` and `hidden.bs.tab` events will not be fired. -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> - <th style="width: 150px;">Event Type</th> + <th style="width: 150px;">Event type</th> <th>Description</th> </tr> </thead> <tbody> <tr> - <td>show.bs.tab</td> + <td><code>show.bs.tab</code></td> <td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td> </tr> <tr> - <td>shown.bs.tab</td> + <td><code>shown.bs.tab</code></td> <td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td> </tr> <tr> - <td>hide.bs.tab</td> + <td><code>hide.bs.tab</code></td> <td>This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the current active tab and the new soon-to-be-active tab, respectively.</td> </tr> <tr> - <td>hidden.bs.tab</td> + <td><code>hidden.bs.tab</code></td> <td>This event fires after a new tab is shown (and thus the previous active tab is hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the previous active tab and the new active tab, respectively.</td> </tr> </tbody> </table> ```js -$('a[data-toggle="tab"]').on('shown.bs.tab', function (event) { +var tabEl = document.querySelector('button[data-bs-toggle="tab"]') +tabEl.addEventListener('shown.bs.tab', function (event) { event.target // newly activated tab event.relatedTarget // previous active tab }) diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/offcanvas.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/offcanvas.md new file mode 100644 index 000000000..d0c60db2b --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/offcanvas.md @@ -0,0 +1,265 @@ +--- +layout: docs +title: Offcanvas +description: Build hidden sidebars into your project for navigation, shopping carts, and more with a few classes and our JavaScript plugin. +group: components +toc: true +--- + +## How it works + +Offcanvas is a sidebar component that can be toggled via JavaScript to appear from the left, right, or bottom edge of the viewport. Buttons or anchors are used as triggers that are attached to specific elements you toggle, and `data` attributes are used to invoke our JavaScript. + +- Offcanvas shares some of the same JavaScript code as modals. Conceptually, they are quite similar, but they are separate plugins. +- Similarly, some [source Sass](#sass) variables for offcanvas's styles and dimensions are inherited from the modal's variables. +- When shown, offcanvas includes a default backdrop that can be clicked to hide the offcanvas. +- Similar to modals, only one offcanvas can be shown at a time. + +**Heads up!** Given how CSS handles animations, you cannot use `margin` or `translate` on an `.offcanvas` element. Instead, use the class as an independent wrapping element. + +{{< callout info >}} +{{< partial "callout-info-prefersreducedmotion.md" >}} +{{< /callout >}} + +## Examples + +### Offcanvas components + +Below is an offcanvas example that is shown by default (via `.show` on `.offcanvas`). Offcanvas includes support for a header with a close button and an optional body class for some initial `padding`. We suggest that you include offcanvas headers with dismiss actions whenever possible, or provide an explicit dismiss action. + +{{< example class="bd-example-offcanvas p-0 bg-light overflow-hidden" >}} +<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvasLabel">Offcanvas</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + Content for the offcanvas goes here. You can place just about any Bootstrap component or custom elements here. + </div> +</div> +{{< /example >}} + +### Live demo + +Use the buttons below to show and hide an offcanvas element via JavaScript that toggles the `.show` class on an element with the `.offcanvas` class. + +- `.offcanvas` hides content (default) +- `.offcanvas.show` shows content + +You can use a link with the `href` attribute, or a button with the `data-bs-target` attribute. In both cases, the `data-bs-toggle="offcanvas"` is required. + +{{< example >}} +<a class="btn btn-primary" data-bs-toggle="offcanvas" href="#offcanvasExample" role="button" aria-controls="offcanvasExample"> + Link with href +</a> +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample"> + Button with data-bs-target +</button> + +<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + <div class=""> + Some text as placeholder. In real life you can have the elements you have chosen. Like, text, images, lists, etc. + </div> + <div class="dropdown mt-3"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown"> + Dropdown button + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div> + </div> +</div> +{{< /example >}} + +## Placement + +There's no default placement for offcanvas components, so you must add one of the modifier classes below; + +- `.offcanvas-start` places offcanvas on the left of the viewport (shown above) +- `.offcanvas-end` places offcanvas on the right of the viewport +- `.offcanvas-top` places offcanvas on the top of the viewport +- `.offcanvas-bottom` places offcanvas on the bottom of the viewport + +Try the top, right, and bottom examples out below. + +{{< example >}} +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasTop" aria-controls="offcanvasTop">Toggle top offcanvas</button> + +<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel"> + <div class="offcanvas-header"> + <h5 id="offcanvasTopLabel">Offcanvas top</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + ... + </div> +</div> +{{< /example >}} + +{{< example >}} +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight">Toggle right offcanvas</button> + +<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel"> + <div class="offcanvas-header"> + <h5 id="offcanvasRightLabel">Offcanvas right</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + ... + </div> +</div> +{{< /example >}} + +{{< example >}} +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom" aria-controls="offcanvasBottom">Toggle bottom offcanvas</button> + +<div class="offcanvas offcanvas-bottom" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvasBottomLabel">Offcanvas bottom</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body small"> + ... + </div> +</div> +{{< /example >}} + +## Backdrop + +Scrolling the `<body>` element is disabled when an offcanvas and its backdrop are visible. Use the `data-bs-scroll` attribute to toggle `<body>` scrolling and `data-bs-backdrop` to toggle the backdrop. + +{{< example >}} +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling" aria-controls="offcanvasScrolling">Enable body scrolling</button> +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasWithBackdrop" aria-controls="offcanvasWithBackdrop">Enable backdrop (default)</button> +<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasWithBothOptions" aria-controls="offcanvasWithBothOptions">Enable both scrolling & backdrop</button> + +<div class="offcanvas offcanvas-start" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvasScrollingLabel">Colored with scrolling</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + <p>Try scrolling the rest of the page to see this option in action.</p> + </div> +</div> +<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasWithBackdrop" aria-labelledby="offcanvasWithBackdropLabel"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvasWithBackdropLabel">Offcanvas with backdrop</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + <p>.....</p> + </div> +</div> +<div class="offcanvas offcanvas-start" data-bs-scroll="true" tabindex="-1" id="offcanvasWithBothOptions" aria-labelledby="offcanvasWithBothOptionsLabel"> + <div class="offcanvas-header"> + <h5 class="offcanvas-title" id="offcanvasWithBothOptionsLabel">Backdroped with scrolling</h5> + <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> + </div> + <div class="offcanvas-body"> + <p>Try scrolling the rest of the page to see this option in action.</p> + </div> +</div> +{{< /example >}} + +## Accessibility + +Since the offcanvas panel is conceptually a modal dialog, be sure to add `aria-labelledby="..."`—referencing the offcanvas title—to `.offcanvas`. Note that you don’t need to add `role="dialog"` since we already add it via JavaScript. + +## Sass + +### Variables + +{{< scss-docs name="offcanvas-variables" file="scss/_variables.scss" >}} + +## Usage + +The offcanvas plugin utilizes a few classes and attributes to handle the heavy lifting: + +- `.offcanvas` hides the content +- `.offcanvas.show` shows the content +- `.offcanvas-start` hides the offcanvas on the left +- `.offcanvas-end` hides the offcanvas on the right +- `.offcanvas-bottom` hides the offcanvas on the bottom + +Add a dismiss button with the `data-bs-dismiss="offcanvas"` attribute, which triggers the JavaScript functionality. Be sure to use the `<button>` element with it for proper behavior across all devices. + +### Via data attributes + +Add `data-bs-toggle="offcanvas"` and a `data-bs-target` or `href` to the element to automatically assign control of one offcanvas element. The `data-bs-target` attribute accepts a CSS selector to apply the offcanvas to. Be sure to add the class `offcanvas` to the offcanvas element. If you'd like it to default open, add the additional class `show`. + +### Via JavaScript + +Enable manually with: + +```js +var offcanvasElementList = [].slice.call(document.querySelectorAll('.offcanvas')) +var offcanvasList = offcanvasElementList.map(function (offcanvasEl) { + return new bootstrap.Offcanvas(offcanvasEl) +}) +``` + +### Options + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-backdrop=""`. + +{{< bs-table "table" >}} +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| `backdrop` | boolean | `true` | Apply a backdrop on body 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 + +{{< callout danger >}} +{{< partial "callout-danger-async-methods.md" >}} +{{< /callout >}} + +Activates your content as an offcanvas element. Accepts an optional options `object`. + +You can create an offcanvas instance with the constructor, for example: + +```js +var myOffcanvas = document.getElementById('myOffcanvas') +var bsOffcanvas = new bootstrap.Offcanvas(myOffcanvas) +``` + +{{< bs-table "table" >}} +| Method | Description | +| --- | --- | +| `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). | +| `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).| +| `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).| +| `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 initialised | +{{< /bs-table >}} + +### Events + +Bootstrap's offcanvas class exposes a few events for hooking into offcanvas functionality. + +{{< bs-table "table" >}} +| Event type | Description | +| --- | --- | +| `show.bs.offcanvas` | This event fires immediately when the `show` instance method is called. | +| `shown.bs.offcanvas` | This event is fired when an offcanvas element has been made visible to the user (will wait for CSS transitions to complete). | +| `hide.bs.offcanvas` | This event is fired immediately when the `hide` method has been called. | +| `hidden.bs.offcanvas` | This event is fired when an offcanvas element has been hidden from the user (will wait for CSS transitions to complete). | +{{< /bs-table >}} + +```js +var myOffcanvas = document.getElementById('myOffcanvas') +myOffcanvas.addEventListener('hidden.bs.offcanvas', function () { + // do something... +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/pagination.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/pagination.md index 23b474589..6b7c7a3da 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/pagination.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/pagination.md @@ -155,3 +155,13 @@ Change the alignment of pagination components with [flexbox utilities]({{< docsr </ul> </nav> {{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="pagination-variables" file="scss/_variables.scss" >}} + +### Mixins + +{{< scss-docs name="pagination-mixin" file="scss/mixins/_pagination.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/popovers.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/popovers.md index 872c35498..06aa656d9 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/popovers.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/popovers.md @@ -12,7 +12,6 @@ Things to know when using the popover plugin: - Popovers rely on the 3rd party library [Popper](https://popper.js.org/) for positioning. You must include [popper.min.js]({{< param "cdn.popper" >}}) before bootstrap.js or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper in order for popovers to work! - Popovers require the [tooltip plugin]({{< docsref "/components/tooltips" >}}) as a dependency. -- If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). - Popovers are opt-in for performance reasons, so **you must initialize them yourself**. - Zero-length `title` and `content` values will never show a popover. - Specify `container: 'body'` to avoid rendering problems in more complex components (like our input groups, button groups, etc). @@ -23,6 +22,10 @@ Things to know when using the popover plugin: - Popovers can be triggered thanks to an element inside a shadow DOM. {{< callout info >}} +{{< partial "callout-info-sanitizer.md" >}} +{{< /callout >}} + +{{< callout info >}} {{< partial "callout-info-prefersreducedmotion.md" >}} {{< /callout >}} @@ -30,11 +33,12 @@ Keep reading to see how popovers work with some examples. ## Example: Enable popovers everywhere -One way to initialize all popovers on a page would be to select them by their `data-toggle` attribute: +One way to initialize all popovers on a page would be to select them by their `data-bs-toggle` attribute: ```js -$(function () { - $('[data-toggle="popover"]').popover() +var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')) +var popoverList = popoverTriggerList.map(function (popoverTriggerEl) { + return new bootstrap.Popover(popoverTriggerEl) }) ``` @@ -43,34 +47,32 @@ $(function () { When you have some styles on a parent element that interfere with a popover, you'll want to specify a custom `container` so that the popover's HTML appears within that element instead. ```js -$(function () { - $('.example-popover').popover({ - container: 'body' - }) +var popover = new bootstrap.Popover(document.querySelector('.example-popover'), { + container: 'body' }) ``` ## Example {{< example >}} -<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button> +<button type="button" class="btn btn-lg btn-danger" data-bs-toggle="popover" title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button> {{< /example >}} ### Four directions -Four options are available: top, right, bottom, and left aligned. +Four options are available: top, right, bottom, and left aligned. Directions are mirrored when using Bootstrap in RTL. {{< example >}} -<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Top popover"> +<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="top" data-bs-content="Top popover"> Popover on top </button> -<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="right" data-content="Right popover"> +<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="right" data-bs-content="Right popover"> Popover on right </button> -<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Bottom popover"> +<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-content="Bottom popover"> Popover on bottom </button> -<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="left" data-content="Left popover"> +<button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="left" data-bs-content="Left popover"> Popover on left </button> {{< /example >}} @@ -86,46 +88,41 @@ For proper cross-browser and cross-platform behavior, you must use the `<a>` tag {{< /callout >}} {{< example >}} -<a tabindex="0" class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a> +<a tabindex="0" class="btn btn-lg btn-danger" role="button" data-bs-toggle="popover" data-bs-trigger="focus" title="Dismissible popover" data-bs-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a> {{< /example >}} ```js -$('.popover-dismiss').popover({ +var popover = new bootstrap.Popover(document.querySelector('.popover-dismiss'), { trigger: 'focus' }) ``` ### Disabled elements -Elements with the `disabled` attribute aren't interactive, meaning users cannot hover or click them to trigger a popover (or tooltip). As a workaround, you'll want to trigger the popover from a wrapper `<div>` or `<span>` and override the `pointer-events` on the disabled element. +Elements with the `disabled` attribute aren't interactive, meaning users cannot hover or click them to trigger a popover (or tooltip). As a workaround, you'll want to trigger the popover from a wrapper `<div>` or `<span>`, ideally made keyboard-focusable using `tabindex="0"`. -For disabled popover triggers, you may also prefer `data-trigger="hover"` so that the popover appears as immediate visual feedback to your users as they may not expect to _click_ on a disabled element. +For disabled popover triggers, you may also prefer `data-bs-trigger="hover focus"` so that the popover appears as immediate visual feedback to your users as they may not expect to _click_ on a disabled element. {{< example >}} -<span class="d-inline-block" data-toggle="popover" data-content="Disabled popover"> - <button class="btn btn-primary" style="pointer-events: none;" type="button" disabled>Disabled button</button> +<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="Disabled popover"> + <button class="btn btn-primary" type="button" disabled>Disabled button</button> </span> {{< /example >}} -## Usage - -Enable popovers via JavaScript: +## Sass -```js -$('#example').popover(options) -``` +### Variables -{{< callout warning >}} -##### GPU acceleration +{{< scss-docs name="popover-variables" file="scss/_variables.scss" >}} -Popovers sometimes appear blurry on Windows 10 devices due to GPU acceleration and a modified system DPI. The workaround for this in v4 is to disable GPU acceleration as needed on your popovers. +## Usage -Suggested fix: +Enable popovers via JavaScript: ```js -Popper.Defaults.modifiers.computeStyle.gpuAcceleration = !(window.devicePixelRatio < 1.5 && /Win/.test(navigator.platform)) +var exampleEl = document.getElementById('example') +var popover = new bootstrap.Popover(exampleEl, options) ``` -{{< /callout >}} {{< callout warning >}} ### Making popovers work for keyboard and assistive technology users @@ -134,18 +131,18 @@ To allow keyboard users to activate your popovers, you should only add them to H While you can insert rich, structured HTML in popovers with the `html` option, we strongly recommend that you avoid adding an excessive amount of content. The way popovers currently work is that, once displayed, their content is tied to the trigger element with the `aria-describedby` attribute. As a result, the entirety of the popover's content will be announced to assistive technology users as one long, uninterrupted stream. -Additionally, while it is possible to also include interactive controls (such as form elements or links) in your popover (by adding these elements to the `whiteList` or allowed attributes and tags), be aware that currently the popover does not manage keyboard focus order. When a keyboard user opens a popover, focus remains on the triggering element, and as the popover usually does not immediately follow the trigger in the document's structure, there is no guarantee that moving forward/pressing <kbd>TAB</kbd> will move a keyboard user into the popover itself. In short, simply adding interactive controls to a popover is likely to make these controls unreachable/unusable for keyboard users and users of assistive technologies, or at the very least make for an illogical overall focus order. In these cases, consider using a modal dialog instead. +Additionally, while it is possible to also include interactive controls (such as form elements or links) in your popover (by adding these elements to the `allowList` of allowed attributes and tags), be aware that currently the popover does not manage keyboard focus order. When a keyboard user opens a popover, focus remains on the triggering element, and as the popover usually does not immediately follow the trigger in the document's structure, there is no guarantee that moving forward/pressing <kbd>TAB</kbd> will move a keyboard user into the popover itself. In short, simply adding interactive controls to a popover is likely to make these controls unreachable/unusable for keyboard users and users of assistive technologies, or at the very least make for an illogical overall focus order. In these cases, consider using a modal dialog instead. {{< /callout >}} ### Options -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`. +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-animation=""`. Make sure to change the case type of the option name from camelCase to kebab-case when passing the options via data attributes. For example, instead of using `data-bs-customClass="beautifier"`, use `data-bs-custom-class="beautifier"`. {{< callout warning >}} -Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` options cannot be supplied using data attributes. +Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` options cannot be supplied using data attributes. {{< /callout >}} -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> <th style="width: 100px;">Name</th> @@ -156,32 +153,32 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti </thead> <tbody> <tr> - <td>animation</td> + <td><code>animation</code></td> <td>boolean</td> - <td>true</td> + <td><code>true</code></td> <td>Apply a CSS fade transition to the popover</td> </tr> <tr> - <td>container</td> + <td><code>container</code></td> <td>string | element | false</td> - <td>false</td> + <td><code>false</code></td> <td> <p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. 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.</p> </td> </tr> <tr> - <td>content</td> + <td><code>content</code></td> <td>string | element | function</td> - <td>''</td> + <td><code>''</code></td> <td> - <p>Default content value if <code>data-content</code> attribute isn't present.</p> + <p>Default content value if <code>data-bs-content</code> attribute isn't present.</p> <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p> </td> </tr> <tr> - <td>delay</td> + <td><code>delay</code></td> <td>number | object</td> - <td>0</td> + <td><code>0</code></td> <td> <p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p> <p>If a number is supplied, delay is applied to both hide/show</p> @@ -189,104 +186,111 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti </td> </tr> <tr> - <td>html</td> + <td><code>html</code></td> <td>boolean</td> - <td>false</td> - <td>Insert HTML into the popover. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td> + <td><code>false</code></td> + <td>Insert HTML into the popover. If false, <code>innerText</code> property will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td> </tr> <tr> - <td>placement</td> + <td><code>placement</code></td> <td>string | function</td> - <td>'right'</td> + <td><code>'right'</code></td> <td> <p>How to position the popover - auto | top | bottom | left | right.<br>When <code>auto</code> is specified, it will dynamically reorient the popover.</p> <p>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 <code>this</code> context is set to the popover instance.</p> </td> </tr> <tr> - <td>selector</td> + <td><code>selector</code></td> <td>string | false</td> - <td>false</td> - <td>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 <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/team/bootstrap/pen/qBNGbYK">an informative example</a>.</td> + <td><code>false</code></td> + <td>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 <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/team/bootstrap/pen/zYBXGwX?editors=1010">an informative example</a>.</td> </tr> <tr> - <td>template</td> + <td><code>template</code></td> <td>string</td> - <td><code>'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'</code></td> + <td><code>'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'</code></td> <td> <p>Base HTML to use when creating the popover.</p> <p>The popover's <code>title</code> will be injected into the <code>.popover-header</code>.</p> <p>The popover's <code>content</code> will be injected into the <code>.popover-body</code>.</p> - <p><code>.arrow</code> will become the popover's arrow.</p> + <p><code>.popover-arrow</code> will become the popover's arrow.</p> <p>The outermost wrapper element should have the <code>.popover</code> class.</p> </td> </tr> <tr> - <td>title</td> + <td><code>title</code></td> <td>string | element | function</td> - <td>''</td> + <td><code>''</code></td> <td> <p>Default title value if <code>title</code> attribute isn't present.</p> <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p> </td> </tr> <tr> - <td>trigger</td> + <td><code>trigger</code></td> <td>string</td> - <td>'click'</td> + <td><code>'click'</code></td> <td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. <code>manual</code> cannot be combined with any other trigger.</td> </tr> <tr> - <td>offset</td> - <td>number | string</td> - <td>0</td> - <td>Offset of the popover relative to its target. For more information refer to Popper's <a href="https://popper.js.org/docs/v1/#modifiers..offset.offset">offset docs</a>.</td> + <td><code>fallbackPlacements</code></td> + <td>array</td> + <td><code>['top', 'right', 'bottom', 'left']</code></td> + <td>Define fallback placements by providing a list of placements in array (in order of preference). For more information refer to + Popper's <a href="https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements">behavior docs</a></td> </tr> <tr> - <td>fallbackPlacement</td> - <td>string | array</td> - <td>'flip'</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> + <td><code>boundary</code></td> + <td>string | element</td> + <td><code>'clippingParents'</code></td> + <td>Overflow constraint boundary of the popover (applies only to Popper's preventOverflow modifier). By default it's <code>'clippingParents'</code> and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v2/utils/detect-overflow/#boundary">detectOverflow docs</a>.</td> </tr> <tr> - <td>customClass</td> + <td><code>customClass</code></td> <td>string | function</td> - <td>''</td> + <td><code>''</code></td> <td> - <p>Add classes to the popover when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: <code>'a b'</code>.</p> + <p>Add classes to the popover when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: <code>'class-1 class-2'</code>.</p> <p>You can also pass a function that should return a single string containing additional class names.</p> </td> </tr> <tr> - <td>boundary</td> - <td>string | element</td> - <td>'scrollParent'</td> - <td>Overflow constraint boundary of the popover. 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> - </tr> - <tr> - <td>sanitize</td> + <td><code>sanitize</code></td> <td>boolean</td> - <td>true</td> - <td>Enable or disable the sanitization. If activated <code>'template'</code>, <code>'content'</code> and <code>'title'</code> options will be sanitized.</td> + <td><code>true</code></td> + <td>Enable or disable the sanitization. If activated <code>'template'</code>, <code>'content'</code> and <code>'title'</code> options will be sanitized. See the <a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">sanitizer section in our JavaScript documentation</a>.</td> </tr> <tr> - <td>whiteList</td> + <td><code>allowList</code></td> <td>object</td> <td><a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">Default value</a></td> <td>Object which contains allowed attributes and tags</td> </tr> <tr> - <td>sanitizeFn</td> + <td><code>sanitizeFn</code></td> <td>null | function</td> - <td>null</td> + <td><code>null</code></td> <td>Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.</td> </tr> <tr> - <td>popperConfig</td> - <td>null | object</td> - <td>null</td> - <td>To change Bootstrap's default Popper config, see <a href="https://popper.js.org/docs/v1/#Popper.Defaults">Popper's configuration</a></td> + <td><code>offset</code></td> + <td>array | string | function</td> + <td><code>[0, 8]</code></td> + <td> + <p>Offset of the popover relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p> + <p>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: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p> + <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p> + </td> + </tr> + <tr> + <td><code>popperConfig</code></td> + <td>null | object | function</td> + <td><code>null</code></td> + <td> + <p>To change Bootstrap's default Popper config, see <a href="https://popper.js.org/docs/v2/constructors/#options">Popper's configuration</a>.</p> + <p>When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper.</p> + </td> </tr> </tbody> </table> @@ -297,86 +301,113 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti Options for individual popovers can alternatively be specified through the use of data attributes, as explained above. {{< /callout >}} +#### Using function with `popperConfig` + +```js +var popover = new bootstrap.Popover(element, { + popperConfig: function (defaultBsPopperConfig) { + // var newPopperConfig = {...} + // use defaultBsPopperConfig if needed... + // return newPopperConfig + } +}) +``` + ### Methods {{< callout danger >}} {{< partial "callout-danger-async-methods.md" >}} {{< /callout >}} -#### `$().popover(options)` -Initializes popovers for an element collection. - -#### `.popover('show')` +#### show Reveals an element's popover. **Returns to the caller before the popover has actually been shown** (i.e. before the `shown.bs.popover` event occurs). This is considered a "manual" triggering of the popover. Popovers whose title and content are both zero-length are never displayed. ```js -$('#element').popover('show') +myPopover.show() ``` -#### `.popover('hide')` +#### hide Hides an element's popover. **Returns to the caller before the popover has actually been hidden** (i.e. before the `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover. ```js -$('#element').popover('hide') +myPopover.hide() ``` -#### `.popover('toggle')` +#### toggle Toggles an element's popover. **Returns to the caller before the popover has actually been shown or hidden** (i.e. before the `shown.bs.popover` or `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover. ```js -$('#element').popover('toggle') +myPopover.toggle() ``` -#### `.popover('dispose')` +#### dispose -Hides and destroys an element's popover. Popovers that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements. +Hides and destroys an element's popover (Removes stored data on the DOM element). Popovers that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements. ```js -$('#element').popover('dispose') +myPopover.dispose() ``` -#### `.popover('enable')` +#### enable Gives an element's popover the ability to be shown. **Popovers are enabled by default.** ```js -$('#element').popover('enable') +myPopover.enable() ``` -#### `.popover('disable')` +#### disable Removes the ability for an element's popover to be shown. The popover will only be able to be shown if it is re-enabled. ```js -$('#element').popover('disable') +myPopover.disable() ``` -#### `.popover('toggleEnabled')` +#### toggleEnabled Toggles the ability for an element's popover to be shown or hidden. ```js -$('#element').popover('toggleEnabled') +myPopover.toggleEnabled() ``` -#### `.popover('update')` +#### update Updates the position of an element's popover. ```js -$('#element').popover('update') +myPopover.update() +``` + +#### getInstance + +*Static* method which allows you to get the popover instance associated with a DOM element + +```js +var exampleTriggerEl = document.getElementById('example') +var popover = bootstrap.Popover.getInstance(exampleTriggerEl) // Returns a Bootstrap popover instance +``` + +#### getOrCreateInstance + +*Static* method which allows you to get the popover instance associated with a DOM element, or create a new one in case it wasn't initialised + +```js +var exampleTriggerEl = document.getElementById('example') +var popover = bootstrap.Popover.getOrCreateInstance(exampleTriggerEl) // Returns a Bootstrap popover instance ``` ### Events -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> - <th style="width: 150px;">Event Type</th> + <th style="width: 150px;">Event type</th> <th>Description</th> </tr> </thead> @@ -405,7 +436,8 @@ $('#element').popover('update') </table> ```js -$('#myPopover').on('hidden.bs.popover', function () { +var myPopoverTrigger = document.getElementById('myPopover') +myPopoverTrigger.addEventListener('hidden.bs.popover', function () { // do something... }) ``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/progress.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/progress.md index ee8306263..1b59dc97a 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/progress.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/progress.md @@ -127,7 +127,7 @@ The striped gradient can also be animated. Add `.progress-bar-animated` to `.pro <div class="progress"> <div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div> </div> - <button type="button" class="btn btn-secondary bd-toggle-animated-progress" data-toggle="button" aria-pressed="false"> + <button type="button" class="btn btn-secondary mt-3" data-bs-toggle="button" id="btnToggleAnimatedProgress" aria-pressed="false" autocomplete="off"> Toggle animation </button> </div> @@ -137,3 +137,15 @@ The striped gradient can also be animated. Add `.progress-bar-animated` to `.pro <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 75%"></div> </div> ``` + +## Sass + +### Variables + +{{< scss-docs name="progress-variables" file="scss/_variables.scss" >}} + +### Keyframes + +Used for creating the CSS animations for `.progress-bar-animated`. Included in `scss/_progress-bar.scss`. + +{{< scss-docs name="progress-keyframes" file="scss/_progress.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/scrollspy.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/scrollspy.md new file mode 100644 index 000000000..580a1e2d5 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/scrollspy.md @@ -0,0 +1,367 @@ +--- +layout: docs +title: Scrollspy +description: Automatically update Bootstrap navigation or list group components based on scroll position to indicate which link is currently active in the viewport. +group: components +toc: true +--- + +## How it works + +Scrollspy has a few requirements to function properly: + +- It must be used on a Bootstrap [nav component]({{< docsref "/components/navs-tabs" >}}) or [list group]({{< docsref "/components/list-group" >}}). +- Scrollspy requires `position: relative;` on the element you're spying on, usually the `<body>`. +- Anchors (`<a>`) are required and must point to an element with that `id`. + +When successfully implemented, your nav or list group will update accordingly, moving the `.active` class from one item to the next based on their associated targets. + +{{< callout >}} +### Scrollable containers and keyboard access + +If you're making a scrollable container (other than the `<body>`), be sure to have a `height` set and `overflow-y: scroll;` applied to it—alongside a `tabindex="0"` to ensure keyboard access. +{{< /callout >}} + +## Example in navbar + +Scroll the area below the navbar and watch the active class change. The dropdown items will be highlighted as well. + +<div class="bd-example"> + <nav id="navbar-example2" class="navbar navbar-light bg-light px-3"> + <a class="navbar-brand" href="#">Navbar</a> + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link" href="#scrollspyHeading1">First</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#scrollspyHeading2">Second</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#scrollspyHeading3">Third</a></li> + <li><a class="dropdown-item" href="#scrollspyHeading4">Fourth</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#scrollspyHeading5">Fifth</a></li> + </ul> + </li> + </ul> + </nav> + <div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="0" class="scrollspy-example" tabindex="0"> + <h4 id="scrollspyHeading1">First heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading2">Second heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading3">Third heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading4">Fourth heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading5">Fifth heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + </div> +</div> + +```html +<nav id="navbar-example2" class="navbar navbar-light bg-light px-3"> + <a class="navbar-brand" href="#">Navbar</a> + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link" href="#scrollspyHeading1">First</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#scrollspyHeading2">Second</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#scrollspyHeading3">Third</a></li> + <li><a class="dropdown-item" href="#scrollspyHeading4">Fourth</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#scrollspyHeading5">Fifth</a></li> + </ul> + </li> + </ul> +</nav> +<div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="0" class="scrollspy-example" tabindex="0"> + <h4 id="scrollspyHeading1">First heading</h4> + <p>...</p> + <h4 id="scrollspyHeading2">Second heading</h4> + <p>...</p> + <h4 id="scrollspyHeading3">Third heading</h4> + <p>...</p> + <h4 id="scrollspyHeading4">Fourth heading</h4> + <p>...</p> + <h4 id="scrollspyHeading5">Fifth heading</h4> + <p>...</p> +</div> +``` + +## Example with nested nav + +Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its parents will also be `.active`. Scroll the area next to the navbar and watch the active class change. + +<div class="bd-example"> + <div class="row"> + <div class="col-4"> + <nav id="navbar-example3" class="navbar navbar-light bg-light flex-column align-items-stretch p-3"> + <a class="navbar-brand" href="#">Navbar</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link" href="#item-1">Item 1</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link ms-3 my-1" href="#item-1-1">Item 1-1</a> + <a class="nav-link ms-3 my-1" href="#item-1-2">Item 1-2</a> + </nav> + <a class="nav-link" href="#item-2">Item 2</a> + <a class="nav-link" href="#item-3">Item 3</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link ms-3 my-1" href="#item-3-1">Item 3-1</a> + <a class="nav-link ms-3 my-1" href="#item-3-2">Item 3-2</a> + </nav> + </nav> + </nav> + </div> + <div class="col-8"> + <div data-bs-spy="scroll" data-bs-target="#navbar-example3" data-bs-offset="0" class="scrollspy-example-2" tabindex="0"> + <h4 id="item-1">Item 1</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h5 id="item-1-1">Item 1-1</h5> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h5 id="item-1-2">Item 1-2</h5> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="item-2">Item 2</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="item-3">Item 3</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h5 id="item-3-1">Item 3-1</h5> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h5 id="item-3-2">Item 3-2</h5> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + </div> + </div> + </div> +</div> + +```html +<nav id="navbar-example3" class="navbar navbar-light bg-light flex-column align-items-stretch p-3"> + <a class="navbar-brand" href="#">Navbar</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link" href="#item-1">Item 1</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link ms-3 my-1" href="#item-1-1">Item 1-1</a> + <a class="nav-link ms-3 my-1" href="#item-1-2">Item 1-2</a> + </nav> + <a class="nav-link" href="#item-2">Item 2</a> + <a class="nav-link" href="#item-3">Item 3</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link ms-3 my-1" href="#item-3-1">Item 3-1</a> + <a class="nav-link ms-3 my-1" href="#item-3-2">Item 3-2</a> + </nav> + </nav> +</nav> + +<div data-bs-spy="scroll" data-bs-target="#navbar-example3" data-bs-offset="0" tabindex="0"> + <h4 id="item-1">Item 1</h4> + <p>...</p> + <h5 id="item-1-1">Item 1-1</h5> + <p>...</p> + <h5 id="item-1-2">Item 1-2</h5> + <p>...</p> + <h4 id="item-2">Item 2</h4> + <p>...</p> + <h4 id="item-3">Item 3</h4> + <p>...</p> + <h5 id="item-3-1">Item 3-1</h5> + <p>...</p> + <h5 id="item-3-2">Item 3-2</h5> + <p>...</p> +</div> +``` + +## Example with list-group + +Scrollspy also works with `.list-group`s. Scroll the area next to the list group and watch the active class change. + +<div class="bd-example"> + <div class="row"> + <div class="col-4"> + <div id="list-example" class="list-group"> + <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> + <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a> + <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a> + <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a> + </div> + </div> + <div class="col-8"> + <div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-offset="0" class="scrollspy-example" tabindex="0"> + <h4 id="list-item-1">Item 1</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="list-item-2">Item 2</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="list-item-3">Item 3</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="list-item-4">Item 4</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + </div> + </div> + </div> +</div> + +```html +<div id="list-example" class="list-group"> + <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> + <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a> + <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a> + <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a> +</div> +<div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-offset="0" class="scrollspy-example" tabindex="0"> + <h4 id="list-item-1">Item 1</h4> + <p>...</p> + <h4 id="list-item-2">Item 2</h4> + <p>...</p> + <h4 id="list-item-3">Item 3</h4> + <p>...</p> + <h4 id="list-item-4">Item 4</h4> + <p>...</p> +</div> +``` + +## Usage + +### Via data attributes + +To easily add scrollspy behavior to your topbar navigation, add `data-bs-spy="scroll"` to the element you want to spy on (most typically this would be the `<body>`). Then add the `data-bs-target` attribute with the ID or class of the parent element of any Bootstrap `.nav` component. + +```css +body { + position: relative; +} +``` + +```html +<body data-bs-spy="scroll" data-bs-target="#navbar-example"> + ... + <div id="navbar-example"> + <ul class="nav nav-tabs" role="tablist"> + ... + </ul> + </div> + ... +</body> +``` + +### Via JavaScript + +After adding `position: relative;` in your CSS, call the scrollspy via JavaScript: + +```js +var scrollSpy = new bootstrap.ScrollSpy(document.body, { + target: '#navbar-example' +}) +``` + +{{< callout danger >}} +#### Resolvable ID targets required + +Navbar links must have resolvable id targets. For example, a `<a href="#home">home</a>` must correspond to something in the DOM like `<div id="home"></div>`. +{{< /callout >}} + +{{< callout info >}} +#### Non-visible target elements ignored + +Target elements that are not visible will be ignored and their corresponding nav items will never be highlighted. +{{< /callout >}} + +### Methods + +#### refresh + +When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so: + +```js +var dataSpyList = [].slice.call(document.querySelectorAll('[data-bs-spy="scroll"]')) +dataSpyList.forEach(function (dataSpyEl) { + bootstrap.ScrollSpy.getInstance(dataSpyEl) + .refresh() +}) +``` + +#### dispose + +Destroys an element's scrollspy. (Removes stored data on the DOM element) + +#### getInstance + +*Static* method which allows you to get the scrollspy instance associated with a DOM element + +```js +var scrollSpyContentEl = document.getElementById('content') +var scrollSpy = bootstrap.ScrollSpy.getInstance(scrollSpyContentEl) // Returns a Bootstrap scrollspy instance +``` + +#### getOrCreateInstance + +*Static* method which allows you to get the scrollspy instance associated with a DOM element, or create a new one in case it wasn't initialised + +```js +var scrollSpyContentEl = document.getElementById('content') +var scrollSpy = bootstrap.ScrollSpy.getOrCreateInstance(scrollSpyContentEl) // Returns a Bootstrap scrollspy instance +``` + +### Options + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-offset=""`. + +<table class="table"> + <thead> + <tr> + <th style="width: 100px;">Name</th> + <th style="width: 100px;">Type</th> + <th style="width: 50px;">Default</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>offset</code></td> + <td>number</td> + <td><code>10</code></td> + <td>Pixels to offset from top when calculating position of scroll.</td> + </tr> + <tr> + <td><code>method</code></td> + <td>string</td> + <td><code>auto</code></td> + <td>Finds which section the spied element is in. <code>auto</code> will choose the best method to get scroll coordinates. <code>offset</code> will use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect"><code>Element.getBoundingClientRect()</code></a> method to get scroll coordinates. <code>position</code> will use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop"><code>HTMLElement.offsetTop</code></a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft"><code>HTMLElement.offsetLeft</code></a> properties to get scroll coordinates.</td> + </tr> + <tr> + <td><code>target</code></td> + <td>string | jQuery object | DOM element</td> + <td></td> + <td>Specifies element to apply Scrollspy plugin.</td> + </tr> + </tbody> +</table> + +### Events + +<table class="table"> + <thead> + <tr> + <th style="width: 150px;">Event type</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>activate.bs.scrollspy</code></td> + <td>This event fires on the scroll element whenever a new item becomes activated by the scrollspy.</td> + </tr> + </tbody> +</table> + +```js +var firstScrollSpyEl = document.querySelector('[data-bs-spy="scroll"]') +firstScrollSpyEl.addEventListener('activate.bs.scrollspy', function () { + // do something... +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/spinners.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/spinners.md index 87b0611e9..ef7efaf58 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/spinners.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/spinners.md @@ -10,7 +10,7 @@ toc: true Bootstrap "spinners" can be used to show the loading state in your projects. They're built only with HTML and CSS, meaning you don't need any JavaScript to create them. You will, however, need some custom JavaScript to toggle their visibility. Their appearance, alignment, and sizing can be easily customized with our amazing utility classes. -For accessibility purposes, each loader here includes `role="status"` and a nested `<span class="sr-only">Loading...</span>`. +For accessibility purposes, each loader here includes `role="status"` and a nested `<span class="visually-hidden">Loading...</span>`. {{< callout info >}} {{< partial "callout-info-prefersreducedmotion.md" >}} @@ -22,7 +22,7 @@ Use the border spinners for a lightweight loading indicator. {{< example >}} <div class="spinner-border" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{< /example >}} @@ -34,7 +34,7 @@ The border spinner uses `currentColor` for its `border-color`, meaning you can c {{< spinner.inline >}} {{- range (index $.Site.Data "theme-colors") }} <div class="spinner-border text-{{ .name }}" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{- end -}} {{< /spinner.inline >}} @@ -50,7 +50,7 @@ If you don't fancy a border spinner, switch to the grow spinner. While it doesn' {{< example >}} <div class="spinner-grow" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{< /example >}} @@ -60,7 +60,7 @@ Once again, this spinner is built with `currentColor`, so you can easily change {{< spinner.inline >}} {{- range (index $.Site.Data "theme-colors") }} <div class="spinner-grow text-{{ .name }}" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{- end -}} {{< /spinner.inline >}} @@ -76,7 +76,7 @@ Use [margin utilities][margin] like `.m-5` for easy spacing. {{< example >}} <div class="spinner-border m-5" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{< /example >}} @@ -89,7 +89,7 @@ Use [flexbox utilities][flex], [float utilities][float], or [text alignment][tex {{< example >}} <div class="d-flex justify-content-center"> <div class="spinner-border" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> </div> {{< /example >}} @@ -97,7 +97,7 @@ Use [flexbox utilities][flex], [float utilities][float], or [text alignment][tex {{< example >}} <div class="d-flex align-items-center"> <strong>Loading...</strong> - <div class="spinner-border ml-auto" role="status" aria-hidden="true"></div> + <div class="spinner-border ms-auto" role="status" aria-hidden="true"></div> </div> {{< /example >}} @@ -105,8 +105,8 @@ Use [flexbox utilities][flex], [float utilities][float], or [text alignment][tex {{< example >}} <div class="clearfix"> - <div class="spinner-border float-right" role="status"> - <span class="sr-only">Loading...</span> + <div class="spinner-border float-end" role="status"> + <span class="visually-hidden">Loading...</span> </div> </div> {{< /example >}} @@ -116,7 +116,7 @@ Use [flexbox utilities][flex], [float utilities][float], or [text alignment][tex {{< example >}} <div class="text-center"> <div class="spinner-border" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> </div> {{< /example >}} @@ -127,10 +127,10 @@ Add `.spinner-border-sm` and `.spinner-grow-sm` to make a smaller spinner that c {{< example >}} <div class="spinner-border spinner-border-sm" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> <div class="spinner-grow spinner-grow-sm" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{< /example >}} @@ -138,10 +138,10 @@ Or, use custom CSS or inline styles to change the dimensions as needed. {{< example >}} <div class="spinner-border" style="width: 3rem; height: 3rem;" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> <div class="spinner-grow" style="width: 3rem; height: 3rem;" role="status"> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </div> {{< /example >}} @@ -152,7 +152,7 @@ Use spinners within buttons to indicate an action is currently processing or tak {{< example >}} <button class="btn btn-primary" type="button" disabled> <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </button> <button class="btn btn-primary" type="button" disabled> <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> @@ -163,7 +163,7 @@ Use spinners within buttons to indicate an action is currently processing or tak {{< example >}} <button class="btn btn-primary" type="button" disabled> <span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span> - <span class="sr-only">Loading...</span> + <span class="visually-hidden">Loading...</span> </button> <button class="btn btn-primary" type="button" disabled> <span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span> @@ -171,6 +171,20 @@ Use spinners within buttons to indicate an action is currently processing or tak </button> {{< /example >}} +## Sass + +### Variables + +{{< scss-docs name="spinner-variables" file="scss/_variables.scss" >}} + +### Keyframes + +Used for creating the CSS animations for our spinners. Included in `scss/_spinners.scss`. + +{{< scss-docs name="spinner-border-keyframes" file="scss/_spinners.scss" >}} + +{{< scss-docs name="spinner-grow-keyframes" file="scss/_spinners.scss" >}} + [color]: {{< docsref "/utilities/colors" >}} [display]: {{< docsref "/utilities/display" >}} @@ -178,4 +192,4 @@ Use spinners within buttons to indicate an action is currently processing or tak [float]: {{< docsref "/utilities/float" >}} [margin]: {{< docsref "/utilities/spacing" >}} [sizing]: {{< docsref "/utilities/sizing" >}} -[text]: {{< docsref "/content/typography" >}} +[text]: {{< docsref "/utilities/text" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/components/toasts.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/toasts.md new file mode 100644 index 000000000..2dde09f5b --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/toasts.md @@ -0,0 +1,446 @@ +--- +layout: docs +title: Toasts +description: Push notifications to your visitors with a toast, a lightweight and easily customizable alert message. +group: components +toc: true +--- + +Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems. They're built with flexbox, so they're easy to align and position. + +## Overview + +Things to know when using the toast plugin: + +- Toasts are opt-in for performance reasons, so **you must initialize them yourself**. +- Toasts will automatically hide if you do not specify `autohide: false`. + +{{< callout info >}} +{{< partial "callout-info-prefersreducedmotion.md" >}} +{{< /callout >}} + +## Examples + +### Basic + +To encourage extensible and predictable toasts, we recommend a header and body. Toast headers use `display: flex`, allowing easy alignment of content thanks to our margin and flexbox utilities. + +Toasts are as flexible as you need and have very little required markup. At a minimum, we require a single element to contain your "toasted" content and strongly encourage a dismiss button. + +{{< example class="bg-light" >}} +<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small>11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> +</div> +{{< /example >}} + +### Live + +Click the button below to show a toast (positioned with our utilities in the lower right corner) that has been hidden by default with `.hide`. + +<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11"> + <div id="liveToast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small>11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + </div> +</div> + +<div class="bd-example"> + <button type="button" class="btn btn-primary" id="liveToastBtn">Show live toast</button> +</div> + +```html +<button type="button" class="btn btn-primary" id="liveToastBtn">Show live toast</button> + +<div class="position-fixed bottom-0 end-0 p-3" style="z-index: 11"> + <div id="liveToast" class="toast hide" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + <img src="..." class="rounded me-2" alt="..."> + <strong class="me-auto">Bootstrap</strong> + <small>11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + </div> +</div> +``` + +### Translucent + +Toasts are slightly translucent to blend in with what's below them. + +{{< example class="bg-dark" >}} +<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> +</div> +{{< /example >}} + +### Stacking + +You can stack toasts by wrapping them in a toast container, which will vertically add some spacing. + +{{< example class="bg-light" >}} +<div class="toast-container"> + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">just now</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + See? Just like this. + </div> + </div> + + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">2 seconds ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Heads up, toasts will stack automatically + </div> + </div> +</div> +{{< /example >}} + +### Custom content + +Customize your toasts by removing sub-components, tweaking them with [utilities]({{< docsref "/utilities/api" >}}), or by adding your own markup. Here we've created a simpler toast by removing the default `.toast-header`, adding a custom hide icon from [Bootstrap Icons]({{< param icons >}}), and using some [flexbox utilities]({{< docsref "/utilities/flex" >}}) to adjust the layout. + +{{< example class="bg-light" >}} +<div class="toast align-items-center" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="d-flex"> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + <button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button> + </div> +</div> +{{< /example >}} + +Alternatively, you can also add additional controls and components to toasts. + +{{< example class="bg-light" >}} +<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-body"> + Hello, world! This is a toast message. + <div class="mt-2 pt-2 border-top"> + <button type="button" class="btn btn-primary btn-sm">Take action</button> + <button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="toast">Close</button> + </div> + </div> +</div> +{{< /example >}} + +### Color schemes + +Building on the above example, you can create different toast color schemes with our [color]({{< docsref "/utilities/colors" >}}) and [background]({{< docsref "/utilities/background" >}}) utilities. Here we've added `.bg-primary` and `.text-white` to the `.toast`, and then added `.btn-close-white` to our close button. For a crisp edge, we remove the default border with `.border-0`. + +{{< example class="bg-light" >}} +<div class="toast align-items-center text-white bg-primary border-0" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="d-flex"> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button> + </div> +</div> +{{< /example >}} + +## Placement + +Place toasts with custom CSS as you need them. The top right is often used for notifications, as is the top middle. If you're only ever going to show one toast at a time, put the positioning styles right on the `.toast`. + +{{< example >}} +<form> + <div class="mb-3"> + <label for="selectToastPlacement">Toast placement</label> + <select class="form-select mt-2" id="selectToastPlacement"> + <option value="" selected>Select a position...</option> + <option value="top-0 start-0">Top left</option> + <option value="top-0 start-50 translate-middle-x">Top center</option> + <option value="top-0 end-0">Top right</option> + <option value="top-50 start-0 translate-middle-y">Middle left</option> + <option value="top-50 start-50 translate-middle">Middle center</option> + <option value="top-50 end-0 translate-middle-y">Middle right</option> + <option value="bottom-0 start-0">Bottom left</option> + <option value="bottom-0 start-50 translate-middle-x">Bottom center</option> + <option value="bottom-0 end-0">Bottom right</option> + </select> + </div> +</form> +<div aria-live="polite" aria-atomic="true" class="bg-dark position-relative bd-example-toasts"> + <div class="toast-container position-absolute p-3" id="toastPlacement"> + <div class="toast"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small>11 mins ago</small> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + </div> + </div> +</div> +{{< /example >}} + +For systems that generate more notifications, consider using a wrapping element so they can easily stack. + +{{< example class="bg-dark bd-example-toasts p-0" >}} +<div aria-live="polite" aria-atomic="true" class="position-relative"> + <!-- Position it: --> + <!-- - `.toast-container` for spacing between toasts --> + <!-- - `.position-absolute`, `top-0` & `end-0` to position the toasts in the upper right corner --> + <!-- - `.p-3` to prevent the toasts from sticking to the edge of the container --> + <div class="toast-container position-absolute top-0 end-0 p-3"> + + <!-- Then put toasts within --> + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">just now</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + See? Just like this. + </div> + </div> + + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">2 seconds ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Heads up, toasts will stack automatically + </div> + </div> + </div> +</div> +{{< /example >}} + +You can also get fancy with flexbox utilities to align toasts horizontally and/or vertically. + +{{< example class="bg-dark bd-example-toasts d-flex" >}} +<!-- Flexbox container for aligning the toasts --> +<div aria-live="polite" aria-atomic="true" class="d-flex justify-content-center align-items-center w-100"> + + <!-- Then put toasts within --> + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small>11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + </div> +</div> +{{< /example >}} + +## Accessibility + +Toasts are intended to be small interruptions to your visitors or users, so to help those with screen readers and similar assistive technologies, you should wrap your toasts in an [`aria-live` region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions). Changes to live regions (such as injecting/updating a toast component) are automatically announced by screen readers without needing to move the user's focus or otherwise interrupt the user. Additionally, include `aria-atomic="true"` to ensure that the entire toast is always announced as a single (atomic) unit, rather than just announcing what was changed (which could lead to problems if you only update part of the toast's content, or if displaying the same toast content at a later point in time). If the information needed is important for the process, e.g. for a list of errors in a form, then use the [alert component]({{< docsref "/components/alerts" >}}) instead of toast. + +Note that the live region needs to be present in the markup *before* the toast is generated or updated. If you dynamically generate both at the same time and inject them into the page, they will generally not be announced by assistive technologies. + +You also need to adapt the `role` and `aria-live` level depending on the content. If it's an important message like an error, use `role="alert" aria-live="assertive"`, otherwise use `role="status" aria-live="polite"` attributes. + +As the content you're displaying changes, be sure to update the [`delay` timeout](#options) so that users have enough time to read the toast. + +```html +<div class="toast" role="alert" aria-live="polite" aria-atomic="true" data-bs-delay="10000"> + <div role="alert" aria-live="assertive" aria-atomic="true">...</div> +</div> +``` + +When using `autohide: false`, you must add a close button to allow users to dismiss the toast. + +{{< example class="bg-light" >}} +<div role="alert" aria-live="assertive" aria-atomic="true" class="toast" data-bs-autohide="false"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small>11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> +</div> +{{< /example >}} + +While technically it's possible to add focusable/actionable controls (such as additional buttons or links) in your toast, you should avoid doing this for autohiding toasts. Even if you give the toast a long [`delay` timeout](#options), keyboard and assistive technology users may find it difficult to reach the toast in time to take action (since toasts don't receive focus when they are displayed). If you absolutely must have further controls, we recommend using a toast with `autohide: false`. + +## Sass + +### Variables + +{{< scss-docs name="toast-variables" file="scss/_variables.scss" >}} + +## Usage + +Initialize toasts via JavaScript: + +```js +var toastElList = [].slice.call(document.querySelectorAll('.toast')) +var toastList = toastElList.map(function (toastEl) { + return new bootstrap.Toast(toastEl, option) +}) +``` + +### Options + +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-animation=""`. + +<table class="table"> + <thead> + <tr> + <th style="width: 100px;">Name</th> + <th style="width: 100px;">Type</th> + <th style="width: 50px;">Default</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>animation</code></td> + <td>boolean</td> + <td><code>true</code></td> + <td>Apply a CSS fade transition to the toast</td> + </tr> + <tr> + <td><code>autohide</code></td> + <td>boolean</td> + <td><code>true</code></td> + <td>Auto hide the toast</td> + </tr> + <tr> + <td><code>delay</code></td> + <td>number</td> + <td> + <code>5000</code> + </td> + <td>Delay hiding the toast (ms)</td> + </tr> + </tbody> +</table> + +### Methods + +{{< callout danger >}} +{{< partial "callout-danger-async-methods.md" >}} +{{< /callout >}} + +#### show + +Reveals an element's toast. **Returns to the caller before the toast has actually been shown** (i.e. before the `shown.bs.toast` event occurs). +You have to manually call this method, instead your toast won't show. + +```js +toast.show() +``` + +#### hide + +Hides an element's toast. **Returns to the caller before the toast has actually been hidden** (i.e. before the `hidden.bs.toast` event occurs). You have to manually call this method if you made `autohide` to `false`. + +```js +toast.hide() +``` + +#### dispose + +Hides an element's toast. Your toast will remain on the DOM but won't show anymore. + +```js +toast.dispose() +``` + +#### getInstance + +*Static* method which allows you to get the scrollspy instance associated with a DOM element + +```js +var myToastEl = document.getElementById('myToastEl') +var myToast = bootstrap.Toast.getInstance(myToastEl) // Returns a Bootstrap toast instance +``` + +#### getOrCreateInstance + +*Static* method which allows you to get the scrollspy instance associated with a DOM element, or create a new one in case it wasn't initialised + +```js +var myToastEl = document.getElementById('myToastEl') +var myToast = bootstrap.Toast.getOrCreateInstance(myToastEl) // Returns a Bootstrap toast instance +``` + +### Events + +<table class="table"> + <thead> + <tr> + <th style="width: 150px;">Event type</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td><code>show.bs.toast</code></td> + <td>This event fires immediately when the <code>show</code> instance method is called.</td> + </tr> + <tr> + <td><code>shown.bs.toast</code></td> + <td>This event is fired when the toast has been made visible to the user.</td> + </tr> + <tr> + <td><code>hide.bs.toast</code></td> + <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td> + </tr> + <tr> + <td><code>hidden.bs.toast</code></td> + <td>This event is fired when the toast has finished being hidden from the user.</td> + </tr> + </tbody> +</table> + +```js +var myToastEl = document.getElementById('myToast') +myToastEl.addEventListener('hidden.bs.toast', function () { + // do something... +}) +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/components/tooltips.md b/vendor/twbs/bootstrap/site/content/docs/5.0/components/tooltips.md index 665342794..59d2480d4 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/components/tooltips.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/components/tooltips.md @@ -1,7 +1,7 @@ --- layout: docs title: Tooltips -description: Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-attributes for local title storage. +description: Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-bs-attributes for local title storage. group: components toc: true --- @@ -11,7 +11,6 @@ toc: true Things to know when using the tooltip plugin: - Tooltips rely on the 3rd party library [Popper](https://popper.js.org/) for positioning. You must include [popper.min.js]({{< param "cdn.popper" >}}) before bootstrap.js or use `bootstrap.bundle.min.js` / `bootstrap.bundle.js` which contains Popper in order for tooltips to work! -- If you're building our JavaScript from source, it [requires `util.js`]({{< docsref "/getting-started/javascript#util" >}}). - Tooltips are opt-in for performance reasons, so **you must initialize them yourself**. - Tooltips with zero-length titles are never displayed. - Specify `container: 'body'` to avoid rendering problems in more complex components (like our input groups, button groups, etc). @@ -22,6 +21,10 @@ Things to know when using the tooltip plugin: - Tooltips can be triggered thanks to an element inside a shadow DOM. {{< callout info >}} +{{< partial "callout-info-sanitizer.md" >}} +{{< /callout >}} + +{{< callout info >}} {{< partial "callout-info-prefersreducedmotion.md" >}} {{< /callout >}} @@ -29,11 +32,12 @@ Got all that? Great, let's see how they work with some examples. ## Example: Enable tooltips everywhere -One way to initialize all tooltips on a page would be to select them by their `data-toggle` attribute: +One way to initialize all tooltips on a page would be to select them by their `data-bs-toggle` attribute: ```js -$(function () { - $('[data-toggle="tooltip"]').tooltip() +var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) +var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { + return new bootstrap.Tooltip(tooltipTriggerEl) }) ``` @@ -42,33 +46,33 @@ $(function () { Hover over the links below to see tooltips: <div class="bd-example tooltip-demo"> - <p class="muted">Placeholder text to demonstrate some <a href="#" data-toggle="tooltip" title="Default tooltip">inline links</a> with tooltips. This is now just filler, no killer. Content placed here just to mimic the presence of <a href="#" data-toggle="tooltip" title="Another tooltip">real text</a>. And all that just to give you an idea of how tooltips would look when used in real-world situations. So hopefully you've now seen how <a href="#" data-toggle="tooltip" title="Another one here too">these tooltips on links</a> can work in practice, once you use them on <a href="#" data-toggle="tooltip" title="The last tip!">your own</a> site or project. + <p class="muted">Placeholder text to demonstrate some <a href="#" data-bs-toggle="tooltip" title="Default tooltip">inline links</a> with tooltips. This is now just filler, no killer. Content placed here just to mimic the presence of <a href="#" data-bs-toggle="tooltip" title="Another tooltip">real text</a>. And all that just to give you an idea of how tooltips would look when used in real-world situations. So hopefully you've now seen how <a href="#" data-bs-toggle="tooltip" title="Another one here too">these tooltips on links</a> can work in practice, once you use them on <a href="#" data-bs-toggle="tooltip" title="The last tip!">your own</a> site or project. </p> </div> -Hover over the buttons below to see the four tooltips directions: top, right, bottom, and left. +Hover over the buttons below to see the four tooltips directions: top, right, bottom, and left. Directions are mirrored when using Bootstrap in RTL. <div class="bd-example tooltip-demo"> <div class="bd-example-tooltips"> - <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button> - <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button> - <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button> - <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button> - <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">Tooltip with HTML</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">Tooltip on top</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" title="Tooltip on right">Tooltip on right</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" title="Tooltip on left">Tooltip on left</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">Tooltip with HTML</button> </div> </div> ```html -<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top"> +<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top"> Tooltip on top </button> -<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="right" title="Tooltip on right"> +<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" title="Tooltip on right"> Tooltip on right </button> -<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom"> +<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Tooltip on bottom"> Tooltip on bottom </button> -<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip on left"> +<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" title="Tooltip on left"> Tooltip on left </button> ``` @@ -76,11 +80,28 @@ Hover over the buttons below to see the four tooltips directions: top, right, bo And with custom HTML added: ```html -<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>"> +<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>"> Tooltip with HTML </button> ``` +With an SVG: + +<div class="bd-example tooltip-demo"> + <a href="#" class="d-inline-block" data-bs-toggle="tooltip" title="Default tooltip"> + <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 100 100"> + <rect width="100%" height="100%" fill="#563d7c"/> + <circle cx="50" cy="50" r="30" fill="#007bff"/> + </svg> + </a> +</div> + +## Sass + +### Variables + +{{< scss-docs name="tooltip-variables" file="scss/_variables.scss" >}} + ## Usage The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element. @@ -88,16 +109,20 @@ The tooltip plugin generates content and markup on demand, and by default places Trigger the tooltip via JavaScript: ```js -$('#example').tooltip(options) +var exampleEl = document.getElementById('example') +var tooltip = new bootstrap.Tooltip(exampleEl, options) ``` {{< callout warning >}} ##### Overflow `auto` and `scroll` -Tooltip position attempts to automatically change when a parent container has `overflow: auto` or `overflow: scroll` like our `.table-responsive`, but still keeps the original placement's positioning. To resolve, set the `boundary` option to anything other than default value, `'scrollParent'`, such as `'window'`: +Tooltip position attempts to automatically change when a **parent container** has `overflow: auto` or `overflow: scroll` like our `.table-responsive`, but still keeps the original placement's positioning. To resolve this, set the [`boundary` option](https://popper.js.org/docs/v2/modifiers/flip/#boundary) (for the flip modifier using the `popperConfig` option) to any HTMLElement to override the default value, `'clippingParents'`, such as `document.body`: ```js -$('#example').tooltip({ boundary: 'window' }) +var exampleEl = document.getElementById('example') +var tooltip = new bootstrap.Tooltip(exampleEl, { + boundary: document.body // or document.querySelector('#boundary') +}) ``` {{< /callout >}} @@ -113,11 +138,11 @@ You should only add tooltips to HTML elements that are traditionally keyboard-fo ```html <!-- HTML to write --> -<a href="#" data-toggle="tooltip" title="Some tooltip text!">Hover over me</a> +<a href="#" data-bs-toggle="tooltip" title="Some tooltip text!">Hover over me</a> <!-- Generated markup by the plugin --> <div class="tooltip bs-tooltip-top" role="tooltip"> - <div class="arrow"></div> + <div class="tooltip-arrow"></div> <div class="tooltip-inner"> Some tooltip text! </div> @@ -126,25 +151,25 @@ You should only add tooltips to HTML elements that are traditionally keyboard-fo ### Disabled elements -Elements with the `disabled` attribute aren't interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a workaround, you'll want to trigger the tooltip from a wrapper `<div>` or `<span>`, ideally made keyboard-focusable using `tabindex="0"`, and override the `pointer-events` on the disabled element. +Elements with the `disabled` attribute aren't interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a workaround, you'll want to trigger the tooltip from a wrapper `<div>` or `<span>`, ideally made keyboard-focusable using `tabindex="0"`. <div class="tooltip-demo"> {{< example >}} -<span class="d-inline-block" tabindex="0" data-toggle="tooltip" title="Disabled tooltip"> - <button class="btn btn-primary" style="pointer-events: none;" type="button" disabled>Disabled button</button> +<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="Disabled tooltip"> + <button class="btn btn-primary" type="button" disabled>Disabled button</button> </span> {{< /example >}} </div> ### Options -Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`. +Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-bs-`, as in `data-bs-animation=""`. Make sure to change the case type of the option name from camelCase to kebab-case when passing the options via data attributes. For example, instead of using `data-bs-customClass="beautifier"`, use `data-bs-custom-class="beautifier"`. {{< callout warning >}} -Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` options cannot be supplied using data attributes. +Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` options cannot be supplied using data attributes. {{< /callout >}} -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> <th style="width: 100px;">Name</th> @@ -155,23 +180,23 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti </thead> <tbody> <tr> - <td>animation</td> + <td><code>animation</code></td> <td>boolean</td> - <td>true</td> + <td><code>true</code></td> <td>Apply a CSS fade transition to the tooltip</td> </tr> <tr> - <td>container</td> + <td><code>container</code></td> <td>string | element | false</td> - <td>false</td> + <td><code>false</code></td> <td> <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. 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.</p> </td> </tr> <tr> - <td>delay</td> + <td><code>delay</code></td> <td>number | object</td> - <td>0</td> + <td><code>0</code></td> <td> <p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p> <p>If a number is supplied, delay is applied to both hide/show</p> @@ -179,115 +204,118 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti </td> </tr> <tr> - <td>html</td> + <td><code>html</code></td> <td>boolean</td> - <td>false</td> + <td><code>false</code></td> <td> <p>Allow HTML in the tooltip.</p> - <p>If true, HTML tags in the tooltip's <code>title</code> will be rendered in the tooltip. If false, jQuery's <code>text</code> method will be used to insert content into the DOM.</p> + <p>If true, HTML tags in the tooltip's <code>title</code> will be rendered in the tooltip. If false, <code>innerText</code> property will be used to insert content into the DOM.</p> <p>Use text if you're worried about XSS attacks.</p> </td> </tr> <tr> - <td>placement</td> + <td><code>placement</code></td> <td>string | function</td> - <td>'top'</td> + <td><code>'top'</code></td> <td> <p>How to position the tooltip - auto | top | bottom | left | right.<br>When <code>auto</code> is specified, it will dynamically reorient the tooltip.</p> <p>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 <code>this</code> context is set to the tooltip instance.</p> </td> </tr> <tr> - <td>selector</td> + <td><code>selector</code></td> <td>string | false</td> - <td>false</td> - <td>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 (<code>jQuery.on</code> support). See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/team/bootstrap/pen/qBNGbYK">an informative example</a>.</td> + <td><code>false</code></td> + <td>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 (<code>jQuery.on</code> support). See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/team/bootstrap/pen/zYBXGwX?editors=1010">an informative example</a>.</td> </tr> <tr> - <td>template</td> + <td><code>template</code></td> <td>string</td> - <td><code>'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'</code></td> + <td><code>'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'</code></td> <td> <p>Base HTML to use when creating the tooltip.</p> <p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p> - <p><code>.arrow</code> will become the tooltip's arrow.</p> + <p><code>.tooltip-arrow</code> will become the tooltip's arrow.</p> <p>The outermost wrapper element should have the <code>.tooltip</code> class and <code>role="tooltip"</code>.</p> </td> </tr> <tr> - <td>title</td> + <td><code>title</code></td> <td>string | element | function</td> - <td>''</td> + <td><code>''</code></td> <td> <p>Default title value if <code>title</code> attribute isn't present.</p> <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the tooltip is attached to.</p> </td> </tr> <tr> - <td>trigger</td> + <td><code>trigger</code></td> <td>string</td> - <td>'hover focus'</td> + <td><code>'hover focus'</code></td> <td> <p>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</p> - <p><code>'manual'</code> indicates that the tooltip will be triggered programmatically via the <code>.tooltip('show')</code>, <code>.tooltip('hide')</code> and <code>.tooltip('toggle')</code> methods; this value cannot be combined with any other trigger.</p> + <p><code>'manual'</code> indicates that the tooltip will be triggered programmatically via the <code>.show()</code>, <code>.hide()</code> and <code>.toggle()</code> methods; this value cannot be combined with any other trigger.</p> <p><code>'hover'</code> on its own will result in tooltips that cannot be triggered via the keyboard, and should only be used if alternative methods for conveying the same information for keyboard users is present.</p> </td> </tr> <tr> - <td>offset</td> - <td>number | string | function</td> - <td>0</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> + <td><code>fallbackPlacements</code></td> + <td>array</td> + <td><code>['top', 'right', 'bottom', 'left']</code></td> + <td>Define fallback placements by providing a list of placements in array (in order of preference). For more information refer to + Popper's <a href="https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements">behavior docs</a></td> </tr> <tr> - <td>fallbackPlacement</td> - <td>string | array</td> - <td>'flip'</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> + <td><code>boundary</code></td> + <td>string | element</td> + <td><code>'clippingParents'</code></td> + <td>Overflow constraint boundary of the tooltip (applies only to Popper's preventOverflow modifier). By default it's <code>'clippingParents'</code> and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's <a href="https://popper.js.org/docs/v2/utils/detect-overflow/#boundary">detectOverflow docs</a>.</td> </tr> <tr> - <td>customClass</td> + <td><code>customClass</code></td> <td>string | function</td> - <td>''</td> + <td><code>''</code></td> <td> - <p>Add classes to the tooltip when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: <code>'a b'</code>.</p> + <p>Add classes to the tooltip when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: <code>'class-1 class-2'</code>.</p> <p>You can also pass a function that should return a single string containing additional class names.</p> </td> </tr> <tr> - <td>boundary</td> - <td>string | element</td> - <td>'scrollParent'</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> - </tr> - <tr> - <td>sanitize</td> + <td><code>sanitize</code></td> <td>boolean</td> - <td>true</td> - <td>Enable or disable the sanitization. If activated <code>'template'</code> and <code>'title'</code> options will be sanitized.</td> + <td><code>true</code></td> + <td>Enable or disable the sanitization. If activated <code>'template'</code> and <code>'title'</code> options will be sanitized. See the <a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">sanitizer section in our JavaScript documentation</a>.</td> </tr> <tr> - <td>whiteList</td> + <td><code>allowList</code></td> <td>object</td> <td><a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">Default value</a></td> <td>Object which contains allowed attributes and tags</td> </tr> <tr> - <td>sanitizeFn</td> + <td><code>sanitizeFn</code></td> <td>null | function</td> - <td>null</td> + <td><code>null</code></td> <td>Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.</td> </tr> <tr> - <td>popperConfig</td> - <td>null | object</td> - <td>null</td> - <td>To change Bootstrap's default Popper config, see <a href="https://popper.js.org/docs/v1/#Popper.Defaults">Popper's configuration</a></td> + <td><code>offset</code></td> + <td>array | string | function</td> + <td><code>[0, 0]</code></td> + <td> + <p>Offset of the tooltip relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p> + <p>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: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p> + <p>For more information refer to Popper's <a href="https://popper.js.org/docs/v2/modifiers/offset/#options">offset docs</a>.</p> + </td> + </tr> + <tr> + <td><code>popperConfig</code></td> + <td>null | object | function</td> + <td><code>null</code></td> + <td> + <p>To change Bootstrap's default Popper config, see <a href="https://popper.js.org/docs/v2/constructors/#options">Popper's configuration</a>.</p> + <p>When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper.</p> + </td> </tr> </tbody> </table> @@ -298,115 +326,146 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above. {{< /callout >}} +#### Using function with `popperConfig` + +```js +var tooltip = new bootstrap.Tooltip(element, { + popperConfig: function (defaultBsPopperConfig) { + // var newPopperConfig = {...} + // use defaultBsPopperConfig if needed... + // return newPopperConfig + } +}) +``` + ### Methods {{< callout danger >}} {{< partial "callout-danger-async-methods.md" >}} {{< /callout >}} -#### `$().tooltip(options)` - -Attaches a tooltip handler to an element collection. - -#### `.tooltip('show')` +#### show Reveals an element's tooltip. **Returns to the caller before the tooltip has actually been shown** (i.e. before the `shown.bs.tooltip` event occurs). This is considered a "manual" triggering of the tooltip. Tooltips with zero-length titles are never displayed. ```js -$('#element').tooltip('show') +tooltip.show() ``` -#### `.tooltip('hide')` +#### hide Hides an element's tooltip. **Returns to the caller before the tooltip has actually been hidden** (i.e. before the `hidden.bs.tooltip` event occurs). This is considered a "manual" triggering of the tooltip. ```js -$('#element').tooltip('hide') +tooltip.hide() ``` -#### `.tooltip('toggle')` +#### toggle Toggles an element's tooltip. **Returns to the caller before the tooltip has actually been shown or hidden** (i.e. before the `shown.bs.tooltip` or `hidden.bs.tooltip` event occurs). This is considered a "manual" triggering of the tooltip. ```js -$('#element').tooltip('toggle') +tooltip.toggle() ``` -#### `.tooltip('dispose')` +#### dispose -Hides and destroys an element's tooltip. Tooltips that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements. +Hides and destroys an element's tooltip (Removes stored data on the DOM element). Tooltips that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements. ```js -$('#element').tooltip('dispose') +tooltip.dispose() ``` -#### `.tooltip('enable')` +#### enable Gives an element's tooltip the ability to be shown. **Tooltips are enabled by default.** ```js -$('#element').tooltip('enable') +tooltip.enable() ``` -#### `.tooltip('disable')` +#### disable Removes the ability for an element's tooltip to be shown. The tooltip will only be able to be shown if it is re-enabled. ```js -$('#element').tooltip('disable') +tooltip.disable() ``` -#### `.tooltip('toggleEnabled')` +#### toggleEnabled Toggles the ability for an element's tooltip to be shown or hidden. ```js -$('#element').tooltip('toggleEnabled') +tooltip.toggleEnabled() ``` -#### `.tooltip('update')` +#### update Updates the position of an element's tooltip. ```js -$('#element').tooltip('update') +tooltip.update() +``` + +#### getInstance + +*Static* method which allows you to get the tooltip instance associated with a DOM element + +```js +var exampleTriggerEl = document.getElementById('example') +var tooltip = bootstrap.Tooltip.getInstance(exampleTriggerEl) // Returns a Bootstrap tooltip instance +``` + +#### getOrCreateInstance + +*Static* method which allows you to get the tooltip instance associated with a DOM element, or create a new one in case it wasn't initialised + +```js +var exampleTriggerEl = document.getElementById('example') +var tooltip = bootstrap.Tooltip.getOrCreateInstance(exampleTriggerEl) // Returns a Bootstrap tooltip instance ``` ### Events -<table class="table table-bordered table-striped"> +<table class="table"> <thead> <tr> - <th style="width: 150px;">Event Type</th> + <th style="width: 150px;">Event type</th> <th>Description</th> </tr> </thead> <tbody> <tr> - <td>show.bs.tooltip</td> + <td><code>show.bs.tooltip</code></td> <td>This event fires immediately when the <code>show</code> instance method is called.</td> </tr> <tr> - <td>shown.bs.tooltip</td> + <td><code>shown.bs.tooltip</code></td> <td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td> </tr> <tr> - <td>hide.bs.tooltip</td> + <td><code>hide.bs.tooltip</code></td> <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td> </tr> <tr> - <td>hidden.bs.tooltip</td> + <td><code>hidden.bs.tooltip</code></td> <td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td> </tr> <tr> - <td>inserted.bs.tooltip</td> + <td><code>inserted.bs.tooltip</code></td> <td>This event is fired after the <code>show.bs.tooltip</code> event when the tooltip template has been added to the DOM.</td> </tr> </tbody> </table> ```js -$('#myTooltip').on('hidden.bs.tooltip', function () { +var myTooltipEl = document.getElementById('myTooltip') +var tooltip = new bootstrap.Tooltip(myTooltipEl) + +myTooltipEl.addEventListener('hidden.bs.tooltip', function () { // do something... }) + +tooltip.hide() ``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/content/figures.md b/vendor/twbs/bootstrap/site/content/docs/5.0/content/figures.md index 559e612ed..29a38d723 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/content/figures.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/content/figures.md @@ -3,11 +3,12 @@ layout: docs title: Figures description: Documentation and examples for displaying related images and text with the figure component in Bootstrap. group: content +toc: true --- Anytime you need to display a piece of content—like an image with an optional caption, consider using a `<figure>`. -Use the included `.figure` , `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive. +Use the included `.figure`, `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive. {{< example >}} <figure class="figure"> @@ -21,6 +22,12 @@ Aligning the figure's caption is easy with our [text utilities]({{< docsref "/ut {{< example >}} <figure class="figure"> {{< placeholder width="400" height="300" class="figure-img img-fluid rounded" >}} - <figcaption class="figure-caption text-right">A caption for the above image.</figcaption> + <figcaption class="figure-caption text-end">A caption for the above image.</figcaption> </figure> {{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="figure-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/content/images.md b/vendor/twbs/bootstrap/site/content/docs/5.0/content/images.md index 8aca90546..f1012efbf 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/content/images.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/content/images.md @@ -8,18 +8,12 @@ toc: true ## Responsive images -Images in Bootstrap are made responsive with `.img-fluid`. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element. +Images in Bootstrap are made responsive with `.img-fluid`. This applies `max-width: 100%;` and `height: auto;` to the image so that it scales with the parent element. {{< example >}} {{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="Responsive image" >}} {{< /example >}} -{{< callout warning >}} -##### SVG images and Internet Explorer - -In Internet Explorer 10 and 11, SVG images with `.img-fluid` are disproportionately sized. To fix this, add `width: 100%;` or `.w-100` where necessary. This fix improperly sizes other image formats, so Bootstrap doesn't apply it automatically. -{{< /callout >}} - ## Image thumbnails In addition to our [border-radius utilities]({{< docsref "/utilities/borders" >}}), you can use `.img-thumbnail` to give an image a rounded 1px border appearance. @@ -33,10 +27,11 @@ In addition to our [border-radius utilities]({{< docsref "/utilities/borders" >} Align images with the [helper float classes]({{< docsref "/utilities/float" >}}) or [text alignment classes]({{< docsref "/utilities/text#text-alignment" >}}). `block`-level images can be centered using [the `.mx-auto` margin utility class]({{< docsref "/utilities/spacing#horizontal-centering" >}}). {{< example >}} -{{< placeholder width="200" height="200" class="rounded float-left" >}} -{{< placeholder width="200" height="200" class="rounded float-right" >}} +{{< placeholder width="200" height="200" class="rounded float-start" >}} +{{< placeholder width="200" height="200" class="rounded float-end" >}} {{< /example >}} + {{< example >}} {{< placeholder width="200" height="200" class="rounded mx-auto d-block" >}} {{< /example >}} @@ -58,3 +53,11 @@ If you are using the `<picture>` element to specify multiple `<source>` elements <img src="..." class="img-fluid img-thumbnail" alt="..."> </picture> ``` + +## Sass + +### Variables + +Variables are available for image thumbnails. + +{{< scss-docs name="thumbnail-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/content/reboot.md b/vendor/twbs/bootstrap/site/content/docs/5.0/content/reboot.md index 4a11eb6c9..7ed1d796b 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/content/reboot.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/content/reboot.md @@ -3,7 +3,7 @@ layout: docs title: Reboot description: Reboot, a collection of element-specific CSS changes in a single file, kickstart Bootstrap to provide an elegant, consistent, and simple baseline to build upon. group: content -aliases: "/docs/4.6/content/" +aliases: "/docs/5.0/content/" toc: true --- @@ -23,20 +23,20 @@ Here are our guidelines and reasons for choosing what to override in Reboot: The `<html>` and `<body>` elements are updated to provide better page-wide defaults. More specifically: - The `box-sizing` is globally set on every element—including `*::before` and `*::after`, to `border-box`. This ensures that the declared width of element is never exceeded due to padding or border. -- No base `font-size` is declared on the `<html>`, but `16px` is assumed (the browser default). `font-size: 1rem` is applied on the `<body>` for easy responsive type-scaling via media queries while respecting user preferences and ensuring a more accessible approach. -- The `<body>` also sets a global `font-family`, `line-height`, and `text-align`. This is inherited later by some form elements to prevent font inconsistencies. + - No base `font-size` is declared on the `<html>`, but `16px` is assumed (the browser default). `font-size: 1rem` is applied on the `<body>` for easy responsive type-scaling via media queries while respecting user preferences and ensuring a more accessible approach. This browser default can be overridden by modifying the `$font-size-root` variable. +- The `<body>` also sets a global `font-family`, `font-weight`, `line-height`, and `color`. This is inherited later by some form elements to prevent font inconsistencies. - For safety, the `<body>` has a declared `background-color`, defaulting to `#fff`. ## Native font stack -The default web fonts (Helvetica Neue, Helvetica, and Arial) have been dropped in Bootstrap 4 and replaced with a "native font stack" for optimum text rendering on every device and OS. Read more about [native font stacks in this *Smashing Magazine* article](https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/). +Bootstrap utilizes a "native font stack" or "system font stack" for optimum text rendering on every device and OS. These system fonts have been designed specifically with today's devices in mind, with improved rendering on screens, variable font support, and more. Read more about [native font stacks in this *Smashing Magazine* article](https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/). ```scss $font-family-sans-serif: + // Cross-platform generic font family (default user interface font) + system-ui, // Safari for macOS and iOS (San Francisco) -apple-system, - // Chrome < 56 for macOS (San Francisco) - BlinkMacSystemFont, // Windows "Segoe UI", // Android @@ -60,7 +60,7 @@ This `font-family` is applied to the `<body>` and automatically inherited global All heading elements—e.g., `<h1>`—and `<p>` are reset to have their `margin-top` removed. Headings have `margin-bottom: .5rem` added and paragraphs `margin-bottom: 1rem` for easy spacing. -<table> +<table class="table"> <thead> <tr> <th>Heading</th> @@ -109,7 +109,7 @@ All heading elements—e.g., `<h1>`—and `<p>` are reset to have their `margin- ## Lists -All lists—`<ul>`, `<ol>`, and `<dl>`—have their `margin-top` removed and a `margin-bottom: 1rem`. Nested lists have no `margin-bottom`. +All lists—`<ul>`, `<ol>`, and `<dl>`—have their `margin-top` removed and a `margin-bottom: 1rem`. Nested lists have no `margin-bottom`. We've also reset the `padding-left` on `<ul>` and `<ol>` elements. <div class="bd-example"> {{< markdown >}} @@ -141,17 +141,48 @@ For simpler styling, clear hierarchy, and better spacing, description lists have </dl> </div> -## Preformatted text +## Inline code -The `<pre>` element is reset to remove its `margin-top` and use `rem` units for its `margin-bottom`. +Wrap inline snippets of code with `<code>`. Be sure to escape HTML angle brackets. -<div class="bd-example"> -<pre> -.example-element { - margin-bottom: 1rem; -} -</pre> -</div> +{{< example >}} +For example, <code><section></code> should be wrapped as inline. +{{< /example >}} + +## Code blocks + +Use `<pre>`s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper rendering. The `<pre>` element is reset to remove its `margin-top` and use `rem` units for its `margin-bottom`. + +{{< example >}} +<pre><code><p>Sample text here...</p> +<p>And another line of sample text here...</p> +</code></pre> +{{< /example >}} + +## Variables + +For indicating variables use the `<var>` tag. + +{{< example >}} +<var>y</var> = <var>m</var><var>x</var> + <var>b</var> +{{< /example >}} + +## User input + +Use the `<kbd>` to indicate input that is typically entered via keyboard. + +{{< example >}} +To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br> +To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd> +{{< /example >}} + +## Sample output + +For indicating sample output from a program use the `<samp>` tag. + +{{< example >}} +<samp>This text is meant to be treated as sample output from a computer program.</samp> +{{< /example >}} ## Tables @@ -214,6 +245,34 @@ These changes, and more, are demonstrated below. <input type="text" id="input" placeholder="Example input"> </p> <p> + <label for="email">Example email</label> + <input type="email" id="email" placeholder="test@example.com"> + </p> + <p> + <label for="tel">Example telephone</label> + <input type="tel" id="tel"> + </p> + <p> + <label for="url">Example url</label> + <input type="url" id="url"> + </p> + <p> + <label for="number">Example number</label> + <input type="number" id="number"> + </p> + <p> + <label for="search">Example search</label> + <input type="search" id="search"> + </p> + <p> + <label for="range">Example range</label> + <input type="range" id="range" min="0" max="10"> + </p> + <p> + <label for="file">Example file input</label> + <input type="file" id="file"> + </p> + <p> <label for="select">Example select</label> <select id="select"> <option value="">Choose...</option> @@ -262,6 +321,26 @@ These changes, and more, are demonstrated below. <input type="time" id="time"> </p> <p> + <label for="password">Example password</label> + <input type="password" id="password"> + </p> + <p> + <label for="datetime-local">Example datetime-local</label> + <input type="datetime-local" id="datetime-local"> + </p> + <p> + <label for="week">Example week</label> + <input type="week" id="week"> + </p> + <p> + <label for="month">Example month</label> + <input type="month" id="month"> + </p> + <p> + <label for="color">Example color</label> + <input type="color" id="color"> + </p> + <p> <label for="output">Example output</label> <output name="result" id="output">100</output> </p> @@ -280,6 +359,10 @@ These changes, and more, are demonstrated below. </fieldset> </form> +{{< callout warning >}} +{{< partial "callout-warning-input-support.md" >}} +{{< /callout >}} + ### Pointers on buttons Reboot includes an enhancement for `role="button"` to change the default cursor to `pointer`. Add this attribute to elements to help indicate elements are interactive. This role isn't necessary for `<button>` elements, which get their own `cursor` change. @@ -315,8 +398,8 @@ The default `margin` on blockquotes is `1em 40px`, so we reset that to `0 0 1rem <div class="bd-example"> <blockquote class="blockquote"> <p>A well-known quote, contained in a blockquote element.</p> - <footer>Someone famous in <cite title="Source Title">Source Title</cite></footer> </blockquote> + <p>Someone famous in <cite title="Source Title">Source Title</cite></p> </div> ### Inline elements @@ -345,7 +428,7 @@ The default `cursor` on summary is `text`, so we reset that to `pointer` to conv ## HTML5 `[hidden]` attribute -HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden), which is styled as `display: none` by default. Borrowing an idea from [PureCSS](https://purecss.io/), we improve upon this default by making `[hidden] { display: none !important; }` to help prevent its `display` from getting accidentally overridden. While `[hidden]` isn't natively supported by IE10, the explicit declaration in our CSS gets around that problem. +HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden), which is styled as `display: none` by default. Borrowing an idea from [PureCSS](https://purecss.io/), we improve upon this default by making `[hidden] { display: none !important; }` to help prevent its `display` from getting accidentally overridden. ```html <input type="text" hidden> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/content/tables.md b/vendor/twbs/bootstrap/site/content/docs/5.0/content/tables.md new file mode 100644 index 000000000..7ec00201b --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/content/tables.md @@ -0,0 +1,789 @@ +--- +layout: docs +title: Tables +description: Documentation and examples for opt-in styling of tables (given their prevalent use in JavaScript plugins) with Bootstrap. +group: content +toc: true +--- + +## Overview + +Due to the widespread use of `<table>` elements across third-party widgets like calendars and date pickers, Bootstrap's tables are **opt-in**. Add the base class `.table` to any `<table>`, then extend with our optional modifier classes or custom styles. All table styles are not inherited in Bootstrap, meaning any nested tables can be styled independent from the parent. + +Using the most basic table markup, here's how `.table`-based tables look in Bootstrap. + +{{< table class="table" simplified="false" >}} + +## Variants + +Use contextual classes to color tables, table rows or individual cells. + +<div class="bd-example"> + <table class="table"> + <thead> + <tr> + <th scope="col">Class</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">Default</th> + <td>Cell</td> + <td>Cell</td> + </tr> + {{< table.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <tr class="table-{{ .name }}"> + <th scope="row">{{ .name | title }}</th> + <td>Cell</td> + <td>Cell</td> + </tr> + {{- end -}} + {{< /table.inline >}} + </tbody> + </table> +</div> + +{{< highlight html >}} +<!-- On tables -->{{< table.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<table class="table-{{ .name }}">...</table> +{{- end -}} +{{< /table.inline >}} + +<!-- On rows -->{{< table.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<tr class="table-{{ .name }}">...</tr> +{{- end -}} +{{< /table.inline >}} + +<!-- On cells (`td` or `th`) --> +<tr>{{< table.inline >}} +{{- range (index $.Site.Data "theme-colors") }} + <td class="table-{{ .name }}">...</td> +{{- end -}} +{{< /table.inline >}} +</tr> +{{< /highlight >}} + +{{< callout info >}} +{{< partial "callout-warning-color-assistive-technologies.md" >}} +{{< /callout >}} + +## Accented tables + +### Striped rows + +Use `.table-striped` to add zebra-striping to any table row within the `<tbody>`. + +{{< table class="table table-striped" >}} + +These classes can also be added to table variants: + +{{< table class="table table-dark table-striped" >}} + +{{< table class="table table-success table-striped" >}} + +### Hoverable rows + +Add `.table-hover` to enable a hover state on table rows within a `<tbody>`. + +{{< table class="table table-hover" >}} + +{{< table class="table table-dark table-hover" >}} + +These hoverable rows can also be combined with the striped variant: + +{{< table class="table table-striped table-hover" >}} + +### Active tables + +Highlight a table row or cell by adding a `.table-active` class. + +<div class="bd-example"> + <table class="table"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr class="table-active"> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2" class="table-active">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> + </table> +</div> + +```html +<table class="table"> + <thead> + ... + </thead> + <tbody> + <tr class="table-active"> + ... + </tr> + <tr> + ... + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2" class="table-active">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> +</table> +``` + +<div class="bd-example"> + <table class="table table-dark"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr class="table-active"> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2" class="table-active">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> + </table> +</div> + +```html +<table class="table table-dark"> + <thead> + ... + </thead> + <tbody> + <tr class="table-active"> + ... + </tr> + <tr> + ... + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2" class="table-active">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> +</table> +``` + +## How do the variants and accented tables work? + +For the accented tables ([striped rows](#striped-rows), [hoverable rows](#hoverable-rows), and [active tables](#active-tables)), we used some techniques to make these effects work for all our [table variants](#variants): + +- We start by setting the background of a table cell with the `--bs-table-bg` custom property. All table variants then set that custom property to colorize the table cells. This way, we don't get into trouble if semi-transparent colors are used as table backgrounds. +- Then we add an inset box shadow on the table cells with `box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);` to layer on top of any specified `background-color`. Because we use a huge spread and no blur, the color will be monotone. Since `--bs-table-accent-bg` is unset by default, we don't have a default box shadow. +- When either `.table-striped`, `.table-hover` or `.table-active` classes are added, the `--bs-table-accent-bg` is set to a semitransparent color to colorize the background. +- For each table variant, we generate a `--bs-table-accent-bg` color with the highest contrast depending on that color. For example, the accent color for `.table-primary` is darker while `.table-dark` has a lighter accent color. +- Text and border colors are generated the same way, and their colors are inherited by default. + +Behind the scenes it looks like this: + +{{< scss-docs name="table-variant" file="scss/mixins/_table-variants.scss" >}} + +## Table borders + +### Bordered tables + +Add `.table-bordered` for borders on all sides of the table and cells. + +{{< table class="table table-bordered" >}} + +[Border color utilities]({{< docsref "/utilities/borders#border-color" >}}) can be added to change colors: + +{{< table class="table table-bordered border-primary" >}} + +### Tables without borders + +Add `.table-borderless` for a table without borders. + +{{< table class="table table-borderless" >}} + +{{< table class="table table-dark table-borderless" >}} + +## Small tables + +Add `.table-sm` to make any `.table` more compact by cutting all cell `padding` in half. + +{{< table class="table table-sm" >}} + +{{< table class="table table-dark table-sm" >}} + +## Vertical alignment + +Table cells of `<thead>` are always vertical aligned to the bottom. Table cells in `<tbody>` inherit their alignment from `<table>` and are aligned to the the top by default. Use the [vertical align]({{< docsref "/utilities/vertical-align" >}}) classes to re-align where needed. + +<div class="bd-example"> + <div class="table-responsive"> + <table class="table align-middle"> + <thead> + <tr> + <th scope="col" class="w-25">Heading 1</th> + <th scope="col" class="w-25">Heading 2</th> + <th scope="col" class="w-25">Heading 3</th> + <th scope="col" class="w-25">Heading 4</th> + </tr> + </thead> + <tbody> + <tr> + <td>This cell inherits <code>vertical-align: middle;</code> from the table</td> + <td>This cell inherits <code>vertical-align: middle;</code> from the table</td> + <td>This cell inherits <code>vertical-align: middle;</code> from the table</td> + <td>This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.</td> + </tr> + <tr class="align-bottom"> + <td>This cell inherits <code>vertical-align: bottom;</code> from the table row</td> + <td>This cell inherits <code>vertical-align: bottom;</code> from the table row</td> + <td>This cell inherits <code>vertical-align: bottom;</code> from the table row</td> + <td>This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.</td> + </tr> + <tr> + <td>This cell inherits <code>vertical-align: middle;</code> from the table</td> + <td>This cell inherits <code>vertical-align: middle;</code> from the table</td> + <td class="align-top">This cell is aligned to the top.</td> + <td>This here is some placeholder text, intended to take up quite a bit of vertical space, to demonstrate how the vertical alignment works in the preceding cells.</td> + </tr> + </tbody> + </table> + </div> +</div> + +```html +<div class="table-responsive"> + <table class="table align-middle"> + <thead> + <tr> + ... + </tr> + </thead> + <tbody> + <tr> + ... + </tr> + <tr class="align-bottom"> + ... + </tr> + <tr> + <td>...</td> + <td>...</td> + <td class="align-top">This cell is aligned to the top.</td> + <td>...</td> + </tr> + </tbody> + </table> +</div> +``` + +## Nesting + +Border styles, active styles, and table variants are not inherited by nested tables. + +<div class="bd-example"> +<table class="table table-striped table-bordered"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <td colspan="4"> + <table class="table mb-0"> + <thead> + <tr> + <th scope="col">Header</th> + <th scope="col">Header</th> + <th scope="col">Header</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">A</th> + <td>First</td> + <td>Last</td> + </tr> + <tr> + <th scope="row">B</th> + <td>First</td> + <td>Last</td> + </tr> + <tr> + <th scope="row">C</th> + <td>First</td> + <td>Last</td> + </tr> + </tbody> + </table> + </td> + </tr> + <tr> + <th scope="row">3</th> + <td>Larry</td> + <td>the Bird</td> + <td>@twitter</td> + </tr> + </tbody> +</table> +</div> + +```html +<table class="table table-striped"> + <thead> + ... + </thead> + <tbody> + ... + <tr> + <td colspan="4"> + <table class="table mb-0"> + ... + </table> + </td> + </tr> + ... + </tbody> +</table> +``` + +## How nesting works + +To prevent _any_ styles from leaking to nested tables, we use the child combinator (`>`) selector in our CSS. Since we need to target all the `td`s and `th`s in the `thead`, `tbody`, and `tfoot`, our selector would look pretty long without it. As such, we use the rather odd looking `.table > :not(caption) > * > *` selector to target all `td`s and `th`s of the `.table`, but none of any potential nested tables. + +Note that if you add `<tr>`s as direct children of a table, those `<tr>` will be wrapped in a `<tbody>` by default, thus making our selectors work as intended. + +## Anatomy + +### Table head + +Similar to tables and dark tables, use the modifier classes `.table-light` or `.table-dark` to make `<thead>`s appear light or dark gray. + +<div class="bd-example"> +<table class="table"> + <thead class="table-light"> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td>Larry</td> + <td>the Bird</td> + <td>@twitter</td> + </tr> + </tbody> +</table> +</div> + +```html +<table class="table"> + <thead class="table-light"> + ... + </thead> + <tbody> + ... + </tbody> +</table> +``` + +<div class="bd-example"> +<table class="table"> + <thead class="table-dark"> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td>Larry</td> + <td>the Bird</td> + <td>@twitter</td> + </tr> + </tbody> +</table> +</div> + +```html +<table class="table"> + <thead class="table-dark"> + ... + </thead> + <tbody> + ... + </tbody> +</table> +``` + +### Table foot + +<div class="bd-example"> +<table class="table"> + <thead class="table-light"> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td>Larry</td> + <td>the Bird</td> + <td>@twitter</td> + </tr> + </tbody> + <tfoot> + <tr> + <td>Footer</td> + <td>Footer</td> + <td>Footer</td> + <td>Footer</td> + </tr> + </tfoot> +</table> +</div> + +```html +<table class="table"> + <thead> + ... + </thead> + <tbody> + ... + </tbody> + <tfoot> + ... + </tfoot> +</table> +``` + +### Captions + +A `<caption>` functions like a heading for a table. It helps users with screen readers to find a table and understand what it's about and decide if they want to read it. + +<div class="bd-example"> + <table class="table"> + <caption>List of users</caption> + {{< partial "table-content.html" >}} + </table> +</div> + +```html +<table class="table table-sm"> + <caption>List of users</caption> + <thead> + ... + </thead> + <tbody> + ... + </tbody> +</table> +``` + +You can also put the `<caption>` on the top of the table with `.caption-top`. + +{{< example >}} +<table class="table caption-top"> + <caption>List of users</caption> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td>Larry</td> + <td>the Bird</td> + <td>@twitter</td> + </tr> + </tbody> +</table> +{{< /example >}} + +## Responsive tables + +Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a `.table` with `.table-responsive`. Or, pick a maximum breakpoint with which to have a responsive table up to by using `.table-responsive{-sm|-md|-lg|-xl|-xxl}`. + +{{< callout warning >}} +##### Vertical clipping/truncation + +Responsive tables make use of `overflow-y: hidden`, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets. +{{< /callout >}} + +### Always responsive + +Across every breakpoint, use `.table-responsive` for horizontally scrolling tables. + +<div class="bd-example"> + <div class="table-responsive"> + <table class="table"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + </tr> + <tr> + <th scope="row">3</th> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + </tr> + </tbody> + </table> + </div> +</div> + +```html +<div class="table-responsive"> + <table class="table"> + ... + </table> +</div> +``` + +### Breakpoint specific + +Use `.table-responsive{-sm|-md|-lg|-xl|-xxl}` as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally. + +**These tables may appear broken until their responsive styles apply at specific viewport widths.** + +{{< tables.inline >}} +{{ range $.Site.Data.breakpoints }} +{{ if not (eq . "xs") }} +<div class="bd-example"> + <div class="table-responsive{{ .abbr }}"> + <table class="table"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + </tr> + <tr> + <th scope="row">3</th> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + <td>Cell</td> + </tr> + </tbody> + </table> + </div> +</div> +{{ end -}} +{{- end -}} +{{< /tables.inline >}} + +{{< highlight html >}} +{{< tables.inline >}} +{{- range $.Site.Data.breakpoints -}} +{{- if not (eq . "xs") }} +<div class="table-responsive{{ .abbr }}"> + <table class="table"> + ... + </table> +</div> +{{ end -}} +{{- end -}} +{{< /tables.inline >}} +{{< /highlight >}} + +## Sass + +### Variables + +{{< scss-docs name="table-variables" file="scss/_variables.scss" >}} + +### Loop + +{{< scss-docs name="table-loop" file="scss/_variables.scss" >}} + +### Customizing + +- The factor variables (`$table-striped-bg-factor`, `$table-active-bg-factor` & `$table-hover-bg-factor`) are used to determine the contrast in table variants. +- Apart from the light & dark table variants, theme colors are lightened by the `$table-bg-level` variable. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/content/typography.md b/vendor/twbs/bootstrap/site/content/docs/5.0/content/typography.md index 47c9706d1..7d41f04de 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/content/typography.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/content/typography.md @@ -13,7 +13,7 @@ Bootstrap sets basic global display, typography, and link styles. When more cont - Use a [native font stack]({{< docsref "/content/reboot#native-font-stack" >}}) that selects the best `font-family` for each OS and device. - For a more inclusive and accessible type scale, we use the browser's default root `font-size` (typically 16px) so visitors can customize their browser defaults as needed. - Use the `$font-family-base`, `$font-size-base`, and `$line-height-base` attributes as our typographic base applied to the `<body>`. -- Set the global link color via `$link-color` and apply link underlines only on `:hover`. +- Set the global link color via `$link-color`. - Use `$body-bg` to set a `background-color` on the `<body>` (`#fff` by default). These styles can be found within `_reboot.scss`, and the global variables are defined in `_variables.scss`. Make sure to set `$font-size-base` in `rem`. @@ -22,7 +22,7 @@ These styles can be found within `_reboot.scss`, and the global variables are de All HTML headings, `<h1>` through `<h6>`, are available. -<table> +<table class="table"> <thead> <tr> <th>Heading</th> @@ -102,25 +102,15 @@ Use the included utility classes to recreate the small secondary heading text fr ## Display headings -Traditional heading elements are designed to work best in the meat of your page content. When you need a heading to stand out, consider using a **display heading**—a larger, slightly more opinionated heading style. Keep in mind these headings are not responsive by default, but it's possible to enable [responsive font sizes](#responsive-font-sizes). - -<div class="bd-example bd-example-type"> - <table class="table"> - <tbody> - <tr> - <td><span class="display-1">Display 1</span></td> - </tr> - <tr> - <td><span class="display-2">Display 2</span></td> - </tr> - <tr> - <td><span class="display-3">Display 3</span></td> - </tr> - <tr> - <td><span class="display-4">Display 4</span></td> - </tr> - </tbody> - </table> +Traditional heading elements are designed to work best in the meat of your page content. When you need a heading to stand out, consider using a **display heading**—a larger, slightly more opinionated heading style. + +<div class="bd-example"> + <div class="display-1 pb-3 mb-3 border-bottom">Display 1</div> + <div class="display-2 pb-3 mb-3 border-bottom">Display 2</div> + <div class="display-3 pb-3 mb-3 border-bottom">Display 3</div> + <div class="display-4 pb-3 mb-3 border-bottom">Display 4</div> + <div class="display-5 pb-3 mb-3 border-bottom">Display 5</div> + <div class="display-6">Display 6</div> </div> ```html @@ -128,8 +118,14 @@ Traditional heading elements are designed to work best in the meat of your page <h1 class="display-2">Display 2</h1> <h1 class="display-3">Display 3</h1> <h1 class="display-4">Display 4</h1> +<h1 class="display-5">Display 5</h1> +<h1 class="display-6">Display 6</h1> ``` +Display headings are configured via the `$display-font-sizes` Sass map and two variables, `$display-font-weight` and `$display-line-height`. + +{{< scss-docs name="display-headings" file="scss/_variables.scss" >}} + ## Lead Make a paragraph stand out by adding `.lead`. @@ -149,19 +145,31 @@ Styling for common inline HTML5 elements. <p><del>This line of text is meant to be treated as deleted text.</del></p> <p><s>This line of text is meant to be treated as no longer accurate.</s></p> <p><ins>This line of text is meant to be treated as an addition to the document.</ins></p> -<p><u>This line of text will render as underlined</u></p> +<p><u>This line of text will render as underlined.</u></p> <p><small>This line of text is meant to be treated as fine print.</small></p> <p><strong>This line rendered as bold text.</strong></p> <p><em>This line rendered as italicized text.</em></p> {{< /example >}} -`.mark` and `.small` classes are also available to apply the same styles as `<mark>` and `<small>` while avoiding any unwanted semantic implications that the tags would bring. +Beware that those tags should be used for semantic purpose: + +- `<mark>` represents text which is marked or highlighted for reference or notation purposes. +- `<small>` represents side-comments and small print, like copyright and legal text. +- `<s>` represents element that are no longer relevant or no longer accurate. +- `<u>` represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. + +If you want to style your text, you should use the following classes instead: -While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant to highlight words or phrases without conveying additional importance while `<i>` is mostly for voice, technical terms, etc. +- `.mark` will apply the same styles as `<mark>`. +- `.small` will apply the same styles as `<small>`. +- `.text-decoration-underline` will apply the same styles as `<u>`. +- `.text-decoration-line-through` will apply the same styles as `<s>`. + +While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant to highlight words or phrases without conveying additional importance, while `<i>` is mostly for voice, technical terms, etc. ## Text utilities -Change text alignment, transform, style, weight, and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}). +Change text alignment, transform, style, weight, line-height, decoration and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}). ## Abbreviations @@ -180,19 +188,23 @@ For quoting blocks of content from another source within your document. Wrap `<b {{< example >}} <blockquote class="blockquote"> - <p class="mb-0">A well-known quote, contained in a blockquote element.</p> + <p>A well-known quote, contained in a blockquote element.</p> </blockquote> {{< /example >}} ### Naming a source -Add a `<footer class="blockquote-footer">` for identifying the source. Wrap the name of the source work in `<cite>`. +The HTML spec requires that blockquote attribution be placed outside the `<blockquote>`. When providing attribution, wrap your `<blockquote>` in a `<figure>` and use a `<figcaption>` or a block level element (e.g., `<p>`) with the `.blockquote-footer` class. Be sure to wrap the name of the source work in `<cite>` as well. {{< example >}} -<blockquote class="blockquote"> - <p class="mb-0">A well-known quote, contained in a blockquote element.</p> - <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer> -</blockquote> +<figure> + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + </blockquote> + <figcaption class="blockquote-footer"> + Someone famous in <cite title="Source Title">Source Title</cite> + </figcaption> +</figure> {{< /example >}} ### Alignment @@ -200,17 +212,25 @@ Add a `<footer class="blockquote-footer">` for identifying the source. Wrap the Use text utilities as needed to change the alignment of your blockquote. {{< example >}} -<blockquote class="blockquote text-center"> - <p class="mb-0">>A well-known quote, contained in a blockquote element.</p> - <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer> -</blockquote> +<figure class="text-center"> + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + </blockquote> + <figcaption class="blockquote-footer"> + Someone famous in <cite title="Source Title">Source Title</cite> + </figcaption> +</figure> {{< /example >}} {{< example >}} -<blockquote class="blockquote text-right"> - <p class="mb-0">A well-known quote, contained in a blockquote element.</p> - <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer> -</blockquote> +<figure class="text-end"> + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + </blockquote> + <figcaption class="blockquote-footer"> + Someone famous in <cite title="Source Title">Source Title</cite> + </figcaption> +</figure> {{< /example >}} ## Lists @@ -281,6 +301,20 @@ Align terms and descriptions horizontally by using our grid system's predefined ## Responsive font sizes -As of v4.3.0, Bootstrap ships with the option to enable responsive font sizes, allowing text to scale more naturally across device and viewport sizes. <abbr title="Responsive font sizes">RFS</abbr> can be enabled by changing the `$enable-responsive-font-sizes` Sass variable to `true` and recompiling Bootstrap. +In Bootstrap 5, we've enabled responsive font sizes by default, allowing text to scale more naturally across device and viewport sizes. Have a look at the [RFS page]({{< docsref "/getting-started/rfs" >}}) to find out how this works. + +## Sass + +### Variables + +Headings have some dedicated variables for sizing and spacing. + +{{< scss-docs name="headings-variables" file="scss/_variables.scss" >}} + +Miscellaneous typography elements covered here and in [Reboot]({{< docsref "/content/reboot" >}}) also have dedicated variables. + +{{< scss-docs name="type-variables" file="scss/_variables.scss" >}} + +### Mixins -To support <abbr title="Responsive font sizes">RFS</abbr>, we use a Sass mixin to replace our normal `font-size` properties. Responsive font sizes will be compiled into `calc()` functions with a mix of `rem` and viewport units to enable the responsive scaling behavior. More about <abbr title="Responsive font sizes">RFS</abbr> and its configuration can be found on its [GitHub repository](https://github.com/twbs/rfs/tree/v8.0.4). +There are no dedicated mixins for typography, but Bootstrap does use [Responsive Font Sizing (RFS)]({{< docsref "/getting-started/rfs" >}}). diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/color.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/color.md new file mode 100644 index 000000000..7d1615589 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/color.md @@ -0,0 +1,108 @@ +--- +layout: docs +title: Color +description: Bootstrap is supported by an extensive color system that themes our styles and components. This enables more comprehensive customization and extension for any project. +group: customize +toc: true +--- + +## Theme colors + +We use a subset of all colors to create a smaller color palette for generating color schemes, also available as Sass variables and a Sass map in Bootstrap's `scss/_variables.scss` file. + +<div class="row"> + {{< theme-colors.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="col-md-4"> + <div class="p-3 mb-3 bg-{{ .name }} {{ if .contrast_color }}text-{{ .contrast_color }}{{ else }}text-white{{ end }}">{{ .name | title }}</div> + </div> + {{ end -}} + {{< /theme-colors.inline >}} +</div> + +All these colors are available as a Sass map, `$theme-colors`. + +{{< scss-docs name="theme-colors-map" file="scss/_variables.scss" >}} + +Check out [our Sass maps and loops docs]({{< docsref "/customize/sass#maps-and-loops" >}}) for how to modify these colors. + +## All colors + +All Bootstrap colors are available as Sass variables and a Sass map in `scss/_variables.scss` file. To avoid increased file sizes, we don't create text or background color classes for each of these variables. Instead, we choose a subset of these colors for a [theme palette](#theme-colors). + +Be sure to monitor contrast ratios as you customize colors. As shown below, we've added three contrast ratios to each of the main colors—one for the swatch's current colors, one for against white, and one for against black. + +<div class="row font-monospace"> + {{< theme-colors.inline >}} + {{- range $color := $.Site.Data.colors }} + {{- if (and (not (eq $color.name "white")) (not (eq $color.name "gray")) (not (eq $color.name "gray-dark"))) }} + <div class="col-md-4 mb-3"> + <div class="p-3 mb-2 position-relative swatch-{{ $color.name }}"> + <strong class="d-block">${{ $color.name }}</strong> + {{ $color.hex }} + </div> + {{ range (seq 100 100 900) }} + <div class="p-3 bd-{{ $color.name }}-{{ . }}">${{ $color.name }}-{{ . }}</div> + {{ end }} + </div> + {{ end -}} + {{ end -}} + + <div class="col-md-4 mb-3"> + <div class="p-3 mb-2 position-relative swatch-gray-500"> + <strong class="d-block">$gray-500</strong> + #adb5bd + </div> + {{- range $.Site.Data.grays }} + <div class="p-3 bd-gray-{{ .name }}">$gray-{{ .name }}</div> + {{ end -}} + </div> + {{< /theme-colors.inline >}} + + <div class="col-md-4 mb-3"> + <div class="p-3 mb-2 bd-black text-white"> + <strong class="d-block">$black</strong> + #000 + </div> + <div class="p-3 mb-2 bd-white border"> + <strong class="d-block">$white</strong> + #fff + </div> + </div> +</div> + +### Notes on Sass + +Sass cannot programmatically generate variables, so we manually created variables for every tint and shade ourselves. We specify the midpoint value (e.g., `$blue-500`) and use custom color functions to tint (lighten) or shade (darken) our colors via Sass's `mix()` color function. + +Using `mix()` is not the same as `lighten()` and `darken()`—the former blends the specified color with white or black, while the latter only adjusts the lightness value of each color. The result is a much more complete suite of colors, as [shown in this CodePen demo](https://codepen.io/emdeoh/pen/zYOQOPB). + +Our `tint-color()` and `shade-color()` functions use `mix()` alongside our `$theme-color-interval` variable, which specifies a stepped percentage value for each mixed color we produce. See the `scss/_functions.scss` and `scss/_variables.scss` files for the full source code. + +## Color Sass maps + +Bootstrap's source Sass files include three maps to help you quickly and easily loop over a list of colors and their hex values. + +- `$colors` lists all our available base (`500`) colors +- `$theme-colors` lists all semantically named theme colors (shown below) +- `$grays` lists all tints and shades of gray + +Within `scss/_variables.scss`, you'll find Bootstrap's color variables and Sass map. Here's an example of the `$colors` Sass map: + +{{< scss-docs name="colors-map" file="scss/_variables.scss" >}} + +Add, remove, or modify values within the map to update how they're used in many other components. Unfortunately at this time, not _every_ component utilizes this Sass map. Future updates will strive to improve upon this. Until then, plan on making use of the `${color}` variables and this Sass map. + +### Example + +Here's how you can use these in your Sass: + +```scss +.alpha { color: $purple; } +.beta { + color: $yellow-300; + background-color: $indigo-900; +} +``` + +[Color]({{< docsref "/utilities/colors" >}}) and [background]({{< docsref "/utilities/background" >}}) utility classes are also available for setting `color` and `background-color` using the `500` color values. diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/components.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/components.md new file mode 100644 index 000000000..b512a9036 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/components.md @@ -0,0 +1,77 @@ +--- +layout: docs +title: Components +description: Learn how and why we build nearly all our components responsively and with base and modifier classes. +group: customize +toc: true +--- + +## Base classes + +Bootstrap's components are largely built with a base-modifier nomenclature. We group as many shared properties as possible into a base class, like `.btn`, and then group individual styles for each variant into modifier classes, like `.btn-primary` or `.btn-success`. + +To build our modifier classes, we use Sass's `@each` loops to iterate over a Sass map. This is especially helpful for generating variants of a component by our `$theme-colors` and creating responsive variants for each breakpoint. As you customize these Sass maps and recompile, you'll automatically see your changes reflected in these loops. + +Check out [our Sass maps and loops docs]({{< docsref "/customize/sass#maps-and-loops" >}}) for how to customize these loops and extend Bootstrap's base-modifier approach to your own code. + +## Modifiers + +Many of Bootstrap's components are built with a base-modifier class approach. This means the bulk of the styling is contained to a base class (e.g., `.btn`) while style variations are confined to modifier classes (e.g., `.btn-danger`). These modifier classes are built from the `$theme-colors` map to make customizing the number and name of our modifier classes. + +Here are two examples of how we loop over the `$theme-colors` map to generate modifiers to the `.alert` and `.list-group` components. + +{{< scss-docs name="alert-modifiers" file="scss/_alert.scss" >}} + +{{< scss-docs name="list-group-modifiers" file="scss/_list-group.scss" >}} + +## Responsive + +These Sass loops aren't limited to color maps, either. You can also generate responsive variations of your components. Take for example our responsive alignment of the dropdowns where we mix an `@each` loop for the `$grid-breakpoints` Sass map with a media query include. + +{{< scss-docs name="responsive-breakpoints" file="scss/_dropdown.scss" >}} + +Should you modify your `$grid-breakpoints`, your changes will apply to all the loops iterating over that map. + +{{< scss-docs name="grid-breakpoints" file="scss/_variables.scss" >}} + +For more information and examples on how to modify our Sass maps and variables, please refer to [the Sass section of the Grid documentation]({{< docsref "/layout/grid#sass" >}}). + +## Creating your own + +We encourage you to adopt these guidelines when building with Bootstrap to create your own components. We've extended this approach ourselves to the custom components in our documentation and examples. Components like our callouts are built just like our provided components with base and modifier classes. + +<div class="bd-example"> + <div class="bd-callout my-0"> + <strong>This is a callout.</strong> We built it custom for our docs so our messages to you stand out. It has three variants via modifier classes. + </div> +</div> + +```html +<div class="callout">...</div> +``` + +In your CSS, you'd have something like the following where the bulk of the styling is done via `.callout`. Then, the unique styles between each variant is controlled via modifier class. + +```scss +// Base class +.callout {} + +// Modifier classes +.callout-info {} +.callout-warning {} +.callout-danger {} +``` + +For the callouts, that unique styling is just a `border-left-color`. When you combine that base class with one of those modifier classes, you get your complete component family: + +{{< callout info >}} +**This is an info callout.** Example text to show it in action. +{{< /callout >}} + +{{< callout warning >}} +**This is a warning callout.** Example text to show it in action. +{{< /callout >}} + +{{< callout danger >}} +**This is a danger callout.** Example text to show it in action. +{{< /callout >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md new file mode 100644 index 000000000..a2d0f33b7 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/css-variables.md @@ -0,0 +1,50 @@ +--- +layout: docs +title: CSS variables +description: Use Bootstrap's CSS custom properties for fast and forward-looking design and development. +group: customize +toc: true +--- + +Bootstrap includes around two dozen [CSS custom properties (variables)](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) in its compiled CSS, with dozens more on the way for improved customization on a per-component basis. These provide easy access to commonly used values like our theme colors, breakpoints, and primary font stacks when working in your browser's inspector, a code sandbox, or general prototyping. + +**All our custom properties are prefixed with `bs-`** to avoid conflicts with third party CSS. + +## Root variables + +Here are the variables we include (note that the `:root` is required) that can be accessed anywhere Bootstrap's CSS is loaded. They're located in our `_root.scss` file and included in our compiled dist files. + +```css +{{< root.inline >}} +{{- $css := readFile "dist/css/bootstrap.css" -}} +{{- $match := findRE ":root {([^}]*)}" $css 1 -}} + +{{- if (eq (len $match) 0) -}} +{{- errorf "Got no matches for :root in %q!" $.Page.Path -}} +{{- end -}} + +{{- index $match 0 -}} + +{{< /root.inline >}} +``` + +## Component variables + +We're also beginning to make use of custom properties as local variables for various components. This way we can reduce our compiled CSS, ensure styles aren't inherited in places like nested tables, and allow some basic restyling and extending of Bootstrap components after Sass compilation. + +Have a look at our table documentation for some [insight into how we're using CSS variables]({{< docsref "/content/tables#how-do-the-variants-and-accented-tables-work" >}}). + +We're also using CSS variables across our grids—primarily for gutters—with more component usage coming in the future. + +## Examples + +CSS variables offer similar flexibility to Sass's variables, but without the need for compilation before being served to the browser. For example, here we're resetting our page's font and link styles with CSS variables. + +```css +body { + font: 1rem/1.5 var(--bs-font-sans-serif); +} +a { + color: var(--bs-blue); +} +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/optimize.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/optimize.md new file mode 100644 index 000000000..0911667d0 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/optimize.md @@ -0,0 +1,92 @@ +--- +layout: docs +title: Optimize +description: Keep your projects lean, responsive, and maintainable so you can deliver the best experience and focus on more important jobs. +group: customize +toc: true +--- + +## Lean Sass imports + +When using Sass in your asset pipeline, make sure you optimize Bootstrap by only `@import`ing the components you need. Your largest optimizations will likely come from the `Layout & Components` section of our `bootstrap.scss`. + +{{< scss-docs name="import-stack" file="scss/bootstrap.scss" >}} + + +If you're not using a component, comment it out or delete it entirely. For example, if you're not using the carousel, remove that import to save some file size in your compiled CSS. Keep in mind there are some dependencies across Sass imports that may make it more difficult to omit a file. + +## Lean JavaScript + +Bootstrap's JavaScript includes every component in our primary dist files (`bootstrap.js` and `bootstrap.min.js`), and even our primary dependency (Popper) with our bundle files (`bootstrap.bundle.js` and `bootstrap.bundle.min.js`). While you're customizing via Sass, be sure to remove related JavaScript. + +For instance, assuming you're using your own JavaScript bundler like Webpack or Rollup, you'd only import the JavaScript you plan on using. In the example below, we show how to just include our modal JavaScript: + +```js +// Import just what we need + +// import 'bootstrap/js/dist/alert'; +// import 'bootstrap/js/dist/button'; +// import 'bootstrap/js/dist/carousel'; +// import 'bootstrap/js/dist/collapse'; +// import 'bootstrap/js/dist/dropdown'; +import 'bootstrap/js/dist/modal'; +// import 'bootstrap/js/dist/popover'; +// import 'bootstrap/js/dist/scrollspy'; +// import 'bootstrap/js/dist/tab'; +// import 'bootstrap/js/dist/toast'; +// import 'bootstrap/js/dist/tooltip'; +``` + +This way, you're not including any JavaScript you don't intend to use for components like buttons, carousels, and tooltips. If you're importing dropdowns, tooltips or popovers, be sure to list the Popper dependency in your `package.json` file. + +{{< callout info >}} +### Default Exports + +Files in `bootstrap/js/dist` use the **default export**, so if you want to use one of them you have to do the following: + +```js +import Modal from 'bootstrap/js/dist/modal' + +const modal = new Modal(document.getElementById('myModal')) +``` +{{< /callout >}} + +## Autoprefixer .browserslistrc + +Bootstrap depends on Autoprefixer to automatically add browser prefixes to certain CSS properties. Prefixes are dictated by our `.browserslistrc` file, found in the root of the Bootstrap repo. Customizing this list of browsers and recompiling the Sass will automatically remove some CSS from your compiled CSS, if there are vendor prefixes unique to that browser or version. + +## Unused CSS + +_Help wanted with this section, please consider opening a PR. Thanks!_ + +While we don't have a prebuilt example for using [PurgeCSS](https://github.com/FullHuman/purgecss) with Bootstrap, there are some helpful articles and walkthroughs that the community has written. Here are some options: + +- <https://medium.com/dwarves-foundation/remove-unused-css-styles-from-bootstrap-using-purgecss-88395a2c5772> +- <https://lukelowrey.com/automatically-removeunused-css-from-bootstrap-or-other-frameworks/> + +Lastly, this [CSS Tricks article on unused CSS](https://css-tricks.com/how-do-you-remove-unused-css-from-a-site/) shows how to use PurgeCSS and other similar tools. + +## Minify and gzip + +Whenever possible, be sure to compress all the code you serve to your visitors. If you're using Bootstrap dist files, try to stick to the minified versions (indicated by the `.min.css` and `.min.js` extensions). If you're building Bootstrap from the source with your own build system, be sure to implement your own minifiers for HTML, CSS, and JS. + +## Nonblocking files + +While minifying and using compression might seem like enough, making your files nonblocking ones is also a big step in making your site well-optimized and fast enough. + +If you are using a [Lighthouse](https://developers.google.com/web/tools/lighthouse/) plugin in Google Chrome, you may have stumbled over FCP. [The First Contentful Paint](https://web.dev/fcp/) metric measures the time from when the page starts loading to when any part of the page's content is rendered on the screen. + +You can improve FCP by deferring non-critical JavaScript or CSS. What does that mean? Simply, JavaScript or stylesheets that don't need to be present on the first paint of your page should be marked with `async` or `defer` attributes. + +This ensures that the less important resources are loaded later and not blocking the first paint. On the other hand, critical resources can be included as inline scripts or styles. + +If you want to learn more about this, there are already a lot of great articles about it: + +- <https://web.dev/render-blocking-resources/> +- <https://web.dev/defer-non-critical-css/> + +## Always use HTTPS + +Your website should only be available over HTTPS connections in production. HTTPS improves the security, privacy, and availability of all sites, and [there is no such thing as non-sensitive web traffic](https://https.cio.gov/everything/). The steps to configure your website to be served exclusively over HTTPS vary widely depending on your architecture and web hosting provider, and thus are beyond the scope of these docs. + +Sites served over HTTPS should also access all stylesheets, scripts, and other assets over HTTPS connections. Otherwise, you'll be sending users [mixed active content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content), leading to potential vulnerabilities where a site can be compromised by altering a dependency. This can lead to security issues and in-browser warnings displayed to users. Whether you're getting Bootstrap from a CDN or serving it yourself, ensure that you only access it over HTTPS connections. diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/options.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/options.md new file mode 100644 index 000000000..0d846270b --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/options.md @@ -0,0 +1,29 @@ +--- +layout: docs +title: Options +description: Quickly customize Bootstrap with built-in variables to easily toggle global CSS preferences for controlling style and behavior. +group: customize +--- + +Customize Bootstrap with our built-in custom variables file and easily toggle global CSS preferences with new `$enable-*` Sass variables. Override a variable's value and recompile with `npm run test` as needed. + +You can find and customize these variables for key global options in Bootstrap's `scss/_variables.scss` file. + +{{< bs-table "table text-start" >}} +| Variable | Values | Description | +| ------------------------------ | ---------------------------------- | -------------------------------------------------------------------------------------- | +| `$spacer` | `1rem` (default), or any value > 0 | Specifies the default spacer value to programmatically generate our [spacer utilities]({{< docsref "/utilities/spacing" >}}). | +| `$enable-rounded` | `true` (default) or `false` | Enables predefined `border-radius` styles on various components. | +| `$enable-shadows` | `true` or `false` (default) | Enables predefined decorative `box-shadow` styles on various components. Does not affect `box-shadow`s used for focus states. | +| `$enable-gradients` | `true` or `false` (default) | Enables predefined gradients via `background-image` styles on various components. | +| `$enable-transitions` | `true` (default) or `false` | Enables predefined `transition`s on various components. | +| `$enable-reduced-motion` | `true` (default) or `false` | Enables the [`prefers-reduced-motion` media query]({{< docsref "/getting-started/accessibility#reduced-motion" >}}), which suppresses certain animations/transitions based on the users' browser/operating system preferences. | +| `$enable-grid-classes` | `true` (default) or `false` | Enables the generation of CSS classes for the grid system (e.g. `.row`, `.col-md-1`, etc.). | +| `$enable-caret` | `true` (default) or `false` | Enables pseudo element caret on `.dropdown-toggle`. | +| `$enable-button-pointers` | `true` (default) or `false` | Add "hand" cursor to non-disabled button elements. | +| `$enable-rfs` | `true` (default) or `false` | Globally enables [RFS]({{< docsref "/getting-started/rfs" >}}). | +| `$enable-validation-icons` | `true` (default) or `false` | Enables `background-image` icons within textual inputs and some custom forms for validation states. | +| `$enable-negative-margins` | `true` or `false` (default) | Enables the generation of [negative margin utilities]({{< docsref "/utilities/spacing#negative-margin" >}}). | +| `$enable-deprecation-messages` | `true` (default) or `false` | Set to `false` to hide warnings when using any of the deprecated mixins and functions that are planned to be removed in `v6`. | +| `$enable-important-utilities` | `true` (default) or `false` | Enables the `!important` suffix in utility classes. | +{{< /bs-table >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/overview.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/overview.md new file mode 100644 index 000000000..9c8878e3a --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/overview.md @@ -0,0 +1,51 @@ +--- +layout: docs +title: Customize +description: Learn how to theme, customize, and extend Bootstrap with Sass, a boatload of global options, an expansive color system, and more. +group: customize +toc: false +aliases: "/docs/5.0/customize/" +sections: + - title: Sass + description: Utilize our source Sass files to take advantage of variables, maps, mixins, and functions. + - title: Options + description: Customize Bootstrap with built-in variables to easily toggle global CSS preferences. + - title: Color + description: Learn about and customize the color systems that support the entire toolkit. + - title: Components + description: Learn how we build nearly all our components responsively and with base and modifier classes. + - title: CSS variables + description: Use Bootstrap's CSS custom properties for fast and forward-looking design and development. + - title: Optimize + description: Keep your projects lean, responsive, and maintainable so you can deliver the best experience. +--- + +## Overview + +There are multiple ways to customize Bootstrap. Your best path can depend on your project, the complexity of your build tools, the version of Bootstrap you're using, browser support, and more. + +Our two preferred methods are: + +1. Using Bootstrap [via package manager]({{< docsref "/getting-started/download#package-managers" >}}) so you can use and extend our source files. +2. Using Bootstrap's compiled distribution files or [jsDelivr]({{< docsref "/getting-started/download#cdn-via-jsdelivr" >}}) so you can add onto or override Bootstrap's styles. + +While we cannot go into details here on how to use every package manager, we can give some guidance on [using Bootstrap with your own Sass compiler]({{< docsref "/customize/sass" >}}). + +For those who want to use the distribution files, review the [getting started page]({{< docsref "/getting-started/introduction" >}}) for how to include those files and an example HTML page. From there, consult the docs for the layout, components, and behaviors you'd like to use. + +As you familiarize yourself with Bootstrap, continue exploring this section for more details on how to utilize our global options, making use of and changing our color system, how we build our components, how to use our growing list of CSS custom properties, and how to optimize your code when building with Bootstrap. + +## CSPs and embedded SVGs + +Several Bootstrap components include embedded SVGs in our CSS to style components consistently and easily across browsers and devices. **For organizations with more strict <abbr title="Content Security Policy">CSP</abbr> configurations**, we've documented all instances of our embedded SVGs (all of which are applied via `background-image`) so you can more thoroughly review your options. + +- [Accordion]({{< docsref "/components/accordion" >}}) +- [Close button]({{< docsref "/components/close-button" >}}) (used in alerts and modals) +- [Form checkboxes and radio buttons]({{< docsref "/forms/checks-radios" >}}) +- [Form switches]({{< docsref "/forms/checks-radios#switches" >}}) +- [Form validation icons]({{< docsref "/forms/validation#server-side" >}}) +- [Select menus]({{< docsref "/forms/select" >}}) +- [Carousel controls]({{< docsref "/components/carousel#with-controls" >}}) +- [Navbar toggle buttons]({{< docsref "/components/navbar#responsive-behaviors" >}}) + +Based on [community conversation](https://github.com/twbs/bootstrap/issues/25394), some options for addressing this in your own codebase include replacing the URLs with locally hosted assets, removing the images and using inline images (not possible in all components), and modifying your CSP. Our recommendation is to carefully review your own security policies and decide on the best path forward, if necessary. diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/customize/sass.md b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/sass.md new file mode 100644 index 000000000..4039bd67c --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/customize/sass.md @@ -0,0 +1,298 @@ +--- +layout: docs +title: Sass +description: Utilize our source Sass files to take advantage of variables, maps, mixins, and functions to help you build faster and customize your project. +group: customize +toc: true +--- + +Utilize our source Sass files to take advantage of variables, maps, mixins, and more. + +## File structure + +Whenever possible, avoid modifying Bootstrap's core files. For Sass, that means creating your own stylesheet that imports Bootstrap so you can modify and extend it. Assuming you're using a package manager like npm, you'll have a file structure that looks like this: + +```text +your-project/ +├── scss +│ └── custom.scss +└── node_modules/ + └── bootstrap + ├── js + └── scss +``` + +If you've downloaded our source files and aren't using a package manager, you'll want to manually setup something similar to that structure, keeping Bootstrap's source files separate from your own. + +```text +your-project/ +├── scss +│ └── custom.scss +└── bootstrap/ + ├── js + └── scss +``` + +## Importing + +In your `custom.scss`, you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you need. We encourage the latter, though be aware there are some requirements and dependencies across our components. You also will need to include some JavaScript for our plugins. + +```scss +// Custom.scss +// Option A: Include all of Bootstrap + +// Include any default variable overrides here (though functions won't be available) + +@import "../node_modules/bootstrap/scss/bootstrap"; + +// Then add additional custom code here +``` + +```scss +// Custom.scss +// Option B: Include parts of Bootstrap + +// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) +@import "../node_modules/bootstrap/scss/functions"; + +// 2. Include any default variable overrides here + +// 3. Include remainder of required Bootstrap stylesheets +@import "../node_modules/bootstrap/scss/variables"; +@import "../node_modules/bootstrap/scss/mixins"; + +// 4. Include any optional Bootstrap components as you like +@import "../node_modules/bootstrap/scss/root"; +@import "../node_modules/bootstrap/scss/reboot"; +@import "../node_modules/bootstrap/scss/type"; +@import "../node_modules/bootstrap/scss/images"; +@import "../node_modules/bootstrap/scss/containers"; +@import "../node_modules/bootstrap/scss/grid"; + +// 5. Add additional custom code here +``` + +With that setup in place, you can begin to modify any of the Sass variables and maps in your `custom.scss`. You can also start to add parts of Bootstrap under the `// Optional` section as needed. We suggest using the full import stack from our `bootstrap.scss` file as your starting point. + +## Variable defaults + +Every Sass variable in Bootstrap includes the `!default` flag allowing you to override the variable's default value in your own Sass without modifying Bootstrap's source code. Copy and paste variables as needed, modify their values, and remove the `!default` flag. If a variable has already been assigned, then it won't be re-assigned by the default values in Bootstrap. + +You will find the complete list of Bootstrap's variables in `scss/_variables.scss`. Some variables are set to `null`, these variables don't output the property unless they are overridden in your configuration. + +Variable overrides must come after our functions are imported, but before the rest of the imports. + +Here's an example that changes the `background-color` and `color` for the `<body>` when importing and compiling Bootstrap via npm: + +```scss +// Required +@import "../node_modules/bootstrap/scss/functions"; + +// Default variable overrides +$body-bg: #000; +$body-color: #111; + +// Required +@import "../node_modules/bootstrap/scss/variables"; +@import "../node_modules/bootstrap/scss/mixins"; + +// Optional Bootstrap components here +@import "../node_modules/bootstrap/scss/root"; +@import "../node_modules/bootstrap/scss/reboot"; +@import "../node_modules/bootstrap/scss/type"; +// etc +``` + +Repeat as necessary for any variable in Bootstrap, including the global options below. + +{{< callout info >}} +{{< partial "callout-info-npm-starter.md" >}} +{{< /callout >}} + +## Maps and loops + +Bootstrap includes a handful of Sass maps, key value pairs that make it easier to generate families of related CSS. We use Sass maps for our colors, grid breakpoints, and more. Just like Sass variables, all Sass maps include the `!default` flag and can be overridden and extended. + +Some of our Sass maps are merged into empty ones by default. This is done to allow easy expansion of a given Sass map, but comes at the cost of making _removing_ items from a map slightly more difficult. + +### Modify map + +All variables in the `$theme-colors` map are defined as standalone variables. To modify an existing color in our `$theme-colors` map, add the following to your custom Sass file: + +```scss +$primary: #0074d9; +$danger: #ff4136; +``` + +Later on, these variables are set in Bootstrap's `$theme-colors` map: + +```scss +$theme-colors: ( + "primary": $primary, + "danger": $danger +); +``` + +### Add to map + +Add new colors to `$theme-colors`, or any other map, by creating a new Sass map with your custom values and merging it with the original map. In this case, we'll create a new `$custom-colors` map and merge it with `$theme-colors`. + +```scss +// Create your own map +$custom-colors: ( + "custom-color": #900 +); + +// Merge the maps +$theme-colors: map-merge($theme-colors, $custom-colors); +``` + +### Remove from map + +To remove colors from `$theme-colors`, or any other map, use `map-remove`. Be aware you must insert it between our requirements and options: + +```scss +// Required +@import "../node_modules/bootstrap/scss/functions"; +@import "../node_modules/bootstrap/scss/variables"; +@import "../node_modules/bootstrap/scss/mixins"; + +$theme-colors: map-remove($theme-colors, "info", "light", "dark"); + +// Optional +@import "../node_modules/bootstrap/scss/root"; +@import "../node_modules/bootstrap/scss/reboot"; +@import "../node_modules/bootstrap/scss/type"; +// etc +``` + +## Required keys + +Bootstrap assumes the presence of some specific keys within Sass maps as we used and extend these ourselves. As you customize the included maps, you may encounter errors where a specific Sass map's key is being used. + +For example, we use the `primary`, `success`, and `danger` keys from `$theme-colors` for links, buttons, and form states. Replacing the values of these keys should present no issues, but removing them may cause Sass compilation issues. In these instances, you'll need to modify the Sass code that makes use of those values. + +## Functions + +### Colors + +Next to the [Sass maps]({{< docsref "/customize/color#color-sass-maps" >}}) we have, theme colors can also be used as standalone variables, like `$primary`. + +```scss +.custom-element { + color: $gray-100; + background-color: $dark; +} +``` + +You can lighten or darken colors with Bootstrap's `tint-color()` and `shade-color()` functions. These functions will mix colors with black or white, unlike Sass' native `lighten()` and `darken()` functions which will change the lightness by a fixed amount, which often doesn't lead to the desired effect. + +{{< scss-docs name="color-functions" file="scss/_functions.scss" >}} + +In practice, you'd call the function and pass in the color and weight parameters. + +```scss +.custom-element { + color: tint-color($primary, 10%); +} + +.custom-element-2 { + color: shade-color($danger, 30%); +} +``` + +### Color contrast + +In order to meet [WCAG 2.0 accessibility standards for color contrast](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html), authors **must** provide [a contrast ratio of at least 4.5:1](https://www.w3.org/WAI/WCAG20/quickref/20160105/Overview.php#visual-audio-contrast-contrast), with very few exceptions. + +An additional function we include in Bootstrap is the color contrast function, `color-contrast`. It utilizes the [WCAG 2.0 algorithm](https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests) for calculating contrast thresholds based on [relative luminance](https://www.w3.org/WAI/GL/wiki/Relative_luminance) in a `sRGB` colorspace to automatically return a light (`#fff`), dark (`#212529`) or black (`#000`) contrast color based on the specified base color. This function is especially useful for mixins or loops where you're generating multiple classes. + +For example, to generate color swatches from our `$theme-colors` map: + +```scss +@each $color, $value in $theme-colors { + .swatch-#{$color} { + color: color-contrast($value); + } +} +``` + +It can also be used for one-off contrast needs: + +```scss +.custom-element { + color: color-contrast(#000); // returns `color: #fff` +} +``` + +You can also specify a base color with our color map functions: + +```scss +.custom-element { + color: color-contrast($dark); // returns `color: #fff` +} +``` + +### Escape SVG + +We use the `escape-svg` function to escape the `<`, `>` and `#` characters for SVG background images. When using the `escape-svg` function, data URIs must be quoted. + +### Add and Subtract functions + +We use the `add` and `subtract` functions to wrap the CSS `calc` function. The primary purpose of these functions is to avoid errors when a "unitless" `0` value is passed into a `calc` expression. Expressions like `calc(10px - 0)` will return an error in all browsers, despite being mathematically correct. + +Example where the calc is valid: + +```scss +$border-radius: .25rem; +$border-width: 1px; + +.element { + // Output calc(.25rem - 1px) is valid + border-radius: calc($border-radius - $border-width); +} + +.element { + // Output the same calc(.25rem - 1px) as above + border-radius: subtract($border-radius, $border-width); +} +``` + +Example where the calc is invalid: + +```scss +$border-radius: .25rem; +$border-width: 0; + +.element { + // Output calc(.25rem - 0) is invalid + border-radius: calc($border-radius - $border-width); +} + +.element { + // Output .25rem + border-radius: subtract($border-radius, $border-width); +} +``` + +## Mixins + +Our `scss/mixins/` directory has a ton of mixins that power parts of Bootstrap and can also be used across your own project. + +### Color schemes + +A shorthand mixin for the `prefers-color-scheme` media query is available with support for `light`, `dark`, and custom color schemes. + +{{< scss-docs name="mixin-color-scheme" file="scss/mixins/_color-scheme.scss" >}} + +```scss +.custom-element { + @include color-scheme(dark) { + // Insert dark mode styles here + } + + @include color-scheme(custom-named-scheme) { + // Insert custom color scheme styles here + } +} +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/.stylelintrc b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/.stylelintrc index dc76dedbd..dc76dedbd 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/.stylelintrc +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/.stylelintrc diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/_index.md b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/_index.md index 62a7a2a8f..3d5bfab2f 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/_index.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/_index.md @@ -7,14 +7,19 @@ aliases: "/examples/" {{< list-examples.inline >}} {{ range $entry := $.Site.Data.examples -}} - <h2>{{ $entry.category }}</h2> + <h2 id="{{ $entry.category | urlize }}">{{ $entry.category }}</h2> <p>{{ $entry.description }}</p> + {{ if eq $entry.category "RTL" -}} + <div class="bd-callout bd-callout-warning"> + <p>The RTL feature is still <strong>experimental</strong> and will probably evolve according to user feedback. Spotted something or have an improvement to suggest? <a href="{{ $.Site.Params.repo }}/issues/new">Open an issue</a>, we'd love to get your insights.</p> + </div> + {{ end -}} {{ range $i, $example := $entry.examples -}} {{- $len := len $entry.examples -}} {{ if (eq $i 0) }}<div class="row">{{ end }} <div class="col-sm-6 col-md-4 col-xl-3 mb-3"> - <a href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"> + <a class="d-block" href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/"{{ if in $example.name "RTL" }} hreflang="ar"{{ end }}> <img class="img-thumbnail mb-3" srcset="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png, /docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}@2x.png 2x" src="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png" diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/album-rtl/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/album-rtl/index.html new file mode 100644 index 000000000..3408056bc --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/album-rtl/index.html @@ -0,0 +1,209 @@ +--- +layout: examples +title: مثال الألبوم +direction: rtl +--- + +<header> + <div class="collapse bg-dark" id="navbarHeader"> + <div class="container"> + <div class="row"> + <div class="col-sm-8 col-md-7 py-4"> + <h4 class="text-white">حول</h4> + <p class="text-muted">أضف بعض المعلومات حول الألبوم، المؤلف، أو أي سياق خلفية آخر. اجعلها بضع جمل حتى يتمكن الزوار من التقاط بعض التلميحات المفيدة. ثم اربطها ببعض مواقع التواصل الاجتماعي أو معلومات الاتصال.</p> + </div> + <div class="col-sm-4 offset-md-1 py-4"> + <h4 class="text-white">تواصل معي</h4> + <ul class="list-unstyled"> + <li><a href="#" class="text-white">تابعني على تويتر</a></li> + <li><a href="#" class="text-white">شاركني الإعجاب في فيسبوك</a></li> + <li><a href="#" class="text-white">راسلني على البريد الإلكتروني</a></li> + </ul> + </div> + </div> + </div> + </div> + <div class="navbar navbar-dark bg-dark shadow-sm"> + <div class="container"> + <a href="#" class="navbar-brand d-flex align-items-center"> + <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true" class="me-2" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg> + <strong>الألبوم</strong> + </a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="تبديل التنقل"> + <span class="navbar-toggler-icon"></span> + </button> + </div> + </div> +</header> + +<main> + + <section class="py-5 text-center container"> + <div class="row py-lg-5"> + <div class="col-lg-6 col-md-8 mx-auto"> + <h1 class="fw-light">مثال الألبوم</h1> + <p class="lead text-muted">وصف قصير حول الألبوم أدناه (محتوياته ، ومنشؤه ، وما إلى ذلك). اجعله قصير ولطيف، ولكن ليست قصير جدًا حتى لا يتخطى الناس هذا الألبوم تمامًا.</p> + <p> + <a href="#" class="btn btn-primary my-2">الدعوة الرئيسية للعمل</a> + <a href="#" class="btn btn-secondary my-2">عمل ثانوي</a> + </p> + </div> + </div> + </section> + + <div class="album py-5 bg-light"> + <div class="container"> + + <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3"> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + <div class="col"> + <div class="card shadow-sm"> + {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="صورة مصغرة" >}} + <div class="card-body"> + <p class="card-text">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <div class="d-flex justify-content-between align-items-center"> + <div class="btn-group"> + <button type="button" class="btn btn-sm btn-outline-secondary">عرض</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تعديل</button> + </div> + <small class="text-muted">9 دقائق</small> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + +</main> + +<footer class="text-muted py-5"> + <div class="container"> + <p class="float-end mb-1"> + <a href="#">عد إلى الأعلى</a> + </p> + <p class="mb-1">مثال الألبوم هو © Bootstrap ، ولكن يرجى تنزيله وتخصيصه لنفسك!</p> + <p class="mb-0">جديد على Bootstrap؟ <a href="/"> تفضل بزيارة الصفحة الرئيسية </a> أو اقرأ <a href="{{< docsref "/getting-started/introduction">}} "> دليل البدء </a>.</p> + </div> +</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/album/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/album/index.html index 0ea52a795..2d25d726a 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/album/index.html +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/album/index.html @@ -1,8 +1,6 @@ --- layout: examples title: Album example -extra_css: - - "album.css" --- <header> @@ -25,37 +23,39 @@ extra_css: </div> </div> <div class="navbar navbar-dark bg-dark shadow-sm"> - <div class="container d-flex justify-content-between"> + <div class="container"> <a href="#" class="navbar-brand d-flex align-items-center"> - <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true" class="mr-2" viewBox="0 0 24 24" focusable="false"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg> + <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true" class="me-2" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg> <strong>Album</strong> </a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="Toggle navigation"> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> </div> </div> </header> -<main role="main"> +<main> - <section class="jumbotron text-center"> - <div class="container"> - <h1>Album example</h1> - <p class="lead text-muted">Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don’t simply skip over it entirely.</p> - <p> - <a href="#" class="btn btn-primary my-2">Main call to action</a> - <a href="#" class="btn btn-secondary my-2">Secondary action</a> - </p> + <section class="py-5 text-center container"> + <div class="row py-lg-5"> + <div class="col-lg-6 col-md-8 mx-auto"> + <h1 class="fw-light">Album example</h1> + <p class="lead text-muted">Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don’t simply skip over it entirely.</p> + <p> + <a href="#" class="btn btn-primary my-2">Main call to action</a> + <a href="#" class="btn btn-secondary my-2">Secondary action</a> + </p> + </div> </div> </section> <div class="album py-5 bg-light"> <div class="container"> - <div class="row"> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -69,8 +69,8 @@ extra_css: </div> </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -84,8 +84,8 @@ extra_css: </div> </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -100,8 +100,8 @@ extra_css: </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -115,8 +115,8 @@ extra_css: </div> </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -130,8 +130,8 @@ extra_css: </div> </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -146,8 +146,8 @@ extra_css: </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -161,8 +161,8 @@ extra_css: </div> </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -176,8 +176,8 @@ extra_css: </div> </div> </div> - <div class="col-md-4"> - <div class="card mb-4 shadow-sm"> + <div class="col"> + <div class="card shadow-sm"> {{< placeholder width="100%" height="225" background="#55595c" color="#eceeef" class="card-img-top" text="Thumbnail" >}} <div class="card-body"> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> @@ -197,12 +197,12 @@ extra_css: </main> -<footer class="text-muted"> +<footer class="text-muted py-5"> <div class="container"> - <p class="float-right"> + <p class="float-end mb-1"> <a href="#">Back to top</a> </p> - <p>Album example is © Bootstrap, but please download and customize it for yourself!</p> - <p>New to Bootstrap? <a href="/">Visit the homepage</a> or read our <a href="{{< docsref "/getting-started/introduction" >}}">getting started guide</a>.</p> + <p class="mb-1">Album example is © Bootstrap, but please download and customize it for yourself!</p> + <p class="mb-0">New to Bootstrap? <a href="/">Visit the homepage</a> or read our <a href="{{< docsref "/getting-started/introduction" >}}">getting started guide</a>.</p> </div> </footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog-rtl/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog-rtl/index.html new file mode 100644 index 000000000..d3b732c64 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog-rtl/index.html @@ -0,0 +1,206 @@ +--- +layout: examples +title: قالب المدونة +direction: rtl +extra_css: + - "https://fonts.googleapis.com/css?family=Amiri:wght@400;700&display=swap" + - "../blog/blog.rtl.css" +include_js: false +--- + +<div class="container"> + <header class="blog-header py-3"> + <div class="row flex-nowrap justify-content-between align-items-center"> + <div class="col-4 pt-1"> + <a class="link-secondary" href="#">الإشتراك في النشرة البريدية</a> + </div> + <div class="col-4 text-center"> + <a class="blog-header-logo text-dark" href="#">كبير</a> + </div> + <div class="col-4 d-flex justify-content-end align-items-center"> + <a class="link-secondary" href="#" aria-label="بحث"> + <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="mx-3" role="img" viewBox="0 0 24 24"><title>بحث</title><circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2"/></svg> + </a> + <a class="btn btn-sm btn-outline-secondary" href="#">إنشاء حساب</a> + </div> + </div> + </header> + + <div class="nav-scroller py-1 mb-2"> + <nav class="nav d-flex justify-content-between"> + <a class="p-2 link-secondary" href="#">العالم</a> + <a class="p-2 link-secondary" href="#">الولايات المتحدة</a> + <a class="p-2 link-secondary" href="#">التقنية</a> + <a class="p-2 link-secondary" href="#">التصميم</a> + <a class="p-2 link-secondary" href="#">الحضارة</a> + <a class="p-2 link-secondary" href="#">المال والأعمال</a> + <a class="p-2 link-secondary" href="#">السياسة</a> + <a class="p-2 link-secondary" href="#">الرأي العام</a> + <a class="p-2 link-secondary" href="#">العلوم</a> + <a class="p-2 link-secondary" href="#">الصحة</a> + <a class="p-2 link-secondary" href="#">الموضة</a> + <a class="p-2 link-secondary" href="#">السفر</a> + </nav> + </div> +</div> + +<main class="container"> + <div class="p-4 p-md-5 mb-4 text-white rounded bg-dark"> + <div class="col-md-6 px-0"> + <h1 class="display-4 fst-italic">عنوان تدوينة مميزة أطول</h1> + <p class="lead my-3">عدة أسطر نصية متعددة تعبر عن التدوية، وذلك لإعلام القراء الجدد بسرعة وكفاءة حول أكثر الأشياء إثارة للاهتمام في محتويات هذه التدوينة.</p> + <p class="lead mb-0"><a href="#" class="text-white fw-bold">أكمل القراءة...</a></p> + </div> + </div> + + <div class="row mb-2"> + <div class="col-md-6"> + <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> + <div class="col p-4 d-flex flex-column position-static"> + <strong class="d-inline-block mb-2 text-primary">العالم</strong> + <h3 class="mb-0">مشاركة مميزة</h3> + <div class="mb-1 text-muted">نوفمبر 12</div> + <p class="card-text mb-auto">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي.</p> + <a href="#" class="stretched-link">أكمل القراءة</a> + </div> + <div class="col-auto d-none d-lg-block"> + {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="صورة مصغرة" >}} + </div> + </div> + </div> + <div class="col-md-6"> + <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> + <div class="col p-4 d-flex flex-column position-static"> + <strong class="d-inline-block mb-2 text-success">التصميم</strong> + <h3 class="mb-0">عنوان الوظيفة</h3> + <div class="mb-1 text-muted">نوفمبر 11</div> + <p class="mb-auto">هذه بطاقة أوسع مع نص داعم أدناه كمقدمة طبيعية لمحتوى إضافي.</p> + <a href="#" class="stretched-link">أكمل القراءة</a> + </div> + <div class="col-auto d-none d-lg-block"> + {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="صورة مصغرة" >}} + </div> + </div> + </div> + </div> + + <div class="row"> + <div class="col-md-8"> + <h3 class="pb-4 mb-4 fst-italic border-bottom"> + من Firehose + </h3> + + <article class="blog-post"> + <h2 class="blog-post-title">مثال على تدوينة</h2> + <p class="blog-post-meta">1 يناير 2021 بواسطة <a href="#"> Mark </a></p> + + <p>تعرض مشاركة المدونة هذه بضعة أنواع مختلفة من المحتوى الذي يتم دعمه وتصميمه باستخدام Bootstrap. النصوص الأساسية، الصور، والأكواد مدعومة بشكل كامل.</p> + <hr> + <p>يشكِّل تأمين الغذاء في المستقبل قضية تؤرِّق حكومات العالَم والعلماء على حدٍّ سواء. فخلال القرن العشرين ازداد عدد سكان الأرض أربعة أضعاف، وتشير التقديرات إلى أن العدد سوف يصل إلى عشرة مليارات إنسان بحلول عام 2050م. وسوف تمثل هذه الزيادة الهائلة تحدياً كبيراً وضغطاً متصاعداً على قدرة الإنتاج الزراعي. الأمر الذي كان ولا بد من أن يدفع إلى تطوير تقنيات مبتكرة في تصنيع الغذاء غير الزراعة، منها تقنية مستقبلية تقوم على تصنيع الغذاء من الهواء.</p> + <blockquote> + <p>تشغل الزراعة مساحات كبيرة من اليابسة، وتستهلك كميات هائلة من المياه، كما أن إنتاج الغذاء بواسطة الزراعة يسهم بنسبة عالية من انبعاثات غازات الاحتباس الحراري العالمية</p> + </blockquote> + <p>تشغل الزراعة مساحات كبيرة من اليابسة، وتستهلك كميات هائلة من المياه. كما أن إنتاج الغذاء بواسطة الزراعة يسهم بنسبة عالية من انبعاثات غازات الاحتباس الحراري العالمية، وللمقارنة فإن هذه النسبة من الانبعاثات هي أكبر مما ينتجه قطاع النقل بكل ما فيه من سيارات وشاحنات وطائرات وقطارات.</p> + <h2>عنوان</h2> + <p>تحصل النباتات على غذائها بواسطة عملية تسمى البناء الضوئي، حيث تقوم النباتات بتحويل ضوء الشمس والماء وثاني أكسيد الكربون الموجود في الغلاف الجوي إلى غذاء وتطلق الأكسجين كمنتج ثانوي لهذا التفاعل الكيميائي. وتحدث هذه العملية في "البلاستيدات الخضراء". فالنباتات تستفيد من طاقة ضوء الشمس في تقسيم الماء إلى هيدروجين وأكسجين، وتحدث تفاعلات كيميائية أخرى ينتج عنها سكر الجلكوز الذي تستخدمه كمصدر للغذاء وينطلق الأكسجين من النباتات إلى الغلاف الجوي. وهذا يعني أن النباتات تحوِّل ثاني أكسيد الكربون إلى غذاء من خلال تفاعلات كيميائية معقَّدة. ويُعد البناء الضوئي من أهم التفاعلات الكيميائية على كوكب الأرض، فقد ساعد في الماضي على تطوُّر كوكبنا وظهور الحياة عليه. فالنباتات تستخدم ثاني أكسيد الكربون لصنع غذائها، وتطلق الأكسجين لتساعد الكائنات الأخرى على التنفس!</p> + <h3>عنوان فرعي</h3> + <p>ألهمت هذه العملية علماء وكالة الفضاء الأمريكية (ناسا) خلال الستينيات من القرن الماضي، لبحث فكرة إطعام روَّاد الفضاء في مهمات الفضاء الطويلة مثل السفر إلى المريخ. وكانت واحدة من الأفكار الواعدة تصنيع الغذاء عن طريق ثاني أكسيد الكربون الذي ينتجه روَّاد الفضاء، لكن ليس بواسطة النباتات بل عن طريق ميكروبات صغيرة وحيدة الخلية قادرة على حصد ثاني أكسيد الكربون لإنتاج كميات وفيرة من البروتين المغذي على شكل مسحوق عديم النكهة، كما يمكن استخدام المادة في صنع الأطعمة المألوفة لدينا.</p> + <pre><code>Example code block</code></pre> + <p>وخلافاً لما هو الحال في عالم النبات، فإن هذه الميكروبات لا تستخدم الضوء كما يحدث في عملية البناء الضوئي التي تستخدمها النباتات للحصول على الغذاء، أي لأنها قادرة على النمو في الظلام. تسمى هذه البكتريا "هيدروجينوتروف" (Hydrogenotrophs)، وهي تستخدم الهيدروجين كوقود لإنتاج الغذاء من ثاني أكسيد الكربون. فعندما يُنتج روَّاد الفضاء ثاني أكسيد الكربون، تلتقطه الميكروبات، ويتحوَّل مع مدخلات أخرى إلى غذاء غني بالكربون. وبهذه الطريقة سوف نحصل على دورة كربون مغلقة الحلقة.</p> + <h3>عنوان فرعي</h3> + <p>بعد مرور أكثر من نصف قرن على أبحاث ناسا، تعمل حالياً عدة شركات في قطاع البيولوجيا التركيبية من ضمنها إير بروتين (Air Protein) وسولار فودز (Solar Foods) على تطوير جيل جديد من المنتجات الغذائية المستدامة، من دون وجود بصمة كربونية. ولن تقتصر هذه المنتجات الغذائية على روَّاد الفضاء فحسب، بل سوف تمتد لتشمل جميع سكان الأرض، وسوف تُنتَج في فترة زمنية قصيرة، بدلاً من الشهور، ومن دون الاعتماد على الأراضي الزراعية. وهذا يعني الحصول على منتجات غذائية بشكل سريع جداً. كما سيصبح من الممكن تصنيع الغذاء بطريقة عمودية من خلال هذه الميكروبات، بدلاً من الطريقة الأفقية التقليدية الشبيهة بتقنية الزراعة العمودية الحديثة. وهذا يعني توفير منتجات غذائية أكبر من المساحة نفسها.</p> + <p>يتكوَّن الغذاء البشري من ثلاثة أنواع رئيسة، هي:</p> + <ul> + <li>البروتينات</li> + <li>الكربوهيدرات</li> + <li>الدهون</li> + </ul> + <p>وتتكوَّن البروتينات من الأحماض الأمينية، وهي مجموعة من المركبات العضوية يبلغ عددها في جسم الإنسان عشرين حمضاً أمينياً، من بينها تسعة أساسية يحصل عليها الجسم من الغذاء. وتتكوَّن الأحماض الأمينية بشكل أساس من:</p> + <ol> + <li>الكربون</li> + <li>الهيدروجين</li> + <li>الأكسجين</li> + <li>النيتروجين</li> + </ol> + <p>ومن الملاحظ أن النيتروجين يشكِّل نسبة %78 من الهواء، كما أن الهيدروجين نحصل عليه من خلال التحليل الكهربائي للماء، ومن الممكن نظرياً سحب الكربون من الهواء لتشكيل هذه الأحماض، ذلك أن الكربون هو العمود الفقري للأحماض الأمينية، كما أن الحياة على كوكب الأرض قائمة على الكربون لقدرته على تكوين سلاسل كربونية طويلة، وهذا ما تفعله الميكروبات بتصنيع أحماض أمينية من ثاني أكسيد الكربون من خلال مجموعة من التفاعلات الكيميائية المعقَّدة. وإضافة إلى صنع وجبات غنية بالبروتين، فهذه الميكروبات تنتج منتجات أخرى مثل الزيوت التي لها عديد من الاستخدامات.</p> + </article> + + <article class="blog-post"> + <h2 class="blog-post-title">تدوينة أخرى</h2> + <p class="blog-post-meta">23 ديسمبر 2020 بواسطة <a href="#">Jacob</a></p> + + <p>في الوقت الحالي، تدرس عدَّة شركات هذه الميكروبات بشكل أعمق، وتستزرعها من أجل الحصول على الغذاء. ففي عام 2019م، أعلن باحثون في شركة (Air Protein) الأمريكية نجاحهم في تحويل ثاني أكسيد الكربون الموجود في الهواء إلى لحوم صناعية مصنوعة من البروتين، التي لا تتطلَّب أي أرض زراعية، بل هي معتمدة بشكل أساسي على الهواء.</p> + <blockquote> + <p>تم تصنيع اللحوم بأنواع عديدة</p> + </blockquote> + <p>إذ استخدم هؤلاء الباحثون الهواء والطاقة المتجدِّدة كمدخلات في عملية مشابهة للتخمير، لإنتاج بروتين يحتوي على الأحماض الأمينية التسعة الأساسية وغني بالفيتامينات والمعادن، كما أنه خالٍ من الهرمونات والمضادات الحيوية والمبيدات الحشرية ومبيدات الأعشاب.</p> + <p> وتم تصنيع اللحوم بأنواع عديدة بما فيها الدواجن والأبقار والمأكولات البحرية، من دون حصول انبعاثات كربونية، على عكس تربية الأبقار التي تسهم في انبعاث غاز الميثان أحد غازات الاحتباس الحراري.</p> + </article> + + <article class="blog-post"> + <h2 class="blog-post-title">ميزة جديدة</h2> + <p class="blog-post-meta">14 ديسمبر 2020 بواسطة <a href="#">Jacob</a></p> + + <p>كما أن الشركة الفنلندية (Solar Foods) طوَّرت تقنية لإنتاج البروتين من الهواء، حيث تبدأ العملية بتقسيم الماء إلى مكوناته الهيدروجين والأكسجين عن طريق الكهرباء. فالهيدروجين يوفِّر الطاقة للبكتريا لتحويل ثاني أكسيد الكربون والنيتروجين الموجودين في الهواء إلى مادة عضوية غنية بالبروتين بشكل أكفأ من نمو النباتات باستخدام البناء الضوئي. وهذا البروتين يشبه دقيق القمح وقد أطلق عليه اسم "سولين" (Solein).</p> + <p>وتقوم الشركة حالياً بجمع البيانات حول المنتج الغذائي لتقديمه إلى الاتحاد الأوروبي بهدف الحصول على ترخيص غذائي، كما أنها تخطط لبدء الإنتاج التجاري في العام المقبل 2021م. وقد أوضحت الشركة أنها مهتمة بإنتاج أطعمة صديقة للبيئة من خلال استخدام المواد الأساسية: الكهرباء وثاني أكسيد الكربون، وهذه الأطعمة سوف تجنبنا الأثر السلبي البيئي للزراعة التقليدية الذي يشمل كل شيء من استخدام الأرض والمياه إلى الانبعاثات الناتجة من تسميد المحاصيل أو تربية الحيوانات.</p> + <p>وعلى هذا، فإن البروتينات المشتقة من الميكروبات سوف:</p> + <ul> + <li>توفر حلاً ممكناً في ظل زيادة الطلب العالمي المستقبلي على الغذاء</li> + <li>تتوسع مصانع الغذاء في المستقبل لتكون أكفأ وأكثر استدامة</li> + <li>تصبح قادرة على توفير الغذاء لروَّاد الفضاء في سفرهم إلى المريخ وجميع سكان كوكب الأرض في عام 2050م</li> + </ul> + <p>فتخيّل أن الميكروبات ستكون مصانع المستقبل، وأن غذاء المستقبل سيكون مصنوعاً من الهواء! وأن عام 2050م سيكون مختلفاً تماماً عن عالمنا اليوم. فهو عالم من دون زراعة ولا تربية حيوانات من أجل الغذاء! قد يبدو ذلك خيالياً لكنه ليس مستحيلاً!</p> + </article> + + <nav class="blog-pagination" aria-label="Pagination"> + <a class="btn btn-outline-primary" href="#">تدوينات أقدم</a> + <a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">تدوينات أحدث</a> + </nav> + + </div> + + <div class="col-md-4"> + <div class="position-sticky" style="top: 2rem;"> + <div class="p-4 mb-3 bg-light rounded"> + <h4 class="fst-italic">حول</h4> + <p class="mb-0">أقبلت، فأقبلت معك الحياة بجميع صنوفها وألوانها: فالنبات ينبت، والأشجار تورق وتزهر، والهرة تموء، والقمري يسجع، والغنم يثغو، والبقر يخور، وكل أليف يدعو أليفه. كل شيء يشعر بالحياة وينسي هموم الحياة، ولا يذكر إلا سعادة الحياة، فإن كان الزمان جسدا فأنت روحه، وإن كان عمرا فأنت شبابه.</p> + </div> + + <div class="p-4"> + <h4 class="fst-italic">الأرشيف</h4> + <ol class="list-unstyled mb-0"> + <li><a href="#">مارس 2021</a></li> + <li><a href="#">شباط 2021</a></li> + <li><a href="#">يناير 2021</a></li> + <li><a href="#">ديسمبر 2020</a></li> + <li><a href="#">نوفمبر 2020</a></li> + <li><a href="#">أكتوبر 2020</a></li> + <li><a href="#">سبتمبر 2020</a></li> + <li><a href="#">اغسطس 2020</a></li> + <li><a href="#">يوليو 2020</a></li> + <li><a href="#">يونيو 2020</a></li> + <li><a href="#">مايو 2020</a></li> + <li><a href="#">ابريل 2020</a></li> + </ol> + </div> + + <div class="p-4"> + <h4 class="fst-italic">في مكان آخر</h4> + <ol class="list-unstyled"> + <li><a href="#">GitHub</a></li> + <li><a href="#">Twitter</a></li> + <li><a href="#">Facebook</a></li> + </ol> + </div> + </div> + </div> + </div> + +</main> + +<footer class="blog-footer"> + <p>تم تصميم نموذج المدونة لـ <a href="https://getbootstrap.com/">Bootstrap</a> بواسطة <a href="https://twitter.com/mdo"><bdi lang="en" dir="ltr">@mdo</bdi></a>.</p> + <p> + <a href="#">عد إلى الأعلى</a> + </p> +</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/blog/blog.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/blog.css index dbe4183d0..437a540f6 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/blog/blog.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/blog.css @@ -6,7 +6,7 @@ } .blog-header-logo { - font-family: "Playfair Display", Georgia, "Times New Roman", serif; + font-family: "Playfair Display", Georgia, "Times New Roman", serif/*rtl:Amiri, Georgia, "Times New Roman", serif*/; font-size: 2.25rem; } @@ -15,7 +15,7 @@ } h1, h2, h3, h4, h5, h6 { - font-family: "Playfair Display", Georgia, "Times New Roman", serif; + font-family: "Playfair Display", Georgia, "Times New Roman", serif/*rtl:Amiri, Georgia, "Times New Roman", serif*/; } .display-4 { @@ -35,9 +35,7 @@ h1, h2, h3, h4, h5, h6 { } .nav-scroller .nav { - display: -ms-flexbox; display: flex; - -ms-flex-wrap: nowrap; flex-wrap: nowrap; padding-bottom: 1rem; margin-top: -1px; @@ -59,7 +57,6 @@ h1, h2, h3, h4, h5, h6 { } .flex-auto { - -ms-flex: 0 0 auto; flex: 0 0 auto; } @@ -88,7 +85,7 @@ h1, h2, h3, h4, h5, h6 { } .blog-post-meta { margin-bottom: 1.25rem; - color: #999; + color: #727272; } /* @@ -96,7 +93,7 @@ h1, h2, h3, h4, h5, h6 { */ .blog-footer { padding: 2.5rem 0; - color: #999; + color: #727272; text-align: center; background-color: #f9f9f9; border-top: .05rem solid #e5e5e5; diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/blog.rtl.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/blog.rtl.css new file mode 100644 index 000000000..35eac731f --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/blog.rtl.css @@ -0,0 +1,103 @@ +/* stylelint-disable selector-list-comma-newline-after */ + +.blog-header { + line-height: 1; + border-bottom: 1px solid #e5e5e5; +} + +.blog-header-logo { + font-family: Amiri, Georgia, "Times New Roman", serif; + font-size: 2.25rem; +} + +.blog-header-logo:hover { + text-decoration: none; +} + +h1, h2, h3, h4, h5, h6 { + font-family: Amiri, Georgia, "Times New Roman", serif; +} + +.display-4 { + font-size: 2.5rem; +} +@media (min-width: 768px) { + .display-4 { + font-size: 3rem; + } +} + +.nav-scroller { + position: relative; + z-index: 2; + height: 2.75rem; + overflow-y: hidden; +} + +.nav-scroller .nav { + display: flex; + flex-wrap: nowrap; + padding-bottom: 1rem; + margin-top: -1px; + overflow-x: auto; + text-align: center; + white-space: nowrap; + -webkit-overflow-scrolling: touch; +} + +.nav-scroller .nav-link { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: .875rem; +} + +.card-img-right { + height: 100%; + border-radius: 3px 0 0 3px; +} + +.flex-auto { + flex: 0 0 auto; +} + +.h-250 { height: 250px; } +@media (min-width: 768px) { + .h-md-250 { height: 250px; } +} + +/* Pagination */ +.blog-pagination { + margin-bottom: 4rem; +} +.blog-pagination > .btn { + border-radius: 2rem; +} + +/* + * Blog posts + */ +.blog-post { + margin-bottom: 4rem; +} +.blog-post-title { + margin-bottom: .25rem; + font-size: 2.5rem; +} +.blog-post-meta { + margin-bottom: 1.25rem; + color: #727272; +} + +/* + * Footer + */ +.blog-footer { + padding: 2.5rem 0; + color: #727272; + text-align: center; + background-color: #f9f9f9; + border-top: .05rem solid #e5e5e5; +} +.blog-footer p:last-child { + margin-bottom: 0; +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/index.html new file mode 100644 index 000000000..13c013b2c --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/blog/index.html @@ -0,0 +1,258 @@ +--- +layout: examples +title: Blog Template +extra_css: + - "https://fonts.googleapis.com/css?family=Playfair+Display:700,900&display=swap" + - "blog.css" +include_js: false +--- + +<div class="container"> + <header class="blog-header py-3"> + <div class="row flex-nowrap justify-content-between align-items-center"> + <div class="col-4 pt-1"> + <a class="link-secondary" href="#">Subscribe</a> + </div> + <div class="col-4 text-center"> + <a class="blog-header-logo text-dark" href="#">Large</a> + </div> + <div class="col-4 d-flex justify-content-end align-items-center"> + <a class="link-secondary" href="#" aria-label="Search"> + <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="mx-3" role="img" viewBox="0 0 24 24"><title>Search</title><circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2"/></svg> + </a> + <a class="btn btn-sm btn-outline-secondary" href="#">Sign up</a> + </div> + </div> + </header> + + <div class="nav-scroller py-1 mb-2"> + <nav class="nav d-flex justify-content-between"> + <a class="p-2 link-secondary" href="#">World</a> + <a class="p-2 link-secondary" href="#">U.S.</a> + <a class="p-2 link-secondary" href="#">Technology</a> + <a class="p-2 link-secondary" href="#">Design</a> + <a class="p-2 link-secondary" href="#">Culture</a> + <a class="p-2 link-secondary" href="#">Business</a> + <a class="p-2 link-secondary" href="#">Politics</a> + <a class="p-2 link-secondary" href="#">Opinion</a> + <a class="p-2 link-secondary" href="#">Science</a> + <a class="p-2 link-secondary" href="#">Health</a> + <a class="p-2 link-secondary" href="#">Style</a> + <a class="p-2 link-secondary" href="#">Travel</a> + </nav> + </div> +</div> + +<main class="container"> + <div class="p-4 p-md-5 mb-4 text-white rounded bg-dark"> + <div class="col-md-6 px-0"> + <h1 class="display-4 fst-italic">Title of a longer featured blog post</h1> + <p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p> + <p class="lead mb-0"><a href="#" class="text-white fw-bold">Continue reading...</a></p> + </div> + </div> + + <div class="row mb-2"> + <div class="col-md-6"> + <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> + <div class="col p-4 d-flex flex-column position-static"> + <strong class="d-inline-block mb-2 text-primary">World</strong> + <h3 class="mb-0">Featured post</h3> + <div class="mb-1 text-muted">Nov 12</div> + <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> + <a href="#" class="stretched-link">Continue reading</a> + </div> + <div class="col-auto d-none d-lg-block"> + {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}} + </div> + </div> + </div> + <div class="col-md-6"> + <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> + <div class="col p-4 d-flex flex-column position-static"> + <strong class="d-inline-block mb-2 text-success">Design</strong> + <h3 class="mb-0">Post title</h3> + <div class="mb-1 text-muted">Nov 11</div> + <p class="mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> + <a href="#" class="stretched-link">Continue reading</a> + </div> + <div class="col-auto d-none d-lg-block"> + {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}} + </div> + </div> + </div> + </div> + + <div class="row g-5"> + <div class="col-md-8"> + <h3 class="pb-4 mb-4 fst-italic border-bottom"> + From the Firehose + </h3> + + <article class="blog-post"> + <h2 class="blog-post-title">Sample blog post</h2> + <p class="blog-post-meta">January 1, 2021 by <a href="#">Mark</a></p> + + <p>This blog post shows a few different types of content that’s supported and styled with Bootstrap. Basic typography, lists, tables, images, code, and more are all supported as expected.</p> + <hr> + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <h2>Blockquotes</h2> + <p>This is an example blockquote in action:</p> + <blockquote class="blockquote"> + <p>Quoted text goes here.</p> + </blockquote> + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <h3>Example lists</h3> + <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout. This is an example unordered list:</p> + <ul> + <li>First list item</li> + <li>Second list item with a longer description</li> + <li>Third list item to close it out</li> + </ul> + <p>And this is an ordered list:</p> + <ol> + <li>First list item</li> + <li>Second list item with a longer description</li> + <li>Third list item to close it out</li> + </ol> + <p>And this is a definiton list:</p> + <dl> + <dt>HyperText Markup Language (HTML)</dt> + <dd>The language used to describe and define the content of a Web page</dd> + <dt>Cascading Style Sheets (CSS)</dt> + <dd>Used to describe the appearance of Web content</dd> + <dt>JavaScript (JS)</dt> + <dd>The programming language used to build advanced Web sites and applications</dd> + </dl> + <h2>Inline HTML elements</h2> + <p>HTML defines a long list of available inline tags, a complete list of which can be found on the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">Mozilla Developer Network</a>.</p> + <ul> + <li><strong>To bold text</strong>, use <code class="language-plaintext highlighter-rouge"><strong></code>.</li> + <li><em>To italicize text</em>, use <code class="language-plaintext highlighter-rouge"><em></code>.</li> + <li>Abbreviations, like <abbr title="HyperText Markup Langage">HTML</abbr> should use <code class="language-plaintext highlighter-rouge"><abbr></code>, with an optional <code class="language-plaintext highlighter-rouge">title</code> attribute for the full phrase.</li> + <li>Citations, like <cite>— Mark Otto</cite>, should use <code class="language-plaintext highlighter-rouge"><cite></code>.</li> + <li><del>Deleted</del> text should use <code class="language-plaintext highlighter-rouge"><del></code> and <ins>inserted</ins> text should use <code class="language-plaintext highlighter-rouge"><ins></code>.</li> + <li>Superscript <sup>text</sup> uses <code class="language-plaintext highlighter-rouge"><sup></code> and subscript <sub>text</sub> uses <code class="language-plaintext highlighter-rouge"><sub></code>.</li> + </ul> + <p>Most of these elements are styled by browsers with few modifications on our part.</p> + <h2>Heading</h2> + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <h3>Sub-heading</h3> + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <pre><code>Example code block</code></pre> + <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p> + </article> + + <article class="blog-post"> + <h2 class="blog-post-title">Another blog post</h2> + <p class="blog-post-meta">December 23, 2020 by <a href="#">Jacob</a></p> + + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <blockquote> + <p>Longer quote goes here, maybe with some <strong>emphasized text</strong> in the middle of it.</p> + </blockquote> + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <h3>Example table</h3> + <p>And don't forget about tables in these posts:</p> + <table class="table"> + <thead> + <tr> + <th>Name</th> + <th>Upvotes</th> + <th>Downvotes</th> + </tr> + </thead> + <tbody> + <tr> + <td>Alice</td> + <td>10</td> + <td>11</td> + </tr> + <tr> + <td>Bob</td> + <td>4</td> + <td>3</td> + </tr> + <tr> + <td>Charlie</td> + <td>7</td> + <td>9</td> + </tr> + </tbody> + <tfoot> + <tr> + <td>Totals</td> + <td>21</td> + <td>23</td> + </tr> + </tfoot> + </table> + + <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p> + </article> + + <article class="blog-post"> + <h2 class="blog-post-title">New feature</h2> + <p class="blog-post-meta">December 14, 2020 by <a href="#">Chris</a></p> + + <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> + <ul> + <li>First list item</li> + <li>Second list item with a longer description</li> + <li>Third list item to close it out</li> + </ul> + <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p> + </article> + + <nav class="blog-pagination" aria-label="Pagination"> + <a class="btn btn-outline-primary" href="#">Older</a> + <a class="btn btn-outline-secondary disabled" href="#" tabindex="-1" aria-disabled="true">Newer</a> + </nav> + + </div> + + <div class="col-md-4"> + <div class="position-sticky" style="top: 2rem;"> + <div class="p-4 mb-3 bg-light rounded"> + <h4 class="fst-italic">About</h4> + <p class="mb-0">Customize this section to tell your visitors a little bit about your publication, writers, content, or something else entirely. Totally up to you.</p> + </div> + + <div class="p-4"> + <h4 class="fst-italic">Archives</h4> + <ol class="list-unstyled mb-0"> + <li><a href="#">March 2021</a></li> + <li><a href="#">February 2021</a></li> + <li><a href="#">January 2021</a></li> + <li><a href="#">December 2020</a></li> + <li><a href="#">November 2020</a></li> + <li><a href="#">October 2020</a></li> + <li><a href="#">September 2020</a></li> + <li><a href="#">August 2020</a></li> + <li><a href="#">July 2020</a></li> + <li><a href="#">June 2020</a></li> + <li><a href="#">May 2020</a></li> + <li><a href="#">April 2020</a></li> + </ol> + </div> + + <div class="p-4"> + <h4 class="fst-italic">Elsewhere</h4> + <ol class="list-unstyled"> + <li><a href="#">GitHub</a></li> + <li><a href="#">Twitter</a></li> + <li><a href="#">Facebook</a></li> + </ol> + </div> + </div> + </div> + </div> + +</main> + +<footer class="blog-footer"> + <p>Blog template built for <a href="https://getbootstrap.com/">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p> + <p> + <a href="#">Back to top</a> + </p> +</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel-rtl/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel-rtl/index.html new file mode 100644 index 000000000..4e0285686 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel-rtl/index.html @@ -0,0 +1,167 @@ +--- +layout: examples +title: قالب شرائح العرض +direction: rtl +extra_css: + - "../carousel/carousel.rtl.css" +--- + +<header> + <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">شرائح العرض</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="تبديل التنقل"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">الصفحة الرئيسية</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">حلقة الوصل</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">رابط غير مفعل</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="بحث" aria-label="بحث"> + <button class="btn btn-outline-success" type="submit">بحث</button> + </form> + </div> + </div> + </nav> +</header> + +<main> + + <div id="myCarousel" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button> + <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button> + <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button> + </div> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}} + <div class="container"> + <div class="carousel-caption text-start"> + <h1>عنوان المثال.</h1> + <p>تشير الدراسات الإحصائية حسب الجمعية الأمريكية للغات بأن الإقبال على العربية زاد %126 في الولايات المتحدة الأمريكية وحدها بين عامي 2002 و2009م.</p> + <p><a class="btn btn-lg btn-primary" href="#">سجل اليوم</a></p> + </div> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}} + <div class="container"> + <div class="carousel-caption"> + <h1>عنوان مثال آخر.</h1> + <p>حسب المجلس الثقافي البريطاني فإن تعليم الإنجليزية داخل بريطانيا يسهم في تعزيز اقتصادها بما يتجاوز ملياري جنيه سنوياً، كما أنه وفر أكثر من 26 ألف وظيفة.</p> + <p><a class="btn btn-lg btn-primary" href="#">أعرف أكثر</a></p> + </div> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}} + <div class="container"> + <div class="carousel-caption text-end"> + <h1>واحد أكثر لقياس جيد.</h1> + <p>الإحصاءات لحجم الاستثمار اللغوي خارج بريطانيا تتفاوت من سنة لأخرى إلا أن المدير التنفيذي للمجلس الثقافي البريطاني إدي بايرز يرى أن استثمار تعليم الإنجليزية في الخارج لا يحسب على المستوى المالي فحسب بل على المستوى السياسي أيضاً.</p> + <p><a class="btn btn-lg btn-primary" href="#">تصفح المعرض</a></p> + </div> + </div> + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">السابق</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">التالي</span> + </button> + </div> + + + <!-- Marketing messaging and featurettes + ================================================== --> + <!-- Wrap the rest of the page in another container to center all the content. --> + + <div class="container marketing"> + + <!-- Three columns of text below the carousel --> + <div class="row"> + <div class="col-lg-4"> + {{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}} + <h2>عنوان</h2> + <p>تذكر دائماً أن الحاسوب لا يمتلك ذكاءً، ولكنه يكتسب الذكاء الاصطناعي من خلال ثلاثة عناصر وظيفية رئيسة، هي: القدرة على التحليل، والقدرة على التأليف، والاستدلال المنطقي.</p> + <p><a class="btn btn-secondary" href="#">عرض التفاصيل</a></p> + </div><!-- /.col-lg-4 --> + <div class="col-lg-4"> + {{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}} + <h2>عنوان آخر</h2> + <p>إذا أردنا استخدام الحاسوب الذكي في معالجة اللغة العربية فإننا نجد أنفسنا أمام تحدٍّ كبير، خاصة وأن لغتنا تمتاز بتماسك منظوماتها وتداخلها، ومع ذلك فإن الذكاء الاصطناعي يمكّننا من الحصول على أربعة أنواع من المعالجة، هي: المعالجة الصوتية، والمعالجة الصرفية، والمعالجة النحوية، والمعالجة الدلالية.</p> + <p><a class="btn btn-secondary" href="#">عرض التفاصيل</a></p> + </div><!-- /.col-lg-4 --> + <div class="col-lg-4"> + {{< placeholder width="140" height="140" background="#777" color="#777" class="rounded-circle" >}} + <h2>عنوان ثالث لتأكيد المعلومة</h2> + <p>بفضل بحوث الذكاء الاصطناعي وتقنياته استطعنا الانتقال من مرحلة التعامل مع الفيزيائي إلى مرحلة التعامل مع المنطقي، وقد انعكس هذا الانتقال بصورة إيجابية على الكيفية التي تتعامل بها الشعوب مع لغاتها الحيَّة، وهذا يعني أنه يجب أن ينعكس بصورة إيجابية على كيفية تعاملنا مع لغتنا العربية.</p> + <p><a class="btn btn-secondary" href="#">عرض التفاصيل</a></p> + </div><!-- /.col-lg-4 --> + </div><!-- /.row --> + + + <!-- START THE FEATURETTES --> + + <hr class="featurette-divider"> + + <div class="row featurette"> + <div class="col-md-7"> + <h2 class="featurette-heading">العنوان الأول المميز. <span class="text-muted"> سيذهل عقلك. </span></h2> + <p class="lead">وجه الإنسان هو جزء معقَّد ومتميِّز للغاية من جسمه. وفي الواقع، إنه أحد أكثر أنظمة الإشارات المتاحة تعقيداً لدينا؛ فهو يتضمَّن أكثر من 40 عضلة مستقلة هيكلياً ووظيفياً، بحيث يمكن تشغيل كل منها بشكل مستقل عن البعض الآخر؛ وتشكِّل أحد أقوى مؤشرات العواطف.</p> + </div> + <div class="col-md-5"> + {{< placeholder width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" >}} + </div> + </div> + + <hr class="featurette-divider"> + + <div class="row featurette"> + <div class="col-md-7 order-md-2"> + <h2 class="featurette-heading">أوه نعم، هذا جيد. <span class="text-muted"> شاهد بنفسك. </span></h2> + <p class="lead">عندما نضحك أو نبكي، فإننا نعرض عواطفنا، مما يسمح للآخرين بإلقاء نظرة خاطفة على أذهاننا أثناء "قراءة" وجوهنا بناءً على التغييرات في مكوّنات الوجه الرئيسة، مثل: العينين والحاجبين والجفنين والأنف والشفتين.</p> + </div> + <div class="col-md-5 order-md-1"> + {{< placeholder width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" >}} + </div> + </div> + + <hr class="featurette-divider"> + + <div class="row featurette"> + <div class="col-md-7"> + <h2 class="featurette-heading">وأخيرًا، هذا. <span class="text-muted"> كش ملك. </span></h2> + <p class="lead">إن جميع العضلات في أجسامنا مدعمة بالأعصاب المتصلة من كافة أنحاء الجسم بالنخاع الشوكي والدماغ. وهذا الاتصال العصبي هو ثنائي الاتجاه، أي إن العصب يتسبَّب في تقلصات العضلات بناءً على إشارات الدماغ، ويقوم في الوقت نفسه بإرسال معلومات عن حالة العضلات إلى الدماغ</p> + </div> + <div class="col-md-5"> + {{< placeholder width="500" height="500" background="#eee" color="#aaa" class="bd-placeholder-img-lg featurette-image img-fluid mx-auto" >}} + </div> + </div> + + <hr class="featurette-divider"> + + <!-- /END THE FEATURETTES --> + + </div><!-- /.container --> + + + <!-- FOOTER --> + <footer class="container"> + <p class="float-end"><a href="#">عد إلى الأعلى</a></p> + <p>© 2017–{{< year >}} Company, Inc. · <a href="#">سياسة الخصوصية</a> · <a href="#">شروط الاستخدام</a></p> + </footer> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/carousel.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/carousel.css new file mode 100644 index 000000000..f91faec76 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/carousel.css @@ -0,0 +1,93 @@ +/* GLOBAL STYLES +-------------------------------------------------- */ +/* Padding below the footer and lighter body text */ + +body { + padding-top: 3rem; + padding-bottom: 3rem; + color: #5a5a5a; +} + + +/* CUSTOMIZE THE CAROUSEL +-------------------------------------------------- */ + +/* Carousel base class */ +.carousel { + margin-bottom: 4rem; +} +/* Since positioning the image, we need to help out the caption */ +.carousel-caption { + bottom: 3rem; + z-index: 10; +} + +/* Declare heights because of positioning of img element */ +.carousel-item { + height: 32rem; +} +.carousel-item > img { + position: absolute; + top: 0; + left: 0; + min-width: 100%; + height: 32rem; +} + + +/* MARKETING CONTENT +-------------------------------------------------- */ + +/* Center align the text within the three columns below the carousel */ +.marketing .col-lg-4 { + margin-bottom: 1.5rem; + text-align: center; +} +.marketing h2 { + font-weight: 400; +} +/* rtl:begin:ignore */ +.marketing .col-lg-4 p { + margin-right: .75rem; + margin-left: .75rem; +} +/* rtl:end:ignore */ + + +/* Featurettes +------------------------- */ + +.featurette-divider { + margin: 5rem 0; /* Space out the Bootstrap <hr> more */ +} + +/* Thin out the marketing headings */ +.featurette-heading { + font-weight: 300; + line-height: 1; + /* rtl:remove */ + letter-spacing: -.05rem; +} + + +/* RESPONSIVE CSS +-------------------------------------------------- */ + +@media (min-width: 40em) { + /* Bump up size of carousel content */ + .carousel-caption p { + margin-bottom: 1.25rem; + font-size: 1.25rem; + line-height: 1.4; + } + + .featurette-heading { + font-size: 50px; + } +} + +@media (min-width: 62em) { + .featurette-heading { + margin-top: 7rem; + } +} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/carousel/carousel.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/carousel.rtl.css index 20300e90c..853640b97 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/carousel/carousel.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/carousel.rtl.css @@ -29,7 +29,7 @@ body { .carousel-item > img { position: absolute; top: 0; - left: 0; + right: 0; min-width: 100%; height: 32rem; } @@ -63,7 +63,6 @@ body { .featurette-heading { font-weight: 300; line-height: 1; - letter-spacing: -.05rem; } diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/carousel/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/index.html index 96f71f772..da5f3ab7a 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/carousel/index.html +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/carousel/index.html @@ -7,43 +7,45 @@ extra_css: <header> <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> - <a class="navbar-brand" href="#">Carousel</a> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - <div class="collapse navbar-collapse" id="navbarCollapse"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> - </li> - </ul> - <form class="form-inline mt-2 mt-md-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Carousel</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> </div> </nav> </header> -<main role="main"> +<main> - <div id="myCarousel" class="carousel slide" data-ride="carousel"> - <ol class="carousel-indicators"> - <li data-target="#myCarousel" data-slide-to="0" class="active"></li> - <li data-target="#myCarousel" data-slide-to="1"></li> - <li data-target="#myCarousel" data-slide-to="2"></li> - </ol> + <div id="myCarousel" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button> + <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button> + <button type="button" data-bs-target="#myCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button> + </div> <div class="carousel-inner"> <div class="carousel-item active"> - {{< placeholder width="100%" height="100%" background="#777" color="#777" text=" " title=" " >}} + {{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}} <div class="container"> - <div class="carousel-caption text-left"> + <div class="carousel-caption text-start"> <h1>Example headline.</h1> <p>Some representative placeholder content for the first slide of the carousel.</p> <p><a class="btn btn-lg btn-primary" href="#">Sign up today</a></p> @@ -51,7 +53,7 @@ extra_css: </div> </div> <div class="carousel-item"> - {{< placeholder width="100%" height="100%" background="#777" color="#777" text=" " title=" " >}} + {{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}} <div class="container"> <div class="carousel-caption"> <h1>Another example headline.</h1> @@ -61,9 +63,9 @@ extra_css: </div> </div> <div class="carousel-item"> - {{< placeholder width="100%" height="100%" background="#777" color="#777" text=" " title=" " >}} + {{< placeholder width="100%" height="100%" background="#777" color="#777" text="false" title="false" >}} <div class="container"> - <div class="carousel-caption text-right"> + <div class="carousel-caption text-end"> <h1>One more for good measure.</h1> <p>Some representative placeholder content for the third slide of this carousel.</p> <p><a class="btn btn-lg btn-primary" href="#">Browse gallery</a></p> @@ -71,14 +73,14 @@ extra_css: </div> </div> </div> - <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev"> + <button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> - <span class="sr-only">Previous</span> - </a> - <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next"> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> - <span class="sr-only">Next</span> - </a> + <span class="visually-hidden">Next</span> + </button> </div> @@ -158,7 +160,7 @@ extra_css: <!-- FOOTER --> <footer class="container"> - <p class="float-right"><a href="#">Back to top</a></p> - <p>© 2017-{{< year >}} Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p> + <p class="float-end"><a href="#">Back to top</a></p> + <p>© 2017–{{< year >}} Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p> </footer> </main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet-rtl/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet-rtl/index.html new file mode 100644 index 000000000..7728e5036 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet-rtl/index.html @@ -0,0 +1,1605 @@ +--- +layout: examples +title: ورقة الغش +extra_css: + - "../cheatsheet/cheatsheet.rtl.css" +extra_js: + - src: "../cheatsheet/cheatsheet.js" +body_class: "bg-light" +direction: rtl +--- + +<header class="bd-header bg-dark py-3 d-flex align-items-stretch border-bottom border-dark"> + <div class="container-fluid d-flex align-items-center"> + <h1 class="d-flex align-items-center fs-4 text-white mb-0"> + <img src="/docs/5.0/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="me-3" alt="Bootstrap"> + ورقة الغش + </h1> + <a href="{{< docsref "/examples/cheatsheet" >}}" class="ms-auto link-light" hreflang="en">جدول بيانات LTR</a> + </div> +</header> +<aside class="bd-aside sticky-xl-top text-muted align-self-start mb-3 mb-xl-5 px-2"> + <h2 class="h6 pt-4 pb-3 mb-4 border-bottom">على هذه الصفحة</h2> + <nav class="small" id="toc"> + <ul class="list-unstyled"> + <li class="my-2"> + <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#contents-collapse" aria-controls="contents-collapse">المحتوى</button> + <ul class="list-unstyled ps-3 collapse" id="contents-collapse"> + <li><a class="d-inline-flex align-items-center rounded" href="#typography">النصوص</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#images">الصور</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#tables">الجداول</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#figures">النماذج البيانية</a></li> + </ul> + </li> + <li class="my-2"> + <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#forms-collapse" aria-controls="forms-collapse">النماذج</button> + <ul class="list-unstyled ps-3 collapse" id="forms-collapse"> + <li><a class="d-inline-flex align-items-center rounded" href="#overview">نظرة عامة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#disabled-forms">الحقول المعطلة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#sizing">الأحجام</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#input-group">مجموعة الإدخال</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#floating-labels">الحقول ذوي العناوين العائمة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#validation">التحقق</a></li> + </ul> + </li> + <li class="my-2"> + <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#components-collapse" aria-controls="components-collapse">مكونات</button> + <ul class="list-unstyled ps-3 collapse" id="components-collapse"> + <li><a class="d-inline-flex align-items-center rounded" href="#accordion">المطوية</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#alerts">الإنذارات</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#badge">الشارة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#breadcrumb">مسار التنقل التفصيلي</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#buttons">الأزرار</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#button-group">مجموعة الأزرار</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#card">البطاقة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#carousel">شرائح العرض</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#dropdowns">القوائم المنسدلة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#list-group">مجموعة العناصر</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#modal">الصندوق العائم</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#navs">التنقل</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#navbar">شريط التنقل</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#pagination">ترقيم الصفحات</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#popovers">الصناديق المنبثقة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#progress">شريط التقدم</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#scrollspy">المخطوطة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#spinners">الدوائر المتحركة</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#toasts">الإشعارات</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#tooltips">التلميحات</a></li> + </ul> + </li> + </ul> + </nav> +</aside> +<div class="bd-cheatsheet container-fluid bg-body"> + <section id="content"> + <h2 class="sticky-xl-top fw-bold pt-3 pt-xl-5 pb-2 pb-xl-3">المحتوى</h2> + + <article class="my-3" id="typography"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>النصوص</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/content/typography" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <p class="display-1">العرض 1</p> + <p class="display-2">العرض 2</p> + <p class="display-3">العرض 3</p> + <p class="display-4">العرض 4</p> + <p class="display-5">العرض 5</p> + <p class="display-6">العرض 6</p> + {{< /example >}} + + {{< example show_markup="false" >}} + <p class="h1">عنوان 1</p> + <p class="h2">عنوان 2</p> + <p class="h3">عنوان 3</p> + <p class="h4">عنوان 4</p> + <p class="h5">عنوان 5</p> + <p class="h6">عنوان 6</p> + {{< /example >}} + + {{< example show_markup="false" >}} + <p class="lead"> + هذه قطعة إملائية متميزة، فهي مصممة لتكون بارزة من بين القطع الإملائية الأخرى. + </p> + {{< /example >}} + + {{< example show_markup="false" >}} + <p>يمكنك استخدام تصنيف mark <mark>لتحديد</mark> نص.</p> + <p><del>من المفترض أن يتم التعامل مع هذا السطر كنص محذوف.</del></p> + <p><s>من المفترض أن يتم التعامل مع هذا السطر على أنه لم يعد دقيقًا.</s></p> + <p><ins>من المفترض أن يتم التعامل مع هذا السطر كإضافة إلى المستند.</ins></p> + <p><u>سيتم عرض النص في هذا السطر كما وتحته خط.</u></p> + <p><small>من المفترض أن يتم التعامل مع هذا السطر على أنه يحوي تفاصيل صغيرة.</small></p> + <p><strong>هذا السطر يحوي نص عريض.</strong></p> + <p><em>هذا السطر يحوي نص مائل.</em></p> + {{< /example >}} + + {{< example show_markup="false" >}} + <blockquote class="blockquote"> + <p>إقتباس مبهر، موضوع في عنصر blockquote</p> + <footer class="blockquote-footer">شخص مشهور في <cite title= "عنوان المصدر"> عنوان المصدر </cite></footer> + </blockquote> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="list-unstyled"> + <li>هذه قائمة عناصر.</li> + <li>بالرغم من أنها مصممة كي لا تظهر كذلك.</li> + <li>إلا أنها مجهزة كـ قائمة خلف الكواليس</li> + <li>هذا التصميم ينطبق فقد على القائمة الرئيسية</li> + <li>القوائم الفرعية + <ul> + <li>لا تتأثر بهذا التصميم</li> + <li>فهي تظهر عليها علامات الترقيم</li> + <li>وتحتوي على مساحة فارغة بجوارها</li> + </ul> + </li> + <li>قد يكون هذا التصميم مفيدًا في بعض الأحيان.</li> + </ul> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="list-inline"> + <li class="list-inline-item">هذا عنصر في قائمة.</li> + <li class="list-inline-item">وهذا أيضًا.</li> + <li class="list-inline-item">لكنهم يظهرون متجاورين.</li> + </ul> + {{< /example >}} + </div> + </article> + <article class="my-3" id="images"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الصور</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/content/images" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="صورة مستجيبة" >}} + {{< /example >}} + + {{< example show_markup="false" >}} + {{< placeholder width="200" height="200" class="img-thumbnail" title="صورة عنصر نائب مربع عام مع حدود بيضاء حولها ، مما يجعلها تشبه صورة تم التقاطها بكاميرا فورية قديمة" >}} + {{< /example >}} + </div> + </article> + <article class="my-3" id="tables"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الجداول</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/content/tables" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <table class="table table-striped"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">الاسم الاول</th> + <th scope="col">الكنية</th> + <th scope="col">الاسم المستعار</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td><bdo lang="en" dir="ltr">@mdo</bdo></td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td><bdo lang="en" dir="ltr">@fat</bdo></td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2">Larry the Bird</td> + <td><bdo lang="en" dir="ltr">@twitter</bdo></td> + </tr> + </tbody> + </table> + {{< /example >}} + + {{< example show_markup="false" >}} + <table class="table table-dark table-borderless"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">الاسم الاول</th> + <th scope="col">الكنية</th> + <th scope="col">الاسم المستعار</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td><bdo lang="en" dir="ltr">@mdo</bdo></td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td><bdo lang="en" dir="ltr">@fat</bdo></td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2">Larry the Bird</td> + <td><bdo lang="en" dir="ltr">@twitter</bdo></td> + </tr> + </tbody> + </table> + {{< /example >}} + + {{< example show_markup="false" >}} + <table class="table table-hover"> + <thead> + <tr> + <th scope="col">Class</th> + <th scope="col">عنوان</th> + <th scope="col">عنوان</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">Default</th> + <td>خلية</td> + <td>خلية</td> + </tr> + {{< table.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <tr class="table-{{ .name }}"> + <th scope="row">{{ .name | title }}</th> + <td>خلية</td> + <td>خلية</td> + </tr> + {{- end -}} + {{< /table.inline >}} + </tbody> + </table> + {{< /example >}} + + {{< example show_markup="false" >}} + <table class="table table-sm table-bordered"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">الاسم الاول</th> + <th scope="col">الكنية</th> + <th scope="col">الاسم المستعار</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td><bdo lang="en" dir="ltr">@mdo</bdo></td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td><bdo lang="en" dir="ltr">@fat</bdo></td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2">Larry the Bird</td> + <td><bdo lang="en" dir="ltr">@twitter</bdo></td> + </tr> + </tbody> + </table> + {{< /example >}} + </div> + </article> + <article class="my-3" id="figures"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>النماذج البيانية</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/content/figures" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <figure class="figure"> + {{< placeholder width="400" height="300" class="figure-img img-fluid rounded" >}} + <figcaption class="figure-caption">شرح للصورة أعلاه.</figcaption> + </figure> + {{< /example >}} + </div> + </article> + </section> + + <section id="forms"> + <h2 class="sticky-xl-top fw-bold pt-3 pt-xl-5 pb-2 pb-xl-3">النماذج</h2> + + <article class="my-3" id="overview"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>نظرة عامة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/forms/overview" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form> + <div class="mb-3"> + <label for="exampleInputEmail1" class="form-label">البريد الإلكتروني</label> + <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp"> + <div id="emailHelp" class="form-text">لن نقوم بمشاركة بريدك الإلكتروني مع أي شخص آخر.</div> + </div> + <div class="mb-3"> + <label for="exampleInputPassword1" class="form-label">كلمة السر</label> + <input type="password" class="form-control" id="exampleInputPassword1"> + </div> + <div class="mb-3 form-check"> + <input type="checkbox" class="form-check-input" id="exampleCheck1"> + <label class="form-check-label" for="exampleCheck1">اخترني</label> + </div> + <fieldset class="mb-3"> + <legend>أزرار الاختيار الأحادي</legend> + <div class="form-check"> + <input type="radio" name="radios" class="form-check-input" id="exampleRadio1" checked> + <label class="form-check-label" for="exampleRadio1">الخيار الافتراضي</label> + </div> + <div class="mb-3 form-check"> + <input type="radio" name="radios" class="form-check-input" id="exampleRadio2"> + <label class="form-check-label" for="exampleRadio2">خيار آخر</label> + </div> + </fieldset> + <div class="mb-3"> + <label class="form-label" for="customFile">رفع</label> + <input type="file" class="form-control" id="customFile"> + </div> + <div class="mb-3 form-check form-switch"> + <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked> + <label class="form-check-label" for="flexSwitchCheckChecked">زر على شكل مفتاح اختيار.</label> + </div> + <div class="mb-3"> + <label for="customRange3" class="form-label">مثال على حقل اختيار نطاقي</label> + <input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange3"> + </div> + <button type="submit" class="btn btn-primary">إرسال</button> + </form> + {{< /example >}} + </div> + </article> + <article class="my-3" id="disabled-forms"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الحقول المعطلة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/forms/overview" >}}#disabled-forms">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form> + <fieldset disabled aria-label="مثال على مجموعة الحقول المعطلة"> + <div class="mb-3"> + <label for="disabledTextInput" class="form-label">حقل إدخال معطل</label> + <input type="text" id="disabledTextInput" class="form-control" placeholder="حقل إدخال معطل"> + </div> + <div class="mb-3"> + <label for="disabledSelect" class="form-label">قائمة اختيار معطلة</label> + <select id="disabledSelect" class="form-select"> + <option>خيار معطل</option> + </select> + </div> + <div class="mb-3"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="disabledFieldsetCheck" disabled> + <label class="form-check-label" for="disabledFieldsetCheck"> + زر اختيار معطل + </label> + </div> + </div> + <fieldset class="mb-3"> + <legend>أزرار اختيار أحادي معطلين</legend> + <div class="form-check"> + <input type="radio" name="radios" class="form-check-input" id="disabledRadio1" disabled> + <label class="form-check-label" for="disabledRadio1">خيار معطل</label> + </div> + <div class="mb-3 form-check"> + <input type="radio" name="radios" class="form-check-input" id="disabledRadio2" disabled> + <label class="form-check-label" for="disabledRadio2">خيار آخر معطل</label> + </div> + </fieldset> + <div class="mb-3"> + <label class="form-label" for="disabledCustomFile">رفع معطل</label> + <input type="file" class="form-control" id="disabledCustomFile" disabled> + </div> + <div class="mb-3 form-check form-switch"> + <input class="form-check-input" type="checkbox" id="disabledSwitchCheckChecked" checked disabled> + <label class="form-check-label" for="disabledSwitchCheckChecked">زر معطل على شكل مفتاح اختيار.</label> + </div> + <div class="mb-3"> + <label for="disabledRange" class="form-label">حقل اختيار نطاقي معطل</label> + <input type="range" class="form-range" min="0" max="5" step="0.5" id="disabledRange"> + </div> + <button type="submit" class="btn btn-primary">إرسال</button> + </fieldset> + </form> + {{< /example >}} + </div> + </article> + <article class="my-3" id="sizing"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الأحجام</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/forms/form-control" >}}#sizing">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="mb-3"> + <input class="form-control form-control-lg" type="text" placeholder="حقل إدخال كبير" aria-label=".form-control-lg مثال"> + </div> + <div class="mb-3"> + <select class="form-select form-select-lg mb-3" aria-label=".form-select-lg مثال"> + <option selected>افتح قائمة الاختيار هذه</option> + <option value="1">واحد</option> + <option value="2">اثنان</option> + <option value="3">ثلاثة</option> + </select> + </div> + <div class="mb-3"> + <input type="file" class="form-control form-control-lg" aria-label="مثال على إدخال ملف كبير"> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="mb-3"> + <input class="form-control form-control-sm" type="text" placeholder="حقل إدخال صغير" aria-label=".form-control-sm مثال"> + </div> + <div class="mb-3"> + <select class="form-select form-select-sm" aria-label=".form-select-sm مثال"> + <option selected>افتح قائمة الاختيار هذه</option> + <option value="1">واحد</option> + <option value="2">اثنان</option> + <option value="3">ثلاثة</option> + </select> + </div> + <div class="mb-3"> + <input type="file" class="form-control form-control-sm" aria-label="مثال على إدخال ملف صغير"> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="input-group"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>مجموعة الإدخال</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/forms/input-group" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="input-group mb-3"> + <span class="input-group-text" id="basic-addon1">أنا اسمي</span> + <input type="text" class="form-control" placeholder="فلان الفلاني" aria-label="الاسم" aria-describedby="basic-addon1"> + </div> + <div class="input-group mb-3"> + <input type="text" class="form-control" placeholder="أنا أحب الكعك والقهوة" aria-label="الطعام المفضل" aria-describedby="basic-addon2"> + <span class="input-group-text" id="basic-addon2">وغيرها</span> + </div> + <label for="basic-url" class="form-label">عنوان حسابك الشخصي</label> + <div class="input-group mb-3"> + <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"> + <span class="input-group-text" id="basic-addon3"><bdo lang="en" dir="ltr">https://example.com/users/</bdo></span> + </div> + <div class="input-group mb-3"> + <span class="input-group-text"><bdo lang="en" dir="ltr">.00</bdo></span> + <input type="text" class="form-control" aria-label="المبلغ (لأقرب دولار)"> + <span class="input-group-text">$</span> + </div> + <div class="input-group"> + <span class="input-group-text">مع textarea</span> + <textarea class="form-control" aria-label="مع textarea"></textarea> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="floating-labels"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الحقول ذوي العناوين العائمة</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/floating-labels" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form> + <div class="form-floating mb-3"> + <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> + <label for="floatingInput">البريد الالكتروني</label> + </div> + <div class="form-floating"> + <input type="password" class="form-control" id="floatingPassword" placeholder="كلمة السر"> + <label for="floatingPassword">كلمة السر</label> + </div> + </form> + {{< /example >}} + </div> + </article> + <article class="my-3" id="validation"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>التحقق</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/forms/validation" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form class="row g-3"> + <div class="col-md-4"> + <label for="validationServer01" class="form-label">الاسم الاول</label> + <input type="text" class="form-control is-valid" id="validationServer01" value="Mark" required> + <div class="valid-feedback"> + يبدو صحيحًا! + </div> + </div> + <div class="col-md-4"> + <label for="validationServer02" class="form-label">الكنية</label> + <input type="text" class="form-control is-valid" id="validationServer02" value="Otto" required> + <div class="valid-feedback"> + يبدو صحيحًا! + </div> + </div> + <div class="col-md-4"> + <label for="validationServerUsername" class="form-label">اسم المستخدم</label> + <div class="input-group has-validation"> + <input type="text" class="form-control is-invalid" id="validationServerUsername" aria-describedby="inputGroupPrepend3" required> + <span class="input-group-text" id="inputGroupPrepend3">@</span> + <div class="invalid-feedback"> + يرجى اختيار اسم مستخدم. + </div> + </div> + </div> + <div class="col-md-6"> + <label for="validationServer03" class="form-label">مدينة</label> + <input type="text" class="form-control is-invalid" id="validationServer03" required> + <div class="invalid-feedback"> + يرجى إدخال مدينة صحيحة. + </div> + </div> + <div class="col-md-3"> + <label for="validationServer04" class="form-label">حالة</label> + <select class="form-select is-invalid" id="validationServer04" required> + <option selected disabled value="">اختر...</option> + <option>...</option> + </select> + <div class="invalid-feedback"> + يرجى اختيار ولاية صحيحة. + </div> + </div> + <div class="col-md-3"> + <label for="validationServer05" class="form-label">الرمز البريدي</label> + <input type="text" class="form-control is-invalid" id="validationServer05" required> + <div class="invalid-feedback"> + يرجى إدخال رمز بريدي صحيح. + </div> + </div> + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" required> + <label class="form-check-label" for="invalidCheck3"> + أوافق على الشروط والأحكام + </label> + <div class="invalid-feedback"> + تجب الموافقة قبل إرسال النموذج. + </div> + </div> + </div> + <div class="col-12"> + <button class="btn btn-primary" type="submit">إرسال النموذج</button> + </div> + </form> + {{< /example >}} + </div> + </article> + </section> + + <section id="components"> + <h2 class="sticky-xl-top fw-bold pt-3 pt-xl-5 pb-2 pb-xl-3">العناصر</h2> + + <article class="my-3" id="accordion"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>المطوية</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/accordion" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="accordion" id="accordionExample"> + <div class="accordion-item"> + <h4 class="accordion-header" id="headingOne"> + <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> + عنصر المطوية الأول + </button> + </h4> + <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>هذا هو محتوى عنصر المطوية الأول.</strong> سيكون المحتوى مخفيًا بشكل إفتراضي حتى يقوم Bootstrap بإضافة الكلاسات اللازمة لكل عنصر في المطوية. هذه الكلاسات تتحكم بالمظهر العام ووتتحكم أيضا بإظهار وإخفاء أقسام المطوية عبر حركات CSS الإنتقالية. يمكنك تعديل أي من هذه عبر كلاسات CSS خاصة بك، او عبر تغيير القيم الإفتراضية المقدمة من Bootsrap. من الجدير بالذكر أنه يمكن وضع أي كود HTML هنا، ولكن الحركة الإنتقالية قد تحد من الoverflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h4 class="accordion-header" id="headingTwo"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> + عنصر المطوية الثاني + </button> + </h4> + <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>هذا هو محتوى عنصر المطوية الثاني.</strong> سيكون المحتوى مخفيًا بشكل إفتراضي حتى يقوم Bootstrap بإضافة الكلاسات اللازمة لكل عنصر في المطوية. هذه الكلاسات تتحكم بالمظهر العام ووتتحكم أيضا بإظهار وإخفاء أقسام المطوية عبر حركات CSS الإنتقالية. يمكنك تعديل أي من هذه عبر كلاسات CSS خاصة بك، او عبر تغيير القيم الإفتراضية المقدمة من Bootsrap. من الجدير بالذكر أنه يمكن وضع أي كود HTML هنا، ولكن الحركة الإنتقالية قد تحد من الoverflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h4 class="accordion-header" id="headingThree"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> + عنصر المطوية الثالث + </button> + </h4> + <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>هذا هو محتوى عنصر المطوية الثالث.</strong> سيكون المحتوى مخفيًا بشكل إفتراضي حتى يقوم Bootstrap بإضافة الكلاسات اللازمة لكل عنصر في المطوية. هذه الكلاسات تتحكم بالمظهر العام ووتتحكم أيضا بإظهار وإخفاء أقسام المطوية عبر حركات CSS الإنتقالية. يمكنك تعديل أي من هذه عبر كلاسات CSS خاصة بك، او عبر تغيير القيم الإفتراضية المقدمة من Bootsrap. من الجدير بالذكر أنه يمكن وضع أي كود HTML هنا، ولكن الحركة الإنتقالية قد تحد من الoverflow. + </div> + </div> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="alerts"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الإنذارات</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/alerts" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< alerts.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="alert alert-{{ .name }} alert-dismissible fade show" role="alert"> + تنبيه {{ .name }} بسيط مع <a href="#" class="alert-link">رابط مثال</a>. أعطها نقرة إذا أردت. + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="قريب"></button> + </div>{{ end -}} + {{< /alerts.inline >}} + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="alert alert-success" role="alert"> + <h4 class="alert-heading">أحسنت!</h4> + <p>لقد نجحت في قراءة رسالة التنبيه المهمة هذه. سيتم تشغيل نص المثال هذا لفترة أطول قليلاً حتى تتمكن من رؤية كيفية عمل التباعد داخل التنبيه مع هذا النوع من المحتوى.</p> + <hr> + <p class="mb-0">كلما احتجت إلى ذلك ، تأكد من استخدام أدوات الهامش للحفاظ على الأشياء لطيفة ومرتبة.</p> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="badge"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الشارة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/badge" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <p class="h1">مثال على عنوان <span class="badge bg-primary">جديد</span></p> + <p class="h2">مثال على عنوان <span class="badge bg-secondary">جديد</span></p> + <p class="h3">مثال على عنوان <span class="badge bg-success">جديد</span></p> + <p class="h4">مثال على عنوان <span class="badge bg-danger">جديد</span></p> + <p class="h5">مثال على عنوان <span class="badge bg-warning text-dark">جديد</span></p> + <p class="h6">مثال على عنوان <span class="badge bg-info text-dark">جديد</span></p> + <p class="h6">مثال على عنوان <span class="badge bg-light text-dark">جديد</span></p> + <p class="h6">مثال على عنوان <span class="badge bg-dark">جديد</span></p> + {{< /example >}} + + {{< example show_markup="false" >}} + {{< badge.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <span class="badge rounded-pill bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} + {{< /badge.inline >}} + {{< /example >}} + </div> + </article> + <article class="my-3" id="breadcrumb"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>مسار التنقل التفصيلي (فتات الخبز)</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/breadcrumb" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav aria-label="فتات الخبز"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">الصفحة الرئيسية</a></li> + <li class="breadcrumb-item"><a href="#">المكتبة</a></li> + <li class="breadcrumb-item active" aria-current="page">البيانات</li> + </ol> + </nav> + {{< /example >}} + </div> + </article> + <article class="my-3" id="buttons"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الأزرار</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/buttons" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< buttons.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <button type="button" class="btn btn-{{ .name }}">{{ .name | title }}</button> + {{- end -}} + {{< /buttons.inline >}} + + <button type="button" class="btn btn-link">رابط</button> + {{< /example >}} + + {{< example show_markup="false" >}} + {{< buttons.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <button type="button" class="btn btn-outline-{{ .name }}">{{ .name | title }}</button> + {{- end -}} + {{< /buttons.inline >}} + {{< /example >}} + + {{< example show_markup="false" >}} + <button type="button" class="btn btn-primary btn-sm">زر صغير</button> + <button type="button" class="btn btn-primary">زر قياسي</button> + <button type="button" class="btn btn-primary btn-lg">زر كبير</button> + {{< /example >}} + </div> + </article> + <article class="my-3" id="button-group"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>مجموعة الأزرار</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/button-group" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="btn-toolbar" role="toolbar" aria-label="شريط أدوات مع مجموعات أزرار"> + <div class="btn-group me-2" role="group" aria-label="المجموعة الأولى"> + <button type="button" class="btn btn-secondary">1</button> + <button type="button" class="btn btn-secondary">2</button> + <button type="button" class="btn btn-secondary">3</button> + <button type="button" class="btn btn-secondary">4</button> + </div> + <div class="btn-group me-2" role="group" aria-label="المجموعة الثانية"> + <button type="button" class="btn btn-secondary">5</button> + <button type="button" class="btn btn-secondary">6</button> + <button type="button" class="btn btn-secondary">7</button> + </div> + <div class="btn-group" role="group" aria-label="المجموعة الثالثة"> + <button type="button" class="btn btn-secondary">8</button> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="card"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>البطاقة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/card" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="row row-cols-1 row-cols-md-2 g-4"> + <div class="col"> + <div class="card"> + {{< placeholder width="100%" height="180" class="card-img-top" text="غطاء الصورة" >}} + <div class="card-body"> + <h5 class="card-title">عنوان البطاقة</h5> + <p class="card-text">بعض الأمثلة السريعة للنصوص للبناء على عنوان البطاقة وتشكيل الجزء الأكبر من محتوى البطاقة.</p> + <a href="#" class="btn btn-primary">اذهب لمكان ما</a> + </div> + </div> + </div> + <div class="col"> + <div class="card"> + <div class="card-header"> + متميز + </div> + <div class="card-body"> + <h5 class="card-title">عنوان البطاقة</h5> + <p class="card-text">بعض الأمثلة السريعة للنصوص للبناء على عنوان البطاقة وتشكيل الجزء الأكبر من محتوى البطاقة.</p> + <a href="#" class="btn btn-primary">اذهب لمكان ما</a> + </div> + <div class="card-footer text-muted"> + منذ يومان + </div> + </div> + </div> + <div class="col"> + <div class="card"> + <div class="card-body"> + <h5 class="card-title">عنوان البطاقة</h5> + <p class="card-text">بعض الأمثلة السريعة للنصوص للبناء على عنوان البطاقة وتشكيل الجزء الأكبر من محتوى البطاقة.</p> + </div> + <ul class="list-group list-group-flush"> + <li class="list-group-item">عنصر</li> + <li class="list-group-item">عنصر آخر</li> + <li class="list-group-item">عنصر ثالث</li> + </ul> + <div class="card-body"> + <a href="#" class="card-link">رابط البطاقة</a> + <a href="#" class="card-link">رابط آخر</a> + </div> + </div> + </div> + <div class="col"> + <div class="card"> + <div class="row g-0"> + <div class="col-md-4"> + {{< placeholder width="100%" height="250" text="صورة" >}} + </div> + <div class="col-md-8"> + <div class="card-body"> + <h5 class="card-title">عنوان البطاقة</h5> + <p class="card-text">هذه بطاقة أعرض مع نص داعم تحتها كمقدمة طبيعية لمحتوى إضافي. هذا المحتوى أطول قليلاً.</p> + <p class="card-text"><small class="text-muted">آخر تحديث منذ 3 دقائق</small></p> + </div> + </div> + </div> + </div> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="carousel"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>شرائح العرض</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/carousel" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="الشريحة الأولى"></button> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="الشريحة الثانية"></button> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2" aria-label="الشريحة الثالثة"></button> + </div> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="الشريحة الأولى" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>عنوان الشريحة الأولى</h5> + <p>محتوى وصفي يعبئ فراغ الشريحة الأولى.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="الشريحة الثانية" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>عنوان الشريحة الثانية</h5> + <p>محتوى وصفي يعبئ فراغ الشريحة الأولى.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="الشريحة الثالثة" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>عنوان الشريحة الثالثة</h5> + <p>محتوى وصفي يعبئ فراغ الشريحة الأولى.</p> + </div> + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">السابق</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">التالي</span> + </button> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="dropdowns"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>القوائم المنسدلة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/dropdowns" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="btn-group w-100 align-items-center justify-content-between flex-wrap"> + <div class="dropdown"> + <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButtonSM" data-bs-toggle="dropdown" aria-expanded="false"> + زر القائمة المنسدلة + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButtonSM"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + <div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + زر القائمة المنسدلة + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + <div class="dropdown"> + <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" id="dropdownMenuButtonLG" data-bs-toggle="dropdown" aria-expanded="false"> + زر القائمة المنسدلة + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButtonLG"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="btn-group"> + <button type="button" class="btn btn-primary">Primary</button> + <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">تبديل القائمة المنسدلة</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-secondary">Secondary</button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">تبديل القائمة المنسدلة</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-success">Success</button> + <button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">تبديل القائمة المنسدلة</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-info">Info</button> + <button type="button" class="btn btn-info dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">تبديل القائمة المنسدلة</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-warning">Warning</button> + <button type="button" class="btn btn-warning dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">تبديل القائمة المنسدلة</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-danger">Danger</button> + <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">تبديل القائمة المنسدلة</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </div><!-- /btn-group --> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="btn-group w-100 align-items-center justify-content-between flex-wrap"> + <div class="dropend"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropendMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + زر القائمة المنسدلة لليسار + </button> + <ul class="dropdown-menu" aria-labelledby="dropendMenuButton"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + <div class="dropup"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropupMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + زر القائمة المنسدلة للأعلى + </button> + <ul class="dropdown-menu" aria-labelledby="dropupMenuButton"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + <div class="dropstart"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropstartMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + زر القائمة المنسدلة لليمين + </button> + <ul class="dropdown-menu" aria-labelledby="dropstartMenuButton"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="btn-group"> + <div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownRightMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + قائمة منسدلة بمحاذاة نهاية الزر + </button> + <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownRightMenuButton"> + <li><h6 class="dropdown-header">عنوان القائمة المنسدلة</h6></li> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">رابط منفصل</a></li> + </ul> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="list-group"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>مجموعة العناصر</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/list-group" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <ul class="list-group"> + <li class="list-group-item disabled" aria-disabled="true">عنصر معطل</li> + <li class="list-group-item">عنصر ثاني</li> + <li class="list-group-item">عنصر ثالث</li> + <li class="list-group-item">عنصر رابع</li> + <li class="list-group-item">وعنصر خامس أيضًا</li> + </ul> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="list-group list-group-flush"> + <li class="list-group-item">عنصر</li> + <li class="list-group-item">عنصر ثاني</li> + <li class="list-group-item">عنصر ثالث</li> + <li class="list-group-item">عنصر رابع</li> + <li class="list-group-item">وعنصر خامس أيضًا</li> + </ul> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="list-group"> + <a href="#" class="list-group-item list-group-item-action">عنصر مجموعة قائمة default بسيط</a> + {{< list.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <a href="#" class="list-group-item list-group-item-action list-group-item-{{ .name }}">عنصر مجموعة قائمة {{ .name }} بسيط</a> + {{- end -}} + {{< /list.inline >}} + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="modal"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الصندوق العائم</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/modal" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="d-flex justify-content-between flex-wrap"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalDefault"> + إطلاق صندوق عائم تجريبي + </button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdropLive"> + إطلاق صندوق عائم عالق + </button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalCenteredScrollable"> + صندوق عائم متنصف عاموديًا وقابل للتمرير + </button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen"> + صندوق عائم يملأ الشاشة + </button> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="navs"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>التنقل</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/navs-tabs" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav class="nav"> + <a class="nav-link active" aria-current="page" href="#">نشط</a> + <a class="nav-link" href="#">رابط</a> + <a class="nav-link" href="#">رابط</a> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a> + </nav> + {{< /example >}} + + {{< example show_markup="false" >}} + <nav> + <div class="nav nav-tabs mb-3" id="nav-tab" role="tablist"> + <button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">الصفحة الرئيسية</button> + <button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">الملف الشخصي</button> + <button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">اتصل بنا</button> + </div> + </nav> + <div class="tab-content" id="nav-tabContent"> + <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab"> + <p class="px-3">محتوى لتوضيح كيف يعمل التبويب. هذا المحتوى مرتبط بتبويب الصفحة الرئيسية. إذن، أمامنا بعض التحدّيات الصعبة. لكن لا يمكننا أن نعتمد على التطورات التكنولوجية وحدها في ميدان قوى السوق الحرة، لإخراجنا من هذه الورطة، لا سيّما أنها نفسها، مقرونة بالافتقار إلى البصيرة، هي التي أودت بنا إلى هذا التبدُّل المناخي في الدرجة الأولى.</p> + </div> + <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab"> + <p class="px-3">محتوى لتوضيح كيف يعمل التبويب. هذا المحتوى مرتبط بتبويب الملف الشخصي. معظم البشر في بلدان العالَم النامي، لم يقتنوا بعد مكيّفهم الأول، والمشكلة إلى ازدياد. فمعظم البلدان النامية هي من البلدان الأشد حرارة والأكثر اكتظاظًا بالسكان في العالم.</p> + </div> + <div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab"> + <p class="px-3">محتوى لتوضيح كيف يعمل التبويب. هذا المحتوى مرتبط بتبويب الاتصال بنا. أمامنا بعض التحدّيات الصعبة. لكن لا يمكننا أن نعتمد على التطورات التكنولوجية وحدها في ميدان قوى السوق الحرة، بل يجب وضع معايير جدوى جديدة لشركات البناء ومعايير أعلى لجدوى التكييف من أجل تحفيز الحلول المستدامة قانونيًا.</p> + </div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">نشط</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">رابط</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">رابط</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a> + </li> + </ul> + {{< /example >}} + </div> + </article> + <article class="my-3" id="navbar"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>شريط التنقل</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/navbar" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy" + style="filter: invert(1) grayscale(100%) brightness(200%);"> + </a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="تبديل التنقل"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">الصفحة الرئيسية</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">رابط</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + قائمة منسدلة + </a> + <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="بحث" aria-label="بحث"> + <button class="btn btn-outline-dark" type="submit">بحث</button> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5"> + <div class="container-fluid"> + <a class="navbar-brand" href="#"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"> + </a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="تبديل التنقل"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarSupportedContent2"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">الصفحة الرئيسية</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">رابط</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + قائمة منسدلة + </a> + <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> + <li><a class="dropdown-item" href="#">عمل</a></li> + <li><a class="dropdown-item" href="#">عمل آخر</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">شيء آخر هنا</a></li> + </ul> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="بحث" aria-label="بحث"> + <button class="btn btn-outline-light" type="submit">بحث</button> + </form> + </div> + </div> + </nav> + {{< /example >}} + </div> + </article> + <article class="my-3" id="pagination"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>ترقيم الصفحات</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/pagination" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav aria-label="مثال ترقيم الصفحات"> + <ul class="pagination pagination-sm"> + <li class="page-item"><a class="page-link" href="#">1</a></li> + <li class="page-item active" aria-current="page"> + <a class="page-link" href="#">2</a> + </li> + <li class="page-item"><a class="page-link" href="#">3</a></li> + </ul> + </nav> + {{< /example >}} + + {{< example show_markup="false" >}} + <nav aria-label="مثال قياسي لترقيم الصفحات"> + <ul class="pagination"> + <li class="page-item"> + <a class="page-link" href="#" aria-label="السابق"> + <span aria-hidden="true">«</span> + </a> + </li> + <li class="page-item"><a class="page-link" href="#">1</a></li> + <li class="page-item"><a class="page-link" href="#">2</a></li> + <li class="page-item"><a class="page-link" href="#">3</a></li> + <li class="page-item"> + <a class="page-link" href="#" aria-label="التالي"> + <span aria-hidden="true">»</span> + </a> + </li> + </ul> + </nav> + {{< /example >}} + + {{< example show_markup="false" >}} + <nav aria-label="مثال آخر لترقيم الصفحات"> + <ul class="pagination pagination-lg flex-wrap"> + <li class="page-item disabled"> + <a class="page-link" href="#" tabindex="-1" aria-disabled="true">السابق</a> + </li> + <li class="page-item"><a class="page-link" href="#">1</a></li> + <li class="page-item active" aria-current="page"> + <a class="page-link" href="#">2</a> + </li> + <li class="page-item"><a class="page-link" href="#">3</a></li> + <li class="page-item"> + <a class="page-link" href="#">التالى</a> + </li> + </ul> + </nav> + {{< /example >}} + </div> + </article> + <article class="my-3" id="popovers"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الصناديق المنبثقة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/popovers" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <button type="button" class="btn btn-lg btn-danger" data-bs-toggle="popover" title="عنوان الصندوق المنبثق" data-bs-content="وإليك بعض المحتويات الرائعة. إنه آسر للغاية. أليس كذلك؟"> + انقر لعرض/إخفاء الصندوق المنبثق + </button> + {{< /example >}} + + {{< example show_markup="false" >}} + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="top" data-bs-content="نجمٌ و لكنه ليس في السماء، بل في أعماق البحار و المحيطات!"> + انبثاق إلى الأعلى + </button> + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="right" data-bs-content="نجمٌ و لكنه ليس في السماء، بل في أعماق البحار و المحيطات!"> + انبثاق إلى اليسار + </button> + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-content="نجمٌ و لكنه ليس في السماء، بل في أعماق البحار و المحيطات!"> + انبثاق إلى الأسفل + </button> + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="left" data-bs-content="نجمٌ و لكنه ليس في السماء، بل في أعماق البحار و المحيطات!"> + انبثاق إلى اليمين + </button> + {{< /example >}} + </div> + </article> + <article class="my-3" id="progress"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>شريط التقدم</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/progress" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="progress mb-3"> + <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> + </div> + <div class="progress mb-3"> + <div class="progress-bar bg-success w-25" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div> + </div> + <div class="progress mb-3"> + <div class="progress-bar bg-info text-dark w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div> + </div> + <div class="progress mb-3"> + <div class="progress-bar bg-warning text-dark w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div> + </div> + <div class="progress"> + <div class="progress-bar bg-danger w-100" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="progress"> + <div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div> + <div class="progress-bar progress-bar-striped progress-bar-animated bg-success" role="progressbar" style="width: 40%" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"></div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="scrollspy"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>المخطوطة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/scrollspy" >}}">دليل الإستخدام</a> + </div> + + <div> + <div class="bd-example"> + <nav id="navbar-example2" class="navbar navbar-light bg-light px-3"> + <a class="navbar-brand" href="#">شريط التنقل</a> + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link" href="#fat"><bdi lang="en" dir="ltr">@fat</bdi></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#mdo"><bdi lang="en" dir="ltr">@mdo</bdi></a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">قائمة منسدلة</a> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#one">واحد</a></li> + <li><a class="dropdown-item" href="#two">اثنان</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#three">ثلاثة</a></li> + </ul> + </li> + </ul> + </nav> + <div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="0" class="scrollspy-example"> + <h4 id="fat"><bdi lang="en" dir="ltr">@fat</bdi></h4> + <p>محتوى لتوضيح كيف تعمل المخطوطة. ببساطة، المخطوطة عبارة عن منشور طويل يحتوي على عدة أقسام، ولديه شريط تنقل يسهل الوصول إلى هذه الأقسام الفرعية.</p> + <h4 id="mdo"><bdi lang="en" dir="ltr">@mdo</bdi></h4> + <p>بصرف النظر عن تحسيننا جدوى المكيّفات أو عدم تحسينها، فإن الطلب على الطاقة سيزداد. وطبقاً لما جاء في مقالة معهد ماساشوستس للتكنولوجيا، السالف ذكره، ثمَّة أمر يجب عدم إغفاله، وهو كيف أن هذا الطلب سيضغط على نظم توفير الطاقة الحالية. إذ لا بد من إعادة تأهيل كل شبكات الكهرباء، وتوسيعها لتلبية طلب الطاقة في زمن الذروة، خلال موجات الحرارة المتزايدة. فحين يكون الحر شديداً يجنح الناس إلى البقاء في الداخل، وإلى زيادة تشغيل المكيّفات، سعياً إلى جو لطيف وهم يستخدمون أدوات وأجهزة مختلفة أخرى.</p> + <h4 id="one">واحد</h4> + <p>وكل هذه الأمور المتزامنة من تشغيل الأجهزة، يزيد الضغط على شبكات الطاقة، كما أسلفنا. لكن مجرد زيادة سعة الشبكة ليس كافياً. إذ لا بد من تطوير الشبكات الذكية التي تستخدم الجسّاسات، ونظم المراقبة، والبرامج الإلكترونية، لتحديد متى يكون الشاغلون في المبنى، ومتى يكون ثمَّة حاجة إلى الطاقة، ومتى تكون الحرارة منخفضة، وبذلك يخرج الناس، فلا يستخدمون كثيراً من الكهرباء.</p> + <h4 id="two">اثنان</h4> + <p>مع الأسف، كل هذه الحلول المبتكرة مكلِّفة، وهذا ما يجعلها عديمة الجدوى في نظر بعض الشركات الخاصة والمواطن المتقشّف. إن بعض الأفراد الواعين بيئياً يبذلون قصارى جهدهم في تقليص استهلاكهم من الطاقة، ويعون جيداً أهمية أجهزة التكييف المجدية والأرفق بالبيئة. ولكن جهات كثيرة لن تتحرّك لمجرد حافز سلامة المناخ ووقف هدر الطاقة، ما دامت لا تحركها حوافز قانونية. وعلى الحكومات أن تُقدِم عند الاهتمام بالتغيّر المناخي، على وضع التشريعات المناسبة. فبالنظم والحوافز والدعم، يمكن دفع الشركات إلى اعتماد الحلول الأجدى في مكاتبها.</p> + <h4 id="three">ثلاثة</h4> + <p>وكما يتبيّن لنا، من عدد الحلول الملطِّفة للمشكلة، ومن تنوّعها، وهي الحلول التي أسلفنا الحديث عنها، فإن التكنولوجيا التي نحتاج إليها من أجل معالجة هذه التحديات، هي في مدى قدرتنا، لكنها ربما تتطلّب بعض التحسين، ودعماً استثمارياً أكبر!</p> + <p>ولا مانع من إضافة محتوى آخر ليس تحت أي قسم معين.</p> + </div> + </div> + </div> + </article> + <article class="my-3" id="spinners"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الدوائر المتحركة</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/spinners" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< spinner.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="spinner-border text-{{ .name }}" role="status"> + <span class="visually-hidden">جار التحميل...</span> + </div> + {{- end -}} + {{< /spinner.inline >}} + {{< /example >}} + + {{< example show_markup="false" >}} + {{< spinner.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="spinner-grow text-{{ .name }}" role="status"> + <span class="visually-hidden">جار التحميل...</span> + </div> + {{- end -}} + {{< /spinner.inline >}} + {{< /example >}} + </div> + </article> + <article class="my-3" id="toasts"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>الإشعارات</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/toasts" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" class="bg-dark p-5 align-items-center" >}} + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">قبل 11 دقيقة</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="قريب"></button> + </div> + <div class="toast-body"> + مرحبا بالعالم! هذه رسالة إشعار. + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="mt-3 mb-5 pb-5" id="tooltips"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>التلميحات</h3> + <a class="d-flex align-items-center" hreflang="en" href="{{< docsref "/components/tooltips" >}}">دليل الإستخدام</a> + </div> + + <div> + {{< example show_markup="false" class="tooltip-demo" >}} + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="تلميح يظهر في الأعلى">تلميح يظهر في الأعلى</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" title="تلميح يظهر على اليسار">تلميح يظهر على اليسار</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="تلميح يظهر في الأسفل">تلميح يظهر في الأسفل</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" title="تلميح يظهر على اليمين">تلميح يظهر على اليمين</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" title="<em>تلميح</em> <u>مع</u> <b>HTML</b>">تلميح مع HTML</button> + {{< /example >}} + </div> + </article> + </section> +</div> + +<div class="modal fade" id="exampleModalDefault" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="exampleModalLabel">عنوان الصندوق العائم</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="إغلاق"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button> + <button type="button" class="btn btn-primary">حفظ التغيرات</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="staticBackdropLive" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLiveLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="staticBackdropLiveLabel">عنوان الصندوق العائم</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="إغلاق"></button> + </div> + <div class="modal-body"> + <p>لن أغلق إذا نقرت خارجي. لا تحاول حتى الضغط على مفتاح الهروب.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button> + <button type="button" class="btn btn-primary">حسنًا</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="exampleModalCenteredScrollable" tabindex="-1" aria-labelledby="exampleModalCenteredScrollableTitle" aria-hidden="true"> + <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="exampleModalCenteredScrollableTitle">عنوان الصندوق العائم</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="إغلاق"></button> + </div> + <div class="modal-body"> + <p>نص لتوضيح عمل الصندوق العائم المتنصّف عاموديًا القابل للتمرير</p> + <p>في هذه الحالة، هذا الصندوق يحتوي على محتوى أكثر قليلًا، ولذلك لتوضيح كيف يمكن إضافة خاصية الإنتصاف العامودي لصندوق عائم قابل للتمرير.</p> + <p>يعتبر كوب أو فنجان القهوة عادة يومية عند غالبية سكان الكرة الأرضية في الصباح والمساء، وفي حين تكثر الدراسات حول إيجابياتها هناك أيضا سلبيات كثيرة للمشروب المفضل للكثيرين.</p> + <p>وفي هذا الشأن، أظهرت دراسة جديدة أن تناول الكافيين بانتظام يقلل من حجم المادة الرمادية في الدماغ، مما يشير إلى أن تناول القهوة يمكن أن يضعف القدرة على معالجة المعلومات، وفقاً لما نشرته "ديلي ميل" البريطانية.</p> + <p>وأعطى باحثون سويسريون متطوعين ثلاث حصص من الكافيين 150 ملغم يوميًا لمدة 10 أيام - وهو مقدار كافيين يعادل حوالي أربعة أو خمسة أكواب صغيرة من القهوة المخمرة يوميًا، أو سبعة إسبريسو فردي.</p> + <p>وتبين حدوث انخفاض في المادة الرمادية، والتي توجد غالبًا في الطبقة الخارجية للدماغ، أو القشرة، وتعمل على معالجة المعلومات.</p> + <p>كما كان الانخفاض مذهلاً بشكل خاص في الفص الصدغي الإنسي الأيمن، بما في ذلك الحُصين، وهي منطقة من الدماغ ضرورية لتقوية الذاكرة.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button> + <button type="button" class="btn btn-primary">حفظ التغيرات</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="exampleModalFullscreen" tabindex="-1" aria-labelledby="exampleModalFullscreenLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenLabel">صندوق عائم يملأ الشاشة</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="إغلاق"></button> + </div> + <div class="modal-body"> + <p>في ما يلي، نص طويل لتعبئة كامل الشاشة. قد يبدو أنني أثرثر كثيرًا، لذا سأقوم بنسخ مقالة من إحدى الصحف العربية.</p> + <p>تكييف الهواء هو من التكنولوجيا التي ما إن نمتلكها حتى نصبح عاجزين عن تخيّل العيش من دونها. وتكييف الهواء في مناطق عديدة من العالم ليس ترفاً يمكن الاستغناء عنه. ولكن هذه الحاجة الحيوية تثير تحديات كبيرة على مستوى استهلاك الطاقة في معظم بلدان العالم. ويُتوقع أن تتفاقم هذه التحديات خلال العقود الثلاثة المقبلة، مع توقُّع ارتفاع عدد المكيفات في العالم نحو ثلاثة أضعاف. وفي حين أن الابتكارات التكنولوجية تحقِّق كل يوم إنجازاً جديداً، وعلى الرغم من بعض التحسينات والتدابير المحدودة التي طرأت على صناعة المكيفات، “فإن تكنولوجيتها الأساسية لا تزال تعمل كما كانت، منذ اعتمادها قبل نحو قرن من السنين"، حسبما جاء في تقرير لمعهد ماساشوستس للتكنولوجيا (MIT)، في الأول من سبتمبر 2020م. ولمعالجة هذه المشكلات الخطيرة، لا مفر من إعادة التفكير بجد.</p> + <p>التكييف حاجة حيويّة. فالتعرّض للحرارة لمدة طويلة ضارٌ بالصحة. ووفقاً لمنظمة الصحة العالميّة يمكن للتعرُّض الطويل للحرارة أيضاً أن يؤدي إلى "إعياء حراري، وضربة شمس، وتورّم في الرجلين، وطفح جلدي على العنق، وتشنج، وصداع، وحساسيّة، والخمول والوهَن. ويمكن للحرارة أن تسبِّب جفافاً خطراً، وأعراضاً حادة في أوعية الدماغ الدمويّة، وتسهم في تكوّن الجلطات".</p> + <p>وموجات الحر أيضاً من أشد المخاطر الطبيعيّة المميتة. إذ يقدَّر أن بين عامي 1998 و2017م، توفي نحو 166 ألف شخص من موجات الحر. ومات 70 ألفاً من هؤلاء في أوروبا سنة 2003م وحدها. ومن دون أن يصل الخطر إلى الموت، تتسبَّب الحرارة العالية بانخفاض الأداء المعرفي لدى الشبان البالغين في المباني غير المكيّفة. فقد بيّنت دراسة أجرتها "كليّة ت. هـ. تشان" للصحة العامة في جامعة هارفرد، نشرتها "بلوس ميديسين" في 10 يوليو 2018م، أن التلاميذ الذين ينامون في مهاجع غير مكيّفة، يقل أداؤهم عن أولئك الذين ينامون في مهاجع مكيّفة. ولتجنّب مخاطر التعرّض للحرارة، يلتفت الناس إلى استخدام التكييف.</p> + <p>يتطلّب التكييف كثيراً من الطاقة. فنحو %10 من استهلاك الكهرباء في العالم يُنفَق في تشغيل المكيّفات. وتصل هذه النسبة إلى %50 في المملكة حسب "المركز السعودي لكفاءة الطاقة". أضف إلى ذلك أن معظم البشر في بلدان العالم النامي، لم يقتنوا بعد مكيّفهم الأول، والمشكلة إلى ازدياد. فمعظم البلدان النامية هي من البلدان الأشد حرارة والأكثر اكتظاظاً بالسكان في العالم. وجاء في تقرير لوكالة الطاقة الدوليّة بعنوان "مستقبل التبريد"، ونُشر في مايو 2018م، أن في أجزاء من أمريكا الجنوبيّة وإفريقيا وآسيا والشرق الأوسط، يعيش 2.8 مليار نسمة، ولا يملك وحدات تكييف سوى %8 من المنازل. في حين الدول المتقدِّمة مثل كوريا الجنوبيّة، واليابان، والولايات المتحدة، فإن %89 من المنازل تملك مكيفات، وفي الصين %60 من البيوت تملكها أيضاً.</p> + <p>ولكن مع تنامي الدخل في بلدان الاقتصاد الصاعد، يتوقّع أن تزداد المنازل التي تقتني مكيّفاً. وبحسب مقالة نُشرت في صحيفة "نيويورك تايمز"، في 15 مايو 2018م، سيرتفع عدد المكيّفات في العالم من نحو 1.6 مليار حالياً، إلى 5.6 مليارات عام 2050م، طبقاً لمعدَّلات النمو الاقتصادي.</p> + <p>ومع الافتقار إلى الابتكار وتطوير النظم لفرض معايير الجدوى الأعلى، فسيتضاعف استهلاك الطاقة لتشغيل المكيّفات ثلاثة أضعاف. وسينتج من ذلك طلب إضافي للطاقة يساوي مجموع إنتاج الطاقة في الصين حالياً. فمبيعات المكيّفات ترتفع اليوم في البلدان النامية، لكن فعاليّة هذه الوحدات مشكوك فيها. فمثلاً، أوسع وحدات التكييف انتشاراً في بعض الأسواق الآسيوية تتطلّب ضعفي ما تتطلّبه وحدات تكييف أجدى. والمكيّفات التي تباع في اليابان والاتحاد الأوروبي أجدى بنسبة %25 عادة، من تلك التي تباع في الصين والولايات المتحدة.</p> + <p>وبصرف النظر عن كثير من الطاقة التي يحتاج إليها المكيّف، فإنه يبث مقادير وفيرة من غازات الدفيئة نفسها. وطبقاً لموقع تكييف الهواء (airconditioning.com)، فإن المبرِّدات في معظم المكيّفات مثل مواد مركبات الكربون الكلورية فلورية أو مواد هيدروفلوروولفينات، ومركبات ثاني أكسيد الكربون الهيدروكلورية فلورية، أسوأ بكثير للبيئة من ثاني أكسيد الكربون، لأنها تحتبس من الحرارة مقادير أكبر حين تتسرّب إلى الجو.</p> + <p>وبالإضافة إلى ظاهرة الدفيئة، فهذه الغازات تسهم أيضاً بالإضرار بطبقة الأوزون. ويمكن لهذه المواد الكيميائية أن تتسرّب خلال عملية التصنيع أو التصليح. ويعرف كل من يملك في منزله مكيّفاً كم تتكرر أعطال هذه الأجهزة. ثم إن المكيف يُرمَى حين يتعطّل نهائياً ولا يعود قابلاً للإصلاح، والمواد المبرِّدة فيه ستتسرّب على الأرجح لتلوث الهواء.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">إغلاق</button> + </div> + </div> + </div> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.css new file mode 100644 index 000000000..77aa0f23c --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.css @@ -0,0 +1,169 @@ +body { + scroll-behavior: smooth; +} + +/** + * Bootstrap "Journal code" icon + * @link https://icons.getbootstrap.com/icons/journal-code/ + */ +.bd-heading a::before { + display: inline-block; + width: 1em; + height: 1em; + margin-right: .25rem; + content: ""; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%25230d6efd' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2h1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1H2a2 2 0 0 1 2-2z'/%3E%3Cpath d='M2 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2z'/%3E%3Cpath fill-rule='evenodd' d='M8.646 5.646a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L10.293 8 8.646 6.354a.5.5 0 0 1 0-.708zm-1.292 0a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L5.707 8l1.647-1.646a.5.5 0 0 0 0-.708z'/%3E%3C/svg%3E"); + background-size: 1em; +} + +/* stylelint-disable-next-line selector-max-universal */ +.bd-heading + div > * + * { + margin-top: 3rem; +} + +/* Table of contents */ +.bd-aside a { + padding: .1875rem .5rem; + margin-top: .125rem; + margin-left: .3125rem; + color: rgba(0, 0, 0, .65); + text-decoration: none; +} + +.bd-aside a:hover, +.bd-aside a:focus { + color: rgba(0, 0, 0, .85); + background-color: rgba(121, 82, 179, .1); +} + +.bd-aside .active { + font-weight: 600; + color: rgba(0, 0, 0, .85); +} + +.bd-aside .btn { + padding: .25rem .5rem; + font-weight: 600; + color: rgba(0, 0, 0, .65); + border: 0; +} + +.bd-aside .btn:hover, +.bd-aside .btn:focus { + color: rgba(0, 0, 0, .85); + background-color: rgba(121, 82, 179, .1); +} + +.bd-aside .btn:focus { + box-shadow: 0 0 0 1px rgba(121, 82, 179, .7); +} + +.bd-aside .btn::before { + width: 1.25em; + line-height: 0; + content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); + transition: transform .35s ease; + + /* rtl:raw: + transform: rotate(180deg) translateX(-2px); + */ + transform-origin: .5em 50%; +} + +.bd-aside .btn[aria-expanded="true"]::before { + transform: rotate(90deg)/* rtl:ignore */; +} + + +/* Examples */ +.scrollspy-example { + position: relative; + height: 200px; + margin-top: .5rem; + overflow: auto; +} + +[id="modal"] .bd-example .btn, +[id="buttons"] .bd-example .btn, +[id="tooltips"] .bd-example .btn, +[id="popovers"] .bd-example .btn, +[id="dropdowns"] .bd-example .btn-group, +[id="dropdowns"] .bd-example .dropdown, +[id="dropdowns"] .bd-example .dropup, +[id="dropdowns"] .bd-example .dropend, +[id="dropdowns"] .bd-example .dropstart { + margin: 0 1rem 1rem 0; +} + +/* Layout */ +@media (min-width: 1200px) { + body { + display: grid; + gap: 1rem; + grid-template-columns: 1fr 4fr 1fr; + grid-template-rows: auto; + } + + .bd-header { + position: fixed; + top: 0; + /* rtl:begin:ignore */ + right: 0; + left: 0; + /* rtl:end:ignore */ + z-index: 1030; + grid-column: 1 / span 3; + } + + .bd-aside, + .bd-cheatsheet { + padding-top: 4rem; + } + + /** + * 1. Too bad only Firefox supports subgrids ATM + */ + .bd-cheatsheet, + .bd-cheatsheet section, + .bd-cheatsheet article { + display: inherit; /* 1 */ + gap: inherit; /* 1 */ + grid-template-columns: 1fr 4fr; + grid-column: 1 / span 2; + grid-template-rows: auto; + } + + .bd-aside { + grid-area: 1 / 3; + scroll-margin-top: 4rem; + } + + .bd-cheatsheet section, + .bd-cheatsheet section > h2 { + top: 2rem; + scroll-margin-top: 2rem; + } + + .bd-cheatsheet section > h2::before { + position: absolute; + /* rtl:begin:ignore */ + top: 0; + right: 0; + bottom: -2rem; + left: 0; + /* rtl:end:ignore */ + z-index: -1; + content: ""; + background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1) calc(100% - 3rem), rgba(255, 255, 255, .01)); + } + + .bd-cheatsheet article, + .bd-cheatsheet .bd-heading { + top: 8rem; + scroll-margin-top: 8rem; + } + + .bd-cheatsheet .bd-heading { + z-index: 1; + } +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.js b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.js new file mode 100644 index 000000000..0a50258b9 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.js @@ -0,0 +1,73 @@ +/* global bootstrap: false */ + +(function () { + 'use strict' + + // Tooltip and popover demos + document.querySelectorAll('.tooltip-demo') + .forEach(function (tooltip) { + new bootstrap.Tooltip(tooltip, { + selector: '[data-bs-toggle="tooltip"]' + }) + }) + + document.querySelectorAll('[data-bs-toggle="popover"]') + .forEach(function (popover) { + new bootstrap.Popover(popover) + }) + + document.querySelectorAll('.toast') + .forEach(function (toastNode) { + var toast = new bootstrap.Toast(toastNode, { + autohide: false + }) + + toast.show() + }) + + // Disable empty links and submit buttons + document.querySelectorAll('[href="#"], [type="submit"]') + .forEach(function (link) { + link.addEventListener('click', function (event) { + event.preventDefault() + }) + }) + + function setActiveItem() { + var hash = window.location.hash + + if (hash === '') { + return + } + + var link = document.querySelector('.bd-aside a[href="' + hash + '"]') + + if (!link) { + return + } + + var active = document.querySelector('.bd-aside .active') + var parent = link.parentNode.parentNode.previousElementSibling + + link.classList.add('active') + + if (parent.classList.contains('collapsed')) { + parent.click() + } + + if (!active) { + return + } + + var expanded = active.parentNode.parentNode.previousElementSibling + + active.classList.remove('active') + + if (expanded && parent !== expanded) { + expanded.click() + } + } + + setActiveItem() + window.addEventListener('hashchange', setActiveItem) +})() diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.rtl.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.rtl.css new file mode 100644 index 000000000..c1a4a1ccc --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/cheatsheet.rtl.css @@ -0,0 +1,162 @@ +body { + scroll-behavior: smooth; +} + +/** + * Bootstrap "Journal code" icon + * @link https://icons.getbootstrap.com/icons/journal-code/ + */ +.bd-heading a::before { + display: inline-block; + width: 1em; + height: 1em; + margin-left: .25rem; + content: ""; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%25230d6efd' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2h1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1H2a2 2 0 0 1 2-2z'/%3E%3Cpath d='M2 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2z'/%3E%3Cpath fill-rule='evenodd' d='M8.646 5.646a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L10.293 8 8.646 6.354a.5.5 0 0 1 0-.708zm-1.292 0a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L5.707 8l1.647-1.646a.5.5 0 0 0 0-.708z'/%3E%3C/svg%3E"); + background-size: 1em; +} + +/* stylelint-disable-next-line selector-max-universal */ +.bd-heading + div > * + * { + margin-top: 3rem; +} + +/* Table of contents */ +.bd-aside a { + padding: .1875rem .5rem; + margin-top: .125rem; + margin-right: .3125rem; + color: rgba(0, 0, 0, .65); + text-decoration: none; +} + +.bd-aside a:hover, +.bd-aside a:focus { + color: rgba(0, 0, 0, .85); + background-color: rgba(121, 82, 179, .1); +} + +.bd-aside .active { + font-weight: 600; + color: rgba(0, 0, 0, .85); +} + +.bd-aside .btn { + padding: .25rem .5rem; + font-weight: 600; + color: rgba(0, 0, 0, .65); + border: 0; +} + +.bd-aside .btn:hover, +.bd-aside .btn:focus { + color: rgba(0, 0, 0, .85); + background-color: rgba(121, 82, 179, .1); +} + +.bd-aside .btn:focus { + box-shadow: 0 0 0 1px rgba(121, 82, 179, .7); +} + +.bd-aside .btn::before { + width: 1.25em; + line-height: 0; + content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); + transition: transform .35s ease; + transform: rotate(180deg) translateX(-2px); + transform-origin: .5em 50%; +} + +.bd-aside .btn[aria-expanded="true"]::before { + transform: rotate(90deg); +} + + +/* Examples */ +.scrollspy-example { + position: relative; + height: 200px; + margin-top: .5rem; + overflow: auto; +} + +[id="modal"] .bd-example .btn, +[id="buttons"] .bd-example .btn, +[id="tooltips"] .bd-example .btn, +[id="popovers"] .bd-example .btn, +[id="dropdowns"] .bd-example .btn-group, +[id="dropdowns"] .bd-example .dropdown, +[id="dropdowns"] .bd-example .dropup, +[id="dropdowns"] .bd-example .dropend, +[id="dropdowns"] .bd-example .dropstart { + margin: 0 0 1rem 1rem; +} + +/* Layout */ +@media (min-width: 1200px) { + body { + display: grid; + gap: 1rem; + grid-template-columns: 1fr 4fr 1fr; + grid-template-rows: auto; + } + + .bd-header { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; + grid-column: 1 / span 3; + } + + .bd-aside, + .bd-cheatsheet { + padding-top: 4rem; + } + + /** + * 1. Too bad only Firefox supports subgrids ATM + */ + .bd-cheatsheet, + .bd-cheatsheet section, + .bd-cheatsheet article { + display: inherit; /* 1 */ + gap: inherit; /* 1 */ + grid-template-columns: 1fr 4fr; + grid-column: 1 / span 2; + grid-template-rows: auto; + } + + .bd-aside { + grid-area: 1 / 3; + scroll-margin-top: 4rem; + } + + .bd-cheatsheet section, + .bd-cheatsheet section > h2 { + top: 2rem; + scroll-margin-top: 2rem; + } + + .bd-cheatsheet section > h2::before { + position: absolute; + top: 0; + right: 0; + bottom: -2rem; + left: 0; + z-index: -1; + content: ""; + background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1) calc(100% - 3rem), rgba(255, 255, 255, .01)); + } + + .bd-cheatsheet article, + .bd-cheatsheet .bd-heading { + top: 8rem; + scroll-margin-top: 8rem; + } + + .bd-cheatsheet .bd-heading { + z-index: 1; + } +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/index.html new file mode 100644 index 000000000..9bcf5cc71 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cheatsheet/index.html @@ -0,0 +1,1589 @@ +--- +layout: examples +title: Cheatsheet +extra_css: + - "cheatsheet.css" +extra_js: + - src: "cheatsheet.js" +body_class: "bg-light" +--- + +<header class="bd-header bg-dark py-3 d-flex align-items-stretch border-bottom border-dark"> + <div class="container-fluid d-flex align-items-center"> + <h1 class="d-flex align-items-center fs-4 text-white mb-0"> + <img src="/docs/5.0/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="me-3" alt="Bootstrap"> + Cheatsheet + </h1> + <a href="{{< docsref "/examples/cheatsheet-rtl" >}}" class="ms-auto link-light" hreflang="ar">RTL cheatsheet</a> + </div> +</header> +<aside class="bd-aside sticky-xl-top text-muted align-self-start mb-3 mb-xl-5 px-2"> + <h2 class="h6 pt-4 pb-3 mb-4 border-bottom">On this page</h2> + <nav class="small" id="toc"> + <ul class="list-unstyled"> + <li class="my-2"> + <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#contents-collapse" aria-controls="contents-collapse">Contents</button> + <ul class="list-unstyled ps-3 collapse" id="contents-collapse"> + <li><a class="d-inline-flex align-items-center rounded" href="#typography">Typography</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#images">Images</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#tables">Tables</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#figures">Figures</a></li> + </ul> + </li> + <li class="my-2"> + <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#forms-collapse" aria-controls="forms-collapse">Forms</button> + <ul class="list-unstyled ps-3 collapse" id="forms-collapse"> + <li><a class="d-inline-flex align-items-center rounded" href="#overview">Overview</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#disabled-forms">Disabled forms</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#sizing">Sizing</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#input-group">Input group</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#floating-labels">Floating labels</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#validation">Validation</a></li> + </ul> + </li> + <li class="my-2"> + <button class="btn d-inline-flex align-items-center collapsed" data-bs-toggle="collapse" aria-expanded="false" data-bs-target="#components-collapse" aria-controls="components-collapse">Components</button> + <ul class="list-unstyled ps-3 collapse" id="components-collapse"> + <li><a class="d-inline-flex align-items-center rounded" href="#accordion">Accordion</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#alerts">Alerts</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#badge">Badge</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#breadcrumb">Breadcrumb</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#buttons">Buttons</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#button-group">Button group</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#card">Card</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#carousel">Carousel</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#dropdowns">Dropdowns</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#list-group">List group</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#modal">Modal</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#navs">Navs</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#navbar">Navbar</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#pagination">Pagination</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#popovers">Popovers</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#progress">Progress</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#scrollspy">Scrollspy</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#spinners">Spinners</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#toasts">Toasts</a></li> + <li><a class="d-inline-flex align-items-center rounded" href="#tooltips">Tooltips</a></li> + </ul> + </li> + </ul> + </nav> +</aside> +<div class="bd-cheatsheet container-fluid bg-body"> + <section id="content"> + <h2 class="sticky-xl-top fw-bold pt-3 pt-xl-5 pb-2 pb-xl-3">Contents</h2> + + <article class="my-3" id="typography"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Typography</h3> + <a class="d-flex align-items-center" href="{{< docsref "/content/typography" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <p class="display-1">Display 1</p> + <p class="display-2">Display 2</p> + <p class="display-3">Display 3</p> + <p class="display-4">Display 4</p> + <p class="display-5">Display 5</p> + <p class="display-6">Display 6</p> + {{< /example >}} + + {{< example show_markup="false" >}} + <p class="h1">Heading 1</p> + <p class="h2">Heading 2</p> + <p class="h3">Heading 3</p> + <p class="h4">Heading 4</p> + <p class="h5">Heading 5</p> + <p class="h6">Heading 6</p> + {{< /example >}} + + {{< example show_markup="false" >}} + <p class="lead"> + This is a lead paragraph. It stands out from regular paragraphs. + </p> + {{< /example >}} + + {{< example show_markup="false" >}} + <p>You can use the mark tag to <mark>highlight</mark> text.</p> + <p><del>This line of text is meant to be treated as deleted text.</del></p> + <p><s>This line of text is meant to be treated as no longer accurate.</s></p> + <p><ins>This line of text is meant to be treated as an addition to the document.</ins></p> + <p><u>This line of text will render as underlined.</u></p> + <p><small>This line of text is meant to be treated as fine print.</small></p> + <p><strong>This line rendered as bold text.</strong></p> + <p><em>This line rendered as italicized text.</em></p> + {{< /example >}} + + {{< example show_markup="false" >}} + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer> + </blockquote> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="list-unstyled"> + <li>This is a list.</li> + <li>It appears completely unstyled.</li> + <li>Structurally, it's still a list.</li> + <li>However, this style only applies to immediate child elements.</li> + <li>Nested lists: + <ul> + <li>are unaffected by this style</li> + <li>will still show a bullet</li> + <li>and have appropriate left margin</li> + </ul> + </li> + <li>This may still come in handy in some situations.</li> + </ul> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="list-inline"> + <li class="list-inline-item">This is a list item.</li> + <li class="list-inline-item">And another one.</li> + <li class="list-inline-item">But they're displayed inline.</li> + </ul> + {{< /example >}} + </div> + </article> + <article class="my-3" id="images"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Images</h3> + <a class="d-flex align-items-center" href="{{< docsref "/content/images" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="Responsive image" >}} + {{< /example >}} + + {{< example show_markup="false" >}} + {{< placeholder width="200" height="200" class="img-thumbnail" title="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera" >}} + {{< /example >}} + </div> + </article> + <article class="my-3" id="tables"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Tables</h3> + <a class="d-flex align-items-center" href="{{< docsref "/content/tables" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <table class="table table-striped"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> + </table> + {{< /example >}} + + {{< example show_markup="false" >}} + <table class="table table-dark table-borderless"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> + </table> + {{< /example >}} + + {{< example show_markup="false" >}} + <table class="table table-hover"> + <thead> + <tr> + <th scope="col">Class</th> + <th scope="col">Heading</th> + <th scope="col">Heading</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">Default</th> + <td>Cell</td> + <td>Cell</td> + </tr> + {{< table.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <tr class="table-{{ .name }}"> + <th scope="row">{{ .name | title }}</th> + <td>Cell</td> + <td>Cell</td> + </tr> + {{- end -}} + {{< /table.inline >}} + </tbody> + </table> + {{< /example >}} + + {{< example show_markup="false" >}} + <table class="table table-sm table-bordered"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">First</th> + <th scope="col">Last</th> + <th scope="col">Handle</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">1</th> + <td>Mark</td> + <td>Otto</td> + <td>@mdo</td> + </tr> + <tr> + <th scope="row">2</th> + <td>Jacob</td> + <td>Thornton</td> + <td>@fat</td> + </tr> + <tr> + <th scope="row">3</th> + <td colspan="2">Larry the Bird</td> + <td>@twitter</td> + </tr> + </tbody> + </table> + {{< /example >}} + </div> + </article> + <article class="my-3" id="figures"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Figures</h3> + <a class="d-flex align-items-center" href="{{< docsref "/content/figures" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <figure class="figure"> + {{< placeholder width="400" height="300" class="figure-img img-fluid rounded" >}} + <figcaption class="figure-caption">A caption for the above image.</figcaption> + </figure> + {{< /example >}} + </div> + </article> + </section> + + <section id="forms"> + <h2 class="sticky-xl-top fw-bold pt-3 pt-xl-5 pb-2 pb-xl-3">Forms</h2> + + <article class="my-3" id="overview"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Overview</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/overview" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form> + <div class="mb-3"> + <label for="exampleInputEmail1" class="form-label">Email address</label> + <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp"> + <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div> + </div> + <div class="mb-3"> + <label for="exampleInputPassword1" class="form-label">Password</label> + <input type="password" class="form-control" id="exampleInputPassword1"> + </div> + <div class="mb-3 form-check"> + <input type="checkbox" class="form-check-input" id="exampleCheck1"> + <label class="form-check-label" for="exampleCheck1">Check me out</label> + </div> + <fieldset class="mb-3"> + <legend>Radios buttons</legend> + <div class="form-check"> + <input type="radio" name="radios" class="form-check-input" id="exampleRadio1"> + <label class="form-check-label" for="exampleRadio1">Default radio</label> + </div> + <div class="mb-3 form-check"> + <input type="radio" name="radios" class="form-check-input" id="exampleRadio2"> + <label class="form-check-label" for="exampleRadio2">Another radio</label> + </div> + </fieldset> + <div class="mb-3"> + <label class="form-label" for="customFile">Upload</label> + <input type="file" class="form-control" id="customFile"> + </div> + <div class="mb-3 form-check form-switch"> + <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked> + <label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label> + </div> + <div class="mb-3"> + <label for="customRange3" class="form-label">Example range</label> + <input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange3"> + </div> + <button type="submit" class="btn btn-primary">Submit</button> + </form> + {{< /example >}} + </div> + </article> + <article class="my-3" id="disabled-forms"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Disabled forms</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/overview" >}}#disabled-forms">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form> + <fieldset disabled aria-label="Disabled fieldset example"> + <div class="mb-3"> + <label for="disabledTextInput" class="form-label">Disabled input</label> + <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input"> + </div> + <div class="mb-3"> + <label for="disabledSelect" class="form-label">Disabled select menu</label> + <select id="disabledSelect" class="form-select"> + <option>Disabled select</option> + </select> + </div> + <div class="mb-3"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="disabledFieldsetCheck" disabled> + <label class="form-check-label" for="disabledFieldsetCheck"> + Can't check this + </label> + </div> + </div> + <fieldset class="mb-3"> + <legend>Disabled radios buttons</legend> + <div class="form-check"> + <input type="radio" name="radios" class="form-check-input" id="disabledRadio1" disabled> + <label class="form-check-label" for="disabledRadio1">Disabled radio</label> + </div> + <div class="mb-3 form-check"> + <input type="radio" name="radios" class="form-check-input" id="disabledRadio2" disabled> + <label class="form-check-label" for="disabledRadio2">Another radio</label> + </div> + </fieldset> + <div class="mb-3"> + <label class="form-label" for="disabledCustomFile">Upload</label> + <input type="file" class="form-control" id="disabledCustomFile" disabled> + </div> + <div class="mb-3 form-check form-switch"> + <input class="form-check-input" type="checkbox" id="disabledSwitchCheckChecked" checked disabled> + <label class="form-check-label" for="disabledSwitchCheckChecked">Disabled checked switch checkbox input</label> + </div> + <div class="mb-3"> + <label for="disabledRange" class="form-label">Disabled range</label> + <input type="range" class="form-range" min="0" max="5" step="0.5" id="disabledRange"> + </div> + <button type="submit" class="btn btn-primary">Submit</button> + </fieldset> + </form> + {{< /example >}} + </div> + </article> + <article class="my-3" id="sizing"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Sizing</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/form-control" >}}#sizing">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="mb-3"> + <input class="form-control form-control-lg" type="text" placeholder=".form-control-lg" aria-label=".form-control-lg example"> + </div> + <div class="mb-3"> + <select class="form-select form-select-lg mb-3" aria-label=".form-select-lg example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + </div> + <div class="mb-3"> + <input type="file" class="form-control form-control-lg" aria-label="Large file input example"> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="mb-3"> + <input class="form-control form-control-sm" type="text" placeholder=".form-control-sm" aria-label=".form-control-sm example"> + </div> + <div class="mb-3"> + <select class="form-select form-select-sm" aria-label=".form-select-sm example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + </div> + <div class="mb-3"> + <input type="file" class="form-control form-control-sm" aria-label="Small file input example"> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="input-group"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Input group</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/input-group" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="input-group mb-3"> + <span class="input-group-text" id="basic-addon1">@</span> + <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1"> + </div> + <div class="input-group mb-3"> + <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2"> + <span class="input-group-text" id="basic-addon2">@example.com</span> + </div> + <label for="basic-url" class="form-label">Your vanity URL</label> + <div class="input-group mb-3"> + <span class="input-group-text" id="basic-addon3">https://example.com/users/</span> + <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"> + </div> + <div class="input-group mb-3"> + <span class="input-group-text">$</span> + <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)"> + <span class="input-group-text">.00</span> + </div> + <div class="input-group"> + <span class="input-group-text">With textarea</span> + <textarea class="form-control" aria-label="With textarea"></textarea> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="floating-labels"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Floating labels</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/floating-labels" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form> + <div class="form-floating mb-3"> + <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> + <label for="floatingInput">Email address</label> + </div> + <div class="form-floating"> + <input type="password" class="form-control" id="floatingPassword" placeholder="Password"> + <label for="floatingPassword">Password</label> + </div> + </form> + {{< /example >}} + </div> + </article> + <article class="my-3" id="validation"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Validation</h3> + <a class="d-flex align-items-center" href="{{< docsref "/forms/validation" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <form class="row g-3"> + <div class="col-md-4"> + <label for="validationServer01" class="form-label">First name</label> + <input type="text" class="form-control is-valid" id="validationServer01" value="Mark" required> + <div class="valid-feedback"> + Looks good! + </div> + </div> + <div class="col-md-4"> + <label for="validationServer02" class="form-label">Last name</label> + <input type="text" class="form-control is-valid" id="validationServer02" value="Otto" required> + <div class="valid-feedback"> + Looks good! + </div> + </div> + <div class="col-md-4"> + <label for="validationServerUsername" class="form-label">Username</label> + <div class="input-group has-validation"> + <span class="input-group-text" id="inputGroupPrepend3">@</span> + <input type="text" class="form-control is-invalid" id="validationServerUsername" aria-describedby="inputGroupPrepend3" required> + <div class="invalid-feedback"> + Please choose a username. + </div> + </div> + </div> + <div class="col-md-6"> + <label for="validationServer03" class="form-label">City</label> + <input type="text" class="form-control is-invalid" id="validationServer03" required> + <div class="invalid-feedback"> + Please provide a valid city. + </div> + </div> + <div class="col-md-3"> + <label for="validationServer04" class="form-label">State</label> + <select class="form-select is-invalid" id="validationServer04" required> + <option selected disabled value="">Choose...</option> + <option>...</option> + </select> + <div class="invalid-feedback"> + Please select a valid state. + </div> + </div> + <div class="col-md-3"> + <label for="validationServer05" class="form-label">Zip</label> + <input type="text" class="form-control is-invalid" id="validationServer05" required> + <div class="invalid-feedback"> + Please provide a valid zip. + </div> + </div> + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" required> + <label class="form-check-label" for="invalidCheck3"> + Agree to terms and conditions + </label> + <div class="invalid-feedback"> + You must agree before submitting. + </div> + </div> + </div> + <div class="col-12"> + <button class="btn btn-primary" type="submit">Submit form</button> + </div> + </form> + {{< /example >}} + </div> + </article> + </section> + + <section id="components"> + <h2 class="sticky-xl-top fw-bold pt-3 pt-xl-5 pb-2 pb-xl-3">Components</h2> + + <article class="my-3" id="accordion"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Accordion</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/accordion" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="accordion" id="accordionExample"> + <div class="accordion-item"> + <h4 class="accordion-header" id="headingOne"> + <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> + Accordion Item #1 + </button> + </h4> + <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>This is the first item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h4 class="accordion-header" id="headingTwo"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> + Accordion Item #2 + </button> + </h4> + <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>This is the second item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + <div class="accordion-item"> + <h4 class="accordion-header" id="headingThree"> + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> + Accordion Item #3 + </button> + </h4> + <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample"> + <div class="accordion-body"> + <strong>This is the third item's accordion body.</strong> 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 <code>.accordion-body</code>, though the transition does limit overflow. + </div> + </div> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="alerts"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Alerts</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/alerts" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< alerts.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="alert alert-{{ .name }} alert-dismissible fade show" role="alert"> + A simple {{ .name }} alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like. + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> + </div>{{ end -}} + {{< /alerts.inline >}} + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="alert alert-success" role="alert"> + <h4 class="alert-heading">Well done!</h4> + <p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p> + <hr> + <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="badge"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Badge</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/badge" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <p class="h1">Example heading <span class="badge bg-primary">New</span></p> + <p class="h2">Example heading <span class="badge bg-secondary">New</span></p> + <p class="h3">Example heading <span class="badge bg-success">New</span></p> + <p class="h4">Example heading <span class="badge bg-danger">New</span></p> + <p class="h5">Example heading <span class="badge bg-warning text-dark">New</span></p> + <p class="h6">Example heading <span class="badge bg-info text-dark">New</span></p> + <p class="h6">Example heading <span class="badge bg-light text-dark">New</span></p> + <p class="h6">Example heading <span class="badge bg-dark">New</span></p> + {{< /example >}} + + {{< example show_markup="false" >}} + {{< badge.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <span class="badge rounded-pill bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} + {{< /badge.inline >}} + {{< /example >}} + </div> + </article> + <article class="my-3" id="breadcrumb"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Breadcrumb</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/breadcrumb" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item"><a href="#">Library</a></li> + <li class="breadcrumb-item active" aria-current="page">Data</li> + </ol> + </nav> + {{< /example >}} + </div> + </article> + <article class="my-3" id="buttons"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Buttons</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/buttons" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< buttons.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <button type="button" class="btn btn-{{ .name }}">{{ .name | title }}</button> + {{- end -}} + {{< /buttons.inline >}} + + <button type="button" class="btn btn-link">Link</button> + {{< /example >}} + + {{< example show_markup="false" >}} + {{< buttons.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <button type="button" class="btn btn-outline-{{ .name }}">{{ .name | title }}</button> + {{- end -}} + {{< /buttons.inline >}} + {{< /example >}} + + {{< example show_markup="false" >}} + <button type="button" class="btn btn-primary btn-sm">Small button</button> + <button type="button" class="btn btn-primary">Standard button</button> + <button type="button" class="btn btn-primary btn-lg">Large button</button> + {{< /example >}} + </div> + </article> + <article class="my-3" id="button-group"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Button group</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/button-group" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups"> + <div class="btn-group me-2" role="group" aria-label="First group"> + <button type="button" class="btn btn-secondary">1</button> + <button type="button" class="btn btn-secondary">2</button> + <button type="button" class="btn btn-secondary">3</button> + <button type="button" class="btn btn-secondary">4</button> + </div> + <div class="btn-group me-2" role="group" aria-label="Second group"> + <button type="button" class="btn btn-secondary">5</button> + <button type="button" class="btn btn-secondary">6</button> + <button type="button" class="btn btn-secondary">7</button> + </div> + <div class="btn-group" role="group" aria-label="Third group"> + <button type="button" class="btn btn-secondary">8</button> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="card"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Card</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/card" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="row row-cols-1 row-cols-md-2 g-4"> + <div class="col"> + <div class="card"> + {{< placeholder width="100%" height="180" class="card-img-top" text="Image cap" >}} + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> + <a href="#" class="btn btn-primary">Go somewhere</a> + </div> + </div> + </div> + <div class="col"> + <div class="card"> + <div class="card-header"> + Featured + </div> + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> + <a href="#" class="btn btn-primary">Go somewhere</a> + </div> + <div class="card-footer text-muted"> + 2 days ago + </div> + </div> + </div> + <div class="col"> + <div class="card"> + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> + </div> + <ul class="list-group list-group-flush"> + <li class="list-group-item">An item</li> + <li class="list-group-item">A second item</li> + <li class="list-group-item">A third item</li> + </ul> + <div class="card-body"> + <a href="#" class="card-link">Card link</a> + <a href="#" class="card-link">Another link</a> + </div> + </div> + </div> + <div class="col"> + <div class="card"> + <div class="row g-0"> + <div class="col-md-4"> + {{< placeholder width="100%" height="250" text="Image" >}} + </div> + <div class="col-md-8"> + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> + <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> + </div> + </div> + </div> + </div> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="carousel"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Carousel</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/carousel" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel"> + <div class="carousel-indicators"> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button> + <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2" aria-label="Slide 3"></button> + </div> + <div class="carousel-inner"> + <div class="carousel-item active"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>First slide label</h5> + <p>Some representative placeholder content for the first slide.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#444" background="#666" text="Second slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>Second slide label</h5> + <p>Some representative placeholder content for the second slide.</p> + </div> + </div> + <div class="carousel-item"> + {{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#333" background="#555" text="Third slide" >}} + <div class="carousel-caption d-none d-md-block"> + <h5>Third slide label</h5> + <p>Some representative placeholder content for the third slide.</p> + </div> + </div> + </div> + <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="visually-hidden">Previous</span> + </button> + <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="visually-hidden">Next</span> + </button> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="dropdowns"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Dropdowns</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/dropdowns" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="btn-group w-100 align-items-center justify-content-between flex-wrap"> + <div class="dropdown"> + <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="dropdownMenuButtonSM" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown button + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButtonSM"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown button + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="dropdown"> + <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" id="dropdownMenuButtonLG" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown button + </button> + <ul class="dropdown-menu" aria-labelledby="dropdownMenuButtonLG"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="btn-group"> + <button type="button" class="btn btn-primary">Primary</button> + <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-secondary">Secondary</button> + <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-success">Success</button> + <button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-info">Info</button> + <button type="button" class="btn btn-info dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-warning">Warning</button> + <button type="button" class="btn btn-warning dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div><!-- /btn-group --> + <div class="btn-group"> + <button type="button" class="btn btn-danger">Danger</button> + <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </div><!-- /btn-group --> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="btn-group w-100 align-items-center justify-content-between flex-wrap"> + <div class="dropend"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropendMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + Dropend button + </button> + <ul class="dropdown-menu" aria-labelledby="dropendMenuButton"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="dropup"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropupMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + Dropup button + </button> + <ul class="dropdown-menu" aria-labelledby="dropupMenuButton"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + <div class="dropstart"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropstartMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + Dropstart button + </button> + <ul class="dropdown-menu" aria-labelledby="dropstartMenuButton"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="btn-group"> + <div class="dropdown"> + <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownRightMenuButton" data-bs-toggle="dropdown" aria-expanded="false"> + End-aligned menu + </button> + <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownRightMenuButton"> + <li><h6 class="dropdown-header">Dropdown header</h6></li> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="list-group"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>List group</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/list-group" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <ul class="list-group"> + <li class="list-group-item disabled" aria-disabled="true">A disabled item</li> + <li class="list-group-item">A second item</li> + <li class="list-group-item">A third item</li> + <li class="list-group-item">A fourth item</li> + <li class="list-group-item">And a fifth one</li> + </ul> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="list-group list-group-flush"> + <li class="list-group-item">An item</li> + <li class="list-group-item">A second item</li> + <li class="list-group-item">A third item</li> + <li class="list-group-item">A fourth item</li> + <li class="list-group-item">And a fifth one</li> + </ul> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="list-group"> + <a href="#" class="list-group-item list-group-item-action">A simple default list group item</a> + {{< list.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <a href="#" class="list-group-item list-group-item-action list-group-item-{{ .name }}">A simple {{ .name }} list group item</a> + {{- end -}} + {{< /list.inline >}} + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="modal"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Modal</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/modal" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="d-flex justify-content-between flex-wrap"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalDefault"> + Launch demo modal + </button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdropLive"> + Launch static backdrop modal + </button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalCenteredScrollable"> + Vertically centered scrollable modal + </button> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen"> + Full screen + </button> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="navs"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Navs</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/navs-tabs" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav class="nav"> + <a class="nav-link active" aria-current="page" href="#">Active</a> + <a class="nav-link" href="#">Link</a> + <a class="nav-link" href="#">Link</a> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </nav> + {{< /example >}} + + {{< example show_markup="false" >}} + <nav> + <div class="nav nav-tabs mb-3" id="nav-tab" role="tablist"> + <button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">Home</button> + <button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</button> + <button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</button> + </div> + </nav> + <div class="tab-content" id="nav-tabContent"> + <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab"> + <p><strong>This is some placeholder content the Home tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> + </div> + <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab"> + <p><strong>This is some placeholder content the Profile tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> + </div> + <div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab"> + <p><strong>This is some placeholder content the Contact tab's associated content.</strong> Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling. You can use it with tabs, pills, and any other <code>.nav</code>-powered navigation.</p> + </div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Active</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + {{< /example >}} + </div> + </article> + <article class="my-3" id="navbar"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Navbar</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/navbar" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav class="navbar navbar-expand-lg navbar-light bg-light"> + <div class="container-fluid"> + <a class="navbar-brand" href="#"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy" + style="filter: invert(1) grayscale(100%) brightness(200%);"> + </a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </a> + <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-dark" type="submit">Search</button> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5"> + <div class="container-fluid"> + <a class="navbar-brand" href="#"> + <img src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"> + </a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarSupportedContent2"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-bs-toggle="dropdown" aria-expanded="false"> + Dropdown + </a> + <ul class="dropdown-menu" aria-labelledby="navbarDropdown2"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-light" type="submit">Search</button> + </form> + </div> + </div> + </nav> + {{< /example >}} + </div> + </article> + <article class="my-3" id="pagination"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Pagination</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/pagination" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <nav aria-label="Pagination example"> + <ul class="pagination pagination-sm"> + <li class="page-item"><a class="page-link" href="#">1</a></li> + <li class="page-item active" aria-current="page"> + <a class="page-link" href="#">2</a> + </li> + <li class="page-item"><a class="page-link" href="#">3</a></li> + </ul> + </nav> + {{< /example >}} + + {{< example show_markup="false" >}} + <nav aria-label="Standard pagination example"> + <ul class="pagination"> + <li class="page-item"> + <a class="page-link" href="#" aria-label="Previous"> + <span aria-hidden="true">«</span> + </a> + </li> + <li class="page-item"><a class="page-link" href="#">1</a></li> + <li class="page-item"><a class="page-link" href="#">2</a></li> + <li class="page-item"><a class="page-link" href="#">3</a></li> + <li class="page-item"> + <a class="page-link" href="#" aria-label="Next"> + <span aria-hidden="true">»</span> + </a> + </li> + </ul> + </nav> + {{< /example >}} + + {{< example show_markup="false" >}} + <nav aria-label="Another pagination example"> + <ul class="pagination pagination-lg flex-wrap"> + <li class="page-item disabled"> + <a class="page-link" href="#" tabindex="-1" aria-disabled="true">Previous</a> + </li> + <li class="page-item"><a class="page-link" href="#">1</a></li> + <li class="page-item active" aria-current="page"> + <a class="page-link" href="#">2</a> + </li> + <li class="page-item"><a class="page-link" href="#">3</a></li> + <li class="page-item"> + <a class="page-link" href="#">Next</a> + </li> + </ul> + </nav> + {{< /example >}} + </div> + </article> + <article class="my-3" id="popovers"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Popovers</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/popovers" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <button type="button" class="btn btn-lg btn-danger" data-bs-toggle="popover" title="Popover title" data-bs-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button> + {{< /example >}} + + {{< example show_markup="false" >}} + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="top" data-bs-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on top + </button> + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="right" data-bs-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on end + </button> + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="bottom" data-bs-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on bottom + </button> + <button type="button" class="btn btn-secondary" data-bs-container="body" data-bs-toggle="popover" data-bs-placement="left" data-bs-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on start + </button> + {{< /example >}} + </div> + </article> + <article class="my-3" id="progress"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Progress</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/progress" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + <div class="progress mb-3"> + <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div> + </div> + <div class="progress mb-3"> + <div class="progress-bar bg-success w-25" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div> + </div> + <div class="progress mb-3"> + <div class="progress-bar bg-info text-dark w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div> + </div> + <div class="progress mb-3"> + <div class="progress-bar bg-warning text-dark w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div> + </div> + <div class="progress"> + <div class="progress-bar bg-danger w-100" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div> + </div> + {{< /example >}} + + {{< example show_markup="false" >}} + <div class="progress"> + <div class="progress-bar" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div> + <div class="progress-bar progress-bar-striped progress-bar-animated bg-success" role="progressbar" style="width: 40%" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"></div> + </div> + {{< /example >}} + </div> + </article> + <article class="my-3" id="scrollspy"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Scrollspy</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/scrollspy" >}}">Documentation</a> + </div> + + <div> + <div class="bd-example"> + <nav id="navbar-example2" class="navbar navbar-light bg-light px-3"> + <a class="navbar-brand" href="#">Navbar</a> + <ul class="nav nav-pills"> + <li class="nav-item"> + <a class="nav-link active" href="#scrollspyHeading1">First</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#scrollspyHeading2">Second</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#scrollspyHeading3">Third</a></li> + <li><a class="dropdown-item" href="#scrollspyHeading4">Fourth</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#scrollspyHeading5">Fifth</a></li> + </ul> + </li> + </ul> + </nav> + <div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="0" class="scrollspy-example" tabindex="0"> + <h4 id="scrollspyHeading1">First heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading2">Second heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading3">Third heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading4">Fourth heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + <h4 id="scrollspyHeading5">Fifth heading</h4> + <p>This is some placeholder content for the scrollspy page. Note that as you scroll down the page, the appropriate navigation link is highlighted. It's repeated throughout the component example. We keep adding some more example copy here to emphasize the scrolling and highlighting.</p> + </div> + </div> + </div> + </article> + <article class="my-3" id="spinners"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Spinners</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/spinners" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" >}} + {{< spinner.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="spinner-border text-{{ .name }}" role="status"> + <span class="visually-hidden">Loading...</span> + </div> + {{- end -}} + {{< /spinner.inline >}} + {{< /example >}} + + {{< example show_markup="false" >}} + {{< spinner.inline >}} + {{- range (index $.Site.Data "theme-colors") }} + <div class="spinner-grow text-{{ .name }}" role="status"> + <span class="visually-hidden">Loading...</span> + </div> + {{- end -}} + {{< /spinner.inline >}} + {{< /example >}} + </div> + </article> + <article class="my-3" id="toasts"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Toasts</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/toasts" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" class="bg-dark p-5 align-items-center" >}} + <div class="toast" role="alert" aria-live="assertive" aria-atomic="true"> + <div class="toast-header"> + {{< placeholder width="20" height="20" background="#007aff" class="rounded me-2" text="false" title="false" >}} + <strong class="me-auto">Bootstrap</strong> + <small class="text-muted">11 mins ago</small> + <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button> + </div> + <div class="toast-body"> + Hello, world! This is a toast message. + </div> + </div> + {{< /example >}} + </div> + </article> + <article class="mt-3 mb-5 pb-5" id="tooltips"> + <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2"> + <h3>Tooltips</h3> + <a class="d-flex align-items-center" href="{{< docsref "/components/tooltips" >}}">Documentation</a> + </div> + + <div> + {{< example show_markup="false" class="tooltip-demo" >}} + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">Tooltip on top</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" title="Tooltip on end">Tooltip on end</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" title="Tooltip on start">Tooltip on start</button> + <button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">Tooltip with HTML</button> + {{< /example >}} + </div> + </article> + </section> +</div> + +<div class="modal fade" id="exampleModalDefault" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="exampleModalLabel">Modal title</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Save changes</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="staticBackdropLive" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLiveLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="staticBackdropLiveLabel">Modal title</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + <p>I will not close if you click outside me. Don't even try to press escape key.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Understood</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="exampleModalCenteredScrollable" tabindex="-1" aria-labelledby="exampleModalCenteredScrollableTitle" aria-hidden="true"> + <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="exampleModalCenteredScrollableTitle">Modal title</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + <p>This is some placeholder content to show the scrolling behavior for modals. We use repeated line breaks to demonstrate how content can exceed minimum inner height, thereby showing inner scrolling. When content becomes longer than the prefedined max-height of modal, content will be cropped and scrollable within the modal.</p> + <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> + <p>This content should appear at the bottom after you scroll.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Save changes</button> + </div> + </div> + </div> +</div> +<div class="modal fade" id="exampleModalFullscreen" tabindex="-1" aria-labelledby="exampleModalFullscreenLabel" aria-hidden="true"> + <div class="modal-dialog modal-fullscreen"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title h4" id="exampleModalFullscreenLabel">Full screen modal</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + ... + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> + </div> + </div> + </div> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout-rtl/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout-rtl/index.html new file mode 100644 index 000000000..e0ca621b1 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout-rtl/index.html @@ -0,0 +1,232 @@ +--- +layout: examples +title: مثال إتمام الشراء +direction: rtl +extra_css: + - "../checkout/form-validation.css" +extra_js: + - src: "../checkout/form-validation.js" +body_class: "bg-light" +--- + +<div class="container"> + <main> + <div class="py-5 text-center"> + <img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57"> + <h2>نموذج إتمام الشراء</h2> + <p class="lead">فيما يلي مثال على نموذج تم إنشاؤه بالكامل باستخدام عناصر تحكم النموذج في Bootstrap. لكل مجموعة نماذج مطلوبة حالة تحقق يمكن تشغيلها بمحاولة إرسال النموذج دون استكماله.</p> + </div> + + <div class="row g-3"> + <div class="col-md-5 col-lg-4 order-md-last"> + <h4 class="d-flex justify-content-between align-items-center mb-3"> + <span class="text-muted">عربة التسوق</span> + <span class="badge bg-secondary rounded-pill">3</span> + </h4> + <ul class="list-group mb-3"> + <li class="list-group-item d-flex justify-content-between lh-sm"> + <div> + <h6 class="my-0">اسم المنتج</h6> + <small class="text-muted">وصف مختصر</small> + </div> + <span class="text-muted">$12</span> + </li> + <li class="list-group-item d-flex justify-content-between lh-sm"> + <div> + <h6 class="my-0">المنتج الثاني</h6> + <small class="text-muted">وصف مختصر</small> + </div> + <span class="text-muted">$8</span> + </li> + <li class="list-group-item d-flex justify-content-between lh-sm"> + <div> + <h6 class="my-0">البند الثالث</h6> + <small class="text-muted">وصف مختصر</small> + </div> + <span class="text-muted">$5</span> + </li> + <li class="list-group-item d-flex justify-content-between bg-light"> + <div class="text-success"> + <h6 class="my-0">رمز ترويجي</h6> + <small>EXAMPLECODE</small> + </div> + <span class="text-success">-$5</span> + </li> + <li class="list-group-item d-flex justify-content-between"> + <span>مجموع (USD)</span> + <strong>$20</strong> + </li> + </ul> + + <form class="card p-2"> + <div class="input-group"> + <input type="text" class="form-control" placeholder="رمز ترويجي"> + <button type="submit" class="btn btn-secondary">تحقق</button> + </div> + </form> + </div> + <div class="col-md-7 col-lg-8"> + <h4 class="mb-3">عنوان الفوترة</h4> + <form class="needs-validation" novalidate> + <div class="row g-3"> + <div class="col-sm-6"> + <label for="firstName" class="form-label">الاسم الأول</label> + <input type="text" class="form-control" id="firstName" placeholder="" value="" required> + <div class="invalid-feedback"> + يرجى إدخال اسم أول صحيح. + </div> + </div> + + <div class="col-sm-6"> + <label for="lastName" class="form-label">اسم العائلة</label> + <input type="text" class="form-control" id="lastName" placeholder="" value="" required> + <div class="invalid-feedback"> + يرجى إدخال اسم عائلة صحيح. + </div> + </div> + + <div class="col-12"> + <label for="username" class="form-label">اسم المستخدم</label> + <div class="input-group has-validation"> + <span class="input-group-text">@</span> + <input type="text" class="form-control" id="username" placeholder="اسم المستخدم" required> + <div class="invalid-feedback"> + اسم المستخدم الخاص بك مطلوب. + </div> + </div> + </div> + + <div class="col-12"> + <label for="email" class="form-label">البريد الإلكتروني <span class="text-muted">(اختياري)</span></label> + <input type="email" class="form-control" id="email" placeholder="you@example.com"> + <div class="invalid-feedback"> + يرجى إدخال عنوان بريد إلكتروني صحيح لتصلكم تحديثات الشحن. + </div> + </div> + + <div class="col-12"> + <label for="address" class="form-label">العنوان</label> + <input type="text" class="form-control" id="address" placeholder="1234 الشارع الأول" required> + <div class="invalid-feedback"> + يرجى إدخال عنوان الشحن الخاص بك. + </div> + </div> + + <div class="col-12"> + <label for="address2" class="form-label">عنوان 2 <span class="text-muted">(اختياري)</span></label> + <input type="text" class="form-control" id="address2" placeholder="شقة 24"> + </div> + + <div class="col-md-5"> + <label for="country" class="form-label">البلد</label> + <select class="form-select" id="country" required> + <option value="">اختر...</option> + <option>الولايات المتحدة الأمريكية</option> + </select> + <div class="invalid-feedback"> + يرجى اختيار بلد صحيح. + </div> + </div> + + <div class="col-md-4"> + <label for="state" class="form-label">المنطقة</label> + <select class="form-select" id="state" required> + <option value="">اختر...</option> + <option>كاليفورنيا</option> + </select> + <div class="invalid-feedback"> + يرجى اختيار اسم منطقة صحيح. + </div> + </div> + + <div class="col-md-3"> + <label for="zip" class="form-label">الرمز البريدي</label> + <input type="text" class="form-control" id="zip" placeholder="" required> + <div class="invalid-feedback"> + الرمز البريدي مطلوب. + </div> + </div> + </div> + + <hr class="my-4"> + + <div class="form-check"> + <input type="checkbox" class="form-check-input" id="same-address"> + <label class="form-check-label" for="same-address">عنوان الشحن هو نفس عنوان الفوترة الخاص بي</label> + </div> + + <div class="form-check"> + <input type="checkbox" class="form-check-input" id="save-info"> + <label class="form-check-label" for="save-info">احفظ هذه المعلومات في المرة القادمة</label> + </div> + + <hr class="my-4"> + + <h4 class="mb-3">طريقة الدفع</h4> + + <div class="my-3"> + <div class="form-check"> + <input id="credit" name="paymentMethod" type="radio" class="form-check-input" checked required> + <label class="form-check-label" for="credit">بطاقة ائتمان</label> + </div> + <div class="form-check"> + <input id="cash" name="paymentMethod" type="radio" class="form-check-input" required> + <label class="form-check-label" for="cash">نقد</label> + </div> + <div class="form-check"> + <input id="paypal" name="paymentMethod" type="radio" class="form-check-input" required> + <label class="form-check-label" for="paypal">PayPal</label> + </div> + </div> + + <div class="row gy-3"> + <div class="col-md-6"> + <label for="cc-name" class="form-label">الاسم على البطاقة</label> + <input type="text" class="form-control" id="cc-name" placeholder="" required> + <small class="text-muted">الاسم الكامل كما هو معروض على البطاقة</small> + <div class="invalid-feedback"> + الاسم على البطاقة مطلوب + </div> + </div> + + <div class="col-md-6"> + <label for="cc-number" class="form-label">رقم البطاقة</label> + <input type="text" class="form-control" id="cc-number" placeholder="" required> + <div class="invalid-feedback"> + رقم بطاقة الائتمان مطلوب + </div> + </div> + + <div class="col-md-3"> + <label for="cc-expiration" class="form-label">تاريخ انتهاء الصلاحية</label> + <input type="text" class="form-control" id="cc-expiration" placeholder="" required> + <div class="invalid-feedback"> + تاريخ انتهاء الصلاحية مطلوب + </div> + </div> + + <div class="col-md-3"> + <label for="cc-cvv" class="form-label">الرمز الثلاثي (CVV)</label> + <input type="text" class="form-control" id="cc-cvv" placeholder="" required> + <div class="invalid-feedback"> + رمز الحماية مطلوب + </div> + </div> + </div> + + <hr class="my-4"> + + <button class="w-100 btn btn-primary btn-lg" type="submit">الاستمرار بالدفع</button> + </form> + </div> + </div> + </main> + <footer class="my-5 pt-5 text-muted text-center text-small"> + <p class="mb-1">© {{< year >}}-2017 اسم الشركة</p> + <ul class="list-inline"> + <li class="list-inline-item"><a href="#">سياسة الخصوصية</a></li> + <li class="list-inline-item"><a href="#">اتفاقية الاستخدام</a></li> + <li class="list-inline-item"><a href="#">الدعم الفني</a></li> + </ul> + </footer> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/form-validation.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/form-validation.css new file mode 100644 index 000000000..e5ea31c40 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/form-validation.css @@ -0,0 +1,3 @@ +.container { + max-width: 960px; +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/form-validation.js b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/form-validation.js new file mode 100644 index 000000000..f8fd583de --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/form-validation.js @@ -0,0 +1,20 @@ +// Example starter JavaScript for disabling form submissions if there are invalid fields +(function () { + 'use strict' + + // Fetch all the forms we want to apply custom Bootstrap validation styles to + var forms = document.querySelectorAll('.needs-validation') + + // Loop over them and prevent submission + Array.prototype.slice.call(forms) + .forEach(function (form) { + form.addEventListener('submit', function (event) { + if (!form.checkValidity()) { + event.preventDefault() + event.stopPropagation() + } + + form.classList.add('was-validated') + }, false) + }) +})() diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/index.html new file mode 100644 index 000000000..4809dc4bb --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/checkout/index.html @@ -0,0 +1,232 @@ +--- +layout: examples +title: Checkout example +extra_css: + - "form-validation.css" +extra_js: + - src: "form-validation.js" +body_class: "bg-light" +--- + +<div class="container"> + <main> + <div class="py-5 text-center"> + <img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57"> + <h2>Checkout form</h2> + <p class="lead">Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.</p> + </div> + + <div class="row g-5"> + <div class="col-md-5 col-lg-4 order-md-last"> + <h4 class="d-flex justify-content-between align-items-center mb-3"> + <span class="text-primary">Your cart</span> + <span class="badge bg-primary rounded-pill">3</span> + </h4> + <ul class="list-group mb-3"> + <li class="list-group-item d-flex justify-content-between lh-sm"> + <div> + <h6 class="my-0">Product name</h6> + <small class="text-muted">Brief description</small> + </div> + <span class="text-muted">$12</span> + </li> + <li class="list-group-item d-flex justify-content-between lh-sm"> + <div> + <h6 class="my-0">Second product</h6> + <small class="text-muted">Brief description</small> + </div> + <span class="text-muted">$8</span> + </li> + <li class="list-group-item d-flex justify-content-between lh-sm"> + <div> + <h6 class="my-0">Third item</h6> + <small class="text-muted">Brief description</small> + </div> + <span class="text-muted">$5</span> + </li> + <li class="list-group-item d-flex justify-content-between bg-light"> + <div class="text-success"> + <h6 class="my-0">Promo code</h6> + <small>EXAMPLECODE</small> + </div> + <span class="text-success">−$5</span> + </li> + <li class="list-group-item d-flex justify-content-between"> + <span>Total (USD)</span> + <strong>$20</strong> + </li> + </ul> + + <form class="card p-2"> + <div class="input-group"> + <input type="text" class="form-control" placeholder="Promo code"> + <button type="submit" class="btn btn-secondary">Redeem</button> + </div> + </form> + </div> + <div class="col-md-7 col-lg-8"> + <h4 class="mb-3">Billing address</h4> + <form class="needs-validation" novalidate> + <div class="row g-3"> + <div class="col-sm-6"> + <label for="firstName" class="form-label">First name</label> + <input type="text" class="form-control" id="firstName" placeholder="" value="" required> + <div class="invalid-feedback"> + Valid first name is required. + </div> + </div> + + <div class="col-sm-6"> + <label for="lastName" class="form-label">Last name</label> + <input type="text" class="form-control" id="lastName" placeholder="" value="" required> + <div class="invalid-feedback"> + Valid last name is required. + </div> + </div> + + <div class="col-12"> + <label for="username" class="form-label">Username</label> + <div class="input-group has-validation"> + <span class="input-group-text">@</span> + <input type="text" class="form-control" id="username" placeholder="Username" required> + <div class="invalid-feedback"> + Your username is required. + </div> + </div> + </div> + + <div class="col-12"> + <label for="email" class="form-label">Email <span class="text-muted">(Optional)</span></label> + <input type="email" class="form-control" id="email" placeholder="you@example.com"> + <div class="invalid-feedback"> + Please enter a valid email address for shipping updates. + </div> + </div> + + <div class="col-12"> + <label for="address" class="form-label">Address</label> + <input type="text" class="form-control" id="address" placeholder="1234 Main St" required> + <div class="invalid-feedback"> + Please enter your shipping address. + </div> + </div> + + <div class="col-12"> + <label for="address2" class="form-label">Address 2 <span class="text-muted">(Optional)</span></label> + <input type="text" class="form-control" id="address2" placeholder="Apartment or suite"> + </div> + + <div class="col-md-5"> + <label for="country" class="form-label">Country</label> + <select class="form-select" id="country" required> + <option value="">Choose...</option> + <option>United States</option> + </select> + <div class="invalid-feedback"> + Please select a valid country. + </div> + </div> + + <div class="col-md-4"> + <label for="state" class="form-label">State</label> + <select class="form-select" id="state" required> + <option value="">Choose...</option> + <option>California</option> + </select> + <div class="invalid-feedback"> + Please provide a valid state. + </div> + </div> + + <div class="col-md-3"> + <label for="zip" class="form-label">Zip</label> + <input type="text" class="form-control" id="zip" placeholder="" required> + <div class="invalid-feedback"> + Zip code required. + </div> + </div> + </div> + + <hr class="my-4"> + + <div class="form-check"> + <input type="checkbox" class="form-check-input" id="same-address"> + <label class="form-check-label" for="same-address">Shipping address is the same as my billing address</label> + </div> + + <div class="form-check"> + <input type="checkbox" class="form-check-input" id="save-info"> + <label class="form-check-label" for="save-info">Save this information for next time</label> + </div> + + <hr class="my-4"> + + <h4 class="mb-3">Payment</h4> + + <div class="my-3"> + <div class="form-check"> + <input id="credit" name="paymentMethod" type="radio" class="form-check-input" checked required> + <label class="form-check-label" for="credit">Credit card</label> + </div> + <div class="form-check"> + <input id="debit" name="paymentMethod" type="radio" class="form-check-input" required> + <label class="form-check-label" for="debit">Debit card</label> + </div> + <div class="form-check"> + <input id="paypal" name="paymentMethod" type="radio" class="form-check-input" required> + <label class="form-check-label" for="paypal">PayPal</label> + </div> + </div> + + <div class="row gy-3"> + <div class="col-md-6"> + <label for="cc-name" class="form-label">Name on card</label> + <input type="text" class="form-control" id="cc-name" placeholder="" required> + <small class="text-muted">Full name as displayed on card</small> + <div class="invalid-feedback"> + Name on card is required + </div> + </div> + + <div class="col-md-6"> + <label for="cc-number" class="form-label">Credit card number</label> + <input type="text" class="form-control" id="cc-number" placeholder="" required> + <div class="invalid-feedback"> + Credit card number is required + </div> + </div> + + <div class="col-md-3"> + <label for="cc-expiration" class="form-label">Expiration</label> + <input type="text" class="form-control" id="cc-expiration" placeholder="" required> + <div class="invalid-feedback"> + Expiration date required + </div> + </div> + + <div class="col-md-3"> + <label for="cc-cvv" class="form-label">CVV</label> + <input type="text" class="form-control" id="cc-cvv" placeholder="" required> + <div class="invalid-feedback"> + Security code required + </div> + </div> + </div> + + <hr class="my-4"> + + <button class="w-100 btn btn-primary btn-lg" type="submit">Continue to checkout</button> + </form> + </div> + </div> + </main> + + <footer class="my-5 pt-5 text-muted text-center text-small"> + <p class="mb-1">© 2017–{{< year >}} Company Name</p> + <ul class="list-inline"> + <li class="list-inline-item"><a href="#">Privacy</a></li> + <li class="list-inline-item"><a href="#">Terms</a></li> + <li class="list-inline-item"><a href="#">Support</a></li> + </ul> + </footer> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/cover/cover.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cover/cover.css index 7c6d33cdd..87afc3be9 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/cover/cover.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cover/cover.css @@ -2,12 +2,6 @@ * Globals */ -/* Links */ -a, -a:focus, -a:hover { - color: #fff; -} /* Custom default button */ .btn-secondary, @@ -15,8 +9,6 @@ a:hover { .btn-secondary:focus { color: #333; text-shadow: none; /* Prevent inheritance from `body` */ - background-color: #fff; - border: .05rem solid #fff; } @@ -24,16 +16,7 @@ a:hover { * Base structure */ -html, -body { - height: 100%; - background-color: #333; -} - body { - display: -ms-flexbox; - display: flex; - color: #fff; text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5); box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5); } @@ -46,13 +29,6 @@ body { /* * Header */ -.masthead { - margin-bottom: 2rem; -} - -.masthead-brand { - margin-bottom: 0; -} .nav-masthead .nav-link { padding: .25rem 0; @@ -75,32 +51,3 @@ body { color: #fff; border-bottom-color: #fff; } - -@media (min-width: 48em) { - .masthead-brand { - float: left; - } - .nav-masthead { - float: right; - } -} - - -/* - * Cover - */ -.cover { - padding: 0 1.5rem; -} -.cover .btn-lg { - padding: .75rem 1.25rem; - font-weight: 700; -} - - -/* - * Footer - */ -.mastfoot { - color: rgba(255, 255, 255, .5); -} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cover/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cover/index.html new file mode 100644 index 000000000..10362083e --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/cover/index.html @@ -0,0 +1,34 @@ +--- +layout: examples +title: Cover Template +extra_css: + - "cover.css" +html_class: "h-100" +body_class: "d-flex h-100 text-center text-white bg-dark" +include_js: false +--- + +<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column"> + <header class="mb-auto"> + <div> + <h3 class="float-md-start mb-0">Cover</h3> + <nav class="nav nav-masthead justify-content-center float-md-end"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + <a class="nav-link" href="#">Features</a> + <a class="nav-link" href="#">Contact</a> + </nav> + </div> + </header> + + <main class="px-3"> + <h1>Cover your page.</h1> + <p class="lead">Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo to make it your own.</p> + <p class="lead"> + <a href="#" class="btn btn-lg btn-secondary fw-bold border-white bg-white">Learn more</a> + </p> + </main> + + <footer class="mt-auto text-white-50"> + <p>Cover template for <a href="https://getbootstrap.com/" class="text-white">Bootstrap</a>, by <a href="https://twitter.com/mdo" class="text-white">@mdo</a>.</p> + </footer> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard-rtl/dashboard.js b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard-rtl/dashboard.js new file mode 100644 index 000000000..7831fa9d0 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard-rtl/dashboard.js @@ -0,0 +1,53 @@ +/* globals Chart:false, feather:false */ + +(function () { + 'use strict' + + feather.replace({ 'aria-hidden': 'true' }) + + // Graphs + var ctx = document.getElementById('myChart') + // eslint-disable-next-line no-unused-vars + var myChart = new Chart(ctx, { + type: 'line', + data: { + labels: [ + 'الأحد', + 'الإثنين', + 'الثلاثاء', + 'الأربعاء', + 'الخميس', + 'الجمعة', + 'السبت' + ], + datasets: [{ + data: [ + 15339, + 21345, + 18483, + 24003, + 23489, + 24092, + 12034 + ], + lineTension: 0, + backgroundColor: 'transparent', + borderColor: '#007bff', + borderWidth: 4, + pointBackgroundColor: '#007bff' + }] + }, + options: { + scales: { + yAxes: [{ + ticks: { + beginAtZero: false + } + }] + }, + legend: { + display: false + } + } + }) +})() diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard-rtl/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard-rtl/index.html new file mode 100644 index 000000000..daef89a14 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard-rtl/index.html @@ -0,0 +1,253 @@ +--- +layout: examples +title: قالب لوحة القيادة +direction: rtl +extra_css: + - "../dashboard/dashboard.rtl.css" +extra_js: + - src: "https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.24.1/feather.min.js" + integrity: "sha384-EbSscX4STvYAC/DxHse8z5gEDaNiKAIGW+EpfzYTfQrgIlHywXXrM9SUIZ0BlyfF" + - src: "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" + integrity: "sha384-i+dHPTzZw7YVZOx9lbH5l6lP74sLRtMtwN2XjVqjf3uAGAREAF4LMIUDTWEVs4LI" + - src: "dashboard.js" +--- + +<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow"> + <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">اسم الشركة</a> + <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="عرض/إخفاء لوحة التنقل"> + <span class="navbar-toggler-icon"></span> + </button> + <input class="form-control form-control-dark w-100" type="text" placeholder="بحث" aria-label="بحث"> + <div class="navbar-nav"> + <div class="nav-item text-nowrap"> + <a class="nav-link px-3" href="#">تسجيل الخروج</a> + </div> + </div> +</header> + +<div class="container-fluid"> + <div class="row"> + <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse"> + <div class="position-sticky pt-3"> + <ul class="nav flex-column"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#"> + <span data-feather="home"></span> + لوحة القيادة + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="file"></span> + الطلبات + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="shopping-cart"></span> + المنتجات + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="users"></span> + الزبائن + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="bar-chart-2"></span> + التقارير + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="layers"></span> + التكاملات + </a> + </li> + </ul> + + <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"> + <span>التقارير المحفوظة</span> + <a class="link-secondary" href="#" aria-label="إضافة تقرير جديد"> + <span data-feather="plus-circle"></span> + </a> + </h6> + <ul class="nav flex-column mb-2"> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="file-text"></span> + الشهر الحالي + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="file-text"></span> + الربع الأخير + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="file-text"></span> + التفاعل الإجتماعي + </a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#"> + <span data-feather="file-text"></span> + مبيعات نهاية العام + </a> + </li> + </ul> + </div> + </nav> + + <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4"> + <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> + <h1 class="h2">لوحة القيادة</h1> + <div class="btn-toolbar mb-2 mb-md-0"> + <div class="btn-group me-2"> + <button type="button" class="btn btn-sm btn-outline-secondary">مشاركة</button> + <button type="button" class="btn btn-sm btn-outline-secondary">تصدير</button> + </div> + <button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle"> + <span data-feather="calendar"></span> + هذا الأسبوع + </button> + </div> + </div> + + <canvas class="my-4 w-100" id="myChart" width="900" height="380"></canvas> + + <h2>عنوان القسم</h2> + <div class="table-responsive"> + <table class="table table-striped table-sm"> + <thead> + <tr> + <th scope="col">#</th> + <th scope="col">عنوان</th> + <th scope="col">عنوان</th> + <th scope="col">عنوان</th> + <th scope="col">عنوان</th> + </tr> + </thead> + <tbody> + <tr> + <td>1,001</td> + <td>بيانات</td> + <td>عشوائية</td> + <td>تثري</td> + <td>الجدول</td> + </tr> + <tr> + <td>1,002</td> + <td>تثري</td> + <td>مبهة</td> + <td>تصميم</td> + <td>تنسيق</td> + </tr> + <tr> + <td>1,003</td> + <td>عشوائية</td> + <td>غنية</td> + <td>قيمة</td> + <td>مفيدة</td> + </tr> + <tr> + <td>1,003</td> + <td>معلومات</td> + <td>تثري</td> + <td>توضيحية</td> + <td>عشوائية</td> + </tr> + <tr> + <td>1,004</td> + <td>الجدول</td> + <td>بيانات</td> + <td>تنسيق</td> + <td>قيمة</td> + </tr> + <tr> + <td>1,005</td> + <td>قيمة</td> + <td>مبهة</td> + <td>الجدول</td> + <td>تثري</td> + </tr> + <tr> + <td>1,006</td> + <td>قيمة</td> + <td>توضيحية</td> + <td>غنية</td> + <td>عشوائية</td> + </tr> + <tr> + <td>1,007</td> + <td>تثري</td> + <td>مفيدة</td> + <td>معلومات</td> + <td>مبهة</td> + </tr> + <tr> + <td>1,008</td> + <td>بيانات</td> + <td>عشوائية</td> + <td>تثري</td> + <td>الجدول</td> + </tr> + <tr> + <td>1,009</td> + <td>تثري</td> + <td>مبهة</td> + <td>تصميم</td> + <td>تنسيق</td> + </tr> + <tr> + <td>1,010</td> + <td>عشوائية</td> + <td>غنية</td> + <td>قيمة</td> + <td>مفيدة</td> + </tr> + <tr> + <td>1,011</td> + <td>معلومات</td> + <td>تثري</td> + <td>توضيحية</td> + <td>عشوائية</td> + </tr> + <tr> + <td>1,012</td> + <td>الجدول</td> + <td>تثري</td> + <td>تنسيق</td> + <td>قيمة</td> + </tr> + <tr> + <td>1,013</td> + <td>قيمة</td> + <td>مبهة</td> + <td>الجدول</td> + <td>تصميم</td> + </tr> + <tr> + <td>1,014</td> + <td>قيمة</td> + <td>توضيحية</td> + <td>غنية</td> + <td>عشوائية</td> + </tr> + <tr> + <td>1,015</td> + <td>بيانات</td> + <td>مفيدة</td> + <td>معلومات</td> + <td>الجدول</td> + </tr> + </tbody> + </table> + </div> + </main> + </div> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/dashboard/dashboard.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.css index b71942ad1..e1099fbb3 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/dashboard/dashboard.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.css @@ -15,7 +15,11 @@ body { .sidebar { position: fixed; top: 0; + /* rtl:raw: + right: 0; + */ bottom: 0; + /* rtl:remove */ left: 0; z-index: 100; /* Behind the navbar */ padding: 48px 0 0; /* Height of navbar */ @@ -37,13 +41,6 @@ body { overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ } -@supports ((position: -webkit-sticky) or (position: sticky)) { - .sidebar-sticky { - position: -webkit-sticky; - position: sticky; - } -} - .sidebar .nav-link { font-weight: 500; color: #333; @@ -51,11 +48,11 @@ body { .sidebar .nav-link .feather { margin-right: 4px; - color: #999; + color: #727272; } .sidebar .nav-link.active { - color: #007bff; + color: #2470dc; } .sidebar .nav-link:hover .feather, diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/dashboard/dashboard.js b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.js index d3f549928..7c2402ae2 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/dashboard/dashboard.js +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.js @@ -3,7 +3,7 @@ (function () { 'use strict' - feather.replace() + feather.replace({ 'aria-hidden': 'true' }) // Graphs var ctx = document.getElementById('myChart') diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.rtl.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.rtl.css new file mode 100644 index 000000000..a88226ecf --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/dashboard.rtl.css @@ -0,0 +1,96 @@ +body { + font-size: .875rem; +} + +.feather { + width: 16px; + height: 16px; + vertical-align: text-bottom; +} + +/* + * Sidebar + */ + +.sidebar { + position: fixed; + top: 0; + right: 0; + bottom: 0; + z-index: 100; /* Behind the navbar */ + padding: 48px 0 0; /* Height of navbar */ + box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1); +} + +@media (max-width: 767.98px) { + .sidebar { + top: 5rem; + } +} + +.sidebar-sticky { + position: relative; + top: 0; + height: calc(100vh - 48px); + padding-top: .5rem; + overflow-x: hidden; + overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ +} + +.sidebar .nav-link { + font-weight: 500; + color: #333; +} + +.sidebar .nav-link .feather { + margin-left: 4px; + color: #727272; +} + +.sidebar .nav-link.active { + color: #2470dc; +} + +.sidebar .nav-link:hover .feather, +.sidebar .nav-link.active .feather { + color: inherit; +} + +.sidebar-heading { + font-size: .75rem; + text-transform: uppercase; +} + +/* + * Navbar + */ + +.navbar-brand { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: 1rem; + background-color: rgba(0, 0, 0, .25); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, .25); +} + +.navbar .navbar-toggler { + top: .25rem; + left: 1rem; +} + +.navbar .form-control { + padding: .75rem 1rem; + border-width: 0; + border-radius: 0; +} + +.form-control-dark { + color: #fff; + background-color: rgba(255, 255, 255, .1); + border-color: rgba(255, 255, 255, .1); +} + +.form-control-dark:focus { + border-color: transparent; + box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); +} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/dashboard/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/index.html index c3096a554..04c187dbc 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/dashboard/index.html +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/dashboard/index.html @@ -4,33 +4,35 @@ title: Dashboard Template extra_css: - "dashboard.css" extra_js: - - "https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" - - "https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" - - "dashboard.js" + - src: "https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" + integrity: "sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" + - src: "https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" + integrity: "sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha" + - src: "dashboard.js" --- -<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow"> - <a class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="#">Company name</a> - <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-toggle="collapse" data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation"> +<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow"> + <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">Company name</a> + <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search"> - <ul class="navbar-nav px-3"> - <li class="nav-item text-nowrap"> - <a class="nav-link" href="#">Sign out</a> - </li> - </ul> -</nav> + <div class="navbar-nav"> + <div class="nav-item text-nowrap"> + <a class="nav-link px-3" href="#">Sign out</a> + </div> + </div> +</header> <div class="container-fluid"> <div class="row"> <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse"> - <div class="sidebar-sticky pt-3"> + <div class="position-sticky pt-3"> <ul class="nav flex-column"> <li class="nav-item"> - <a class="nav-link active" href="#"> + <a class="nav-link active" aria-current="page" href="#"> <span data-feather="home"></span> - Dashboard <span class="sr-only">(current)</span> + Dashboard </a> </li> <li class="nav-item"> @@ -67,7 +69,7 @@ extra_js: <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"> <span>Saved reports</span> - <a class="d-flex align-items-center text-muted" href="#" aria-label="Add a new report"> + <a class="link-secondary" href="#" aria-label="Add a new report"> <span data-feather="plus-circle"></span> </a> </h6> @@ -100,11 +102,11 @@ extra_js: </div> </nav> - <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4"> + <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4"> <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> <h1 class="h2">Dashboard</h1> <div class="btn-toolbar mb-2 mb-md-0"> - <div class="btn-group mr-2"> + <div class="btn-group me-2"> <button type="button" class="btn btn-sm btn-outline-secondary">Share</button> <button type="button" class="btn btn-sm btn-outline-secondary">Export</button> </div> @@ -122,11 +124,11 @@ extra_js: <table class="table table-striped table-sm"> <thead> <tr> - <th>#</th> - <th>Header</th> - <th>Header</th> - <th>Header</th> - <th>Header</th> + <th scope="col">#</th> + <th scope="col">Header</th> + <th scope="col">Header</th> + <th scope="col">Header</th> + <th scope="col">Header</th> </tr> </thead> <tbody> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/features.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/features.css new file mode 100644 index 000000000..33942f7f1 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/features.css @@ -0,0 +1,61 @@ +.b-example-divider { + height: 3rem; + background-color: rgba(0, 0, 0, .1); + border: solid rgba(0, 0, 0, .15); + border-width: 1px 0; + box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); +} + +.bi { + vertical-align: -.125em; + fill: currentColor; +} + +.feature-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 4rem; + height: 4rem; + margin-bottom: 1rem; + font-size: 2rem; + color: #fff; + border-radius: .75rem; +} + +.icon-link { + display: inline-flex; + align-items: center; +} +.icon-link > .bi { + margin-top: .125rem; + margin-left: .125rem; + transition: transform .25s ease-in-out; + fill: currentColor; +} +.icon-link:hover > .bi { + transform: translate(.25rem); +} + +.icon-square { + display: inline-flex; + align-items: center; + justify-content: center; + width: 3rem; + height: 3rem; + font-size: 1.5rem; + border-radius: .75rem; +} + +.rounded-4 { border-radius: .5rem; } +.rounded-5 { border-radius: 1rem; } + +.text-shadow-1 { text-shadow: 0 .125rem .25rem rgba(0, 0, 0, .25); } +.text-shadow-2 { text-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); } +.text-shadow-3 { text-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25); } + +.card-cover { + background-repeat: no-repeat; + background-position: center center; + background-size: cover; +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/index.html new file mode 100644 index 000000000..1e331f00a --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/index.html @@ -0,0 +1,288 @@ +--- +layout: examples +title: Features +extra_css: + - "features.css" +body_class: "" +--- + +<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> + <symbol id="bootstrap" viewBox="0 0 118 94"> + <title>Bootstrap</title> + <path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z"></path> + </symbol> + <symbol id="home" viewBox="0 0 16 16"> + <path d="M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4.5a.5.5 0 0 0 .5-.5v-4h2v4a.5.5 0 0 0 .5.5H14a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146zM2.5 14V7.707l5.5-5.5 5.5 5.5V14H10v-4a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v4H2.5z"/> + </symbol> + <symbol id="speedometer2" viewBox="0 0 16 16"> + <path d="M8 4a.5.5 0 0 1 .5.5V6a.5.5 0 0 1-1 0V4.5A.5.5 0 0 1 8 4zM3.732 5.732a.5.5 0 0 1 .707 0l.915.914a.5.5 0 1 1-.708.708l-.914-.915a.5.5 0 0 1 0-.707zM2 10a.5.5 0 0 1 .5-.5h1.586a.5.5 0 0 1 0 1H2.5A.5.5 0 0 1 2 10zm9.5 0a.5.5 0 0 1 .5-.5h1.5a.5.5 0 0 1 0 1H12a.5.5 0 0 1-.5-.5zm.754-4.246a.389.389 0 0 0-.527-.02L7.547 9.31a.91.91 0 1 0 1.302 1.258l3.434-4.297a.389.389 0 0 0-.029-.518z"/> + <path fill-rule="evenodd" d="M0 10a8 8 0 1 1 15.547 2.661c-.442 1.253-1.845 1.602-2.932 1.25C11.309 13.488 9.475 13 8 13c-1.474 0-3.31.488-4.615.911-1.087.352-2.49.003-2.932-1.25A7.988 7.988 0 0 1 0 10zm8-7a7 7 0 0 0-6.603 9.329c.203.575.923.876 1.68.63C4.397 12.533 6.358 12 8 12s3.604.532 4.923.96c.757.245 1.477-.056 1.68-.631A7 7 0 0 0 8 3z"/> + </symbol> + <symbol id="table" viewBox="0 0 16 16"> + <path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"/> + </symbol> + <symbol id="people-circle" viewBox="0 0 16 16"> + <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/> + <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/> + </symbol> + <symbol id="grid" viewBox="0 0 16 16"> + <path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/> + </symbol> + <symbol id="collection" viewBox="0 0 16 16"> + <path d="M2.5 3.5a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1h-11zm2-2a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1h-7zM0 13a1.5 1.5 0 0 0 1.5 1.5h13A1.5 1.5 0 0 0 16 13V6a1.5 1.5 0 0 0-1.5-1.5h-13A1.5 1.5 0 0 0 0 6v7zm1.5.5A.5.5 0 0 1 1 13V6a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-13z"/> + </symbol> + <symbol id="calendar3" viewBox="0 0 16 16"> + <path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/> + <path d="M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/> + </symbol> + <symbol id="chat-quote-fill" viewBox="0 0 16 16"> + <path d="M16 8c0 3.866-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234-.2.032-.352-.176-.273-.362.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7zM7.194 6.766a1.688 1.688 0 0 0-.227-.272 1.467 1.467 0 0 0-.469-.324l-.008-.004A1.785 1.785 0 0 0 5.734 6C4.776 6 4 6.746 4 7.667c0 .92.776 1.666 1.734 1.666.343 0 .662-.095.931-.26-.137.389-.39.804-.81 1.22a.405.405 0 0 0 .011.59c.173.16.447.155.614-.01 1.334-1.329 1.37-2.758.941-3.706a2.461 2.461 0 0 0-.227-.4zM11 9.073c-.136.389-.39.804-.81 1.22a.405.405 0 0 0 .012.59c.172.16.446.155.613-.01 1.334-1.329 1.37-2.758.942-3.706a2.466 2.466 0 0 0-.228-.4 1.686 1.686 0 0 0-.227-.273 1.466 1.466 0 0 0-.469-.324l-.008-.004A1.785 1.785 0 0 0 10.07 6c-.957 0-1.734.746-1.734 1.667 0 .92.777 1.666 1.734 1.666.343 0 .662-.095.931-.26z"/> + </symbol> + <symbol id="cpu-fill" viewBox="0 0 16 16"> + <path d="M6.5 6a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/> + <path d="M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5h3A1.5 1.5 0 0 1 11 6.5v3A1.5 1.5 0 0 1 9.5 11h-3A1.5 1.5 0 0 1 5 9.5v-3A1.5 1.5 0 0 1 6.5 5z"/> + </symbol> + <symbol id="gear-fill" viewBox="0 0 16 16"> + <path d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z"/> + </symbol> + <symbol id="speedometer" viewBox="0 0 16 16"> + <path d="M8 2a.5.5 0 0 1 .5.5V4a.5.5 0 0 1-1 0V2.5A.5.5 0 0 1 8 2zM3.732 3.732a.5.5 0 0 1 .707 0l.915.914a.5.5 0 1 1-.708.708l-.914-.915a.5.5 0 0 1 0-.707zM2 8a.5.5 0 0 1 .5-.5h1.586a.5.5 0 0 1 0 1H2.5A.5.5 0 0 1 2 8zm9.5 0a.5.5 0 0 1 .5-.5h1.5a.5.5 0 0 1 0 1H12a.5.5 0 0 1-.5-.5zm.754-4.246a.389.389 0 0 0-.527-.02L7.547 7.31A.91.91 0 1 0 8.85 8.569l3.434-4.297a.389.389 0 0 0-.029-.518z"/> + <path fill-rule="evenodd" d="M6.664 15.889A8 8 0 1 1 9.336.11a8 8 0 0 1-2.672 15.78zm-4.665-4.283A11.945 11.945 0 0 1 8 10c2.186 0 4.236.585 6.001 1.606a7 7 0 1 0-12.002 0z"/> + </symbol> + <symbol id="toggles2" viewBox="0 0 16 16"> + <path d="M9.465 10H12a2 2 0 1 1 0 4H9.465c.34-.588.535-1.271.535-2 0-.729-.195-1.412-.535-2z"/> + <path d="M6 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm.535-10a3.975 3.975 0 0 1-.409-1H4a1 1 0 0 1 0-2h2.126c.091-.355.23-.69.41-1H4a2 2 0 1 0 0 4h2.535z"/> + <path d="M14 4a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/> + </symbol> + <symbol id="tools" viewBox="0 0 16 16"> + <path d="M1 0L0 1l2.2 3.081a1 1 0 0 0 .815.419h.07a1 1 0 0 1 .708.293l2.675 2.675-2.617 2.654A3.003 3.003 0 0 0 0 13a3 3 0 1 0 5.878-.851l2.654-2.617.968.968-.305.914a1 1 0 0 0 .242 1.023l3.356 3.356a1 1 0 0 0 1.414 0l1.586-1.586a1 1 0 0 0 0-1.414l-3.356-3.356a1 1 0 0 0-1.023-.242L10.5 9.5l-.96-.96 2.68-2.643A3.005 3.005 0 0 0 16 3c0-.269-.035-.53-.102-.777l-2.14 2.141L12 4l-.364-1.757L13.777.102a3 3 0 0 0-3.675 3.68L7.462 6.46 4.793 3.793a1 1 0 0 1-.293-.707v-.071a1 1 0 0 0-.419-.814L1 0zm9.646 10.646a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708zM3 11l.471.242.529.026.287.445.445.287.026.529L5 13l-.242.471-.026.529-.445.287-.287.445-.529.026L3 15l-.471-.242L2 14.732l-.287-.445L1.268 14l-.026-.529L1 13l.242-.471.026-.529.445-.287.287-.445.529-.026L3 11z"/> + </symbol> + <symbol id="chevron-right" viewBox="0 0 16 16"> + <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/> + </symbol> + <symbol id="geo-fill" viewBox="0 0 16 16"> + <path fill-rule="evenodd" d="M4 4a4 4 0 1 1 4.5 3.969V13.5a.5.5 0 0 1-1 0V7.97A4 4 0 0 1 4 3.999zm2.493 8.574a.5.5 0 0 1-.411.575c-.712.118-1.28.295-1.655.493a1.319 1.319 0 0 0-.37.265.301.301 0 0 0-.057.09V14l.002.008a.147.147 0 0 0 .016.033.617.617 0 0 0 .145.15c.165.13.435.27.813.395.751.25 1.82.414 3.024.414s2.273-.163 3.024-.414c.378-.126.648-.265.813-.395a.619.619 0 0 0 .146-.15.148.148 0 0 0 .015-.033L12 14v-.004a.301.301 0 0 0-.057-.09 1.318 1.318 0 0 0-.37-.264c-.376-.198-.943-.375-1.655-.493a.5.5 0 1 1 .164-.986c.77.127 1.452.328 1.957.594C12.5 13 13 13.4 13 14c0 .426-.26.752-.544.977-.29.228-.68.413-1.116.558-.878.293-2.059.465-3.34.465-1.281 0-2.462-.172-3.34-.465-.436-.145-.826-.33-1.116-.558C3.26 14.752 3 14.426 3 14c0-.599.5-1 .961-1.243.505-.266 1.187-.467 1.957-.594a.5.5 0 0 1 .575.411z"/> + </symbol> +</svg> +<main> + <h1 class="visually-hidden">Features examples</h1> + + <div class="container px-4 py-5" id="featured-3"> + <h2 class="pb-2 border-bottom">Columns with icons</h2> + <div class="row g-4 py-5 row-cols-1 row-cols-lg-3"> + <div class="feature col"> + <div class="feature-icon bg-primary bg-gradient"> + <svg class="bi" width="1em" height="1em"><use xlink:href="#collection"/></svg> + </div> + <h2>Featured title</h2> + <p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p> + <a href="#" class="icon-link"> + Call to action + <svg class="bi" width="1em" height="1em"><use xlink:href="#chevron-right"/></svg> + </a> + </div> + <div class="feature col"> + <div class="feature-icon bg-primary bg-gradient"> + <svg class="bi" width="1em" height="1em"><use xlink:href="#people-circle"/></svg> + </div> + <h2>Featured title</h2> + <p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p> + <a href="#" class="icon-link"> + Call to action + <svg class="bi" width="1em" height="1em"><use xlink:href="#chevron-right"/></svg> + </a> + </div> + <div class="feature col"> + <div class="feature-icon bg-primary bg-gradient"> + <svg class="bi" width="1em" height="1em"><use xlink:href="#toggles2"/></svg> + </div> + <h2>Featured title</h2> + <p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p> + <a href="#" class="icon-link"> + Call to action + <svg class="bi" width="1em" height="1em"><use xlink:href="#chevron-right"/></svg> + </a> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="container px-4 py-5" id="hanging-icons"> + <h2 class="pb-2 border-bottom">Hanging icons</h2> + <div class="row g-4 py-5 row-cols-1 row-cols-lg-3"> + <div class="col d-flex align-items-start"> + <div class="icon-square bg-light text-dark flex-shrink-0 me-3"> + <svg class="bi" width="1em" height="1em"><use xlink:href="#toggles2"/></svg> + </div> + <div> + <h2>Featured title</h2> + <p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p> + <a href="#" class="btn btn-primary"> + Primary button + </a> + </div> + </div> + <div class="col d-flex align-items-start"> + <div class="icon-square bg-light text-dark flex-shrink-0 me-3"> + <svg class="bi" width="1em" height="1em"><use xlink:href="#cpu-fill"/></svg> + </div> + <div> + <h2>Featured title</h2> + <p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p> + <a href="#" class="btn btn-primary"> + Primary button + </a> + </div> + </div> + <div class="col d-flex align-items-start"> + <div class="icon-square bg-light text-dark flex-shrink-0 me-3"> + <svg class="bi" width="1em" height="1em"><use xlink:href="#tools"/></svg> + </div> + <div> + <h2>Featured title</h2> + <p>Paragraph of text beneath the heading to explain the heading. We'll add onto it with another sentence and probably just keep going until we run out of words.</p> + <a href="#" class="btn btn-primary"> + Primary button + </a> + </div> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="container px-4 py-5" id="custom-cards"> + <h2 class="pb-2 border-bottom">Custom cards</h2> + + <div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5"> + <div class="col"> + <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style="background-image: url('unsplash-photo-1.jpg');"> + <div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1"> + <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Short title, long jacket</h2> + <ul class="d-flex list-unstyled mt-auto"> + <li class="me-auto"> + <img src="https://github.com/twbs.png" alt="Bootstrap" width="32" height="32" class="rounded-circle border border-white"> + </li> + <li class="d-flex align-items-center me-3"> + <svg class="bi me-2" width="1em" height="1em"><use xlink:href="#geo-fill"/></svg> + <small>Earth</small> + </li> + <li class="d-flex align-items-center"> + <svg class="bi me-2" width="1em" height="1em"><use xlink:href="#calendar3"/></svg> + <small>3d</small> + </li> + </ul> + </div> + </div> + </div> + + <div class="col"> + <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style="background-image: url('unsplash-photo-2.jpg');"> + <div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1"> + <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Much longer title that wraps to multiple lines</h2> + <ul class="d-flex list-unstyled mt-auto"> + <li class="me-auto"> + <img src="https://github.com/twbs.png" alt="Bootstrap" width="32" height="32" class="rounded-circle border border-white"> + </li> + <li class="d-flex align-items-center me-3"> + <svg class="bi me-2" width="1em" height="1em"><use xlink:href="#geo-fill"/></svg> + <small>Pakistan</small> + </li> + <li class="d-flex align-items-center"> + <svg class="bi me-2" width="1em" height="1em"><use xlink:href="#calendar3"/></svg> + <small>4d</small> + </li> + </ul> + </div> + </div> + </div> + + <div class="col"> + <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style="background-image: url('unsplash-photo-3.jpg');"> + <div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1"> + <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Another longer title belongs here</h2> + <ul class="d-flex list-unstyled mt-auto"> + <li class="me-auto"> + <img src="https://github.com/twbs.png" alt="Bootstrap" width="32" height="32" class="rounded-circle border border-white"> + </li> + <li class="d-flex align-items-center me-3"> + <svg class="bi me-2" width="1em" height="1em"><use xlink:href="#geo-fill"/></svg> + <small>California</small> + </li> + <li class="d-flex align-items-center"> + <svg class="bi me-2" width="1em" height="1em"><use xlink:href="#calendar3"/></svg> + <small>5d</small> + </li> + </ul> + </div> + </div> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="container px-4 py-5" id="icon-grid"> + <h2 class="pb-2 border-bottom">Icon grid</h2> + + <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4 py-5"> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#bootstrap"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#cpu-fill"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#calendar3"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#home"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#speedometer2"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#toggles2"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#geo-fill"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + <div class="col d-flex align-items-start"> + <svg class="bi text-muted flex-shrink-0 me-3" width="1.75em" height="1.75em"><use xlink:href="#tools"/></svg> + <div> + <h4 class="fw-bold mb-0">Featured title</h4> + <p>Paragraph of text beneath the heading to explain the heading.</p> + </div> + </div> + </div> + </div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-1.jpg b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-1.jpg Binary files differnew file mode 100644 index 000000000..ed2e36a78 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-1.jpg diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-2.jpg b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-2.jpg Binary files differnew file mode 100644 index 000000000..b66864a00 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-2.jpg diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-3.jpg b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-3.jpg Binary files differnew file mode 100644 index 000000000..c411b17ec --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/features/unsplash-photo-3.jpg diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/grid/grid.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/grid/grid.css index 8032c31c3..18e3568b1 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/grid/grid.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/grid/grid.css @@ -1,13 +1,13 @@ .themed-grid-col { - padding-top: 15px; - padding-bottom: 15px; + padding-top: .75rem; + padding-bottom: .75rem; background-color: rgba(86, 61, 124, .15); border: 1px solid rgba(86, 61, 124, .2); } .themed-container { - padding: 15px; - margin-bottom: 30px; + padding: .75rem; + margin-bottom: 1.5rem; background-color: rgba(0, 123, 255, .15); border: 1px solid rgba(0, 123, 255, .2); } diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/grid/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/grid/index.html new file mode 100644 index 000000000..f26829b4f --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/grid/index.html @@ -0,0 +1,188 @@ +--- +layout: examples +title: Grid Template +extra_css: + - "grid.css" +body_class: "py-4" +include_js: false +--- + +<main> + <div class="container"> + + <h1>Bootstrap grid examples</h1> + <p class="lead">Basic grid layouts to get you familiar with building within the Bootstrap grid system.</p> + <p>In these examples the <code>.themed-grid-col</code> class is added to the columns to add some theming. This is not a class that is available in Bootstrap by default.</p> + + <h2 class="mt-4">Five grid tiers</h2> + <p>There are five tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.</p> + + <div class="row mb-3"> + <div class="col-4 themed-grid-col">.col-4</div> + <div class="col-4 themed-grid-col">.col-4</div> + <div class="col-4 themed-grid-col">.col-4</div> + </div> + + <div class="row mb-3"> + <div class="col-sm-4 themed-grid-col">.col-sm-4</div> + <div class="col-sm-4 themed-grid-col">.col-sm-4</div> + <div class="col-sm-4 themed-grid-col">.col-sm-4</div> + </div> + + <div class="row mb-3"> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + </div> + + <div class="row mb-3"> + <div class="col-lg-4 themed-grid-col">.col-lg-4</div> + <div class="col-lg-4 themed-grid-col">.col-lg-4</div> + <div class="col-lg-4 themed-grid-col">.col-lg-4</div> + </div> + + <div class="row mb-3"> + <div class="col-xl-4 themed-grid-col">.col-xl-4</div> + <div class="col-xl-4 themed-grid-col">.col-xl-4</div> + <div class="col-xl-4 themed-grid-col">.col-xl-4</div> + </div> + + <div class="row mb-3"> + <div class="col-xxl-4 themed-grid-col">.col-xxl-4</div> + <div class="col-xxl-4 themed-grid-col">.col-xxl-4</div> + <div class="col-xxl-4 themed-grid-col">.col-xxl-4</div> + </div> + + <h2 class="mt-4">Three equal columns</h2> + <p>Get three equal-width columns <strong>starting at desktops and scaling to large desktops</strong>. On mobile devices, tablets and below, the columns will automatically stack.</p> + <div class="row mb-3"> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + </div> + + <h2 class="mt-4">Three equal columns alternative</h2> + <p>By using the <code>.row-cols-*</code> classes, you can easily create a grid with equal columns.</p> + <div class="row row-cols-md-3 mb-3"> + <div class="col themed-grid-col"><code>.col</code> child of <code>.row-cols-md-3</code></div> + <div class="col themed-grid-col"><code>.col</code> child of <code>.row-cols-md-3</code></div> + <div class="col themed-grid-col"><code>.col</code> child of <code>.row-cols-md-3</code></div> + </div> + + <h2 class="mt-4">Three unequal columns</h2> + <p>Get three columns <strong>starting at desktops and scaling to large desktops</strong> of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.</p> + <div class="row mb-3"> + <div class="col-md-3 themed-grid-col">.col-md-3</div> + <div class="col-md-6 themed-grid-col">.col-md-6</div> + <div class="col-md-3 themed-grid-col">.col-md-3</div> + </div> + + <h2 class="mt-4">Two columns</h2> + <p>Get two columns <strong>starting at desktops and scaling to large desktops</strong>.</p> + <div class="row mb-3"> + <div class="col-md-8 themed-grid-col">.col-md-8</div> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + </div> + + <h2 class="mt-4">Full width, single column</h2> + <p class="text-warning"> + No grid classes are necessary for full-width elements. + </p> + + <hr class="my-4"> + + <h2 class="mt-4">Two columns with two nested columns</h2> + <p>Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns <strong>starting at desktops and scaling to large desktops</strong>, with another two (equal widths) within the larger column.</p> + <p>At mobile device sizes, tablets and down, these columns and their nested columns will stack.</p> + <div class="row mb-3"> + <div class="col-md-8 themed-grid-col"> + <div class="pb-3"> + .col-md-8 + </div> + <div class="row"> + <div class="col-md-6 themed-grid-col">.col-md-6</div> + <div class="col-md-6 themed-grid-col">.col-md-6</div> + </div> + </div> + <div class="col-md-4 themed-grid-col">.col-md-4</div> + </div> + + <hr class="my-4"> + + <h2 class="mt-4">Mixed: mobile and desktop</h2> + <p>The Bootstrap v4 grid system has five tiers of classes: xs (extra small, this class infix is not used), sm (small), md (medium), lg (large), and xl (extra large). You can use nearly any combination of these classes to create more dynamic and flexible layouts.</p> + <p>Each tier of classes scales up, meaning if you plan on setting the same widths for md, lg and xl, you only need to specify md.</p> + <div class="row mb-3"> + <div class="col-md-8 themed-grid-col">.col-md-8</div> + <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> + </div> + <div class="row mb-3"> + <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> + <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> + <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> + </div> + <div class="row mb-3"> + <div class="col-6 themed-grid-col">.col-6</div> + <div class="col-6 themed-grid-col">.col-6</div> + </div> + + <hr class="my-4"> + + <h2 class="mt-4">Mixed: mobile, tablet, and desktop</h2> + <div class="row mb-3"> + <div class="col-sm-6 col-lg-8 themed-grid-col">.col-sm-6 .col-lg-8</div> + <div class="col-6 col-lg-4 themed-grid-col">.col-6 .col-lg-4</div> + </div> + <div class="row mb-3"> + <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> + <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> + <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> + </div> + + <hr class="my-4"> + + <h2 class="mt-4">Gutters</h2> + <p>With <code>.gx-*</code> classes, the horizontal gutters can be adjusted.</p> + <div class="row row-cols-1 row-cols-md-3 gx-4"> + <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> + </div> + <p class="mt-4">Use the <code>.gy-*</code> classes to control the vertical gutters.</p> + <div class="row row-cols-1 row-cols-md-3 gy-4"> + <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> + </div> + <p class="mt-4">With <code>.g-*</code> classes, the gutters in both directions can be adjusted.</p> + <div class="row row-cols-1 row-cols-md-3 g-3"> + <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> + <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> + </div> + </div> + + <div class="container" id="containers"> + <hr class="my-4"> + + <h2 class="mt-4">Containers</h2> + <p>Additional classes added in Bootstrap v4.4 allow containers that are 100% wide until a particular breakpoint. v5 adds a new <code>xxl</code> breakpoint.</p> + </div> + + <div class="container themed-container">.container</div> + <div class="container-sm themed-container">.container-sm</div> + <div class="container-md themed-container">.container-md</div> + <div class="container-lg themed-container">.container-lg</div> + <div class="container-xl themed-container">.container-xl</div> + <div class="container-xxl themed-container">.container-xxl</div> + <div class="container-fluid themed-container">.container-fluid</div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/headers/headers.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/headers/headers.css new file mode 100644 index 000000000..661a74d55 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/headers/headers.css @@ -0,0 +1,32 @@ +.b-example-divider { + height: 3rem; + background-color: rgba(0, 0, 0, .1); + border: solid rgba(0, 0, 0, .15); + border-width: 1px 0; + box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); +} + +.form-control-dark { + color: #fff; + background-color: var(--bs-dark); + border-color: var(--bs-gray); +} +.form-control-dark:focus { + color: #fff; + background-color: var(--bs-dark); + border-color: #fff; + box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .25); +} + +.bi { + vertical-align: -.125em; + fill: currentColor; +} + +.text-small { + font-size: 85%; +} + +.dropdown-toggle { + outline: 0; +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/headers/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/headers/index.html new file mode 100644 index 000000000..e15b47e5f --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/headers/index.html @@ -0,0 +1,295 @@ +--- +layout: examples +title: Headers +extra_css: + - "headers.css" +body_class: "" +--- + +<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> + <symbol id="bootstrap" viewBox="0 0 118 94"> + <title>Bootstrap</title> + <path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z"></path> + </symbol> + <symbol id="home" viewBox="0 0 16 16"> + <path d="M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4.5a.5.5 0 0 0 .5-.5v-4h2v4a.5.5 0 0 0 .5.5H14a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146zM2.5 14V7.707l5.5-5.5 5.5 5.5V14H10v-4a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v4H2.5z"/> + </symbol> + <symbol id="speedometer2" viewBox="0 0 16 16"> + <path d="M8 4a.5.5 0 0 1 .5.5V6a.5.5 0 0 1-1 0V4.5A.5.5 0 0 1 8 4zM3.732 5.732a.5.5 0 0 1 .707 0l.915.914a.5.5 0 1 1-.708.708l-.914-.915a.5.5 0 0 1 0-.707zM2 10a.5.5 0 0 1 .5-.5h1.586a.5.5 0 0 1 0 1H2.5A.5.5 0 0 1 2 10zm9.5 0a.5.5 0 0 1 .5-.5h1.5a.5.5 0 0 1 0 1H12a.5.5 0 0 1-.5-.5zm.754-4.246a.389.389 0 0 0-.527-.02L7.547 9.31a.91.91 0 1 0 1.302 1.258l3.434-4.297a.389.389 0 0 0-.029-.518z"/> + <path fill-rule="evenodd" d="M0 10a8 8 0 1 1 15.547 2.661c-.442 1.253-1.845 1.602-2.932 1.25C11.309 13.488 9.475 13 8 13c-1.474 0-3.31.488-4.615.911-1.087.352-2.49.003-2.932-1.25A7.988 7.988 0 0 1 0 10zm8-7a7 7 0 0 0-6.603 9.329c.203.575.923.876 1.68.63C4.397 12.533 6.358 12 8 12s3.604.532 4.923.96c.757.245 1.477-.056 1.68-.631A7 7 0 0 0 8 3z"/> + </symbol> + <symbol id="table" viewBox="0 0 16 16"> + <path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"/> + </symbol> + <symbol id="people-circle" viewBox="0 0 16 16"> + <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/> + <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/> + </symbol> + <symbol id="grid" viewBox="0 0 16 16"> + <path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/> + </symbol> +</svg> + +<main> + <h1 class="visually-hidden">Headers examples</h1> + + <div class="container"> + <header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom"> + <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none"> + <svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg> + <span class="fs-4">Simple header</span> + </a> + + <ul class="nav nav-pills"> + <li class="nav-item"><a href="#" class="nav-link active" aria-current="page">Home</a></li> + <li class="nav-item"><a href="#" class="nav-link">Features</a></li> + <li class="nav-item"><a href="#" class="nav-link">Pricing</a></li> + <li class="nav-item"><a href="#" class="nav-link">FAQs</a></li> + <li class="nav-item"><a href="#" class="nav-link">About</a></li> + </ul> + </header> + </div> + + <div class="b-example-divider"></div> + + <div class="container"> + <header class="d-flex justify-content-center py-3"> + <ul class="nav nav-pills"> + <li class="nav-item"><a href="#" class="nav-link active" aria-current="page">Home</a></li> + <li class="nav-item"><a href="#" class="nav-link">Features</a></li> + <li class="nav-item"><a href="#" class="nav-link">Pricing</a></li> + <li class="nav-item"><a href="#" class="nav-link">FAQs</a></li> + <li class="nav-item"><a href="#" class="nav-link">About</a></li> + </ul> + </header> + </div> + + <div class="b-example-divider"></div> + + <div class="container"> + <header class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom"> + <a href="/" class="d-flex align-items-center col-md-3 mb-2 mb-md-0 text-dark text-decoration-none"> + <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use xlink:href="#bootstrap"/></svg> + </a> + + <ul class="nav col-12 col-md-auto mb-2 justify-content-center mb-md-0"> + <li><a href="#" class="nav-link px-2 link-secondary">Home</a></li> + <li><a href="#" class="nav-link px-2 link-dark">Features</a></li> + <li><a href="#" class="nav-link px-2 link-dark">Pricing</a></li> + <li><a href="#" class="nav-link px-2 link-dark">FAQs</a></li> + <li><a href="#" class="nav-link px-2 link-dark">About</a></li> + </ul> + + <div class="col-md-3 text-end"> + <button type="button" class="btn btn-outline-primary me-2">Login</button> + <button type="button" class="btn btn-primary">Sign-up</button> + </div> + </header> + </div> + + <div class="b-example-divider"></div> + + <header class="p-3 bg-dark text-white"> + <div class="container"> + <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> + <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none"> + <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use xlink:href="#bootstrap"/></svg> + </a> + + <ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0"> + <li><a href="#" class="nav-link px-2 text-secondary">Home</a></li> + <li><a href="#" class="nav-link px-2 text-white">Features</a></li> + <li><a href="#" class="nav-link px-2 text-white">Pricing</a></li> + <li><a href="#" class="nav-link px-2 text-white">FAQs</a></li> + <li><a href="#" class="nav-link px-2 text-white">About</a></li> + </ul> + + <form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3"> + <input type="search" class="form-control form-control-dark" placeholder="Search..." aria-label="Search"> + </form> + + <div class="text-end"> + <button type="button" class="btn btn-outline-light me-2">Login</button> + <button type="button" class="btn btn-warning">Sign-up</button> + </div> + </div> + </div> + </header> + + <div class="b-example-divider"></div> + + <header class="p-3 mb-3 border-bottom"> + <div class="container"> + <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> + <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"> + <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use xlink:href="#bootstrap"/></svg> + </a> + + <ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0"> + <li><a href="#" class="nav-link px-2 link-secondary">Overview</a></li> + <li><a href="#" class="nav-link px-2 link-dark">Inventory</a></li> + <li><a href="#" class="nav-link px-2 link-dark">Customers</a></li> + <li><a href="#" class="nav-link px-2 link-dark">Products</a></li> + </ul> + + <form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3"> + <input type="search" class="form-control" placeholder="Search..." aria-label="Search"> + </form> + + <div class="dropdown text-end"> + <a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false"> + <img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle"> + </a> + <ul class="dropdown-menu text-small" aria-labelledby="dropdownUser1"> + <li><a class="dropdown-item" href="#">New project...</a></li> + <li><a class="dropdown-item" href="#">Settings</a></li> + <li><a class="dropdown-item" href="#">Profile</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Sign out</a></li> + </ul> + </div> + </div> + </div> + </header> + + <div class="b-example-divider"></div> + + <header class="py-3 mb-3 border-bottom"> + <div class="container-fluid d-grid gap-3 align-items-center" style="grid-template-columns: 1fr 2fr;"> + <div class="dropdown"> + <a href="#" class="d-flex align-items-center col-lg-4 mb-2 mb-lg-0 link-dark text-decoration-none dropdown-toggle" id="dropdownNavLink" data-bs-toggle="dropdown" aria-expanded="false"> + <svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg> + </a> + <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownNavLink"> + <li><a class="dropdown-item active" href="#" aria-current="page">Overview</a></li> + <li><a class="dropdown-item" href="#">Inventory</a></li> + <li><a class="dropdown-item" href="#">Customers</a></li> + <li><a class="dropdown-item" href="#">Products</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Reports</a></li> + <li><a class="dropdown-item" href="#">Analytics</a></li> + </ul> + </div> + + <div class="d-flex align-items-center"> + <form class="w-100 me-3"> + <input type="search" class="form-control" placeholder="Search..." aria-label="Search"> + </form> + + <div class="flex-shrink-0 dropdown"> + <a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" id="dropdownUser2" data-bs-toggle="dropdown" aria-expanded="false"> + <img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle"> + </a> + <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser2"> + <li><a class="dropdown-item" href="#">New project...</a></li> + <li><a class="dropdown-item" href="#">Settings</a></li> + <li><a class="dropdown-item" href="#">Profile</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Sign out</a></li> + </ul> + </div> + </div> + </div> + </header> + + <div class="container-fluid pb-3"> + <div class="d-grid gap-3" style="grid-template-columns: 1fr 2fr;"> + <div class="bg-light border rounded-3"> + <br><br><br><br><br><br><br><br><br><br> + </div> + <div class="bg-light border rounded-3"> + <br><br><br><br><br><br><br><br><br><br> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <nav class="py-2 bg-light border-bottom"> + <div class="container d-flex flex-wrap"> + <ul class="nav me-auto"> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2 active" aria-current="page">Home</a></li> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2">Features</a></li> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2">Pricing</a></li> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2">FAQs</a></li> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2">About</a></li> + </ul> + <ul class="nav"> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2">Login</a></li> + <li class="nav-item"><a href="#" class="nav-link link-dark px-2">Sign up</a></li> + </ul> + </div> + </nav> + <header class="py-3 mb-4 border-bottom"> + <div class="container d-flex flex-wrap justify-content-center"> + <a href="/" class="d-flex align-items-center mb-3 mb-lg-0 me-lg-auto text-dark text-decoration-none"> + <svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg> + <span class="fs-4">Double header</span> + </a> + <form class="col-12 col-lg-auto mb-3 mb-lg-0"> + <input type="search" class="form-control" placeholder="Search..." aria-label="Search"> + </form> + </div> + </header> + + <div class="b-example-divider"></div> + + <header> + <div class="px-3 py-2 bg-dark text-white"> + <div class="container"> + <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> + <a href="/" class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none"> + <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use xlink:href="#bootstrap"/></svg> + </a> + + <ul class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small"> + <li> + <a href="#" class="nav-link text-secondary"> + <svg class="bi d-block mx-auto mb-1" width="24" height="24"><use xlink:href="#home"/></svg> + Home + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi d-block mx-auto mb-1" width="24" height="24"><use xlink:href="#speedometer2"/></svg> + Dashboard + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi d-block mx-auto mb-1" width="24" height="24"><use xlink:href="#table"/></svg> + Orders + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi d-block mx-auto mb-1" width="24" height="24"><use xlink:href="#grid"/></svg> + Products + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi d-block mx-auto mb-1" width="24" height="24"><use xlink:href="#people-circle"/></svg> + Customers + </a> + </li> + </ul> + </div> + </div> + </div> + <div class="px-3 py-2 border-bottom mb-3"> + <div class="container d-flex flex-wrap justify-content-center"> + <form class="col-12 col-lg-auto mb-2 mb-lg-0 me-lg-auto"> + <input type="search" class="form-control" placeholder="Search..." aria-label="Search"> + </form> + + <div class="text-end"> + <button type="button" class="btn btn-light text-dark me-2">Login</button> + <button type="button" class="btn btn-primary">Sign-up</button> + </div> + </div> + </div> + </header> + + <div class="b-example-divider"></div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/bootstrap-docs.png b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/bootstrap-docs.png Binary files differnew file mode 100644 index 000000000..471a9eddf --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/bootstrap-docs.png diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/bootstrap-themes.png b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/bootstrap-themes.png Binary files differnew file mode 100644 index 000000000..13c32337d --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/bootstrap-themes.png diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/heroes.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/heroes.css new file mode 100644 index 000000000..380b70a4a --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/heroes.css @@ -0,0 +1,11 @@ +.b-example-divider { + height: 3rem; + background-color: rgba(0, 0, 0, .1); + border: solid rgba(0, 0, 0, .15); + border-width: 1px 0; + box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); +} + +@media (min-width: 992px) { + .rounded-lg-3 { border-radius: .3rem; } +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/index.html new file mode 100644 index 000000000..ef621fd50 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/heroes/index.html @@ -0,0 +1,125 @@ +--- +layout: examples +title: Heroes +extra_css: + - "heroes.css" +body_class: "" +--- + +<main> + <h1 class="visually-hidden">Heroes examples</h1> + + <div class="px-4 py-5 my-5 text-center"> + <img class="d-block mx-auto mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57"> + <h1 class="display-5 fw-bold">Centered hero</h1> + <div class="col-lg-6 mx-auto"> + <p class="lead mb-4">Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.</p> + <div class="d-grid gap-2 d-sm-flex justify-content-sm-center"> + <button type="button" class="btn btn-primary btn-lg px-4 gap-3">Primary button</button> + <button type="button" class="btn btn-outline-secondary btn-lg px-4">Secondary</button> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="px-4 pt-5 my-5 text-center border-bottom"> + <h1 class="display-4 fw-bold">Centered screenshot</h1> + <div class="col-lg-6 mx-auto"> + <p class="lead mb-4">Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.</p> + <div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-5"> + <button type="button" class="btn btn-primary btn-lg px-4 me-sm-3">Primary button</button> + <button type="button" class="btn btn-outline-secondary btn-lg px-4">Secondary</button> + </div> + </div> + <div class="overflow-hidden" style="max-height: 30vh;"> + <div class="container px-5"> + <img src="bootstrap-docs.png" class="img-fluid border rounded-3 shadow-lg mb-4" alt="Example image" width="700" height="500" loading="lazy"> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="container col-xxl-8 px-4 py-5"> + <div class="row flex-lg-row-reverse align-items-center g-5 py-5"> + <div class="col-10 col-sm-8 col-lg-6"> + <img src="bootstrap-themes.png" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy"> + </div> + <div class="col-lg-6"> + <h1 class="display-5 fw-bold lh-1 mb-3">Responsive left-aligned hero with image</h1> + <p class="lead">Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.</p> + <div class="d-grid gap-2 d-md-flex justify-content-md-start"> + <button type="button" class="btn btn-primary btn-lg px-4 me-md-2">Primary</button> + <button type="button" class="btn btn-outline-secondary btn-lg px-4">Default</button> + </div> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="container col-xl-10 col-xxl-8 px-4 py-5"> + <div class="row align-items-center g-lg-5 py-5"> + <div class="col-lg-7 text-center text-lg-start"> + <h1 class="display-4 fw-bold lh-1 mb-3">Vertically centered hero sign-up form</h1> + <p class="col-lg-10 fs-4">Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.</p> + </div> + <div class="col-md-10 mx-auto col-lg-5"> + <form class="p-4 p-md-5 border rounded-3 bg-light"> + <div class="form-floating mb-3"> + <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> + <label for="floatingInput">Email address</label> + </div> + <div class="form-floating mb-3"> + <input type="password" class="form-control" id="floatingPassword" placeholder="Password"> + <label for="floatingPassword">Password</label> + </div> + <div class="checkbox mb-3"> + <label> + <input type="checkbox" value="remember-me"> Remember me + </label> + </div> + <button class="w-100 btn btn-lg btn-primary" type="submit">Sign up</button> + <hr class="my-4"> + <small class="text-muted">By clicking Sign up, you agree to the terms of use.</small> + </form> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="container my-5"> + <div class="row p-4 pb-0 pe-lg-0 pt-lg-5 align-items-center rounded-3 border shadow-lg"> + <div class="col-lg-7 p-3 p-lg-5 pt-lg-3"> + <h1 class="display-4 fw-bold lh-1">Border hero with cropped image and shadows</h1> + <p class="lead">Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.</p> + <div class="d-grid gap-2 d-md-flex justify-content-md-start mb-4 mb-lg-3"> + <button type="button" class="btn btn-primary btn-lg px-4 me-md-2 fw-bold">Primary</button> + <button type="button" class="btn btn-outline-secondary btn-lg px-4">Default</button> + </div> + </div> + <div class="col-lg-4 offset-lg-1 p-0 overflow-hidden shadow-lg"> + <img class="rounded-lg-3" src="bootstrap-docs.png" alt="" width="720"> + </div> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="bg-dark text-secondary px-4 py-5 text-center"> + <div class="py-5"> + <h1 class="display-5 fw-bold text-white">Dark mode hero</h1> + <div class="col-lg-6 mx-auto"> + <p class="fs-5 mb-4">Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.</p> + <div class="d-grid gap-2 d-sm-flex justify-content-sm-center"> + <button type="button" class="btn btn-outline-info btn-lg px-4 me-sm-3 fw-bold">Custom button</button> + <button type="button" class="btn btn-outline-light btn-lg px-4">Secondary</button> + </div> + </div> + </div> + </div> + + <div class="b-example-divider mb-0"></div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/jumbotron/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/jumbotron/index.html new file mode 100644 index 000000000..99cc61dee --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/jumbotron/index.html @@ -0,0 +1,45 @@ +--- +layout: examples +title: Jumbotron example +include_js: false +--- + +<main> + <div class="container py-4"> + <header class="pb-3 mb-4 border-bottom"> + <a href="/" class="d-flex align-items-center text-dark text-decoration-none"> + <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg> + <span class="fs-4">Jumbotron example</span> + </a> + </header> + + <div class="p-5 mb-4 bg-light rounded-3"> + <div class="container-fluid py-5"> + <h1 class="display-5 fw-bold">Custom jumbotron</h1> + <p class="col-md-8 fs-4">Using a series of utilities, you can create this jumbotron, just like the one in previous versions of Bootstrap. Check out the examples below for how you can remix and restyle it to your liking.</p> + <button class="btn btn-primary btn-lg" type="button">Example button</button> + </div> + </div> + + <div class="row align-items-md-stretch"> + <div class="col-md-6"> + <div class="h-100 p-5 text-white bg-dark rounded-3"> + <h2>Change the background</h2> + <p>Swap the background-color utility and add a `.text-*` color utility to mix up the jumbotron look. Then, mix and match with additional component themes and more.</p> + <button class="btn btn-outline-light" type="button">Example button</button> + </div> + </div> + <div class="col-md-6"> + <div class="h-100 p-5 bg-light border rounded-3"> + <h2>Add borders</h2> + <p>Or, keep it light and add a border for some added definition to the boundaries of your content. Be sure to look under the hood at the source HTML here as we've adjusted the alignment and sizing of both column's content for equal-height.</p> + <button class="btn btn-outline-secondary" type="button">Example button</button> + </div> + </div> + </div> + + <footer class="pt-3 mt-4 text-muted border-top"> + © {{< year >}} + </footer> + </div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/masonry/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/masonry/index.html new file mode 100644 index 000000000..9061d7cce --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/masonry/index.html @@ -0,0 +1,105 @@ +--- +layout: examples +title: Masonry example +extra_js: + - src: "https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js" + integrity: "sha384-GNFwBvfVxBkLMJpYMOABq3c+d3KnQxudP/mGPkzpZSTYykLBNsZEnG2D9G/X/+7D" + async: true +--- + +<main class="container py-5"> + <h1>Bootstrap and Masonry</h1> + <p class="lead">Integrate <a href="https://masonry.desandro.com/">Masonry</a> with the Bootstrap grid system and cards component.</p> + + <p>Masonry is not included in Bootstrap. Add it by including the JavaScript plugin manually, or using a CDN like so:</p> + + <pre><code> +<script src="https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js" integrity="sha384-GNFwBvfVxBkLMJpYMOABq3c+d3KnQxudP/mGPkzpZSTYykLBNsZEnG2D9G/X/+7D" crossorigin="anonymous" async></script> + </code></pre> + + <p>By adding <code>data-masonry='{"percentPosition": true }'</code> to the <code>.row</code> wrapper, we can combine the powers of Bootstrap's responsive grid and Masonry's positioning.</p> + + <hr class="my-5"> + + <div class="row" data-masonry='{"percentPosition": true }'> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card"> + {{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}} + <div class="card-body"> + <h5 class="card-title">Card title that wraps to a new line</h5> + <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> + </div> + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card p-3"> + <figure class="p-3 mb-0"> + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + </blockquote> + <figcaption class="blockquote-footer mb-0 text-muted"> + Someone famous in <cite title="Source Title">Source Title</cite> + </figcaption> + </figure> + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card"> + {{< placeholder width="100%" height="200" class="card-img-top" text="Image cap" >}} + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> + <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> + </div> + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card bg-primary text-white text-center p-3"> + <figure class="mb-0"> + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + </blockquote> + <figcaption class="blockquote-footer mb-0 text-white"> + Someone famous in <cite title="Source Title">Source Title</cite> + </figcaption> + </figure> + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card text-center"> + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This card has a regular title and short paragraph of text below it.</p> + <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> + </div> + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card"> + {{< placeholder width="100%" height="260" class="card-img" text="Card image" >}} + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card p-3 text-end"> + <figure class="mb-0"> + <blockquote class="blockquote"> + <p>A well-known quote, contained in a blockquote element.</p> + </blockquote> + <figcaption class="blockquote-footer mb-0 text-muted"> + Someone famous in <cite title="Source Title">Source Title</cite> + </figcaption> + </figure> + </div> + </div> + <div class="col-sm-6 col-lg-4 mb-4"> + <div class="card"> + <div class="card-body"> + <h5 class="card-title">Card title</h5> + <p class="card-text">This is another card with title and supporting text below. This card has some additional content to make it slightly taller overall.</p> + <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> + </div> + </div> + </div> + </div> + +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-bottom/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-bottom/index.html new file mode 100644 index 000000000..aee772e20 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-bottom/index.html @@ -0,0 +1,41 @@ +--- +layout: examples +title: Bottom navbar example +--- + +<main class="container"> + <div class="bg-light p-5 rounded mt-3"> + <h1>Bottom Navbar example</h1> + <p class="lead">This example is a quick exercise to illustrate how the bottom navbar works.</p> + <a class="btn btn-lg btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> + </div> +</main> +<nav class="navbar fixed-bottom navbar-expand-sm navbar-dark bg-dark"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Bottom navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropup"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown10" data-bs-toggle="dropdown" aria-expanded="false">Dropup</a> + <ul class="dropdown-menu" aria-labelledby="dropdown10"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + </div> + </div> +</nav> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-fixed/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-fixed/index.html new file mode 100644 index 000000000..848137eff --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-fixed/index.html @@ -0,0 +1,40 @@ +--- +layout: examples +title: Fixed top navbar example +extra_css: + - "navbar-top-fixed.css" +--- + +<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Fixed navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> + +<main class="container"> + <div class="bg-light p-5 rounded"> + <h1>Navbar example</h1> + <p class="lead">This example is a quick exercise to illustrate how fixed to top navbar works. As you scroll, it will remain fixed to the top of your browser’s viewport.</p> + <a class="btn btn-lg btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> + </div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-fixed/navbar-top-fixed.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-fixed/navbar-top-fixed.css index c77c0c147..c77c0c147 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-fixed/navbar-top-fixed.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-fixed/navbar-top-fixed.css diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-static/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-static/index.html new file mode 100644 index 000000000..fe95dab47 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-static/index.html @@ -0,0 +1,40 @@ +--- +layout: examples +title: Top navbar example +extra_css: + - "navbar-top.css" +--- + +<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Top navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> + +<main class="container"> + <div class="bg-light p-5 rounded"> + <h1>Navbar example</h1> + <p class="lead">This example is a quick exercise to illustrate how the top-aligned navbar works. As you scroll, this navbar remains in its original position and moves with the rest of the page.</p> + <a class="btn btn-lg btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> + </div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-static/navbar-top.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-static/navbar-top.css index 25bbdde09..25bbdde09 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbar-static/navbar-top.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbar-static/navbar-top.css diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbars/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbars/index.html new file mode 100644 index 000000000..38281f3dd --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbars/index.html @@ -0,0 +1,416 @@ +--- +layout: examples +title: Navbar Template +extra_css: + - "navbar.css" +--- + +<main> + <nav class="navbar navbar-dark bg-dark" aria-label="First navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Never expand</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample01" aria-controls="navbarsExample01" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample01"> + <ul class="navbar-nav me-auto mb-2"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown01"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand navbar-dark bg-dark" aria-label="Second navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Always expand</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample02" aria-controls="navbarsExample02" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample02"> + <ul class="navbar-nav me-auto"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-sm navbar-dark bg-dark" aria-label="Third navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Expand at sm</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample03" aria-controls="navbarsExample03" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample03"> + <ul class="navbar-nav me-auto mb-2 mb-sm-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown03" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown03"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-md navbar-dark bg-dark" aria-label="Fourth navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Expand at md</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample04" aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample04"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown04" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown04"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-dark bg-dark" aria-label="Fifth navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Expand at lg</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample05" aria-controls="navbarsExample05" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample05"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown05" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown05"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-xl navbar-dark bg-dark" aria-label="Sixth navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Expand at xl</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample06" aria-controls="navbarsExample06" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample06"> + <ul class="navbar-nav me-auto mb-2 mb-xl-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown06" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown06"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-xxl navbar-dark bg-dark" aria-label="Seventh navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Expand at xxl</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExampleXxl" aria-controls="navbarsExampleXxl" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExampleXxl"> + <ul class="navbar-nav me-auto mb-2 mb-xl-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdownXxl" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdownXxl"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-dark bg-dark" aria-label="Eighth navbar example"> + <div class="container"> + <a class="navbar-brand" href="#">Container</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample07" aria-controls="navbarsExample07" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample07"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown07" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown07"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-dark bg-dark" aria-label="Ninth navbar example"> + <div class="container-xl"> + <a class="navbar-brand" href="#">Container XL</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample07XL" aria-controls="navbarsExample07XL" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample07XL"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown07XL" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown07XL"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <div class="container-xl mb-4"> + <p>Matching .container-xl...</p> + </div> + + <nav class="navbar navbar-expand-lg navbar-dark bg-dark" aria-label="Tenth navbar example"> + <div class="container-fluid"> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample08" aria-controls="navbarsExample08" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample08"> + <ul class="navbar-nav"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Centered nav only</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown08" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown08"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + </div> + </div> + </nav> + + <div class="container"> + <nav class="navbar navbar-expand-lg navbar-light bg-light rounded" aria-label="Eleventh navbar example"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample09" aria-controls="navbarsExample09" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarsExample09"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown09" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown09"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form> + <input class="form-control" type="text" placeholder="Search" aria-label="Search"> + </form> + </div> + </div> + </nav> + + <nav class="navbar navbar-expand-lg navbar-light bg-light rounded" aria-label="Twelfth navbar example"> + <div class="container-fluid"> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample10" aria-controls="navbarsExample10" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample10"> + <ul class="navbar-nav"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Centered nav only</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown10" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</a> + <ul class="dropdown-menu" aria-labelledby="dropdown10"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + </div> + </div> + </nav> + + <div> + <div class="bg-light p-5 rounded"> + <div class="col-sm-8 mx-auto"> + <h1>Navbar examples</h1> + <p>This example is a quick exercise to illustrate how the navbar and its contents work. Some navbars extend the width of the viewport, others are confined within a <code>.container</code>. For positioning of navbars, checkout the <a href="{{< docsref "/examples/navbar-static" >}}">top</a> and <a href="{{< docsref "/examples/navbar-fixed" >}}">fixed top</a> examples.</p> + <p>At the smallest breakpoint, the collapse plugin is used to hide the links and show a menu button to toggle the collapsed content.</p> + <p> + <a class="btn btn-primary" href="{{< docsref "/components/navbar" >}}" role="button">View navbar docs »</a> + </p> + </div> + </div> + </div> + </div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbars/navbar.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbars/navbar.css index 70d209409..70d209409 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/navbars/navbar.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/navbars/navbar.css diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/index.html new file mode 100644 index 000000000..09c6488a5 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/index.html @@ -0,0 +1,140 @@ +--- +layout: examples +title: Offcanvas navbar template +extra_css: + - "offcanvas.css" +extra_js: + - src: "offcanvas.js" +body_class: "bg-light" +aliases: "/docs/5.0/examples/offcanvas/" +--- + +<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark" aria-label="Main navigation"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Offcanvas navbar</a> + <button class="navbar-toggler p-0 border-0" type="button" id="navbarSideCollapse" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="navbar-collapse offcanvas-collapse" id="navbarsExampleDefault"> + <ul class="navbar-nav me-auto mb-2 mb-lg-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Dashboard</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Notifications</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Profile</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Switch account</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-bs-toggle="dropdown" aria-expanded="false">Settings</a> + <ul class="dropdown-menu" aria-labelledby="dropdown01"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + </ul> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> +</nav> + +<div class="nav-scroller bg-body shadow-sm"> + <nav class="nav nav-underline" aria-label="Secondary navigation"> + <a class="nav-link active" aria-current="page" href="#">Dashboard</a> + <a class="nav-link" href="#"> + Friends + <span class="badge bg-light text-dark rounded-pill align-text-bottom">27</span> + </a> + <a class="nav-link" href="#">Explore</a> + <a class="nav-link" href="#">Suggestions</a> + <a class="nav-link" href="#">Link</a> + <a class="nav-link" href="#">Link</a> + <a class="nav-link" href="#">Link</a> + <a class="nav-link" href="#">Link</a> + <a class="nav-link" href="#">Link</a> + </nav> +</div> + +<main class="container"> + <div class="d-flex align-items-center p-3 my-3 text-white bg-purple rounded shadow-sm"> + <img class="me-3" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo-white.svg" alt="" width="48" height="38"> + <div class="lh-1"> + <h1 class="h6 mb-0 text-white lh-1">Bootstrap</h1> + <small>Since 2011</small> + </div> + </div> + + <div class="my-3 p-3 bg-body rounded shadow-sm"> + <h6 class="border-bottom pb-2 mb-0">Recent updates</h6> + <div class="d-flex text-muted pt-3"> + {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="flex-shrink-0 me-2 rounded" >}} + <p class="pb-3 mb-0 small lh-sm border-bottom"> + <strong class="d-block text-gray-dark">@username</strong> + Some representative placeholder content, with some information about this user. Imagine this being some sort of status update, perhaps? + </p> + </div> + <div class="d-flex text-muted pt-3"> + {{< placeholder width="32" height="32" background="#e83e8c" color="#e83e8c" class="flex-shrink-0 me-2 rounded" >}} + <p class="pb-3 mb-0 small lh-sm border-bottom"> + <strong class="d-block text-gray-dark">@username</strong> + Some more representative placeholder content, related to this other user. Another status update, perhaps. + </p> + </div> + <div class="d-flex text-muted pt-3"> + {{< placeholder width="32" height="32" background="#6f42c1" color="#6f42c1" class="flex-shrink-0 me-2 rounded" >}} + <p class="pb-3 mb-0 small lh-sm border-bottom"> + <strong class="d-block text-gray-dark">@username</strong> + This user also gets some representative placeholder content. Maybe they did something interesting, and you really want to highlight this in the recent updates. + </p> + </div> + <small class="d-block text-end mt-3"> + <a href="#">All updates</a> + </small> + </div> + + <div class="my-3 p-3 bg-body rounded shadow-sm"> + <h6 class="border-bottom pb-2 mb-0">Suggestions</h6> + <div class="d-flex text-muted pt-3"> + {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="flex-shrink-0 me-2 rounded" >}} + <div class="pb-3 mb-0 small lh-sm border-bottom w-100"> + <div class="d-flex justify-content-between"> + <strong class="text-gray-dark">Full Name</strong> + <a href="#">Follow</a> + </div> + <span class="d-block">@username</span> + </div> + </div> + <div class="d-flex text-muted pt-3"> + {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="flex-shrink-0 me-2 rounded" >}} + <div class="pb-3 mb-0 small lh-sm border-bottom w-100"> + <div class="d-flex justify-content-between"> + <strong class="text-gray-dark">Full Name</strong> + <a href="#">Follow</a> + </div> + <span class="d-block">@username</span> + </div> + </div> + <div class="d-flex text-muted pt-3"> + {{< placeholder width="32" height="32" background="#007bff" color="#007bff" class="flex-shrink-0 me-2 rounded" >}} + <div class="pb-3 mb-0 small lh-sm border-bottom w-100"> + <div class="d-flex justify-content-between"> + <strong class="text-gray-dark">Full Name</strong> + <a href="#">Follow</a> + </div> + <span class="d-block">@username</span> + </div> + </div> + <small class="d-block text-end mt-3"> + <a href="#">All suggestions</a> + </small> + </div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/offcanvas.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/offcanvas.css index 9c78f02e5..29e26b11b 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/offcanvas/offcanvas.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/offcanvas.css @@ -19,13 +19,10 @@ body { overflow-y: auto; visibility: hidden; background-color: #343a40; - transition: visibility .3s ease-in-out, -webkit-transform .3s ease-in-out; transition: transform .3s ease-in-out, visibility .3s ease-in-out; - transition: transform .3s ease-in-out, visibility .3s ease-in-out, -webkit-transform .3s ease-in-out; } .offcanvas-collapse.open { visibility: visible; - -webkit-transform: translateX(-100%); transform: translateX(-100%); } } @@ -38,9 +35,7 @@ body { } .nav-scroller .nav { - display: -ms-flexbox; display: flex; - -ms-flex-wrap: nowrap; flex-wrap: nowrap; padding-bottom: 1rem; margin-top: -1px; @@ -70,7 +65,3 @@ body { .text-white-50 { color: rgba(255, 255, 255, .5); } .bg-purple { background-color: #6f42c1; } - -.lh-100 { line-height: 1; } -.lh-125 { line-height: 1.25; } -.lh-150 { line-height: 1.5; } diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/offcanvas.js b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/offcanvas.js new file mode 100644 index 000000000..91103b1c4 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/offcanvas-navbar/offcanvas.js @@ -0,0 +1,7 @@ +(function () { + 'use strict' + + document.querySelector('#navbarSideCollapse').addEventListener('click', function () { + document.querySelector('.offcanvas-collapse').classList.toggle('open') + }) +})() diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/pricing/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/pricing/index.html new file mode 100644 index 000000000..c62c68c70 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/pricing/index.html @@ -0,0 +1,187 @@ +--- +layout: examples +title: Pricing example +extra_css: + - "pricing.css" +include_js: false +--- + +<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> + <symbol id="check" viewBox="0 0 16 16"> + <title>Check</title> + <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/> + </symbol> +</svg> + +<div class="container py-3"> + <header> + <div class="d-flex flex-column flex-md-row align-items-center pb-3 mb-4 border-bottom"> + <a href="/" class="d-flex align-items-center text-dark text-decoration-none"> + <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg> + <span class="fs-4">Pricing example</span> + </a> + + <nav class="d-inline-flex mt-2 mt-md-0 ms-md-auto"> + <a class="me-3 py-2 text-dark text-decoration-none" href="#">Features</a> + <a class="me-3 py-2 text-dark text-decoration-none" href="#">Enterprise</a> + <a class="me-3 py-2 text-dark text-decoration-none" href="#">Support</a> + <a class="py-2 text-dark text-decoration-none" href="#">Pricing</a> + </nav> + </div> + + <div class="pricing-header p-3 pb-md-4 mx-auto text-center"> + <h1 class="display-4 fw-normal">Pricing</h1> + <p class="fs-5 text-muted">Quickly build an effective pricing table for your potential customers with this Bootstrap example. It’s built with default Bootstrap components and utilities with little customization.</p> + </div> + </header> + + <main> + <div class="row row-cols-1 row-cols-md-3 mb-3 text-center"> + <div class="col"> + <div class="card mb-4 rounded-3 shadow-sm"> + <div class="card-header py-3"> + <h4 class="my-0 fw-normal">Free</h4> + </div> + <div class="card-body"> + <h1 class="card-title pricing-card-title">$0<small class="text-muted fw-light">/mo</small></h1> + <ul class="list-unstyled mt-3 mb-4"> + <li>10 users included</li> + <li>2 GB of storage</li> + <li>Email support</li> + <li>Help center access</li> + </ul> + <button type="button" class="w-100 btn btn-lg btn-outline-primary">Sign up for free</button> + </div> + </div> + </div> + <div class="col"> + <div class="card mb-4 rounded-3 shadow-sm"> + <div class="card-header py-3"> + <h4 class="my-0 fw-normal">Pro</h4> + </div> + <div class="card-body"> + <h1 class="card-title pricing-card-title">$15<small class="text-muted fw-light">/mo</small></h1> + <ul class="list-unstyled mt-3 mb-4"> + <li>20 users included</li> + <li>10 GB of storage</li> + <li>Priority email support</li> + <li>Help center access</li> + </ul> + <button type="button" class="w-100 btn btn-lg btn-primary">Get started</button> + </div> + </div> + </div> + <div class="col"> + <div class="card mb-4 rounded-3 shadow-sm border-primary"> + <div class="card-header py-3 text-white bg-primary border-primary"> + <h4 class="my-0 fw-normal">Enterprise</h4> + </div> + <div class="card-body"> + <h1 class="card-title pricing-card-title">$29<small class="text-muted fw-light">/mo</small></h1> + <ul class="list-unstyled mt-3 mb-4"> + <li>30 users included</li> + <li>15 GB of storage</li> + <li>Phone and email support</li> + <li>Help center access</li> + </ul> + <button type="button" class="w-100 btn btn-lg btn-primary">Contact us</button> + </div> + </div> + </div> + </div> + + <h2 class="display-6 text-center mb-4">Compare plans</h2> + + <div class="table-responsive"> + <table class="table text-center"> + <thead> + <tr> + <th style="width: 34%;"></th> + <th style="width: 22%;">Free</th> + <th style="width: 22%;">Pro</th> + <th style="width: 22%;">Enterprise</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row" class="text-start">Public</th> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + </tr> + <tr> + <th scope="row" class="text-start">Private</th> + <td></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + </tr> + </tbody> + + <tbody> + <tr> + <th scope="row" class="text-start">Permissions</th> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + </tr> + <tr> + <th scope="row" class="text-start">Sharing</th> + <td></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + </tr> + <tr> + <th scope="row" class="text-start">Unlimited members</th> + <td></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + </tr> + <tr> + <th scope="row" class="text-start">Extra security</th> + <td></td> + <td></td> + <td><svg class="bi" width="24" height="24"><use xlink:href="#check"/></svg></td> + </tr> + </tbody> + </table> + </div> + </main> + + <footer class="pt-4 my-md-5 pt-md-5 border-top"> + <div class="row"> + <div class="col-12 col-md"> + <img class="mb-2" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="24" height="19"> + <small class="d-block mb-3 text-muted">© 2017–{{< year >}}</small> + </div> + <div class="col-6 col-md"> + <h5>Features</h5> + <ul class="list-unstyled text-small"> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Cool stuff</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Random feature</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Team feature</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Stuff for developers</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Another one</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Last time</a></li> + </ul> + </div> + <div class="col-6 col-md"> + <h5>Resources</h5> + <ul class="list-unstyled text-small"> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Resource</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Resource name</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Another resource</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Final resource</a></li> + </ul> + </div> + <div class="col-6 col-md"> + <h5>About</h5> + <ul class="list-unstyled text-small"> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Team</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Locations</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Privacy</a></li> + <li class="mb-1"><a class="link-secondary text-decoration-none" href="#">Terms</a></li> + </ul> + </div> + </div> + </footer> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/pricing/pricing.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/pricing/pricing.css new file mode 100644 index 000000000..c7304d10b --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/pricing/pricing.css @@ -0,0 +1,11 @@ +body { + background-image: linear-gradient(180deg, #eee, #fff 100px, #fff); +} + +.container { + max-width: 960px; +} + +.pricing-header { + max-width: 700px; +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/product/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/product/index.html new file mode 100644 index 000000000..291901efa --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/product/index.html @@ -0,0 +1,148 @@ +--- +layout: examples +title: Product example +extra_css: + - "product.css" +--- + +<header class="site-header sticky-top py-1"> + <nav class="container d-flex flex-column flex-md-row justify-content-between"> + <a class="py-2" href="#" aria-label="Product"> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="d-block mx-auto" role="img" viewBox="0 0 24 24"><title>Product</title><circle cx="12" cy="12" r="10"/><path d="M14.31 8l5.74 9.94M9.69 8h11.48M7.38 12l5.74-9.94M9.69 16L3.95 6.06M14.31 16H2.83m13.79-4l-5.74 9.94"/></svg> + </a> + <a class="py-2 d-none d-md-inline-block" href="#">Tour</a> + <a class="py-2 d-none d-md-inline-block" href="#">Product</a> + <a class="py-2 d-none d-md-inline-block" href="#">Features</a> + <a class="py-2 d-none d-md-inline-block" href="#">Enterprise</a> + <a class="py-2 d-none d-md-inline-block" href="#">Support</a> + <a class="py-2 d-none d-md-inline-block" href="#">Pricing</a> + <a class="py-2 d-none d-md-inline-block" href="#">Cart</a> + </nav> +</header> + +<main> + <div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-light"> + <div class="col-md-5 p-lg-5 mx-auto my-5"> + <h1 class="display-4 fw-normal">Punny headline</h1> + <p class="lead fw-normal">And an even wittier subheading to boot. Jumpstart your marketing efforts with this example based on Apple’s marketing pages.</p> + <a class="btn btn-outline-secondary" href="#">Coming soon</a> + </div> + <div class="product-device shadow-sm d-none d-md-block"></div> + <div class="product-device product-device-2 shadow-sm d-none d-md-block"></div> + </div> + + <div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3"> + <div class="bg-dark me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> + <div class="my-3 py-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-light shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + <div class="bg-light me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> + <div class="my-3 p-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + </div> + + <div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3"> + <div class="bg-light me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> + <div class="my-3 p-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + <div class="bg-primary me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> + <div class="my-3 py-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-light shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + </div> + + <div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3"> + <div class="bg-light me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> + <div class="my-3 p-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + <div class="bg-light me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> + <div class="my-3 py-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + </div> + + <div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3"> + <div class="bg-light me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> + <div class="my-3 p-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + <div class="bg-light me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> + <div class="my-3 py-3"> + <h2 class="display-5">Another headline</h2> + <p class="lead">And an even wittier subheading.</p> + </div> + <div class="bg-body shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> + </div> + </div> +</main> + +<footer class="container py-5"> + <div class="row"> + <div class="col-12 col-md"> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="d-block mb-2" role="img" viewBox="0 0 24 24"><title>Product</title><circle cx="12" cy="12" r="10"/><path d="M14.31 8l5.74 9.94M9.69 8h11.48M7.38 12l5.74-9.94M9.69 16L3.95 6.06M14.31 16H2.83m13.79-4l-5.74 9.94"/></svg> + <small class="d-block mb-3 text-muted">© 2017–{{< year >}}</small> + </div> + <div class="col-6 col-md"> + <h5>Features</h5> + <ul class="list-unstyled text-small"> + <li><a class="link-secondary" href="#">Cool stuff</a></li> + <li><a class="link-secondary" href="#">Random feature</a></li> + <li><a class="link-secondary" href="#">Team feature</a></li> + <li><a class="link-secondary" href="#">Stuff for developers</a></li> + <li><a class="link-secondary" href="#">Another one</a></li> + <li><a class="link-secondary" href="#">Last time</a></li> + </ul> + </div> + <div class="col-6 col-md"> + <h5>Resources</h5> + <ul class="list-unstyled text-small"> + <li><a class="link-secondary" href="#">Resource name</a></li> + <li><a class="link-secondary" href="#">Resource</a></li> + <li><a class="link-secondary" href="#">Another resource</a></li> + <li><a class="link-secondary" href="#">Final resource</a></li> + </ul> + </div> + <div class="col-6 col-md"> + <h5>Resources</h5> + <ul class="list-unstyled text-small"> + <li><a class="link-secondary" href="#">Business</a></li> + <li><a class="link-secondary" href="#">Education</a></li> + <li><a class="link-secondary" href="#">Government</a></li> + <li><a class="link-secondary" href="#">Gaming</a></li> + </ul> + </div> + <div class="col-6 col-md"> + <h5>About</h5> + <ul class="list-unstyled text-small"> + <li><a class="link-secondary" href="#">Team</a></li> + <li><a class="link-secondary" href="#">Locations</a></li> + <li><a class="link-secondary" href="#">Privacy</a></li> + <li><a class="link-secondary" href="#">Terms</a></li> + </ul> + </div> + </div> +</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/product/product.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/product/product.css index 4db2864fc..5fcb582b4 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/product/product.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/product/product.css @@ -12,8 +12,8 @@ backdrop-filter: saturate(180%) blur(20px); } .site-header a { - color: #999; - transition: ease-in-out color .15s; + color: #8e8e8e; + transition: color .15s ease-in-out; } .site-header a:hover { color: #fff; @@ -32,7 +32,6 @@ height: 540px; background-color: #333; border-radius: 21px; - -webkit-transform: rotate(30deg); transform: rotate(30deg); } @@ -61,14 +60,10 @@ */ .flex-equal > * { - -ms-flex: 1; flex: 1; } @media (min-width: 768px) { .flex-md-equal > * { - -ms-flex: 1; flex: 1; } } - -.overflow-hidden { overflow: hidden; } diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/index.html new file mode 100644 index 000000000..4d628f1c0 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/index.html @@ -0,0 +1,391 @@ +--- +layout: examples +title: Sidebars +extra_css: + - "sidebars.css" +extra_js: + - src: "sidebars.js" +body_class: "" +--- + +<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> + <symbol id="bootstrap" viewBox="0 0 118 94"> + <title>Bootstrap</title> + <path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z"></path> + </symbol> + <symbol id="home" viewBox="0 0 16 16"> + <path d="M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4.5a.5.5 0 0 0 .5-.5v-4h2v4a.5.5 0 0 0 .5.5H14a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146zM2.5 14V7.707l5.5-5.5 5.5 5.5V14H10v-4a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v4H2.5z"/> + </symbol> + <symbol id="speedometer2" viewBox="0 0 16 16"> + <path d="M8 4a.5.5 0 0 1 .5.5V6a.5.5 0 0 1-1 0V4.5A.5.5 0 0 1 8 4zM3.732 5.732a.5.5 0 0 1 .707 0l.915.914a.5.5 0 1 1-.708.708l-.914-.915a.5.5 0 0 1 0-.707zM2 10a.5.5 0 0 1 .5-.5h1.586a.5.5 0 0 1 0 1H2.5A.5.5 0 0 1 2 10zm9.5 0a.5.5 0 0 1 .5-.5h1.5a.5.5 0 0 1 0 1H12a.5.5 0 0 1-.5-.5zm.754-4.246a.389.389 0 0 0-.527-.02L7.547 9.31a.91.91 0 1 0 1.302 1.258l3.434-4.297a.389.389 0 0 0-.029-.518z"/> + <path fill-rule="evenodd" d="M0 10a8 8 0 1 1 15.547 2.661c-.442 1.253-1.845 1.602-2.932 1.25C11.309 13.488 9.475 13 8 13c-1.474 0-3.31.488-4.615.911-1.087.352-2.49.003-2.932-1.25A7.988 7.988 0 0 1 0 10zm8-7a7 7 0 0 0-6.603 9.329c.203.575.923.876 1.68.63C4.397 12.533 6.358 12 8 12s3.604.532 4.923.96c.757.245 1.477-.056 1.68-.631A7 7 0 0 0 8 3z"/> + </symbol> + <symbol id="table" viewBox="0 0 16 16"> + <path d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm15 2h-4v3h4V4zm0 4h-4v3h4V8zm0 4h-4v3h3a1 1 0 0 0 1-1v-2zm-5 3v-3H6v3h4zm-5 0v-3H1v2a1 1 0 0 0 1 1h3zm-4-4h4V8H1v3zm0-4h4V4H1v3zm5-3v3h4V4H6zm4 4H6v3h4V8z"/> + </symbol> + <symbol id="people-circle" viewBox="0 0 16 16"> + <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/> + <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/> + </symbol> + <symbol id="grid" viewBox="0 0 16 16"> + <path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/> + </symbol> + <symbol id="collection" viewBox="0 0 16 16"> + <path d="M2.5 3.5a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1h-11zm2-2a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1h-7zM0 13a1.5 1.5 0 0 0 1.5 1.5h13A1.5 1.5 0 0 0 16 13V6a1.5 1.5 0 0 0-1.5-1.5h-13A1.5 1.5 0 0 0 0 6v7zm1.5.5A.5.5 0 0 1 1 13V6a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-13z"/> + </symbol> + <symbol id="calendar3" viewBox="0 0 16 16"> + <path d="M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z"/> + <path d="M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/> + </symbol> + <symbol id="chat-quote-fill" viewBox="0 0 16 16"> + <path d="M16 8c0 3.866-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234-.2.032-.352-.176-.273-.362.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7zM7.194 6.766a1.688 1.688 0 0 0-.227-.272 1.467 1.467 0 0 0-.469-.324l-.008-.004A1.785 1.785 0 0 0 5.734 6C4.776 6 4 6.746 4 7.667c0 .92.776 1.666 1.734 1.666.343 0 .662-.095.931-.26-.137.389-.39.804-.81 1.22a.405.405 0 0 0 .011.59c.173.16.447.155.614-.01 1.334-1.329 1.37-2.758.941-3.706a2.461 2.461 0 0 0-.227-.4zM11 9.073c-.136.389-.39.804-.81 1.22a.405.405 0 0 0 .012.59c.172.16.446.155.613-.01 1.334-1.329 1.37-2.758.942-3.706a2.466 2.466 0 0 0-.228-.4 1.686 1.686 0 0 0-.227-.273 1.466 1.466 0 0 0-.469-.324l-.008-.004A1.785 1.785 0 0 0 10.07 6c-.957 0-1.734.746-1.734 1.667 0 .92.777 1.666 1.734 1.666.343 0 .662-.095.931-.26z"/> + </symbol> + <symbol id="cpu-fill" viewBox="0 0 16 16"> + <path d="M6.5 6a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/> + <path d="M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5h3A1.5 1.5 0 0 1 11 6.5v3A1.5 1.5 0 0 1 9.5 11h-3A1.5 1.5 0 0 1 5 9.5v-3A1.5 1.5 0 0 1 6.5 5z"/> + </symbol> + <symbol id="gear-fill" viewBox="0 0 16 16"> + <path d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z"/> + </symbol> + <symbol id="speedometer" viewBox="0 0 16 16"> + <path d="M8 2a.5.5 0 0 1 .5.5V4a.5.5 0 0 1-1 0V2.5A.5.5 0 0 1 8 2zM3.732 3.732a.5.5 0 0 1 .707 0l.915.914a.5.5 0 1 1-.708.708l-.914-.915a.5.5 0 0 1 0-.707zM2 8a.5.5 0 0 1 .5-.5h1.586a.5.5 0 0 1 0 1H2.5A.5.5 0 0 1 2 8zm9.5 0a.5.5 0 0 1 .5-.5h1.5a.5.5 0 0 1 0 1H12a.5.5 0 0 1-.5-.5zm.754-4.246a.389.389 0 0 0-.527-.02L7.547 7.31A.91.91 0 1 0 8.85 8.569l3.434-4.297a.389.389 0 0 0-.029-.518z"/> + <path fill-rule="evenodd" d="M6.664 15.889A8 8 0 1 1 9.336.11a8 8 0 0 1-2.672 15.78zm-4.665-4.283A11.945 11.945 0 0 1 8 10c2.186 0 4.236.585 6.001 1.606a7 7 0 1 0-12.002 0z"/> + </symbol> + <symbol id="toggles2" viewBox="0 0 16 16"> + <path d="M9.465 10H12a2 2 0 1 1 0 4H9.465c.34-.588.535-1.271.535-2 0-.729-.195-1.412-.535-2z"/> + <path d="M6 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 1a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm.535-10a3.975 3.975 0 0 1-.409-1H4a1 1 0 0 1 0-2h2.126c.091-.355.23-.69.41-1H4a2 2 0 1 0 0 4h2.535z"/> + <path d="M14 4a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/> + </symbol> + <symbol id="tools" viewBox="0 0 16 16"> + <path d="M1 0L0 1l2.2 3.081a1 1 0 0 0 .815.419h.07a1 1 0 0 1 .708.293l2.675 2.675-2.617 2.654A3.003 3.003 0 0 0 0 13a3 3 0 1 0 5.878-.851l2.654-2.617.968.968-.305.914a1 1 0 0 0 .242 1.023l3.356 3.356a1 1 0 0 0 1.414 0l1.586-1.586a1 1 0 0 0 0-1.414l-3.356-3.356a1 1 0 0 0-1.023-.242L10.5 9.5l-.96-.96 2.68-2.643A3.005 3.005 0 0 0 16 3c0-.269-.035-.53-.102-.777l-2.14 2.141L12 4l-.364-1.757L13.777.102a3 3 0 0 0-3.675 3.68L7.462 6.46 4.793 3.793a1 1 0 0 1-.293-.707v-.071a1 1 0 0 0-.419-.814L1 0zm9.646 10.646a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708zM3 11l.471.242.529.026.287.445.445.287.026.529L5 13l-.242.471-.026.529-.445.287-.287.445-.529.026L3 15l-.471-.242L2 14.732l-.287-.445L1.268 14l-.026-.529L1 13l.242-.471.026-.529.445-.287.287-.445.529-.026L3 11z"/> + </symbol> + <symbol id="chevron-right" viewBox="0 0 16 16"> + <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/> + </symbol> + <symbol id="geo-fill" viewBox="0 0 16 16"> + <path fill-rule="evenodd" d="M4 4a4 4 0 1 1 4.5 3.969V13.5a.5.5 0 0 1-1 0V7.97A4 4 0 0 1 4 3.999zm2.493 8.574a.5.5 0 0 1-.411.575c-.712.118-1.28.295-1.655.493a1.319 1.319 0 0 0-.37.265.301.301 0 0 0-.057.09V14l.002.008a.147.147 0 0 0 .016.033.617.617 0 0 0 .145.15c.165.13.435.27.813.395.751.25 1.82.414 3.024.414s2.273-.163 3.024-.414c.378-.126.648-.265.813-.395a.619.619 0 0 0 .146-.15.148.148 0 0 0 .015-.033L12 14v-.004a.301.301 0 0 0-.057-.09 1.318 1.318 0 0 0-.37-.264c-.376-.198-.943-.375-1.655-.493a.5.5 0 1 1 .164-.986c.77.127 1.452.328 1.957.594C12.5 13 13 13.4 13 14c0 .426-.26.752-.544.977-.29.228-.68.413-1.116.558-.878.293-2.059.465-3.34.465-1.281 0-2.462-.172-3.34-.465-.436-.145-.826-.33-1.116-.558C3.26 14.752 3 14.426 3 14c0-.599.5-1 .961-1.243.505-.266 1.187-.467 1.957-.594a.5.5 0 0 1 .575.411z"/> + </symbol> +</svg> + +<main> + <h1 class="visually-hidden">Sidebars examples</h1> + + <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark" style="width: 280px;"> + <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none"> + <svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg> + <span class="fs-4">Sidebar</span> + </a> + <hr> + <ul class="nav nav-pills flex-column mb-auto"> + <li class="nav-item"> + <a href="#" class="nav-link active" aria-current="page"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#home"/></svg> + Home + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#speedometer2"/></svg> + Dashboard + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#table"/></svg> + Orders + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#grid"/></svg> + Products + </a> + </li> + <li> + <a href="#" class="nav-link text-white"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#people-circle"/></svg> + Customers + </a> + </li> + </ul> + <hr> + <div class="dropdown"> + <a href="#" class="d-flex align-items-center text-white text-decoration-none dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false"> + <img src="https://github.com/mdo.png" alt="" width="32" height="32" class="rounded-circle me-2"> + <strong>mdo</strong> + </a> + <ul class="dropdown-menu dropdown-menu-dark text-small shadow" aria-labelledby="dropdownUser1"> + <li><a class="dropdown-item" href="#">New project...</a></li> + <li><a class="dropdown-item" href="#">Settings</a></li> + <li><a class="dropdown-item" href="#">Profile</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Sign out</a></li> + </ul> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="d-flex flex-column flex-shrink-0 p-3 bg-light" style="width: 280px;"> + <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none"> + <svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg> + <span class="fs-4">Sidebar</span> + </a> + <hr> + <ul class="nav nav-pills flex-column mb-auto"> + <li class="nav-item"> + <a href="#" class="nav-link active" aria-current="page"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#home"/></svg> + Home + </a> + </li> + <li> + <a href="#" class="nav-link link-dark"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#speedometer2"/></svg> + Dashboard + </a> + </li> + <li> + <a href="#" class="nav-link link-dark"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#table"/></svg> + Orders + </a> + </li> + <li> + <a href="#" class="nav-link link-dark"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#grid"/></svg> + Products + </a> + </li> + <li> + <a href="#" class="nav-link link-dark"> + <svg class="bi me-2" width="16" height="16"><use xlink:href="#people-circle"/></svg> + Customers + </a> + </li> + </ul> + <hr> + <div class="dropdown"> + <a href="#" class="d-flex align-items-center link-dark text-decoration-none dropdown-toggle" id="dropdownUser2" data-bs-toggle="dropdown" aria-expanded="false"> + <img src="https://github.com/mdo.png" alt="" width="32" height="32" class="rounded-circle me-2"> + <strong>mdo</strong> + </a> + <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser2"> + <li><a class="dropdown-item" href="#">New project...</a></li> + <li><a class="dropdown-item" href="#">Settings</a></li> + <li><a class="dropdown-item" href="#">Profile</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Sign out</a></li> + </ul> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="d-flex flex-column flex-shrink-0 bg-light" style="width: 4.5rem;"> + <a href="/" class="d-block p-3 link-dark text-decoration-none" title="Icon-only" data-bs-toggle="tooltip" data-bs-placement="right"> + <svg class="bi" width="40" height="32"><use xlink:href="#bootstrap"/></svg> + <span class="visually-hidden">Icon-only</span> + </a> + <ul class="nav nav-pills nav-flush flex-column mb-auto text-center"> + <li class="nav-item"> + <a href="#" class="nav-link active py-3 border-bottom" aria-current="page" title="Home" data-bs-toggle="tooltip" data-bs-placement="right"> + <svg class="bi" width="24" height="24" role="img" aria-label="Home"><use xlink:href="#home"/></svg> + </a> + </li> + <li> + <a href="#" class="nav-link py-3 border-bottom" title="Dashboard" data-bs-toggle="tooltip" data-bs-placement="right"> + <svg class="bi" width="24" height="24" role="img" aria-label="Dashboard"><use xlink:href="#speedometer2"/></svg> + </a> + </li> + <li> + <a href="#" class="nav-link py-3 border-bottom" title="Orders" data-bs-toggle="tooltip" data-bs-placement="right"> + <svg class="bi" width="24" height="24" role="img" aria-label="Orders"><use xlink:href="#table"/></svg> + </a> + </li> + <li> + <a href="#" class="nav-link py-3 border-bottom" title="Products" data-bs-toggle="tooltip" data-bs-placement="right"> + <svg class="bi" width="24" height="24" role="img" aria-label="Products"><use xlink:href="#grid"/></svg> + </a> + </li> + <li> + <a href="#" class="nav-link py-3 border-bottom" title="Customers" data-bs-toggle="tooltip" data-bs-placement="right"> + <svg class="bi" width="24" height="24" role="img" aria-label="Customers"><use xlink:href="#people-circle"/></svg> + </a> + </li> + </ul> + <div class="dropdown border-top"> + <a href="#" class="d-flex align-items-center justify-content-center p-3 link-dark text-decoration-none dropdown-toggle" id="dropdownUser3" data-bs-toggle="dropdown" aria-expanded="false"> + <img src="https://github.com/mdo.png" alt="mdo" width="24" height="24" class="rounded-circle"> + </a> + <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser3"> + <li><a class="dropdown-item" href="#">New project...</a></li> + <li><a class="dropdown-item" href="#">Settings</a></li> + <li><a class="dropdown-item" href="#">Profile</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Sign out</a></li> + </ul> + </div> + </div> + + <div class="b-example-divider"></div> + + <div class="flex-shrink-0 p-3 bg-white" style="width: 280px;"> + <a href="/" class="d-flex align-items-center pb-3 mb-3 link-dark text-decoration-none border-bottom"> + <svg class="bi me-2" width="30" height="24"><use xlink:href="#bootstrap"/></svg> + <span class="fs-5 fw-semibold">Collapsible</span> + </a> + <ul class="list-unstyled ps-0"> + <li class="mb-1"> + <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expanded="true"> + Home + </button> + <div class="collapse show" id="home-collapse"> + <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> + <li><a href="#" class="link-dark rounded">Overview</a></li> + <li><a href="#" class="link-dark rounded">Updates</a></li> + <li><a href="#" class="link-dark rounded">Reports</a></li> + </ul> + </div> + </li> + <li class="mb-1"> + <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#dashboard-collapse" aria-expanded="false"> + Dashboard + </button> + <div class="collapse" id="dashboard-collapse"> + <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> + <li><a href="#" class="link-dark rounded">Overview</a></li> + <li><a href="#" class="link-dark rounded">Weekly</a></li> + <li><a href="#" class="link-dark rounded">Monthly</a></li> + <li><a href="#" class="link-dark rounded">Annually</a></li> + </ul> + </div> + </li> + <li class="mb-1"> + <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#orders-collapse" aria-expanded="false"> + Orders + </button> + <div class="collapse" id="orders-collapse"> + <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> + <li><a href="#" class="link-dark rounded">New</a></li> + <li><a href="#" class="link-dark rounded">Processed</a></li> + <li><a href="#" class="link-dark rounded">Shipped</a></li> + <li><a href="#" class="link-dark rounded">Returned</a></li> + </ul> + </div> + </li> + <li class="border-top my-3"></li> + <li class="mb-1"> + <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#account-collapse" aria-expanded="false"> + Account + </button> + <div class="collapse" id="account-collapse"> + <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> + <li><a href="#" class="link-dark rounded">New...</a></li> + <li><a href="#" class="link-dark rounded">Profile</a></li> + <li><a href="#" class="link-dark rounded">Settings</a></li> + <li><a href="#" class="link-dark rounded">Sign out</a></li> + </ul> + </div> + </li> + </ul> + </div> + + <div class="b-example-divider"></div> + + <div class="d-flex flex-column align-items-stretch flex-shrink-0 bg-white" style="width: 380px;"> + <a href="/" class="d-flex align-items-center flex-shrink-0 p-3 link-dark text-decoration-none border-bottom"> + <svg class="bi me-2" width="30" height="24"><use xlink:href="#bootstrap"/></svg> + <span class="fs-5 fw-semibold">List group</span> + </a> + <div class="list-group list-group-flush border-bottom scrollarea"> + <a href="#" class="list-group-item list-group-item-action active py-3 lh-tight" aria-current="true"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small>Wed</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Tues</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Mon</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight" aria-current="true"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Wed</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Tues</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Mon</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight" aria-current="true"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Wed</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Tues</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Mon</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight" aria-current="true"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Wed</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Tues</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + <a href="#" class="list-group-item list-group-item-action py-3 lh-tight"> + <div class="d-flex w-100 align-items-center justify-content-between"> + <strong class="mb-1">List group item heading</strong> + <small class="text-muted">Mon</small> + </div> + <div class="col-10 mb-1 small">Some placeholder content in a paragraph below the heading and date.</div> + </a> + </div> + </div> + + <div class="b-example-divider"></div> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/sidebars.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/sidebars.css new file mode 100644 index 000000000..6949a379e --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/sidebars.css @@ -0,0 +1,89 @@ +body { + min-height: 100vh; + min-height: -webkit-fill-available; +} + +html { + height: -webkit-fill-available; +} + +main { + display: flex; + flex-wrap: nowrap; + height: 100vh; + height: -webkit-fill-available; + max-height: 100vh; + overflow-x: auto; + overflow-y: hidden; +} + +.b-example-divider { + flex-shrink: 0; + width: 1.5rem; + height: 100vh; + background-color: rgba(0, 0, 0, .1); + border: solid rgba(0, 0, 0, .15); + border-width: 1px 0; + box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); +} + +.bi { + vertical-align: -.125em; + pointer-events: none; + fill: currentColor; +} + +.dropdown-toggle { outline: 0; } + +.nav-flush .nav-link { + border-radius: 0; +} + +.btn-toggle { + display: inline-flex; + align-items: center; + padding: .25rem .5rem; + font-weight: 600; + color: rgba(0, 0, 0, .65); + background-color: transparent; + border: 0; +} +.btn-toggle:hover, +.btn-toggle:focus { + color: rgba(0, 0, 0, .85); + background-color: #d2f4ea; +} + +.btn-toggle::before { + width: 1.25em; + line-height: 0; + content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); + transition: transform .35s ease; + transform-origin: .5em 50%; +} + +.btn-toggle[aria-expanded="true"] { + color: rgba(0, 0, 0, .85); +} +.btn-toggle[aria-expanded="true"]::before { + transform: rotate(90deg); +} + +.btn-toggle-nav a { + display: inline-flex; + padding: .1875rem .5rem; + margin-top: .125rem; + margin-left: 1.25rem; + text-decoration: none; +} +.btn-toggle-nav a:hover, +.btn-toggle-nav a:focus { + background-color: #d2f4ea; +} + +.scrollarea { + overflow-y: auto; +} + +.fw-semibold { font-weight: 600; } +.lh-tight { line-height: 1.25; } diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/sidebars.js b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/sidebars.js new file mode 100644 index 000000000..68384c163 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sidebars/sidebars.js @@ -0,0 +1,8 @@ +/* global bootstrap: false */ +(function () { + 'use strict' + var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) + tooltipTriggerList.forEach(function (tooltipTriggerEl) { + new bootstrap.Tooltip(tooltipTriggerEl) + }) +})() diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sign-in/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sign-in/index.html new file mode 100644 index 000000000..fb885ba41 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sign-in/index.html @@ -0,0 +1,32 @@ +--- +layout: examples +title: Signin Template +extra_css: + - "signin.css" +body_class: "text-center" +include_js: false +--- + +<main class="form-signin"> + <form> + <img class="mb-4" src="/docs/{{< param docs_version >}}/assets/brand/bootstrap-logo.svg" alt="" width="72" height="57"> + <h1 class="h3 mb-3 fw-normal">Please sign in</h1> + + <div class="form-floating"> + <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> + <label for="floatingInput">Email address</label> + </div> + <div class="form-floating"> + <input type="password" class="form-control" id="floatingPassword" placeholder="Password"> + <label for="floatingPassword">Password</label> + </div> + + <div class="checkbox mb-3"> + <label> + <input type="checkbox" value="remember-me"> Remember me + </label> + </div> + <button class="w-100 btn btn-lg btn-primary" type="submit">Sign in</button> + <p class="mt-5 mb-3 text-muted">© 2017–{{< year >}}</p> + </form> +</main> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sign-in/signin.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sign-in/signin.css index 90cc93e5b..4732d1fb9 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sign-in/signin.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sign-in/signin.css @@ -4,9 +4,7 @@ body { } body { - display: -ms-flexbox; display: flex; - -ms-flex-align: center; align-items: center; padding-top: 40px; padding-bottom: 40px; @@ -19,24 +17,21 @@ body { padding: 15px; margin: auto; } + .form-signin .checkbox { font-weight: 400; } -.form-signin .form-control { - position: relative; - box-sizing: border-box; - height: auto; - padding: 10px; - font-size: 16px; -} -.form-signin .form-control:focus { + +.form-signin .form-floating:focus-within { z-index: 2; } + .form-signin input[type="email"] { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } + .form-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/starter-template/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/starter-template/index.html new file mode 100644 index 000000000..48a5cbfad --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/starter-template/index.html @@ -0,0 +1,51 @@ +--- +layout: examples +title: Starter Template +extra_css: + - "starter-template.css" +--- + +<div class="col-lg-8 mx-auto p-3 py-md-5"> + <header class="d-flex align-items-center pb-3 mb-5 border-bottom"> + <a href="/" class="d-flex align-items-center text-dark text-decoration-none"> + <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg> + <span class="fs-4">Starter template</span> + </a> + </header> + + <main> + <h1>Get started with Bootstrap</h1> + <p class="fs-5 col-md-8">Quickly and easily get started with Bootstrap's compiled, production-ready files with this barebones example featuring some basic HTML and helpful links. Download all our examples to get started.</p> + + <div class="mb-5"> + <a href="{{< docsref "/examples" >}}" class="btn btn-primary btn-lg px-4">Download examples</a> + </div> + + <hr class="col-3 col-md-2 mb-5"> + + <div class="row g-5"> + <div class="col-md-6"> + <h2>Starter projects</h2> + <p>Ready to beyond the starter template? Check out these open source projects that you can quickly duplicate to a new GitHub repository.</p> + <ul class="icon-list"> + <li><a href="https://github.com/twbs/bootstrap-npm-starter" rel="noopener" target="_blank">Bootstrap npm starter</a></li> + <li class="text-muted">Bootstrap Parcel starter (coming soon!)</li> + </ul> + </div> + + <div class="col-md-6"> + <h2>Guides</h2> + <p>Read more detailed instructions and documentation on using or contributing to Bootstrap.</p> + <ul class="icon-list"> + <li><a href="{{< docsref "/getting-started/introduction" >}}">Bootstrap quick start guide</a></li> + <li><a href="{{< docsref "/getting-started/webpack" >}}">Bootstrap Webpack guide</a></li> + <li><a href="{{< docsref "/getting-started/parcel" >}}">Bootstrap Parcel guide</a></li> + <li><a href="{{< docsref "/getting-started/build-tools" >}}">Contributing to Bootstrap</a></li> + </ul> + </div> + </div> + </main> + <footer class="pt-5 my-5 text-muted border-top"> + Created by the Bootstrap team · © {{< year >}} + </footer> +</div> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/starter-template/starter-template.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/starter-template/starter-template.css new file mode 100644 index 000000000..d03436db0 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/starter-template/starter-template.css @@ -0,0 +1,18 @@ +.icon-list { + padding-left: 0; + list-style: none; +} +.icon-list li { + display: flex; + align-items: flex-start; + margin-bottom: .25rem; +} +.icon-list li::before { + display: block; + flex-shrink: 0; + width: 1.5em; + height: 1.5em; + margin-right: .5rem; + content: ""; + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23212529' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z'/%3E%3C/svg%3E") no-repeat center center / 100% auto; +} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer-navbar/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer-navbar/index.html new file mode 100644 index 000000000..ce036dc09 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer-navbar/index.html @@ -0,0 +1,52 @@ +--- +layout: examples +title: Sticky Footer Navbar Template +extra_css: + - "sticky-footer-navbar.css" +html_class: "h-100" +body_class: "d-flex flex-column h-100" +--- + +<header> + <!-- Fixed navbar --> + <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> + <div class="container-fluid"> + <a class="navbar-brand" href="#">Fixed navbar</a> + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + <div class="collapse navbar-collapse" id="navbarCollapse"> + <ul class="navbar-nav me-auto mb-2 mb-md-0"> + <li class="nav-item"> + <a class="nav-link active" aria-current="page" href="#">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + </li> + </ul> + <form class="d-flex"> + <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> + <button class="btn btn-outline-success" type="submit">Search</button> + </form> + </div> + </div> + </nav> +</header> + +<!-- Begin page content --> +<main class="flex-shrink-0"> + <div class="container"> + <h1 class="mt-5">Sticky footer with fixed navbar</h1> + <p class="lead">Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code class="small">padding-top: 60px;</code> on the <code class="small">main > .container</code>.</p> + <p>Back to <a href="{{< docsref "/examples/sticky-footer" >}}">the default sticky footer</a> minus the navbar.</p> + </div> +</main> + +<footer class="footer mt-auto py-3 bg-light"> + <div class="container"> + <span class="text-muted">Place sticky footer content here.</span> + </div> +</footer> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer-navbar/sticky-footer-navbar.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer-navbar/sticky-footer-navbar.css index b4696dab6..3087ead7d 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer-navbar/sticky-footer-navbar.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer-navbar/sticky-footer-navbar.css @@ -5,16 +5,3 @@ main > .container { padding: 60px 15px 0; } - -.footer { - background-color: #f5f5f5; -} - -.footer > .container { - padding-right: 15px; - padding-left: 15px; -} - -code { - font-size: 80%; -} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer/index.html b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer/index.html index 441e49942..7a6e127cd 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer/index.html +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer/index.html @@ -9,7 +9,7 @@ include_js: false --- <!-- Begin page content --> -<main role="main" class="flex-shrink-0"> +<main class="flex-shrink-0"> <div class="container"> <h1 class="mt-5">Sticky footer</h1> <p class="lead">Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p> @@ -17,7 +17,7 @@ include_js: false </div> </main> -<footer class="footer mt-auto py-3"> +<footer class="footer mt-auto py-3 bg-light"> <div class="container"> <span class="text-muted">Place sticky footer content here.</span> </div> diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer/sticky-footer.css b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer/sticky-footer.css index 7e85cdd2a..f8be43729 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/examples/sticky-footer/sticky-footer.css +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/examples/sticky-footer/sticky-footer.css @@ -7,7 +7,3 @@ max-width: 680px; padding: 0 15px; } - -.footer { - background-color: #f5f5f5; -} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/checks-radios.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/checks-radios.md new file mode 100644 index 000000000..7fefb6aa6 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/checks-radios.md @@ -0,0 +1,277 @@ +--- +layout: docs +title: Checks and radios +description: Create consistent cross-browser and cross-device checkboxes and radios with our completely rewritten checks component. +group: forms +aliases: "/docs/5.0/forms/checks/" +toc: true +--- + +## Approach + +Browser default checkboxes and radios are replaced with the help of `.form-check`, a series of classes for both input types that improves the layout and behavior of their HTML elements, that provide greater customization and cross browser consistency. Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many. + +Structurally, our `<input>`s and `<label>`s are sibling elements as opposed to an `<input>` within a `<label>`. This is slightly more verbose as you must specify `id` and `for` attributes to relate the `<input>` and `<label>`. We use the sibling selector (`~`) for all our `<input>` states, like `:checked` or `:disabled`. When combined with the `.form-check-label` class, we can easily style the text for each item based on the `<input>`'s state. + +Our checks use custom Bootstrap icons to indicate checked or indeterminate states. + +## Checks + +{{< example >}} +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault"> + <label class="form-check-label" for="flexCheckDefault"> + Default checkbox + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="flexCheckChecked" checked> + <label class="form-check-label" for="flexCheckChecked"> + Checked checkbox + </label> +</div> +{{< /example >}} + +### Indeterminate + +Checkboxes can utilize the `:indeterminate` pseudo class when manually set via JavaScript (there is no available HTML attribute for specifying it). + +{{< example class="bd-example-indeterminate">}} +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="flexCheckIndeterminate"> + <label class="form-check-label" for="flexCheckIndeterminate"> + Indeterminate checkbox + </label> +</div> +{{< /example >}} + +### Disabled + +Add the `disabled` attribute and the associated `<label>`s are automatically styled to match with a lighter color to help indicate the input's state. + +{{< example >}} +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="flexCheckDisabled" disabled> + <label class="form-check-label" for="flexCheckDisabled"> + Disabled checkbox + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="flexCheckCheckedDisabled" checked disabled> + <label class="form-check-label" for="flexCheckCheckedDisabled"> + Disabled checked checkbox + </label> +</div> +{{< /example >}} + +## Radios + +{{< example >}} +<div class="form-check"> + <input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1"> + <label class="form-check-label" for="flexRadioDefault1"> + Default radio + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault2" checked> + <label class="form-check-label" for="flexRadioDefault2"> + Default checked radio + </label> +</div> +{{< /example >}} + +### Disabled + +Add the `disabled` attribute and the associated `<label>`s are automatically styled to match with a lighter color to help indicate the input's state. + +{{< example >}} +<div class="form-check"> + <input class="form-check-input" type="radio" name="flexRadioDisabled" id="flexRadioDisabled" disabled> + <label class="form-check-label" for="flexRadioDisabled"> + Disabled radio + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="radio" name="flexRadioDisabled" id="flexRadioCheckedDisabled" checked disabled> + <label class="form-check-label" for="flexRadioCheckedDisabled"> + Disabled checked radio + </label> +</div> +{{< /example >}} + +## Switches + +A switch has the markup of a custom checkbox but uses the `.form-switch` class to render a toggle switch. Switches also support the `disabled` attribute. + +{{< example >}} +<div class="form-check form-switch"> + <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault"> + <label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label> +</div> +<div class="form-check form-switch"> + <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked> + <label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label> +</div> +<div class="form-check form-switch"> + <input class="form-check-input" type="checkbox" id="flexSwitchCheckDisabled" disabled> + <label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label> +</div> +<div class="form-check form-switch"> + <input class="form-check-input" type="checkbox" id="flexSwitchCheckCheckedDisabled" checked disabled> + <label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label> +</div> +{{< /example >}} + +## Default (stacked) + +By default, any number of checkboxes and radios that are immediate sibling will be vertically stacked and appropriately spaced with `.form-check`. + +{{< example >}} +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="defaultCheck1"> + <label class="form-check-label" for="defaultCheck1"> + Default checkbox + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="defaultCheck2" disabled> + <label class="form-check-label" for="defaultCheck2"> + Disabled checkbox + </label> +</div> +{{< /example >}} + +{{< example >}} +<div class="form-check"> + <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked> + <label class="form-check-label" for="exampleRadios1"> + Default radio + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2"> + <label class="form-check-label" for="exampleRadios2"> + Second default radio + </label> +</div> +<div class="form-check"> + <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios3" value="option3" disabled> + <label class="form-check-label" for="exampleRadios3"> + Disabled radio + </label> +</div> +{{< /example >}} + +## Inline + +Group checkboxes or radios on the same horizontal row by adding `.form-check-inline` to any `.form-check`. + +{{< example >}} +<div class="form-check form-check-inline"> + <input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1"> + <label class="form-check-label" for="inlineCheckbox1">1</label> +</div> +<div class="form-check form-check-inline"> + <input class="form-check-input" type="checkbox" id="inlineCheckbox2" value="option2"> + <label class="form-check-label" for="inlineCheckbox2">2</label> +</div> +<div class="form-check form-check-inline"> + <input class="form-check-input" type="checkbox" id="inlineCheckbox3" value="option3" disabled> + <label class="form-check-label" for="inlineCheckbox3">3 (disabled)</label> +</div> +{{< /example >}} + +{{< example >}} +<div class="form-check form-check-inline"> + <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> + <label class="form-check-label" for="inlineRadio1">1</label> +</div> +<div class="form-check form-check-inline"> + <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> + <label class="form-check-label" for="inlineRadio2">2</label> +</div> +<div class="form-check form-check-inline"> + <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3" disabled> + <label class="form-check-label" for="inlineRadio3">3 (disabled)</label> +</div> +{{< /example >}} + +## Without labels + +Omit the wrapping `.form-check` for checkboxes and radios that have no label text. Remember to still provide some form of accessible name for assistive technologies (for instance, using `aria-label`). See the [forms overview accessibility]({{< docsref "/forms/overview#accessibility" >}}) section for details. + +{{< example >}} +<div> + <input class="form-check-input" type="checkbox" id="checkboxNoLabel" value="" aria-label="..."> +</div> + +<div> + <input class="form-check-input" type="radio" name="radioNoLabel" id="radioNoLabel1" value="" aria-label="..."> +</div> +{{< /example >}} + +## Toggle buttons + +Create button-like checkboxes and radio buttons by using `.btn` styles rather than `.form-check-label` on the `<label>` elements. These toggle buttons can further be grouped in a [button group]({{< docsref "/components/button-group" >}}) if needed. + +### Checkbox toggle buttons + +{{< example >}} +<input type="checkbox" class="btn-check" id="btn-check" autocomplete="off"> +<label class="btn btn-primary" for="btn-check">Single toggle</label> +{{< /example >}} + +{{< example >}} +<input type="checkbox" class="btn-check" id="btn-check-2" checked autocomplete="off"> +<label class="btn btn-primary" for="btn-check-2">Checked</label> +{{< /example >}} + +{{< example >}} +<input type="checkbox" class="btn-check" id="btn-check-3" autocomplete="off" disabled> +<label class="btn btn-primary" for="btn-check-3">Disabled</label> +{{< /example >}} + +{{< callout info >}} +Visually, these checkbox toggle buttons are identical to the [button plugin toggle buttons]({{< docsref "/components/buttons#button-plugin" >}}). However, they are conveyed differently by assistive technologies: the checkbox toggles will be announced by screen readers as "checked"/"not checked" (since, despite their appearance, they are fundamentally still checkboxes), whereas the button plugin toggle buttons will be announced as "button"/"button pressed". The choice between these two approaches will depend on the type of toggle you are creating, and whether or not the toggle will make sense to users when announced as a checkbox or as an actual button. +{{< /callout >}} + +### Radio toggle buttons + +{{< example >}} +<input type="radio" class="btn-check" name="options" id="option1" autocomplete="off" checked> +<label class="btn btn-secondary" for="option1">Checked</label> + +<input type="radio" class="btn-check" name="options" id="option2" autocomplete="off"> +<label class="btn btn-secondary" for="option2">Radio</label> + +<input type="radio" class="btn-check" name="options" id="option3" autocomplete="off" disabled> +<label class="btn btn-secondary" for="option3">Disabled</label> + +<input type="radio" class="btn-check" name="options" id="option4" autocomplete="off"> +<label class="btn btn-secondary" for="option4">Radio</label> +{{< /example >}} + +### Outlined styles + +Different variants of `.btn`, such at the various outlined styles, are supported. + +{{< example >}} +<input type="checkbox" class="btn-check" id="btn-check-outlined" autocomplete="off"> +<label class="btn btn-outline-primary" for="btn-check-outlined">Single toggle</label><br> + +<input type="checkbox" class="btn-check" id="btn-check-2-outlined" checked autocomplete="off"> +<label class="btn btn-outline-secondary" for="btn-check-2-outlined">Checked</label><br> + +<input type="radio" class="btn-check" name="options-outlined" id="success-outlined" autocomplete="off" checked> +<label class="btn btn-outline-success" for="success-outlined">Checked success radio</label> + +<input type="radio" class="btn-check" name="options-outlined" id="danger-outlined" autocomplete="off"> +<label class="btn btn-outline-danger" for="danger-outlined">Danger radio</label> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="form-check-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/floating-labels.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/floating-labels.md new file mode 100644 index 000000000..941055089 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/floating-labels.md @@ -0,0 +1,108 @@ +--- +layout: docs +title: Floating labels +description: Create beautifully simple form labels that float over your input fields. +group: forms +toc: true +--- + +## Example + +Wrap a pair of `<input class="form-control">` and `<label>` elements in `.form-floating` to enable floating labels with Bootstrap's textual form fields. A `placeholder` is required on each `<input>` as our method of CSS-only floating labels uses the `:placeholder-shown` pseudo-element. Also note that the `<input>` must come first so we can utilize a sibling selector (e.g., `~`). + +{{< example >}} +<div class="form-floating mb-3"> + <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com"> + <label for="floatingInput">Email address</label> +</div> +<div class="form-floating"> + <input type="password" class="form-control" id="floatingPassword" placeholder="Password"> + <label for="floatingPassword">Password</label> +</div> +{{< /example >}} + +When there's a `value` already defined, `<label>`s will automatically adjust to their floated position. + +{{< example >}} +<form class="form-floating"> + <input type="email" class="form-control" id="floatingInputValue" placeholder="name@example.com" value="test@example.com"> + <label for="floatingInputValue">Input with value</label> +</form> +{{< /example >}} + +Form validation styles also work as expected. + +{{< example >}} +<form class="form-floating"> + <input type="email" class="form-control is-invalid" id="floatingInputInvalid" placeholder="name@example.com" value="test@example.com"> + <label for="floatingInputInvalid">Invalid input</label> +</form> +{{< /example >}} + +## Textareas + +By default, `<textarea>`s with `.form-control` will be the same height as `<input>`s. + +{{< example >}} +<div class="form-floating"> + <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea"></textarea> + <label for="floatingTextarea">Comments</label> +</div> +{{< /example >}} + +To set a custom height on your `<textarea>`, do not use the `rows` attribute. Instead, set an explicit `height` (either inline or via custom CSS). + +{{< example >}} +<div class="form-floating"> + <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea> + <label for="floatingTextarea2">Comments</label> +</div> +{{< /example >}} + +## Selects + +Other than `.form-control`, floating labels are only available on `.form-select`s. They work in the same way, but unlike `<input>`s, they'll always show the `<label>` in its floated state. **Selects with `size` and `multiple` are not supported.** + +{{< example >}} +<div class="form-floating"> + <select class="form-select" id="floatingSelect" aria-label="Floating label select example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + <label for="floatingSelect">Works with selects</label> +</div> +{{< /example >}} + +## Layout + +When working with the Bootstrap grid system, be sure to place form elements within column classes. + +{{< example >}} +<div class="row g-2"> + <div class="col-md"> + <div class="form-floating"> + <input type="email" class="form-control" id="floatingInputGrid" placeholder="name@example.com" value="mdo@example.com"> + <label for="floatingInputGrid">Email address</label> + </div> + </div> + <div class="col-md"> + <div class="form-floating"> + <select class="form-select" id="floatingSelectGrid" aria-label="Floating label select example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + <label for="floatingSelectGrid">Works with selects</label> + </div> + </div> +</div> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="form-floating-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/form-control.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/form-control.md new file mode 100644 index 000000000..9c1c495b1 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/form-control.md @@ -0,0 +1,150 @@ +--- +layout: docs +title: Form controls +description: Give textual form controls like `<input>`s and `<textarea>`s an upgrade with custom styles, sizing, focus states, and more. +group: forms +toc: true +--- + +## Example + +{{< example >}} +<div class="mb-3"> + <label for="exampleFormControlInput1" class="form-label">Email address</label> + <input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name@example.com"> +</div> +<div class="mb-3"> + <label for="exampleFormControlTextarea1" class="form-label">Example textarea</label> + <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea> +</div> +{{< /example >}} + +## Sizing + +Set heights using classes like `.form-control-lg` and `.form-control-sm`. + +{{< example >}} +<input class="form-control form-control-lg" type="text" placeholder=".form-control-lg" aria-label=".form-control-lg example"> +<input class="form-control" type="text" placeholder="Default input" aria-label="default input example"> +<input class="form-control form-control-sm" type="text" placeholder=".form-control-sm" aria-label=".form-control-sm example"> +{{< /example >}} + +## Disabled + +Add the `disabled` boolean attribute on an input to give it a grayed out appearance and remove pointer events. + +{{< example >}} +<input class="form-control" type="text" placeholder="Disabled input" aria-label="Disabled input example" disabled> +<input class="form-control" type="text" value="Disabled readonly input" aria-label="Disabled input example" disabled readonly> +{{< /example >}} + +## Readonly + +Add the `readonly` boolean attribute on an input to prevent modification of the input's value. + +{{< example >}} +<input class="form-control" type="text" value="Readonly input here..." aria-label="readonly input example" readonly> +{{< /example >}} + +## Readonly plain text + +If you want to have `<input readonly>` elements in your form styled as plain text, use the `.form-control-plaintext` class to remove the default form field styling and preserve the correct margin and padding. + +{{< example >}} + <div class="mb-3 row"> + <label for="staticEmail" class="col-sm-2 col-form-label">Email</label> + <div class="col-sm-10"> + <input type="text" readonly class="form-control-plaintext" id="staticEmail" value="email@example.com"> + </div> + </div> + <div class="mb-3 row"> + <label for="inputPassword" class="col-sm-2 col-form-label">Password</label> + <div class="col-sm-10"> + <input type="password" class="form-control" id="inputPassword"> + </div> + </div> +{{< /example >}} + +{{< example >}} +<form class="row g-3"> + <div class="col-auto"> + <label for="staticEmail2" class="visually-hidden">Email</label> + <input type="text" readonly class="form-control-plaintext" id="staticEmail2" value="email@example.com"> + </div> + <div class="col-auto"> + <label for="inputPassword2" class="visually-hidden">Password</label> + <input type="password" class="form-control" id="inputPassword2" placeholder="Password"> + </div> + <div class="col-auto"> + <button type="submit" class="btn btn-primary mb-3">Confirm identity</button> + </div> +</form> +{{< /example >}} + +## File input + +{{< example >}} +<div class="mb-3"> + <label for="formFile" class="form-label">Default file input example</label> + <input class="form-control" type="file" id="formFile"> +</div> +<div class="mb-3"> + <label for="formFileMultiple" class="form-label">Multiple files input example</label> + <input class="form-control" type="file" id="formFileMultiple" multiple> +</div> +<div class="mb-3"> + <label for="formFileDisabled" class="form-label">Disabled file input example</label> + <input class="form-control" type="file" id="formFileDisabled" disabled> +</div> +<div class="mb-3"> + <label for="formFileSm" class="form-label">Small file input example</label> + <input class="form-control form-control-sm" id="formFileSm" type="file"> +</div> +<div> + <label for="formFileLg" class="form-label">Large file input example</label> + <input class="form-control form-control-lg" id="formFileLg" type="file"> +</div> +{{< /example >}} + +## Color + +{{< example >}} +<label for="exampleColorInput" class="form-label">Color picker</label> +<input type="color" class="form-control form-control-color" id="exampleColorInput" value="#563d7c" title="Choose your color"> +{{< /example >}} + +## Datalists + +Datalists allow you to create a group of `<option>`s that can be accessed (and autocompleted) from within an `<input>`. These are similar to `<select>` elements, but come with more menu styling limitations and differences. While most browsers and operating systems include some support for `<datalist>` elements, their styling is inconsistent at best. + +Learn more about [support for datalist elements](https://caniuse.com/datalist). + +{{< example >}} +<label for="exampleDataList" class="form-label">Datalist example</label> +<input class="form-control" list="datalistOptions" id="exampleDataList" placeholder="Type to search..."> +<datalist id="datalistOptions"> + <option value="San Francisco"> + <option value="New York"> + <option value="Seattle"> + <option value="Los Angeles"> + <option value="Chicago"> +</datalist> +{{< /example >}} + +## Sass + +### Variables + +`$input-*` are shared across most of our form controls (and not buttons). + +{{< scss-docs name="form-input-variables" file="scss/_variables.scss" >}} + +`$form-label-*` and `$form-text-*` are for our `<label>`s and `.form-text` component. + +{{< scss-docs name="form-label-variables" file="scss/_variables.scss" >}} + +{{< scss-docs name="form-text-variables" file="scss/_variables.scss" >}} + +`$form-file-*` are for file input. + +{{< scss-docs name="form-file-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/input-group.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/input-group.md new file mode 100644 index 000000000..00e9eeec9 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/input-group.md @@ -0,0 +1,316 @@ +--- +layout: docs +title: Input group +description: Easily extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs. +group: forms +toc: true +--- + +## Basic example + +Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place `<label>`s outside the input group. + +{{< example >}} +<div class="input-group mb-3"> + <span class="input-group-text" id="basic-addon1">@</span> + <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1"> +</div> + +<div class="input-group mb-3"> + <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="basic-addon2"> + <span class="input-group-text" id="basic-addon2">@example.com</span> +</div> + +<label for="basic-url" class="form-label">Your vanity URL</label> +<div class="input-group mb-3"> + <span class="input-group-text" id="basic-addon3">https://example.com/users/</span> + <input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3"> +</div> + +<div class="input-group mb-3"> + <span class="input-group-text">$</span> + <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)"> + <span class="input-group-text">.00</span> +</div> + +<div class="input-group mb-3"> + <input type="text" class="form-control" placeholder="Username" aria-label="Username"> + <span class="input-group-text">@</span> + <input type="text" class="form-control" placeholder="Server" aria-label="Server"> +</div> + +<div class="input-group"> + <span class="input-group-text">With textarea</span> + <textarea class="form-control" aria-label="With textarea"></textarea> +</div> +{{< /example >}} + +## Wrapping + +Input groups wrap by default via `flex-wrap: wrap` in order to accommodate custom form field validation within an input group. You may disable this with `.flex-nowrap`. + +{{< example >}} +<div class="input-group flex-nowrap"> + <span class="input-group-text" id="addon-wrapping">@</span> + <input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="addon-wrapping"> +</div> +{{< /example >}} + +## Sizing + +Add the relative form sizing classes to the `.input-group` itself and contents within will automatically resize—no need for repeating the form control size classes on each element. + +**Sizing on the individual input group elements isn't supported.** + +{{< example >}} +<div class="input-group input-group-sm mb-3"> + <span class="input-group-text" id="inputGroup-sizing-sm">Small</span> + <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm"> +</div> + +<div class="input-group mb-3"> + <span class="input-group-text" id="inputGroup-sizing-default">Default</span> + <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default"> +</div> + +<div class="input-group input-group-lg"> + <span class="input-group-text" id="inputGroup-sizing-lg">Large</span> + <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-lg"> +</div> +{{< /example >}} + +## Checkboxes and radios + +Place any checkbox or radio option within an input group's addon instead of text. We recommend adding `.mt-0` to the `.form-check-input` when there's no visible text next to the input. + +{{< example >}} +<div class="input-group mb-3"> + <div class="input-group-text"> + <input class="form-check-input mt-0" type="checkbox" value="" aria-label="Checkbox for following text input"> + </div> + <input type="text" class="form-control" aria-label="Text input with checkbox"> +</div> + +<div class="input-group"> + <div class="input-group-text"> + <input class="form-check-input mt-0" type="radio" value="" aria-label="Radio button for following text input"> + </div> + <input type="text" class="form-control" aria-label="Text input with radio button"> +</div> +{{< /example >}} + +## Multiple inputs + +While multiple `<input>`s are supported visually, validation styles are only available for input groups with a single `<input>`. + +{{< example >}} +<div class="input-group"> + <span class="input-group-text">First and last name</span> + <input type="text" aria-label="First name" class="form-control"> + <input type="text" aria-label="Last name" class="form-control"> +</div> +{{< /example >}} + +## Multiple addons + +Multiple add-ons are supported and can be mixed with checkbox and radio input versions. + +{{< example >}} +<div class="input-group mb-3"> + <span class="input-group-text">$</span> + <span class="input-group-text">0.00</span> + <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)"> +</div> + +<div class="input-group"> + <input type="text" class="form-control" aria-label="Dollar amount (with dot and two decimal places)"> + <span class="input-group-text">$</span> + <span class="input-group-text">0.00</span> +</div> +{{< /example >}} + +## Button addons + +{{< example >}} +<div class="input-group mb-3"> + <button class="btn btn-outline-secondary" type="button" id="button-addon1">Button</button> + <input type="text" class="form-control" placeholder="" aria-label="Example text with button addon" aria-describedby="button-addon1"> +</div> + +<div class="input-group mb-3"> + <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username" aria-describedby="button-addon2"> + <button class="btn btn-outline-secondary" type="button" id="button-addon2">Button</button> +</div> + +<div class="input-group mb-3"> + <button class="btn btn-outline-secondary" type="button">Button</button> + <button class="btn btn-outline-secondary" type="button">Button</button> + <input type="text" class="form-control" placeholder="" aria-label="Example text with two button addons"> +</div> + +<div class="input-group"> + <input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username with two button addons"> + <button class="btn btn-outline-secondary" type="button">Button</button> + <button class="btn btn-outline-secondary" type="button">Button</button> +</div> +{{< /example >}} + +## Buttons with dropdowns + +{{< example >}} +<div class="input-group mb-3"> + <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + <input type="text" class="form-control" aria-label="Text input with dropdown button"> +</div> + +<div class="input-group mb-3"> + <input type="text" class="form-control" aria-label="Text input with dropdown button"> + <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</button> + <ul class="dropdown-menu dropdown-menu-end"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> +</div> + +<div class="input-group"> + <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action before</a></li> + <li><a class="dropdown-item" href="#">Another action before</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + <input type="text" class="form-control" aria-label="Text input with 2 dropdown buttons"> + <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</button> + <ul class="dropdown-menu dropdown-menu-end"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> +</div> +{{< /example >}} + +## Segmented buttons + +{{< example >}} +<div class="input-group mb-3"> + <button type="button" class="btn btn-outline-secondary">Action</button> + <button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> + <input type="text" class="form-control" aria-label="Text input with segmented dropdown button"> +</div> + +<div class="input-group"> + <input type="text" class="form-control" aria-label="Text input with segmented dropdown button"> + <button type="button" class="btn btn-outline-secondary">Action</button> + <button type="button" class="btn btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> + <span class="visually-hidden">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu dropdown-menu-end"> + <li><a class="dropdown-item" href="#">Action</a></li> + <li><a class="dropdown-item" href="#">Another action</a></li> + <li><a class="dropdown-item" href="#">Something else here</a></li> + <li><hr class="dropdown-divider"></li> + <li><a class="dropdown-item" href="#">Separated link</a></li> + </ul> +</div> +{{< /example >}} + +## Custom forms + +Input groups include support for custom selects and custom file inputs. Browser default versions of these are not supported. + +### Custom select + +{{< example >}} +<div class="input-group mb-3"> + <label class="input-group-text" for="inputGroupSelect01">Options</label> + <select class="form-select" id="inputGroupSelect01"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> +</div> + +<div class="input-group mb-3"> + <select class="form-select" id="inputGroupSelect02"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + <label class="input-group-text" for="inputGroupSelect02">Options</label> +</div> + +<div class="input-group mb-3"> + <button class="btn btn-outline-secondary" type="button">Button</button> + <select class="form-select" id="inputGroupSelect03" aria-label="Example select with button addon"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> +</div> + +<div class="input-group"> + <select class="form-select" id="inputGroupSelect04" aria-label="Example select with button addon"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + <button class="btn btn-outline-secondary" type="button">Button</button> +</div> +{{< /example >}} + +### Custom file input + +{{< example >}} +<div class="input-group mb-3"> + <label class="input-group-text" for="inputGroupFile01">Upload</label> + <input type="file" class="form-control" id="inputGroupFile01"> +</div> + +<div class="input-group mb-3"> + <input type="file" class="form-control" id="inputGroupFile02"> + <label class="input-group-text" for="inputGroupFile02">Upload</label> +</div> + +<div class="input-group mb-3"> + <button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon03">Button</button> + <input type="file" class="form-control" id="inputGroupFile03" aria-describedby="inputGroupFileAddon03" aria-label="Upload"> +</div> + +<div class="input-group"> + <input type="file" class="form-control" id="inputGroupFile04" aria-describedby="inputGroupFileAddon04" aria-label="Upload"> + <button class="btn btn-outline-secondary" type="button" id="inputGroupFileAddon04">Button</button> +</div> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="input-group-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/layout.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/layout.md new file mode 100644 index 000000000..47e2f8ab7 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/layout.md @@ -0,0 +1,330 @@ +--- +layout: docs +title: Layout +description: Give your forms some structure—from inline to horizontal to custom grid implementations—with our form layout options. +group: forms +toc: true +--- + +## Forms + +Every group of form fields should reside in a `<form>` element. Bootstrap provides no default styling for the `<form>` element, but there are some powerful browser features that are provided by default. + +- New to browser forms? Consider reviewing [the MDN form docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) for an overview and complete list of available attributes. +- `<button>`s within a `<form>` default to `type="submit"`, so strive to be specific and always include a `type`. +- You can disable every form element within a form with the `disabled` attribute on the `<form>`. + +Since Bootstrap applies `display: block` and `width: 100%` to almost all our form controls, forms will by default stack vertically. Additional classes can be used to vary this layout on a per-form basis. + +## Utilities + +[Margin utilities]({{< docsref "/utilities/spacing" >}}) are the easiest way to add some structure to forms. They provide basic grouping of labels, controls, optional form text, and form validation messaging. We recommend sticking to `margin-bottom` utilities, and using a single direction throughout the form for consistency. + +Feel free to build your forms however you like, with `<fieldset>`s, `<div>`s, or nearly any other element. + +{{< example >}} +<div class="mb-3"> + <label for="formGroupExampleInput" class="form-label">Example label</label> + <input type="text" class="form-control" id="formGroupExampleInput" placeholder="Example input placeholder"> +</div> +<div class="mb-3"> + <label for="formGroupExampleInput2" class="form-label">Another label</label> + <input type="text" class="form-control" id="formGroupExampleInput2" placeholder="Another input placeholder"> +</div> +{{< /example >}} + +## Form grid + +More complex forms can be built using our grid classes. Use these for form layouts that require multiple columns, varied widths, and additional alignment options. **Requires the `$enable-grid-classes` Sass variable to be enabled** (on by default). + +{{< example >}} +<div class="row"> + <div class="col"> + <input type="text" class="form-control" placeholder="First name" aria-label="First name"> + </div> + <div class="col"> + <input type="text" class="form-control" placeholder="Last name" aria-label="Last name"> + </div> +</div> +{{< /example >}} + +## Gutters + +By adding [gutter modifier classes]({{< docsref "/layout/gutters" >}}), you can have control over the gutter width in as well the inline as block direction. **Also requires the `$enable-grid-classes` Sass variable to be enabled** (on by default). + +{{< example >}} +<div class="row g-3"> + <div class="col"> + <input type="text" class="form-control" placeholder="First name" aria-label="First name"> + </div> + <div class="col"> + <input type="text" class="form-control" placeholder="Last name" aria-label="Last name"> + </div> +</div> +{{< /example >}} + +More complex layouts can also be created with the grid system. + +{{< example >}} +<form class="row g-3"> + <div class="col-md-6"> + <label for="inputEmail4" class="form-label">Email</label> + <input type="email" class="form-control" id="inputEmail4"> + </div> + <div class="col-md-6"> + <label for="inputPassword4" class="form-label">Password</label> + <input type="password" class="form-control" id="inputPassword4"> + </div> + <div class="col-12"> + <label for="inputAddress" class="form-label">Address</label> + <input type="text" class="form-control" id="inputAddress" placeholder="1234 Main St"> + </div> + <div class="col-12"> + <label for="inputAddress2" class="form-label">Address 2</label> + <input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor"> + </div> + <div class="col-md-6"> + <label for="inputCity" class="form-label">City</label> + <input type="text" class="form-control" id="inputCity"> + </div> + <div class="col-md-4"> + <label for="inputState" class="form-label">State</label> + <select id="inputState" class="form-select"> + <option selected>Choose...</option> + <option>...</option> + </select> + </div> + <div class="col-md-2"> + <label for="inputZip" class="form-label">Zip</label> + <input type="text" class="form-control" id="inputZip"> + </div> + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="gridCheck"> + <label class="form-check-label" for="gridCheck"> + Check me out + </label> + </div> + </div> + <div class="col-12"> + <button type="submit" class="btn btn-primary">Sign in</button> + </div> +</form> +{{< /example >}} + +## Horizontal form + +Create horizontal forms with the grid by adding the `.row` class to form groups and using the `.col-*-*` classes to specify the width of your labels and controls. Be sure to add `.col-form-label` to your `<label>`s as well so they're vertically centered with their associated form controls. + +At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we've removed the `padding-top` on our stacked radio inputs label to better align the text baseline. + +{{< example >}} +<form> + <div class="row mb-3"> + <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label> + <div class="col-sm-10"> + <input type="email" class="form-control" id="inputEmail3"> + </div> + </div> + <div class="row mb-3"> + <label for="inputPassword3" class="col-sm-2 col-form-label">Password</label> + <div class="col-sm-10"> + <input type="password" class="form-control" id="inputPassword3"> + </div> + </div> + <fieldset class="row mb-3"> + <legend class="col-form-label col-sm-2 pt-0">Radios</legend> + <div class="col-sm-10"> + <div class="form-check"> + <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked> + <label class="form-check-label" for="gridRadios1"> + First radio + </label> + </div> + <div class="form-check"> + <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2"> + <label class="form-check-label" for="gridRadios2"> + Second radio + </label> + </div> + <div class="form-check disabled"> + <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios3" value="option3" disabled> + <label class="form-check-label" for="gridRadios3"> + Third disabled radio + </label> + </div> + </div> + </fieldset> + <div class="row mb-3"> + <div class="col-sm-10 offset-sm-2"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="gridCheck1"> + <label class="form-check-label" for="gridCheck1"> + Example checkbox + </label> + </div> + </div> + </div> + <button type="submit" class="btn btn-primary">Sign in</button> +</form> +{{< /example >}} + +### Horizontal form label sizing + +Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s or `<legend>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`. + +{{< example >}} +<div class="row mb-3"> + <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Email</label> + <div class="col-sm-10"> + <input type="email" class="form-control form-control-sm" id="colFormLabelSm" placeholder="col-form-label-sm"> + </div> +</div> +<div class="row mb-3"> + <label for="colFormLabel" class="col-sm-2 col-form-label">Email</label> + <div class="col-sm-10"> + <input type="email" class="form-control" id="colFormLabel" placeholder="col-form-label"> + </div> +</div> +<div class="row"> + <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Email</label> + <div class="col-sm-10"> + <input type="email" class="form-control form-control-lg" id="colFormLabelLg" placeholder="col-form-label-lg"> + </div> +</div> +{{< /example >}} + +## Column sizing + +As shown in the previous examples, our grid system allows you to place any number of `.col`s within a `.row`. They'll split the available width equally between them. You may also pick a subset of your columns to take up more or less space, while the remaining `.col`s equally split the rest, with specific column classes like `.col-sm-7`. + +{{< example >}} +<div class="row g-3"> + <div class="col-sm-7"> + <input type="text" class="form-control" placeholder="City" aria-label="City"> + </div> + <div class="col-sm"> + <input type="text" class="form-control" placeholder="State" aria-label="State"> + </div> + <div class="col-sm"> + <input type="text" class="form-control" placeholder="Zip" aria-label="Zip"> + </div> +</div> +{{< /example >}} + +## Auto-sizing + +The example below uses a flexbox utility to vertically center the contents and changes `.col` to `.col-auto` so that your columns only take up as much space as needed. Put another way, the column sizes itself based on the contents. + +{{< example >}} +<form class="row gy-2 gx-3 align-items-center"> + <div class="col-auto"> + <label class="visually-hidden" for="autoSizingInput">Name</label> + <input type="text" class="form-control" id="autoSizingInput" placeholder="Jane Doe"> + </div> + <div class="col-auto"> + <label class="visually-hidden" for="autoSizingInputGroup">Username</label> + <div class="input-group"> + <div class="input-group-text">@</div> + <input type="text" class="form-control" id="autoSizingInputGroup" placeholder="Username"> + </div> + </div> + <div class="col-auto"> + <label class="visually-hidden" for="autoSizingSelect">Preference</label> + <select class="form-select" id="autoSizingSelect"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + </div> + <div class="col-auto"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="autoSizingCheck"> + <label class="form-check-label" for="autoSizingCheck"> + Remember me + </label> + </div> + </div> + <div class="col-auto"> + <button type="submit" class="btn btn-primary">Submit</button> + </div> +</form> +{{< /example >}} + +You can then remix that once again with size-specific column classes. + +{{< example >}} +<form class="row gx-3 gy-2 align-items-center"> + <div class="col-sm-3"> + <label class="visually-hidden" for="specificSizeInputName">Name</label> + <input type="text" class="form-control" id="specificSizeInputName" placeholder="Jane Doe"> + </div> + <div class="col-sm-3"> + <label class="visually-hidden" for="specificSizeInputGroupUsername">Username</label> + <div class="input-group"> + <div class="input-group-text">@</div> + <input type="text" class="form-control" id="specificSizeInputGroupUsername" placeholder="Username"> + </div> + </div> + <div class="col-sm-3"> + <label class="visually-hidden" for="specificSizeSelect">Preference</label> + <select class="form-select" id="specificSizeSelect"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + </div> + <div class="col-auto"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="autoSizingCheck2"> + <label class="form-check-label" for="autoSizingCheck2"> + Remember me + </label> + </div> + </div> + <div class="col-auto"> + <button type="submit" class="btn btn-primary">Submit</button> + </div> +</form> +{{< /example >}} + +## Inline forms + +Use the `.row-cols-*` classes to create responsive horizontal layouts. By adding [gutter modifier classes]({{< docsref "/layout/gutters" >}}), we'll have gutters in horizontal and vertical directions. On narrow mobile viewports, the `.col-12` helps stack the form controls and more. The `.align-items-center` aligns the form elements to the middle, making the `.form-checkbox` align properly. + +{{< example >}} +<form class="row row-cols-lg-auto g-3 align-items-center"> + <div class="col-12"> + <label class="visually-hidden" for="inlineFormInputGroupUsername">Username</label> + <div class="input-group"> + <div class="input-group-text">@</div> + <input type="text" class="form-control" id="inlineFormInputGroupUsername" placeholder="Username"> + </div> + </div> + + <div class="col-12"> + <label class="visually-hidden" for="inlineFormSelectPref">Preference</label> + <select class="form-select" id="inlineFormSelectPref"> + <option selected>Choose...</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + </div> + + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="inlineFormCheck"> + <label class="form-check-label" for="inlineFormCheck"> + Remember me + </label> + </div> + </div> + + <div class="col-12"> + <button type="submit" class="btn btn-primary">Submit</button> + </div> +</form> +{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/overview.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/overview.md new file mode 100644 index 000000000..40e9b6b4f --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/overview.md @@ -0,0 +1,154 @@ +--- +layout: docs +title: Forms +description: Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms. +group: forms +toc: true +aliases: "/docs/5.0/forms/" +sections: + - title: Form control + description: Style textual inputs and textareas with support for multiple states. + - title: Select + description: Improve browser default select elements with a custom initial appearance. + - title: Checks & radios + description: Use our custom radio buttons and checkboxes in forms for selecting input options. + - title: Range + description: Replace browser default range inputs with our custom version. + - title: Input group + description: Attach labels and buttons to your inputs for increased semantic value. + - title: Floating labels + description: Create beautifully simple form labels that float over your input fields. + - title: Layout + description: Create inline, horizontal, or complex grid-based layouts with your forms. + - title: Validation + description: Validate your forms with custom or native validation behaviors and styles. +--- + +## Overview + +Bootstrap's form controls expand on [our Rebooted form styles]({{< docsref "/content/reboot#forms" >}}) with classes. Use these classes to opt into their customized displays for a more consistent rendering across browsers and devices. + +Be sure to use an appropriate `type` attribute on all inputs (e.g., `email` for email address or `number` for numerical information) to take advantage of newer input controls like email verification, number selection, and more. + +Here's a quick example to demonstrate Bootstrap's form styles. Keep reading for documentation on required classes, form layout, and more. + +{{< example >}} +<form> + <div class="mb-3"> + <label for="exampleInputEmail1" class="form-label">Email address</label> + <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp"> + <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div> + </div> + <div class="mb-3"> + <label for="exampleInputPassword1" class="form-label">Password</label> + <input type="password" class="form-control" id="exampleInputPassword1"> + </div> + <div class="mb-3 form-check"> + <input type="checkbox" class="form-check-input" id="exampleCheck1"> + <label class="form-check-label" for="exampleCheck1">Check me out</label> + </div> + <button type="submit" class="btn btn-primary">Submit</button> +</form> +{{< /example >}} + +## Form text + +Block-level or inline-level form text can be created using `.form-text`. + +{{< callout warning >}} +##### Associating form text with form controls + +Form text should be explicitly associated with the form control it relates to using the `aria-describedby` attribute. This will ensure that assistive technologies—such as screen readers—will announce this form text when the user focuses or enters the control. +{{< /callout >}} + +Form text below inputs can be styled with `.form-text`. If a block-level element will be used, a top margin is added for easy spacing from the inputs above. + +{{< example >}} +<label for="inputPassword5" class="form-label">Password</label> +<input type="password" id="inputPassword5" class="form-control" aria-describedby="passwordHelpBlock"> +<div id="passwordHelpBlock" class="form-text"> + Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji. +</div> +{{< /example >}} + +Inline text can use any typical inline HTML element (be it a `<span>`, `<small>`, or something else) with nothing more than the `.form-text` class. + +{{< example >}} +<div class="row g-3 align-items-center"> + <div class="col-auto"> + <label for="inputPassword6" class="col-form-label">Password</label> + </div> + <div class="col-auto"> + <input type="password" id="inputPassword6" class="form-control" aria-describedby="passwordHelpInline"> + </div> + <div class="col-auto"> + <span id="passwordHelpInline" class="form-text"> + Must be 8-20 characters long. + </span> + </div> +</div> +{{< /example >}} + +## Disabled forms + +Add the `disabled` boolean attribute on an input to prevent user interactions and make it appear lighter. + +```html +<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled> +``` + +Add the `disabled` attribute to a `<fieldset>` to disable all the controls within. Browsers treat all native form controls (`<input>`, `<select>`, and `<button>` elements) inside a `<fieldset disabled>` as disabled, preventing both keyboard and mouse interactions on them. + +However, if your form also includes custom button-like elements such as `<a class="btn btn-*">...</a>`, these will only be given a style of `pointer-events: none`, meaning they are still focusable and operable using the keyboard. In this case, you must manually modify these controls by adding `tabindex="-1"` to prevent them from receiving focus and `aria-disabled="disabled"` to signal their state to assistive technologies. + +{{< example >}} +<form> + <fieldset disabled> + <legend>Disabled fieldset example</legend> + <div class="mb-3"> + <label for="disabledTextInput" class="form-label">Disabled input</label> + <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input"> + </div> + <div class="mb-3"> + <label for="disabledSelect" class="form-label">Disabled select menu</label> + <select id="disabledSelect" class="form-select"> + <option>Disabled select</option> + </select> + </div> + <div class="mb-3"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" id="disabledFieldsetCheck" disabled> + <label class="form-check-label" for="disabledFieldsetCheck"> + Can't check this + </label> + </div> + </div> + <button type="submit" class="btn btn-primary">Submit</button> + </fieldset> +</form> +{{< /example >}} + +## Accessibility + +Ensure that all form controls have an appropriate accessible name so that their purpose can be conveyed to users of assistive technologies. The simplest way to achieve this is to use a `<label>` element, or—in the case of buttons—to include sufficiently descriptive text as part of the `<button>...</button>` content. + +For situations where it's not possible to include a visible `<label>` or appropriate text content, there are alternative ways of still providing an accessible name, such as: + +- `<label>` elements hidden using the `.visually-hidden` class +- Pointing to an existing element that can act as a label using `aria-labelledby` +- Providing a `title` attribute +- Explicitly setting the accessible name on an element using `aria-label` + +If none of these are present, assistive technologies may resort to using the `placeholder` attribute as a fallback for the accessible name on `<input>` and `<textarea>` elements. The examples in this section provide a few suggested, case-specific approaches. + +While using visually hidden content (`.visually-hidden`, `aria-label`, and even `placeholder` content, which disappears once a form field has content) will benefit assistive technology users, a lack of visible label text may still be problematic for certain users. Some form of visible label is generally the best approach, both for accessibility and usability. + +## Sass + +Many form variables are set at a general level to be re-used and extended by individual form components. You'll see these most often as `$btn-input-*` and `$input-*` variables. + +### Variables + +`$btn-input-*` variables are shared global variables between our [buttons]({{< docsref "/components/buttons" >}}) and our form components. You'll find these frequently reassigned as values to other component-specific variables. + +{{< scss-docs name="input-btn-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/range.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/range.md new file mode 100644 index 000000000..d7ac6965c --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/range.md @@ -0,0 +1,49 @@ +--- +layout: docs +title: Range +description: Use our custom range inputs for consistent cross-browser styling and built-in customization. +group: forms +toc: true +--- + +## Overview + +Create custom `<input type="range">` controls with `.form-range`. The track (the background) and thumb (the value) are both styled to appear the same across browsers. As only Firefox supports "filling" their track from the left or right of the thumb as a means to visually indicate progress, we do not currently support it. + +{{< example >}} +<label for="customRange1" class="form-label">Example range</label> +<input type="range" class="form-range" id="customRange1"> +{{< /example >}} + +## Disabled + +Add the `disabled` boolean attribute on an input to give it a grayed out appearance and remove pointer events. + +{{< example >}} +<label for="disabledRange" class="form-label">Disabled range</label> +<input type="range" class="form-range" id="disabledRange" disabled> +{{< /example >}} + +## Min and max + +Range inputs have implicit values for `min` and `max`—`0` and `100`, respectively. You may specify new values for those using the `min` and `max` attributes. + +{{< example >}} +<label for="customRange2" class="form-label">Example range</label> +<input type="range" class="form-range" min="0" max="5" id="customRange2"> +{{< /example >}} + +## Steps + +By default, range inputs "snap" to integer values. To change this, you can specify a `step` value. In the example below, we double the number of steps by using `step="0.5"`. + +{{< example >}} +<label for="customRange3" class="form-label">Example range</label> +<input type="range" class="form-range" min="0" max="5" step="0.5" id="customRange3"> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="form-range-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/select.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/select.md new file mode 100644 index 000000000..7f0c255ef --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/select.md @@ -0,0 +1,81 @@ +--- +layout: docs +title: Select +description: Customize the native `<select>`s with custom CSS that changes the element's initial appearance. +group: forms +toc: true +--- + +## Default + +Custom `<select>` menus need only a custom class, `.form-select` to trigger the custom styles. Custom styles are limited to the `<select>`'s initial appearance and cannot modify the `<option>`s due to browser limitations. + +{{< example >}} +<select class="form-select" aria-label="Default select example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> +</select> +{{< /example >}} + +## Sizing + +You may also choose from small and large custom selects to match our similarly sized text inputs. + +{{< example >}} +<select class="form-select form-select-lg mb-3" aria-label=".form-select-lg example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> +</select> + +<select class="form-select form-select-sm" aria-label=".form-select-sm example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> +</select> +{{< /example >}} + +The `multiple` attribute is also supported: + +{{< example >}} +<select class="form-select" multiple aria-label="multiple select example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> +</select> +{{< /example >}} + +As is the `size` attribute: + +{{< example >}} +<select class="form-select" size="3" aria-label="size 3 select example"> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> +</select> +{{< /example >}} + +## Disabled + +Add the `disabled` boolean attribute on a select to give it a grayed out appearance and remove pointer events. + +{{< example >}} +<select class="form-select" aria-label="Disabled select example" disabled> + <option selected>Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> +</select> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="form-select-variables" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/forms/validation.md b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/validation.md new file mode 100644 index 000000000..128f6b408 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/forms/validation.md @@ -0,0 +1,382 @@ +--- +layout: docs +title: Validation +description: Provide valuable, actionable feedback to your users with HTML5 form validation, via browser default behaviors or custom styles and JavaScript. +group: forms +toc: true +extra_js: + - src: "/docs/5.0/assets/js/validate-forms.js" + async: true +--- + +{{< callout warning >}} +We are aware that currently the client-side custom validation styles and tooltips are not accessible, since they are not exposed to assistive technologies. While we work on a solution, we'd recommend either using the server-side option or the default browser validation method. +{{< /callout >}} + +## How it works + +Here's how form validation works with Bootstrap: + +- HTML form validation is applied via CSS's two pseudo-classes, `:invalid` and `:valid`. It applies to `<input>`, `<select>`, and `<textarea>` elements. +- Bootstrap scopes the `:invalid` and `:valid` styles to parent `.was-validated` class, usually applied to the `<form>`. Otherwise, any required field without a value shows up as invalid on page load. This way, you may choose when to activate them (typically after form submission is attempted). +- To reset the appearance of the form (for instance, in the case of dynamic form submissions using AJAX), remove the `.was-validated` class from the `<form>` again after submission. +- As a fallback, `.is-invalid` and `.is-valid` classes may be used instead of the pseudo-classes for [server-side validation](#server-side). They do not require a `.was-validated` parent class. +- Due to constraints in how CSS works, we cannot (at present) apply styles to a `<label>` that comes before a form control in the DOM without the help of custom JavaScript. +- All modern browsers support the [constraint validation API](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-constraint-validation-api), a series of JavaScript methods for validating form controls. +- Feedback messages may utilize the [browser defaults](#browser-defaults) (different for each browser, and unstylable via CSS) or our custom feedback styles with additional HTML and CSS. +- You may provide custom validity messages with `setCustomValidity` in JavaScript. + +With that in mind, consider the following demos for our custom form validation styles, optional server-side classes, and browser defaults. + +## Custom styles + +For custom Bootstrap form validation messages, you'll need to add the `novalidate` boolean attribute to your `<form>`. This disables the browser default feedback tooltips, but still provides access to the form validation APIs in JavaScript. Try to submit the form below; our JavaScript will intercept the submit button and relay feedback to you. When attempting to submit, you'll see the `:invalid` and `:valid` styles applied to your form controls. + +Custom feedback styles apply custom colors, borders, focus styles, and background icons to better communicate feedback. Background icons for `<select>`s are only available with `.form-select`, and not `.form-control`. + +{{< example >}} +<form class="row g-3 needs-validation" novalidate> + <div class="col-md-4"> + <label for="validationCustom01" class="form-label">First name</label> + <input type="text" class="form-control" id="validationCustom01" value="Mark" required> + <div class="valid-feedback"> + Looks good! + </div> + </div> + <div class="col-md-4"> + <label for="validationCustom02" class="form-label">Last name</label> + <input type="text" class="form-control" id="validationCustom02" value="Otto" required> + <div class="valid-feedback"> + Looks good! + </div> + </div> + <div class="col-md-4"> + <label for="validationCustomUsername" class="form-label">Username</label> + <div class="input-group has-validation"> + <span class="input-group-text" id="inputGroupPrepend">@</span> + <input type="text" class="form-control" id="validationCustomUsername" aria-describedby="inputGroupPrepend" required> + <div class="invalid-feedback"> + Please choose a username. + </div> + </div> + </div> + <div class="col-md-6"> + <label for="validationCustom03" class="form-label">City</label> + <input type="text" class="form-control" id="validationCustom03" required> + <div class="invalid-feedback"> + Please provide a valid city. + </div> + </div> + <div class="col-md-3"> + <label for="validationCustom04" class="form-label">State</label> + <select class="form-select" id="validationCustom04" required> + <option selected disabled value="">Choose...</option> + <option>...</option> + </select> + <div class="invalid-feedback"> + Please select a valid state. + </div> + </div> + <div class="col-md-3"> + <label for="validationCustom05" class="form-label">Zip</label> + <input type="text" class="form-control" id="validationCustom05" required> + <div class="invalid-feedback"> + Please provide a valid zip. + </div> + </div> + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="invalidCheck" required> + <label class="form-check-label" for="invalidCheck"> + Agree to terms and conditions + </label> + <div class="invalid-feedback"> + You must agree before submitting. + </div> + </div> + </div> + <div class="col-12"> + <button class="btn btn-primary" type="submit">Submit form</button> + </div> +</form> +{{< /example >}} + +{{< example lang="js" show_preview="false" >}} +{{< js.inline >}} +{{- readFile (printf "site/static/docs/%s/assets/js/validate-forms.js" .Site.Params.docs_version) -}} +{{< /js.inline >}} +{{< /example >}} + +## Browser defaults + +Not interested in custom validation feedback messages or writing JavaScript to change form behaviors? All good, you can use the browser defaults. Try submitting the form below. Depending on your browser and OS, you'll see a slightly different style of feedback. + +While these feedback styles cannot be styled with CSS, you can still customize the feedback text through JavaScript. + +{{< example >}} +<form class="row g-3"> + <div class="col-md-4"> + <label for="validationDefault01" class="form-label">First name</label> + <input type="text" class="form-control" id="validationDefault01" value="Mark" required> + </div> + <div class="col-md-4"> + <label for="validationDefault02" class="form-label">Last name</label> + <input type="text" class="form-control" id="validationDefault02" value="Otto" required> + </div> + <div class="col-md-4"> + <label for="validationDefaultUsername" class="form-label">Username</label> + <div class="input-group"> + <span class="input-group-text" id="inputGroupPrepend2">@</span> + <input type="text" class="form-control" id="validationDefaultUsername" aria-describedby="inputGroupPrepend2" required> + </div> + </div> + <div class="col-md-6"> + <label for="validationDefault03" class="form-label">City</label> + <input type="text" class="form-control" id="validationDefault03" required> + </div> + <div class="col-md-3"> + <label for="validationDefault04" class="form-label">State</label> + <select class="form-select" id="validationDefault04" required> + <option selected disabled value="">Choose...</option> + <option>...</option> + </select> + </div> + <div class="col-md-3"> + <label for="validationDefault05" class="form-label">Zip</label> + <input type="text" class="form-control" id="validationDefault05" required> + </div> + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" value="" id="invalidCheck2" required> + <label class="form-check-label" for="invalidCheck2"> + Agree to terms and conditions + </label> + </div> + </div> + <div class="col-12"> + <button class="btn btn-primary" type="submit">Submit form</button> + </div> +</form> +{{< /example >}} + +## Server side + +We recommend using client-side validation, but in case you require server-side validation, you can indicate invalid and valid form fields with `.is-invalid` and `.is-valid`. Note that `.invalid-feedback` is also supported with these classes. + +For invalid fields, ensure that the invalid feedback/error message is associated with the relevant form field using `aria-describedby` (noting that this attribute allows more than one `id` to be referenced, in case the field already points to additional form text). + +To fix [issues with border radii](https://github.com/twbs/bootstrap/issues/25110), input groups require an additional `.has-validation` class. + +{{< example >}} +<form class="row g-3"> + <div class="col-md-4"> + <label for="validationServer01" class="form-label">First name</label> + <input type="text" class="form-control is-valid" id="validationServer01" value="Mark" required> + <div class="valid-feedback"> + Looks good! + </div> + </div> + <div class="col-md-4"> + <label for="validationServer02" class="form-label">Last name</label> + <input type="text" class="form-control is-valid" id="validationServer02" value="Otto" required> + <div class="valid-feedback"> + Looks good! + </div> + </div> + <div class="col-md-4"> + <label for="validationServerUsername" class="form-label">Username</label> + <div class="input-group has-validation"> + <span class="input-group-text" id="inputGroupPrepend3">@</span> + <input type="text" class="form-control is-invalid" id="validationServerUsername" aria-describedby="inputGroupPrepend3 validationServerUsernameFeedback" required> + <div id="validationServerUsernameFeedback" class="invalid-feedback"> + Please choose a username. + </div> + </div> + </div> + <div class="col-md-6"> + <label for="validationServer03" class="form-label">City</label> + <input type="text" class="form-control is-invalid" id="validationServer03" aria-describedby="validationServer03Feedback" required> + <div id="validationServer03Feedback" class="invalid-feedback"> + Please provide a valid city. + </div> + </div> + <div class="col-md-3"> + <label for="validationServer04" class="form-label">State</label> + <select class="form-select is-invalid" id="validationServer04" aria-describedby="validationServer04Feedback" required> + <option selected disabled value="">Choose...</option> + <option>...</option> + </select> + <div id="validationServer04Feedback" class="invalid-feedback"> + Please select a valid state. + </div> + </div> + <div class="col-md-3"> + <label for="validationServer05" class="form-label">Zip</label> + <input type="text" class="form-control is-invalid" id="validationServer05" aria-describedby="validationServer05Feedback" required> + <div id="validationServer05Feedback" class="invalid-feedback"> + Please provide a valid zip. + </div> + </div> + <div class="col-12"> + <div class="form-check"> + <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" aria-describedby="invalidCheck3Feedback" required> + <label class="form-check-label" for="invalidCheck3"> + Agree to terms and conditions + </label> + <div id="invalidCheck3Feedback" class="invalid-feedback"> + You must agree before submitting. + </div> + </div> + </div> + <div class="col-12"> + <button class="btn btn-primary" type="submit">Submit form</button> + </div> +</form> +{{< /example >}} + +## Supported elements + +Validation styles are available for the following form controls and components: + +- `<input>`s and `<textarea>`s with `.form-control` (including up to one `.form-control` in input groups) +- `<select>`s with `.form-select` +- `.form-check`s + +{{< example >}} +<form class="was-validated"> + <div class="mb-3"> + <label for="validationTextarea" class="form-label">Textarea</label> + <textarea class="form-control is-invalid" id="validationTextarea" placeholder="Required example textarea" required></textarea> + <div class="invalid-feedback"> + Please enter a message in the textarea. + </div> + </div> + + <div class="form-check mb-3"> + <input type="checkbox" class="form-check-input" id="validationFormCheck1" required> + <label class="form-check-label" for="validationFormCheck1">Check this checkbox</label> + <div class="invalid-feedback">Example invalid feedback text</div> + </div> + + <div class="form-check"> + <input type="radio" class="form-check-input" id="validationFormCheck2" name="radio-stacked" required> + <label class="form-check-label" for="validationFormCheck2">Toggle this radio</label> + </div> + <div class="form-check mb-3"> + <input type="radio" class="form-check-input" id="validationFormCheck3" name="radio-stacked" required> + <label class="form-check-label" for="validationFormCheck3">Or toggle this other radio</label> + <div class="invalid-feedback">More example invalid feedback text</div> + </div> + + <div class="mb-3"> + <select class="form-select" required aria-label="select example"> + <option value="">Open this select menu</option> + <option value="1">One</option> + <option value="2">Two</option> + <option value="3">Three</option> + </select> + <div class="invalid-feedback">Example invalid select feedback</div> + </div> + + <div class="mb-3"> + <input type="file" class="form-control" aria-label="file example" required> + <div class="invalid-feedback">Example invalid form file feedback</div> + </div> + + <div class="mb-3"> + <button class="btn btn-primary" type="submit" disabled>Submit form</button> + </div> +</form> +{{< /example >}} + +## Tooltips + +If your form layout allows it, you can swap the `.{valid|invalid}-feedback` classes for `.{valid|invalid}-tooltip` classes to display validation feedback in a styled tooltip. Be sure to have a parent with `position: relative` on it for tooltip positioning. In the example below, our column classes have this already, but your project may require an alternative setup. + +{{< example >}} +<form class="row g-3 needs-validation" novalidate> + <div class="col-md-4 position-relative"> + <label for="validationTooltip01" class="form-label">First name</label> + <input type="text" class="form-control" id="validationTooltip01" value="Mark" required> + <div class="valid-tooltip"> + Looks good! + </div> + </div> + <div class="col-md-4 position-relative"> + <label for="validationTooltip02" class="form-label">Last name</label> + <input type="text" class="form-control" id="validationTooltip02" value="Otto" required> + <div class="valid-tooltip"> + Looks good! + </div> + </div> + <div class="col-md-4 position-relative"> + <label for="validationTooltipUsername" class="form-label">Username</label> + <div class="input-group has-validation"> + <span class="input-group-text" id="validationTooltipUsernamePrepend">@</span> + <input type="text" class="form-control" id="validationTooltipUsername" aria-describedby="validationTooltipUsernamePrepend" required> + <div class="invalid-tooltip"> + Please choose a unique and valid username. + </div> + </div> + </div> + <div class="col-md-6 position-relative"> + <label for="validationTooltip03" class="form-label">City</label> + <input type="text" class="form-control" id="validationTooltip03" required> + <div class="invalid-tooltip"> + Please provide a valid city. + </div> + </div> + <div class="col-md-3 position-relative"> + <label for="validationTooltip04" class="form-label">State</label> + <select class="form-select" id="validationTooltip04" required> + <option selected disabled value="">Choose...</option> + <option>...</option> + </select> + <div class="invalid-tooltip"> + Please select a valid state. + </div> + </div> + <div class="col-md-3 position-relative"> + <label for="validationTooltip05" class="form-label">Zip</label> + <input type="text" class="form-control" id="validationTooltip05" required> + <div class="invalid-tooltip"> + Please provide a valid zip. + </div> + </div> + <div class="col-12"> + <button class="btn btn-primary" type="submit">Submit form</button> + </div> +</form> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="form-feedback-variables" file="scss/_variables.scss" >}} + +### Mixins + +Two mixins are combined together, through our [loop](#loop), to generate our form validation feedback styles. + +{{< scss-docs name="form-validation-mixins" file="scss/mixins/_forms.scss" >}} + +### Map + +This is the validation Sass map from `_variables.scss`. Override or extend this to generate different or additional states. + +{{< scss-docs name="form-validation-states" file="scss/_variables.scss" >}} + +Maps of `$form-validation-states` can contain three optional parameters to override tooltips and focus styles. + +### Loop + +Used to iterate over `$form-validation-states` map values to generate our validation styles. Any modifications to the above Sass map will be reflected in your compiled CSS via this loop. + +{{< scss-docs name="form-validation-states-loop" file="scss/forms/_validation.scss" >}} + +### Customizing + +Validation states can be customized via Sass with the `$form-validation-states` map. Located in our `_variables.scss` file, this Sass map is how we generate the default `valid`/`invalid` validation states. Included is a nested map for customizing each state's color, icon, tooltip color, and focus shadow. While no other states are supported by browsers, those using custom styles can easily add more complex form feedback. + +Please note that **we do not recommend customizing `$form-validation-states` values without also modifying the `form-validation-state` mixin**. diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/accessibility.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/accessibility.md new file mode 100644 index 000000000..e9f1cb316 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/accessibility.md @@ -0,0 +1,62 @@ +--- +layout: docs +title: Accessibility +description: A brief overview of Bootstrap's features and limitations for the creation of accessible content. +group: getting-started +toc: true +--- + +Bootstrap provides an easy-to-use framework of ready-made styles, layout tools, and interactive components, allowing developers to create websites and applications that are visually appealing, functionally rich, and accessible out of the box. + +## Overview and limitations + +The overall accessibility of any project built with Bootstrap depends in large part on the author's markup, additional styling, and scripting they've included. However, provided that these have been implemented correctly, it should be perfectly possible to create websites and applications with Bootstrap that fulfill [<abbr title="Web Content Accessibility Guidelines">WCAG</abbr> 2.1](https://www.w3.org/TR/WCAG/) (A/AA/AAA), [Section 508](https://www.section508.gov/), and similar accessibility standards and requirements. + +### Structural markup + +Bootstrap's styling and layout can be applied to a wide range of markup structures. This documentation aims to provide developers with best practice examples to demonstrate the use of Bootstrap itself and illustrate appropriate semantic markup, including ways in which potential accessibility concerns can be addressed. + +### Interactive components + +Bootstrap's interactive components—such as modal dialogs, dropdown menus, and custom tooltips—are designed to work for touch, mouse, and keyboard users. Through the use of relevant [<abbr title="Web Accessibility Initiative">WAI</abbr>-<abbr title="Accessible Rich Internet Applications">ARIA</abbr>](https://www.w3.org/WAI/standards-guidelines/aria/) roles and attributes, these components should also be understandable and operable using assistive technologies (such as screen readers). + +Because Bootstrap's components are purposely designed to be fairly generic, authors may need to include further <abbr title="Accessible Rich Internet Applications">ARIA</abbr> roles and attributes, as well as JavaScript behavior, to more accurately convey the precise nature and functionality of their component. This is usually noted in the documentation. + +### Color contrast + +Some combinations of colors that currently make up Bootstrap's default palette—used throughout the framework for things such as button variations, alert variations, form validation indicators—may lead to *insufficient* color contrast (below the recommended [WCAG 2.1 text color contrast ratio of 4.5:1](https://www.w3.org/TR/WCAG/#contrast-minimum) and the [WCAG 2.1 non-text color contrast ratio of 3:1](https://www.w3.org/TR/WCAG/#non-text-contrast)), particularly when used against a light background. Authors are encouraged to test their specific uses of color and, where necessary, manually modify/extend these default colors to ensure adequate color contrast ratios. + +### Visually hidden content + +Content which should be visually hidden, but remain accessible to assistive technologies such as screen readers, can be styled using the `.visually-hidden` class. This can be useful in situations where additional visual information or cues (such as meaning denoted through the use of color) need to also be conveyed to non-visual users. + +```html +<p class="text-danger"> + <span class="visually-hidden">Danger: </span> + This action is not reversible +</p> +``` + +For visually hidden interactive controls, such as traditional "skip" links, use the `.visually-hidden-focusable` class. This will ensure that the control becomes visible once focused (for sighted keyboard users). **Watch out, compared to the equivalent `.sr-only` and `.sr-only-focusable` classes in past versions, Bootstrap 5's `.visually-hidden-focusable` is a standalone class, and must not be used in combination with the `.visually-hidden` class.** + +```html +<a class="visually-hidden-focusable" href="#content">Skip to main content</a> +``` + +### Reduced motion + +Bootstrap includes support for the [`prefers-reduced-motion` media feature](https://www.w3.org/TR/mediaqueries-5/#prefers-reduced-motion). In browsers/environments that allow the user to specify their preference for reduced motion, most CSS transition effects in Bootstrap (for instance, when a modal dialog is opened or closed, or the sliding animation in carousels) will be disabled, and meaningful animations (such as spinners) will be slowed down. + +On browsers that support `prefers-reduced-motion`, and where the user has *not* explicitly signaled that they'd prefer reduced motion (i.e. where `prefers-reduced-motion: no-preference`), Bootstrap enables smooth scrolling using the `scroll-behavior` property. + +## Additional resources + +- [Web Content Accessibility Guidelines (WCAG) 2.1](https://www.w3.org/TR/WCAG/) +- [The A11Y Project](https://www.a11yproject.com/) +- [MDN accessibility documentation](https://developer.mozilla.org/en-US/docs/Web/Accessibility) +- [Tenon.io Accessibility Checker](https://tenon.io/) +- [Color Contrast Analyser (CCA)](https://www.tpgi.com/color-contrast-checker/) +- ["HTML Codesniffer" bookmarklet for identifying accessibility issues](https://github.com/squizlabs/HTML_CodeSniffer) +- [Microsoft Accessibility Insights](https://accessibilityinsights.io/) +- [Deque Axe testing tools](https://www.deque.com/axe/) +- [Introduction to Web Accessibility](https://www.w3.org/WAI/fundamentals/accessibility-intro/) diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/best-practices.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/best-practices.md index e17fc1290..e17fc1290 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/best-practices.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/best-practices.md diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/browsers-devices.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/browsers-devices.md new file mode 100644 index 000000000..bdda154a3 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/browsers-devices.md @@ -0,0 +1,124 @@ +--- +layout: docs +title: Browsers and devices +description: Learn about the browsers and devices, from modern to old, that are supported by Bootstrap, including known quirks and bugs for each. +group: getting-started +toc: true +--- + +## Supported browsers + +Bootstrap supports the **latest, stable releases** of all major browsers and platforms. + +Alternative browsers which use the latest version of WebKit, Blink, or Gecko, whether directly or via the platform's web view API, are not explicitly supported. However, Bootstrap should (in most cases) display and function correctly in these browsers as well. More specific support information is provided below. + +You can find our supported range of browsers and their versions [in our `.browserslistrc file`]({{< param repo >}}/blob/v{{< param current_version >}}/.browserslistrc): + +```text +{{< rf.inline >}} +{{- readFile ".browserslistrc" | chomp | htmlEscape -}} +{{< /rf.inline >}} +``` + +We use [Autoprefixer](https://github.com/postcss/autoprefixer) to handle intended browser support via CSS prefixes, which uses [Browserslist](https://github.com/browserslist/browserslist) to manage these browser versions. Consult their documentation for how to integrate these tools into your projects. + +### Mobile devices + +Generally speaking, Bootstrap supports the latest versions of each major platform's default browsers. Note that proxy browsers (such as Opera Mini, Opera Mobile's Turbo mode, UC Browser Mini, Amazon Silk) are not supported. + +<table class="table"> + <thead> + <tr> + <th scope="col"></th> + <th scope="col">Chrome</th> + <th scope="col">Firefox</th> + <th scope="col">Safari</th> + <th scope="col">Android Browser & WebView</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">Android</th> + <td>Supported</td> + <td>Supported</td> + <td class="text-muted">—</td> + <td>v6.0+</td> + </tr> + <tr> + <th scope="row">iOS</th> + <td>Supported</td> + <td>Supported</td> + <td>Supported</td> + <td class="text-muted">—</td> + </tr> + </tbody> +</table> + +### Desktop browsers + +Similarly, the latest versions of most desktop browsers are supported. + +<table class="table"> + <thead> + <tr> + <th scope="col"></th> + <th scope="col">Chrome</th> + <th scope="col">Firefox</th> + <th scope="col">Microsoft Edge</th> + <th scope="col">Opera</th> + <th scope="col">Safari</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row">Mac</th> + <td>Supported</td> + <td>Supported</td> + <td>Supported</td> + <td>Supported</td> + <td>Supported</td> + </tr> + <tr> + <th scope="row">Windows</th> + <td>Supported</td> + <td>Supported</td> + <td>Supported</td> + <td>Supported</td> + <td class="text-muted">—</td> + </tr> + </tbody> +</table> + +For Firefox, in addition to the latest normal stable release, we also support the latest [Extended Support Release (ESR)](https://www.mozilla.org/en-US/firefox/enterprise/) version of Firefox. + +Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, and Firefox for Linux, though they are not officially supported. + +## Internet Explorer + +Internet Explorer is not supported. **If you require Internet Explorer support, please use Bootstrap v4.** + +## Modals and dropdowns on mobile + +### Overflow and scrolling + +Support for `overflow: hidden;` on the `<body>` element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the `<body>` content will begin to scroll. See [Chrome bug #175502](https://bugs.chromium.org/p/chromium/issues/detail?id=175502) (fixed in Chrome v40) and [WebKit bug #153852](https://bugs.webkit.org/show_bug.cgi?id=153852). + +### iOS text fields and scrolling + +As of iOS 9.2, while a modal is open, if the initial touch of a scroll gesture is within the boundary of a textual `<input>` or a `<textarea>`, the `<body>` content underneath the modal will be scrolled instead of the modal itself. See [WebKit bug #153856](https://bugs.webkit.org/show_bug.cgi?id=153856). + +### Navbar Dropdowns + +The `.dropdown-backdrop` element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or [any other element which will fire a click event in iOS](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile)). + +## Browser zooming + +Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds. + +## Validators + +In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com/) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement. + +These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings. + +Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of a workaround for [a certain Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072). diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/build-tools.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/build-tools.md index 83c26c361..d0286375e 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/build-tools.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/build-tools.md @@ -20,15 +20,50 @@ When completed, you'll be able to run the various commands provided from the com ## Using npm scripts -Our [package.json]({{< param repo >}}/blob/v{{< param current_version >}}/package.json) includes the following commands and tasks: - -| Task | Description | -| --- | --- | -| `npm run dist` | `npm run dist` creates the `/dist/` directory with compiled files. **Uses [Sass](https://sass-lang.com/), [Autoprefixer][autoprefixer], and [terser](https://github.com/terser/terser).** | -| `npm test` | Runs tests locally after running `npm run dist` | -| `npm run docs-serve` | Builds and runs the documentation locally. | - -Run `npm run` to see all the npm scripts. +Our [package.json]({{< param repo >}}/blob/v{{< param current_version >}}/package.json) includes numerous tasks for developing the project. Run `npm run` to see all the npm scripts in your terminal. **Primary tasks include:** + +<table class="table"> + <thead> + <tr> + <th>Task</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <code>npm start</code> + </td> + <td> + Compiles CSS and JavaScript, builds the documentation, and starts a local server. + </td> + </tr> + <tr> + <td> + <code>npm run dist</code> + </td> + <td> + Creates the <code>dist/</code> directory with compiled files. Requires <a href="https://sass-lang.com/">Sass</a>, <a href="https://github.com/postcss/autoprefixer">Autoprefixer</a>, and <a href="https://github.com/terser/terser">terser</a>. + </td> + </tr> + <tr> + <td> + <code>npm test</code> + </td> + <td> + Runs tests locally after running <code>npm run dist</code> + </td> + </tr> + <tr> + <td> + <code>npm run docs-serve</code> + </td> + <td> + Builds and runs the documentation locally. + </td> + </tr> + </tbody> +</table> {{< callout info >}} {{< partial "callout-info-npm-starter.md" >}} @@ -36,11 +71,9 @@ Run `npm run` to see all the npm scripts. ## Sass -Bootstrap v4 uses [Node Sass](https://github.com/sass/node-sass) for compiling our Sass source files into CSS files (included in our build process). In order to end up with the same generated CSS when compiling Sass using your own asset pipeline, you'll need to use a Sass compiler that supports at least the features that Node Sass does. This is important to note because as of October 26, 2020, LibSass and packages built on top of it—including Node Sass—are [deprecated](https://sass-lang.com/blog/libsass-is-deprecated). - -If you require newer Sass features or compatibility with newer CSS standards, [Dart Sass](https://sass-lang.com/dart-sass) is now the primary implementation of Sass and supports a JavaScript API that's fully compatible with Node Sass (with a few exceptions listed on Dart Sass's [GitHub page](https://github.com/sass/dart-sass)). +Bootstrap uses [Dart Sass](https://sass-lang.com/dart-sass) for compiling our Sass source files into CSS files (included in our build process), and we recommend you do the same if you're compiling Sass using your own asset pipeline. We previously used Node Sass for Bootstrap v4, but LibSass and packages built on top of it, including Node Sass, are now [deprecated](https://sass-lang.com/blog/libsass-is-deprecated). -We increase the Sass rounding precision to 6 (by default, it's 5 in Node Sass) to prevent issues with browser rounding. If you use Dart Sass this won't be something you need to adjust, as that compiler uses a rounding precision of 10 and for efficiency reasons does not allow it to be adjusted. +Dart Sass uses a rounding precision of 10 and for efficiency reasons does not allow adjustment of this value. We don't lower this precision during further processing of our generated CSS, such as during minification, but if you chose to do so we recommend maintaining a precision of at least 6 to prevent issues with browser rounding. ## Autoprefixer @@ -48,6 +81,10 @@ Bootstrap uses [Autoprefixer][autoprefixer] (included in our build process) to a We maintain the list of browsers supported through Autoprefixer in a separate file within our GitHub repository. See [.browserslistrc]({{< param repo >}}/blob/v{{< param current_version >}}/.browserslistrc) for details. +## RTLCSS + +Bootstrap uses [RTLCSS](https://rtlcss.com/) to process compiled CSS and convert them to RTL – basically replacing horizontal direction aware properties (eg. `padding-left`) with their opposite. It allows us only write our CSS a single time and make minor tweaks using RTLCSS [control](https://rtlcss.com/learn/usage-guide/control-directives/) and [value](https://rtlcss.com/learn/usage-guide/value-directives/) directives. + ## Local documentation Running our documentation locally requires the use of Hugo, which gets installed via the [hugo-bin](https://www.npmjs.com/package/hugo-bin) npm package. Hugo is a blazingly fast and quite extensible static site generator that provides us: basic includes, Markdown-based files, templates, and more. Here's how to get it started: diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/contents.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/contents.md new file mode 100644 index 000000000..35dec93b3 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/contents.md @@ -0,0 +1,180 @@ +--- +layout: docs +title: Contents +description: Discover what's included in Bootstrap, including our precompiled and source code flavors. +group: getting-started +toc: true +--- + +## Precompiled Bootstrap + +Once downloaded, unzip the compressed folder and you'll see something like this: + +<!-- NOTE: This info is intentionally duplicated in the README. Copy any changes made here over to the README too, but be sure to keep in mind to add the `dist` folder. --> + +```text +bootstrap/ +├── css/ +│ ├── bootstrap-grid.css +│ ├── bootstrap-grid.css.map +│ ├── bootstrap-grid.min.css +│ ├── bootstrap-grid.min.css.map +│ ├── bootstrap-grid.rtl.css +│ ├── bootstrap-grid.rtl.css.map +│ ├── bootstrap-grid.rtl.min.css +│ ├── bootstrap-grid.rtl.min.css.map +│ ├── bootstrap-reboot.css +│ ├── bootstrap-reboot.css.map +│ ├── bootstrap-reboot.min.css +│ ├── bootstrap-reboot.min.css.map +│ ├── bootstrap-reboot.rtl.css +│ ├── bootstrap-reboot.rtl.css.map +│ ├── bootstrap-reboot.rtl.min.css +│ ├── bootstrap-reboot.rtl.min.css.map +│ ├── bootstrap-utilities.css +│ ├── bootstrap-utilities.css.map +│ ├── bootstrap-utilities.min.css +│ ├── bootstrap-utilities.min.css.map +│ ├── bootstrap-utilities.rtl.css +│ ├── bootstrap-utilities.rtl.css.map +│ ├── bootstrap-utilities.rtl.min.css +│ ├── bootstrap-utilities.rtl.min.css.map +│ ├── bootstrap.css +│ ├── bootstrap.css.map +│ ├── bootstrap.min.css +│ ├── bootstrap.min.css.map +│ ├── bootstrap.rtl.css +│ ├── bootstrap.rtl.css.map +│ ├── bootstrap.rtl.min.css +│ └── bootstrap.rtl.min.css.map +└── js/ + ├── bootstrap.bundle.js + ├── bootstrap.bundle.js.map + ├── bootstrap.bundle.min.js + ├── bootstrap.bundle.min.js.map + ├── bootstrap.esm.js + ├── bootstrap.esm.js.map + ├── bootstrap.esm.min.js + ├── bootstrap.esm.min.js.map + ├── bootstrap.js + ├── bootstrap.js.map + ├── bootstrap.min.js + └── bootstrap.min.js.map +``` + +This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/). + +## CSS files + +Bootstrap includes a handful of options for including some or all of our compiled CSS. + +<table class="table"> + <thead> + <tr> + <th scope="col">CSS files</th> + <th scope="col">Layout</th> + <th scope="col">Content</th> + <th scope="col">Components</th> + <th scope="col">Utilities</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row"> + <div><code class="fw-normal text-nowrap">bootstrap.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap.rtl.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap.min.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap.rtl.min.css</code></div> + </th> + <td>Included</td> + <td>Included</td> + <td>Included</td> + <td>Included</td> + </tr> + <tr> + <th scope="row"> + <div><code class="fw-normal text-nowrap">bootstrap-grid.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-grid.rtl.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-grid.min.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-grid.rtl.min.css</code></div> + </th> + <td><a class="link-secondary" href="{{< docsref "/layout/grid" >}}">Only grid system</a></td> + <td class="text-muted">—</td> + <td class="text-muted">—</td> + <td><a class="link-secondary" href="{{< docsref "/utilities/flex" >}}">Only flex utilities</a></td> + </tr> + <tr> + <th scope="row"> + <div><code class="fw-normal text-nowrap">bootstrap-utilities.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-utilities.rtl.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-utilities.min.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-utilities.rtl.min.css</code></div> + </th> + <td class="text-muted">—</td> + <td class="text-muted">—</td> + <td class="text-muted">—</td> + <td>Included</td> + </tr> + <tr> + <th scope="row"> + <div><code class="fw-normal text-nowrap">bootstrap-reboot.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-reboot.rtl.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-reboot.min.css</code></div> + <div><code class="fw-normal text-nowrap">bootstrap-reboot.rtl.min.css</code></div> + </th> + <td class="text-muted">—</td> + <td><a class="link-secondary" href="{{< docsref "/content/reboot" >}}">Only Reboot</a></td> + <td class="text-muted">—</td> + <td class="text-muted">—</td> + </tr> + </tbody> +</table> + +## JS files + +Similarly, we have options for including some or all of our compiled JavaScript. + +<table class="table"> + <thead> + <tr> + <th scope="col">JS files</th> + <th scope="col">Popper</th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row"> + <div><code class="fw-normal text-nowrap">bootstrap.bundle.js</code></div> + <div><code class="fw-normal text-nowrap">bootstrap.bundle.min.js</code></div> + </th> + <td>Included</td> + </tr> + <tr> + <th scope="row"> + <div><code class="fw-normal text-nowrap">bootstrap.js</code></div> + <div><code class="fw-normal text-nowrap">bootstrap.min.js</code></div> + </th> + <td class="text-muted">—</td> + </tr> + </tbody> +</table> + +## Bootstrap source code + +The Bootstrap source code download includes the precompiled CSS and JavaScript assets, along with source Sass, JavaScript, and documentation. More specifically, it includes the following and more: + +```text +bootstrap/ +├── dist/ +│ ├── css/ +│ └── js/ +├── site/ +│ └──content/ +│ └── docs/ +│ └── 5.0/ +│ └── examples/ +├── js/ +└── scss/ +``` + +The `scss/` and `js/` are the source code for our CSS and JavaScript. The `dist/` folder includes everything listed in the precompiled download section above. The `site/docs/` folder includes the source code for our documentation, and `examples/` of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/download.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/download.md index b52bdc5af..e3c982d30 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/download.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/download.md @@ -13,7 +13,7 @@ Download ready-to-use compiled code for **Bootstrap v{{< param current_version > - Compiled and minified CSS bundles (see [CSS files comparison]({{< docsref "/getting-started/contents#css-files" >}})) - Compiled and minified JavaScript plugins (see [JS files comparison]({{< docsref "/getting-started/contents#js-files" >}})) -This doesn't include documentation, source files, or any optional JavaScript dependencies (jQuery and Popper). +This doesn't include documentation, source files, or any optional JavaScript dependencies like Popper. <a href="{{< param "download.dist" >}}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">Download</a> @@ -34,19 +34,18 @@ If you want to download and examine our [examples]({{< docsref "/examples" >}}), <a href="{{< param "download.dist_examples" >}}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Examples');">Download Examples</a> -## jsDelivr +## CDN via jsDelivr Skip the download with [jsDelivr](https://www.jsdelivr.com/) to deliver cached version of Bootstrap's compiled CSS and JS to your project. ```html -<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> +<link href="{{< param "cdn.css" >}}" rel="stylesheet" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script> ``` If you're using our compiled JavaScript and prefer to include Popper separately, add Popper before our JS, via a CDN preferably. ```html -<script src="{{< param "cdn.jquery" >}}" integrity="{{< param "cdn.jquery_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script> ``` @@ -63,7 +62,8 @@ Install Bootstrap in your Node.js powered apps with [the npm package](https://ww npm install bootstrap ``` -`require('bootstrap')` will load all of Bootstrap's jQuery plugins onto the jQuery object. The `bootstrap` module itself does not export anything. You can manually load Bootstrap's jQuery plugins individually by loading the `/js/*.js` files under the package's top-level directory. +`const bootstrap = require('bootstrap')` or `import bootstrap from 'bootstrap'` will load all of Bootstrap's plugins onto a `bootstrap` object. +The `bootstrap` module itself exports all of our plugins. You can manually load Bootstrap's plugins individually by loading the `/js/dist/*.js` files under the package's top-level directory. Bootstrap's `package.json` contains some additional metadata under the following keys: diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/introduction.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/introduction.md index d688e45c6..eb39c7456 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/introduction.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/introduction.md @@ -4,7 +4,7 @@ title: Introduction description: Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with jsDelivr and a template starter page. group: getting-started aliases: - - "/docs/4.6/getting-started/" + - "/docs/5.0/getting-started/" - "/docs/getting-started/" - "/getting-started/" toc: true @@ -19,21 +19,18 @@ Looking to quickly add Bootstrap to your project? Use jsDelivr, a free open sour Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS. ```html -<link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> +<link href="{{< param "cdn.css" >}}" rel="stylesheet" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> ``` ### JS -Many of our components require the use of JavaScript to function. Specifically, they require [jQuery](https://jquery.com/), [Popper](https://popper.js.org/), and our own JavaScript plugins. We use [jQuery's slim build](https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/), but the full version is also supported. - -Place **one of the following `<script>`s** near the end of your pages, right before the closing `</body>` tag, to enable them. jQuery must come first, then Popper, and then our JavaScript plugins. +Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and [Popper](https://popper.js.org/). Place **one of the following `<script>`s** near the end of your pages, right before the closing `</body>` tag, to enable them. #### Bundle -Include every Bootstrap JavaScript plugin with one of our two bundles. Both `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/) for our tooltips and popovers, but not [jQuery](https://jquery.com/). Include jQuery first, then a Bootstrap JavaScript bundle. For more information about what's included in Bootstrap, please see our [contents]({{< docsref "/getting-started/contents#precompiled-bootstrap" >}}) section. +Include every Bootstrap JavaScript plugin and dependency with one of our two bundles. Both `bootstrap.bundle.js` and `bootstrap.bundle.min.js` include [Popper](https://popper.js.org/) for our tooltips and popovers. For more information about what's included in Bootstrap, please see our [contents]({{< docsref "/getting-started/contents#precompiled-bootstrap" >}}) section. ```html -<script src="{{< param "cdn.jquery" >}}" integrity="{{< param "cdn.jquery_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script> ``` @@ -42,14 +39,17 @@ Include every Bootstrap JavaScript plugin with one of our two bundles. Both `boo If you decide to go with the separate scripts solution, Popper must come first (if you're using tooltips or popovers), and then our JavaScript plugins. ```html -<script src="{{< param "cdn.jquery" >}}" integrity="{{< param "cdn.jquery_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script> ``` +#### Modules + +If you use `<script type="module">`, please refer to our [using Bootstrap as a module]({{< docsref "/getting-started/javascript#using-bootstrap-as-a-module" >}}) section. + #### Components -Curious which components explicitly require jQuery, our JavaScript, and Popper? Click the show components link below. If you're unsure about the page structure, keep reading for an example page template. +Curious which components explicitly require our JavaScript and Popper? Click the show components link below. If you're at all unsure about the general page structure, keep reading for an example page template. <details> <summary class="text-primary mb-3">Show components requiring JavaScript</summary> @@ -61,6 +61,7 @@ Curious which components explicitly require jQuery, our JavaScript, and Popper? - Dropdowns for displaying and positioning (also requires [Popper](https://popper.js.org/)) - Modals for displaying, positioning, and scroll behavior - Navbar for extending our Collapse plugin to implement responsive behavior +- Toasts for displaying and dismissing - Tooltips and popovers for displaying and positioning (also requires [Popper](https://popper.js.org/)) - Scrollspy for scroll behavior and navigation updates {{< /markdown >}} @@ -76,10 +77,10 @@ Be sure to have your pages set up with the latest design and development standar <head> <!-- Required meta tags --> <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> - <link rel="stylesheet" href="{{< param "cdn.css" >}}" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> + <link href="{{< param "cdn.css" >}}" rel="stylesheet" integrity="{{< param "cdn.css_hash" >}}" crossorigin="anonymous"> <title>Hello, world!</title> </head> @@ -88,13 +89,11 @@ Be sure to have your pages set up with the latest design and development standar <!-- Optional JavaScript; choose one of the two! --> - <!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) --> - <script src="{{< param "cdn.jquery" >}}" integrity="{{< param "cdn.jquery_hash" >}}" crossorigin="anonymous"></script> + <!-- Option 1: Bootstrap Bundle with Popper --> <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script> <!-- Option 2: Separate Popper and Bootstrap JS --> <!-- - <script src="{{< param "cdn.jquery" >}}" integrity="{{< param "cdn.jquery_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script> <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script> --> @@ -102,7 +101,7 @@ Be sure to have your pages set up with the latest design and development standar </html> ``` -That's all you need for overall page requirements. Visit the [Layout docs]({{< docsref "/layout/overview" >}}) or [our official examples]({{< docsref "/examples" >}}) to start laying out your site's content and components. +For next steps, visit the [Layout docs]({{< docsref "/layout/grid" >}}) or [our official examples]({{< docsref "/examples" >}}) to start laying out your site's content and components. ## Important globals @@ -124,14 +123,14 @@ Bootstrap requires the use of the HTML5 doctype. Without it, you'll see some fun Bootstrap is developed *mobile first*, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, **add the responsive viewport meta tag** to your `<head>`. ```html -<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> +<meta name="viewport" content="width=device-width, initial-scale=1"> ``` You can see an example of this in action in the [starter template](#starter-template). ### Box-sizing -For more straightforward sizing in CSS, we switch the global `box-sizing` value from `content-box` to `border-box`. This ensures `padding` does not affect the final computed width of an element, but it can cause problems with some third party software like Google Maps and Google Custom Search Engine. +For more straightforward sizing in CSS, we switch the global `box-sizing` value from `content-box` to `border-box`. This ensures `padding` does not affect the final computed width of an element, but it can cause problems with some third-party software like Google Maps and Google Custom Search Engine. On the rare occasion you need to override it, use something like the following: @@ -155,22 +154,8 @@ Stay up to date on the development of Bootstrap and reach out to the community w - Read and subscribe to [The Official Bootstrap Blog]({{< param blog >}}). - Join [the official Slack room]({{< param slack >}}). -- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. -- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)). -- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/search?q=keywords:bootstrap) or similar delivery mechanisms for maximum discoverability. +- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel. +- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)). +- Developers should use the keyword `bootstrap` on packages that modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/search?q=keywords:bootstrap) or similar delivery mechanisms for maximum discoverability. You can also follow [@getbootstrap on Twitter](https://twitter.com/{{< param twitter >}}) for the latest gossip and awesome music videos. - -## CSPs and embedded SVGs - -Several Bootstrap components include embedded SVGs in our CSS to style components consistently and easily across browsers and devices. **For organizations with more strict <abbr title="Content Security Policy">CSP</abbr> configurations**, we've documented all instances of our embedded SVGs (all of which are applied via `background-image`) so you can more thoroughly review your options. - -- [Close button]({{< docsref "/utilities/close-icon" >}}) (used in alerts and modals) -- [Custom checkboxes and radio buttons]({{< docsref "/components/forms#custom-forms" >}}) -- [Form switches]({{< docsref "/components/forms#switches" >}}) -- [Form validation icons]({{< docsref "/components/forms#validation" >}}) -- [Custom select menus]({{< docsref "/components/forms#select-menu" >}}) -- [Carousel controls]({{< docsref "/components/carousel#with-controls" >}}) -- [Navbar toggle buttons]({{< docsref "/components/navbar#responsive-behaviors" >}}) - -Based on [community conversation](https://github.com/twbs/bootstrap/issues/25394), some options for addressing this in your own codebase include replacing the URLs with locally hosted assets, removing the images and using inline images (not possible in all components), and modifying your CSP. Our recommendation is to carefully review your own security policies and decide on a best path forward, if necessary. diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/javascript.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/javascript.md index faa01c48d..8ee428921 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/javascript.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/javascript.md @@ -1,7 +1,7 @@ --- layout: docs title: JavaScript -description: Bring Bootstrap to life with our optional JavaScript plugins built on jQuery. Learn about each plugin, our data and programmatic API options, and more. +description: Bring Bootstrap to life with our optional JavaScript plugins. Learn about each plugin, our data and programmatic API options, and more. group: getting-started toc: true --- @@ -12,27 +12,38 @@ Plugins can be included individually (using Bootstrap's individual `js/dist/*.js If you use a bundler (Webpack, Rollup...), you can use `/js/dist/*.js` files which are UMD ready. -## Dependencies +## Using Bootstrap as a module -Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Also note that **all plugins depend on jQuery** (this means jQuery must be included **before** the plugin files). [Consult our `package.json`]({{< param repo >}}/blob/v{{< param current_version >}}/package.json) to see which versions of jQuery are supported. +We provide a version of Bootstrap built as `ESM` (`bootstrap.esm.js` and `bootstrap.esm.min.js`) which allows you to use Bootstrap as a module in your browser, if your [targeted browsers support it](https://caniuse.com/es6-module). -Our dropdowns, popovers and tooltips also depend on [Popper.js](https://popper.js.org/). +```html +<script type="module"> + import { Toast } from 'bootstrap.esm.min.js' -## Data attributes + Array.from(document.querySelectorAll('.toast')) + .forEach(toastNode => new Toast(toastNode)) +</script> +``` -Nearly all Bootstrap plugins can be enabled and configured through HTML alone with data attributes (our preferred way of using JavaScript functionality). Be sure to **only use one set of data attributes on a single element** (e.g., you cannot trigger a tooltip and modal from the same button.) +{{< callout warning >}} +## Incompatible plugins -However, in some situations it may be desirable to disable this functionality. To disable the data attribute API, unbind all events on the document namespaced with `data-api` like so: +Due to browser limitations, some of our plugins, namely Dropdown, Tooltip and Popover plugins, cannot be used in a `<script>` tag with `module` type because they depend on Popper. For more information about the issue see [here](https://v8.dev/features/modules#specifiers). +{{< /callout >}} -```js -$(document).off('.data-api') -``` +## Dependencies -Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this: +Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. -```js -$(document).off('.alert.data-api') -``` +Our dropdowns, popovers and tooltips also depend on [Popper](https://popper.js.org/). + +## Still want to use jQuery? It's possible! + +Bootstrap 5 is designed to be used without jQuery, but it's still possible to use our components with jQuery. **If Bootstrap detects `jQuery` in the `window` object** it'll add all of our components in jQuery's plugin system; this means you'll be able to do `$('[data-bs-toggle="tooltip"]').tooltip()` to enable tooltips. The same goes for our other components. + +## Data attributes + +Nearly all Bootstrap plugins can be enabled and configured through HTML alone with data attributes (our preferred way of using JavaScript functionality). Be sure to **only use one set of data attributes on a single element** (e.g., you cannot trigger a tooltip and modal from the same button.) {{< callout warning >}} ## Selectors @@ -48,30 +59,48 @@ Bootstrap provides custom events for most plugins' unique actions. Generally, th All infinitive events provide [`preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) functionality. This provides the ability to stop the execution of an action before it starts. Returning false from an event handler will also automatically call `preventDefault()`. ```js -$('#myModal').on('show.bs.modal', function (event) { +var myModal = document.getElementById('myModal') + +myModal.addEventListener('show.bs.modal', function (event) { if (!data) { return event.preventDefault() // stops modal from being shown } }) ``` -## Programmatic API +{{< callout warning >}} +## jQuery events -We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon. +Bootstrap will detect jQuery if `jQuery` is present in the `window` object and there is no `data-bs-no-jquery` attribute set on `<body>`. If jQuery is found, Bootstrap will emit events thanks to jQuery's event system. So if you want to listen to Bootstrap's events, you'll have to use the jQuery methods (`.on`, `.one`) instead of `addEventListener`. ```js -$('.btn.danger').button('toggle').addClass('fat') +$('#myTab a').on('shown.bs.tab', function () { + // do something... +}) ``` +{{< /callout >}} -All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior): +## Programmatic API + +All constructors accept an optional options object or nothing (which initiates a plugin with its default behavior): ```js -$('#myModal').modal() // initialized with defaults -$('#myModal').modal({ keyboard: false }) // initialized with no keyboard -$('#myModal').modal('show') // initializes and invokes show immediately +var myModalEl = document.getElementById('myModal') + +var modal = new bootstrap.Modal(myModalEl) // initialized with defaults +var modal = new bootstrap.Modal(myModalEl, { keyboard: false }) // initialized with no keyboard ``` -Each plugin also exposes its raw constructor on a `Constructor` property: `$.fn.popover.Constructor`. If you'd like to get a particular plugin instance, retrieve it directly from an element: `$('[rel="popover"]').data('popover')`. +If you'd like to get a particular plugin instance, each plugin exposes a `getInstance` method. In order to retrieve it directly from an element, do this: `bootstrap.Popover.getInstance(myPopoverEl)`. + +### CSS selectors in constructors + +You can also use a CSS selector as the first argument instead of a DOM element to initialize the plugin. Currently the element for the plugin is found by the `querySelector` method since our plugins support a single element only. + +```js +var modal = new bootstrap.Modal('#myModal') +var dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]') +``` ### Asynchronous functions and transitions @@ -80,7 +109,9 @@ All programmatic API methods are **asynchronous** and return to the caller once In order to execute an action once the transition is complete, you can listen to the corresponding event. ```js -$('#myCollapse').on('shown.bs.collapse', function (event) { +var myCollapseEl = document.getElementById('myCollapse') + +myCollapseEl.addEventListener('shown.bs.collapse', function (event) { // Action to execute once the collapsible area is expanded }) ``` @@ -88,12 +119,15 @@ $('#myCollapse').on('shown.bs.collapse', function (event) { In addition a method call on a **transitioning component will be ignored**. ```js -$('#myCarousel').on('slid.bs.carousel', function (event) { - $('#myCarousel').carousel('2') // Will slide to the slide 2 as soon as the transition to slide 1 is finished +var myCarouselEl = document.getElementById('myCarousel') +var carousel = bootstrap.Carousel.getInstance(myCarouselEl) // Retrieve a Carousel instance + +myCarouselEl.addEventListener('slid.bs.carousel', function (event) { + carousel.to('2') // Will slide to the slide 2 as soon as the transition to slide 1 is finished }) -$('#myCarousel').carousel('1') // Will start sliding to the slide 1 and returns to the caller -$('#myCarousel').carousel('2') // !! Will be ignored, as the transition to the slide 1 is not finished !! +carousel.to('1') // Will start sliding to the slide 1 and returns to the caller +carousel.to('2') // !! Will be ignored, as the transition to the slide 1 is not finished !! ``` ### Default settings @@ -102,10 +136,10 @@ You can change the default settings for a plugin by modifying the plugin's `Cons ```js // changes default for the modal plugin's `keyboard` option to false -$.fn.modal.Constructor.Default.keyboard = false +bootstrap.Modal.Default.keyboard = false ``` -## No conflict +## No conflict (only if you use jQuery) Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call `.noConflict` on the plugin you wish to revert the value of. @@ -116,10 +150,10 @@ $.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Bootstrap funct ## Version numbers -The version of each of Bootstrap's jQuery plugins can be accessed via the `VERSION` property of the plugin's constructor. For example, for the tooltip plugin: +The version of each of Bootstrap's plugins can be accessed via the `VERSION` property of the plugin's constructor. For example, for the tooltip plugin: ```js -$.fn.tooltip.Constructor.VERSION // => "{{< param current_version >}}" +bootstrap.Tooltip.VERSION // => "{{< param current_version >}}" ``` ## No special fallbacks when JavaScript is disabled @@ -132,21 +166,15 @@ Bootstrap's plugins don't fall back particularly gracefully when JavaScript is d **Bootstrap does not officially support third-party JavaScript libraries** like Prototype or jQuery UI. Despite `.noConflict` and namespaced events, there may be compatibility problems that you need to fix on your own. {{< /callout >}} -## Util - -All Bootstrap's JavaScript files depend on `util.js` and it has to be included alongside the other JavaScript files. If you're using the compiled (or minified) `bootstrap.js`, there is no need to include this—it's already there. - -`util.js` includes utility functions and a basic helper for `transitionEnd` events as well as a CSS transition emulator. It's used by the other plugins to check for CSS transition support and to catch hanging transitions. - ## Sanitizer Tooltips and Popovers use our built-in sanitizer to sanitize options which accept HTML. -The default `whiteList` value is the following: +The default `allowList` value is the following: ```js var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i -var DefaultWhitelist = { +var DefaultAllowlist = { // Global attributes allowed on any supplied element below. '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], a: ['target', 'href', 'title', 'rel'], @@ -181,27 +209,28 @@ var DefaultWhitelist = { } ``` -If you want to add new values to this default `whiteList` you can do the following: +If you want to add new values to this default `allowList` you can do the following: ```js -var myDefaultWhiteList = $.fn.tooltip.Constructor.Default.whiteList +var myDefaultAllowList = bootstrap.Tooltip.Default.allowList // To allow table elements -myDefaultWhiteList.table = [] +myDefaultAllowList.table = [] -// To allow td elements and data-option attributes on td elements -myDefaultWhiteList.td = ['data-option'] +// To allow td elements and data-bs-option attributes on td elements +myDefaultAllowList.td = ['data-bs-option'] // You can push your custom regex to validate your attributes. // Be careful about your regular expressions being too lax var myCustomRegex = /^data-my-app-[\w-]+/ -myDefaultWhiteList['*'].push(myCustomRegex) +myDefaultAllowList['*'].push(myCustomRegex) ``` If you want to bypass our sanitizer because you prefer to use a dedicated library, for example [DOMPurify](https://www.npmjs.com/package/dompurify), you should do the following: ```js -$('#yourTooltip').tooltip({ +var yourTooltipEl = document.getElementById('yourTooltip') +var tooltip = new bootstrap.Tooltip(yourTooltipEl, { sanitizeFn: function (content) { return DOMPurify.sanitize(content) } diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/parcel.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/parcel.md new file mode 100644 index 000000000..23aab0054 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/parcel.md @@ -0,0 +1,99 @@ +--- +layout: docs +title: Parcel +description: Learn how to include Bootstrap in your project using Parcel. +group: getting-started +toc: true +--- + +## Install Parcel + +Install [Parcel Bundler](https://en.parceljs.org/getting_started.html). + +## Install Bootstrap + +[Install bootstrap]({{< docsref "/getting-started/download#npm" >}}) as a Node.js module using npm. + +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 both of them to your `package.json` using `npm install @popperjs/core`. + +When all will be completed, your project will be structured like this: + +```text +project-name/ +├── build/ +├── node_modules/ +│ └── bootstrap/ +│ └── popper.js/ +├── scss/ +│ └── custom.scss +├── src/ +│ └── index.html +│ └── index.js +└── package.json +``` + +## Importing JavaScript + +Import [Bootstrap's JavaScript]({{< docsref "/getting-started/javascript" >}}) in your app's entry point (usually `src/index.js`). You can import all our plugins in one file or separately if you require only a subset of them. + +```js +// Import all plugins +import * as bootstrap from 'bootstrap'; + +// Or import only needed plugins +import { Tooltip as Tooltip, Toast as Toast, Popover as Popover } from 'bootstrap'; + +// Or import just one +import Alert as Alert from '../node_modules/bootstrap/js/dist/alert'; +``` + +## Importing CSS + +To utilize the full potential of Bootstrap and customize it to your needs, use the source files as a part of your project's bundling process. + +Create your own `scss/custom.scss` to [import Bootstrap's Sass files]({{< docsref "/customize/sass#importing" >}}) and then override the [built-in custom variables]({{< docsref "/customize/sass#variable-defaults" >}}). + +## Build app + +Include `src/index.js` before the closing `</body>` tag. + +```html +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + <script src="./index.js"></script> + </body> +</html> +``` + +### Edit `package.json` + +Add `dev` and `build` scripts in your `package.json` file. + +```json +"scripts": { + "dev": "parcel ./src/index.html", + "prebuild": "npx rimraf build", + "build": "parcel build --public-url ./ ./src/index.html --experimental-scope-hoisting --out-dir build" +} +``` + +### Run dev script + +Your app will be accessible at `http://127.0.0.1:1234`. + +```sh +npm run dev +``` + +### Build app files + +Built files are in the `build/` folder. + +```sh +npm run build +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/rfs.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/rfs.md new file mode 100644 index 000000000..f440924d1 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/rfs.md @@ -0,0 +1,86 @@ +--- +layout: docs +title: RFS +description: Bootstrap's resizing engine responsively scales common CSS properties to better utilize available space across viewports and devices. +group: getting-started +toc: true +--- + +## What is RFS? + +Bootstrap's side project [RFS](https://github.com/twbs/rfs/tree/v{{< param "rfs_version" >}}) is a unit resizing engine which was initially developed to resize font sizes (hence its abbreviation for Responsive Font Sizes). Nowadays RFS is capable of rescaling most CSS properties with unit values like `margin`, `padding`, `border-radius`, or even `box-shadow`. + +The mechanism automatically calculates the appropriate values based on the dimensions of the browser viewport. It will be compiled into `calc()` functions with a mix of `rem` and viewport units to enable the responsive scaling behavior. + +## Using RFS + +The mixins are included in Bootstrap and are available once you include Bootstrap's `scss`. RFS can also be [installed standalone](https://github.com/twbs/rfs/tree/v{{< param "rfs_version" >}}#installation) if needed. + +### Using the mixins + +The `rfs()` mixin has shorthands for `font-size`, `margin`, `margin-top`, `margin-right`, `margin-bottom`, `margin-left`, `padding`, `padding-top`, `padding-right`, `padding-bottom`, and `padding-left`. See the example below for source Sass and compiled CSS. + +```scss +.title { + @include font-size(4rem); +} +``` + +```css +.title { + font-size: calc(1.525rem + 3.3vw); +} + +@media (min-width: 1200px) { + .title { + font-size: 4rem; + } +} +``` + +Any other property can be passed to the `rfs()` mixin like this: + +```scss +.selector { + @include rfs(4rem, border-radius); +} +``` + +`!important` can also just be added to whatever value you want: + +```scss +.selector { + @include padding(2.5rem !important); +} +``` + +### Using the functions + +When you don't want to use the includes, there are also two functions: + +- `rfs-value()` converts a value into a `rem` value if a `px` value is passed, in other cases it returns the same result. +- `rfs-fluid-value()` returns the fluid version of a value if the property needs rescaling. + +In this example, we use one of Bootstrap's built-in [responsive breakpoint mixins]({{< docsref "/layout/breakpoints" >}}) to only apply styling below the `lg` breakpoint. + +```scss +.selector { + @include media-breakpoint-down(lg) { + padding: rfs-fluid-value(2rem); + font-size: rfs-fluid-value(1.125rem); + } +} +``` + +```css +@media (max-width: 991.98px) { + .selector { + padding: calc(1.325rem + 0.9vw); + font-size: 1.125rem; /* 1.125rem is small enough, so RFS won't rescale this */ + } +} +``` + +## Extended documentation + +RFS is a separate project under the Bootstrap organization. More about RFS and its configuration can be found on its [GitHub repository](https://github.com/twbs/rfs/tree/v{{< param "rfs_version" >}}). diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/rtl.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/rtl.md new file mode 100644 index 000000000..549104c6f --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/rtl.md @@ -0,0 +1,182 @@ +--- +layout: docs +title: RTL +description: Learn how to enable support for right-to-left text in Bootstrap across our layout, components, and utilities. +group: getting-started +toc: true +--- + +## Get familiar + +We recommend getting familiar with Bootstrap first by reading through our [Getting Started Introduction page]({{< docsref "/getting-started/introduction" >}}). Once you've run through it, continue reading here for how to enable RTL. + +You may also want to read up on [the RTLCSS project](https://rtlcss.com/), as it powers our approach to RTL. + +{{< callout warning >}} +### Experimental feature + +The RTL feature is still **experimental** and will probably evolve according to user feedback. Spotted something or have an improvement to suggest? [Open an issue]({{< param repo >}}/issues/new), we'd love to get your insights. +{{< /callout >}} + +## Required HTML + +There are two strict requirements for enabling RTL in Bootstrap-powered pages. + +1. Set `dir="rtl"` on the `<html>` element. +2. Add an appropriate `lang` attribute, like `lang="ar"`, on the `<html>` element. + +From there, you'll need to include an RTL version of our CSS. For example, here's the stylesheet for our compiled and minified CSS with RTL enabled: + +```html +<link rel="stylesheet" href="{{< param "cdn.css_rtl" >}}" integrity="{{< param "cdn.css_rtl_hash" >}}" crossorigin="anonymous"> +``` + +### Starter template + +You can see the above requirements reflected in this modified RTL starter template. + +```html +<!doctype html> +<html lang="ar" dir="rtl"> + <head> + <!-- Required meta tags --> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <!-- Bootstrap CSS --> + <link rel="stylesheet" href="{{< param "cdn.css_rtl" >}}" integrity="{{< param "cdn.css_rtl_hash" >}}" crossorigin="anonymous"> + + <title>مرحبا بالعالم!</title> + </head> + <body> + <h1>مرحبا بالعالم!</h1> + + <!-- Optional JavaScript; choose one of the two! --> + + <!-- Option 1: Bootstrap Bundle with Popper --> + <script src="{{< param "cdn.js_bundle" >}}" integrity="{{< param "cdn.js_bundle_hash" >}}" crossorigin="anonymous"></script> + + <!-- Option 2: Separate Popper and Bootstrap JS --> + <!-- + <script src="{{< param "cdn.popper" >}}" integrity="{{< param "cdn.popper_hash" >}}" crossorigin="anonymous"></script> + <script src="{{< param "cdn.js" >}}" integrity="{{< param "cdn.js_hash" >}}" crossorigin="anonymous"></script> + --> + </body> +</html> +``` + +### RTL examples + +Get started with one of our several [RTL examples]({{< docsref "/examples/#rtl" >}}). + +## Approach + +Our approach to building RTL support into Bootstrap comes with two important decisions that impact how we write and use our CSS: + +1. **First, we decided to build it with the [RTLCSS](https://rtlcss.com/) project.** This gives us some powerful features for managing changes and overrides when moving from LTR to RTL. It also allows us to build two versions of Bootstrap from one codebase. + +2. **Second, we've renamed a handful of directional classes to adopt a logical properties approach.** Most of you have already interacted with logical properties thanks to our flex utilities—they replace direction properties like `left` and `right` in favor `start` and `end`. That makes the class names and values appropriate for LTR and RTL without any overhead. + + For example, instead of `.ml-3` for `margin-left`, use `.ms-3`. + +Working with RTL, through our source Sass or compiled CSS, shouldn't be much different from our default LTR though. + +## Customize from source + +When it comes to [customization]({{< docsref "/customize/sass" >}}), the preferred way is to take advantage of variables, maps, and mixins. This approach works the same for RTL, even if it's post-processed from the compiled files, thanks to [how RTLCSS works](https://rtlcss.com/learn/getting-started/why-rtlcss/). + +### Custom RTL values + +Using [RTLCSS value directives](https://rtlcss.com/learn/usage-guide/value-directives/), you can make a variable output a different value for RTL. For example, to decrease the weight for `$font-weight-bold` throughout the codebase, you may use the `/*rtl: {value}*/` syntax: + +```scss +$font-weight-bold: 700 #{/* rtl:600 */} !default; +``` + +Which would output to the following for our default CSS and RTL CSS: + +```css +/* bootstrap.css */ +dt { + font-weight: 700 /* rtl:600 */; +} + +/* bootstrap.rtl.css */ +dt { + font-weight: 600; +} +``` + +### Alternative font stack + +In the case you're using a custom font, be aware that not all fonts support the non-Latin alphabet. To switch from Pan-European to Arabic family, you may need to use `/*rtl:insert: {value}*/` in your font stack to modify the names of font families. + +For example, to switch from `Helvetica Neue Webfont` for LTR to `Helvetica Neue Arabic` for RTL, your Sass code look like this: + +```scss +$font-family-sans-serif: + Helvetica Neue #{"/* rtl:insert:Arabic */"}, + // Cross-platform generic font family (default user interface font) + system-ui, + // Safari for macOS and iOS (San Francisco) + -apple-system, + // Chrome < 56 for macOS (San Francisco) + BlinkMacSystemFont, + // Windows + "Segoe UI", + // Android + Roboto, + // Basic web fallback + Arial, + // Linux + "Noto Sans", + // Sans serif fallback + sans-serif, + // Emoji fonts + "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; +``` + +### LTR and RTL at the same time + +Need both LTR and RTL on the same page? Thanks to [RTLCSS String Maps](https://rtlcss.com/learn/usage-guide/string-map/), this is pretty straightforward. Wrap your `@import`s with a class, and set a custom rename rule for RTLCSS: + +```scss +/* rtl:begin:options: { + "autoRename": true, + "stringMap":[ { + "name": "ltr-rtl", + "priority": 100, + "search": ["ltr"], + "replace": ["rtl"], + "options": { + "scope": "*", + "ignoreCase": false + } + } ] +} */ +.ltr { + @import "../node_modules/bootstrap/scss/bootstrap"; +} +/*rtl:end:options*/ +``` + +After running Sass then RTLCSS, each selector in your CSS files will be prepended by `.ltr`, and `.rtl` for RTL files. Now you're able to use both files on the same page, and simply use `.ltr` or `.rtl` on your components wrappers to use one or the other direction. + +{{< callout warning >}} +#### Edge cases and known limitations + +While this approach is understandable, please pay attention to the following: + +1. When switching `.ltr` and `.rtl`, make sure you add `dir` and `lang` attributes accordingly. +2. Loading both files can be a real performance bottleneck: consider some [optimization]({{< docsref "/customize/optimize" >}}), and maybe try to [load one of those files asynchronously](https://www.filamentgroup.com/lab/load-css-simpler/). +3. Nesting styles this way will prevent our `form-validation-state()` mixin from working as intended, thus require you tweak it a bit by yourself. [See #31223](https://github.com/twbs/bootstrap/issues/31223). +{{< /callout >}} + +## The breadcrumb case + +The [breadcrumb separator]({{< docsref "/components/breadcrumb" >}}/#changing-the-separator) is the only case requiring its own brand new variable— namely `$breadcrumb-divider-flipped` —defaulting to `$breadcrumb-divider`. + +## Additional resources + +- [RTLCSS](https://rtlcss.com/) +- [RTL Styling 101](https://rtlstyling.com/posts/rtl-styling) diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/webpack.md b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/webpack.md index 737f8eaa9..6998e1e99 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/getting-started/webpack.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/getting-started/webpack.md @@ -1,7 +1,7 @@ --- layout: docs -title: Webpack -description: Learn how to include Bootstrap in your project using Webpack. +title: Webpack and bundlers +description: Learn how to include Bootstrap in your project using Webpack or other bundlers. group: getting-started toc: true --- @@ -15,20 +15,19 @@ toc: true Import [Bootstrap's JavaScript]({{< docsref "/getting-started/javascript" >}}) by adding this line to your app's entry point (usually `index.js` or `app.js`): ```js -import 'bootstrap'; +// You can specify which plugins you need +import { Tooltip, Toast, Popover } from 'bootstrap'; ``` -Alternatively, you may **import plugins individually** as needed: +Alternatively, if you only need just a few of our plugins, you may **import plugins individually** as needed: ```js -import 'bootstrap/js/dist/util'; -import 'bootstrap/js/dist/alert'; +import Alert from 'bootstrap/js/dist/alert'; ... ``` -Bootstrap depends on [jQuery](https://jquery.com/) and [Popper](https://popper.js.org/), -which are specified in the `peerDependencies` property; this means that you will have to make sure to add both of them -to your `package.json` using `npm install --save jquery popper.js`. +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 @popperjs/core`. ## Importing Styles @@ -36,7 +35,7 @@ to your `package.json` using `npm install --save jquery popper.js`. To enjoy the full potential of Bootstrap and customize it to your needs, use the source files as a part of your project's bundling process. -First, create your own `_custom.scss` and use it to override the [built-in custom variables]({{< docsref "/getting-started/theming" >}}). Then, use your main Sass file to import your custom variables, followed by Bootstrap: +First, create your own `_custom.scss` and use it to override the [built-in custom variables]({{< docsref "/customize/sass" >}}). Then, use your main Sass file to import your custom variables, followed by Bootstrap: ```scss @import "custom"; @@ -46,27 +45,36 @@ First, create your own `_custom.scss` and use it to override the [built-in custo For Bootstrap to compile, make sure you install and use the required loaders: [sass-loader](https://github.com/webpack-contrib/sass-loader), [postcss-loader](https://github.com/webpack-contrib/postcss-loader) with [Autoprefixer](https://github.com/postcss/autoprefixer#webpack). With minimal setup, your webpack config should include this rule or similar: ```js -... +// ... { test: /\.(scss)$/, use: [{ - loader: 'style-loader', // inject CSS to page + // inject CSS to page + loader: 'style-loader' }, { - loader: 'css-loader', // translates CSS into CommonJS modules + // translates CSS into CommonJS modules + loader: 'css-loader' }, { - loader: 'postcss-loader', // Run postcss actions + // Run postcss actions + loader: 'postcss-loader', options: { - plugins: function () { // postcss plugins, can be exported to postcss.config.js - return [ - require('autoprefixer') - ]; + // `postcssOptions` is needed for postcss 8.x; + // if you use postcss 7.x skip the key + postcssOptions: { + // postcss plugins, can be exported to postcss.config.js + plugins: function () { + return [ + require('autoprefixer') + ]; + } } } }, { - loader: 'sass-loader' // compiles Sass to CSS + // compiles Sass to CSS + loader: 'sass-loader' }] -}, -... +} +// ... ``` ### Importing Compiled CSS @@ -80,14 +88,17 @@ import 'bootstrap/dist/css/bootstrap.min.css'; In this case you may use your existing rule for `css` without any special modifications to webpack config, except you don't need `sass-loader` just [style-loader](https://github.com/webpack-contrib/style-loader) and [css-loader](https://github.com/webpack-contrib/css-loader). ```js -... +// ... module: { rules: [ { test: /\.css$/, - use: ['style-loader', 'css-loader'] + use: [ + 'style-loader', + 'css-loader' + ] } ] } -... +// ... ``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/clearfix.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/clearfix.md index c2f129a71..9e31474a4 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/clearfix.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/clearfix.md @@ -2,26 +2,25 @@ layout: docs title: Clearfix description: Quickly and easily clear floated content within a container by adding a clearfix utility. -group: utilities +group: helpers +aliases: "/docs/5.0/helpers/" --- Easily clear `float`s by adding `.clearfix` **to the parent element**. Can also be used as a mixin. +Use in HTML: + ```html <div class="clearfix">...</div> ``` -```scss -// Mixin itself -@mixin clearfix() { - &::after { - display: block; - content: ""; - clear: both; - } -} +The mixin source code: -// Usage as a mixin +{{< scss-docs name="clearfix" file="scss/mixins/_clearfix.scss" >}} + +Use the mixin in SCSS: + +```scss .element { @include clearfix; } @@ -31,7 +30,7 @@ The following example shows how the clearfix can be used. Without the clearfix t {{< example >}} <div class="bg-info clearfix"> - <button type="button" class="btn btn-secondary float-left">Example Button floated left</button> - <button type="button" class="btn btn-secondary float-right">Example Button floated right</button> + <button type="button" class="btn btn-secondary float-start">Example Button floated left</button> + <button type="button" class="btn btn-secondary float-end">Example Button floated right</button> </div> {{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/colored-links.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/colored-links.md new file mode 100644 index 000000000..e940196ff --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/colored-links.md @@ -0,0 +1,21 @@ +--- +layout: docs +title: Colored links +description: Colored links with hover states +group: helpers +toc: false +--- + +You can use the `.link-*` classes to colorize links. Unlike the [`.text-*` classes]({{< docsref "/utilities/colors" >}}), these classes have a `:hover` and `:focus` state. + +{{< example >}} +{{< colored-links.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<a href="#" class="link-{{ .name }}">{{ .name | title }} link</a> +{{- end -}} +{{< /colored-links.inline >}} +{{< /example >}} + +{{< callout info >}} +Some of the link styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast. +{{< /callout >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/position.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/position.md index 2fe04d974..d54c1c795 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/position.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/position.md @@ -1,23 +1,11 @@ --- layout: docs title: Position -description: Use these shorthand utilities for quickly configuring the position of an element. -group: utilities +description: Use these helpers for quickly configuring the position of an element. +group: helpers toc: true --- -## Common values - -Quick positioning classes are available, though they are not responsive. - -```html -<div class="position-static">...</div> -<div class="position-relative">...</div> -<div class="position-absolute">...</div> -<div class="position-fixed">...</div> -<div class="position-sticky">...</div> -``` - ## Fixed top Position an element at the top of the viewport, from edge to edge. Be sure you understand the ramifications of fixed position in your project; you may need to add additional CSS. @@ -38,8 +26,17 @@ Position an element at the bottom of the viewport, from edge to edge. Be sure yo Position an element at the top of the viewport, from edge to edge, but only after you scroll past it. The `.sticky-top` utility uses CSS's `position: sticky`, which isn't fully supported in all browsers. -**IE11 and IE10 will render `position: sticky` as `position: relative`.** As such, we wrap the styles in a `@supports` query, limiting the stickiness to only browsers that can render it properly. - ```html <div class="sticky-top">...</div> ``` + +## Responsive sticky top + +Responsive variations also exist for `.sticky-top` utility. + +```html +<div class="sticky-sm-top">Stick to the top on viewports sized SM (small) or wider</div> +<div class="sticky-md-top">Stick to the top on viewports sized MD (medium) or wider</div> +<div class="sticky-lg-top">Stick to the top on viewports sized LG (large) or wider</div> +<div class="sticky-xl-top">Stick to the top on viewports sized XL (extra-large) or wider</div> +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/ratio.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/ratio.md new file mode 100644 index 000000000..771bc07cb --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/ratio.md @@ -0,0 +1,81 @@ +--- +layout: docs +title: Ratios +description: Use generated pseudo elements to make an element maintain the aspect ratio of your choosing. Perfect for responsively handling video or slideshow embeds based on the width of the parent. +group: helpers +toc: true +--- + +## About + +Use the ratio helper to manage the aspect ratios of external content like `<iframe>`s, `<embed>`s, `<video>`s, and `<object>`s. These helpers also can be used on any standard HTML child element (e.g., a `<div>` or `<img>`). Styles are applied from the parent `.ratio` class directly to the child. + +Aspect ratios are declared in a Sass map and included in each class via CSS variable, which also allows [custom aspect ratios](#custom-ratios). + +{{< callout info >}} +**Pro-Tip!** You don't need `frameborder="0"` on your `<iframe>`s as we override that for you in [Reboot]({{< docsref "/content/reboot" >}}). +{{< /callout >}} + +## Example + +Wrap any embed, like an `<iframe>`, in a parent element with `.ratio` and an aspect ratio class. The immediate child element is automatically sized thanks to our universal selector `.ratio > *`. + +{{< example >}} +<div class="ratio ratio-16x9"> + <iframe src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" title="YouTube video" allowfullscreen></iframe> +</div> +{{< /example >}} + +## Aspect ratios + +Aspect ratios can be customized with modifier classes. By default the following ratio classes are provided: + +{{< example class="bd-example-ratios" >}} +<div class="ratio ratio-1x1"> + <div>1x1</div> +</div> +<div class="ratio ratio-4x3"> + <div>4x3</div> +</div> +<div class="ratio ratio-16x9"> + <div>16x9</div> +</div> +<div class="ratio ratio-21x9"> + <div>21x9</div> +</div> +{{< /example >}} + +## Custom ratios + +Each `.ratio-*` class includes a CSS custom property (or CSS variable) in the selector. You can override this CSS variable to create custom aspect ratios on the fly with some quick math on your part. + +For example, to create a 2x1 aspect ratio, set `--bs-aspect-ratio: 50%` on the `.ratio`. + +{{< example class="bd-example-ratios" >}} +<div class="ratio" style="--bs-aspect-ratio: 50%;"> + <div>2x1</div> +</div> +{{< /example >}} + +This CSS variable makes it easy to modify the aspect ratio across breakpoints. The following is 4x3 to start, but changes to a custom 2x1 at the medium breakpoint. + +```scss +.ratio-4x3 { + @include media-breakpoint-up(md) { + --bs-aspect-ratio: 50%; // 2x1 + } +} +``` + +{{< example class="bd-example-ratios bd-example-ratios-breakpoint" >}} +<div class="ratio ratio-4x3"> + <div>4x3, then 2x1</div> +</div> +{{< /example >}} + + +## Sass map + +Within `_variables.scss`, you can change the aspect ratios you want to use. Here's our default `$ratio-aspect-ratios` map. Modify the map as you like and recompile your Sass to put them to use. + +{{< scss-docs name="aspect-ratios" file="scss/_variables.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/stretched-link.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/stretched-link.md index db714cd76..93bffeb31 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/stretched-link.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/stretched-link.md @@ -2,7 +2,7 @@ layout: docs title: Stretched link description: Make any HTML element or Bootstrap component clickable by "stretching" a nested link via CSS. -group: utilities +group: helpers --- Add `.stretched-link` to a link to make its [containing block](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block) clickable via a `::after` pseudo element. In most cases, this means that an element with `position: relative;` that contains a link with the `.stretched-link` class is clickable. Please note given [how CSS `position` works](https://www.w3.org/TR/CSS21/visuren.html#propdef-position), `.stretched-link` cannot be mixed with most table elements. @@ -13,7 +13,7 @@ Multiple links and tap targets are not recommended with stretched links. However {{< example >}} <div class="card" style="width: 18rem;"> - {{< placeholder width="100%" height="180" class="card-img-top" text=" " title="Card image cap" >}} + {{< placeholder width="100%" height="180" class="card-img-top" text="false" title="Card image cap" >}} <div class="card-body"> <h5 class="card-title">Card with stretched link</h5> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> @@ -22,27 +22,25 @@ Multiple links and tap targets are not recommended with stretched links. However </div> {{< /example >}} -Media objects do not have `position: relative` by default, so we need to add the `.position-relative` here to prevent the link from stretching outside the media object. +Most custom components do not have `position: relative` by default, so we need to add the `.position-relative` here to prevent the link from stretching outside the parent element. {{< example >}} -<div class="media position-relative"> - {{< placeholder width="144" height="144" class="mr-3" text=" " title="Generic placeholder image" >}} - <div class="media-body"> - <h5 class="mt-0">Media with stretched link</h5> - <p>This is some placeholder content for the media object. It is intended to mimic what some real-world content would look like, and we're using it here to give the component a bit of body and size.</p> +<div class="d-flex position-relative"> + {{< placeholder width="144" height="144" class="flex-shrink-0 me-3" text="false" title="Generic placeholder image" >}} + <div> + <h5 class="mt-0">Custom component with stretched link</h5> + <p>This is some placeholder content for the custom component. It is intended to mimic what some real-world content would look like, and we're using it here to give the component a bit of body and size.</p> <a href="#" class="stretched-link">Go somewhere</a> </div> </div> {{< /example >}} -Columns are `position: relative` by default, so clickable columns only require the `.stretched-link` class on a link. However, stretching a link over an entire `.row` requires `.position-static` on the column and `.position-relative` on the row. - {{< example >}} -<div class="row no-gutters bg-light position-relative"> +<div class="row g-0 bg-light position-relative"> <div class="col-md-6 mb-md-0 p-md-4"> - {{< placeholder width="100%" height="200" class="w-100" text=" " title="Generic placeholder image" >}} + {{< placeholder width="100%" height="200" class="w-100" text="false" title="Generic placeholder image" >}} </div> - <div class="col-md-6 position-static p-4 pl-md-0"> + <div class="col-md-6 p-4 ps-md-0"> <h5 class="mt-0">Columns with stretched link</h5> <p>Another instance of placeholder content for this other custom component. It is intended to mimic what some real-world content would look like, and we're using it here to give the component a bit of body and size.</p> <a href="#" class="stretched-link">Go somewhere</a> @@ -61,7 +59,7 @@ If the stretched link doesn't seem to work, the [containing block](https://devel {{< example >}} <div class="card" style="width: 18rem;"> - {{< placeholder width="100%" height="180" class="card-img-top" text=" " title="Card image cap" >}} + {{< placeholder width="100%" height="180" class="card-img-top" text="false" title="Card image cap" >}} <div class="card-body"> <h5 class="card-title">Card with stretched links</h5> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/text-truncation.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/text-truncation.md new file mode 100644 index 000000000..a92a171fd --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/text-truncation.md @@ -0,0 +1,23 @@ +--- +layout: docs +title: Text truncation +description: Truncate long strings of text with an ellipsis. +group: helpers +toc: false +--- + +For longer content, you can add a `.text-truncate` class to truncate the text with an ellipsis. **Requires `display: inline-block` or `display: block`.** + +{{< example >}} +<!-- Block level --> +<div class="row"> + <div class="col-2 text-truncate"> + Praeterea iter est quasdam res quas ex communi. + </div> +</div> + +<!-- Inline level --> +<span class="d-inline-block text-truncate" style="max-width: 150px;"> + Praeterea iter est quasdam res quas ex communi. +</span> +{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/visually-hidden.md b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/visually-hidden.md new file mode 100644 index 000000000..d8148b3f3 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/helpers/visually-hidden.md @@ -0,0 +1,29 @@ +--- +layout: docs +title: Visually hidden +description: Use these helpers to visually hide elements but keep them accessible to assistive technologies. +group: helpers +aliases: "/docs/5.0/helpers/screen-readers/" +--- + +Visually hide an element while still allowing it to be exposed to assistive technologies (such as screen readers) with `.visually-hidden`. Use `.visually-hidden-focusable` to visually hide an element by default, but to display it when it's focused (e.g. by a keyboard-only user). `.visually-hidden-focusable` can also be applied to a container–thanks to `:focus-within`, the container will be displayed when any child element of the container receives focus. + +{{< example >}} +<h2 class="visually-hidden">Title for screen readers</h2> +<a class="visually-hidden-focusable" href="#content">Skip to main content</a> +<div class="visually-hidden-focusable">A container with a <a href="#">focusable element</a>.</div> +{{< /example >}} + +Both `visually-hidden` and `visually-hidden-focusable` can also be used as mixins. + +```scss +// Usage as a mixin + +.visually-hidden-title { + @include visually-hidden; +} + +.skip-navigation { + @include visually-hidden-focusable; +} +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/layout/breakpoints.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/breakpoints.md new file mode 100644 index 000000000..ce1df6bb7 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/breakpoints.md @@ -0,0 +1,204 @@ +--- +layout: docs +title: Breakpoints +description: Breakpoints are customizable widths that determine how your responsive layout behaves across device or viewport sizes in Bootstrap. +group: layout +aliases: "/docs/5.0/layout/" +toc: true +--- + +## Core concepts + +- **Breakpoints are the building blocks of responsive design.** Use them to control when your layout can be adapted at a particular viewport or device size. + +- **Use media queries to architect your CSS by breakpoint.** Media queries are a feature of CSS that allow you to conditionally apply styles based on a set of browser and operating system parameters. We most commonly use `min-width` in our media queries. + +- **Mobile first, responsive design is the goal.** Bootstrap's CSS aims to apply the bare minimum of styles to make a layout work at the smallest breakpoint, and then layers on styles to adjust that design for larger devices. This optimizes your CSS, improves rendering time, and provides a great experience for your visitors. + +## Available breakpoints + +Bootstrap includes six default breakpoints, sometimes referred to as _grid tiers_, for building responsively. These breakpoints can be customized if you're using our source Sass files. + +<table class="table"> + <thead> + <tr> + <th>Breakpoint</th> + <th>Class infix</th> + <th>Dimensions</th> + </tr> + </thead> + <tbody> + <tr> + <td>X-Small</td> + <td><em>None</em></td> + <td><576px</td> + </tr> + <tr> + <td>Small</td> + <td><code>sm</code></td> + <td>≥576px</td> + </tr> + <tr> + <td>Medium</td> + <td><code>md</code></td> + <td>≥768px</td> + </tr> + <tr> + <td>Large</td> + <td><code>lg</code></td> + <td>≥992px</td> + </tr> + <tr> + <td>Extra large</td> + <td><code>xl</code></td> + <td>≥1200px</td> + </tr> + <tr> + <td>Extra extra large</td> + <td><code>xxl</code></td> + <td>≥1400px</td> + </tr> + </tbody> +</table> + +Each breakpoint was chosen to comfortably hold containers whose widths are multiples of 12. Breakpoints are also representative of a subset of common device sizes and viewport dimensions—they don't specifically target every use case or device. Instead, the ranges provide a strong and consistent foundation to build on for nearly any device. + +These breakpoints are customizable via Sass—you'll find them in a Sass map in our `_variables.scss` stylesheet. + +{{< scss-docs name="grid-breakpoints" file="scss/_variables.scss" >}} + +For more information and examples on how to modify our Sass maps and variables, please refer to [the Sass section of the Grid documentation]({{< docsref "/layout/grid#sass" >}}). + +## Media queries + +Since Bootstrap is developed to be mobile first, we use a handful of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) to create sensible breakpoints for our layouts and interfaces. These breakpoints are mostly based on minimum viewport widths and allow us to scale up elements as the viewport changes. + +### Min-width + +Bootstrap primarily uses the following media query ranges—or breakpoints—in our source Sass files for our layout, grid system, and components. + +```scss +// Source mixins + +// No media query necessary for xs breakpoint as it's effectively `@media (min-width: 0) { ... }` +@include media-breakpoint-up(sm) { ... } +@include media-breakpoint-up(md) { ... } +@include media-breakpoint-up(lg) { ... } +@include media-breakpoint-up(xl) { ... } +@include media-breakpoint-up(xxl) { ... } + +// Usage + +// Example: Hide starting at `min-width: 0`, and then show at the `sm` breakpoint +.custom-class { + display: none; +} +@include media-breakpoint-up(sm) { + .custom-class { + display: block; + } +} +``` + +These Sass mixins translate in our compiled CSS using the values declared in our Sass variables. For example: + +```scss +// X-Small devices (portrait phones, less than 576px) +// No media query for `xs` since this is the default in Bootstrap + +// Small devices (landscape phones, 576px and up) +@media (min-width: 576px) { ... } + +// Medium devices (tablets, 768px and up) +@media (min-width: 768px) { ... } + +// Large devices (desktops, 992px and up) +@media (min-width: 992px) { ... } + +// X-Large devices (large desktops, 1200px and up) +@media (min-width: 1200px) { ... } + +// XX-Large devices (larger desktops, 1400px and up) +@media (min-width: 1400px) { ... } +``` + +### Max-width + +We occasionally use media queries that go in the other direction (the given screen size *or smaller*): + +```scss +// No media query necessary for xs breakpoint as it's effectively `@media (max-width: 0) { ... }` +@include media-breakpoint-down(sm) { ... } +@include media-breakpoint-down(md) { ... } +@include media-breakpoint-down(lg) { ... } +@include media-breakpoint-down(xl) { ... } +@include media-breakpoint-down(xxl) { ... } + +// Example: Style from medium breakpoint and down +@include media-breakpoint-down(md) { + .custom-class { + display: block; + } +} +``` + +These mixins take those declared breakpoints, subtract `.02px` from them, and use them as our `max-width` values. For example: + +```scss +// X-Small devices (portrait phones, less than 576px) +@media (max-width: 575.98px) { ... } + +// Small devices (landscape phones, less than 768px) +@media (max-width: 767.98px) { ... } + +// Medium devices (tablets, less than 992px) +@media (max-width: 991.98px) { ... } + +// Large devices (desktops, less than 1200px) +@media (max-width: 1199.98px) { ... } + +// X-Large devices (large desktops, less than 1400px) +@media (max-width: 1399.98px) { ... } + +// XX-Large devices (larger desktops) +// No media query since the xxl breakpoint has no upper bound on its width +``` + +{{< callout warning >}} +{{< partial "callout-info-mediaqueries-breakpoints.md" >}} +{{< /callout >}} + +### Single breakpoint + +There are also media queries and mixins for targeting a single segment of screen sizes using the minimum and maximum breakpoint widths. + +```scss +@include media-breakpoint-only(xs) { ... } +@include media-breakpoint-only(sm) { ... } +@include media-breakpoint-only(md) { ... } +@include media-breakpoint-only(lg) { ... } +@include media-breakpoint-only(xl) { ... } +@include media-breakpoint-only(xxl) { ... } +``` + +For example the `@include media-breakpoint-only(md) { ... }` will result in : + +```scss +@media (min-width: 768px) and (max-width: 991.98px) { ... } +``` + +### Between breakpoints + +Similarly, media queries may span multiple breakpoint widths: + +```scss +@include media-breakpoint-between(md, xl) { ... } +``` + +Which results in: + +```scss +// Example +// Apply styles starting from medium devices and up to extra large devices +@media (min-width: 768px) and (max-width: 1199.98px) { ... } +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/layout/columns.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/columns.md new file mode 100644 index 000000000..5c859065a --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/columns.md @@ -0,0 +1,317 @@ +--- +layout: docs +title: Columns +description: Learn how to modify columns with a handful of options for alignment, ordering, and offsetting thanks to our flexbox grid system. Plus, see how to use column classes to manage widths of non-grid elements. +group: layout +toc: true +--- + +{{< callout info >}} +**Heads up!** Be sure to [read the Grid page]({{< docsref "/layout/grid" >}}) first before diving into how to modify and customize your grid columns. +{{< /callout >}} + +## How they work + +- **Columns build on the grid's flexbox architecture.** Flexbox means we have options for changing individual columns and [modifying groups of columns at the row level]({{< docsref "/layout/grid#row-columns" >}}). You choose how columns grow, shrink, or otherwise change. + +- **When building grid layouts, all content goes in columns.** The hierarchy of Bootstrap's grid goes from [container]({{< docsref "/layout/containers" >}}) to row to column to your content. On rare occasions, you may combine content and column, but be aware there can be unintended consequences. + +- **Bootstrap includes predefined classes for creating fast, responsive layouts.** With [six breakpoints]({{< docsref "/layout/breakpoints" >}}) and a dozen columns at each grid tier, we have dozens of classes already built for you to create your desired layouts. This can be disabled via Sass if you wish. + +## Alignment + +Use flexbox alignment utilities to vertically and horizontally align columns. + +### Vertical alignment + +{{< example class="bd-example-row bd-example-row-flex-cols" >}} +<div class="container"> + <div class="row align-items-start"> + <div class="col"> + One of three columns + </div> + <div class="col"> + One of three columns + </div> + <div class="col"> + One of three columns + </div> + </div> + <div class="row align-items-center"> + <div class="col"> + One of three columns + </div> + <div class="col"> + One of three columns + </div> + <div class="col"> + One of three columns + </div> + </div> + <div class="row align-items-end"> + <div class="col"> + One of three columns + </div> + <div class="col"> + One of three columns + </div> + <div class="col"> + One of three columns + </div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row bd-example-row-flex-cols" >}} +<div class="container"> + <div class="row"> + <div class="col align-self-start"> + One of three columns + </div> + <div class="col align-self-center"> + One of three columns + </div> + <div class="col align-self-end"> + One of three columns + </div> + </div> +</div> +{{< /example >}} + +### Horizontal alignment + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row justify-content-start"> + <div class="col-4"> + One of two columns + </div> + <div class="col-4"> + One of two columns + </div> + </div> + <div class="row justify-content-center"> + <div class="col-4"> + One of two columns + </div> + <div class="col-4"> + One of two columns + </div> + </div> + <div class="row justify-content-end"> + <div class="col-4"> + One of two columns + </div> + <div class="col-4"> + One of two columns + </div> + </div> + <div class="row justify-content-around"> + <div class="col-4"> + One of two columns + </div> + <div class="col-4"> + One of two columns + </div> + </div> + <div class="row justify-content-between"> + <div class="col-4"> + One of two columns + </div> + <div class="col-4"> + One of two columns + </div> + </div> + <div class="row justify-content-evenly"> + <div class="col-4"> + One of two columns + </div> + <div class="col-4"> + One of two columns + </div> + </div> +</div> +{{< /example >}} + +### Column wrapping + +If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-9">.col-9</div> + <div class="col-4">.col-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> + <div class="col-6">.col-6<br>Subsequent columns continue along the new line.</div> + </div> +</div> +{{< /example >}} + +### Column breaks + +Breaking columns to a new line in flexbox requires a small hack: add an element with `width: 100%` wherever you want to wrap your columns to a new line. Normally this is accomplished with multiple `.row`s, but not every implementation method can account for this. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> + <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> + + <!-- Force next columns to break to new line --> + <div class="w-100"></div> + + <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> + <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> + </div> +</div> +{{< /example >}} + +You may also apply this break at specific breakpoints with our [responsive display utilities]({{< docsref "/utilities/display" >}}). + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> + <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> + + <!-- Force next columns to break to new line at md breakpoint and up --> + <div class="w-100 d-none d-md-block"></div> + + <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> + <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> + </div> +</div> +{{< /example >}} + +## Reordering + +### Order classes + +Use `.order-` classes for controlling the **visual order** of your content. These classes are responsive, so you can set the `order` by breakpoint (e.g., `.order-1.order-md-2`). Includes support for `1` through `5` across all six grid tiers. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col"> + First in DOM, no order applied + </div> + <div class="col order-5"> + Second in DOM, with a larger order + </div> + <div class="col order-1"> + Third in DOM, with an order of 1 + </div> + </div> +</div> +{{< /example >}} + +There are also responsive `.order-first` and `.order-last` classes that change the `order` of an element by applying `order: -1` and `order: 6`, respectively. These classes can also be intermixed with the numbered `.order-*` classes as needed. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col order-last"> + First in DOM, ordered last + </div> + <div class="col"> + Second in DOM, unordered + </div> + <div class="col order-first"> + Third in DOM, ordered first + </div> + </div> +</div> +{{< /example >}} + +### Offsetting columns + +You can offset grid columns in two ways: our responsive `.offset-` grid classes and our [margin utilities]({{< docsref "/utilities/spacing" >}}). Grid classes are sized to match columns while margins are more useful for quick layouts where the width of the offset is variable. + +#### Offset classes + +Move columns to the right using `.offset-md-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.offset-md-4` moves `.col-md-4` over four columns. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-md-4">.col-md-4</div> + <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div> + </div> + <div class="row"> + <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div> + <div class="col-md-3 offset-md-3">.col-md-3 .offset-md-3</div> + </div> + <div class="row"> + <div class="col-md-6 offset-md-3">.col-md-6 .offset-md-3</div> + </div> +</div> +{{< /example >}} + +In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example]({{< docsref "/examples/grid" >}}). + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div> + <div class="col-sm-5 offset-sm-2 col-md-6 offset-md-0">.col-sm-5 .offset-sm-2 .col-md-6 .offset-md-0</div> + </div> + <div class="row"> + <div class="col-sm-6 col-md-5 col-lg-6">.col-sm-6 .col-md-5 .col-lg-6</div> + <div class="col-sm-6 col-md-5 offset-md-2 col-lg-6 offset-lg-0">.col-sm-6 .col-md-5 .offset-md-2 .col-lg-6 .offset-lg-0</div> + </div> +</div> +{{< /example >}} + +#### Margin utilities + +With the move to flexbox in v4, you can use margin utilities like `.me-auto` to force sibling columns away from one another. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-md-4">.col-md-4</div> + <div class="col-md-4 ms-auto">.col-md-4 .ms-auto</div> + </div> + <div class="row"> + <div class="col-md-3 ms-md-auto">.col-md-3 .ms-md-auto</div> + <div class="col-md-3 ms-md-auto">.col-md-3 .ms-md-auto</div> + </div> + <div class="row"> + <div class="col-auto me-auto">.col-auto .me-auto</div> + <div class="col-auto">.col-auto</div> + </div> +</div> +{{< /example >}} + +## Standalone column classes + +The `.col-*` classes can also be used outside a `.row` to give an element a specific width. Whenever column classes are used as non direct children of a row, the paddings are omitted. + +{{< example >}} +<div class="col-3 bg-light p-3 border"> + .col-3: width of 25% +</div> +<div class="col-sm-9 bg-light p-3 border"> + .col-sm-9: width of 75% above sm breakpoint +</div> +{{< /example >}} + +The classes can be used together with utilities to create responsive floated images. Make sure to wrap the content in a [`.clearfix`]({{< docsref "/helpers/clearfix" >}}) wrapper to clear the float if the text is shorter. + +{{< example >}} +<div class="clearfix"> + {{< placeholder width="100%" height="210" class="col-md-6 float-md-end mb-3 ms-md-3" text="Responsive floated image" >}} + + <p> + A paragraph of placeholder text. We're using it here to show the use of the clearfix class. We're adding quite a few meaningless phrases here to demonstrate how the columns interact here with the floated image. + </p> + + <p> + As you can see the paragraphs gracefully wrap around the floated image. Now imagine how this would look with some actual content in here, rather than just this boring placeholder text that goes on and on, but actually conveys no tangible information at. It simply takes up space and should not really be read. + </p> + + <p> + And yet, here you are, still persevering in reading this placeholder text, hoping for some more insights, or some hidden easter egg of content. A joke, perhaps. Unfortunately, there's none of that here. + </p> +</div> +{{< /example >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/layout/containers.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/containers.md new file mode 100644 index 000000000..456225b94 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/containers.md @@ -0,0 +1,176 @@ +--- +layout: docs +title: Containers +description: Containers are a fundamental building block of Bootstrap that contain, pad, and align your content within a given device or viewport. +group: layout +toc: true +--- + +## How they work + +Containers are the most basic layout element in Bootstrap and are **required when using our default grid system**. Containers are used to contain, pad, and (sometimes) center the content within them. While containers *can* be nested, most layouts do not require a nested container. + +Bootstrap comes with three different containers: + +- `.container`, which sets a `max-width` at each responsive breakpoint +- `.container-fluid`, which is `width: 100%` at all breakpoints +- `.container-{breakpoint}`, which is `width: 100%` until the specified breakpoint + +The table below illustrates how each container's `max-width` compares to the original `.container` and `.container-fluid` across each breakpoint. + +See them in action and compare them in our [Grid example]({{< docsref "/examples/grid#containers" >}}). + +<table class="table"> + <thead> + <tr> + <td class="border-dark"></td> + <th scope="col"> + Extra small<br> + <span class="fw-normal"><576px</span> + </th> + <th scope="col"> + Small<br> + <span class="fw-normal">≥576px</span> + </th> + <th scope="col"> + Medium<br> + <span class="fw-normal">≥768px</span> + </th> + <th scope="col"> + Large<br> + <span class="fw-normal">≥992px</span> + </th> + <th scope="col"> + X-Large<br> + <span class="fw-normal">≥1200px</span> + </th> + <th scope="col"> + XX-Large<br> + <span class="fw-normal">≥1400px</span> + </th> + </tr> + </thead> + <tbody> + <tr> + <th scope="row" class="fw-normal"><code>.container</code></th> + <td class="text-muted">100%</td> + <td>540px</td> + <td>720px</td> + <td>960px</td> + <td>1140px</td> + <td>1320px</td> + </tr> + <tr> + <th scope="row" class="fw-normal"><code>.container-sm</code></th> + <td class="text-muted">100%</td> + <td>540px</td> + <td>720px</td> + <td>960px</td> + <td>1140px</td> + <td>1320px</td> + </tr> + <tr> + <th scope="row" class="fw-normal"><code>.container-md</code></th> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td>720px</td> + <td>960px</td> + <td>1140px</td> + <td>1320px</td> + </tr> + <tr> + <th scope="row" class="fw-normal"><code>.container-lg</code></th> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td>960px</td> + <td>1140px</td> + <td>1320px</td> + </tr> + <tr> + <th scope="row" class="fw-normal"><code>.container-xl</code></th> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td>1140px</td> + <td>1320px</td> + </tr> + <tr> + <th scope="row" class="fw-normal"><code>.container-xxl</code></th> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td>1320px</td> + </tr> + <tr> + <th scope="row" class="fw-normal"><code>.container-fluid</code></th> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + <td class="text-muted">100%</td> + </tr> + </tbody> +</table> + +## Default container + +Our default `.container` class is a responsive, fixed-width container, meaning its `max-width` changes at each breakpoint. + +```html +<div class="container"> + <!-- Content here --> +</div> +``` + +## Responsive containers + +Responsive containers allow you to specify a class that is 100% wide until the specified breakpoint is reached, after which we apply `max-width`s for each of the higher breakpoints. For example, `.container-sm` is 100% wide to start until the `sm` breakpoint is reached, where it will scale up with `md`, `lg`, `xl`, and `xxl`. + +```html +<div class="container-sm">100% wide until small breakpoint</div> +<div class="container-md">100% wide until medium breakpoint</div> +<div class="container-lg">100% wide until large breakpoint</div> +<div class="container-xl">100% wide until extra large breakpoint</div> +<div class="container-xxl">100% wide until extra extra large breakpoint</div> +``` + +## Fluid containers + +Use `.container-fluid` for a full width container, spanning the entire width of the viewport. + +```html +<div class="container-fluid"> + ... +</div> +``` + +## Sass + +As shown above, Bootstrap generates a series of predefined container classes to help you build the layouts you desire. You may customize these predefined container classes by modifying the Sass map (found in `_variables.scss`) that powers them: + +{{< scss-docs name="container-max-widths" file="scss/_variables.scss" >}} + +In addition to customizing the Sass, you can also create your own containers with our Sass mixin. + +```scss +// Source mixin +@mixin make-container($padding-x: $container-padding-x) { + width: 100%; + padding-right: $padding-x; + padding-left: $padding-x; + margin-right: auto; + margin-left: auto; +} + +// Usage +.custom-container { + @include make-container(); +} +``` + +For more information and examples on how to modify our Sass maps and variables, please refer to [the Sass section of the Grid documentation]({{< docsref "/layout/grid#sass" >}}). diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/layout/grid.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/grid.md new file mode 100644 index 000000000..afa3818a2 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/grid.md @@ -0,0 +1,545 @@ +--- +layout: docs +title: Grid system +description: Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, six default responsive tiers, Sass variables and mixins, and dozens of predefined classes. +group: layout +toc: true +--- + +## Example + +Bootstrap's grid system uses a series of containers, rows, and columns to layout and align content. It's built with [flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox) and is fully responsive. Below is an example and an in-depth explanation for how the grid system comes together. + +{{< callout info >}} +**New to or unfamiliar with flexbox?** [Read this CSS Tricks flexbox guide](https://css-tricks.com/snippets/css/a-guide-to-flexbox/#flexbox-background) for background, terminology, guidelines, and code snippets. +{{< /callout >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col"> + Column + </div> + <div class="col"> + Column + </div> + <div class="col"> + Column + </div> + </div> +</div> +{{< /example >}} + +The above example creates three equal-width columns across all devices and viewports using our predefined grid classes. Those columns are centered in the page with the parent `.container`. + +## How it works + +Breaking it down, here's how the grid system comes together: + +- **Our grid supports [six responsive breakpoints]({{< docsref "/layout/breakpoints" >}}).** Breakpoints are based on `min-width` media queries, meaning they affect that breakpoint and all those above it (e.g., `.col-sm-4` applies to `sm`, `md`, `lg`, `xl`, and `xxl`). This means you can control container and column sizing and behavior by each breakpoint. + +- **Containers center and horizontally pad your content.** Use `.container` for a responsive pixel width, `.container-fluid` for `width: 100%` across all viewports and devices, or a responsive container (e.g., `.container-md`) for a combination of fluid and pixel widths. + +- **Rows are wrappers for columns.** Each column has horizontal `padding` (called a gutter) for controlling the space between them. This `padding` is then counteracted on the rows with negative margins to ensure the content in your columns is visually aligned down the left side. Rows also support modifier classes to [uniformly apply column sizing](#row-columns) and [gutter classes]({{< docsref "/layout/gutters" >}}) to change the spacing of your content. + +- **Columns are incredibly flexible.** There are 12 template columns available per row, allowing you to create different combinations of elements that span any number of columns. Column classes indicate the number of template columns to span (e.g., `col-4` spans four). `width`s are set in percentages so you always have the same relative sizing. + +- **Gutters are also responsive and customizable.** [Gutter classes are available]({{< docsref "/layout/gutters" >}}) across all breakpoints, with all the same sizes as our [margin and padding spacing]({{< docsref "/utilities/spacing" >}}). Change horizontal gutters with `.gx-*` classes, vertical gutters with `.gy-*`, or all gutters with `.g-*` classes. `.g-0` is also available to remove gutters. + +- **Sass variables, maps, and mixins power the grid.** If you don't want to use the predefined grid classes in Bootstrap, you can use our [grid's source Sass](#sass) to create your own with more semantic markup. We also include some CSS custom properties to consume these Sass variables for even greater flexibility for you. + +Be aware of the limitations and [bugs around flexbox](https://github.com/philipwalton/flexbugs), like the [inability to use some HTML elements as flex containers](https://github.com/philipwalton/flexbugs#flexbug-9). + +## Grid options + +Bootstrap's grid system can adapt across all six default breakpoints, and any breakpoints you customize. The six default grid tiers are as follow: + +- Extra small (xs) +- Small (sm) +- Medium (md) +- Large (lg) +- Extra large (xl) +- Extra extra large (xxl) + +As noted above, each of these breakpoints have their own container, unique class prefix, and modifiers. Here's how the grid changes across these breakpoints: + +<table class="table mb-4"> + <thead> + <tr> + <th scope="col"></th> + <th scope="col"> + xs<br> + <span class="fw-normal"><576px</span> + </th> + <th scope="col"> + sm<br> + <span class="fw-normal">≥576px</span> + </th> + <th scope="col"> + md<br> + <span class="fw-normal">≥768px</span> + </th> + <th scope="col"> + lg<br> + <span class="fw-normal">≥992px</span> + </th> + <th scope="col"> + xl<br> + <span class="fw-normal">≥1200px</span> + </th> + <th scope="col"> + xxl<br> + <span class="fw-normal">≥1400px</span> + </th> + </tr> + </thead> + <tbody> + <tr> + <th class="text-nowrap" scope="row">Container <code class="fw-normal">max-width</code></th> + <td>None (auto)</td> + <td>540px</td> + <td>720px</td> + <td>960px</td> + <td>1140px</td> + <td>1320px</td> + </tr> + <tr> + <th class="text-nowrap" scope="row">Class prefix</th> + <td><code>.col-</code></td> + <td><code>.col-sm-</code></td> + <td><code>.col-md-</code></td> + <td><code>.col-lg-</code></td> + <td><code>.col-xl-</code></td> + <td><code>.col-xxl-</code></td> + </tr> + <tr> + <th class="text-nowrap" scope="row"># of columns</th> + <td colspan="6">12</td> + </tr> + <tr> + <th class="text-nowrap" scope="row">Gutter width</th> + <td colspan="6">1.5rem (.75rem on left and right)</td> + </tr> + <tr> + <th class="text-nowrap" scope="row">Custom gutters</th> + <td colspan="6"><a href="{{< docsref "/layout/gutters" >}}">Yes</a></td> + </tr> + <tr> + <th class="text-nowrap" scope="row">Nestable</th> + <td colspan="6"><a href="#nesting">Yes</a></td> + </tr> + <tr> + <th class="text-nowrap" scope="row">Column ordering</th> + <td colspan="6"><a href="{{< docsref "/layout/columns#reordering" >}}">Yes</a></td> + </tr> + </tbody> +</table> + +## Auto-layout columns + +Utilize breakpoint-specific column classes for easy column sizing without an explicit numbered class like `.col-sm-6`. + +### Equal-width + +For example, here are two grid layouts that apply to every device and viewport, from `xs` to `xxl`. Add any number of unit-less classes for each breakpoint you need and every column will be the same width. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col"> + 1 of 2 + </div> + <div class="col"> + 2 of 2 + </div> + </div> + <div class="row"> + <div class="col"> + 1 of 3 + </div> + <div class="col"> + 2 of 3 + </div> + <div class="col"> + 3 of 3 + </div> + </div> +</div> +{{< /example >}} + +### Setting one column width + +Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col"> + 1 of 3 + </div> + <div class="col-6"> + 2 of 3 (wider) + </div> + <div class="col"> + 3 of 3 + </div> + </div> + <div class="row"> + <div class="col"> + 1 of 3 + </div> + <div class="col-5"> + 2 of 3 (wider) + </div> + <div class="col"> + 3 of 3 + </div> + </div> +</div> +{{< /example >}} + +### Variable width content + +Use `col-{breakpoint}-auto` classes to size columns based on the natural width of their content. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row justify-content-md-center"> + <div class="col col-lg-2"> + 1 of 3 + </div> + <div class="col-md-auto"> + Variable width content + </div> + <div class="col col-lg-2"> + 3 of 3 + </div> + </div> + <div class="row"> + <div class="col"> + 1 of 3 + </div> + <div class="col-md-auto"> + Variable width content + </div> + <div class="col col-lg-2"> + 3 of 3 + </div> + </div> +</div> +{{< /example >}} + +## Responsive classes + +Bootstrap's grid includes six tiers of predefined classes for building complex responsive layouts. Customize the size of your columns on extra small, small, medium, large, or extra large devices however you see fit. + +### All breakpoints + +For grids that are the same from the smallest of devices to the largest, use the `.col` and `.col-*` classes. Specify a numbered class when you need a particularly sized column; otherwise, feel free to stick to `.col`. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col">col</div> + <div class="col">col</div> + <div class="col">col</div> + <div class="col">col</div> + </div> + <div class="row"> + <div class="col-8">col-8</div> + <div class="col-4">col-4</div> + </div> +</div> +{{< /example >}} + +### Stacked to horizontal + +Using a single set of `.col-sm-*` classes, you can create a basic grid system that starts out stacked and becomes horizontal at the small breakpoint (`sm`). + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-sm-8">col-sm-8</div> + <div class="col-sm-4">col-sm-4</div> + </div> + <div class="row"> + <div class="col-sm">col-sm</div> + <div class="col-sm">col-sm</div> + <div class="col-sm">col-sm</div> + </div> +</div> +{{< /example >}} + +### Mix and match + +Don't want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works. + +{{< example class="bd-example-row" >}} +<div class="container"> + <!-- Stack the columns on mobile by making one full-width and the other half-width --> + <div class="row"> + <div class="col-md-8">.col-md-8</div> + <div class="col-6 col-md-4">.col-6 .col-md-4</div> + </div> + + <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop --> + <div class="row"> + <div class="col-6 col-md-4">.col-6 .col-md-4</div> + <div class="col-6 col-md-4">.col-6 .col-md-4</div> + <div class="col-6 col-md-4">.col-6 .col-md-4</div> + </div> + + <!-- Columns are always 50% wide, on mobile and desktop --> + <div class="row"> + <div class="col-6">.col-6</div> + <div class="col-6">.col-6</div> + </div> +</div> +{{< /example >}} + +### Row columns + +Use the responsive `.row-cols-*` classes to quickly set the number of columns that best render your content and layout. Whereas normal `.col-*` classes apply to the individual columns (e.g., `.col-md-4`), the row columns classes are set on the parent `.row` as a default for contained columns. With `.row-cols-auto` you can give the columns their natural width. + +Use these row columns classes to quickly create basic grid layouts or to control your card layouts and override when needed at the column level. + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-2"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-3"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-auto"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-4"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-4"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col-6">Column</div> + <div class="col">Column</div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-1 row-cols-sm-2 row-cols-md-4"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + </div> +</div> +{{< /example >}} + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row row-cols-2 row-cols-lg-3"> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col">Column</div> + <div class="col-4 col-lg-2">Column</div> + <div class="col-4 col-lg-2">Column</div> + <div class="col-4 col-lg-2">Column</div> + <div class="col-4 col-lg-2">Column</div> + <div class="col-4 col-lg-2">Column</div> + <div class="col-4 col-lg-2">Column</div> + </div> +</div> +{{< /example >}} + +You can also use the accompanying Sass mixin, `row-cols()`: + +```scss +.element { + // Three columns to start + @include row-cols(3); + + // Five columns from medium breakpoint up + @include media-breakpoint-up(md) { + @include row-cols(5); + } +} +``` + +## Nesting + +To nest your content with the default grid, add a new `.row` and set of `.col-sm-*` columns within an existing `.col-sm-*` column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns). + +{{< example class="bd-example-row" >}} +<div class="container"> + <div class="row"> + <div class="col-sm-3"> + Level 1: .col-sm-3 + </div> + <div class="col-sm-9"> + <div class="row"> + <div class="col-8 col-sm-6"> + Level 2: .col-8 .col-sm-6 + </div> + <div class="col-4 col-sm-6"> + Level 2: .col-4 .col-sm-6 + </div> + </div> + </div> + </div> +</div> +{{< /example >}} + +## Sass + +When using Bootstrap's source Sass files, you have the option of using Sass variables and mixins to create custom, semantic, and responsive page layouts. Our predefined grid classes use these same variables and mixins to provide a whole suite of ready-to-use classes for fast responsive layouts. + +### Variables + +Variables and maps determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below. + +```scss +$grid-columns: 12; +$grid-gutter-width: 1.5rem; +``` + +{{< scss-docs name="grid-breakpoints" file="scss/_variables.scss" >}} + +{{< scss-docs name="container-max-widths" file="scss/_variables.scss" >}} + +### Mixins + +Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns. + +```scss +// Creates a wrapper for a series of columns +@include make-row(); + +// Make the element grid-ready (applying everything but the width) +@include make-col-ready(); + +// Without optional size values, the mixin will create equal columns (similar to using .col) +@include make-col(); +@include make-col($size, $columns: $grid-columns); + +// Get fancy by offsetting, or changing the sort order +@include make-col-offset($size, $columns: $grid-columns); +``` + +### Example usage + +You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between. + +```scss +.example-container { + @include make-container(); + // Make sure to define this width after the mixin to override + // `width: 100%` generated by `make-container()` + width: 800px; +} + +.example-row { + @include make-row(); +} + +.example-content-main { + @include make-col-ready(); + + @include media-breakpoint-up(sm) { + @include make-col(6); + } + @include media-breakpoint-up(lg) { + @include make-col(8); + } +} + +.example-content-secondary { + @include make-col-ready(); + + @include media-breakpoint-up(sm) { + @include make-col(6); + } + @include media-breakpoint-up(lg) { + @include make-col(4); + } +} +``` + +{{< example >}} +<div class="example-container"> + <div class="example-row"> + <div class="example-content-main">Main content</div> + <div class="example-content-secondary">Secondary content</div> + </div> +</div> +{{< /example >}} + +## Customizing the grid + +Using our built-in grid Sass variables and maps, it's possible to completely customize the predefined grid classes. Change the number of tiers, the media query dimensions, and the container widths—then recompile. + +### Columns and gutters + +The number of grid columns can be modified via Sass variables. `$grid-columns` is used to generate the widths (in percent) of each individual column while `$grid-gutter-width` sets the width for the column gutters. + +```scss +$grid-columns: 12 !default; +$grid-gutter-width: 1.5rem !default; +``` + +### Grid tiers + +Moving beyond the columns themselves, you may also customize the number of grid tiers. If you wanted just four grid tiers, you'd update the `$grid-breakpoints` and `$container-max-widths` to something like this: + +```scss +$grid-breakpoints: ( + xs: 0, + sm: 480px, + md: 768px, + lg: 1024px +); + +$container-max-widths: ( + sm: 420px, + md: 720px, + lg: 960px +); +``` + +When making any changes to the Sass variables or maps, you'll need to save your changes and recompile. Doing so will output a brand new set of predefined grid classes for column widths, offsets, and ordering. Responsive visibility utilities will also be updated to use the custom breakpoints. Make sure to set grid values in `px` (not `rem`, `em`, or `%`). diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/layout/gutters.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/gutters.md new file mode 100644 index 000000000..87d2731a4 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/gutters.md @@ -0,0 +1,165 @@ +--- +layout: docs +title: Gutters +description: Gutters are the padding between your columns, used to responsively space and align content in the Bootstrap grid system. +group: layout +toc: true +--- + +## How they work + +- **Gutters are the gaps between column content, created by horizontal `padding`.** We set `padding-right` and `padding-left` on each column, and use negative `margin` to offset that at the start and end of each row to align content. + +- **Gutters start at `1.5rem` (`24px`) wide.** This allows us to match our grid to the [padding and margin spacers]({{< docsref "/utilities/spacing" >}}) scale. + +- **Gutters can be responsively adjusted.** Use breakpoint-specific gutter classes to modify horizontal gutters, vertical gutters, and all gutters. + +## Horizontal gutters + +`.gx-*` classes can be used to control the horizontal gutter widths. The `.container` or `.container-fluid` parent may need to be adjusted if larger gutters are used too to avoid unwanted overflow, using a matching padding utility. For example, in the following example we've increased the padding with `.px-4`: + +{{< example >}} +<div class="container px-4"> + <div class="row gx-5"> + <div class="col"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + </div> +</div> +{{< /example >}} + +An alternative solution is to add a wrapper around the `.row` with the `.overflow-hidden` class: + +{{< example >}} +<div class="container overflow-hidden"> + <div class="row gx-5"> + <div class="col"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + </div> +</div> +{{< /example >}} + +## Vertical gutters + +`.gy-*` classes can be used to control the vertical gutter widths. Like the horizontal gutters, the vertical gutters can cause some overflow below the `.row` at the end of a page. If this occurs, you add a wrapper around `.row` with the `.overflow-hidden` class: + +{{< example >}} +<div class="container overflow-hidden"> + <div class="row gy-5"> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + </div> +</div> +{{< /example >}} + +## Horizontal & vertical gutters + +`.g-*` classes can be used to control the horizontal gutter widths, for the following example we use a smaller gutter width, so there won't be a need to add the `.overflow-hidden` wrapper class. + +{{< example >}} +<div class="container"> + <div class="row g-2"> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + <div class="col-6"> + <div class="p-3 border bg-light">Custom column padding</div> + </div> + </div> +</div> +{{< /example >}} + +## Row columns gutters + +Gutter classes can also be added to [row columns]({{< docsref "/layout/grid#row-columns" >}}). In the following example, we use responsive row columns and responsive gutter classes. + +{{< example >}} +<div class="container"> + <div class="row row-cols-2 row-cols-lg-5 g-2 g-lg-3"> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + <div class="col"> + <div class="p-3 border bg-light">Row column</div> + </div> + </div> +</div> +{{< /example >}} + +## No gutters + +The gutters between columns in our predefined grid classes can be removed with `.g-0`. This removes the negative `margin`s from `.row` and the horizontal `padding` from all immediate children columns. + +**Need an edge-to-edge design?** Drop the parent `.container` or `.container-fluid`. + +In practice, here's how it looks. Note you can continue to use this with all other predefined grid classes (including column widths, responsive tiers, reorders, and more). + +{{< example class="bd-example-row" >}} +<div class="row g-0"> + <div class="col-sm-6 col-md-8">.col-sm-6 .col-md-8</div> + <div class="col-6 col-md-4">.col-6 .col-md-4</div> +</div> +{{< /example >}} + +## Change the gutters + +Classes are built from the `$gutters` Sass map which is inherited from the `$spacers` Sass map. + +```scss +$grid-gutter-width: 1.5rem; +$gutters: ( + 0: 0, + 1: $spacer * .25, + 2: $spacer * .5, + 3: $spacer, + 4: $spacer * 1.5, + 5: $spacer * 3, +); +``` diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/layout/utilities-for-layout.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/utilities.md index 80c2d794a..009d2416d 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/layout/utilities-for-layout.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/utilities.md @@ -12,13 +12,13 @@ Use our [display utilities]({{< docsref "/utilities/display" >}}) for responsive ## Flexbox options -Bootstrap 4 is built with flexbox, but not every element's `display` has been changed to `display: flex` as this would add many unnecessary overrides and unexpectedly change key browser behaviors. Most of [our components]({{< docsref "/components/alerts" >}}) are built with flexbox enabled. +Bootstrap is built with flexbox, but not every element's `display` has been changed to `display: flex` as this would add many unnecessary overrides and unexpectedly change key browser behaviors. Most of [our components]({{< docsref "/components/alerts" >}}) are built with flexbox enabled. Should you need to add `display: flex` to an element, do so with `.d-flex` or one of the responsive variants (e.g., `.d-sm-flex`). You'll need this class or `display` value to allow the use of our extra [flexbox utilities]({{< docsref "/utilities/flex" >}}) for sizing, alignment, spacing, and more. ## Margin and padding -Use the `margin` and `padding` [spacing utilities]({{< docsref "/utilities/spacing" >}}) to control how elements and components are spaced and sized. Bootstrap 4 includes a five-level scale for spacing utilities, based on a `1rem` value default `$spacer` variable. Choose values for all viewports (e.g., `.mr-3` for `margin-right: 1rem`), or pick responsive variants to target specific viewports (e.g., `.mr-md-3` for `margin-right: 1rem` starting at the `md` breakpoint). +Use the `margin` and `padding` [spacing utilities]({{< docsref "/utilities/spacing" >}}) to control how elements and components are spaced and sized. Bootstrap includes a six-level scale for spacing utilities, based on a `1rem` value default `$spacer` variable. Choose values for all viewports (e.g., `.me-3` for `margin-right: 1rem` in LTR), or pick responsive variants to target specific viewports (e.g., `.me-md-3` for `margin-right: 1rem` —in LTR— starting at the `md` breakpoint). ## Toggle `visibility` diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/layout/z-index.md b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/z-index.md new file mode 100644 index 000000000..1870d05d2 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/layout/z-index.md @@ -0,0 +1,16 @@ +--- +layout: docs +title: Z-index +description: While not a part of Bootstrap's grid system, z-indexes play an important part in how our components overlay and interact with one another. +group: layout +--- + +Several Bootstrap components utilize `z-index`, the CSS property that helps control layout by providing a third axis to arrange content. We utilize a default z-index scale in Bootstrap that's been designed to properly layer navigation, tooltips and popovers, modals, and more. + +These higher values start at an arbitrary number, high and specific enough to ideally avoid conflicts. We need a standard set of these across our layered components—tooltips, popovers, navbars, dropdowns, modals—so we can be reasonably consistent in the behaviors. There's no reason we couldn't have used `100`+ or `500`+. + +We don't encourage customization of these individual values; should you change one, you likely need to change them all. + +{{< scss-docs name="zindex-stack" file="scss/_variables.scss" >}} + +To handle overlapping borders within components (e.g., buttons and inputs in input groups), we use low single digit `z-index` values of `1`, `2`, and `3` for default, hover, and active states. On hover/focus/active, we bring a particular element to the forefront with a higher `z-index` value to show their border over the sibling elements. diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/migration.md b/vendor/twbs/bootstrap/site/content/docs/5.0/migration.md new file mode 100644 index 000000000..e6db422c4 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/migration.md @@ -0,0 +1,383 @@ +--- +layout: docs +title: Migrating to v5 +description: Track and review changes to the Bootstrap source files, documentation, and components to help you migrate from v4 to v5. +group: migration +aliases: "/migration/" +toc: true +--- + +## Dependencies + +- Dropped jQuery. +- Upgraded from Popper v1.x to Popper v2.x. +- Replaced Libsass with Dart Sass as our Sass compiler given Libsass was deprecated. +- Migrated from Jekyll to Hugo for building our documentation + +## Browser support + +- Dropped Internet Explorer 10 and 11 +- Dropped Microsoft Edge < 16 (Legacy Edge) +- Dropped Firefox < 60 +- Dropped Safari < 12 +- Dropped iOS Safari < 12 +- Dropped Chrome < 60 + +<hr class="my-5"> + +## Documentation changes + +- Redesigned homepage, docs layout, and footer. +- Added [new Parcel guide](https://getbootstrap.com/docs/5.0/getting-started/parcel/). +- Added [new Customize section](https://getbootstrap.com/docs/5.0/customize/overview/), replacing [v4's Theming page](https://getbootstrap.com/docs/4.6/getting-started/theming/), with new details on Sass, global configuration options, color schemes, CSS variables, and more. +- Reorganized all form documentation into [new Forms section](https://getbootstrap.com/docs/5.0/forms/overview/), breaking apart the content into more focused pages. +- Similarly, updated [the Layout section](https://getbootstrap.com/docs/5.0/layout/breakpoints/), to flesh out grid content more clearly. +- Renamed "Navs" component page to "Navs & Tabs". +- Renamed "Checks" page to "Checks & radios". +- Redesigned the navbar and added a new subnav to make it easier to get around our sites and docs versions. +- Added new keyboard shortcut for the search field: <kbd>Ctrl + /</kbd>. + +## Sass + +- We've ditched the default Sass map merges to make it easier to remove redundant values. Keep in mind you now have to define all values in the Sass maps like `$theme-colors`. Check out how to deal with [Sass maps]({{< docsref "/customize/sass#maps-and-loops" >}}). + +- <span class="badge bg-danger">Breaking</span> Renamed `color-yiq()` function and related variables to `color-contrast()` as it's no longer related to YIQ colorspace. [See #30168.](https://github.com/twbs/bootstrap/pull/30168/) + - `$yiq-contrasted-threshold` is renamed to `$min-contrast-ratio`. + - `$yiq-text-dark` and `$yiq-text-light` are respectively renamed to `$color-contrast-dark` and `$color-contrast-light`. + +- <span class="badge bg-danger">Breaking</span> Media query mixins parameters have changed for a more logical approach. + - `media-breakpoint-down()` uses the breakpoint itself instead of the next breakpoint (e.g., `media-breakpoint-down(lg)` instead of `media-breakpoint-down(md)` targets viewports smaller than `lg`). + - Similarly, the second parameter in `media-breakpoint-between()` also uses the breakpoint itself instead of the next breakpoint (e.g., `media-between(sm, lg)` instead of `media-breakpoint-between(sm, md)` targets viewports between `sm` and `lg`). + +- <span class="badge bg-danger">Breaking</span> Removed print styles and `$enable-print-styles` variable. Print display classes are still around. [See #28339](https://github.com/twbs/bootstrap/pull/28339). + +- <span class="badge bg-danger">Breaking</span> Dropped `color()`, `theme-color()`, and `gray()` functions in favor of variables. [See #29083](https://github.com/twbs/bootstrap/pull/29083). + +- <span class="badge bg-danger">Breaking</span> Renamed `theme-color-level()` function to `color-level()` and now accepts any color you want instead of only `$theme-color` colors. [See #29083](https://github.com/twbs/bootstrap/pull/29083) **Watch out:** `color-level()` was later on dropped in `v5.0.0-alpha3`. + +- <span class="badge bg-danger">Breaking</span> Renamed `$enable-prefers-reduced-motion-media-query` and `$enable-pointer-cursor-for-buttons` to `$enable-reduced-motion` and `$enable-button-pointers` for brevity. + +- <span class="badge bg-danger">Breaking</span> Removed the `bg-gradient-variant()` mixin. Use the `.bg-gradient` class to add gradients to elements instead of the generated `.bg-gradient-*` classes. + +- <span class="badge bg-danger">Breaking</span> **Removed previously deprecated mixins:** + - `hover`, `hover-focus`, `plain-hover-focus`, and `hover-focus-active` + - `float()` + - `form-control-mixin()` + - `nav-divider()` + - `retina-img()` + - `text-hide()` (also dropped the associated utility class, `.text-hide`) + - `visibility()` + - `form-control-focus()` + +- <span class="badge bg-danger">Breaking</span> Renamed `scale-color()` function to `shift-color()` to avoid collision with Sass's own color scaling function. + +- `box-shadow` mixins now allow `null` values and drop `none` from multiple arguments. [See #30394](https://github.com/twbs/bootstrap/pull/30394). + +- The `border-radius()` mixin now has a default value. + +## Color system + +- The color system which worked with `color-level()` and `$theme-color-interval` was removed in favor of a new color system. All `lighten()` and `darken()` functions in our codebase are replaced by `tint-color()` and `shade-color()`. These functions will mix the color with either white or black instead of changing its lightness by a fixed amount. The `shift-color()` will either tint or shade a color depending on whether its weight parameter is positive or negative. [See #30622](https://github.com/twbs/bootstrap/pull/30622) for more details. + +- Added new tints and shades for every color, providing nine separate colors for each base color, as new Sass variables. + +- Improved color contrast. Bumped color contrast ratio from 3:1 to 4.5:1 and updated blue, green, cyan, and pink colors to ensure WCAG 2.1 AA contrast. Also changed our color contrast color from `$gray-900` to `$black`. + +- To support our color system, we've added new custom `tint-color()` and `shade-color()` functions to mix our colors appropriately. + +## Grid updates + +- **New breakpoint!** Added new `xxl` breakpoint for `1400px` and up. No changes to all other breakpoints. + +- **Improved gutters.** Gutters are now set in rems, and are narrower than v4 (`1.5rem`, or about `24px`, down from `30px`). This aligns our grid system's gutters with our spacing utilities. + - Added new [gutter class](https://getbootstrap.com/docs/5.0/layout/gutters/) (`.g-*`, `.gx-*`, and `.gy-*`) to control horizontal/vertical gutters, horizontal gutters, and vertical gutters. + - <span class="badge bg-danger">Breaking</span> Renamed `.no-gutters` to `.g-0` to match new gutter utilities. + +- Columns no longer have `position: relative` applied, so you may have to add `.position-relative` to some elements to restore that behavior. + +- <span class="badge bg-danger">Breaking</span> Dropped several `.order-*` classes that often went unused. We now only provide `.order-1` to `.order-5` out of the box. + +- <span class="badge bg-danger">Breaking</span> Dropped the `.media` component as it can be easily replicated with utilities. [See #28265](https://github.com/twbs/bootstrap/pull/28265) and the [flex utilities page for an example]({{< docsref "/utilities/flex#media-object" >}}). + +- <span class="badge bg-danger">Breaking</span> `bootstrap-grid.css` now only applies `box-sizing: border-box` to the column instead of resetting the global box-sizing. This way, our grid styles can be used in more places without interference. + +- `$enable-grid-classes` no longer disables the generation of container classes anymore. [See #29146.](https://github.com/twbs/bootstrap/pull/29146) + +- Updated the `make-col` mixin to default to equal columns without a specified size. + +## Content, Reboot, etc + +- **[RFS]({{< docsref "/getting-started/rfs" >}}) is now enabled by default.** Headings using the `font-size()` mixin will automatically adjust their `font-size` to scale with the viewport. _This feature was previously opt-in with v4._ + +- <span class="badge bg-danger">Breaking</span> Overhauled our display typography to replace our `$display-*` variables and with a `$display-font-sizes` Sass map. Also removed the individual `$display-*-weight` variables for a single `$display-font-weight` and adjusted `font-size`s. + +- Added two new `.display-*` heading sizes, `.display-5` and `.display-6`. + +- **Links are underlined by default** (not just on hover), unless they're part of specific components. + +- **Redesigned tables** to refresh their styles and rebuild them with CSS variables for more control over styling. + +- <span class="badge bg-danger">Breaking</span> Nested tables do not inherit styles anymore. + +- <span class="badge bg-danger">Breaking</span> `.thead-light` and `.thead-dark` are dropped in favor of the `.table-*` variant classes which can be used for all table elements (`thead`, `tbody`, `tfoot`, `tr`, `th` and `td`). + +- <span class="badge bg-danger">Breaking</span> The `table-row-variant()` mixin is renamed to `table-variant()` and accepts only 2 parameters: `$color` (color name) and `$value` (color code). The border color and accent colors are automatically calculated based on the table factor variables. + +- Split table cell padding variables into `-y` and `-x`. + +- <span class="badge bg-danger">Breaking</span> Dropped `.pre-scrollable` class. [See #29135](https://github.com/twbs/bootstrap/pull/29135) + +- <span class="badge bg-danger">Breaking</span> `.text-*` utilities do not add hover and focus states to links anymore. `.link-*` helper classes can be used instead. [See #29267](https://github.com/twbs/bootstrap/pull/29267) + +- <span class="badge bg-danger">Breaking</span> Dropped `.text-justify` class. [See #29793](https://github.com/twbs/bootstrap/pull/29793) + +- Reset default horizontal `padding-left` on `<ul>` and `<ol>` elements from browser default `40px` to `2rem`. + +- Added `$enable-smooth-scroll`, which applies `scroll-behavior: smooth` globally—except for users asking for reduced motion through `prefers-reduced-motion` media query. [See #31877](https://github.com/twbs/bootstrap/pull/31877) + +## RTL + +- Horizontal direction specific variables, utilities, and mixins have all been renamed to use logical properties like those found in flexbox layouts—e.g., `start` and `end` in lieu of `left` and `right`. + +## Forms + +- **Added new floating forms!** We've promoted the Floating labels example to fully supported form components. [See the new Floating labels page.]({{< docsref "/forms/floating-labels" >}}) + +- <span class="badge bg-danger">Breaking</span> **Consolidated native and custom form elements.** Checkboxes, radios, selects, and other inputs that had native and custom classes in v4 have been consolidated. Now nearly all our form elements are entirely custom, most without the need for custom HTML. + - `.custom-check` is now `.form-check`. + - `.custom-check.custom-switch` is now `.form-check.form-switch`. + - `.custom-select` is now `.form-select`. + - `.custom-file` and `.form-file` have been replaced by custom styles on top of `.form-control`. + - `.custom-range` is now `.form-range`. + - Dropped native `.form-control-file` and `.form-control-range`. + +- <span class="badge bg-danger">Breaking</span> Dropped `.input-group-append` and `.input-group-prepend`. You can now just add buttons and `.input-group-text` as direct children of the input groups. + +- The longstanding [Missing border radius on input group with validation feedback bug](https://github.com/twbs/bootstrap/issues/25110) is finally fixed by adding an additional `.has-validation` class to input groups with validation. + +- <span class="badge bg-danger">Breaking</span> **Dropped form-specific layout classes for our grid system.** Use our grid and utilities instead of `.form-group`, `.form-row`, or `.form-inline`. + +- <span class="badge bg-danger">Breaking</span> Form labels now require `.form-label`. + +- <span class="badge bg-danger">Breaking</span> `.form-text` no longer sets `display`, allowing you to create inline or block help text as you wish just by changing the HTML element. + +- Validation icons are no longer applied to `<select>`s with `multiple`. + +- Rearranged source Sass files under `scss/forms/`, including input group styles. + +<hr class="my-5"> + +## Components + +- Unified `padding` values for alerts, breadcrumbs, cards, dropdowns, list groups, modals, popovers, and tooltips to be based on our `$spacer` variable. [See #30564](https://github.com/twbs/bootstrap/pull/30564). + +### Accordion + +- Added [new accordion component]({{< docsref "/components/accordion" >}}). + +### Alerts + +- Alerts now have [examples with icons]({{< docsref "/components/alerts#icons" >}}). + +- Removed custom styles for `<hr>`s in each alert since they already use `currentColor`. + +### Badges + +- <span class="badge bg-danger">Breaking</span> Dropped all `.badge-*` color classes for background utilities (e.g., use `.bg-primary` instead of `.badge-primary`). + +- <span class="badge bg-danger">Breaking</span> Dropped `.badge-pill`—use the `.rounded-pill` utility instead. + +- <span class="badge bg-danger">Breaking</span> Removed hover and focus styles for `<a>` and `<button>` elements. + +- Increased default padding for badges from `.25em`/`.5em` to `.35em`/`.65em`. + +### Breadcrumbs + +- Simplified the default appearance of breadcrumbs by removing `padding`, `background-color`, and `border-radius`. + +- Added new CSS custom property `--bs-breadcrumb-divider` for easy customization without needing to recompile CSS. + +### Buttons + +- <span class="badge bg-danger">Breaking</span> **[Toggle buttons](https://getbootstrap.com/docs/5.0/forms/checks-radios/#toggle-buttons), with checkboxes or radios, no longer require JavaScript and have new markup.** We no longer require a wrapping element, add `.btn-check` to the `<input>`, and pair it with any `.btn` classes on the `<label>`. [See #30650](https://github.com/twbs/bootstrap/pull/30650). _The docs for this has moved from our Buttons page to the new Forms section._ + +- <span class="badge bg-danger">Breaking</span> **Dropped `.btn-block` for utilities.** Instead of using `.btn-block` on the `.btn`, wrap your buttons with `.d-grid` and a `.gap-*` utility to space them as needed. Switch to responsive classes for even more control over them. [Read the docs for some examples.](https://getbootstrap.com/docs/5.0/components/buttons/#block-buttons) + +- Updated our `button-variant()` and `button-outline-variant()` mixins to support additional parameters. + +- Updated buttons to ensure increased contrast on hover and active states. + +- Disabled buttons now have `pointer-events: none;`. + +### Card + +- <span class="badge bg-danger">Breaking</span> Dropped `.card-deck` in favor of our grid. Wrap your cards in column classes and add a parent `.row-cols-*` container to recreate card decks (but with more control over responsive alignment). + +- <span class="badge bg-danger">Breaking</span> Dropped `.card-columns` in favor of Masonry. [See #28922](https://github.com/twbs/bootstrap/pull/28922). + +- <span class="badge bg-danger">Breaking</span> Replaced the `.card` based accordion with a [new Accordion component]({{< docsref "/components/accordion" >}}). + +### Carousel + +- Added new [`.carousel-dark` variant]({{< docsref "/components/carousel#dark-variant" >}}) for dark text, controls, and indicators (great for lighter backgrounds). + +- Replaced chevron icons for carousel controls with new SVGs from [Bootstrap Icons]({{< param "icons" >}}). + +### Close button + +- <span class="badge bg-danger">Breaking</span> Renamed `.close` to `.btn-close` for a less generic name. + +- Close buttons now use a `background-image` (embedded SVG) instead of a `×` in the HTML, allowing for easier customization without the need to touch your markup. + +- Added new `.btn-close-white` variant that uses `filter: invert(1)` to enable higher contrast dismiss icons against darker backgrounds. + +### Collapse + +- Removed scroll anchoring for accordions. + +### Dropdowns + +- Added new `.dropdown-menu-dark` variant and associated variables for on-demand dark dropdowns. + +- Added new variable for `$dropdown-padding-x`. + +- Darkened the dropdown divider for improved contrast. + +- <span class="badge bg-danger">Breaking</span> All the events for the dropdown are now triggered on the dropdown toggle button and then bubbled up to the parent element. + +- Dropdown menus now have a `data-bs-popper="static"` attribute set when the positioning of the dropdown is static and `data-bs-popper="none"` when dropdown is in the navbar. This is added by our JavaScript and helps us use custom position styles without interfering with Popper's positioning. + +- <span class="badge bg-danger">Breaking</span> Dropped `flip` option for dropdown plugin in favor of native Popper configuration. You can now disable the flipping behavior by passing an empty array for [`fallbackPlacements`](https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements) option in [flip](https://popper.js.org/docs/v2/modifiers/flip/) modifier. + +- Dropdown menus can now be clickable with a new `autoClose` option to handle the [auto close behavior]({{< docsref "/components/dropdowns#auto-close-behavior" >}}). You can use this option to accept the click inside or outside the dropdown menu to make it interactive. + +- Dropdowns now support `.dropdown-item`s wrapped in `<li>`s. + +### Jumbotron + +- <span class="badge bg-danger">Breaking</span> Dropped the jumbotron component as it can be replicated with utilities. [See our new Jumbotron example for a demo.](https://getbootstrap.com/docs/5.0/examples/jumbotron/) + +### List group + +- Added new [`.list-group-numbered` modifier]({{< docsref "/components/list-group#numbered" >}}) to list groups. + +### Navs and tabs + +- Added new `null` variables for `font-size`, `font-weight`, `color`, and `:hover` `color` to the `.nav-link` class. + +### Navbars + +- <span class="badge bg-danger">Breaking</span> Navbars now require a container within (to drastically simplify spacing requirements and CSS required). + +### Offcanvas + +- Added the new [offcanvas component]({{< docsref "/components/offcanvas" >}}). + +### Pagination + +- Pagination links now have customizable `margin-left` that are dynamically rounded on all corners when separated from one another. + +- Added `transition`s to pagination links. + +### Popovers + +- <span class="badge bg-danger">Breaking</span> Renamed `.arrow` to `.popover-arrow` in our default popover template. + +- Renamed `whiteList` option to `allowList`. + +### Spinners + +- Spinners now honor `prefers-reduced-motion: reduce` by slowing down animations. [See #31882](https://github.com/twbs/bootstrap/pull/31882). + +- Improved spinner vertical alignment. + +### Toasts + +- Toasts can now be [positioned]({{< docsref "/components/toasts#placement" >}}) in a `.toast-container` with the help of [positioning utilities]({{< docsref "/utilities/position" >}}). + +- Changed default toast duration to 5 seconds. + +- Removed `overflow: hidden` from toasts and replaced with proper `border-radius`s with `calc()` functions. + +### Tooltips + +- <span class="badge bg-danger">Breaking</span> Renamed `.arrow` to `.tooltip-arrow` in our default tooltip template. + +- <span class="badge bg-danger">Breaking</span> The default value for the `fallbackPlacements` is changed to `['top', 'right', 'bottom', 'left']` for better placement of popper elements. + +- <span class="badge bg-danger">Breaking</span> Renamed `whiteList` option to `allowList`. + +## Utilities + +- <span class="badge bg-danger">Breaking</span> Renamed several utilities to use logical property names instead of directional names with the addition of RTL support: + - Renamed `.left-*` and `.right-*` to `.start-*` and `.end-*`. + - Renamed `.float-left` and `.float-right` to `.float-start` and `.float-end`. + - Renamed `.border-left` and `.border-right` to `.border-start` and `.border-end`. + - Renamed `.rounded-left` and `.rounded-right` to `.rounded-start` and `.rounded-end`. + - Renamed `.ml-*` and `.mr-*` to `.ms-*` and `.me-*`. + - Renamed `.pl-*` and `.pr-*` to `.ps-*` and `.pe-*`. + - Renamed `.text-left` and `.text-right` to `.text-start` and `.text-end`. + +- <span class="badge bg-danger">Breaking</span> Disabled negative margins by default. + +- Added new `.bg-body` class for quickly setting the `<body>`'s background to additional elements. + +- Added new [position utilities]({{< docsref "/utilities/position#arrange-elements" >}}) for `top`, `right`, `bottom`, and `left`. Values include `0`, `50%`, and `100%` for each property. + +- Added new `.translate-middle-x` & `.translate-middle-y` utilities to horizontally or vertically center absolute/fixed positioned elements. + +- Added new [`border-width` utilities]({{< docsref "/utilities/borders#border-width" >}}). + +- <span class="badge bg-danger">Breaking</span> Renamed `.text-monospace` to `.font-monospace`. + +- <span class="badge bg-danger">Breaking</span> Removed `.text-hide` as it's an antiquated method for hiding text that shouldn't be used anymore. + +- Added `.fs-*` utilities for `font-size` utilities (with RFS enabled). These use the same scale as HTML's default headings (1-6, large to small), and can be modified via Sass map. + +- <span class="badge bg-danger">Breaking</span> Renamed `.font-weight-*` utilities as `.fw-*` for brevity and consistency. + +- <span class="badge bg-danger">Breaking</span> Renamed `.font-style-*` utilities as `.fst-*` for brevity and consistency. + +- Added `.d-grid` to display utilities and new `gap` utilities (`.gap`) for CSS Grid and flexbox layouts. + +- <span class="badge bg-danger">Breaking</span> Removed `.rounded-sm` and `rounded-lg`, and introduced a new scale of classes, `.rounded-0` to `.rounded-3`. [See #31687](https://github.com/twbs/bootstrap/pull/31687). + +- Added new `line-height` utilities: `.lh-1`, `.lh-sm`, `.lh-base` and `.lh-lg`. See [here]({{< docsref "/utilities/text#line-height" >}}). + +- Moved the `.d-none` utility in our CSS to give it more weight over other display utilities. + +- Extended the `.visually-hidden-focusable` helper to also work on containers, using `:focus-within`. + +## Helpers + +- <span class="badge bg-danger">Breaking</span> **Responsive embed helpers have been renamed to [ratio helpers]({{< docsref "/helpers/ratio" >}})** with new class names and improved behaviors, as well as a helpful CSS variable. + - Classes have been renamed to change `by` to `x` in the aspect ratio. For example, `.ratio-16by9` is now `.ratio-16x9`. + - We've dropped the `.embed-responsive-item` and element group selector in favor of a simpler `.ratio > *` selector. No more class is needed, and the ratio helper now works with any HTML element. + - The `$embed-responsive-aspect-ratios` Sass map has been renamed to `$aspect-ratios` and its values have been simplified to include the class name and the percentage as the `key: value` pair. + - CSS variables are now generated and included for each value in the Sass map. Modify the `--bs-aspect-ratio` variable on the `.ratio` to create any [custom aspect ratio]({{< docsref "/helpers/ratio#custom-ratios" >}}). + +- <span class="badge bg-danger">Breaking</span> **"Screen reader" classes are now ["visually hidden" classes]({{< docsref "/helpers/visually-hidden" >}}).** + - Changed the Sass file from `scss/helpers/_screenreaders.scss` to `scss/helpers/_visually-hidden.scss` + - Renamed `.sr-only` and `.sr-only-focusable` to `.visually-hidden` and `.visually-hidden-focusable` + - Renamed `sr-only()` and `sr-only-focusable()` mixins to `visually-hidden()` and `visually-hidden-focusable()`. + +- `bootstrap-utilities.css` now also includes our helpers. Helpers don't need to be imported in custom builds anymore. + +## JavaScript + +- **Dropped jQuery dependency** and rewrote plugins to be in regular JavaScript. + +- <span class="badge bg-danger">Breaking</span> Data attributes for all JavaScript plugins are now namespaced to help distinguish Bootstrap functionality from third parties and your own code. For example, we use `data-bs-toggle` instead of `data-toggle`. + +- **All plugins can now accept a CSS selector as the first argument.** You can either pass a DOM element or any valid CSS selector to create a new instance of the plugin: + + ```js + var modal = new bootstrap.Modal('#myModal') + var dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]') + ``` + +- `popperConfig` can be passed as a function that accepts the Bootstrap's default Popper config as an argument, so that you can merge this default configuration in your way. **Applies to dropdowns, popovers, and tooltips.** + +- The default value for the `fallbackPlacements` is changed to `['top', 'right', 'bottom', 'left']` for better placement of Popper elements. **Applies to dropdowns, popovers, and tooltips.** + +- Removed underscore from public static methods like `_getInstance()` → `getInstance()`. diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/api.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/api.md new file mode 100644 index 000000000..8ffc76caa --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/api.md @@ -0,0 +1,409 @@ +--- +layout: docs +title: Utility API +description: The utility API is a Sass-based tool to generate utility classes. +group: utilities +aliases: "/docs/5.0/utilities/" +toc: true +--- + +Bootstrap utilities are generated with our utility API and can be used to modify or extend our default set of utility classes via Sass. Our utility API is based on a series of Sass maps and functions for generating families of classes with various options. If you're unfamiliar with Sass maps, read up on the [official Sass docs](https://sass-lang.com/documentation/values/maps) to get started. + +The `$utilities` map contains all our utilities and is later merged with your custom `$utilities` map, if present. The utility map contains a keyed list of utility groups which accept the following options: + +{{< bs-table "table text-start" >}} +| Option | Type | Description | +| --- | --- | --- | +| `property` | **Required** | Name of the property, this can be a string or an array of strings (e.g., horizontal paddings or margins). | +| `values` | **Required** | List of values, or a map if you don't want the class name to be the same as the value. If `null` is used as map key, it isn't compiled. | +| `class` | Optional | Variable for the class name if you don't want it to be the same as the property. In case you don't provide the `class` key and `property` key is an array of strings, the class name will be the first element of the `property` array. | +| `state` | Optional | List of pseudo-class variants like `:hover` or `:focus` to generate for the utility. No default value. | +| `responsive` | Optional | Boolean indicating if responsive classes need to be generated. `false` by default. | +| `rfs` | Optional | Boolean to enable fluid rescaling. Have a look at the [RFS]({{< docsref "/getting-started/rfs" >}}) page to find out how this works. `false` by default. | +| `print` | Optional | Boolean indicating if print classes need to be generated. `false` by default. | +| `rtl` | Optional | Boolean indicating if utility should be kept in RTL. `true` by default. | +{{< /bs-table >}} + +## API explained + +All utility variables are added to the `$utilities` variable within our `_utilities.scss` stylesheet. Each group of utilities looks something like this: + +```scss +$utilities: ( + "opacity": ( + property: opacity, + values: ( + 0: 0, + 25: .25, + 50: .5, + 75: .75, + 100: 1, + ) + ) + ); +``` + +Which outputs the following: + +```css +.opacity-0 { opacity: 0; } +.opacity-25 { opacity: .25; } +.opacity-50 { opacity: .5; } +.opacity-75 { opacity: .75; } +.opacity-100 { opacity: 1; } +``` + +### Custom class prefix + +Use the `class` option to change the class prefix used in the compiled CSS: + +```scss +$utilities: ( + "opacity": ( + property: opacity, + class: o, + values: ( + 0: 0, + 25: .25, + 50: .5, + 75: .75, + 100: 1, + ) + ) + ); +``` + +Output: + +```css +.o-0 { opacity: 0; } +.o-25 { opacity: .25; } +.o-50 { opacity: .5; } +.o-75 { opacity: .75; } +.o-100 { opacity: 1; } +``` + +### States + +Use the `state` option to generate pseudo-class variations. Example pseudo-classes are `:hover` and `:focus`. When a list of states are provided, classnames are created for that pseudo-class. For example, to change opacity on hover, add `state: hover` and you'll get `.opacity-hover:hover` in your compiled CSS. + +Need multiple pseudo-classes? Use a space-separated list of states: `state: hover focus`. + +```scss +$utilities: ( + "opacity": ( + property: opacity, + class: opacity, + state: hover, + values: ( + 0: 0, + 25: .25, + 50: .5, + 75: .75, + 100: 1, + ) + ) +); +``` + +Output: + +```css +.opacity-0-hover:hover { opacity: 0 !important; } +.opacity-25-hover:hover { opacity: .25 !important; } +.opacity-50-hover:hover { opacity: .5 !important; } +.opacity-75-hover:hover { opacity: .75 !important; } +.opacity-100-hover:hover { opacity: 1 !important; } +``` + +### Responsive utilities + +Add the `responsive` boolean to generate responsive utilities (e.g., `.opacity-md-25`) across [all breakpoints]({{< docsref "/layout/breakpoints" >}}). + +```scss +$utilities: ( + "opacity": ( + property: opacity, + responsive: true, + values: ( + 0: 0, + 25: .25, + 50: .5, + 75: .75, + 100: 1, + ) + ) + ); +``` + +Output: + +```css +.opacity-0 { opacity: 0 !important; } +.opacity-25 { opacity: .25 !important; } +.opacity-50 { opacity: .5 !important; } +.opacity-75 { opacity: .75 !important; } +.opacity-100 { opacity: 1 !important; } + +@media (min-width: 576px) { + .opacity-sm-0 { opacity: 0 !important; } + .opacity-sm-25 { opacity: .25 !important; } + .opacity-sm-50 { opacity: .5 !important; } + .opacity-sm-75 { opacity: .75 !important; } + .opacity-sm-100 { opacity: 1 !important; } +} + +@media (min-width: 768px) { + .opacity-md-0 { opacity: 0 !important; } + .opacity-md-25 { opacity: .25 !important; } + .opacity-md-50 { opacity: .5 !important; } + .opacity-md-75 { opacity: .75 !important; } + .opacity-md-100 { opacity: 1 !important; } +} + +@media (min-width: 992px) { + .opacity-lg-0 { opacity: 0 !important; } + .opacity-lg-25 { opacity: .25 !important; } + .opacity-lg-50 { opacity: .5 !important; } + .opacity-lg-75 { opacity: .75 !important; } + .opacity-lg-100 { opacity: 1 !important; } +} + +@media (min-width: 1200px) { + .opacity-xl-0 { opacity: 0 !important; } + .opacity-xl-25 { opacity: .25 !important; } + .opacity-xl-50 { opacity: .5 !important; } + .opacity-xl-75 { opacity: .75 !important; } + .opacity-xl-100 { opacity: 1 !important; } +} + +@media (min-width: 1400px) { + .opacity-xxl-0 { opacity: 0 !important; } + .opacity-xxl-25 { opacity: .25 !important; } + .opacity-xxl-50 { opacity: .5 !important; } + .opacity-xxl-75 { opacity: .75 !important; } + .opacity-xxl-100 { opacity: 1 !important; } +} +``` + +### Changing utilities + +Override existing utilities by using the same key. For example, if you want additional responsive overflow utility classes, you can do this: + +```scss +$utilities: ( + "overflow": ( + responsive: true, + property: overflow, + values: visible hidden scroll auto, + ), +); +``` + +### Print utilities + +Enabling the `print` option will **also** generate utility classes for print, which are only applied within the `@media print { ... }` media query. + +```scss +$utilities: ( + "opacity": ( + property: opacity, + print: true, + values: ( + 0: 0, + 25: .25, + 50: .5, + 75: .75, + 100: 1, + ) + ) + ); +``` + +Output: + +```css +.opacity-0 { opacity: 0 !important; } +.opacity-25 { opacity: .25 !important; } +.opacity-50 { opacity: .5 !important; } +.opacity-75 { opacity: .75 !important; } +.opacity-100 { opacity: 1 !important; } + +@media print { + .opacity-print-0 { opacity: 0 !important; } + .opacity-print-25 { opacity: .25 !important; } + .opacity-print-50 { opacity: .5 !important; } + .opacity-print-75 { opacity: .75 !important; } + .opacity-print-100 { opacity: 1 !important; } +} +``` + +## Importance + +All utilities generated by the API include `!important` to ensure they override components and modifier classes as intended. You can toggle this setting globally with the `$enable-important-utilities` variable (defaults to `true`). + +## Using the API + +Now that you're familiar with how the utilities API works, learn how to add your own custom classes and modify our default utilities. + +### Add utilities + +New utilities can be added to the default `$utilities` map with a `map-merge`. Make sure our required Sass files and `_utilities.scss` are imported first, then use the `map-merge` to add your additional utilities. For example, here's how to add a responsive `cursor` utility with three values. + +```scss +@import "bootstrap/scss/functions"; +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/utilities"; + +$utilities: map-merge( + $utilities, + ( + "cursor": ( + property: cursor, + class: cursor, + responsive: true, + values: auto pointer grab, + ) + ) +); +``` + +### Modify utilities + +Modify existing utilities in the default `$utilities` map with `map-get` and `map-merge` functions. In the example below, we're adding an additional value to the `width` utilities. Start with an initial `map-merge` and then specify which utility you want to modify. From there, fetch the nested `"width"` map with `map-get` to access and modify the utility's options and values. + +```scss +@import "bootstrap/scss/functions"; +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/utilities"; + +$utilities: map-merge( + $utilities, + ( + "width": map-merge( + map-get($utilities, "width"), + ( + values: map-merge( + map-get(map-get($utilities, "width"), "values"), + (10: 10%), + ), + ), + ), + ) +); +``` + +#### Enable responsive + +You can enable responsive classes for an existing set of utilities that are not currently responsive by default. For example, to make the `border` classes responsive: + +```scss +@import "bootstrap/scss/functions"; +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/utilities"; + +$utilities: map-merge( + $utilities, ( + "border": map-merge( + map-get($utilities, "border"), + ( responsive: true ), + ), + ) +); +``` + +This will now generate responsive variations of `.border` and `.border-0` for each breakpoint. Your generated CSS will look like this: + +```css +.border { ... } +.border-0 { ... } + +@media (min-width: 576px) { + .border-sm { ... } + .border-sm-0 { ... } +} + +@media (min-width: 768px) { + .border-md { ... } + .border-md-0 { ... } +} + +@media (min-width: 992px) { + .border-lg { ... } + .border-lg-0 { ... } +} + +@media (min-width: 1200px) { + .border-xl { ... } + .border-xl-0 { ... } +} + +@media (min-width: 1400px) { + .border-xxl { ... } + .border-xxl-0 { ... } +} +``` + +#### Rename utilities + +Missing v4 utilities, or used to another naming convention? The utilities API can be used to override the resulting `class` of a given utility—for example, to rename `.ms-*` utilities to oldish `.ml-*`: + +```scss +@import "bootstrap/scss/functions"; +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/utilities"; + +$utilities: map-merge( + $utilities, ( + "margin-start": map-merge( + map-get($utilities, "margin-start"), + ( class: ml ), + ), + ) +); +``` + +### Remove utilities + +Remove any of the default utilities by setting the group key to `null`. For example, to remove all our `width` utilities, create a `$utilities` `map-merge` and add `"width": null` within. + +```scss +@import "bootstrap/scss/functions"; +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/utilities"; + +$utilities: map-merge( + $utilities, + ( + "width": null + ) +); +``` + +#### Remove utility in RTL + +Some edge cases make [RTL styling difficult](https://rtlstyling.com/posts/rtl-styling#common-things-that-might-not-work-for-rtl), such as line breaks in Arabic. Thus utilities can be dropped from RTL output by setting the `rtl` option to `false`: + +```scss +$utilities: ( + "word-wrap": ( + property: word-wrap word-break, + class: text, + values: (break: break-word), + rtl: false + ), +); +``` + +Output: + +```css +/* rtl:begin:remove */ +.text-break { + word-wrap: break-word !important; + word-break: break-word !important; +} +/* rtl:end:remove */ +``` + +This doesn't output anything in RTL, thanks to [the RTLCSS `remove` control directive](https://rtlcss.com/learn/usage-guide/control-directives/#remove). diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/background.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/background.md new file mode 100644 index 000000000..7b1b48140 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/background.md @@ -0,0 +1,78 @@ +--- +layout: docs +title: Background +description: Convey meaning through `background-color` and add decoration with gradients. +group: utilities +toc: true +--- + +## Background color + +Similar to the contextual text color classes, set the background of an element to any contextual class. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` [color utilities]({{< docsref "/utilities/colors" >}}). + +{{< example >}} +{{< colors.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<div class="p-3 mb-2 bg-{{ .name }}{{ if .contrast_color }} text-{{ .contrast_color }}{{ else }} text-white{{ end }}">.bg-{{ .name }}</div> +{{- end -}} +{{< /colors.inline >}} +<div class="p-3 mb-2 bg-body text-dark">.bg-body</div> +<div class="p-3 mb-2 bg-white text-dark">.bg-white</div> +<div class="p-3 mb-2 bg-transparent text-dark">.bg-transparent</div> +{{< /example >}} + +## Background gradient + +By adding a `.bg-gradient` class, a linear gradient is added as background image to the backgrounds. This gradient starts with a semi-transparent white which fades out to the bottom. + +Do you need a gradient in your custom CSS? Just add `background-image: var(--bs-gradient);`. + +{{< markdown >}} +{{< colors.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<div class="p-3 mb-2 bg-{{ .name }} bg-gradient{{ with .contrast_color }} text-{{ . }}{{ else }} text-white{{ end }}">.bg-{{ .name }}.bg-gradient</div> +{{- end -}} +{{< /colors.inline >}} +{{< /markdown >}} + +## Sass + +In addition to the following Sass functionality, consider reading about our included [CSS custom properties]({{< docsref "/customize/css-variables" >}}) (aka CSS variables) for colors and more. + +### Variables + +Most `background-color` utilities are generated by our theme colors, reassigned from our generic color palette variables. + +{{< scss-docs name="color-variables" file="scss/_variables.scss" >}} + +{{< scss-docs name="theme-color-variables" file="scss/_variables.scss" >}} + +{{< scss-docs name="variable-gradient" file="scss/_variables.scss" >}} + +Grayscale colors are also available, but only a subset are used to generate any utilities. + +{{< scss-docs name="gray-color-variables" file="scss/_variables.scss" >}} + +### Map + +Theme colors are then put into a Sass map so we can loop over them to generate our utilities, component modifiers, and more. + +{{< scss-docs name="theme-colors-map" file="scss/_variables.scss" >}} + +Grayscale colors are also available as a Sass map. **This map is not used to generate any utilities.** + +{{< scss-docs name="gray-colors-map" file="scss/_variables.scss" >}} + +### Mixins + +**No mixins are used to generate our background utilities**, but we do have some additional mixins for other situations where you'd like to create your own gradients. + +{{< scss-docs name="gradient-bg-mixin" file="scss/mixins/_gradients.scss" >}} + +{{< scss-docs name="gradient-mixins" file="scss/mixins/_gradients.scss" >}} + +### Utilities API + +Background utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-bg-color" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/borders.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/borders.md new file mode 100644 index 000000000..6ba1174c9 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/borders.md @@ -0,0 +1,99 @@ +--- +layout: docs +title: Borders +description: Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element. +group: utilities +toc: true +--- + +## Border + +Use border utilities to add or remove an element's borders. Choose from all borders or one at a time. + +### Additive + +{{< example class="bd-example-border-utils" >}} +<span class="border"></span> +<span class="border-top"></span> +<span class="border-end"></span> +<span class="border-bottom"></span> +<span class="border-start"></span> +{{< /example >}} + +### Subtractive + +{{< example class="bd-example-border-utils bd-example-border-utils-0" >}} +<span class="border-0"></span> +<span class="border-top-0"></span> +<span class="border-end-0"></span> +<span class="border-bottom-0"></span> +<span class="border-start-0"></span> +{{< /example >}} + +## Border color + +Change the border color using utilities built on our theme colors. + +{{< example class="bd-example-border-utils" >}} +{{< border.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<span class="border border-{{ .name }}"></span> +{{- end -}} +{{< /border.inline >}} +<span class="border border-white"></span> +{{< /example >}} + +## Border-width + +{{< example class="bd-example-border-utils" >}} +<span class="border border-1"></span> +<span class="border border-2"></span> +<span class="border border-3"></span> +<span class="border border-4"></span> +<span class="border border-5"></span> +{{< /example >}} + +## Border-radius + +Add classes to an element to easily round its corners. + +{{< example class="bd-example-rounded-utils" >}} +{{< placeholder width="75" height="75" class="rounded" title="Example rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-top" title="Example top rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-end" title="Example right rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-bottom" title="Example bottom rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-start" title="Example left rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-circle" title="Completely round image" >}} +{{< placeholder width="150" height="75" class="rounded-pill" title="Rounded pill image" >}} +{{< /example >}} + +### Sizes + +Use the scaling classes for larger or smaller rounded corners. Sizes range from `0` to `3`, and can be configured by modifying the utilities API. + +{{< example class="bd-example-rounded-utils" >}} +{{< placeholder width="75" height="75" class="rounded-0" title="Example non-rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-1" title="Example small rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-2" title="Example default rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-3" title="Example large rounded image" >}} +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="border-variables" file="scss/_variables.scss" >}} + +{{< scss-docs name="border-radius-variables" file="scss/_variables.scss" >}} + +### Mixins + +{{< scss-docs name="border-radius-mixins" file="scss/mixins/_border-radius.scss" >}} + +### Utilities API + +Border utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-borders" file="scss/_utilities.scss" >}} + +{{< scss-docs name="utils-border-radius" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/colors.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/colors.md new file mode 100644 index 000000000..266f671f6 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/colors.md @@ -0,0 +1,64 @@ +--- +layout: docs +title: Colors +description: Convey meaning through `color` with a handful of color utility classes. Includes support for styling links with hover states, too. +group: utilities +toc: true +--- + +## Colors + +Colorize text with color utilities. If you want to colorize links, you can use the [`.link-*` helper classes]({{< docsref "/helpers/colored-links" >}}) which have `:hover` and `:focus` states. + +{{< example >}} +{{< colors.inline >}} +{{- range (index $.Site.Data "theme-colors") }} +<p class="text-{{ .name }}{{ with .contrast_color }} bg-{{ . }}{{ end }}">.text-{{ .name }}</p> +{{- end -}} +{{< /colors.inline >}} +<p class="text-body">.text-body</p> +<p class="text-muted">.text-muted</p> +<p class="text-white bg-dark">.text-white</p> +<p class="text-black-50">.text-black-50</p> +<p class="text-white-50 bg-dark">.text-white-50</p> +{{< /example >}} + +{{< callout info >}} +{{< partial "callout-warning-color-assistive-technologies.md" >}} +{{< /callout >}} + +## Specificity + +Sometimes contextual classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a `<div>` or more semantic element with the desired class. + +## Sass + +In addition to the following Sass functionality, consider reading about our included [CSS custom properties]({{< docsref "/customize/css-variables" >}}) (aka CSS variables) for colors and more. + +### Variables + +Most `color` utilities are generated by our theme colors, reassigned from our generic color palette variables. + +{{< scss-docs name="color-variables" file="scss/_variables.scss" >}} + +{{< scss-docs name="theme-color-variables" file="scss/_variables.scss" >}} + +Grayscale colors are also available, but only a subset are used to generate any utilities. + +{{< scss-docs name="gray-color-variables" file="scss/_variables.scss" >}} + +### Map + +Theme colors are then put into a Sass map so we can loop over them to generate our utilities, component modifiers, and more. + +{{< scss-docs name="theme-colors-map" file="scss/_variables.scss" >}} + +Grayscale colors are also available as a Sass map. **This map is not used to generate any utilities.** + +{{< scss-docs name="gray-colors-map" file="scss/_variables.scss" >}} + +### Utilities API + +Color utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-color" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/display.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/display.md index f5ef2bb74..9e5a5dfb2 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/display.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/display.md @@ -12,28 +12,29 @@ Change the value of the [`display` property](https://developer.mozilla.org/en-US ## Notation -Display utility classes that apply to all [breakpoints]({{< docsref "/layout/overview#responsive-breakpoints" >}}), from `xs` to `xl`, have no breakpoint abbreviation in them. This is because those classes are applied from `min-width: 0;` and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation. +Display utility classes that apply to all [breakpoints]({{< docsref "/layout/breakpoints" >}}), from `xs` to `xxl`, have no breakpoint abbreviation in them. This is because those classes are applied from `min-width: 0;` and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation. As such, the classes are named using the format: -* `.d-{value}` for `xs` -* `.d-{breakpoint}-{value}` for `sm`, `md`, `lg`, and `xl`. +- `.d-{value}` for `xs` +- `.d-{breakpoint}-{value}` for `sm`, `md`, `lg`, `xl`, and `xxl`. Where *value* is one of: -* `none` -* `inline` -* `inline-block` -* `block` -* `table` -* `table-cell` -* `table-row` -* `flex` -* `inline-flex` +- `none` +- `inline` +- `inline-block` +- `block` +- `grid` +- `table` +- `table-cell` +- `table-row` +- `flex` +- `inline-flex` The display values can be altered by changing the `$displays` variable and recompiling the SCSS. -The media queries affect screen widths with the given breakpoint *or larger*. For example, `.d-lg-none` sets `display: none;` on both `lg` and `xl` screens. +The media queries affect screen widths with the given breakpoint *or larger*. For example, `.d-lg-none` sets `display: none;` on `lg`, `xl`, and `xxl` screens. ## Examples @@ -51,24 +52,76 @@ The media queries affect screen widths with the given breakpoint *or larger*. Fo For faster mobile-friendly development, use responsive display classes for showing and hiding elements by device. Avoid creating entirely different versions of the same site, instead hide elements responsively for each screen size. -To hide elements simply use the `.d-none` class or one of the `.d-{sm,md,lg,xl}-none` classes for any responsive screen variation. - -To show an element only on a given interval of screen sizes you can combine one `.d-*-none` class with a `.d-*-*` class, for example `.d-none .d-md-block .d-xl-none` will hide the element for all screen sizes except on medium and large devices. - -| Screen Size | Class | -| --- | --- | -| Hidden on all | `.d-none` | -| Hidden only on xs | `.d-none .d-sm-block` | -| Hidden only on sm | `.d-sm-none .d-md-block` | -| Hidden only on md | `.d-md-none .d-lg-block` | -| Hidden only on lg | `.d-lg-none .d-xl-block` | -| Hidden only on xl | `.d-xl-none` | -| Visible on all | `.d-block` | -| Visible only on xs | `.d-block .d-sm-none` | -| Visible only on sm | `.d-none .d-sm-block .d-md-none` | -| Visible only on md | `.d-none .d-md-block .d-lg-none` | -| Visible only on lg | `.d-none .d-lg-block .d-xl-none` | -| Visible only on xl | `.d-none .d-xl-block` | +To hide elements simply use the `.d-none` class or one of the `.d-{sm,md,lg,xl,xxl}-none` classes for any responsive screen variation. + +To show an element only on a given interval of screen sizes you can combine one `.d-*-none` class with a `.d-*-*` class, for example `.d-none .d-md-block .d-xl-none .d-xxl-none` will hide the element for all screen sizes except on medium and large devices. + +<table class="table"> + <thead> + <tr> + <th>Screen size</th> + <th>Class</th> + </tr> + </thead> + <tbody> + <tr> + <td>Hidden on all</td> + <td><code>.d-none</code></td> + </tr> + <tr> + <td>Hidden only on xs</td> + <td><code>.d-none .d-sm-block</code></td> + </tr> + <tr> + <td>Hidden only on sm</td> + <td><code>.d-sm-none .d-md-block</code></td> + </tr> + <tr> + <td>Hidden only on md</td> + <td><code>.d-md-none .d-lg-block</code></td> + </tr> + <tr> + <td>Hidden only on lg</td> + <td><code>.d-lg-none .d-xl-block</code></td> + </tr> + <tr> + <td>Hidden only on xl</td> + <td><code>.d-xl-none .d-xxl-block</code></td> + </tr> + <tr> + <td>Hidden only on xxl</td> + <td><code>.d-xxl-none</code></td> + </tr> + <tr> + <td>Visible on all</td> + <td><code>.d-block</code></td> + </tr> + <tr> + <td>Visible only on xs</td> + <td><code>.d-block .d-sm-none</code></td> + </tr> + <tr> + <td>Visible only on sm</td> + <td><code>.d-none .d-sm-block .d-md-none</code></td> + </tr> + <tr> + <td>Visible only on md</td> + <td><code>.d-none .d-md-block .d-lg-none</code></td> + </tr> + <tr> + <td>Visible only on lg</td> + <td><code>.d-none .d-lg-block .d-xl-none</code></td> + </tr> + <tr> + <td>Visible only on xl</td> + <td><code>.d-none .d-xl-block .d-xxl-none</code></td> + </tr> + <tr> + <td>Visible only on xxl</td> + <td><code>.d-none .d-xxl-block</code></td> + </tr> + </tbody> +</table> {{< example >}} <div class="d-lg-none">hide on lg and wider screens</div> @@ -83,6 +136,7 @@ Change the `display` value of elements when printing with our print display util - `.d-print-inline` - `.d-print-inline-block` - `.d-print-block` +- `.d-print-grid` - `.d-print-table` - `.d-print-table-row` - `.d-print-table-cell` @@ -96,3 +150,11 @@ The print and display classes can be combined. <div class="d-none d-print-block">Print Only (Hide on screen only)</div> <div class="d-none d-lg-block d-print-block">Hide up to large on screen, but always show on print</div> {{< /example >}} + +## Sass + +### Utilities API + +Display utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-display" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/flex.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/flex.md index 5cdadb762..bbb1824b4 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/flex.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/flex.md @@ -78,7 +78,7 @@ Responsive variations also exist for `flex-direction`. ## Justify content -Use `justify-content` utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if `flex-direction: column`). Choose from `start` (browser default), `end`, `center`, `between`, or `around`. +Use `justify-content` utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if `flex-direction: column`). Choose from `start` (browser default), `end`, `center`, `between`, `around`, or `evenly`. <div class="bd-example"> <div class="d-flex justify-content-start bd-highlight mb-3"> @@ -101,7 +101,12 @@ Use `justify-content` utilities on flexbox containers to change the alignment of <div class="p-2 bd-highlight">Flex item</div> <div class="p-2 bd-highlight">Flex item</div> </div> - <div class="d-flex justify-content-around bd-highlight"> + <div class="d-flex justify-content-around bd-highlight mb-3"> + <div class="p-2 bd-highlight">Flex item</div> + <div class="p-2 bd-highlight">Flex item</div> + <div class="p-2 bd-highlight">Flex item</div> + </div> + <div class="d-flex justify-content-evenly bd-highlight"> <div class="p-2 bd-highlight">Flex item</div> <div class="p-2 bd-highlight">Flex item</div> <div class="p-2 bd-highlight">Flex item</div> @@ -114,6 +119,7 @@ Use `justify-content` utilities on flexbox containers to change the alignment of <div class="d-flex justify-content-center">...</div> <div class="d-flex justify-content-between">...</div> <div class="d-flex justify-content-around">...</div> +<div class="d-flex justify-content-evenly">...</div> ``` Responsive variations also exist for `justify-content`. @@ -126,6 +132,7 @@ Responsive variations also exist for `justify-content`. - `.justify-content{{ .abbr }}-center` - `.justify-content{{ .abbr }}-between` - `.justify-content{{ .abbr }}-around` +- `.justify-content{{ .abbr }}-evenly` {{- end -}} {{< /flex.inline >}} {{< /markdown >}} @@ -294,9 +301,7 @@ Responsive variations also exist for `flex-grow` and `flex-shrink`. ## Auto margins -Flexbox can do some pretty awesome things when you mix flex alignments with auto margins. Shown below are three examples of controlling flex items via auto margins: default (no auto margin), pushing two items to the right (`.mr-auto`), and pushing two items to the left (`.ml-auto`). - -**Unfortunately, IE10 and IE11 do not properly support auto margins on flex items whose parent has a non-default `justify-content` value.** [See this StackOverflow answer](https://stackoverflow.com/a/37535548) for more details. +Flexbox can do some pretty awesome things when you mix flex alignments with auto margins. Shown below are three examples of controlling flex items via auto margins: default (no auto margin), pushing two items to the right (`.me-auto`), and pushing two items to the left (`.ms-auto`). {{< example >}} <div class="d-flex bd-highlight mb-3"> @@ -306,7 +311,7 @@ Flexbox can do some pretty awesome things when you mix flex alignments with auto </div> <div class="d-flex bd-highlight mb-3"> - <div class="mr-auto p-2 bd-highlight">Flex item</div> + <div class="me-auto p-2 bd-highlight">Flex item</div> <div class="p-2 bd-highlight">Flex item</div> <div class="p-2 bd-highlight">Flex item</div> </div> @@ -314,7 +319,7 @@ Flexbox can do some pretty awesome things when you mix flex alignments with auto <div class="d-flex bd-highlight mb-3"> <div class="p-2 bd-highlight">Flex item</div> <div class="p-2 bd-highlight">Flex item</div> - <div class="ml-auto p-2 bd-highlight">Flex item</div> + <div class="ms-auto p-2 bd-highlight">Flex item</div> </div> {{< /example >}} @@ -423,7 +428,7 @@ Responsive variations also exist for `flex-wrap`. ## Order -Change the _visual_ order of specific flex items with a handful of `order` utilities. We only provide options for making an item first or last, as well as a reset to use the DOM order. As `order` takes any integer value (e.g., `5`), add custom CSS for any additional values needed. +Change the _visual_ order of specific flex items with a handful of `order` utilities. We only provide options for making an item first or last, as well as a reset to use the DOM order. As `order` takes any integer value from 0 to 5, add custom CSS for any additional values needed. {{< example >}} <div class="d-flex flex-nowrap bd-highlight"> @@ -438,13 +443,24 @@ Responsive variations also exist for `order`. {{< markdown >}} {{< flex.inline >}} {{- range $bp := $.Site.Data.breakpoints -}} -{{- range (seq 0 12) }} +{{- range (seq 0 5) }} - `.order{{ $bp.abbr }}-{{ . }}` {{- end -}} {{- end -}} {{< /flex.inline >}} {{< /markdown >}} +Additionally there are also responsive `.order-first` and `.order-last` classes that change the `order` of an element by applying `order: -1` and `order: 6`, respectively. + +{{< markdown >}} +{{< flex.inline >}} +{{- range $bp := $.Site.Data.breakpoints -}} +{{- range (slice "first" "last") }} +- `.order{{ $bp.abbr }}-{{ . }}` +{{- end -}} +{{- end -}} +{{< /flex.inline >}} +{{< /markdown >}} ## Align content @@ -611,3 +627,39 @@ Responsive variations also exist for `align-content`. {{- end -}} {{< /flex.inline >}} {{< /markdown >}} + +## Media object + +Looking to replicate the [media object component](https://getbootstrap.com/docs/4.6/components/media-object/) from Bootstrap 4? Recreate it in no time with a few flex utilities that allow even more flexibility and customization than before. + +{{< example >}} +<div class="d-flex"> + <div class="flex-shrink-0"> + {{< placeholder width="100" height="100" color="#999" background="#e5e5e5" text="Image" >}} + </div> + <div class="flex-grow-1 ms-3"> + This is some content from a media component. You can replace this with any content and adjust it as needed. + </div> +</div> +{{< /example >}} + +And say you want to vertically center the content next to the image: + +{{< example >}} +<div class="d-flex align-items-center"> + <div class="flex-shrink-0"> + {{< placeholder width="100" height="100" color="#999" background="#e5e5e5" text="Image" >}} + </div> + <div class="flex-grow-1 ms-3"> + This is some content from a media component. You can replace this with any content and adjust it as needed. + </div> +</div> +{{< /example >}} + +## Sass + +### Utilities API + +Flexbox utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-flex" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/float.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/float.md index be35d729d..a18c21471 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/float.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/float.md @@ -10,51 +10,39 @@ toc: true These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` property](https://developer.mozilla.org/en-US/docs/Web/CSS/float). `!important` is included to avoid specificity issues. These use the same viewport breakpoints as our grid system. Please be aware float utilities have no effect on flex items. -## Classes - -Toggle a float with a class: - {{< example >}} -<div class="float-left">Float left on all viewport sizes</div><br> -<div class="float-right">Float right on all viewport sizes</div><br> +<div class="float-start">Float start on all viewport sizes</div><br> +<div class="float-end">Float end on all viewport sizes</div><br> <div class="float-none">Don't float on all viewport sizes</div> {{< /example >}} -## Mixins - -Or by Sass mixin: - -```scss -.element { - @include float-left; -} -.another-element { - @include float-right; -} -.one-more { - @include float-none; -} -``` - ## Responsive Responsive variations also exist for each `float` value. {{< example >}} -<div class="float-sm-left">Float left on viewports sized SM (small) or wider</div><br> -<div class="float-md-left">Float left on viewports sized MD (medium) or wider</div><br> -<div class="float-lg-left">Float left on viewports sized LG (large) or wider</div><br> -<div class="float-xl-left">Float left on viewports sized XL (extra-large) or wider</div><br> +<div class="float-sm-start">Float start on viewports sized SM (small) or wider</div><br> +<div class="float-md-start">Float start on viewports sized MD (medium) or wider</div><br> +<div class="float-lg-start">Float start on viewports sized LG (large) or wider</div><br> +<div class="float-xl-start">Float start on viewports sized XL (extra-large) or wider</div><br> {{< /example >}} -Here are all the support classes; +Here are all the support classes: {{< markdown >}} {{< float.inline >}} {{- range $.Site.Data.breakpoints }} -- `.float{{ .abbr }}-left` -- `.float{{ .abbr }}-right` +- `.float{{ .abbr }}-start` +- `.float{{ .abbr }}-end` - `.float{{ .abbr }}-none` {{- end -}} {{< /float.inline >}} {{< /markdown >}} + +## Sass + +### Utilities API + +Float utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-float" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/interactions.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/interactions.md new file mode 100644 index 000000000..b95b98a10 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/interactions.md @@ -0,0 +1,39 @@ +--- +layout: docs +title: Interactions +description: Utility classes that change how users interact with contents of a website. +group: utilities +toc: false +--- + +## Text selection + +Change the way in which the content is selected when the user interacts with it. + +{{< example >}} +<p class="user-select-all">This paragraph will be entirely selected when clicked by the user.</p> +<p class="user-select-auto">This paragraph has default select behavior.</p> +<p class="user-select-none">This paragraph will not be selectable when clicked by the user.</p> +{{< /example >}} + +## Pointer events + +Bootstrap provides `.pe-none` and `.pe-auto` classes to prevent or add element interactions. + +{{< example >}} +<p><a href="#" class="pe-none" tabindex="-1" aria-disabled="true">This link</a> can not be clicked.</p> +<p><a href="#" class="pe-auto">This link</a> can be clicked (this is default behavior).</p> +<p class="pe-none"><a href="#" tabindex="-1" aria-disabled="true">This link</a> can not be clicked because the <code>pointer-events</code> property is inherited from its parent. However, <a href="#" class="pe-auto">this link</a> has a <code>pe-auto</code> class and can be clicked.</p> +{{< /example >}} + +{{< callout warning >}} +The `.pe-none` class (and the `pointer-events` CSS property it sets) only prevents interactions with a pointer (mouse, stylus, touch). Links and controls with `.pe-none` are, by default, still focusable and actionable for keyboard users. To ensure that they are completely neutralized even for keyboard users, you may need to add further attributes such as `tabindex="-1"` (to prevent them from receiving keyboard focus) and `aria-disabled="true"` (to convey the fact they are effectively disabled to assistive technologies), and possibly use JavaScript to completely prevent them from being actionable. For form controls, consider using the `disabled` HTML attribute instead. +{{< /callout >}} + +## Sass + +### Utilities API + +Interaction utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-interaction" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/overflow.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/overflow.md new file mode 100644 index 000000000..a36374cd5 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/overflow.md @@ -0,0 +1,40 @@ +--- +layout: docs +title: Overflow +description: Use these shorthand utilities for quickly configuring how content overflows an element. +group: utilities +--- + +Adjust the `overflow` property on the fly with four default values and classes. These classes are not responsive by default. + +<div class="bd-example d-md-flex"> + <div class="overflow-auto p-3 mb-3 mb-md-0 me-md-3 bg-light" style="max-width: 260px; max-height: 100px;"> + This is an example of using <code>.overflow-auto</code> on an element with set width and height dimensions. By design, this content will vertically scroll. + </div> + <div class="overflow-hidden p-3 mb-3 mb-md-0 me-md-3 bg-light" style="max-width: 260px; max-height: 100px;"> + This is an example of using <code>.overflow-hidden</code> on an element with set width and height dimensions. + </div> + <div class="overflow-visible p-3 mb-3 mb-md-0 me-md-3 bg-light" style="max-width: 260px; max-height: 100px;"> + This is an example of using <code>.overflow-visible</code> on an element with set width and height dimensions. + </div> + <div class="overflow-scroll p-3 bg-light" style="max-width: 260px; max-height: 100px;"> + This is an example of using <code>.overflow-scroll</code> on an element with set width and height dimensions. + </div> +</div> + +```html +<div class="overflow-auto">...</div> +<div class="overflow-hidden">...</div> +<div class="overflow-visible">...</div> +<div class="overflow-scroll">...</div> +``` + +Using Sass variables, you may customize the overflow utilities by changing the `$overflows` variable in `_variables.scss`. + +## Sass + +### Utilities API + +Overflow utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-overflow" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/position.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/position.md new file mode 100644 index 000000000..46e62dd36 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/position.md @@ -0,0 +1,130 @@ +--- +layout: docs +title: Position +description: Use these shorthand utilities for quickly configuring the position of an element. +group: utilities +toc: true +--- + +## Position values + +Quick positioning classes are available, though they are not responsive. + +```html +<div class="position-static">...</div> +<div class="position-relative">...</div> +<div class="position-absolute">...</div> +<div class="position-fixed">...</div> +<div class="position-sticky">...</div> +``` + +## Arrange elements + +Arrange elements easily with the edge positioning utilities. The format is `{property}-{position}`. + +Where *property* is one of: + +- `top` - for the vertical `top` position +- `start` - for the horizontal `left` position (in LTR) +- `bottom` - for the vertical `bottom` position +- `end` - for the horizontal `right` position (in LTR) + +Where *position* is one of: + +- `0` - for `0` edge position +- `50` - for `50%` edge position +- `100` - for `100%` edge position + +(You can add more position values by adding entries to the `$position-values` Sass map variable.) + +{{< example class="bd-example-position-utils" >}} +<div class="position-relative"> + <div class="position-absolute top-0 start-0"></div> + <div class="position-absolute top-0 end-0"></div> + <div class="position-absolute top-50 start-50"></div> + <div class="position-absolute bottom-50 end-50"></div> + <div class="position-absolute bottom-0 start-0"></div> + <div class="position-absolute bottom-0 end-0"></div> +</div> +{{< /example >}} + +## Center elements + +In addition, you can also center the elements with the transform utility class `.translate-middle`. + +This class applies the transformations `translateX(-50%)` and `translateY(-50%)` to the element which, in combination with the edge positioning utilities, allows you to absolute center an element. + +{{< example class="bd-example-position-utils" >}} +<div class="position-relative"> + <div class="position-absolute top-0 start-0 translate-middle"></div> + <div class="position-absolute top-0 start-50 translate-middle"></div> + <div class="position-absolute top-0 start-100 translate-middle"></div> + <div class="position-absolute top-50 start-0 translate-middle"></div> + <div class="position-absolute top-50 start-50 translate-middle"></div> + <div class="position-absolute top-50 start-100 translate-middle"></div> + <div class="position-absolute top-100 start-0 translate-middle"></div> + <div class="position-absolute top-100 start-50 translate-middle"></div> + <div class="position-absolute top-100 start-100 translate-middle"></div> +</div> +{{< /example >}} + +By adding `.translate-middle-x` or `.translate-middle-y` classes, elements can be positioned only in horizontal or vertical direction. + +{{< example class="bd-example-position-utils" >}} +<div class="position-relative"> + <div class="position-absolute top-0 start-0"></div> + <div class="position-absolute top-0 start-50 translate-middle-x"></div> + <div class="position-absolute top-0 end-0"></div> + <div class="position-absolute top-50 start-0 translate-middle-y"></div> + <div class="position-absolute top-50 start-50 translate-middle"></div> + <div class="position-absolute top-50 end-0 translate-middle-y"></div> + <div class="position-absolute bottom-0 start-0"></div> + <div class="position-absolute bottom-0 start-50 translate-middle-x"></div> + <div class="position-absolute bottom-0 end-0"></div> +</div> +{{< /example >}} + +## Examples + +Here are some real life examples of these classes: + +{{< example class="bd-example-position-examples d-flex justify-content-around" >}} +<button type="button" class="btn btn-primary position-relative"> + Mails <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-secondary">+99 <span class="visually-hidden">unread messages</span></span> +</button> + +<button type="button" class="btn btn-dark position-relative"> + Marker <svg width="1em" height="1em" viewBox="0 0 16 16" class="position-absolute top-100 start-50 translate-middle mt-1 bi bi-caret-down-fill" fill="#212529" xmlns="http://www.w3.org/2000/svg"><path d="M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg> +</button> + +<button type="button" class="btn btn-primary position-relative"> + Alerts <span class="position-absolute top-0 start-100 translate-middle badge border border-light rounded-circle bg-danger p-2"><span class="visually-hidden">unread messages</span></span> +</button> +{{< /example >}} + +You can use these classes with existing components to create new ones. Remember that you can extend its functionality by adding entries to the `$position-values` variable. + +{{< example class="bd-example-position-examples" >}} +<div class="position-relative m-4"> + <div class="progress" style="height: 1px;"> + <div class="progress-bar" role="progressbar" style="width: 50%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div> + </div> + <button type="button" class="position-absolute top-0 start-0 translate-middle btn btn-sm btn-primary rounded-pill" style="width: 2rem; height:2rem;">1</button> + <button type="button" class="position-absolute top-0 start-50 translate-middle btn btn-sm btn-primary rounded-pill" style="width: 2rem; height:2rem;">2</button> + <button type="button" class="position-absolute top-0 start-100 translate-middle btn btn-sm btn-secondary rounded-pill" style="width: 2rem; height:2rem;">3</button> +</div> +{{< /example >}} + +## Sass + +### Maps + +Default position utility values are declared in a Sass map, then used to generate our utilities. + +{{< scss-docs name="position-map" file="scss/_variables.scss" >}} + +### Utilities API + +Position utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-position" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/shadows.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/shadows.md new file mode 100644 index 000000000..bb5ef44ab --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/shadows.md @@ -0,0 +1,30 @@ +--- +layout: docs +title: Shadows +description: Add or remove shadows to elements with box-shadow utilities. +group: utilities +toc: true +--- + +## Examples + +While shadows on components are disabled by default in Bootstrap and can be enabled via `$enable-shadows`, you can also quickly add or remove a shadow with our `box-shadow` utility classes. Includes support for `.shadow-none` and three default sizes (which have associated variables to match). + +{{< example >}} +<div class="shadow-none p-3 mb-5 bg-light rounded">No shadow</div> +<div class="shadow-sm p-3 mb-5 bg-body rounded">Small shadow</div> +<div class="shadow p-3 mb-5 bg-body rounded">Regular shadow</div> +<div class="shadow-lg p-3 mb-5 bg-body rounded">Larger shadow</div> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="box-shadow-variables" file="scss/_variables.scss" >}} + +### Utilities API + +Shadow utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-shadow" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/sizing.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/sizing.md index c5e8654a1..962575ffe 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/sizing.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/sizing.md @@ -8,7 +8,7 @@ toc: true ## Relative to the parent -Width and height utilities are generated from the `$sizes` Sass map in `_variables.scss`. Includes support for `25%`, `50%`, `75%`, `100%`, and `auto` by default. Modify those values as you need to generate different utilities here. +Width and height utilities are generated from the utility API in `_utilities.scss`. Includes support for `25%`, `50%`, `75%`, `100%`, and `auto` by default. Modify those values as you need to generate different utilities here. {{< example >}} <div class="w-25 p-3" style="background-color: #eee;">Width 25%</div> @@ -35,8 +35,8 @@ You can also use `max-width: 100%;` and `max-height: 100%;` utilities as needed. {{< /example >}} {{< example >}} -<div style="height: 100px; background-color: rgba(255,0,0,0.1);"> - <div class="mh-100" style="width: 100px; height: 200px; background-color: rgba(0,0,255,0.1);">Max-height 100%</div> +<div style="height: 100px; background-color: rgba(255,0,0,.1);"> + <div class="mh-100" style="width: 100px; height: 200px; background-color: rgba(0,0,255,.1);">Max-height 100%</div> </div> {{< /example >}} @@ -50,3 +50,11 @@ You can also use utilities to set the width and height relative to the viewport. <div class="vw-100">Width 100vw</div> <div class="vh-100">Height 100vh</div> ``` + +## Sass + +### Utilities API + +Sizing utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-sizing" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/spacing.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/spacing.md new file mode 100644 index 000000000..70fbe7694 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/spacing.md @@ -0,0 +1,125 @@ +--- +layout: docs +title: Spacing +description: Bootstrap includes a wide range of shorthand responsive margin, padding, and gap utility classes to modify an element's appearance. +group: utilities +toc: true +--- + +## Margin and padding + +Assign responsive-friendly `margin` or `padding` values to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties. Classes are built from a default Sass map ranging from `.25rem` to `3rem`. + +Using the CSS Grid layout module? Consider using [the gap utility](#gap). + +### Notation + +Spacing utilities that apply to all breakpoints, from `xs` to `xxl`, have no breakpoint abbreviation in them. This is because those classes are applied from `min-width: 0` and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation. + +The classes are named using the format `{property}{sides}-{size}` for `xs` and `{property}{sides}-{breakpoint}-{size}` for `sm`, `md`, `lg`, `xl`, and `xxl`. + +Where *property* is one of: + +- `m` - for classes that set `margin` +- `p` - for classes that set `padding` + +Where *sides* is one of: + +- `t` - for classes that set `margin-top` or `padding-top` +- `b` - for classes that set `margin-bottom` or `padding-bottom` +- `s` - (start) for classes that set `margin-left` or `padding-left` in LTR, `margin-right` or `padding-right` in RTL +- `e` - (end) for classes that set `margin-right` or `padding-right` in LTR, `margin-left` or `padding-left` in RTL +- `x` - for classes that set both `*-left` and `*-right` +- `y` - for classes that set both `*-top` and `*-bottom` +- blank - for classes that set a `margin` or `padding` on all 4 sides of the element + +Where *size* is one of: + +- `0` - for classes that eliminate the `margin` or `padding` by setting it to `0` +- `1` - (by default) for classes that set the `margin` or `padding` to `$spacer * .25` +- `2` - (by default) for classes that set the `margin` or `padding` to `$spacer * .5` +- `3` - (by default) for classes that set the `margin` or `padding` to `$spacer` +- `4` - (by default) for classes that set the `margin` or `padding` to `$spacer * 1.5` +- `5` - (by default) for classes that set the `margin` or `padding` to `$spacer * 3` +- `auto` - for classes that set the `margin` to auto + +(You can add more sizes by adding entries to the `$spacers` Sass map variable.) + +### Examples + +Here are some representative examples of these classes: + +```scss +.mt-0 { + margin-top: 0 !important; +} + +.ms-1 { + margin-left: ($spacer * .25) !important; +} + +.px-2 { + padding-left: ($spacer * .5) !important; + padding-right: ($spacer * .5) !important; +} + +.p-3 { + padding: $spacer !important; +} +``` + +### Horizontal centering + +Additionally, Bootstrap also includes an `.mx-auto` class for horizontally centering fixed-width block level content—that is, content that has `display: block` and a `width` set—by setting the horizontal margins to `auto`. + +<div class="bd-example"> + <div class="mx-auto" style="width: 200px; background-color: rgba(86,61,124,.15);"> + Centered element + </div> +</div> + +```html +<div class="mx-auto" style="width: 200px;"> + Centered element +</div> +``` + +## Negative margin + +In CSS, `margin` properties can utilize negative values (`padding` cannot). These negative margins are **disabled by default**, but can be enabled in Sass by setting `$enable-negative-margins: true`. + +The syntax is nearly the same as the default, positive margin utilities, but with the addition of `n` before the requested size. Here's an example class that's the opposite of `.mt-1`: + +```scss +.mt-n1 { + margin-top: -0.25rem !important; +} +``` + +## Gap + +When using `display: grid`, you can make use of `gap` utilities on the parent grid container. This can save on having to add margin utilities to individual grid items (children of a `display: grid` container). Gap utilities are responsive by default, and are generated via our utilities API, based on the `$spacers` Sass map. + +{{< example html >}} +<div class="d-grid gap-3"> + <div class="p-2 bg-light border">Grid item 1</div> + <div class="p-2 bg-light border">Grid item 2</div> + <div class="p-2 bg-light border">Grid item 3</div> +</div> +{{< /example >}} + +Support includes responsive options for all of Bootstrap's grid breakpoints, as well as six sizes from the `$spacers` map (`0`–`5`). There is no `.gap-auto` utility class as it's effectively the same as `.gap-0`. + +## Sass + +### Maps + +Spacing utilities are declared via Sass map and then generated with our utilities API. + +{{< scss-docs name="spacer-variables-maps" file="scss/_variables.scss" >}} + +### Utilities API + +Spacing utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-spacing" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/text.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/text.md new file mode 100644 index 000000000..be8e0e1c0 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/text.md @@ -0,0 +1,154 @@ +--- +layout: docs +title: Text +description: Documentation and examples for common text utilities to control alignment, wrapping, weight, and more. +group: utilities +toc: true +--- + +## Text alignment + +Easily realign text to components with text alignment classes. For start, end, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system. + +{{< example >}} +<p class="text-start">Start aligned text on all viewport sizes.</p> +<p class="text-center">Center aligned text on all viewport sizes.</p> +<p class="text-end">End aligned text on all viewport sizes.</p> + +<p class="text-sm-start">Start aligned text on viewports sized SM (small) or wider.</p> +<p class="text-md-start">Start aligned text on viewports sized MD (medium) or wider.</p> +<p class="text-lg-start">Start aligned text on viewports sized LG (large) or wider.</p> +<p class="text-xl-start">Start aligned text on viewports sized XL (extra-large) or wider.</p> +{{< /example >}} + +{{< callout info >}} +Note that we don't provide utility classes for justified text. While, aesthetically, justified text might look more appealing, it does make word-spacing more random and therefore harder to read. +{{< /callout >}} + +## Text wrapping and overflow + +Wrap text with a `.text-wrap` class. + +{{< example >}} +<div class="badge bg-primary text-wrap" style="width: 6rem;"> + This text should wrap. +</div> +{{< /example >}} + +Prevent text from wrapping with a `.text-nowrap` class. + +{{< example >}} +<div class="text-nowrap bd-highlight" style="width: 8rem;"> + This text should overflow the parent. +</div> +{{< /example >}} + +## Word break + +Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-wrap: break-word` and `word-break: break-word`. We use `word-wrap` instead of the more common `overflow-wrap` for wider browser support, and add the deprecated `word-break: break-word` to avoid issues with flex containers. + +{{< example >}} +<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p> +{{< /example >}} + +{{< callout warning >}} +Note that [breaking words isn't possible in Arabic](https://rtlstyling.com/posts/rtl-styling#3.-line-break), which is the most used RTL language. Therefore `.text-break` is removed from our RTL compiled CSS. +{{< /callout >}} + +## Text transform + +Transform text in components with text capitalization classes. + +{{< example >}} +<p class="text-lowercase">Lowercased text.</p> +<p class="text-uppercase">Uppercased text.</p> +<p class="text-capitalize">CapiTaliZed text.</p> +{{< /example >}} + +Note how `.text-capitalize` only changes the first letter of each word, leaving the case of any other letters unaffected. + +## Font size + +Quickly change the `font-size` of text. While our heading classes (e.g., `.h1`–`.h6`) apply `font-size`, `font-weight`, and `line-height`, these utilities _only_ apply `font-size`. Sizing for these utilities matches HTML's heading elements, so as the number increases, their size decreases. + +{{< example >}} +<p class="fs-1">.fs-1 text</p> +<p class="fs-2">.fs-2 text</p> +<p class="fs-3">.fs-3 text</p> +<p class="fs-4">.fs-4 text</p> +<p class="fs-5">.fs-5 text</p> +<p class="fs-6">.fs-6 text</p> +{{< /example >}} + +Customize your available `font-size`s by modifying the `$font-sizes` Sass map. + +## Font weight and italics + +Quickly change the `font-weight` or `font-style` of text with these utilities. `font-style` utilities are abbreviated as `.fst-*` and `font-weight` utilities are abbreviated as `.fw-*`. + +{{< example >}} +<p class="fw-bold">Bold text.</p> +<p class="fw-bolder">Bolder weight text (relative to the parent element).</p> +<p class="fw-normal">Normal weight text.</p> +<p class="fw-light">Light weight text.</p> +<p class="fw-lighter">Lighter weight text (relative to the parent element).</p> +<p class="fst-italic">Italic text.</p> +<p class="fst-normal">Text with normal font style</p> +{{< /example >}} + +## Line height + +Change the line height with `.lh-*` utilities. + +{{< example >}} +<p class="lh-1">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p> +<p class="lh-sm">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p> +<p class="lh-base">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p> +<p class="lh-lg">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p> +{{< /example >}} + +## Monospace + +Change a selection to our monospace font stack with `.font-monospace`. + +{{< example >}} +<p class="font-monospace">This is in monospace</p> +{{< /example >}} + +## Reset color + +Reset a text or link's color with `.text-reset`, so that it inherits the color from its parent. + +{{< example >}} +<p class="text-muted"> + Muted text with a <a href="#" class="text-reset">reset link</a>. +</p> +{{< /example >}} + +## Text decoration + +Decorate text in components with text decoration classes. + +{{< example >}} +<p class="text-decoration-underline">This text has a line underneath it.</p> +<p class="text-decoration-line-through">This text has a line going through it.</p> +<a href="#" class="text-decoration-none">This link has its text decoration removed</a> +{{< /example >}} + +## Sass + +### Variables + +{{< scss-docs name="font-variables" file="scss/_variables.scss" >}} + +### Maps + +Font-size utilities are generated from this map, in combination with our utilities API. + +{{< scss-docs name="font-sizes" file="scss/_variables.scss" >}} + +### Utilities API + +Font and text utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-text" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/vertical-align.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/vertical-align.md index b2c16b569..9fe0eeb93 100644 --- a/vendor/twbs/bootstrap/site/content/docs/4.6/utilities/vertical-align.md +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/vertical-align.md @@ -9,6 +9,8 @@ Change the alignment of elements with the [`vertical-alignment`](https://develop Choose from `.align-baseline`, `.align-top`, `.align-middle`, `.align-bottom`, `.align-text-bottom`, and `.align-text-top` as needed. +To vertically center non-inline content (like `<div>`s and more), use our [flex box utilities]({{< docsref "/utilities/flex#align-items" >}}). + With inline elements: {{< example >}} @@ -36,3 +38,11 @@ With table cells: </tbody> </table> {{< /example >}} + +## Sass + +### Utilities API + +Vertical align utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-vertical-align" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/visibility.md b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/visibility.md new file mode 100644 index 000000000..61eb30241 --- /dev/null +++ b/vendor/twbs/bootstrap/site/content/docs/5.0/utilities/visibility.md @@ -0,0 +1,37 @@ +--- +layout: docs +title: Visibility +description: Control the visibility of elements, without modifying their display, with visibility utilities. +group: utilities +--- + +Set the `visibility` of elements with our visibility utilities. These utility classes do not modify the `display` value at all and do not affect layout – `.invisible` elements still take up space in the page. + +{{< callout warning >}} +Elements with the `.invisible` class will be hidden *both* visually and for assistive technology/screen reader users. +{{< /callout >}} + +Apply `.visible` or `.invisible` as needed. + +```html +<div class="visible">...</div> +<div class="invisible">...</div> +``` + +```scss +// Class +.visible { + visibility: visible !important; +} +.invisible { + visibility: hidden !important; +} +``` + +## Sass + +### Utilities API + +Visibility utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-visibility" file="scss/_utilities.scss" >}} diff --git a/vendor/twbs/bootstrap/site/content/docs/_index.html b/vendor/twbs/bootstrap/site/content/docs/_index.html index b9b9f7cb3..0a758d2bf 100644 --- a/vendor/twbs/bootstrap/site/content/docs/_index.html +++ b/vendor/twbs/bootstrap/site/content/docs/_index.html @@ -1,5 +1,5 @@ --- layout: redirect sitemap_exclude: true -redirect: "/docs/4.6/getting-started/introduction/" +redirect: "/docs/5.0/getting-started/introduction/" --- diff --git a/vendor/twbs/bootstrap/site/content/docs/versions.md b/vendor/twbs/bootstrap/site/content/docs/versions.md index 2f931880d..2f1e3356b 100644 --- a/vendor/twbs/bootstrap/site/content/docs/versions.md +++ b/vendor/twbs/bootstrap/site/content/docs/versions.md @@ -1,7 +1,6 @@ --- -layout: single title: Versions -description: An appendix of hosted documentation for nearly every release of Bootstrap, from v1 through v4. +description: An appendix of hosted documentation for nearly every release of Bootstrap, from v1 through v5. --- {{< list-versions.inline >}} @@ -17,7 +16,7 @@ description: An appendix of hosted documentation for nearly every release of Boo <a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version.v $.Site.Params.docs_version) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ $release.baseurl }}/{{ $version.v }}/"> {{ $version.v }} {{ if (eq $version.v $.Site.Params.docs_version) -}} - <span class="badge badge-primary">Latest</span> + <span class="badge bg-primary">Latest</span> {{- end }} </a> {{ if (eq (add $i 1) $len) }}</div>{{ end }} |