0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

Prepare v5.1.0. (#34674)

This commit is contained in:
XhmikosR 2021-08-04 18:41:51 +03:00 committed by GitHub
parent 7fcc2f4d52
commit f20fece3a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
383 changed files with 4894 additions and 3406 deletions

View File

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://getbootstrap.com/"> <a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165"> <img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
</a> </a>
</p> </p>
@ -9,7 +9,7 @@
<p align="center"> <p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development. Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br> <br>
<a href="https://getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a> <a href="https://getbootstrap.com/docs/5.1/"><strong>Explore Bootstrap docs »</strong></a>
<br> <br>
<br> <br>
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a> <a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
@ -46,14 +46,14 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
Several quick start options are available: Several quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.2.zip) - [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.1.0.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` - Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap` - Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap` - Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.2` - Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.1.0`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` - Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more. Read the [Getting started page](https://getbootstrap.com/docs/5.1/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
## Status ## Status

View File

@ -25,7 +25,7 @@ publishDir: "_site"
module: module:
mounts: mounts:
- source: dist - source: dist
target: static/docs/5.0/dist target: static/docs/5.1/dist
- source: site/assets - source: site/assets
target: assets target: assets
- source: site/content - source: site/content
@ -36,20 +36,20 @@ module:
target: layouts target: layouts
- source: site/static - source: site/static
target: static target: static
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png - source: site/static/docs/5.1/assets/img/favicons/apple-touch-icon.png
target: static/apple-touch-icon.png target: static/apple-touch-icon.png
- source: site/static/docs/5.0/assets/img/favicons/favicon.ico - source: site/static/docs/5.1/assets/img/favicons/favicon.ico
target: static/favicon.ico target: static/favicon.ico
params: params:
description: "The most popular HTML, CSS, and JS library in the world." description: "The most popular HTML, CSS, and JS library in the world."
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors" authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png social_image_path: /docs/5.1/assets/brand/bootstrap-social.png
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png social_logo_path: /docs/5.1/assets/brand/bootstrap-social-logo.png
current_version: "5.0.2" current_version: "5.1.0"
current_ruby_version: "5.0.2" current_ruby_version: "5.1.0"
docs_version: "5.0" docs_version: "5.1"
rfs_version: "9.0.3" rfs_version: "9.0.3"
github_org: "https://github.com/twbs" github_org: "https://github.com/twbs"
repo: "https://github.com/twbs/bootstrap" repo: "https://github.com/twbs/bootstrap"
@ -61,19 +61,19 @@ params:
icons: "https://icons.getbootstrap.com/" icons: "https://icons.getbootstrap.com/"
download: download:
source: "https://github.com/twbs/bootstrap/archive/v5.0.2.zip" source: "https://github.com/twbs/bootstrap/archive/v5.1.0.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.2/bootstrap-5.0.2-dist.zip" dist: "https://github.com/twbs/bootstrap/releases/download/v5.1.0/bootstrap-5.1.0-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.2/bootstrap-5.0.2-examples.zip" dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.1.0/bootstrap-5.1.0-examples.zip"
cdn: cdn:
# See https://www.srihash.org for info on how to generate the hashes # See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" css: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"
css_hash: "sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" css_hash: "sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.rtl.min.css" css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-gXt9imSW0VcJVHezoNQsP+TNrjYXoGcrqBZJpry9zJt8PCQjobwmhMGaDHTASo9N" css_rtl_hash: "sha384-XfhC/Sid4FIGSXYebcOtcSCRFkd/zZzAMVipf0bNWucloRvcKK2/dpVWodQbQ1Ek"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" js: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js"
js_hash: "sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" js_hash: "sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" js_bundle_hash: "sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js" popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"
popper_hash: "sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" popper_hash: "sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp"

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Grid v5.0.2 (https://getbootstrap.com/) * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -101,206 +101,6 @@
width: 16.6666666667%; width: 16.6666666667%;
} }
@media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
.col-auto { .col-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -471,6 +271,45 @@
} }
@media (min-width: 576px) { @media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-sm-auto { .col-sm-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -645,6 +484,45 @@
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-md-auto { .col-md-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -819,6 +697,45 @@
} }
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-lg-auto { .col-lg-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -993,6 +910,45 @@
} }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xl-auto { .col-xl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1167,6 +1123,45 @@
} }
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xxl-auto { .col-xxl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Grid v5.0.2 (https://getbootstrap.com/) * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -101,206 +101,6 @@
width: 16.6666666667%; width: 16.6666666667%;
} }
@media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
.col-auto { .col-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -471,6 +271,45 @@
} }
@media (min-width: 576px) { @media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-sm-auto { .col-sm-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -645,6 +484,45 @@
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-md-auto { .col-md-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -819,6 +697,45 @@
} }
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-lg-auto { .col-lg-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -993,6 +910,45 @@
} }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xl-auto { .col-xl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1167,6 +1123,45 @@
} }
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xxl-auto { .col-xxl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/) * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -19,12 +19,13 @@
body { body {
margin: 0; margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: var(--bs-body-font-family);
font-size: 1rem; font-size: var(--bs-body-font-size);
font-weight: 400; font-weight: var(--bs-body-font-weight);
line-height: 1.5; line-height: var(--bs-body-line-height);
color: #212529; color: var(--bs-body-color);
background-color: #fff; text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
/*! /*!
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/) * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important} */*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */ /*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/) * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -19,12 +19,13 @@
body { body {
margin: 0; margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: var(--bs-body-font-family);
font-size: 1rem; font-size: var(--bs-body-font-size);
font-weight: 400; font-weight: var(--bs-body-font-weight);
line-height: 1.5; line-height: var(--bs-body-line-height);
color: #212529; color: var(--bs-body-color);
background-color: #fff; text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
/*! /*!
* Bootstrap Reboot v5.0.2 (https://getbootstrap.com/) * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important} */*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */ /*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/) * Bootstrap Utilities v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -162,6 +162,20 @@
z-index: 1020; z-index: 1020;
} }
} }
.hstack {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
}
.vstack {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-self: stretch;
}
.visually-hidden, .visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) { .visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important; position: absolute !important;
@ -191,6 +205,15 @@
white-space: nowrap; white-space: nowrap;
} }
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentColor;
opacity: 0.25;
}
.align-baseline { .align-baseline {
vertical-align: baseline !important; vertical-align: baseline !important;
} }
@ -227,6 +250,26 @@
float: none !important; float: none !important;
} }
.opacity-0 {
opacity: 0 !important;
}
.opacity-25 {
opacity: 0.25 !important;
}
.opacity-50 {
opacity: 0.5 !important;
}
.opacity-75 {
opacity: 0.75 !important;
}
.opacity-100 {
opacity: 1 !important;
}
.overflow-auto { .overflow-auto {
overflow: auto !important; overflow: auto !important;
} }
@ -1250,105 +1293,176 @@
/* rtl:end:remove */ /* rtl:end:remove */
.text-primary { .text-primary {
color: #0d6efd !important; --bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
} }
.text-secondary { .text-secondary {
color: #6c757d !important; --bs-text-opacity: 1;
color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important;
} }
.text-success { .text-success {
color: #198754 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
} }
.text-info { .text-info {
color: #0dcaf0 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important;
} }
.text-warning { .text-warning {
color: #ffc107 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
} }
.text-danger { .text-danger {
color: #dc3545 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
} }
.text-light { .text-light {
color: #f8f9fa !important; --bs-text-opacity: 1;
color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
} }
.text-dark { .text-dark {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}
.text-black {
--bs-text-opacity: 1;
color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important;
} }
.text-white { .text-white {
color: #fff !important; --bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
} }
.text-body { .text-body {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-body-rgb), var(--bs-text-opacity)) !important;
} }
.text-muted { .text-muted {
--bs-text-opacity: 1;
color: #6c757d !important; color: #6c757d !important;
} }
.text-black-50 { .text-black-50 {
--bs-text-opacity: 1;
color: rgba(0, 0, 0, 0.5) !important; color: rgba(0, 0, 0, 0.5) !important;
} }
.text-white-50 { .text-white-50 {
--bs-text-opacity: 1;
color: rgba(255, 255, 255, 0.5) !important; color: rgba(255, 255, 255, 0.5) !important;
} }
.text-reset { .text-reset {
--bs-text-opacity: 1;
color: inherit !important; color: inherit !important;
} }
.text-opacity-25 {
--bs-text-opacity: 0.25;
}
.text-opacity-50 {
--bs-text-opacity: 0.5;
}
.text-opacity-75 {
--bs-text-opacity: 0.75;
}
.text-opacity-100 {
--bs-text-opacity: 1;
}
.bg-primary { .bg-primary {
background-color: #0d6efd !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-secondary { .bg-secondary {
background-color: #6c757d !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-success { .bg-success {
background-color: #198754 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-info { .bg-info {
background-color: #0dcaf0 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-warning { .bg-warning {
background-color: #ffc107 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-danger { .bg-danger {
background-color: #dc3545 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-light { .bg-light {
background-color: #f8f9fa !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-dark { .bg-dark {
background-color: #212529 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-body { .bg-black {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-white { .bg-white {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
}
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-transparent { .bg-transparent {
--bs-bg-opacity: 1;
background-color: transparent !important; background-color: transparent !important;
} }
.bg-opacity-10 {
--bs-bg-opacity: 0.1;
}
.bg-opacity-25 {
--bs-bg-opacity: 0.25;
}
.bg-opacity-50 {
--bs-bg-opacity: 0.5;
}
.bg-opacity-75 {
--bs-bg-opacity: 0.75;
}
.bg-opacity-100 {
--bs-bg-opacity: 1;
}
.bg-gradient { .bg-gradient {
background-image: var(--bs-gradient) !important; background-image: var(--bs-gradient) !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Utilities v5.0.2 (https://getbootstrap.com/) * Bootstrap Utilities v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -162,6 +162,20 @@
z-index: 1020; z-index: 1020;
} }
} }
.hstack {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
}
.vstack {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-self: stretch;
}
.visually-hidden, .visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) { .visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important; position: absolute !important;
@ -191,6 +205,15 @@
white-space: nowrap; white-space: nowrap;
} }
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentColor;
opacity: 0.25;
}
.align-baseline { .align-baseline {
vertical-align: baseline !important; vertical-align: baseline !important;
} }
@ -227,6 +250,26 @@
float: none !important; float: none !important;
} }
.opacity-0 {
opacity: 0 !important;
}
.opacity-25 {
opacity: 0.25 !important;
}
.opacity-50 {
opacity: 0.5 !important;
}
.opacity-75 {
opacity: 0.75 !important;
}
.opacity-100 {
opacity: 1 !important;
}
.overflow-auto { .overflow-auto {
overflow: auto !important; overflow: auto !important;
} }
@ -1242,105 +1285,176 @@
white-space: nowrap !important; white-space: nowrap !important;
} }
.text-primary { .text-primary {
color: #0d6efd !important; --bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
} }
.text-secondary { .text-secondary {
color: #6c757d !important; --bs-text-opacity: 1;
color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important;
} }
.text-success { .text-success {
color: #198754 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
} }
.text-info { .text-info {
color: #0dcaf0 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important;
} }
.text-warning { .text-warning {
color: #ffc107 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
} }
.text-danger { .text-danger {
color: #dc3545 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
} }
.text-light { .text-light {
color: #f8f9fa !important; --bs-text-opacity: 1;
color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
} }
.text-dark { .text-dark {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}
.text-black {
--bs-text-opacity: 1;
color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important;
} }
.text-white { .text-white {
color: #fff !important; --bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
} }
.text-body { .text-body {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-body-rgb), var(--bs-text-opacity)) !important;
} }
.text-muted { .text-muted {
--bs-text-opacity: 1;
color: #6c757d !important; color: #6c757d !important;
} }
.text-black-50 { .text-black-50 {
--bs-text-opacity: 1;
color: rgba(0, 0, 0, 0.5) !important; color: rgba(0, 0, 0, 0.5) !important;
} }
.text-white-50 { .text-white-50 {
--bs-text-opacity: 1;
color: rgba(255, 255, 255, 0.5) !important; color: rgba(255, 255, 255, 0.5) !important;
} }
.text-reset { .text-reset {
--bs-text-opacity: 1;
color: inherit !important; color: inherit !important;
} }
.text-opacity-25 {
--bs-text-opacity: 0.25;
}
.text-opacity-50 {
--bs-text-opacity: 0.5;
}
.text-opacity-75 {
--bs-text-opacity: 0.75;
}
.text-opacity-100 {
--bs-text-opacity: 1;
}
.bg-primary { .bg-primary {
background-color: #0d6efd !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-secondary { .bg-secondary {
background-color: #6c757d !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-success { .bg-success {
background-color: #198754 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-info { .bg-info {
background-color: #0dcaf0 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-warning { .bg-warning {
background-color: #ffc107 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-danger { .bg-danger {
background-color: #dc3545 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-light { .bg-light {
background-color: #f8f9fa !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-dark { .bg-dark {
background-color: #212529 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-body { .bg-black {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-white { .bg-white {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
}
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-transparent { .bg-transparent {
--bs-bg-opacity: 1;
background-color: transparent !important; background-color: transparent !important;
} }
.bg-opacity-10 {
--bs-bg-opacity: 0.1;
}
.bg-opacity-25 {
--bs-bg-opacity: 0.25;
}
.bg-opacity-50 {
--bs-bg-opacity: 0.5;
}
.bg-opacity-75 {
--bs-bg-opacity: 0.75;
}
.bg-opacity-100 {
--bs-bg-opacity: 1;
}
.bg-gradient { .bg-gradient {
background-image: var(--bs-gradient) !important; background-image: var(--bs-gradient) !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
@charset "UTF-8"; @charset "UTF-8";
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -19,6 +19,15 @@
--bs-white: #fff; --bs-white: #fff;
--bs-gray: #6c757d; --bs-gray: #6c757d;
--bs-gray-dark: #343a40; --bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd; --bs-primary: #0d6efd;
--bs-secondary: #6c757d; --bs-secondary: #6c757d;
--bs-success: #198754; --bs-success: #198754;
@ -27,9 +36,26 @@
--bs-danger: #dc3545; --bs-danger: #dc3545;
--bs-light: #f8f9fa; --bs-light: #f8f9fa;
--bs-dark: #212529; --bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-rgb: 33, 37, 41;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
} }
*, *,
@ -46,12 +72,13 @@
body { body {
margin: 0; margin: 0;
font-family: var(--bs-font-sans-serif); font-family: var(--bs-body-font-family);
font-size: 1rem; font-size: var(--bs-body-font-size);
font-weight: 400; font-weight: var(--bs-body-font-weight);
line-height: 1.5; line-height: var(--bs-body-line-height);
color: #212529; color: var(--bs-body-color);
background-color: #fff; text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
@ -685,206 +712,6 @@ progress {
width: 16.6666666667%; width: 16.6666666667%;
} }
@media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
.col-auto { .col-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1055,6 +882,45 @@ progress {
} }
@media (min-width: 576px) { @media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-sm-auto { .col-sm-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1229,6 +1095,45 @@ progress {
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-md-auto { .col-md-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1403,6 +1308,45 @@ progress {
} }
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-lg-auto { .col-lg-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1577,6 +1521,45 @@ progress {
} }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xl-auto { .col-xl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1751,6 +1734,45 @@ progress {
} }
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xxl-auto { .col-xxl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -2266,7 +2288,7 @@ progress {
} }
.form-control-sm { .form-control-sm {
min-height: calc(1.5em + (0.5rem + 2px)); min-height: calc(1.5em + 0.5rem + 2px);
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
font-size: 0.875rem; font-size: 0.875rem;
border-radius: 0.2rem; border-radius: 0.2rem;
@ -2285,7 +2307,7 @@ progress {
} }
.form-control-lg { .form-control-lg {
min-height: calc(1.5em + (1rem + 2px)); min-height: calc(1.5em + 1rem + 2px);
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
font-size: 1.25rem; font-size: 1.25rem;
border-radius: 0.3rem; border-radius: 0.3rem;
@ -2304,17 +2326,17 @@ progress {
} }
textarea.form-control { textarea.form-control {
min-height: calc(1.5em + (0.75rem + 2px)); min-height: calc(1.5em + 0.75rem + 2px);
} }
textarea.form-control-sm { textarea.form-control-sm {
min-height: calc(1.5em + (0.5rem + 2px)); min-height: calc(1.5em + 0.5rem + 2px);
} }
textarea.form-control-lg { textarea.form-control-lg {
min-height: calc(1.5em + (1rem + 2px)); min-height: calc(1.5em + 1rem + 2px);
} }
.form-control-color { .form-control-color {
max-width: 3rem; width: 3rem;
height: auto; height: auto;
padding: 0.375rem; padding: 0.375rem;
} }
@ -3430,6 +3452,16 @@ textarea.form-control-lg {
transition: none; transition: none;
} }
} }
.collapsing.collapse-horizontal {
width: 0;
height: auto;
transition: width 0.35s ease;
}
@media (prefers-reduced-motion: reduce) {
.collapsing.collapse-horizontal {
transition: none;
}
}
.dropup, .dropup,
.dropend, .dropend,
@ -4047,6 +4079,33 @@ textarea.form-control-lg {
.navbar-expand-sm .navbar-toggler { .navbar-expand-sm .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-sm .offcanvas-header {
display: none;
}
.navbar-expand-sm .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-right: 0;
border-left: 0;
transition: none;
transform: none;
}
.navbar-expand-sm .offcanvas-top,
.navbar-expand-sm .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-sm .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.navbar-expand-md { .navbar-expand-md {
@ -4073,6 +4132,33 @@ textarea.form-control-lg {
.navbar-expand-md .navbar-toggler { .navbar-expand-md .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-md .offcanvas-header {
display: none;
}
.navbar-expand-md .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-right: 0;
border-left: 0;
transition: none;
transform: none;
}
.navbar-expand-md .offcanvas-top,
.navbar-expand-md .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-md .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.navbar-expand-lg { .navbar-expand-lg {
@ -4099,6 +4185,33 @@ textarea.form-control-lg {
.navbar-expand-lg .navbar-toggler { .navbar-expand-lg .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-lg .offcanvas-header {
display: none;
}
.navbar-expand-lg .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-right: 0;
border-left: 0;
transition: none;
transform: none;
}
.navbar-expand-lg .offcanvas-top,
.navbar-expand-lg .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-lg .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.navbar-expand-xl { .navbar-expand-xl {
@ -4125,6 +4238,33 @@ textarea.form-control-lg {
.navbar-expand-xl .navbar-toggler { .navbar-expand-xl .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-xl .offcanvas-header {
display: none;
}
.navbar-expand-xl .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-right: 0;
border-left: 0;
transition: none;
transform: none;
}
.navbar-expand-xl .offcanvas-top,
.navbar-expand-xl .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-xl .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.navbar-expand-xxl { .navbar-expand-xxl {
@ -4151,6 +4291,33 @@ textarea.form-control-lg {
.navbar-expand-xxl .navbar-toggler { .navbar-expand-xxl .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-xxl .offcanvas-header {
display: none;
}
.navbar-expand-xxl .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-right: 0;
border-left: 0;
transition: none;
transform: none;
}
.navbar-expand-xxl .offcanvas-top,
.navbar-expand-xxl .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-xxl .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
.navbar-expand { .navbar-expand {
flex-wrap: nowrap; flex-wrap: nowrap;
@ -4176,6 +4343,33 @@ textarea.form-control-lg {
.navbar-expand .navbar-toggler { .navbar-expand .navbar-toggler {
display: none; display: none;
} }
.navbar-expand .offcanvas-header {
display: none;
}
.navbar-expand .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-right: 0;
border-left: 0;
transition: none;
transform: none;
}
.navbar-expand .offcanvas-top,
.navbar-expand .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
.navbar-light .navbar-brand { .navbar-light .navbar-brand {
color: rgba(0, 0, 0, 0.9); color: rgba(0, 0, 0, 0.9);
@ -4299,9 +4493,6 @@ textarea.form-control-lg {
margin-bottom: 0; margin-bottom: 0;
} }
.card-link:hover {
text-decoration: none;
}
.card-link + .card-link { .card-link + .card-link {
margin-left: 1rem; margin-left: 1rem;
} }
@ -5177,10 +5368,10 @@ textarea.form-control-lg {
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.toast:not(.showing):not(.show) { .toast.showing {
opacity: 0; opacity: 0;
} }
.toast.hide { .toast:not(.show) {
display: none; display: none;
} }
@ -5220,7 +5411,7 @@ textarea.form-control-lg {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1060; z-index: 1055;
display: none; display: none;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -5285,7 +5476,7 @@ textarea.form-control-lg {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1040; z-index: 1050;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: #000; background-color: #000;
@ -6010,7 +6201,7 @@ textarea.form-control-lg {
.offcanvas { .offcanvas {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 1050; z-index: 1045;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 100%; max-width: 100%;
@ -6026,6 +6217,22 @@ textarea.form-control-lg {
} }
} }
.offcanvas-backdrop {
position: fixed;
top: 0;
left: 0;
z-index: 1040;
width: 100vw;
height: 100vh;
background-color: #000;
}
.offcanvas-backdrop.fade {
opacity: 0;
}
.offcanvas-backdrop.show {
opacity: 0.5;
}
.offcanvas-header { .offcanvas-header {
display: flex; display: flex;
align-items: center; align-items: center;
@ -6089,6 +6296,69 @@ textarea.form-control-lg {
transform: none; transform: none;
} }
.placeholder {
display: inline-block;
min-height: 1em;
vertical-align: middle;
cursor: wait;
background-color: currentColor;
opacity: 0.5;
}
.placeholder.btn::before {
display: inline-block;
content: "";
}
.placeholder-xs {
min-height: 0.6em;
}
.placeholder-sm {
min-height: 0.8em;
}
.placeholder-lg {
min-height: 1.2em;
}
.placeholder-glow .placeholder {
-webkit-animation: placeholder-glow 2s ease-in-out infinite;
animation: placeholder-glow 2s ease-in-out infinite;
}
@-webkit-keyframes placeholder-glow {
50% {
opacity: 0.2;
}
}
@keyframes placeholder-glow {
50% {
opacity: 0.2;
}
}
.placeholder-wave {
-webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%);
mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%);
-webkit-mask-size: 200% 100%;
mask-size: 200% 100%;
-webkit-animation: placeholder-wave 2s linear infinite;
animation: placeholder-wave 2s linear infinite;
}
@-webkit-keyframes placeholder-wave {
100% {
-webkit-mask-position: -200% 0%;
mask-position: -200% 0%;
}
}
@keyframes placeholder-wave {
100% {
-webkit-mask-position: -200% 0%;
mask-position: -200% 0%;
}
}
.clearfix::after { .clearfix::after {
display: block; display: block;
clear: both; clear: both;
@ -6247,6 +6517,20 @@ textarea.form-control-lg {
z-index: 1020; z-index: 1020;
} }
} }
.hstack {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
}
.vstack {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-self: stretch;
}
.visually-hidden, .visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) { .visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important; position: absolute !important;
@ -6276,6 +6560,15 @@ textarea.form-control-lg {
white-space: nowrap; white-space: nowrap;
} }
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentColor;
opacity: 0.25;
}
.align-baseline { .align-baseline {
vertical-align: baseline !important; vertical-align: baseline !important;
} }
@ -6312,6 +6605,26 @@ textarea.form-control-lg {
float: none !important; float: none !important;
} }
.opacity-0 {
opacity: 0 !important;
}
.opacity-25 {
opacity: 0.25 !important;
}
.opacity-50 {
opacity: 0.5 !important;
}
.opacity-75 {
opacity: 0.75 !important;
}
.opacity-100 {
opacity: 1 !important;
}
.overflow-auto { .overflow-auto {
overflow: auto !important; overflow: auto !important;
} }
@ -7335,105 +7648,176 @@ textarea.form-control-lg {
/* rtl:end:remove */ /* rtl:end:remove */
.text-primary { .text-primary {
color: #0d6efd !important; --bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
} }
.text-secondary { .text-secondary {
color: #6c757d !important; --bs-text-opacity: 1;
color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important;
} }
.text-success { .text-success {
color: #198754 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
} }
.text-info { .text-info {
color: #0dcaf0 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important;
} }
.text-warning { .text-warning {
color: #ffc107 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
} }
.text-danger { .text-danger {
color: #dc3545 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
} }
.text-light { .text-light {
color: #f8f9fa !important; --bs-text-opacity: 1;
color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
} }
.text-dark { .text-dark {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}
.text-black {
--bs-text-opacity: 1;
color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important;
} }
.text-white { .text-white {
color: #fff !important; --bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
} }
.text-body { .text-body {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-body-rgb), var(--bs-text-opacity)) !important;
} }
.text-muted { .text-muted {
--bs-text-opacity: 1;
color: #6c757d !important; color: #6c757d !important;
} }
.text-black-50 { .text-black-50 {
--bs-text-opacity: 1;
color: rgba(0, 0, 0, 0.5) !important; color: rgba(0, 0, 0, 0.5) !important;
} }
.text-white-50 { .text-white-50 {
--bs-text-opacity: 1;
color: rgba(255, 255, 255, 0.5) !important; color: rgba(255, 255, 255, 0.5) !important;
} }
.text-reset { .text-reset {
--bs-text-opacity: 1;
color: inherit !important; color: inherit !important;
} }
.text-opacity-25 {
--bs-text-opacity: 0.25;
}
.text-opacity-50 {
--bs-text-opacity: 0.5;
}
.text-opacity-75 {
--bs-text-opacity: 0.75;
}
.text-opacity-100 {
--bs-text-opacity: 1;
}
.bg-primary { .bg-primary {
background-color: #0d6efd !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-secondary { .bg-secondary {
background-color: #6c757d !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-success { .bg-success {
background-color: #198754 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-info { .bg-info {
background-color: #0dcaf0 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-warning { .bg-warning {
background-color: #ffc107 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-danger { .bg-danger {
background-color: #dc3545 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-light { .bg-light {
background-color: #f8f9fa !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-dark { .bg-dark {
background-color: #212529 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-body { .bg-black {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-white { .bg-white {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
}
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-transparent { .bg-transparent {
--bs-bg-opacity: 1;
background-color: transparent !important; background-color: transparent !important;
} }
.bg-opacity-10 {
--bs-bg-opacity: 0.1;
}
.bg-opacity-25 {
--bs-bg-opacity: 0.25;
}
.bg-opacity-50 {
--bs-bg-opacity: 0.5;
}
.bg-opacity-75 {
--bs-bg-opacity: 0.75;
}
.bg-opacity-100 {
--bs-bg-opacity: 1;
}
.bg-gradient { .bg-gradient {
background-image: var(--bs-gradient) !important; background-image: var(--bs-gradient) !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
@charset "UTF-8"; @charset "UTF-8";
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc. * Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -19,6 +19,15 @@
--bs-white: #fff; --bs-white: #fff;
--bs-gray: #6c757d; --bs-gray: #6c757d;
--bs-gray-dark: #343a40; --bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd; --bs-primary: #0d6efd;
--bs-secondary: #6c757d; --bs-secondary: #6c757d;
--bs-success: #198754; --bs-success: #198754;
@ -27,9 +36,26 @@
--bs-danger: #dc3545; --bs-danger: #dc3545;
--bs-light: #f8f9fa; --bs-light: #f8f9fa;
--bs-dark: #212529; --bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-rgb: 33, 37, 41;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
} }
*, *,
@ -46,12 +72,13 @@
body { body {
margin: 0; margin: 0;
font-family: var(--bs-font-sans-serif); font-family: var(--bs-body-font-family);
font-size: 1rem; font-size: var(--bs-body-font-size);
font-weight: 400; font-weight: var(--bs-body-font-weight);
line-height: 1.5; line-height: var(--bs-body-line-height);
color: #212529; color: var(--bs-body-color);
background-color: #fff; text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
@ -683,206 +710,6 @@ progress {
width: 16.6666666667%; width: 16.6666666667%;
} }
@media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
@media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
}
.col-auto { .col-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1053,6 +880,45 @@ progress {
} }
@media (min-width: 576px) { @media (min-width: 576px) {
.col-sm {
flex: 1 0 0%;
}
.row-cols-sm-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-sm-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-sm-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-sm-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-sm-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-sm-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-sm-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-sm-auto { .col-sm-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1227,6 +1093,45 @@ progress {
} }
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.col-md {
flex: 1 0 0%;
}
.row-cols-md-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-md-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-md-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-md-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-md-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-md-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-md-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-md-auto { .col-md-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1401,6 +1306,45 @@ progress {
} }
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.col-lg {
flex: 1 0 0%;
}
.row-cols-lg-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-lg-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-lg-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-lg-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-lg-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-lg-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-lg-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-lg-auto { .col-lg-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1575,6 +1519,45 @@ progress {
} }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.col-xl {
flex: 1 0 0%;
}
.row-cols-xl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xl-auto { .col-xl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -1749,6 +1732,45 @@ progress {
} }
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.col-xxl {
flex: 1 0 0%;
}
.row-cols-xxl-auto > * {
flex: 0 0 auto;
width: auto;
}
.row-cols-xxl-1 > * {
flex: 0 0 auto;
width: 100%;
}
.row-cols-xxl-2 > * {
flex: 0 0 auto;
width: 50%;
}
.row-cols-xxl-3 > * {
flex: 0 0 auto;
width: 33.3333333333%;
}
.row-cols-xxl-4 > * {
flex: 0 0 auto;
width: 25%;
}
.row-cols-xxl-5 > * {
flex: 0 0 auto;
width: 20%;
}
.row-cols-xxl-6 > * {
flex: 0 0 auto;
width: 16.6666666667%;
}
.col-xxl-auto { .col-xxl-auto {
flex: 0 0 auto; flex: 0 0 auto;
width: auto; width: auto;
@ -2264,7 +2286,7 @@ progress {
} }
.form-control-sm { .form-control-sm {
min-height: calc(1.5em + (0.5rem + 2px)); min-height: calc(1.5em + 0.5rem + 2px);
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
font-size: 0.875rem; font-size: 0.875rem;
border-radius: 0.2rem; border-radius: 0.2rem;
@ -2283,7 +2305,7 @@ progress {
} }
.form-control-lg { .form-control-lg {
min-height: calc(1.5em + (1rem + 2px)); min-height: calc(1.5em + 1rem + 2px);
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
font-size: 1.25rem; font-size: 1.25rem;
border-radius: 0.3rem; border-radius: 0.3rem;
@ -2302,17 +2324,17 @@ progress {
} }
textarea.form-control { textarea.form-control {
min-height: calc(1.5em + (0.75rem + 2px)); min-height: calc(1.5em + 0.75rem + 2px);
} }
textarea.form-control-sm { textarea.form-control-sm {
min-height: calc(1.5em + (0.5rem + 2px)); min-height: calc(1.5em + 0.5rem + 2px);
} }
textarea.form-control-lg { textarea.form-control-lg {
min-height: calc(1.5em + (1rem + 2px)); min-height: calc(1.5em + 1rem + 2px);
} }
.form-control-color { .form-control-color {
max-width: 3rem; width: 3rem;
height: auto; height: auto;
padding: 0.375rem; padding: 0.375rem;
} }
@ -3428,6 +3450,16 @@ textarea.form-control-lg {
transition: none; transition: none;
} }
} }
.collapsing.collapse-horizontal {
width: 0;
height: auto;
transition: width 0.35s ease;
}
@media (prefers-reduced-motion: reduce) {
.collapsing.collapse-horizontal {
transition: none;
}
}
.dropup, .dropup,
.dropend, .dropend,
@ -4045,6 +4077,33 @@ textarea.form-control-lg {
.navbar-expand-sm .navbar-toggler { .navbar-expand-sm .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-sm .offcanvas-header {
display: none;
}
.navbar-expand-sm .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-left: 0;
border-right: 0;
transition: none;
transform: none;
}
.navbar-expand-sm .offcanvas-top,
.navbar-expand-sm .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-sm .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.navbar-expand-md { .navbar-expand-md {
@ -4071,6 +4130,33 @@ textarea.form-control-lg {
.navbar-expand-md .navbar-toggler { .navbar-expand-md .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-md .offcanvas-header {
display: none;
}
.navbar-expand-md .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-left: 0;
border-right: 0;
transition: none;
transform: none;
}
.navbar-expand-md .offcanvas-top,
.navbar-expand-md .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-md .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.navbar-expand-lg { .navbar-expand-lg {
@ -4097,6 +4183,33 @@ textarea.form-control-lg {
.navbar-expand-lg .navbar-toggler { .navbar-expand-lg .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-lg .offcanvas-header {
display: none;
}
.navbar-expand-lg .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-left: 0;
border-right: 0;
transition: none;
transform: none;
}
.navbar-expand-lg .offcanvas-top,
.navbar-expand-lg .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-lg .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.navbar-expand-xl { .navbar-expand-xl {
@ -4123,6 +4236,33 @@ textarea.form-control-lg {
.navbar-expand-xl .navbar-toggler { .navbar-expand-xl .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-xl .offcanvas-header {
display: none;
}
.navbar-expand-xl .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-left: 0;
border-right: 0;
transition: none;
transform: none;
}
.navbar-expand-xl .offcanvas-top,
.navbar-expand-xl .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-xl .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.navbar-expand-xxl { .navbar-expand-xxl {
@ -4149,6 +4289,33 @@ textarea.form-control-lg {
.navbar-expand-xxl .navbar-toggler { .navbar-expand-xxl .navbar-toggler {
display: none; display: none;
} }
.navbar-expand-xxl .offcanvas-header {
display: none;
}
.navbar-expand-xxl .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-left: 0;
border-right: 0;
transition: none;
transform: none;
}
.navbar-expand-xxl .offcanvas-top,
.navbar-expand-xxl .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand-xxl .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
} }
.navbar-expand { .navbar-expand {
flex-wrap: nowrap; flex-wrap: nowrap;
@ -4174,6 +4341,33 @@ textarea.form-control-lg {
.navbar-expand .navbar-toggler { .navbar-expand .navbar-toggler {
display: none; display: none;
} }
.navbar-expand .offcanvas-header {
display: none;
}
.navbar-expand .offcanvas {
position: inherit;
bottom: 0;
z-index: 1000;
flex-grow: 1;
visibility: visible !important;
background-color: transparent;
border-left: 0;
border-right: 0;
transition: none;
transform: none;
}
.navbar-expand .offcanvas-top,
.navbar-expand .offcanvas-bottom {
height: auto;
border-top: 0;
border-bottom: 0;
}
.navbar-expand .offcanvas-body {
display: flex;
flex-grow: 0;
padding: 0;
overflow-y: visible;
}
.navbar-light .navbar-brand { .navbar-light .navbar-brand {
color: rgba(0, 0, 0, 0.9); color: rgba(0, 0, 0, 0.9);
@ -4297,9 +4491,6 @@ textarea.form-control-lg {
margin-bottom: 0; margin-bottom: 0;
} }
.card-link:hover {
text-decoration: none;
}
.card-link + .card-link { .card-link + .card-link {
margin-right: 1rem; margin-right: 1rem;
} }
@ -5175,10 +5366,10 @@ textarea.form-control-lg {
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.toast:not(.showing):not(.show) { .toast.showing {
opacity: 0; opacity: 0;
} }
.toast.hide { .toast:not(.show) {
display: none; display: none;
} }
@ -5218,7 +5409,7 @@ textarea.form-control-lg {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
z-index: 1060; z-index: 1055;
display: none; display: none;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -5283,7 +5474,7 @@ textarea.form-control-lg {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
z-index: 1040; z-index: 1050;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: #000; background-color: #000;
@ -5995,7 +6186,7 @@ textarea.form-control-lg {
.offcanvas { .offcanvas {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 1050; z-index: 1045;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 100%; max-width: 100%;
@ -6011,6 +6202,22 @@ textarea.form-control-lg {
} }
} }
.offcanvas-backdrop {
position: fixed;
top: 0;
right: 0;
z-index: 1040;
width: 100vw;
height: 100vh;
background-color: #000;
}
.offcanvas-backdrop.fade {
opacity: 0;
}
.offcanvas-backdrop.show {
opacity: 0.5;
}
.offcanvas-header { .offcanvas-header {
display: flex; display: flex;
align-items: center; align-items: center;
@ -6074,6 +6281,69 @@ textarea.form-control-lg {
transform: none; transform: none;
} }
.placeholder {
display: inline-block;
min-height: 1em;
vertical-align: middle;
cursor: wait;
background-color: currentColor;
opacity: 0.5;
}
.placeholder.btn::before {
display: inline-block;
content: "";
}
.placeholder-xs {
min-height: 0.6em;
}
.placeholder-sm {
min-height: 0.8em;
}
.placeholder-lg {
min-height: 1.2em;
}
.placeholder-glow .placeholder {
-webkit-animation: placeholder-glow 2s ease-in-out infinite;
animation: placeholder-glow 2s ease-in-out infinite;
}
@-webkit-keyframes placeholder-glow {
50% {
opacity: 0.2;
}
}
@keyframes placeholder-glow {
50% {
opacity: 0.2;
}
}
.placeholder-wave {
-webkit-mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%);
mask-image: linear-gradient(130deg, #000 55%, rgba(0, 0, 0, 0.8) 75%, #000 95%);
-webkit-mask-size: 200% 100%;
mask-size: 200% 100%;
-webkit-animation: placeholder-wave 2s linear infinite;
animation: placeholder-wave 2s linear infinite;
}
@-webkit-keyframes placeholder-wave {
100% {
-webkit-mask-position: -200% 0%;
mask-position: -200% 0%;
}
}
@keyframes placeholder-wave {
100% {
-webkit-mask-position: -200% 0%;
mask-position: -200% 0%;
}
}
.clearfix::after { .clearfix::after {
display: block; display: block;
clear: both; clear: both;
@ -6232,6 +6502,20 @@ textarea.form-control-lg {
z-index: 1020; z-index: 1020;
} }
} }
.hstack {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
}
.vstack {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-self: stretch;
}
.visually-hidden, .visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) { .visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important; position: absolute !important;
@ -6261,6 +6545,15 @@ textarea.form-control-lg {
white-space: nowrap; white-space: nowrap;
} }
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentColor;
opacity: 0.25;
}
.align-baseline { .align-baseline {
vertical-align: baseline !important; vertical-align: baseline !important;
} }
@ -6297,6 +6590,26 @@ textarea.form-control-lg {
float: none !important; float: none !important;
} }
.opacity-0 {
opacity: 0 !important;
}
.opacity-25 {
opacity: 0.25 !important;
}
.opacity-50 {
opacity: 0.5 !important;
}
.opacity-75 {
opacity: 0.75 !important;
}
.opacity-100 {
opacity: 1 !important;
}
.overflow-auto { .overflow-auto {
overflow: auto !important; overflow: auto !important;
} }
@ -7312,105 +7625,176 @@ textarea.form-control-lg {
white-space: nowrap !important; white-space: nowrap !important;
} }
.text-primary { .text-primary {
color: #0d6efd !important; --bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
} }
.text-secondary { .text-secondary {
color: #6c757d !important; --bs-text-opacity: 1;
color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important;
} }
.text-success { .text-success {
color: #198754 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
} }
.text-info { .text-info {
color: #0dcaf0 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important;
} }
.text-warning { .text-warning {
color: #ffc107 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
} }
.text-danger { .text-danger {
color: #dc3545 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
} }
.text-light { .text-light {
color: #f8f9fa !important; --bs-text-opacity: 1;
color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
} }
.text-dark { .text-dark {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}
.text-black {
--bs-text-opacity: 1;
color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important;
} }
.text-white { .text-white {
color: #fff !important; --bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
} }
.text-body { .text-body {
color: #212529 !important; --bs-text-opacity: 1;
color: rgba(var(--bs-body-rgb), var(--bs-text-opacity)) !important;
} }
.text-muted { .text-muted {
--bs-text-opacity: 1;
color: #6c757d !important; color: #6c757d !important;
} }
.text-black-50 { .text-black-50 {
--bs-text-opacity: 1;
color: rgba(0, 0, 0, 0.5) !important; color: rgba(0, 0, 0, 0.5) !important;
} }
.text-white-50 { .text-white-50 {
--bs-text-opacity: 1;
color: rgba(255, 255, 255, 0.5) !important; color: rgba(255, 255, 255, 0.5) !important;
} }
.text-reset { .text-reset {
--bs-text-opacity: 1;
color: inherit !important; color: inherit !important;
} }
.text-opacity-25 {
--bs-text-opacity: 0.25;
}
.text-opacity-50 {
--bs-text-opacity: 0.5;
}
.text-opacity-75 {
--bs-text-opacity: 0.75;
}
.text-opacity-100 {
--bs-text-opacity: 1;
}
.bg-primary { .bg-primary {
background-color: #0d6efd !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-secondary { .bg-secondary {
background-color: #6c757d !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-success { .bg-success {
background-color: #198754 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-info { .bg-info {
background-color: #0dcaf0 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-warning { .bg-warning {
background-color: #ffc107 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-danger { .bg-danger {
background-color: #dc3545 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-light { .bg-light {
background-color: #f8f9fa !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-dark { .bg-dark {
background-color: #212529 !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-body { .bg-black {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-white { .bg-white {
background-color: #fff !important; --bs-bg-opacity: 1;
background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
}
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-rgb), var(--bs-bg-opacity)) !important;
} }
.bg-transparent { .bg-transparent {
--bs-bg-opacity: 1;
background-color: transparent !important; background-color: transparent !important;
} }
.bg-opacity-10 {
--bs-bg-opacity: 0.1;
}
.bg-opacity-25 {
--bs-bg-opacity: 0.25;
}
.bg-opacity-50 {
--bs-bg-opacity: 0.5;
}
.bg-opacity-75 {
--bs-bg-opacity: 0.75;
}
.bg-opacity-100 {
--bs-bg-opacity: 1;
}
.bg-gradient { .bg-gradient {
background-image: var(--bs-gradient) !important; background-image: var(--bs-gradient) !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,82 +11,10 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/selector-engine.js * Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -198,7 +126,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine.findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -264,8 +192,20 @@
}; };
const noop = () => {}; const noop = () => {};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -382,7 +322,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/event-handler.js * Bootstrap (v5.1.0): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -671,7 +611,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/data.js * Bootstrap (v5.1.0): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -725,7 +665,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): base-component.js * Bootstrap (v5.1.0): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -735,7 +675,7 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.2'; const VERSION = '5.1.0';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
@ -764,7 +704,7 @@
static getInstance(element) { static getInstance(element) {
return Data.get(element, this.DATA_KEY); return Data.get(getElement(element), this.DATA_KEY);
} }
static getOrCreateInstance(element, config = {}) { static getOrCreateInstance(element, config = {}) {
@ -791,7 +731,33 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): alert.js * Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -801,17 +767,13 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$c = 'alert'; const NAME$d = 'alert';
const DATA_KEY$b = 'bs.alert'; const DATA_KEY$c = 'bs.alert';
const EVENT_KEY$b = `.${DATA_KEY$b}`; const EVENT_KEY$c = `.${DATA_KEY$c}`;
const DATA_API_KEY$8 = '.data-api'; const EVENT_CLOSE = `close${EVENT_KEY$c}`;
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]'; const EVENT_CLOSED = `closed${EVENT_KEY$c}`;
const EVENT_CLOSE = `close${EVENT_KEY$b}`; const CLASS_NAME_FADE$5 = 'fade';
const EVENT_CLOSED = `closed${EVENT_KEY$b}`; const CLASS_NAME_SHOW$8 = 'show';
const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
const CLASS_NAME_ALERT = 'alert';
const CLASS_NAME_FADE$6 = 'fade';
const CLASS_NAME_SHOW$9 = 'show';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -821,41 +783,30 @@
class Alert extends BaseComponent { class Alert extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME$c; return NAME$d;
} // Public } // Public
close(element) { close() {
const rootElement = element ? this._getRootElement(element) : this._element; const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
const customEvent = this._triggerCloseEvent(rootElement); if (closeEvent.defaultPrevented) {
if (customEvent === null || customEvent.defaultPrevented) {
return; return;
} }
this._removeElement(rootElement); this._element.classList.remove(CLASS_NAME_SHOW$8);
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
} // Private } // Private
_getRootElement(element) { _destroyElement() {
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`); this._element.remove();
}
_triggerCloseEvent(element) { EventHandler.trigger(this._element, EVENT_CLOSED);
return EventHandler.trigger(element, EVENT_CLOSE); this.dispose();
}
_removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
this._queueCallback(() => this._destroyElement(element), element, isAnimated);
}
_destroyElement(element) {
element.remove();
EventHandler.trigger(element, EVENT_CLOSED);
} // Static } // Static
@ -863,22 +814,18 @@
return this.each(function () { return this.each(function () {
const data = Alert.getOrCreateInstance(this); const data = Alert.getOrCreateInstance(this);
if (config === 'close') { if (typeof config !== 'string') {
return;
}
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`);
}
data[config](this); data[config](this);
}
}); });
} }
static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
}
alertInstance.close(this);
};
}
} }
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -887,7 +834,7 @@
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert())); enableDismissTrigger(Alert, 'close');
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -899,7 +846,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): button.js * Bootstrap (v5.1.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -909,13 +856,13 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$b = 'button'; const NAME$c = 'button';
const DATA_KEY$a = 'bs.button'; const DATA_KEY$b = 'bs.button';
const EVENT_KEY$a = `.${DATA_KEY$a}`; const EVENT_KEY$b = `.${DATA_KEY$b}`;
const DATA_API_KEY$7 = '.data-api'; const DATA_API_KEY$7 = '.data-api';
const CLASS_NAME_ACTIVE$3 = 'active'; const CLASS_NAME_ACTIVE$3 = 'active';
const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]'; const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`; const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -925,7 +872,7 @@
class Button extends BaseComponent { class Button extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME$b; return NAME$c;
} // Public } // Public
@ -970,7 +917,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/manipulator.js * Bootstrap (v5.1.0): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1028,8 +975,8 @@
offset(element) { offset(element) {
const rect = element.getBoundingClientRect(); const rect = element.getBoundingClientRect();
return { return {
top: rect.top + document.body.scrollTop, top: rect.top + window.pageYOffset,
left: rect.left + document.body.scrollLeft left: rect.left + window.pageXOffset
}; };
}, },
@ -1044,7 +991,77 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): carousel.js * Bootstrap (v5.1.0): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
},
focusableChildren(element) {
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1054,16 +1071,16 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$a = 'carousel'; const NAME$b = 'carousel';
const DATA_KEY$9 = 'bs.carousel'; const DATA_KEY$a = 'bs.carousel';
const EVENT_KEY$9 = `.${DATA_KEY$9}`; const EVENT_KEY$a = `.${DATA_KEY$a}`;
const DATA_API_KEY$6 = '.data-api'; const DATA_API_KEY$6 = '.data-api';
const ARROW_LEFT_KEY = 'ArrowLeft'; const ARROW_LEFT_KEY = 'ArrowLeft';
const ARROW_RIGHT_KEY = 'ArrowRight'; const ARROW_RIGHT_KEY = 'ArrowRight';
const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
const SWIPE_THRESHOLD = 40; const SWIPE_THRESHOLD = 40;
const Default$9 = { const Default$a = {
interval: 5000, interval: 5000,
keyboard: true, keyboard: true,
slide: false, slide: false,
@ -1071,7 +1088,7 @@
wrap: true, wrap: true,
touch: true touch: true
}; };
const DefaultType$9 = { const DefaultType$a = {
interval: '(number|boolean)', interval: '(number|boolean)',
keyboard: 'boolean', keyboard: 'boolean',
slide: '(boolean|string)', slide: '(boolean|string)',
@ -1087,19 +1104,19 @@
[ARROW_LEFT_KEY]: DIRECTION_RIGHT, [ARROW_LEFT_KEY]: DIRECTION_RIGHT,
[ARROW_RIGHT_KEY]: DIRECTION_LEFT [ARROW_RIGHT_KEY]: DIRECTION_LEFT
}; };
const EVENT_SLIDE = `slide${EVENT_KEY$9}`; const EVENT_SLIDE = `slide${EVENT_KEY$a}`;
const EVENT_SLID = `slid${EVENT_KEY$9}`; const EVENT_SLID = `slid${EVENT_KEY$a}`;
const EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`; const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`; const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`; const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`; const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`; const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;
const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`; const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`; const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;
const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`; const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;
const EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`; const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;
const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`; const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;
const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`; const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
const CLASS_NAME_CAROUSEL = 'carousel'; const CLASS_NAME_CAROUSEL = 'carousel';
const CLASS_NAME_ACTIVE$2 = 'active'; const CLASS_NAME_ACTIVE$2 = 'active';
const CLASS_NAME_SLIDE = 'slide'; const CLASS_NAME_SLIDE = 'slide';
@ -1146,11 +1163,11 @@
static get Default() { static get Default() {
return Default$9; return Default$a;
} }
static get NAME() { static get NAME() {
return NAME$a; return NAME$b;
} // Public } // Public
@ -1228,11 +1245,11 @@
_getConfig(config) { _getConfig(config) {
config = { ...Default$9, config = { ...Default$a,
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
typeCheckConfig(NAME$a, config, DefaultType$9); typeCheckConfig(NAME$b, config, DefaultType$a);
return config; return config;
} }
@ -1589,7 +1606,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): collapse.js * Bootstrap (v5.1.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1599,27 +1616,28 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$9 = 'collapse'; const NAME$a = 'collapse';
const DATA_KEY$8 = 'bs.collapse'; const DATA_KEY$9 = 'bs.collapse';
const EVENT_KEY$8 = `.${DATA_KEY$8}`; const EVENT_KEY$9 = `.${DATA_KEY$9}`;
const DATA_API_KEY$5 = '.data-api'; const DATA_API_KEY$5 = '.data-api';
const Default$8 = { const Default$9 = {
toggle: true, toggle: true,
parent: '' parent: null
}; };
const DefaultType$8 = { const DefaultType$9 = {
toggle: 'boolean', toggle: 'boolean',
parent: '(string|element)' parent: '(null|element)'
}; };
const EVENT_SHOW$5 = `show${EVENT_KEY$8}`; const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;
const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`; const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;
const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`; const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;
const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`; const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;
const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`; const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;
const CLASS_NAME_SHOW$8 = 'show'; const CLASS_NAME_SHOW$7 = 'show';
const CLASS_NAME_COLLAPSE = 'collapse'; const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing'; const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed'; const CLASS_NAME_COLLAPSED = 'collapsed';
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width'; const WIDTH = 'width';
const HEIGHT = 'height'; const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.show, .collapsing'; const SELECTOR_ACTIVES = '.show, .collapsing';
@ -1635,7 +1653,7 @@
super(element); super(element);
this._isTransitioning = false; this._isTransitioning = false;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`); this._triggerArray = [];
const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4); const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
for (let i = 0, len = toggleList.length; i < len; i++) { for (let i = 0, len = toggleList.length; i < len; i++) {
@ -1650,10 +1668,10 @@
} }
} }
this._parent = this._config.parent ? this._getParent() : null; this._initializeChildren();
if (!this._config.parent) { if (!this._config.parent) {
this._addAriaAndCollapsedClass(this._element, this._triggerArray); this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
} }
if (this._config.toggle) { if (this._config.toggle) {
@ -1663,16 +1681,16 @@
static get Default() { static get Default() {
return Default$8; return Default$9;
} }
static get NAME() { static get NAME() {
return NAME$9; return NAME$a;
} // Public } // Public
toggle() { toggle() {
if (this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isShown()) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@ -1680,30 +1698,21 @@
} }
show() { show() {
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isTransitioning || this._isShown()) {
return; return;
} }
let actives; let actives = [];
let activesData; let activesData;
if (this._parent) { if (this._config.parent) {
actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => { const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
if (typeof this._config.parent === 'string') { actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
return elem.getAttribute('data-bs-parent') === this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if (actives.length === 0) {
actives = null;
}
} }
const container = SelectorEngine.findOne(this._selector); const container = SelectorEngine.findOne(this._selector);
if (actives) { if (actives.length) {
const tempActiveData = actives.find(elem => container !== elem); const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
@ -1718,17 +1727,17 @@
return; return;
} }
if (actives) {
actives.forEach(elemActive => { actives.forEach(elemActive => {
if (container !== elemActive) { if (container !== elemActive) {
Collapse.collapseInterface(elemActive, 'hide'); Collapse.getOrCreateInstance(elemActive, {
toggle: false
}).hide();
} }
if (!activesData) { if (!activesData) {
Data.set(elemActive, DATA_KEY$8, null); Data.set(elemActive, DATA_KEY$9, null);
} }
}); });
}
const dimension = this._getDimension(); const dimension = this._getDimension();
@ -1738,22 +1747,18 @@
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
if (this._triggerArray.length) { this._addAriaAndCollapsedClass(this._triggerArray, true);
this._triggerArray.forEach(element => {
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8); this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
this._element.style[dimension] = ''; this._element.style[dimension] = '';
this.setTransitioning(false);
EventHandler.trigger(this._element, EVENT_SHOWN$5); EventHandler.trigger(this._element, EVENT_SHOWN$5);
}; };
@ -1766,7 +1771,7 @@
} }
hide() { hide() {
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isTransitioning || !this._isShown()) {
return; return;
} }
@ -1783,26 +1788,23 @@
this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8); this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
const triggerArrayLength = this._triggerArray.length; const triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (let i = 0; i < triggerArrayLength; i++) { for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i]; const trigger = this._triggerArray[i];
const elem = getElementFromSelector(trigger); const elem = getElementFromSelector(trigger);
if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) { if (elem && !this._isShown(elem)) {
trigger.classList.add(CLASS_NAME_COLLAPSED); this._addAriaAndCollapsedClass([trigger], false);
trigger.setAttribute('aria-expanded', false);
}
} }
} }
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this.setTransitioning(false); this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
@ -1816,45 +1818,47 @@
this._queueCallback(complete, this._element, true); this._queueCallback(complete, this._element, true);
} }
setTransitioning(isTransitioning) { _isShown(element = this._element) {
this._isTransitioning = isTransitioning; return element.classList.contains(CLASS_NAME_SHOW$7);
} // Private } // Private
_getConfig(config) { _getConfig(config) {
config = { ...Default$8, config = { ...Default$9,
...Manipulator.getDataAttributes(this._element),
...config ...config
}; };
config.toggle = Boolean(config.toggle); // Coerce string values config.toggle = Boolean(config.toggle); // Coerce string values
typeCheckConfig(NAME$9, config, DefaultType$8); config.parent = getElement(config.parent);
typeCheckConfig(NAME$a, config, DefaultType$9);
return config; return config;
} }
_getDimension() { _getDimension() {
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT; return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
} }
_getParent() { _initializeChildren() {
let { if (!this._config.parent) {
parent return;
} = this._config; }
parent = getElement(parent);
const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`; const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
SelectorEngine.find(selector, parent).forEach(element => { SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
this._addAriaAndCollapsedClass(selected, [element]); if (selected) {
}); this._addAriaAndCollapsedClass([element], this._isShown(selected));
return parent; }
} });
}
_addAriaAndCollapsedClass(element, triggerArray) {
if (!element || !triggerArray.length) { _addAriaAndCollapsedClass(triggerArray, isOpen) {
if (!triggerArray.length) {
return; return;
} }
const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
triggerArray.forEach(elem => { triggerArray.forEach(elem => {
if (isOpen) { if (isOpen) {
elem.classList.remove(CLASS_NAME_COLLAPSED); elem.classList.remove(CLASS_NAME_COLLAPSED);
@ -1867,20 +1871,15 @@
} // Static } // Static
static collapseInterface(element, config) { static jQueryInterface(config) {
let data = Collapse.getInstance(element); return this.each(function () {
const _config = { ...Default$8, const _config = {};
...Manipulator.getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
};
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { if (typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false; _config.toggle = false;
} }
if (!data) { const data = Collapse.getOrCreateInstance(this, _config);
data = new Collapse(element, _config);
}
if (typeof config === 'string') { if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
@ -1889,11 +1888,6 @@
data[config](); data[config]();
} }
}
static jQueryInterface(config) {
return this.each(function () {
Collapse.collapseInterface(this, config);
}); });
} }
@ -1911,26 +1905,12 @@
event.preventDefault(); event.preventDefault();
} }
const triggerData = Manipulator.getDataAttributes(this);
const selector = getSelectorFromElement(this); const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine.find(selector); const selectorElements = SelectorEngine.find(selector);
selectorElements.forEach(element => { selectorElements.forEach(element => {
const data = Collapse.getInstance(element); Collapse.getOrCreateInstance(element, {
let config; toggle: false
}).toggle();
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse.collapseInterface(element, config);
}); });
}); });
/** /**
@ -2098,17 +2078,31 @@
return placement.split('-')[0]; return placement.split('-')[0];
} }
function getBoundingClientRect(element) { var round$1 = Math.round;
function getBoundingClientRect(element, includeScale) {
if (includeScale === void 0) {
includeScale = false;
}
var rect = element.getBoundingClientRect(); var rect = element.getBoundingClientRect();
var scaleX = 1;
var scaleY = 1;
if (isHTMLElement(element) && includeScale) {
// Fallback to 1 in case both values are `0`
scaleX = rect.width / element.offsetWidth || 1;
scaleY = rect.height / element.offsetHeight || 1;
}
return { return {
width: rect.width, width: round$1(rect.width / scaleX),
height: rect.height, height: round$1(rect.height / scaleY),
top: rect.top, top: round$1(rect.top / scaleY),
right: rect.right, right: round$1(rect.right / scaleX),
bottom: rect.bottom, bottom: round$1(rect.bottom / scaleY),
left: rect.left, left: round$1(rect.left / scaleX),
x: rect.left, x: round$1(rect.left / scaleX),
y: rect.top y: round$1(rect.top / scaleY)
}; };
} }
@ -3336,16 +3330,24 @@
} }
} }
function isElementScaled(element) {
var rect = element.getBoundingClientRect();
var scaleX = rect.width / element.offsetWidth || 1;
var scaleY = rect.height / element.offsetHeight || 1;
return scaleX !== 1 || scaleY !== 1;
} // Returns the composite rect of an element relative to its offsetParent.
// Composite means it takes into account transforms as well as layout. // Composite means it takes into account transforms as well as layout.
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
if (isFixed === void 0) { if (isFixed === void 0) {
isFixed = false; isFixed = false;
} }
var documentElement = getDocumentElement(offsetParent);
var rect = getBoundingClientRect(elementOrVirtualElement);
var isOffsetParentAnElement = isHTMLElement(offsetParent); var isOffsetParentAnElement = isHTMLElement(offsetParent);
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
var documentElement = getDocumentElement(offsetParent);
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
var scroll = { var scroll = {
scrollLeft: 0, scrollLeft: 0,
scrollTop: 0 scrollTop: 0
@ -3362,7 +3364,7 @@
} }
if (isHTMLElement(offsetParent)) { if (isHTMLElement(offsetParent)) {
offsets = getBoundingClientRect(offsetParent); offsets = getBoundingClientRect(offsetParent, true);
offsets.x += offsetParent.clientLeft; offsets.x += offsetParent.clientLeft;
offsets.y += offsetParent.clientTop; offsets.y += offsetParent.clientTop;
} else if (documentElement) { } else if (documentElement) {
@ -3698,7 +3700,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dropdown.js * Bootstrap (v5.1.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3708,27 +3710,26 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$8 = 'dropdown'; const NAME$9 = 'dropdown';
const DATA_KEY$7 = 'bs.dropdown'; const DATA_KEY$8 = 'bs.dropdown';
const EVENT_KEY$7 = `.${DATA_KEY$7}`; const EVENT_KEY$8 = `.${DATA_KEY$8}`;
const DATA_API_KEY$4 = '.data-api'; const DATA_API_KEY$4 = '.data-api';
const ESCAPE_KEY$2 = 'Escape'; const ESCAPE_KEY$2 = 'Escape';
const SPACE_KEY = 'Space'; const SPACE_KEY = 'Space';
const TAB_KEY = 'Tab'; const TAB_KEY$1 = 'Tab';
const ARROW_UP_KEY = 'ArrowUp'; const ARROW_UP_KEY = 'ArrowUp';
const ARROW_DOWN_KEY = 'ArrowDown'; const ARROW_DOWN_KEY = 'ArrowDown';
const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`); const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`; const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;
const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`; const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;
const EVENT_SHOW$4 = `show${EVENT_KEY$7}`; const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;
const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`; const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;
const EVENT_CLICK = `click${EVENT_KEY$7}`; const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`; const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`; const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`; const CLASS_NAME_SHOW$6 = 'show';
const CLASS_NAME_SHOW$7 = 'show';
const CLASS_NAME_DROPUP = 'dropup'; const CLASS_NAME_DROPUP = 'dropup';
const CLASS_NAME_DROPEND = 'dropend'; const CLASS_NAME_DROPEND = 'dropend';
const CLASS_NAME_DROPSTART = 'dropstart'; const CLASS_NAME_DROPSTART = 'dropstart';
@ -3743,7 +3744,7 @@
const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'; const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'; const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'; const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
const Default$7 = { const Default$8 = {
offset: [0, 2], offset: [0, 2],
boundary: 'clippingParents', boundary: 'clippingParents',
reference: 'toggle', reference: 'toggle',
@ -3751,7 +3752,7 @@
popperConfig: null, popperConfig: null,
autoClose: true autoClose: true
}; };
const DefaultType$7 = { const DefaultType$8 = {
offset: '(array|string|function)', offset: '(array|string|function)',
boundary: '(string|element)', boundary: '(string|element)',
reference: '(string|element|object)', reference: '(string|element|object)',
@ -3772,45 +3773,31 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._menu = this._getMenuElement(); this._menu = this._getMenuElement();
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
this._addEventListeners();
} // Getters } // Getters
static get Default() { static get Default() {
return Default$7; return Default$8;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType$7; return DefaultType$8;
} }
static get NAME() { static get NAME() {
return NAME$8; return NAME$9;
} // Public } // Public
toggle() { toggle() {
if (isDisabled(this._element)) { return this._isShown() ? this.hide() : this.show();
return;
}
const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
if (isActive) {
this.hide();
return;
}
this.show();
} }
show() { show() {
if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) { if (isDisabled(this._element) || this._isShown(this._menu)) {
return; return;
} }
const parent = Dropdown.getParentFromElement(this._element);
const relatedTarget = { const relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
@ -3818,34 +3805,14 @@
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} // Totally disable Popper for Dropdowns in Navbar }
const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
if (this._inNavbar) { if (this._inNavbar) {
Manipulator.setDataAttribute(this._menu, 'popper', 'none'); Manipulator.setDataAttribute(this._menu, 'popper', 'none');
} else { } else {
if (typeof Popper === 'undefined') { this._createPopper(parent);
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement$1(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}
} // If this is a touch-enabled device we add extra } // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
@ -3860,15 +3827,15 @@
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
this._menu.classList.toggle(CLASS_NAME_SHOW$7); this._menu.classList.add(CLASS_NAME_SHOW$6);
this._element.classList.toggle(CLASS_NAME_SHOW$7); this._element.classList.add(CLASS_NAME_SHOW$6);
EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget); EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
} }
hide() { hide() {
if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) { if (isDisabled(this._element) || !this._isShown(this._menu)) {
return; return;
} }
@ -3896,13 +3863,6 @@
} // Private } // Private
_addEventListeners() {
EventHandler.on(this._element, EVENT_CLICK, event => {
event.preventDefault();
this.toggle();
});
}
_completeHide(relatedTarget) { _completeHide(relatedTarget) {
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget); const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
@ -3920,9 +3880,9 @@
this._popper.destroy(); this._popper.destroy();
} }
this._menu.classList.remove(CLASS_NAME_SHOW$7); this._menu.classList.remove(CLASS_NAME_SHOW$6);
this._element.classList.remove(CLASS_NAME_SHOW$7); this._element.classList.remove(CLASS_NAME_SHOW$6);
this._element.setAttribute('aria-expanded', 'false'); this._element.setAttribute('aria-expanded', 'false');
@ -3935,16 +3895,45 @@
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...config ...config
}; };
typeCheckConfig(NAME$8, config, this.constructor.DefaultType); typeCheckConfig(NAME$9, config, this.constructor.DefaultType);
if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
// Popper virtual elements require a getBoundingClientRect method // Popper virtual elements require a getBoundingClientRect method
throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); throw new TypeError(`${NAME$9.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
} }
return config; return config;
} }
_createPopper(parent) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement$1(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}
}
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW$6);
}
_getMenuElement() { _getMenuElement() {
return SelectorEngine.next(this._element, SELECTOR_MENU)[0]; return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
} }
@ -4034,26 +4023,24 @@
} // Static } // Static
static dropdownInterface(element, config) { static jQueryInterface(config) {
const data = Dropdown.getOrCreateInstance(element, config); return this.each(function () {
const data = Dropdown.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}
}
static jQueryInterface(config) {
return this.each(function () {
Dropdown.dropdownInterface(this, config);
}); });
} }
static clearMenus(event) { static clearMenus(event) {
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {
return; return;
} }
@ -4066,7 +4053,7 @@
continue; continue;
} }
if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) { if (!context._isShown()) {
continue; continue;
} }
@ -4083,7 +4070,7 @@
} // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -4112,7 +4099,7 @@
return; return;
} }
const isActive = this.classList.contains(CLASS_NAME_SHOW$7); const isActive = this.classList.contains(CLASS_NAME_SHOW$6);
if (!isActive && event.key === ESCAPE_KEY$2) { if (!isActive && event.key === ESCAPE_KEY$2) {
return; return;
@ -4125,20 +4112,20 @@
return; return;
} }
const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0]; const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (event.key === ESCAPE_KEY$2) { if (event.key === ESCAPE_KEY$2) {
getToggleButton().focus(); instance.hide();
Dropdown.clearMenus();
return; return;
} }
if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) { if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
if (!isActive) { if (!isActive) {
getToggleButton().click(); instance.show();
} }
Dropdown.getInstance(getToggleButton())._selectMenuItem(event); instance._selectMenuItem(event);
return; return;
} }
@ -4162,7 +4149,7 @@
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
event.preventDefault(); event.preventDefault();
Dropdown.dropdownInterface(this); Dropdown.getOrCreateInstance(this).toggle();
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -4175,7 +4162,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/scrollBar.js * Bootstrap (v5.1.0): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4279,11 +4266,12 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/backdrop.js * Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const Default$6 = { const Default$7 = {
className: 'modal-backdrop',
isVisible: true, isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom // if false, we use the backdrop helper without adding any element to the dom
isAnimated: false, isAnimated: false,
@ -4291,17 +4279,17 @@
// give the choice to place backdrop under different elements // give the choice to place backdrop under different elements
clickCallback: null clickCallback: null
}; };
const DefaultType$6 = { const DefaultType$7 = {
className: 'string',
isVisible: 'boolean', isVisible: 'boolean',
isAnimated: 'boolean', isAnimated: 'boolean',
rootElement: '(element|string)', rootElement: '(element|string)',
clickCallback: '(function|null)' clickCallback: '(function|null)'
}; };
const NAME$7 = 'backdrop'; const NAME$8 = 'backdrop';
const CLASS_NAME_BACKDROP = 'modal-backdrop'; const CLASS_NAME_FADE$4 = 'fade';
const CLASS_NAME_FADE$5 = 'fade'; const CLASS_NAME_SHOW$5 = 'show';
const CLASS_NAME_SHOW$6 = 'show'; const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
class Backdrop { class Backdrop {
constructor(config) { constructor(config) {
@ -4322,7 +4310,7 @@
reflow(this._getElement()); reflow(this._getElement());
} }
this._getElement().classList.add(CLASS_NAME_SHOW$6); this._getElement().classList.add(CLASS_NAME_SHOW$5);
this._emulateAnimation(() => { this._emulateAnimation(() => {
execute(callback); execute(callback);
@ -4335,7 +4323,7 @@
return; return;
} }
this._getElement().classList.remove(CLASS_NAME_SHOW$6); this._getElement().classList.remove(CLASS_NAME_SHOW$5);
this._emulateAnimation(() => { this._emulateAnimation(() => {
this.dispose(); this.dispose();
@ -4347,10 +4335,10 @@
_getElement() { _getElement() {
if (!this._element) { if (!this._element) {
const backdrop = document.createElement('div'); const backdrop = document.createElement('div');
backdrop.className = CLASS_NAME_BACKDROP; backdrop.className = this._config.className;
if (this._config.isAnimated) { if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE$5); backdrop.classList.add(CLASS_NAME_FADE$4);
} }
this._element = backdrop; this._element = backdrop;
@ -4360,12 +4348,12 @@
} }
_getConfig(config) { _getConfig(config) {
config = { ...Default$6, config = { ...Default$7,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; // use getElement() with the default "body" to get a fresh Element on each instantiation }; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement); config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$7, config, DefaultType$6); typeCheckConfig(NAME$8, config, DefaultType$7);
return config; return config;
} }
@ -4374,7 +4362,7 @@
return; return;
} }
this._config.rootElement.appendChild(this._getElement()); this._config.rootElement.append(this._getElement());
EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => { EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
execute(this._config.clickCallback); execute(this._config.clickCallback);
@ -4402,7 +4390,110 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): modal.js * Bootstrap (v5.1.0): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$6 = {
trapElement: null,
// The element to trap focus inside of
autofocus: true
};
const DefaultType$6 = {
trapElement: 'element',
autofocus: 'boolean'
};
const NAME$7 = 'focustrap';
const DATA_KEY$7 = 'bs.focustrap';
const EVENT_KEY$7 = `.${DATA_KEY$7}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;
const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;
const TAB_KEY = 'Tab';
const TAB_NAV_FORWARD = 'forward';
const TAB_NAV_BACKWARD = 'backward';
class FocusTrap {
constructor(config) {
this._config = this._getConfig(config);
this._isActive = false;
this._lastTabNavDirection = null;
}
activate() {
const {
trapElement,
autofocus
} = this._config;
if (this._isActive) {
return;
}
if (autofocus) {
trapElement.focus();
}
EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));
EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
this._isActive = true;
}
deactivate() {
if (!this._isActive) {
return;
}
this._isActive = false;
EventHandler.off(document, EVENT_KEY$7);
} // Private
_handleFocusin(event) {
const {
target
} = event;
const {
trapElement
} = this._config;
if (target === document || target === trapElement || trapElement.contains(target)) {
return;
}
const elements = SelectorEngine.focusableChildren(trapElement);
if (elements.length === 0) {
trapElement.focus();
} else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
elements[elements.length - 1].focus();
} else {
elements[0].focus();
}
}
_handleKeydown(event) {
if (event.key !== TAB_KEY) {
return;
}
this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
}
_getConfig(config) {
config = { ...Default$6,
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME$7, config, DefaultType$6);
return config;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4432,21 +4523,19 @@
const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`; const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
const CLASS_NAME_OPEN = 'modal-open'; const CLASS_NAME_OPEN = 'modal-open';
const CLASS_NAME_FADE$4 = 'fade'; const CLASS_NAME_FADE$3 = 'fade';
const CLASS_NAME_SHOW$5 = 'show'; const CLASS_NAME_SHOW$4 = 'show';
const CLASS_NAME_STATIC = 'modal-static'; const CLASS_NAME_STATIC = 'modal-static';
const SELECTOR_DIALOG = '.modal-dialog'; const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body'; const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]'; const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -4459,6 +4548,7 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element); this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._isShown = false; this._isShown = false;
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
this._isTransitioning = false; this._isTransitioning = false;
@ -4508,7 +4598,6 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => { EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => { EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
if (event.target === this._element) { if (event.target === this._element) {
@ -4520,11 +4609,7 @@
this._showBackdrop(() => this._showElement(relatedTarget)); this._showBackdrop(() => this._showElement(relatedTarget));
} }
hide(event) { hide() {
if (event && ['A', 'AREA'].includes(event.target.tagName)) {
event.preventDefault();
}
if (!this._isShown || this._isTransitioning) { if (!this._isShown || this._isTransitioning) {
return; return;
} }
@ -4547,11 +4632,11 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$2); this._focustrap.deactivate();
this._element.classList.remove(CLASS_NAME_SHOW$5); this._element.classList.remove(CLASS_NAME_SHOW$4);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2); EventHandler.off(this._element, EVENT_CLICK_DISMISS);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
this._queueCallback(() => this._hideModal(), this._element, isAnimated); this._queueCallback(() => this._hideModal(), this._element, isAnimated);
@ -4562,14 +4647,9 @@
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); this._focustrap.deactivate();
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
EventHandler.off(document, EVENT_FOCUSIN$2); super.dispose();
} }
handleUpdate() { handleUpdate() {
@ -4585,6 +4665,12 @@
}); });
} }
_initializeFocusTrap() {
return new FocusTrap({
trapElement: this._element
});
}
_getConfig(config) { _getConfig(config) {
config = { ...Default$5, config = { ...Default$5,
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
@ -4601,7 +4687,7 @@
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position // Don't move modal's DOM position
document.body.appendChild(this._element); document.body.append(this._element);
} }
this._element.style.display = 'block'; this._element.style.display = 'block';
@ -4622,15 +4708,11 @@
reflow(this._element); reflow(this._element);
} }
this._element.classList.add(CLASS_NAME_SHOW$5); this._element.classList.add(CLASS_NAME_SHOW$4);
if (this._config.focus) {
this._enforceFocus();
}
const transitionComplete = () => { const transitionComplete = () => {
if (this._config.focus) { if (this._config.focus) {
this._element.focus(); this._focustrap.activate();
} }
this._isTransitioning = false; this._isTransitioning = false;
@ -4642,16 +4724,6 @@
this._queueCallback(transitionComplete, this._dialog, isAnimated); this._queueCallback(transitionComplete, this._dialog, isAnimated);
} }
_enforceFocus() {
EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$2, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus();
}
});
}
_setEscapeEvent() { _setEscapeEvent() {
if (this._isShown) { if (this._isShown) {
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
@ -4698,7 +4770,7 @@
} }
_showBackdrop(callback) { _showBackdrop(callback) {
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => { EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
if (this._ignoreBackdropClick) { if (this._ignoreBackdropClick) {
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
return; return;
@ -4719,7 +4791,7 @@
} }
_isAnimated() { _isAnimated() {
return this._element.classList.contains(CLASS_NAME_FADE$4); return this._element.classList.contains(CLASS_NAME_FADE$3);
} }
_triggerBackdropTransition() { _triggerBackdropTransition() {
@ -4830,6 +4902,7 @@
const data = Modal.getOrCreateInstance(target); const data = Modal.getOrCreateInstance(target);
data.toggle(this); data.toggle(this);
}); });
enableDismissTrigger(Modal);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -4841,7 +4914,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): offcanvas.js * Bootstrap (v5.1.0): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4867,17 +4940,15 @@
keyboard: 'boolean', keyboard: 'boolean',
scroll: 'boolean' scroll: 'boolean'
}; };
const CLASS_NAME_SHOW$4 = 'show'; const CLASS_NAME_SHOW$3 = 'show';
const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
const OPEN_SELECTOR = '.offcanvas.show'; const OPEN_SELECTOR = '.offcanvas.show';
const EVENT_SHOW$2 = `show${EVENT_KEY$5}`; const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]'; const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -4891,6 +4962,7 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._isShown = false; this._isShown = false;
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._addEventListeners(); this._addEventListeners();
} // Getters } // Getters
@ -4929,8 +5001,6 @@
if (!this._config.scroll) { if (!this._config.scroll) {
new ScrollBarHelper().hide(); new ScrollBarHelper().hide();
this._enforceFocusOnElement(this._element);
} }
this._element.removeAttribute('aria-hidden'); this._element.removeAttribute('aria-hidden');
@ -4939,9 +5009,13 @@
this._element.setAttribute('role', 'dialog'); this._element.setAttribute('role', 'dialog');
this._element.classList.add(CLASS_NAME_SHOW$4); this._element.classList.add(CLASS_NAME_SHOW$3);
const completeCallBack = () => { const completeCallBack = () => {
if (!this._config.scroll) {
this._focustrap.activate();
}
EventHandler.trigger(this._element, EVENT_SHOWN$2, { EventHandler.trigger(this._element, EVENT_SHOWN$2, {
relatedTarget relatedTarget
}); });
@ -4961,13 +5035,13 @@
return; return;
} }
EventHandler.off(document, EVENT_FOCUSIN$1); this._focustrap.deactivate();
this._element.blur(); this._element.blur();
this._isShown = false; this._isShown = false;
this._element.classList.remove(CLASS_NAME_SHOW$4); this._element.classList.remove(CLASS_NAME_SHOW$3);
this._backdrop.hide(); this._backdrop.hide();
@ -4993,8 +5067,9 @@
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
this._focustrap.deactivate();
super.dispose(); super.dispose();
EventHandler.off(document, EVENT_FOCUSIN$1);
} // Private } // Private
@ -5009,6 +5084,7 @@
_initializeBackDrop() { _initializeBackDrop() {
return new Backdrop({ return new Backdrop({
className: CLASS_NAME_BACKDROP,
isVisible: this._config.backdrop, isVisible: this._config.backdrop,
isAnimated: true, isAnimated: true,
rootElement: this._element.parentNode, rootElement: this._element.parentNode,
@ -5016,19 +5092,13 @@
}); });
} }
_enforceFocusOnElement(element) { _initializeFocusTrap() {
EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop return new FocusTrap({
trapElement: this._element
EventHandler.on(document, EVENT_FOCUSIN$1, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus();
}
}); });
element.focus();
} }
_addEventListeners() { _addEventListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
if (this._config.keyboard && event.key === ESCAPE_KEY) { if (this._config.keyboard && event.key === ESCAPE_KEY) {
this.hide(); this.hide();
@ -5089,6 +5159,7 @@
data.toggle(this); data.toggle(this);
}); });
EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show())); EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
enableDismissTrigger(Offcanvas);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -5099,7 +5170,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/sanitizer.js * Bootstrap (v5.1.0): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -5212,7 +5283,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tooltip.js * Bootstrap (v5.1.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -5226,7 +5297,6 @@
const DATA_KEY$4 = 'bs.tooltip'; const DATA_KEY$4 = 'bs.tooltip';
const EVENT_KEY$4 = `.${DATA_KEY$4}`; const EVENT_KEY$4 = `.${DATA_KEY$4}`;
const CLASS_PREFIX$1 = 'bs-tooltip'; const CLASS_PREFIX$1 = 'bs-tooltip';
const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
const DefaultType$3 = { const DefaultType$3 = {
animation: 'boolean', animation: 'boolean',
@ -5285,12 +5355,14 @@
MOUSEENTER: `mouseenter${EVENT_KEY$4}`, MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$4}` MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
}; };
const CLASS_NAME_FADE$3 = 'fade'; const CLASS_NAME_FADE$2 = 'fade';
const CLASS_NAME_MODAL = 'modal'; const CLASS_NAME_MODAL = 'modal';
const CLASS_NAME_SHOW$3 = 'show'; const CLASS_NAME_SHOW$2 = 'show';
const HOVER_STATE_SHOW = 'show'; const HOVER_STATE_SHOW = 'show';
const HOVER_STATE_OUT = 'out'; const HOVER_STATE_OUT = 'out';
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
const EVENT_MODAL_HIDE = 'hide.bs.modal';
const TRIGGER_HOVER = 'hover'; const TRIGGER_HOVER = 'hover';
const TRIGGER_FOCUS = 'focus'; const TRIGGER_FOCUS = 'focus';
const TRIGGER_CLICK = 'click'; const TRIGGER_CLICK = 'click';
@ -5367,7 +5439,7 @@
context._leave(null, context); context._leave(null, context);
} }
} else { } else {
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) { if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {
this._leave(null, this); this._leave(null, this);
return; return;
@ -5379,7 +5451,7 @@
dispose() { dispose() {
clearTimeout(this._timeout); clearTimeout(this._timeout);
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this.tip) { if (this.tip) {
this.tip.remove(); this.tip.remove();
@ -5415,10 +5487,8 @@
this._element.setAttribute('aria-describedby', tipId); this._element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this._config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE$3); tip.classList.add(CLASS_NAME_FADE$2);
} }
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
@ -5433,7 +5503,7 @@
Data.set(tip, this.constructor.DATA_KEY, this); Data.set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip); container.append(tip);
EventHandler.trigger(this._element, this.constructor.Event.INSERTED); EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
} }
@ -5443,8 +5513,9 @@
this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment)); this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment));
} }
tip.classList.add(CLASS_NAME_SHOW$3); tip.classList.add(CLASS_NAME_SHOW$2);
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
const customClass = this._resolvePossibleFunction(this._config.customClass);
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -5470,7 +5541,7 @@
} }
}; };
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3); const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
this._queueCallback(complete, this.tip, isAnimated); this._queueCallback(complete, this.tip, isAnimated);
} }
@ -5510,7 +5581,7 @@
return; return;
} }
tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
@ -5520,7 +5591,7 @@
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3); const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
this._queueCallback(complete, this.tip, isAnimated); this._queueCallback(complete, this.tip, isAnimated);
@ -5545,14 +5616,27 @@
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this._config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; const tip = element.children[0];
this.setContent(tip);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
this.tip = tip;
return this.tip; return this.tip;
} }
setContent() { setContent(tip) {
const tip = this.getTipElement(); this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()); }
tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
_sanitizeAndSetContent(template, content, selector) {
const templateElement = SelectorEngine.findOne(selector, template);
if (!content && templateElement) {
templateElement.remove();
return;
} // we use append for html objects to maintain js events
this.setElementContent(templateElement, content);
} }
setElementContent(element, content) { setElementContent(element, content) {
@ -5566,7 +5650,7 @@
if (this._config.html) { if (this._config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.append(content);
} }
} else { } else {
element.textContent = content.textContent; element.textContent = content.textContent;
@ -5587,13 +5671,9 @@
} }
getTitle() { getTitle() {
let title = this._element.getAttribute('data-bs-original-title'); const title = this._element.getAttribute('data-bs-original-title') || this._config.title;
if (!title) { return this._resolvePossibleFunction(title);
title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
}
return title;
} }
updateAttachment(attachment) { updateAttachment(attachment) {
@ -5610,15 +5690,7 @@
_initializeOnDelegatedTarget(event, context) { _initializeOnDelegatedTarget(event, context) {
const dataKey = this.constructor.DATA_KEY; return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
context = context || Data.get(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.set(event.delegateTarget, dataKey, context);
}
return context;
} }
_getOffset() { _getOffset() {
@ -5637,6 +5709,10 @@
return offset; return offset;
} }
_resolvePossibleFunction(content) {
return typeof content === 'function' ? content.call(this._element) : content;
}
_getPopperConfig(attachment) { _getPopperConfig(attachment) {
const defaultBsPopperConfig = { const defaultBsPopperConfig = {
placement: attachment, placement: attachment,
@ -5678,7 +5754,7 @@
} }
_addAttachmentClass(attachment) { _addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);
} }
_getAttachment(placement) { _getAttachment(placement) {
@ -5705,7 +5781,7 @@
} }
}; };
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this._config.selector) { if (this._config.selector) {
this._config = { ...this._config, this._config = { ...this._config,
@ -5740,7 +5816,7 @@
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
} }
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) { if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
return; return;
} }
@ -5836,26 +5912,32 @@
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this._config) {
for (const key in this._config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this._config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this._config[key]; config[key] = this._config[key];
} }
} } // In the future can be replaced with:
} // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
// `Object.fromEntries(keysWithDifferentValues)`
return config; return config;
} }
_cleanTipClass() { _cleanTipClass() {
const tip = this.getTipElement(); const tip = this.getTipElement();
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1); const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g');
const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);
if (tabClass !== null && tabClass.length > 0) { if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass)); tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
} }
} }
_getBasicClassPrefix() {
return CLASS_PREFIX$1;
}
_handlePopperPlacementChange(popperData) { _handlePopperPlacementChange(popperData) {
const { const {
state state
@ -5900,7 +5982,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): popover.js * Bootstrap (v5.1.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -5914,7 +5996,6 @@
const DATA_KEY$3 = 'bs.popover'; const DATA_KEY$3 = 'bs.popover';
const EVENT_KEY$3 = `.${DATA_KEY$3}`; const EVENT_KEY$3 = `.${DATA_KEY$3}`;
const CLASS_PREFIX = 'bs-popover'; const CLASS_PREFIX = 'bs-popover';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const Default$2 = { ...Tooltip.Default, const Default$2 = { ...Tooltip.Default,
placement: 'right', placement: 'right',
offset: [0, 8], offset: [0, 8],
@ -5937,8 +6018,6 @@
MOUSEENTER: `mouseenter${EVENT_KEY$3}`, MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$3}` MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
}; };
const CLASS_NAME_FADE$2 = 'fade';
const CLASS_NAME_SHOW$2 = 'show';
const SELECTOR_TITLE = '.popover-header'; const SELECTOR_TITLE = '.popover-header';
const SELECTOR_CONTENT = '.popover-body'; const SELECTOR_CONTENT = '.popover-body';
/** /**
@ -5970,55 +6049,19 @@
return this.getTitle() || this._getContent(); return this.getTitle() || this._getContent();
} }
getTipElement() { setContent(tip) {
if (this.tip) { this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
return this.tip;
}
this.tip = super.getTipElement(); this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
if (!this.getTitle()) {
SelectorEngine.findOne(SELECTOR_TITLE, this.tip).remove();
}
if (!this._getContent()) {
SelectorEngine.findOne(SELECTOR_CONTENT, this.tip).remove();
}
return this.tip;
}
setContent() {
const tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
let content = this._getContent();
if (typeof content === 'function') {
content = content.call(this._element);
}
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
} // Private } // Private
_addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this._config.content; return this._resolvePossibleFunction(this._config.content);
} }
_cleanTipClass() { _getBasicClassPrefix() {
const tip = this.getTipElement(); return CLASS_PREFIX;
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
} // Static } // Static
@ -6049,7 +6092,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): scrollspy.js * Bootstrap (v5.1.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6083,6 +6126,7 @@
const SELECTOR_NAV_LINKS = '.nav-link'; const SELECTOR_NAV_LINKS = '.nav-link';
const SELECTOR_NAV_ITEMS = '.nav-item'; const SELECTOR_NAV_ITEMS = '.nav-item';
const SELECTOR_LIST_ITEMS = '.list-group-item'; const SELECTOR_LIST_ITEMS = '.list-group-item';
const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;
const SELECTOR_DROPDOWN$1 = '.dropdown'; const SELECTOR_DROPDOWN$1 = '.dropdown';
const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
const METHOD_OFFSET = 'offset'; const METHOD_OFFSET = 'offset';
@ -6098,7 +6142,6 @@
super(element); super(element);
this._scrollElement = this._element.tagName === 'BODY' ? window : this._element; this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._activeTarget = null; this._activeTarget = null;
@ -6126,7 +6169,7 @@
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._scrollHeight = this._getScrollHeight(); this._scrollHeight = this._getScrollHeight();
const targets = SelectorEngine.find(this._selector); const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);
targets.map(element => { targets.map(element => {
const targetSelector = getSelectorFromElement(element); const targetSelector = getSelectorFromElement(element);
const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null; const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
@ -6158,20 +6201,7 @@
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.target = getElement(config.target) || document.documentElement;
if (typeof config.target !== 'string' && isElement$1(config.target)) {
let {
id
} = config.target;
if (!id) {
id = getUID(NAME$2);
config.target.id = id;
}
config.target = `#${id}`;
}
typeCheckConfig(NAME$2, config, DefaultType$1); typeCheckConfig(NAME$2, config, DefaultType$1);
return config; return config;
} }
@ -6231,16 +6261,13 @@
this._clear(); this._clear();
const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`); const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
const link = SelectorEngine.findOne(queries.join(','), this._config.target);
const link = SelectorEngine.findOne(queries.join(',')); link.classList.add(CLASS_NAME_ACTIVE$1);
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1); SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
link.classList.add(CLASS_NAME_ACTIVE$1);
} else { } else {
// Set triggered link as active
link.classList.add(CLASS_NAME_ACTIVE$1);
SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => { SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
// Set triggered links parents as active // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
@ -6258,7 +6285,7 @@
} }
_clear() { _clear() {
SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1)); SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
} // Static } // Static
@ -6300,7 +6327,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tab.js * Bootstrap (v5.1.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6498,7 +6525,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): toast.js * Bootstrap (v5.1.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -6511,7 +6538,6 @@
const NAME = 'toast'; const NAME = 'toast';
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`; const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`; const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`; const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
@ -6521,7 +6547,8 @@
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_HIDE = 'hide'; const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_SHOWING = 'showing'; const CLASS_NAME_SHOWING = 'showing';
const DefaultType = { const DefaultType = {
@ -6534,7 +6561,6 @@
autohide: true, autohide: true,
delay: 5000 delay: 5000
}; };
const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -6582,17 +6608,18 @@
const complete = () => { const complete = () => {
this._element.classList.remove(CLASS_NAME_SHOWING); this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.add(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
this._maybeScheduleHide(); this._maybeScheduleHide();
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
reflow(this._element); reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
@ -6610,12 +6637,17 @@
} }
const complete = () => { const complete = () => {
this._element.classList.add(CLASS_NAME_HIDE); this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.remove(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_HIDDEN); EventHandler.trigger(this._element, EVENT_HIDDEN);
}; };
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
} }
@ -6683,7 +6715,6 @@
} }
_setListeners() { _setListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
@ -6711,6 +6742,8 @@
} }
} }
enableDismissTrigger(Toast);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -6718,12 +6751,11 @@
* add .Toast to jQuery only if jQuery is present * add .Toast to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(Toast); defineJQueryPlugin(Toast);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): index.umd.js * Bootstrap (v5.1.0): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1144
dist/js/bootstrap.esm.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -7,82 +7,10 @@ import * as Popper from '@popperjs/core';
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/selector-engine.js * Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -194,7 +122,7 @@ const getElement = obj => {
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine.findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -260,8 +188,20 @@ const findShadowRoot = element => {
}; };
const noop = () => {}; const noop = () => {};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -378,7 +318,7 @@ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/event-handler.js * Bootstrap (v5.1.0): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -667,7 +607,7 @@ const EventHandler = {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/data.js * Bootstrap (v5.1.0): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -721,7 +661,7 @@ var Data = {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): base-component.js * Bootstrap (v5.1.0): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -731,7 +671,7 @@ var Data = {
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.2'; const VERSION = '5.1.0';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
@ -760,7 +700,7 @@ class BaseComponent {
static getInstance(element) { static getInstance(element) {
return Data.get(element, this.DATA_KEY); return Data.get(getElement(element), this.DATA_KEY);
} }
static getOrCreateInstance(element, config = {}) { static getOrCreateInstance(element, config = {}) {
@ -787,7 +727,33 @@ class BaseComponent {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): alert.js * Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -797,17 +763,13 @@ class BaseComponent {
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$c = 'alert'; const NAME$d = 'alert';
const DATA_KEY$b = 'bs.alert'; const DATA_KEY$c = 'bs.alert';
const EVENT_KEY$b = `.${DATA_KEY$b}`; const EVENT_KEY$c = `.${DATA_KEY$c}`;
const DATA_API_KEY$8 = '.data-api'; const EVENT_CLOSE = `close${EVENT_KEY$c}`;
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]'; const EVENT_CLOSED = `closed${EVENT_KEY$c}`;
const EVENT_CLOSE = `close${EVENT_KEY$b}`; const CLASS_NAME_FADE$5 = 'fade';
const EVENT_CLOSED = `closed${EVENT_KEY$b}`; const CLASS_NAME_SHOW$8 = 'show';
const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
const CLASS_NAME_ALERT = 'alert';
const CLASS_NAME_FADE$6 = 'fade';
const CLASS_NAME_SHOW$9 = 'show';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -817,41 +779,30 @@ const CLASS_NAME_SHOW$9 = 'show';
class Alert extends BaseComponent { class Alert extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME$c; return NAME$d;
} // Public } // Public
close(element) { close() {
const rootElement = element ? this._getRootElement(element) : this._element; const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
const customEvent = this._triggerCloseEvent(rootElement); if (closeEvent.defaultPrevented) {
if (customEvent === null || customEvent.defaultPrevented) {
return; return;
} }
this._removeElement(rootElement); this._element.classList.remove(CLASS_NAME_SHOW$8);
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
} // Private } // Private
_getRootElement(element) { _destroyElement() {
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`); this._element.remove();
}
_triggerCloseEvent(element) { EventHandler.trigger(this._element, EVENT_CLOSED);
return EventHandler.trigger(element, EVENT_CLOSE); this.dispose();
}
_removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
this._queueCallback(() => this._destroyElement(element), element, isAnimated);
}
_destroyElement(element) {
element.remove();
EventHandler.trigger(element, EVENT_CLOSED);
} // Static } // Static
@ -859,22 +810,18 @@ class Alert extends BaseComponent {
return this.each(function () { return this.each(function () {
const data = Alert.getOrCreateInstance(this); const data = Alert.getOrCreateInstance(this);
if (config === 'close') { if (typeof config !== 'string') {
return;
}
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`);
}
data[config](this); data[config](this);
}
}); });
} }
static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
}
alertInstance.close(this);
};
}
} }
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -883,7 +830,7 @@ class Alert extends BaseComponent {
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert())); enableDismissTrigger(Alert, 'close');
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -895,7 +842,7 @@ defineJQueryPlugin(Alert);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): button.js * Bootstrap (v5.1.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -905,13 +852,13 @@ defineJQueryPlugin(Alert);
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$b = 'button'; const NAME$c = 'button';
const DATA_KEY$a = 'bs.button'; const DATA_KEY$b = 'bs.button';
const EVENT_KEY$a = `.${DATA_KEY$a}`; const EVENT_KEY$b = `.${DATA_KEY$b}`;
const DATA_API_KEY$7 = '.data-api'; const DATA_API_KEY$7 = '.data-api';
const CLASS_NAME_ACTIVE$3 = 'active'; const CLASS_NAME_ACTIVE$3 = 'active';
const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]'; const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`; const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -921,7 +868,7 @@ const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;
class Button extends BaseComponent { class Button extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME$b; return NAME$c;
} // Public } // Public
@ -966,7 +913,7 @@ defineJQueryPlugin(Button);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/manipulator.js * Bootstrap (v5.1.0): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1024,8 +971,8 @@ const Manipulator = {
offset(element) { offset(element) {
const rect = element.getBoundingClientRect(); const rect = element.getBoundingClientRect();
return { return {
top: rect.top + document.body.scrollTop, top: rect.top + window.pageYOffset,
left: rect.left + document.body.scrollLeft left: rect.left + window.pageXOffset
}; };
}, },
@ -1040,7 +987,77 @@ const Manipulator = {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): carousel.js * Bootstrap (v5.1.0): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
},
focusableChildren(element) {
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1050,16 +1067,16 @@ const Manipulator = {
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$a = 'carousel'; const NAME$b = 'carousel';
const DATA_KEY$9 = 'bs.carousel'; const DATA_KEY$a = 'bs.carousel';
const EVENT_KEY$9 = `.${DATA_KEY$9}`; const EVENT_KEY$a = `.${DATA_KEY$a}`;
const DATA_API_KEY$6 = '.data-api'; const DATA_API_KEY$6 = '.data-api';
const ARROW_LEFT_KEY = 'ArrowLeft'; const ARROW_LEFT_KEY = 'ArrowLeft';
const ARROW_RIGHT_KEY = 'ArrowRight'; const ARROW_RIGHT_KEY = 'ArrowRight';
const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
const SWIPE_THRESHOLD = 40; const SWIPE_THRESHOLD = 40;
const Default$9 = { const Default$a = {
interval: 5000, interval: 5000,
keyboard: true, keyboard: true,
slide: false, slide: false,
@ -1067,7 +1084,7 @@ const Default$9 = {
wrap: true, wrap: true,
touch: true touch: true
}; };
const DefaultType$9 = { const DefaultType$a = {
interval: '(number|boolean)', interval: '(number|boolean)',
keyboard: 'boolean', keyboard: 'boolean',
slide: '(boolean|string)', slide: '(boolean|string)',
@ -1083,19 +1100,19 @@ const KEY_TO_DIRECTION = {
[ARROW_LEFT_KEY]: DIRECTION_RIGHT, [ARROW_LEFT_KEY]: DIRECTION_RIGHT,
[ARROW_RIGHT_KEY]: DIRECTION_LEFT [ARROW_RIGHT_KEY]: DIRECTION_LEFT
}; };
const EVENT_SLIDE = `slide${EVENT_KEY$9}`; const EVENT_SLIDE = `slide${EVENT_KEY$a}`;
const EVENT_SLID = `slid${EVENT_KEY$9}`; const EVENT_SLID = `slid${EVENT_KEY$a}`;
const EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`; const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`; const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`; const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`; const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`; const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;
const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`; const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`; const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;
const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`; const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;
const EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`; const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;
const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`; const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;
const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`; const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
const CLASS_NAME_CAROUSEL = 'carousel'; const CLASS_NAME_CAROUSEL = 'carousel';
const CLASS_NAME_ACTIVE$2 = 'active'; const CLASS_NAME_ACTIVE$2 = 'active';
const CLASS_NAME_SLIDE = 'slide'; const CLASS_NAME_SLIDE = 'slide';
@ -1142,11 +1159,11 @@ class Carousel extends BaseComponent {
static get Default() { static get Default() {
return Default$9; return Default$a;
} }
static get NAME() { static get NAME() {
return NAME$a; return NAME$b;
} // Public } // Public
@ -1224,11 +1241,11 @@ class Carousel extends BaseComponent {
_getConfig(config) { _getConfig(config) {
config = { ...Default$9, config = { ...Default$a,
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
typeCheckConfig(NAME$a, config, DefaultType$9); typeCheckConfig(NAME$b, config, DefaultType$a);
return config; return config;
} }
@ -1585,7 +1602,7 @@ defineJQueryPlugin(Carousel);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): collapse.js * Bootstrap (v5.1.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1595,27 +1612,28 @@ defineJQueryPlugin(Carousel);
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$9 = 'collapse'; const NAME$a = 'collapse';
const DATA_KEY$8 = 'bs.collapse'; const DATA_KEY$9 = 'bs.collapse';
const EVENT_KEY$8 = `.${DATA_KEY$8}`; const EVENT_KEY$9 = `.${DATA_KEY$9}`;
const DATA_API_KEY$5 = '.data-api'; const DATA_API_KEY$5 = '.data-api';
const Default$8 = { const Default$9 = {
toggle: true, toggle: true,
parent: '' parent: null
}; };
const DefaultType$8 = { const DefaultType$9 = {
toggle: 'boolean', toggle: 'boolean',
parent: '(string|element)' parent: '(null|element)'
}; };
const EVENT_SHOW$5 = `show${EVENT_KEY$8}`; const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;
const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`; const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;
const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`; const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;
const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`; const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;
const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`; const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;
const CLASS_NAME_SHOW$8 = 'show'; const CLASS_NAME_SHOW$7 = 'show';
const CLASS_NAME_COLLAPSE = 'collapse'; const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing'; const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed'; const CLASS_NAME_COLLAPSED = 'collapsed';
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width'; const WIDTH = 'width';
const HEIGHT = 'height'; const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.show, .collapsing'; const SELECTOR_ACTIVES = '.show, .collapsing';
@ -1631,7 +1649,7 @@ class Collapse extends BaseComponent {
super(element); super(element);
this._isTransitioning = false; this._isTransitioning = false;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`); this._triggerArray = [];
const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4); const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
for (let i = 0, len = toggleList.length; i < len; i++) { for (let i = 0, len = toggleList.length; i < len; i++) {
@ -1646,10 +1664,10 @@ class Collapse extends BaseComponent {
} }
} }
this._parent = this._config.parent ? this._getParent() : null; this._initializeChildren();
if (!this._config.parent) { if (!this._config.parent) {
this._addAriaAndCollapsedClass(this._element, this._triggerArray); this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
} }
if (this._config.toggle) { if (this._config.toggle) {
@ -1659,16 +1677,16 @@ class Collapse extends BaseComponent {
static get Default() { static get Default() {
return Default$8; return Default$9;
} }
static get NAME() { static get NAME() {
return NAME$9; return NAME$a;
} // Public } // Public
toggle() { toggle() {
if (this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isShown()) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@ -1676,30 +1694,21 @@ class Collapse extends BaseComponent {
} }
show() { show() {
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isTransitioning || this._isShown()) {
return; return;
} }
let actives; let actives = [];
let activesData; let activesData;
if (this._parent) { if (this._config.parent) {
actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => { const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
if (typeof this._config.parent === 'string') { actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
return elem.getAttribute('data-bs-parent') === this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if (actives.length === 0) {
actives = null;
}
} }
const container = SelectorEngine.findOne(this._selector); const container = SelectorEngine.findOne(this._selector);
if (actives) { if (actives.length) {
const tempActiveData = actives.find(elem => container !== elem); const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
@ -1714,17 +1723,17 @@ class Collapse extends BaseComponent {
return; return;
} }
if (actives) {
actives.forEach(elemActive => { actives.forEach(elemActive => {
if (container !== elemActive) { if (container !== elemActive) {
Collapse.collapseInterface(elemActive, 'hide'); Collapse.getOrCreateInstance(elemActive, {
toggle: false
}).hide();
} }
if (!activesData) { if (!activesData) {
Data.set(elemActive, DATA_KEY$8, null); Data.set(elemActive, DATA_KEY$9, null);
} }
}); });
}
const dimension = this._getDimension(); const dimension = this._getDimension();
@ -1734,22 +1743,18 @@ class Collapse extends BaseComponent {
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
if (this._triggerArray.length) { this._addAriaAndCollapsedClass(this._triggerArray, true);
this._triggerArray.forEach(element => {
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8); this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
this._element.style[dimension] = ''; this._element.style[dimension] = '';
this.setTransitioning(false);
EventHandler.trigger(this._element, EVENT_SHOWN$5); EventHandler.trigger(this._element, EVENT_SHOWN$5);
}; };
@ -1762,7 +1767,7 @@ class Collapse extends BaseComponent {
} }
hide() { hide() {
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isTransitioning || !this._isShown()) {
return; return;
} }
@ -1779,26 +1784,23 @@ class Collapse extends BaseComponent {
this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8); this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
const triggerArrayLength = this._triggerArray.length; const triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (let i = 0; i < triggerArrayLength; i++) { for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i]; const trigger = this._triggerArray[i];
const elem = getElementFromSelector(trigger); const elem = getElementFromSelector(trigger);
if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) { if (elem && !this._isShown(elem)) {
trigger.classList.add(CLASS_NAME_COLLAPSED); this._addAriaAndCollapsedClass([trigger], false);
trigger.setAttribute('aria-expanded', false);
}
} }
} }
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this.setTransitioning(false); this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
@ -1812,45 +1814,47 @@ class Collapse extends BaseComponent {
this._queueCallback(complete, this._element, true); this._queueCallback(complete, this._element, true);
} }
setTransitioning(isTransitioning) { _isShown(element = this._element) {
this._isTransitioning = isTransitioning; return element.classList.contains(CLASS_NAME_SHOW$7);
} // Private } // Private
_getConfig(config) { _getConfig(config) {
config = { ...Default$8, config = { ...Default$9,
...Manipulator.getDataAttributes(this._element),
...config ...config
}; };
config.toggle = Boolean(config.toggle); // Coerce string values config.toggle = Boolean(config.toggle); // Coerce string values
typeCheckConfig(NAME$9, config, DefaultType$8); config.parent = getElement(config.parent);
typeCheckConfig(NAME$a, config, DefaultType$9);
return config; return config;
} }
_getDimension() { _getDimension() {
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT; return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
} }
_getParent() { _initializeChildren() {
let { if (!this._config.parent) {
parent return;
} = this._config; }
parent = getElement(parent);
const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`; const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
SelectorEngine.find(selector, parent).forEach(element => { SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
this._addAriaAndCollapsedClass(selected, [element]); if (selected) {
}); this._addAriaAndCollapsedClass([element], this._isShown(selected));
return parent; }
} });
}
_addAriaAndCollapsedClass(element, triggerArray) {
if (!element || !triggerArray.length) { _addAriaAndCollapsedClass(triggerArray, isOpen) {
if (!triggerArray.length) {
return; return;
} }
const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
triggerArray.forEach(elem => { triggerArray.forEach(elem => {
if (isOpen) { if (isOpen) {
elem.classList.remove(CLASS_NAME_COLLAPSED); elem.classList.remove(CLASS_NAME_COLLAPSED);
@ -1863,20 +1867,15 @@ class Collapse extends BaseComponent {
} // Static } // Static
static collapseInterface(element, config) { static jQueryInterface(config) {
let data = Collapse.getInstance(element); return this.each(function () {
const _config = { ...Default$8, const _config = {};
...Manipulator.getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
};
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { if (typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false; _config.toggle = false;
} }
if (!data) { const data = Collapse.getOrCreateInstance(this, _config);
data = new Collapse(element, _config);
}
if (typeof config === 'string') { if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
@ -1885,11 +1884,6 @@ class Collapse extends BaseComponent {
data[config](); data[config]();
} }
}
static jQueryInterface(config) {
return this.each(function () {
Collapse.collapseInterface(this, config);
}); });
} }
@ -1907,26 +1901,12 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, functi
event.preventDefault(); event.preventDefault();
} }
const triggerData = Manipulator.getDataAttributes(this);
const selector = getSelectorFromElement(this); const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine.find(selector); const selectorElements = SelectorEngine.find(selector);
selectorElements.forEach(element => { selectorElements.forEach(element => {
const data = Collapse.getInstance(element); Collapse.getOrCreateInstance(element, {
let config; toggle: false
}).toggle();
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse.collapseInterface(element, config);
}); });
}); });
/** /**
@ -1940,7 +1920,7 @@ defineJQueryPlugin(Collapse);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dropdown.js * Bootstrap (v5.1.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1950,27 +1930,26 @@ defineJQueryPlugin(Collapse);
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$8 = 'dropdown'; const NAME$9 = 'dropdown';
const DATA_KEY$7 = 'bs.dropdown'; const DATA_KEY$8 = 'bs.dropdown';
const EVENT_KEY$7 = `.${DATA_KEY$7}`; const EVENT_KEY$8 = `.${DATA_KEY$8}`;
const DATA_API_KEY$4 = '.data-api'; const DATA_API_KEY$4 = '.data-api';
const ESCAPE_KEY$2 = 'Escape'; const ESCAPE_KEY$2 = 'Escape';
const SPACE_KEY = 'Space'; const SPACE_KEY = 'Space';
const TAB_KEY = 'Tab'; const TAB_KEY$1 = 'Tab';
const ARROW_UP_KEY = 'ArrowUp'; const ARROW_UP_KEY = 'ArrowUp';
const ARROW_DOWN_KEY = 'ArrowDown'; const ARROW_DOWN_KEY = 'ArrowDown';
const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`); const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`; const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;
const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`; const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;
const EVENT_SHOW$4 = `show${EVENT_KEY$7}`; const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;
const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`; const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;
const EVENT_CLICK = `click${EVENT_KEY$7}`; const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`; const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`; const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`; const CLASS_NAME_SHOW$6 = 'show';
const CLASS_NAME_SHOW$7 = 'show';
const CLASS_NAME_DROPUP = 'dropup'; const CLASS_NAME_DROPUP = 'dropup';
const CLASS_NAME_DROPEND = 'dropend'; const CLASS_NAME_DROPEND = 'dropend';
const CLASS_NAME_DROPSTART = 'dropstart'; const CLASS_NAME_DROPSTART = 'dropstart';
@ -1985,7 +1964,7 @@ const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'; const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'; const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'; const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
const Default$7 = { const Default$8 = {
offset: [0, 2], offset: [0, 2],
boundary: 'clippingParents', boundary: 'clippingParents',
reference: 'toggle', reference: 'toggle',
@ -1993,7 +1972,7 @@ const Default$7 = {
popperConfig: null, popperConfig: null,
autoClose: true autoClose: true
}; };
const DefaultType$7 = { const DefaultType$8 = {
offset: '(array|string|function)', offset: '(array|string|function)',
boundary: '(string|element)', boundary: '(string|element)',
reference: '(string|element|object)', reference: '(string|element|object)',
@ -2014,45 +1993,31 @@ class Dropdown extends BaseComponent {
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._menu = this._getMenuElement(); this._menu = this._getMenuElement();
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
this._addEventListeners();
} // Getters } // Getters
static get Default() { static get Default() {
return Default$7; return Default$8;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType$7; return DefaultType$8;
} }
static get NAME() { static get NAME() {
return NAME$8; return NAME$9;
} // Public } // Public
toggle() { toggle() {
if (isDisabled(this._element)) { return this._isShown() ? this.hide() : this.show();
return;
}
const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
if (isActive) {
this.hide();
return;
}
this.show();
} }
show() { show() {
if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) { if (isDisabled(this._element) || this._isShown(this._menu)) {
return; return;
} }
const parent = Dropdown.getParentFromElement(this._element);
const relatedTarget = { const relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
@ -2060,34 +2025,14 @@ class Dropdown extends BaseComponent {
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} // Totally disable Popper for Dropdowns in Navbar }
const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
if (this._inNavbar) { if (this._inNavbar) {
Manipulator.setDataAttribute(this._menu, 'popper', 'none'); Manipulator.setDataAttribute(this._menu, 'popper', 'none');
} else { } else {
if (typeof Popper === 'undefined') { this._createPopper(parent);
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}
} // If this is a touch-enabled device we add extra } // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
@ -2102,15 +2047,15 @@ class Dropdown extends BaseComponent {
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
this._menu.classList.toggle(CLASS_NAME_SHOW$7); this._menu.classList.add(CLASS_NAME_SHOW$6);
this._element.classList.toggle(CLASS_NAME_SHOW$7); this._element.classList.add(CLASS_NAME_SHOW$6);
EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget); EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
} }
hide() { hide() {
if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) { if (isDisabled(this._element) || !this._isShown(this._menu)) {
return; return;
} }
@ -2138,13 +2083,6 @@ class Dropdown extends BaseComponent {
} // Private } // Private
_addEventListeners() {
EventHandler.on(this._element, EVENT_CLICK, event => {
event.preventDefault();
this.toggle();
});
}
_completeHide(relatedTarget) { _completeHide(relatedTarget) {
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget); const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
@ -2162,9 +2100,9 @@ class Dropdown extends BaseComponent {
this._popper.destroy(); this._popper.destroy();
} }
this._menu.classList.remove(CLASS_NAME_SHOW$7); this._menu.classList.remove(CLASS_NAME_SHOW$6);
this._element.classList.remove(CLASS_NAME_SHOW$7); this._element.classList.remove(CLASS_NAME_SHOW$6);
this._element.setAttribute('aria-expanded', 'false'); this._element.setAttribute('aria-expanded', 'false');
@ -2177,16 +2115,45 @@ class Dropdown extends BaseComponent {
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...config ...config
}; };
typeCheckConfig(NAME$8, config, this.constructor.DefaultType); typeCheckConfig(NAME$9, config, this.constructor.DefaultType);
if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
// Popper virtual elements require a getBoundingClientRect method // Popper virtual elements require a getBoundingClientRect method
throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); throw new TypeError(`${NAME$9.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
} }
return config; return config;
} }
_createPopper(parent) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}
}
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW$6);
}
_getMenuElement() { _getMenuElement() {
return SelectorEngine.next(this._element, SELECTOR_MENU)[0]; return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
} }
@ -2276,26 +2243,24 @@ class Dropdown extends BaseComponent {
} // Static } // Static
static dropdownInterface(element, config) { static jQueryInterface(config) {
const data = Dropdown.getOrCreateInstance(element, config); return this.each(function () {
const data = Dropdown.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}
}
static jQueryInterface(config) {
return this.each(function () {
Dropdown.dropdownInterface(this, config);
}); });
} }
static clearMenus(event) { static clearMenus(event) {
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {
return; return;
} }
@ -2308,7 +2273,7 @@ class Dropdown extends BaseComponent {
continue; continue;
} }
if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) { if (!context._isShown()) {
continue; continue;
} }
@ -2325,7 +2290,7 @@ class Dropdown extends BaseComponent {
} // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -2354,7 +2319,7 @@ class Dropdown extends BaseComponent {
return; return;
} }
const isActive = this.classList.contains(CLASS_NAME_SHOW$7); const isActive = this.classList.contains(CLASS_NAME_SHOW$6);
if (!isActive && event.key === ESCAPE_KEY$2) { if (!isActive && event.key === ESCAPE_KEY$2) {
return; return;
@ -2367,20 +2332,20 @@ class Dropdown extends BaseComponent {
return; return;
} }
const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0]; const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (event.key === ESCAPE_KEY$2) { if (event.key === ESCAPE_KEY$2) {
getToggleButton().focus(); instance.hide();
Dropdown.clearMenus();
return; return;
} }
if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) { if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
if (!isActive) { if (!isActive) {
getToggleButton().click(); instance.show();
} }
Dropdown.getInstance(getToggleButton())._selectMenuItem(event); instance._selectMenuItem(event);
return; return;
} }
@ -2404,7 +2369,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
event.preventDefault(); event.preventDefault();
Dropdown.dropdownInterface(this); Dropdown.getOrCreateInstance(this).toggle();
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -2417,7 +2382,7 @@ defineJQueryPlugin(Dropdown);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/scrollBar.js * Bootstrap (v5.1.0): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2521,11 +2486,12 @@ class ScrollBarHelper {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/backdrop.js * Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const Default$6 = { const Default$7 = {
className: 'modal-backdrop',
isVisible: true, isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom // if false, we use the backdrop helper without adding any element to the dom
isAnimated: false, isAnimated: false,
@ -2533,17 +2499,17 @@ const Default$6 = {
// give the choice to place backdrop under different elements // give the choice to place backdrop under different elements
clickCallback: null clickCallback: null
}; };
const DefaultType$6 = { const DefaultType$7 = {
className: 'string',
isVisible: 'boolean', isVisible: 'boolean',
isAnimated: 'boolean', isAnimated: 'boolean',
rootElement: '(element|string)', rootElement: '(element|string)',
clickCallback: '(function|null)' clickCallback: '(function|null)'
}; };
const NAME$7 = 'backdrop'; const NAME$8 = 'backdrop';
const CLASS_NAME_BACKDROP = 'modal-backdrop'; const CLASS_NAME_FADE$4 = 'fade';
const CLASS_NAME_FADE$5 = 'fade'; const CLASS_NAME_SHOW$5 = 'show';
const CLASS_NAME_SHOW$6 = 'show'; const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
class Backdrop { class Backdrop {
constructor(config) { constructor(config) {
@ -2564,7 +2530,7 @@ class Backdrop {
reflow(this._getElement()); reflow(this._getElement());
} }
this._getElement().classList.add(CLASS_NAME_SHOW$6); this._getElement().classList.add(CLASS_NAME_SHOW$5);
this._emulateAnimation(() => { this._emulateAnimation(() => {
execute(callback); execute(callback);
@ -2577,7 +2543,7 @@ class Backdrop {
return; return;
} }
this._getElement().classList.remove(CLASS_NAME_SHOW$6); this._getElement().classList.remove(CLASS_NAME_SHOW$5);
this._emulateAnimation(() => { this._emulateAnimation(() => {
this.dispose(); this.dispose();
@ -2589,10 +2555,10 @@ class Backdrop {
_getElement() { _getElement() {
if (!this._element) { if (!this._element) {
const backdrop = document.createElement('div'); const backdrop = document.createElement('div');
backdrop.className = CLASS_NAME_BACKDROP; backdrop.className = this._config.className;
if (this._config.isAnimated) { if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE$5); backdrop.classList.add(CLASS_NAME_FADE$4);
} }
this._element = backdrop; this._element = backdrop;
@ -2602,12 +2568,12 @@ class Backdrop {
} }
_getConfig(config) { _getConfig(config) {
config = { ...Default$6, config = { ...Default$7,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; // use getElement() with the default "body" to get a fresh Element on each instantiation }; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement); config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$7, config, DefaultType$6); typeCheckConfig(NAME$8, config, DefaultType$7);
return config; return config;
} }
@ -2616,7 +2582,7 @@ class Backdrop {
return; return;
} }
this._config.rootElement.appendChild(this._getElement()); this._config.rootElement.append(this._getElement());
EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => { EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
execute(this._config.clickCallback); execute(this._config.clickCallback);
@ -2644,7 +2610,110 @@ class Backdrop {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): modal.js * Bootstrap (v5.1.0): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$6 = {
trapElement: null,
// The element to trap focus inside of
autofocus: true
};
const DefaultType$6 = {
trapElement: 'element',
autofocus: 'boolean'
};
const NAME$7 = 'focustrap';
const DATA_KEY$7 = 'bs.focustrap';
const EVENT_KEY$7 = `.${DATA_KEY$7}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;
const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;
const TAB_KEY = 'Tab';
const TAB_NAV_FORWARD = 'forward';
const TAB_NAV_BACKWARD = 'backward';
class FocusTrap {
constructor(config) {
this._config = this._getConfig(config);
this._isActive = false;
this._lastTabNavDirection = null;
}
activate() {
const {
trapElement,
autofocus
} = this._config;
if (this._isActive) {
return;
}
if (autofocus) {
trapElement.focus();
}
EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));
EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
this._isActive = true;
}
deactivate() {
if (!this._isActive) {
return;
}
this._isActive = false;
EventHandler.off(document, EVENT_KEY$7);
} // Private
_handleFocusin(event) {
const {
target
} = event;
const {
trapElement
} = this._config;
if (target === document || target === trapElement || trapElement.contains(target)) {
return;
}
const elements = SelectorEngine.focusableChildren(trapElement);
if (elements.length === 0) {
trapElement.focus();
} else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
elements[elements.length - 1].focus();
} else {
elements[0].focus();
}
}
_handleKeydown(event) {
if (event.key !== TAB_KEY) {
return;
}
this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
}
_getConfig(config) {
config = { ...Default$6,
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME$7, config, DefaultType$6);
return config;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2674,21 +2743,19 @@ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;
const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`; const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
const CLASS_NAME_OPEN = 'modal-open'; const CLASS_NAME_OPEN = 'modal-open';
const CLASS_NAME_FADE$4 = 'fade'; const CLASS_NAME_FADE$3 = 'fade';
const CLASS_NAME_SHOW$5 = 'show'; const CLASS_NAME_SHOW$4 = 'show';
const CLASS_NAME_STATIC = 'modal-static'; const CLASS_NAME_STATIC = 'modal-static';
const SELECTOR_DIALOG = '.modal-dialog'; const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body'; const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]'; const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -2701,6 +2768,7 @@ class Modal extends BaseComponent {
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element); this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._isShown = false; this._isShown = false;
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
this._isTransitioning = false; this._isTransitioning = false;
@ -2750,7 +2818,6 @@ class Modal extends BaseComponent {
this._setResizeEvent(); this._setResizeEvent();
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => { EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => { EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
if (event.target === this._element) { if (event.target === this._element) {
@ -2762,11 +2829,7 @@ class Modal extends BaseComponent {
this._showBackdrop(() => this._showElement(relatedTarget)); this._showBackdrop(() => this._showElement(relatedTarget));
} }
hide(event) { hide() {
if (event && ['A', 'AREA'].includes(event.target.tagName)) {
event.preventDefault();
}
if (!this._isShown || this._isTransitioning) { if (!this._isShown || this._isTransitioning) {
return; return;
} }
@ -2789,11 +2852,11 @@ class Modal extends BaseComponent {
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$2); this._focustrap.deactivate();
this._element.classList.remove(CLASS_NAME_SHOW$5); this._element.classList.remove(CLASS_NAME_SHOW$4);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2); EventHandler.off(this._element, EVENT_CLICK_DISMISS);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
this._queueCallback(() => this._hideModal(), this._element, isAnimated); this._queueCallback(() => this._hideModal(), this._element, isAnimated);
@ -2804,14 +2867,9 @@ class Modal extends BaseComponent {
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); this._focustrap.deactivate();
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
EventHandler.off(document, EVENT_FOCUSIN$2); super.dispose();
} }
handleUpdate() { handleUpdate() {
@ -2827,6 +2885,12 @@ class Modal extends BaseComponent {
}); });
} }
_initializeFocusTrap() {
return new FocusTrap({
trapElement: this._element
});
}
_getConfig(config) { _getConfig(config) {
config = { ...Default$5, config = { ...Default$5,
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
@ -2843,7 +2907,7 @@ class Modal extends BaseComponent {
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position // Don't move modal's DOM position
document.body.appendChild(this._element); document.body.append(this._element);
} }
this._element.style.display = 'block'; this._element.style.display = 'block';
@ -2864,15 +2928,11 @@ class Modal extends BaseComponent {
reflow(this._element); reflow(this._element);
} }
this._element.classList.add(CLASS_NAME_SHOW$5); this._element.classList.add(CLASS_NAME_SHOW$4);
if (this._config.focus) {
this._enforceFocus();
}
const transitionComplete = () => { const transitionComplete = () => {
if (this._config.focus) { if (this._config.focus) {
this._element.focus(); this._focustrap.activate();
} }
this._isTransitioning = false; this._isTransitioning = false;
@ -2884,16 +2944,6 @@ class Modal extends BaseComponent {
this._queueCallback(transitionComplete, this._dialog, isAnimated); this._queueCallback(transitionComplete, this._dialog, isAnimated);
} }
_enforceFocus() {
EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$2, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus();
}
});
}
_setEscapeEvent() { _setEscapeEvent() {
if (this._isShown) { if (this._isShown) {
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
@ -2940,7 +2990,7 @@ class Modal extends BaseComponent {
} }
_showBackdrop(callback) { _showBackdrop(callback) {
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => { EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
if (this._ignoreBackdropClick) { if (this._ignoreBackdropClick) {
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
return; return;
@ -2961,7 +3011,7 @@ class Modal extends BaseComponent {
} }
_isAnimated() { _isAnimated() {
return this._element.classList.contains(CLASS_NAME_FADE$4); return this._element.classList.contains(CLASS_NAME_FADE$3);
} }
_triggerBackdropTransition() { _triggerBackdropTransition() {
@ -3072,6 +3122,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, functi
const data = Modal.getOrCreateInstance(target); const data = Modal.getOrCreateInstance(target);
data.toggle(this); data.toggle(this);
}); });
enableDismissTrigger(Modal);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -3083,7 +3134,7 @@ defineJQueryPlugin(Modal);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): offcanvas.js * Bootstrap (v5.1.0): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3109,17 +3160,15 @@ const DefaultType$4 = {
keyboard: 'boolean', keyboard: 'boolean',
scroll: 'boolean' scroll: 'boolean'
}; };
const CLASS_NAME_SHOW$4 = 'show'; const CLASS_NAME_SHOW$3 = 'show';
const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
const OPEN_SELECTOR = '.offcanvas.show'; const OPEN_SELECTOR = '.offcanvas.show';
const EVENT_SHOW$2 = `show${EVENT_KEY$5}`; const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]'; const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -3133,6 +3182,7 @@ class Offcanvas extends BaseComponent {
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._isShown = false; this._isShown = false;
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._addEventListeners(); this._addEventListeners();
} // Getters } // Getters
@ -3171,8 +3221,6 @@ class Offcanvas extends BaseComponent {
if (!this._config.scroll) { if (!this._config.scroll) {
new ScrollBarHelper().hide(); new ScrollBarHelper().hide();
this._enforceFocusOnElement(this._element);
} }
this._element.removeAttribute('aria-hidden'); this._element.removeAttribute('aria-hidden');
@ -3181,9 +3229,13 @@ class Offcanvas extends BaseComponent {
this._element.setAttribute('role', 'dialog'); this._element.setAttribute('role', 'dialog');
this._element.classList.add(CLASS_NAME_SHOW$4); this._element.classList.add(CLASS_NAME_SHOW$3);
const completeCallBack = () => { const completeCallBack = () => {
if (!this._config.scroll) {
this._focustrap.activate();
}
EventHandler.trigger(this._element, EVENT_SHOWN$2, { EventHandler.trigger(this._element, EVENT_SHOWN$2, {
relatedTarget relatedTarget
}); });
@ -3203,13 +3255,13 @@ class Offcanvas extends BaseComponent {
return; return;
} }
EventHandler.off(document, EVENT_FOCUSIN$1); this._focustrap.deactivate();
this._element.blur(); this._element.blur();
this._isShown = false; this._isShown = false;
this._element.classList.remove(CLASS_NAME_SHOW$4); this._element.classList.remove(CLASS_NAME_SHOW$3);
this._backdrop.hide(); this._backdrop.hide();
@ -3235,8 +3287,9 @@ class Offcanvas extends BaseComponent {
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
this._focustrap.deactivate();
super.dispose(); super.dispose();
EventHandler.off(document, EVENT_FOCUSIN$1);
} // Private } // Private
@ -3251,6 +3304,7 @@ class Offcanvas extends BaseComponent {
_initializeBackDrop() { _initializeBackDrop() {
return new Backdrop({ return new Backdrop({
className: CLASS_NAME_BACKDROP,
isVisible: this._config.backdrop, isVisible: this._config.backdrop,
isAnimated: true, isAnimated: true,
rootElement: this._element.parentNode, rootElement: this._element.parentNode,
@ -3258,19 +3312,13 @@ class Offcanvas extends BaseComponent {
}); });
} }
_enforceFocusOnElement(element) { _initializeFocusTrap() {
EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop return new FocusTrap({
trapElement: this._element
EventHandler.on(document, EVENT_FOCUSIN$1, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus();
}
}); });
element.focus();
} }
_addEventListeners() { _addEventListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
if (this._config.keyboard && event.key === ESCAPE_KEY) { if (this._config.keyboard && event.key === ESCAPE_KEY) {
this.hide(); this.hide();
@ -3331,6 +3379,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, functi
data.toggle(this); data.toggle(this);
}); });
EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show())); EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
enableDismissTrigger(Offcanvas);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -3341,7 +3390,7 @@ defineJQueryPlugin(Offcanvas);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/sanitizer.js * Bootstrap (v5.1.0): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3454,7 +3503,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tooltip.js * Bootstrap (v5.1.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3468,7 +3517,6 @@ const NAME$4 = 'tooltip';
const DATA_KEY$4 = 'bs.tooltip'; const DATA_KEY$4 = 'bs.tooltip';
const EVENT_KEY$4 = `.${DATA_KEY$4}`; const EVENT_KEY$4 = `.${DATA_KEY$4}`;
const CLASS_PREFIX$1 = 'bs-tooltip'; const CLASS_PREFIX$1 = 'bs-tooltip';
const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
const DefaultType$3 = { const DefaultType$3 = {
animation: 'boolean', animation: 'boolean',
@ -3527,12 +3575,14 @@ const Event$2 = {
MOUSEENTER: `mouseenter${EVENT_KEY$4}`, MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$4}` MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
}; };
const CLASS_NAME_FADE$3 = 'fade'; const CLASS_NAME_FADE$2 = 'fade';
const CLASS_NAME_MODAL = 'modal'; const CLASS_NAME_MODAL = 'modal';
const CLASS_NAME_SHOW$3 = 'show'; const CLASS_NAME_SHOW$2 = 'show';
const HOVER_STATE_SHOW = 'show'; const HOVER_STATE_SHOW = 'show';
const HOVER_STATE_OUT = 'out'; const HOVER_STATE_OUT = 'out';
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
const EVENT_MODAL_HIDE = 'hide.bs.modal';
const TRIGGER_HOVER = 'hover'; const TRIGGER_HOVER = 'hover';
const TRIGGER_FOCUS = 'focus'; const TRIGGER_FOCUS = 'focus';
const TRIGGER_CLICK = 'click'; const TRIGGER_CLICK = 'click';
@ -3609,7 +3659,7 @@ class Tooltip extends BaseComponent {
context._leave(null, context); context._leave(null, context);
} }
} else { } else {
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) { if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {
this._leave(null, this); this._leave(null, this);
return; return;
@ -3621,7 +3671,7 @@ class Tooltip extends BaseComponent {
dispose() { dispose() {
clearTimeout(this._timeout); clearTimeout(this._timeout);
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this.tip) { if (this.tip) {
this.tip.remove(); this.tip.remove();
@ -3657,10 +3707,8 @@ class Tooltip extends BaseComponent {
this._element.setAttribute('aria-describedby', tipId); this._element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this._config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE$3); tip.classList.add(CLASS_NAME_FADE$2);
} }
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
@ -3675,7 +3723,7 @@ class Tooltip extends BaseComponent {
Data.set(tip, this.constructor.DATA_KEY, this); Data.set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip); container.append(tip);
EventHandler.trigger(this._element, this.constructor.Event.INSERTED); EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
} }
@ -3685,8 +3733,9 @@ class Tooltip extends BaseComponent {
this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
} }
tip.classList.add(CLASS_NAME_SHOW$3); tip.classList.add(CLASS_NAME_SHOW$2);
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
const customClass = this._resolvePossibleFunction(this._config.customClass);
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -3712,7 +3761,7 @@ class Tooltip extends BaseComponent {
} }
}; };
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3); const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
this._queueCallback(complete, this.tip, isAnimated); this._queueCallback(complete, this.tip, isAnimated);
} }
@ -3752,7 +3801,7 @@ class Tooltip extends BaseComponent {
return; return;
} }
tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
@ -3762,7 +3811,7 @@ class Tooltip extends BaseComponent {
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3); const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
this._queueCallback(complete, this.tip, isAnimated); this._queueCallback(complete, this.tip, isAnimated);
@ -3787,14 +3836,27 @@ class Tooltip extends BaseComponent {
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this._config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; const tip = element.children[0];
this.setContent(tip);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
this.tip = tip;
return this.tip; return this.tip;
} }
setContent() { setContent(tip) {
const tip = this.getTipElement(); this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()); }
tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
_sanitizeAndSetContent(template, content, selector) {
const templateElement = SelectorEngine.findOne(selector, template);
if (!content && templateElement) {
templateElement.remove();
return;
} // we use append for html objects to maintain js events
this.setElementContent(templateElement, content);
} }
setElementContent(element, content) { setElementContent(element, content) {
@ -3808,7 +3870,7 @@ class Tooltip extends BaseComponent {
if (this._config.html) { if (this._config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.append(content);
} }
} else { } else {
element.textContent = content.textContent; element.textContent = content.textContent;
@ -3829,13 +3891,9 @@ class Tooltip extends BaseComponent {
} }
getTitle() { getTitle() {
let title = this._element.getAttribute('data-bs-original-title'); const title = this._element.getAttribute('data-bs-original-title') || this._config.title;
if (!title) { return this._resolvePossibleFunction(title);
title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
}
return title;
} }
updateAttachment(attachment) { updateAttachment(attachment) {
@ -3852,15 +3910,7 @@ class Tooltip extends BaseComponent {
_initializeOnDelegatedTarget(event, context) { _initializeOnDelegatedTarget(event, context) {
const dataKey = this.constructor.DATA_KEY; return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
context = context || Data.get(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.set(event.delegateTarget, dataKey, context);
}
return context;
} }
_getOffset() { _getOffset() {
@ -3879,6 +3929,10 @@ class Tooltip extends BaseComponent {
return offset; return offset;
} }
_resolvePossibleFunction(content) {
return typeof content === 'function' ? content.call(this._element) : content;
}
_getPopperConfig(attachment) { _getPopperConfig(attachment) {
const defaultBsPopperConfig = { const defaultBsPopperConfig = {
placement: attachment, placement: attachment,
@ -3920,7 +3974,7 @@ class Tooltip extends BaseComponent {
} }
_addAttachmentClass(attachment) { _addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);
} }
_getAttachment(placement) { _getAttachment(placement) {
@ -3947,7 +4001,7 @@ class Tooltip extends BaseComponent {
} }
}; };
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this._config.selector) { if (this._config.selector) {
this._config = { ...this._config, this._config = { ...this._config,
@ -3982,7 +4036,7 @@ class Tooltip extends BaseComponent {
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
} }
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) { if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
return; return;
} }
@ -4078,26 +4132,32 @@ class Tooltip extends BaseComponent {
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this._config) {
for (const key in this._config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this._config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this._config[key]; config[key] = this._config[key];
} }
} } // In the future can be replaced with:
} // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
// `Object.fromEntries(keysWithDifferentValues)`
return config; return config;
} }
_cleanTipClass() { _cleanTipClass() {
const tip = this.getTipElement(); const tip = this.getTipElement();
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1); const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g');
const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);
if (tabClass !== null && tabClass.length > 0) { if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass)); tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
} }
} }
_getBasicClassPrefix() {
return CLASS_PREFIX$1;
}
_handlePopperPlacementChange(popperData) { _handlePopperPlacementChange(popperData) {
const { const {
state state
@ -4142,7 +4202,7 @@ defineJQueryPlugin(Tooltip);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): popover.js * Bootstrap (v5.1.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4156,7 +4216,6 @@ const NAME$3 = 'popover';
const DATA_KEY$3 = 'bs.popover'; const DATA_KEY$3 = 'bs.popover';
const EVENT_KEY$3 = `.${DATA_KEY$3}`; const EVENT_KEY$3 = `.${DATA_KEY$3}`;
const CLASS_PREFIX = 'bs-popover'; const CLASS_PREFIX = 'bs-popover';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const Default$2 = { ...Tooltip.Default, const Default$2 = { ...Tooltip.Default,
placement: 'right', placement: 'right',
offset: [0, 8], offset: [0, 8],
@ -4179,8 +4238,6 @@ const Event$1 = {
MOUSEENTER: `mouseenter${EVENT_KEY$3}`, MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$3}` MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
}; };
const CLASS_NAME_FADE$2 = 'fade';
const CLASS_NAME_SHOW$2 = 'show';
const SELECTOR_TITLE = '.popover-header'; const SELECTOR_TITLE = '.popover-header';
const SELECTOR_CONTENT = '.popover-body'; const SELECTOR_CONTENT = '.popover-body';
/** /**
@ -4212,55 +4269,19 @@ class Popover extends Tooltip {
return this.getTitle() || this._getContent(); return this.getTitle() || this._getContent();
} }
getTipElement() { setContent(tip) {
if (this.tip) { this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
return this.tip;
}
this.tip = super.getTipElement(); this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
if (!this.getTitle()) {
SelectorEngine.findOne(SELECTOR_TITLE, this.tip).remove();
}
if (!this._getContent()) {
SelectorEngine.findOne(SELECTOR_CONTENT, this.tip).remove();
}
return this.tip;
}
setContent() {
const tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
let content = this._getContent();
if (typeof content === 'function') {
content = content.call(this._element);
}
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
} // Private } // Private
_addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this._config.content; return this._resolvePossibleFunction(this._config.content);
} }
_cleanTipClass() { _getBasicClassPrefix() {
const tip = this.getTipElement(); return CLASS_PREFIX;
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
} // Static } // Static
@ -4291,7 +4312,7 @@ defineJQueryPlugin(Popover);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): scrollspy.js * Bootstrap (v5.1.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4325,6 +4346,7 @@ const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
const SELECTOR_NAV_LINKS = '.nav-link'; const SELECTOR_NAV_LINKS = '.nav-link';
const SELECTOR_NAV_ITEMS = '.nav-item'; const SELECTOR_NAV_ITEMS = '.nav-item';
const SELECTOR_LIST_ITEMS = '.list-group-item'; const SELECTOR_LIST_ITEMS = '.list-group-item';
const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;
const SELECTOR_DROPDOWN$1 = '.dropdown'; const SELECTOR_DROPDOWN$1 = '.dropdown';
const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
const METHOD_OFFSET = 'offset'; const METHOD_OFFSET = 'offset';
@ -4340,7 +4362,6 @@ class ScrollSpy extends BaseComponent {
super(element); super(element);
this._scrollElement = this._element.tagName === 'BODY' ? window : this._element; this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._activeTarget = null; this._activeTarget = null;
@ -4368,7 +4389,7 @@ class ScrollSpy extends BaseComponent {
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._scrollHeight = this._getScrollHeight(); this._scrollHeight = this._getScrollHeight();
const targets = SelectorEngine.find(this._selector); const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);
targets.map(element => { targets.map(element => {
const targetSelector = getSelectorFromElement(element); const targetSelector = getSelectorFromElement(element);
const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null; const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
@ -4400,20 +4421,7 @@ class ScrollSpy extends BaseComponent {
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.target = getElement(config.target) || document.documentElement;
if (typeof config.target !== 'string' && isElement(config.target)) {
let {
id
} = config.target;
if (!id) {
id = getUID(NAME$2);
config.target.id = id;
}
config.target = `#${id}`;
}
typeCheckConfig(NAME$2, config, DefaultType$1); typeCheckConfig(NAME$2, config, DefaultType$1);
return config; return config;
} }
@ -4473,16 +4481,13 @@ class ScrollSpy extends BaseComponent {
this._clear(); this._clear();
const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`); const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
const link = SelectorEngine.findOne(queries.join(','), this._config.target);
const link = SelectorEngine.findOne(queries.join(',')); link.classList.add(CLASS_NAME_ACTIVE$1);
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1); SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
link.classList.add(CLASS_NAME_ACTIVE$1);
} else { } else {
// Set triggered link as active
link.classList.add(CLASS_NAME_ACTIVE$1);
SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => { SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
// Set triggered links parents as active // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
@ -4500,7 +4505,7 @@ class ScrollSpy extends BaseComponent {
} }
_clear() { _clear() {
SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1)); SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
} // Static } // Static
@ -4542,7 +4547,7 @@ defineJQueryPlugin(ScrollSpy);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tab.js * Bootstrap (v5.1.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4740,7 +4745,7 @@ defineJQueryPlugin(Tab);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): toast.js * Bootstrap (v5.1.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4753,7 +4758,6 @@ defineJQueryPlugin(Tab);
const NAME = 'toast'; const NAME = 'toast';
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`; const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`; const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`; const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
@ -4763,7 +4767,8 @@ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_HIDE = 'hide'; const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_SHOWING = 'showing'; const CLASS_NAME_SHOWING = 'showing';
const DefaultType = { const DefaultType = {
@ -4776,7 +4781,6 @@ const Default = {
autohide: true, autohide: true,
delay: 5000 delay: 5000
}; };
const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -4824,17 +4828,18 @@ class Toast extends BaseComponent {
const complete = () => { const complete = () => {
this._element.classList.remove(CLASS_NAME_SHOWING); this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.add(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
this._maybeScheduleHide(); this._maybeScheduleHide();
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
reflow(this._element); reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
@ -4852,12 +4857,17 @@ class Toast extends BaseComponent {
} }
const complete = () => { const complete = () => {
this._element.classList.add(CLASS_NAME_HIDE); this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.remove(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_HIDDEN); EventHandler.trigger(this._element, EVENT_HIDDEN);
}; };
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
} }
@ -4925,7 +4935,6 @@ class Toast extends BaseComponent {
} }
_setListeners() { _setListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
@ -4953,6 +4962,8 @@ class Toast extends BaseComponent {
} }
} }
enableDismissTrigger(Toast);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -4960,7 +4971,6 @@ class Toast extends BaseComponent {
* add .Toast to jQuery only if jQuery is present * add .Toast to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(Toast); defineJQueryPlugin(Toast);
export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip }; export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap v5.0.2 (https://getbootstrap.com/) * Bootstrap v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -33,82 +33,10 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/selector-engine.js * Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MAX_UID = 1000000; const MAX_UID = 1000000;
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -220,7 +148,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine.findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -286,8 +214,20 @@
}; };
const noop = () => {}; const noop = () => {};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -404,7 +344,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/event-handler.js * Bootstrap (v5.1.0): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -693,7 +633,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/data.js * Bootstrap (v5.1.0): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -747,7 +687,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): base-component.js * Bootstrap (v5.1.0): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -757,7 +697,7 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.2'; const VERSION = '5.1.0';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
@ -786,7 +726,7 @@
static getInstance(element) { static getInstance(element) {
return Data.get(element, this.DATA_KEY); return Data.get(getElement(element), this.DATA_KEY);
} }
static getOrCreateInstance(element, config = {}) { static getOrCreateInstance(element, config = {}) {
@ -813,7 +753,33 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): alert.js * Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -823,17 +789,13 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$c = 'alert'; const NAME$d = 'alert';
const DATA_KEY$b = 'bs.alert'; const DATA_KEY$c = 'bs.alert';
const EVENT_KEY$b = `.${DATA_KEY$b}`; const EVENT_KEY$c = `.${DATA_KEY$c}`;
const DATA_API_KEY$8 = '.data-api'; const EVENT_CLOSE = `close${EVENT_KEY$c}`;
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]'; const EVENT_CLOSED = `closed${EVENT_KEY$c}`;
const EVENT_CLOSE = `close${EVENT_KEY$b}`; const CLASS_NAME_FADE$5 = 'fade';
const EVENT_CLOSED = `closed${EVENT_KEY$b}`; const CLASS_NAME_SHOW$8 = 'show';
const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
const CLASS_NAME_ALERT = 'alert';
const CLASS_NAME_FADE$6 = 'fade';
const CLASS_NAME_SHOW$9 = 'show';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -843,41 +805,30 @@
class Alert extends BaseComponent { class Alert extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME$c; return NAME$d;
} // Public } // Public
close(element) { close() {
const rootElement = element ? this._getRootElement(element) : this._element; const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
const customEvent = this._triggerCloseEvent(rootElement); if (closeEvent.defaultPrevented) {
if (customEvent === null || customEvent.defaultPrevented) {
return; return;
} }
this._removeElement(rootElement); this._element.classList.remove(CLASS_NAME_SHOW$8);
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
} // Private } // Private
_getRootElement(element) { _destroyElement() {
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`); this._element.remove();
}
_triggerCloseEvent(element) { EventHandler.trigger(this._element, EVENT_CLOSED);
return EventHandler.trigger(element, EVENT_CLOSE); this.dispose();
}
_removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW$9);
const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
this._queueCallback(() => this._destroyElement(element), element, isAnimated);
}
_destroyElement(element) {
element.remove();
EventHandler.trigger(element, EVENT_CLOSED);
} // Static } // Static
@ -885,22 +836,18 @@
return this.each(function () { return this.each(function () {
const data = Alert.getOrCreateInstance(this); const data = Alert.getOrCreateInstance(this);
if (config === 'close') { if (typeof config !== 'string') {
return;
}
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`);
}
data[config](this); data[config](this);
}
}); });
} }
static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
}
alertInstance.close(this);
};
}
} }
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -909,7 +856,7 @@
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert())); enableDismissTrigger(Alert, 'close');
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -921,7 +868,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): button.js * Bootstrap (v5.1.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -931,13 +878,13 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$b = 'button'; const NAME$c = 'button';
const DATA_KEY$a = 'bs.button'; const DATA_KEY$b = 'bs.button';
const EVENT_KEY$a = `.${DATA_KEY$a}`; const EVENT_KEY$b = `.${DATA_KEY$b}`;
const DATA_API_KEY$7 = '.data-api'; const DATA_API_KEY$7 = '.data-api';
const CLASS_NAME_ACTIVE$3 = 'active'; const CLASS_NAME_ACTIVE$3 = 'active';
const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]'; const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`; const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -947,7 +894,7 @@
class Button extends BaseComponent { class Button extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME$b; return NAME$c;
} // Public } // Public
@ -992,7 +939,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/manipulator.js * Bootstrap (v5.1.0): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1050,8 +997,8 @@
offset(element) { offset(element) {
const rect = element.getBoundingClientRect(); const rect = element.getBoundingClientRect();
return { return {
top: rect.top + document.body.scrollTop, top: rect.top + window.pageYOffset,
left: rect.left + document.body.scrollLeft left: rect.left + window.pageXOffset
}; };
}, },
@ -1066,7 +1013,77 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): carousel.js * Bootstrap (v5.1.0): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
},
findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector);
},
children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector));
},
parents(element, selector) {
const parents = [];
let ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (ancestor.matches(selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev(element, selector) {
let previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next(element, selector) {
let next = element.nextElementSibling;
while (next) {
if (next.matches(selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
},
focusableChildren(element) {
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1076,16 +1093,16 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$a = 'carousel'; const NAME$b = 'carousel';
const DATA_KEY$9 = 'bs.carousel'; const DATA_KEY$a = 'bs.carousel';
const EVENT_KEY$9 = `.${DATA_KEY$9}`; const EVENT_KEY$a = `.${DATA_KEY$a}`;
const DATA_API_KEY$6 = '.data-api'; const DATA_API_KEY$6 = '.data-api';
const ARROW_LEFT_KEY = 'ArrowLeft'; const ARROW_LEFT_KEY = 'ArrowLeft';
const ARROW_RIGHT_KEY = 'ArrowRight'; const ARROW_RIGHT_KEY = 'ArrowRight';
const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
const SWIPE_THRESHOLD = 40; const SWIPE_THRESHOLD = 40;
const Default$9 = { const Default$a = {
interval: 5000, interval: 5000,
keyboard: true, keyboard: true,
slide: false, slide: false,
@ -1093,7 +1110,7 @@
wrap: true, wrap: true,
touch: true touch: true
}; };
const DefaultType$9 = { const DefaultType$a = {
interval: '(number|boolean)', interval: '(number|boolean)',
keyboard: 'boolean', keyboard: 'boolean',
slide: '(boolean|string)', slide: '(boolean|string)',
@ -1109,19 +1126,19 @@
[ARROW_LEFT_KEY]: DIRECTION_RIGHT, [ARROW_LEFT_KEY]: DIRECTION_RIGHT,
[ARROW_RIGHT_KEY]: DIRECTION_LEFT [ARROW_RIGHT_KEY]: DIRECTION_LEFT
}; };
const EVENT_SLIDE = `slide${EVENT_KEY$9}`; const EVENT_SLIDE = `slide${EVENT_KEY$a}`;
const EVENT_SLID = `slid${EVENT_KEY$9}`; const EVENT_SLID = `slid${EVENT_KEY$a}`;
const EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`; const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`; const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`; const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`; const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`; const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;
const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`; const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`; const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;
const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`; const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;
const EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`; const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;
const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`; const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;
const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`; const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
const CLASS_NAME_CAROUSEL = 'carousel'; const CLASS_NAME_CAROUSEL = 'carousel';
const CLASS_NAME_ACTIVE$2 = 'active'; const CLASS_NAME_ACTIVE$2 = 'active';
const CLASS_NAME_SLIDE = 'slide'; const CLASS_NAME_SLIDE = 'slide';
@ -1168,11 +1185,11 @@
static get Default() { static get Default() {
return Default$9; return Default$a;
} }
static get NAME() { static get NAME() {
return NAME$a; return NAME$b;
} // Public } // Public
@ -1250,11 +1267,11 @@
_getConfig(config) { _getConfig(config) {
config = { ...Default$9, config = { ...Default$a,
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; };
typeCheckConfig(NAME$a, config, DefaultType$9); typeCheckConfig(NAME$b, config, DefaultType$a);
return config; return config;
} }
@ -1611,7 +1628,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): collapse.js * Bootstrap (v5.1.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1621,27 +1638,28 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$9 = 'collapse'; const NAME$a = 'collapse';
const DATA_KEY$8 = 'bs.collapse'; const DATA_KEY$9 = 'bs.collapse';
const EVENT_KEY$8 = `.${DATA_KEY$8}`; const EVENT_KEY$9 = `.${DATA_KEY$9}`;
const DATA_API_KEY$5 = '.data-api'; const DATA_API_KEY$5 = '.data-api';
const Default$8 = { const Default$9 = {
toggle: true, toggle: true,
parent: '' parent: null
}; };
const DefaultType$8 = { const DefaultType$9 = {
toggle: 'boolean', toggle: 'boolean',
parent: '(string|element)' parent: '(null|element)'
}; };
const EVENT_SHOW$5 = `show${EVENT_KEY$8}`; const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;
const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`; const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;
const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`; const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;
const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`; const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;
const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`; const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;
const CLASS_NAME_SHOW$8 = 'show'; const CLASS_NAME_SHOW$7 = 'show';
const CLASS_NAME_COLLAPSE = 'collapse'; const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing'; const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed'; const CLASS_NAME_COLLAPSED = 'collapsed';
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width'; const WIDTH = 'width';
const HEIGHT = 'height'; const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.show, .collapsing'; const SELECTOR_ACTIVES = '.show, .collapsing';
@ -1657,7 +1675,7 @@
super(element); super(element);
this._isTransitioning = false; this._isTransitioning = false;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`); this._triggerArray = [];
const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4); const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
for (let i = 0, len = toggleList.length; i < len; i++) { for (let i = 0, len = toggleList.length; i < len; i++) {
@ -1672,10 +1690,10 @@
} }
} }
this._parent = this._config.parent ? this._getParent() : null; this._initializeChildren();
if (!this._config.parent) { if (!this._config.parent) {
this._addAriaAndCollapsedClass(this._element, this._triggerArray); this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
} }
if (this._config.toggle) { if (this._config.toggle) {
@ -1685,16 +1703,16 @@
static get Default() { static get Default() {
return Default$8; return Default$9;
} }
static get NAME() { static get NAME() {
return NAME$9; return NAME$a;
} // Public } // Public
toggle() { toggle() {
if (this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isShown()) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@ -1702,30 +1720,21 @@
} }
show() { show() {
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isTransitioning || this._isShown()) {
return; return;
} }
let actives; let actives = [];
let activesData; let activesData;
if (this._parent) { if (this._config.parent) {
actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => { const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
if (typeof this._config.parent === 'string') { actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
return elem.getAttribute('data-bs-parent') === this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if (actives.length === 0) {
actives = null;
}
} }
const container = SelectorEngine.findOne(this._selector); const container = SelectorEngine.findOne(this._selector);
if (actives) { if (actives.length) {
const tempActiveData = actives.find(elem => container !== elem); const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
@ -1740,17 +1749,17 @@
return; return;
} }
if (actives) {
actives.forEach(elemActive => { actives.forEach(elemActive => {
if (container !== elemActive) { if (container !== elemActive) {
Collapse.collapseInterface(elemActive, 'hide'); Collapse.getOrCreateInstance(elemActive, {
toggle: false
}).hide();
} }
if (!activesData) { if (!activesData) {
Data.set(elemActive, DATA_KEY$8, null); Data.set(elemActive, DATA_KEY$9, null);
} }
}); });
}
const dimension = this._getDimension(); const dimension = this._getDimension();
@ -1760,22 +1769,18 @@
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
if (this._triggerArray.length) { this._addAriaAndCollapsedClass(this._triggerArray, true);
this._triggerArray.forEach(element => {
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8); this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
this._element.style[dimension] = ''; this._element.style[dimension] = '';
this.setTransitioning(false);
EventHandler.trigger(this._element, EVENT_SHOWN$5); EventHandler.trigger(this._element, EVENT_SHOWN$5);
}; };
@ -1788,7 +1793,7 @@
} }
hide() { hide() {
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) { if (this._isTransitioning || !this._isShown()) {
return; return;
} }
@ -1805,26 +1810,23 @@
this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8); this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
const triggerArrayLength = this._triggerArray.length; const triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (let i = 0; i < triggerArrayLength; i++) { for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i]; const trigger = this._triggerArray[i];
const elem = getElementFromSelector(trigger); const elem = getElementFromSelector(trigger);
if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) { if (elem && !this._isShown(elem)) {
trigger.classList.add(CLASS_NAME_COLLAPSED); this._addAriaAndCollapsedClass([trigger], false);
trigger.setAttribute('aria-expanded', false);
}
} }
} }
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this.setTransitioning(false); this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
@ -1838,45 +1840,47 @@
this._queueCallback(complete, this._element, true); this._queueCallback(complete, this._element, true);
} }
setTransitioning(isTransitioning) { _isShown(element = this._element) {
this._isTransitioning = isTransitioning; return element.classList.contains(CLASS_NAME_SHOW$7);
} // Private } // Private
_getConfig(config) { _getConfig(config) {
config = { ...Default$8, config = { ...Default$9,
...Manipulator.getDataAttributes(this._element),
...config ...config
}; };
config.toggle = Boolean(config.toggle); // Coerce string values config.toggle = Boolean(config.toggle); // Coerce string values
typeCheckConfig(NAME$9, config, DefaultType$8); config.parent = getElement(config.parent);
typeCheckConfig(NAME$a, config, DefaultType$9);
return config; return config;
} }
_getDimension() { _getDimension() {
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT; return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
} }
_getParent() { _initializeChildren() {
let { if (!this._config.parent) {
parent return;
} = this._config; }
parent = getElement(parent);
const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`; const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
SelectorEngine.find(selector, parent).forEach(element => { SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
this._addAriaAndCollapsedClass(selected, [element]); if (selected) {
}); this._addAriaAndCollapsedClass([element], this._isShown(selected));
return parent; }
} });
}
_addAriaAndCollapsedClass(element, triggerArray) {
if (!element || !triggerArray.length) { _addAriaAndCollapsedClass(triggerArray, isOpen) {
if (!triggerArray.length) {
return; return;
} }
const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
triggerArray.forEach(elem => { triggerArray.forEach(elem => {
if (isOpen) { if (isOpen) {
elem.classList.remove(CLASS_NAME_COLLAPSED); elem.classList.remove(CLASS_NAME_COLLAPSED);
@ -1889,20 +1893,15 @@
} // Static } // Static
static collapseInterface(element, config) { static jQueryInterface(config) {
let data = Collapse.getInstance(element); return this.each(function () {
const _config = { ...Default$8, const _config = {};
...Manipulator.getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
};
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { if (typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false; _config.toggle = false;
} }
if (!data) { const data = Collapse.getOrCreateInstance(this, _config);
data = new Collapse(element, _config);
}
if (typeof config === 'string') { if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
@ -1911,11 +1910,6 @@
data[config](); data[config]();
} }
}
static jQueryInterface(config) {
return this.each(function () {
Collapse.collapseInterface(this, config);
}); });
} }
@ -1933,26 +1927,12 @@
event.preventDefault(); event.preventDefault();
} }
const triggerData = Manipulator.getDataAttributes(this);
const selector = getSelectorFromElement(this); const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine.find(selector); const selectorElements = SelectorEngine.find(selector);
selectorElements.forEach(element => { selectorElements.forEach(element => {
const data = Collapse.getInstance(element); Collapse.getOrCreateInstance(element, {
let config; toggle: false
}).toggle();
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse.collapseInterface(element, config);
}); });
}); });
/** /**
@ -1966,7 +1946,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dropdown.js * Bootstrap (v5.1.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -1976,27 +1956,26 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const NAME$8 = 'dropdown'; const NAME$9 = 'dropdown';
const DATA_KEY$7 = 'bs.dropdown'; const DATA_KEY$8 = 'bs.dropdown';
const EVENT_KEY$7 = `.${DATA_KEY$7}`; const EVENT_KEY$8 = `.${DATA_KEY$8}`;
const DATA_API_KEY$4 = '.data-api'; const DATA_API_KEY$4 = '.data-api';
const ESCAPE_KEY$2 = 'Escape'; const ESCAPE_KEY$2 = 'Escape';
const SPACE_KEY = 'Space'; const SPACE_KEY = 'Space';
const TAB_KEY = 'Tab'; const TAB_KEY$1 = 'Tab';
const ARROW_UP_KEY = 'ArrowUp'; const ARROW_UP_KEY = 'ArrowUp';
const ARROW_DOWN_KEY = 'ArrowDown'; const ARROW_DOWN_KEY = 'ArrowDown';
const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`); const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`; const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;
const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`; const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;
const EVENT_SHOW$4 = `show${EVENT_KEY$7}`; const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;
const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`; const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;
const EVENT_CLICK = `click${EVENT_KEY$7}`; const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`; const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`; const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`; const CLASS_NAME_SHOW$6 = 'show';
const CLASS_NAME_SHOW$7 = 'show';
const CLASS_NAME_DROPUP = 'dropup'; const CLASS_NAME_DROPUP = 'dropup';
const CLASS_NAME_DROPEND = 'dropend'; const CLASS_NAME_DROPEND = 'dropend';
const CLASS_NAME_DROPSTART = 'dropstart'; const CLASS_NAME_DROPSTART = 'dropstart';
@ -2011,7 +1990,7 @@
const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'; const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'; const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'; const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
const Default$7 = { const Default$8 = {
offset: [0, 2], offset: [0, 2],
boundary: 'clippingParents', boundary: 'clippingParents',
reference: 'toggle', reference: 'toggle',
@ -2019,7 +1998,7 @@
popperConfig: null, popperConfig: null,
autoClose: true autoClose: true
}; };
const DefaultType$7 = { const DefaultType$8 = {
offset: '(array|string|function)', offset: '(array|string|function)',
boundary: '(string|element)', boundary: '(string|element)',
reference: '(string|element|object)', reference: '(string|element|object)',
@ -2040,45 +2019,31 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._menu = this._getMenuElement(); this._menu = this._getMenuElement();
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
this._addEventListeners();
} // Getters } // Getters
static get Default() { static get Default() {
return Default$7; return Default$8;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType$7; return DefaultType$8;
} }
static get NAME() { static get NAME() {
return NAME$8; return NAME$9;
} // Public } // Public
toggle() { toggle() {
if (isDisabled(this._element)) { return this._isShown() ? this.hide() : this.show();
return;
}
const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
if (isActive) {
this.hide();
return;
}
this.show();
} }
show() { show() {
if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) { if (isDisabled(this._element) || this._isShown(this._menu)) {
return; return;
} }
const parent = Dropdown.getParentFromElement(this._element);
const relatedTarget = { const relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
@ -2086,34 +2051,14 @@
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} // Totally disable Popper for Dropdowns in Navbar }
const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
if (this._inNavbar) { if (this._inNavbar) {
Manipulator.setDataAttribute(this._menu, 'popper', 'none'); Manipulator.setDataAttribute(this._menu, 'popper', 'none');
} else { } else {
if (typeof Popper__namespace === 'undefined') { this._createPopper(parent);
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}
} // If this is a touch-enabled device we add extra } // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
@ -2128,15 +2073,15 @@
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
this._menu.classList.toggle(CLASS_NAME_SHOW$7); this._menu.classList.add(CLASS_NAME_SHOW$6);
this._element.classList.toggle(CLASS_NAME_SHOW$7); this._element.classList.add(CLASS_NAME_SHOW$6);
EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget); EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
} }
hide() { hide() {
if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) { if (isDisabled(this._element) || !this._isShown(this._menu)) {
return; return;
} }
@ -2164,13 +2109,6 @@
} // Private } // Private
_addEventListeners() {
EventHandler.on(this._element, EVENT_CLICK, event => {
event.preventDefault();
this.toggle();
});
}
_completeHide(relatedTarget) { _completeHide(relatedTarget) {
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget); const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
@ -2188,9 +2126,9 @@
this._popper.destroy(); this._popper.destroy();
} }
this._menu.classList.remove(CLASS_NAME_SHOW$7); this._menu.classList.remove(CLASS_NAME_SHOW$6);
this._element.classList.remove(CLASS_NAME_SHOW$7); this._element.classList.remove(CLASS_NAME_SHOW$6);
this._element.setAttribute('aria-expanded', 'false'); this._element.setAttribute('aria-expanded', 'false');
@ -2203,16 +2141,45 @@
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...config ...config
}; };
typeCheckConfig(NAME$8, config, this.constructor.DefaultType); typeCheckConfig(NAME$9, config, this.constructor.DefaultType);
if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
// Popper virtual elements require a getBoundingClientRect method // Popper virtual elements require a getBoundingClientRect method
throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); throw new TypeError(`${NAME$9.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
} }
return config; return config;
} }
_createPopper(parent) {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator.setDataAttribute(this._menu, 'popper', 'static');
}
}
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW$6);
}
_getMenuElement() { _getMenuElement() {
return SelectorEngine.next(this._element, SELECTOR_MENU)[0]; return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
} }
@ -2302,26 +2269,24 @@
} // Static } // Static
static dropdownInterface(element, config) { static jQueryInterface(config) {
const data = Dropdown.getOrCreateInstance(element, config); return this.each(function () {
const data = Dropdown.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}
}
static jQueryInterface(config) {
return this.each(function () {
Dropdown.dropdownInterface(this, config);
}); });
} }
static clearMenus(event) { static clearMenus(event) {
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {
return; return;
} }
@ -2334,7 +2299,7 @@
continue; continue;
} }
if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) { if (!context._isShown()) {
continue; continue;
} }
@ -2351,7 +2316,7 @@
} // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
@ -2380,7 +2345,7 @@
return; return;
} }
const isActive = this.classList.contains(CLASS_NAME_SHOW$7); const isActive = this.classList.contains(CLASS_NAME_SHOW$6);
if (!isActive && event.key === ESCAPE_KEY$2) { if (!isActive && event.key === ESCAPE_KEY$2) {
return; return;
@ -2393,20 +2358,20 @@
return; return;
} }
const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0]; const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (event.key === ESCAPE_KEY$2) { if (event.key === ESCAPE_KEY$2) {
getToggleButton().focus(); instance.hide();
Dropdown.clearMenus();
return; return;
} }
if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) { if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
if (!isActive) { if (!isActive) {
getToggleButton().click(); instance.show();
} }
Dropdown.getInstance(getToggleButton())._selectMenuItem(event); instance._selectMenuItem(event);
return; return;
} }
@ -2430,7 +2395,7 @@
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
event.preventDefault(); event.preventDefault();
Dropdown.dropdownInterface(this); Dropdown.getOrCreateInstance(this).toggle();
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -2443,7 +2408,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/scrollBar.js * Bootstrap (v5.1.0): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2547,11 +2512,12 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/backdrop.js * Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const Default$6 = { const Default$7 = {
className: 'modal-backdrop',
isVisible: true, isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom // if false, we use the backdrop helper without adding any element to the dom
isAnimated: false, isAnimated: false,
@ -2559,17 +2525,17 @@
// give the choice to place backdrop under different elements // give the choice to place backdrop under different elements
clickCallback: null clickCallback: null
}; };
const DefaultType$6 = { const DefaultType$7 = {
className: 'string',
isVisible: 'boolean', isVisible: 'boolean',
isAnimated: 'boolean', isAnimated: 'boolean',
rootElement: '(element|string)', rootElement: '(element|string)',
clickCallback: '(function|null)' clickCallback: '(function|null)'
}; };
const NAME$7 = 'backdrop'; const NAME$8 = 'backdrop';
const CLASS_NAME_BACKDROP = 'modal-backdrop'; const CLASS_NAME_FADE$4 = 'fade';
const CLASS_NAME_FADE$5 = 'fade'; const CLASS_NAME_SHOW$5 = 'show';
const CLASS_NAME_SHOW$6 = 'show'; const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
class Backdrop { class Backdrop {
constructor(config) { constructor(config) {
@ -2590,7 +2556,7 @@
reflow(this._getElement()); reflow(this._getElement());
} }
this._getElement().classList.add(CLASS_NAME_SHOW$6); this._getElement().classList.add(CLASS_NAME_SHOW$5);
this._emulateAnimation(() => { this._emulateAnimation(() => {
execute(callback); execute(callback);
@ -2603,7 +2569,7 @@
return; return;
} }
this._getElement().classList.remove(CLASS_NAME_SHOW$6); this._getElement().classList.remove(CLASS_NAME_SHOW$5);
this._emulateAnimation(() => { this._emulateAnimation(() => {
this.dispose(); this.dispose();
@ -2615,10 +2581,10 @@
_getElement() { _getElement() {
if (!this._element) { if (!this._element) {
const backdrop = document.createElement('div'); const backdrop = document.createElement('div');
backdrop.className = CLASS_NAME_BACKDROP; backdrop.className = this._config.className;
if (this._config.isAnimated) { if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE$5); backdrop.classList.add(CLASS_NAME_FADE$4);
} }
this._element = backdrop; this._element = backdrop;
@ -2628,12 +2594,12 @@
} }
_getConfig(config) { _getConfig(config) {
config = { ...Default$6, config = { ...Default$7,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; // use getElement() with the default "body" to get a fresh Element on each instantiation }; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement); config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$7, config, DefaultType$6); typeCheckConfig(NAME$8, config, DefaultType$7);
return config; return config;
} }
@ -2642,7 +2608,7 @@
return; return;
} }
this._config.rootElement.appendChild(this._getElement()); this._config.rootElement.append(this._getElement());
EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => { EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
execute(this._config.clickCallback); execute(this._config.clickCallback);
@ -2670,7 +2636,110 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): modal.js * Bootstrap (v5.1.0): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$6 = {
trapElement: null,
// The element to trap focus inside of
autofocus: true
};
const DefaultType$6 = {
trapElement: 'element',
autofocus: 'boolean'
};
const NAME$7 = 'focustrap';
const DATA_KEY$7 = 'bs.focustrap';
const EVENT_KEY$7 = `.${DATA_KEY$7}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;
const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;
const TAB_KEY = 'Tab';
const TAB_NAV_FORWARD = 'forward';
const TAB_NAV_BACKWARD = 'backward';
class FocusTrap {
constructor(config) {
this._config = this._getConfig(config);
this._isActive = false;
this._lastTabNavDirection = null;
}
activate() {
const {
trapElement,
autofocus
} = this._config;
if (this._isActive) {
return;
}
if (autofocus) {
trapElement.focus();
}
EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));
EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
this._isActive = true;
}
deactivate() {
if (!this._isActive) {
return;
}
this._isActive = false;
EventHandler.off(document, EVENT_KEY$7);
} // Private
_handleFocusin(event) {
const {
target
} = event;
const {
trapElement
} = this._config;
if (target === document || target === trapElement || trapElement.contains(target)) {
return;
}
const elements = SelectorEngine.focusableChildren(trapElement);
if (elements.length === 0) {
trapElement.focus();
} else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
elements[elements.length - 1].focus();
} else {
elements[0].focus();
}
}
_handleKeydown(event) {
if (event.key !== TAB_KEY) {
return;
}
this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
}
_getConfig(config) {
config = { ...Default$6,
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME$7, config, DefaultType$6);
return config;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -2700,21 +2769,19 @@
const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`; const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
const CLASS_NAME_OPEN = 'modal-open'; const CLASS_NAME_OPEN = 'modal-open';
const CLASS_NAME_FADE$4 = 'fade'; const CLASS_NAME_FADE$3 = 'fade';
const CLASS_NAME_SHOW$5 = 'show'; const CLASS_NAME_SHOW$4 = 'show';
const CLASS_NAME_STATIC = 'modal-static'; const CLASS_NAME_STATIC = 'modal-static';
const SELECTOR_DIALOG = '.modal-dialog'; const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body'; const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]'; const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -2727,6 +2794,7 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element); this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._isShown = false; this._isShown = false;
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
this._isTransitioning = false; this._isTransitioning = false;
@ -2776,7 +2844,6 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => { EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => { EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
if (event.target === this._element) { if (event.target === this._element) {
@ -2788,11 +2855,7 @@
this._showBackdrop(() => this._showElement(relatedTarget)); this._showBackdrop(() => this._showElement(relatedTarget));
} }
hide(event) { hide() {
if (event && ['A', 'AREA'].includes(event.target.tagName)) {
event.preventDefault();
}
if (!this._isShown || this._isTransitioning) { if (!this._isShown || this._isTransitioning) {
return; return;
} }
@ -2815,11 +2878,11 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, EVENT_FOCUSIN$2); this._focustrap.deactivate();
this._element.classList.remove(CLASS_NAME_SHOW$5); this._element.classList.remove(CLASS_NAME_SHOW$4);
EventHandler.off(this._element, EVENT_CLICK_DISMISS$2); EventHandler.off(this._element, EVENT_CLICK_DISMISS);
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
this._queueCallback(() => this._hideModal(), this._element, isAnimated); this._queueCallback(() => this._hideModal(), this._element, isAnimated);
@ -2830,14 +2893,9 @@
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); this._focustrap.deactivate();
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
EventHandler.off(document, EVENT_FOCUSIN$2); super.dispose();
} }
handleUpdate() { handleUpdate() {
@ -2853,6 +2911,12 @@
}); });
} }
_initializeFocusTrap() {
return new FocusTrap({
trapElement: this._element
});
}
_getConfig(config) { _getConfig(config) {
config = { ...Default$5, config = { ...Default$5,
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
@ -2869,7 +2933,7 @@
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position // Don't move modal's DOM position
document.body.appendChild(this._element); document.body.append(this._element);
} }
this._element.style.display = 'block'; this._element.style.display = 'block';
@ -2890,15 +2954,11 @@
reflow(this._element); reflow(this._element);
} }
this._element.classList.add(CLASS_NAME_SHOW$5); this._element.classList.add(CLASS_NAME_SHOW$4);
if (this._config.focus) {
this._enforceFocus();
}
const transitionComplete = () => { const transitionComplete = () => {
if (this._config.focus) { if (this._config.focus) {
this._element.focus(); this._focustrap.activate();
} }
this._isTransitioning = false; this._isTransitioning = false;
@ -2910,16 +2970,6 @@
this._queueCallback(transitionComplete, this._dialog, isAnimated); this._queueCallback(transitionComplete, this._dialog, isAnimated);
} }
_enforceFocus() {
EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
EventHandler.on(document, EVENT_FOCUSIN$2, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus();
}
});
}
_setEscapeEvent() { _setEscapeEvent() {
if (this._isShown) { if (this._isShown) {
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
@ -2966,7 +3016,7 @@
} }
_showBackdrop(callback) { _showBackdrop(callback) {
EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => { EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
if (this._ignoreBackdropClick) { if (this._ignoreBackdropClick) {
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
return; return;
@ -2987,7 +3037,7 @@
} }
_isAnimated() { _isAnimated() {
return this._element.classList.contains(CLASS_NAME_FADE$4); return this._element.classList.contains(CLASS_NAME_FADE$3);
} }
_triggerBackdropTransition() { _triggerBackdropTransition() {
@ -3098,6 +3148,7 @@
const data = Modal.getOrCreateInstance(target); const data = Modal.getOrCreateInstance(target);
data.toggle(this); data.toggle(this);
}); });
enableDismissTrigger(Modal);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -3109,7 +3160,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): offcanvas.js * Bootstrap (v5.1.0): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3135,17 +3186,15 @@
keyboard: 'boolean', keyboard: 'boolean',
scroll: 'boolean' scroll: 'boolean'
}; };
const CLASS_NAME_SHOW$4 = 'show'; const CLASS_NAME_SHOW$3 = 'show';
const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
const OPEN_SELECTOR = '.offcanvas.show'; const OPEN_SELECTOR = '.offcanvas.show';
const EVENT_SHOW$2 = `show${EVENT_KEY$5}`; const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]'; const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -3159,6 +3208,7 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._isShown = false; this._isShown = false;
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._addEventListeners(); this._addEventListeners();
} // Getters } // Getters
@ -3197,8 +3247,6 @@
if (!this._config.scroll) { if (!this._config.scroll) {
new ScrollBarHelper().hide(); new ScrollBarHelper().hide();
this._enforceFocusOnElement(this._element);
} }
this._element.removeAttribute('aria-hidden'); this._element.removeAttribute('aria-hidden');
@ -3207,9 +3255,13 @@
this._element.setAttribute('role', 'dialog'); this._element.setAttribute('role', 'dialog');
this._element.classList.add(CLASS_NAME_SHOW$4); this._element.classList.add(CLASS_NAME_SHOW$3);
const completeCallBack = () => { const completeCallBack = () => {
if (!this._config.scroll) {
this._focustrap.activate();
}
EventHandler.trigger(this._element, EVENT_SHOWN$2, { EventHandler.trigger(this._element, EVENT_SHOWN$2, {
relatedTarget relatedTarget
}); });
@ -3229,13 +3281,13 @@
return; return;
} }
EventHandler.off(document, EVENT_FOCUSIN$1); this._focustrap.deactivate();
this._element.blur(); this._element.blur();
this._isShown = false; this._isShown = false;
this._element.classList.remove(CLASS_NAME_SHOW$4); this._element.classList.remove(CLASS_NAME_SHOW$3);
this._backdrop.hide(); this._backdrop.hide();
@ -3261,8 +3313,9 @@
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
this._focustrap.deactivate();
super.dispose(); super.dispose();
EventHandler.off(document, EVENT_FOCUSIN$1);
} // Private } // Private
@ -3277,6 +3330,7 @@
_initializeBackDrop() { _initializeBackDrop() {
return new Backdrop({ return new Backdrop({
className: CLASS_NAME_BACKDROP,
isVisible: this._config.backdrop, isVisible: this._config.backdrop,
isAnimated: true, isAnimated: true,
rootElement: this._element.parentNode, rootElement: this._element.parentNode,
@ -3284,19 +3338,13 @@
}); });
} }
_enforceFocusOnElement(element) { _initializeFocusTrap() {
EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop return new FocusTrap({
trapElement: this._element
EventHandler.on(document, EVENT_FOCUSIN$1, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus();
}
}); });
element.focus();
} }
_addEventListeners() { _addEventListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
if (this._config.keyboard && event.key === ESCAPE_KEY) { if (this._config.keyboard && event.key === ESCAPE_KEY) {
this.hide(); this.hide();
@ -3357,6 +3405,7 @@
data.toggle(this); data.toggle(this);
}); });
EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show())); EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
enableDismissTrigger(Offcanvas);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -3367,7 +3416,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/sanitizer.js * Bootstrap (v5.1.0): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3480,7 +3529,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tooltip.js * Bootstrap (v5.1.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -3494,7 +3543,6 @@
const DATA_KEY$4 = 'bs.tooltip'; const DATA_KEY$4 = 'bs.tooltip';
const EVENT_KEY$4 = `.${DATA_KEY$4}`; const EVENT_KEY$4 = `.${DATA_KEY$4}`;
const CLASS_PREFIX$1 = 'bs-tooltip'; const CLASS_PREFIX$1 = 'bs-tooltip';
const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
const DefaultType$3 = { const DefaultType$3 = {
animation: 'boolean', animation: 'boolean',
@ -3553,12 +3601,14 @@
MOUSEENTER: `mouseenter${EVENT_KEY$4}`, MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$4}` MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
}; };
const CLASS_NAME_FADE$3 = 'fade'; const CLASS_NAME_FADE$2 = 'fade';
const CLASS_NAME_MODAL = 'modal'; const CLASS_NAME_MODAL = 'modal';
const CLASS_NAME_SHOW$3 = 'show'; const CLASS_NAME_SHOW$2 = 'show';
const HOVER_STATE_SHOW = 'show'; const HOVER_STATE_SHOW = 'show';
const HOVER_STATE_OUT = 'out'; const HOVER_STATE_OUT = 'out';
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
const EVENT_MODAL_HIDE = 'hide.bs.modal';
const TRIGGER_HOVER = 'hover'; const TRIGGER_HOVER = 'hover';
const TRIGGER_FOCUS = 'focus'; const TRIGGER_FOCUS = 'focus';
const TRIGGER_CLICK = 'click'; const TRIGGER_CLICK = 'click';
@ -3635,7 +3685,7 @@
context._leave(null, context); context._leave(null, context);
} }
} else { } else {
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) { if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {
this._leave(null, this); this._leave(null, this);
return; return;
@ -3647,7 +3697,7 @@
dispose() { dispose() {
clearTimeout(this._timeout); clearTimeout(this._timeout);
EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this.tip) { if (this.tip) {
this.tip.remove(); this.tip.remove();
@ -3683,10 +3733,8 @@
this._element.setAttribute('aria-describedby', tipId); this._element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this._config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE$3); tip.classList.add(CLASS_NAME_FADE$2);
} }
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
@ -3701,7 +3749,7 @@
Data.set(tip, this.constructor.DATA_KEY, this); Data.set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip); container.append(tip);
EventHandler.trigger(this._element, this.constructor.Event.INSERTED); EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
} }
@ -3711,8 +3759,9 @@
this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment)); this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
} }
tip.classList.add(CLASS_NAME_SHOW$3); tip.classList.add(CLASS_NAME_SHOW$2);
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
const customClass = this._resolvePossibleFunction(this._config.customClass);
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -3738,7 +3787,7 @@
} }
}; };
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3); const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
this._queueCallback(complete, this.tip, isAnimated); this._queueCallback(complete, this.tip, isAnimated);
} }
@ -3778,7 +3827,7 @@
return; return;
} }
tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
@ -3788,7 +3837,7 @@
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3); const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
this._queueCallback(complete, this.tip, isAnimated); this._queueCallback(complete, this.tip, isAnimated);
@ -3813,14 +3862,27 @@
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this._config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; const tip = element.children[0];
this.setContent(tip);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
this.tip = tip;
return this.tip; return this.tip;
} }
setContent() { setContent(tip) {
const tip = this.getTipElement(); this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()); }
tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
_sanitizeAndSetContent(template, content, selector) {
const templateElement = SelectorEngine.findOne(selector, template);
if (!content && templateElement) {
templateElement.remove();
return;
} // we use append for html objects to maintain js events
this.setElementContent(templateElement, content);
} }
setElementContent(element, content) { setElementContent(element, content) {
@ -3834,7 +3896,7 @@
if (this._config.html) { if (this._config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.append(content);
} }
} else { } else {
element.textContent = content.textContent; element.textContent = content.textContent;
@ -3855,13 +3917,9 @@
} }
getTitle() { getTitle() {
let title = this._element.getAttribute('data-bs-original-title'); const title = this._element.getAttribute('data-bs-original-title') || this._config.title;
if (!title) { return this._resolvePossibleFunction(title);
title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
}
return title;
} }
updateAttachment(attachment) { updateAttachment(attachment) {
@ -3878,15 +3936,7 @@
_initializeOnDelegatedTarget(event, context) { _initializeOnDelegatedTarget(event, context) {
const dataKey = this.constructor.DATA_KEY; return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
context = context || Data.get(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.set(event.delegateTarget, dataKey, context);
}
return context;
} }
_getOffset() { _getOffset() {
@ -3905,6 +3955,10 @@
return offset; return offset;
} }
_resolvePossibleFunction(content) {
return typeof content === 'function' ? content.call(this._element) : content;
}
_getPopperConfig(attachment) { _getPopperConfig(attachment) {
const defaultBsPopperConfig = { const defaultBsPopperConfig = {
placement: attachment, placement: attachment,
@ -3946,7 +4000,7 @@
} }
_addAttachmentClass(attachment) { _addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);
} }
_getAttachment(placement) { _getAttachment(placement) {
@ -3973,7 +4027,7 @@
} }
}; };
EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this._config.selector) { if (this._config.selector) {
this._config = { ...this._config, this._config = { ...this._config,
@ -4008,7 +4062,7 @@
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
} }
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) { if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW; context._hoverState = HOVER_STATE_SHOW;
return; return;
} }
@ -4104,26 +4158,32 @@
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this._config) {
for (const key in this._config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this._config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this._config[key]; config[key] = this._config[key];
} }
} } // In the future can be replaced with:
} // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
// `Object.fromEntries(keysWithDifferentValues)`
return config; return config;
} }
_cleanTipClass() { _cleanTipClass() {
const tip = this.getTipElement(); const tip = this.getTipElement();
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1); const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g');
const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);
if (tabClass !== null && tabClass.length > 0) { if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass)); tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
} }
} }
_getBasicClassPrefix() {
return CLASS_PREFIX$1;
}
_handlePopperPlacementChange(popperData) { _handlePopperPlacementChange(popperData) {
const { const {
state state
@ -4168,7 +4228,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): popover.js * Bootstrap (v5.1.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4182,7 +4242,6 @@
const DATA_KEY$3 = 'bs.popover'; const DATA_KEY$3 = 'bs.popover';
const EVENT_KEY$3 = `.${DATA_KEY$3}`; const EVENT_KEY$3 = `.${DATA_KEY$3}`;
const CLASS_PREFIX = 'bs-popover'; const CLASS_PREFIX = 'bs-popover';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const Default$2 = { ...Tooltip.Default, const Default$2 = { ...Tooltip.Default,
placement: 'right', placement: 'right',
offset: [0, 8], offset: [0, 8],
@ -4205,8 +4264,6 @@
MOUSEENTER: `mouseenter${EVENT_KEY$3}`, MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
MOUSELEAVE: `mouseleave${EVENT_KEY$3}` MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
}; };
const CLASS_NAME_FADE$2 = 'fade';
const CLASS_NAME_SHOW$2 = 'show';
const SELECTOR_TITLE = '.popover-header'; const SELECTOR_TITLE = '.popover-header';
const SELECTOR_CONTENT = '.popover-body'; const SELECTOR_CONTENT = '.popover-body';
/** /**
@ -4238,55 +4295,19 @@
return this.getTitle() || this._getContent(); return this.getTitle() || this._getContent();
} }
getTipElement() { setContent(tip) {
if (this.tip) { this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
return this.tip;
}
this.tip = super.getTipElement(); this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
if (!this.getTitle()) {
SelectorEngine.findOne(SELECTOR_TITLE, this.tip).remove();
}
if (!this._getContent()) {
SelectorEngine.findOne(SELECTOR_CONTENT, this.tip).remove();
}
return this.tip;
}
setContent() {
const tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
let content = this._getContent();
if (typeof content === 'function') {
content = content.call(this._element);
}
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
} // Private } // Private
_addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this._config.content; return this._resolvePossibleFunction(this._config.content);
} }
_cleanTipClass() { _getBasicClassPrefix() {
const tip = this.getTipElement(); return CLASS_PREFIX;
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
} // Static } // Static
@ -4317,7 +4338,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): scrollspy.js * Bootstrap (v5.1.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4351,6 +4372,7 @@
const SELECTOR_NAV_LINKS = '.nav-link'; const SELECTOR_NAV_LINKS = '.nav-link';
const SELECTOR_NAV_ITEMS = '.nav-item'; const SELECTOR_NAV_ITEMS = '.nav-item';
const SELECTOR_LIST_ITEMS = '.list-group-item'; const SELECTOR_LIST_ITEMS = '.list-group-item';
const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;
const SELECTOR_DROPDOWN$1 = '.dropdown'; const SELECTOR_DROPDOWN$1 = '.dropdown';
const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
const METHOD_OFFSET = 'offset'; const METHOD_OFFSET = 'offset';
@ -4366,7 +4388,6 @@
super(element); super(element);
this._scrollElement = this._element.tagName === 'BODY' ? window : this._element; this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._activeTarget = null; this._activeTarget = null;
@ -4394,7 +4415,7 @@
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._scrollHeight = this._getScrollHeight(); this._scrollHeight = this._getScrollHeight();
const targets = SelectorEngine.find(this._selector); const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);
targets.map(element => { targets.map(element => {
const targetSelector = getSelectorFromElement(element); const targetSelector = getSelectorFromElement(element);
const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null; const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
@ -4426,20 +4447,7 @@
...Manipulator.getDataAttributes(this._element), ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.target = getElement(config.target) || document.documentElement;
if (typeof config.target !== 'string' && isElement(config.target)) {
let {
id
} = config.target;
if (!id) {
id = getUID(NAME$2);
config.target.id = id;
}
config.target = `#${id}`;
}
typeCheckConfig(NAME$2, config, DefaultType$1); typeCheckConfig(NAME$2, config, DefaultType$1);
return config; return config;
} }
@ -4499,16 +4507,13 @@
this._clear(); this._clear();
const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`); const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
const link = SelectorEngine.findOne(queries.join(','), this._config.target);
const link = SelectorEngine.findOne(queries.join(',')); link.classList.add(CLASS_NAME_ACTIVE$1);
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1); SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
link.classList.add(CLASS_NAME_ACTIVE$1);
} else { } else {
// Set triggered link as active
link.classList.add(CLASS_NAME_ACTIVE$1);
SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => { SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
// Set triggered links parents as active // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
@ -4526,7 +4531,7 @@
} }
_clear() { _clear() {
SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1)); SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
} // Static } // Static
@ -4568,7 +4573,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tab.js * Bootstrap (v5.1.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4766,7 +4771,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): toast.js * Bootstrap (v5.1.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -4779,7 +4784,6 @@
const NAME = 'toast'; const NAME = 'toast';
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`; const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`; const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`; const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
@ -4789,7 +4793,8 @@
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_HIDE = 'hide'; const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_SHOWING = 'showing'; const CLASS_NAME_SHOWING = 'showing';
const DefaultType = { const DefaultType = {
@ -4802,7 +4807,6 @@
autohide: true, autohide: true,
delay: 5000 delay: 5000
}; };
const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -4850,17 +4854,18 @@
const complete = () => { const complete = () => {
this._element.classList.remove(CLASS_NAME_SHOWING); this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.add(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
this._maybeScheduleHide(); this._maybeScheduleHide();
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
reflow(this._element); reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
@ -4878,12 +4883,17 @@
} }
const complete = () => { const complete = () => {
this._element.classList.add(CLASS_NAME_HIDE); this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.remove(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_HIDDEN); EventHandler.trigger(this._element, EVENT_HIDDEN);
}; };
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
} }
@ -4951,7 +4961,6 @@
} }
_setListeners() { _setListeners() {
EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
@ -4979,6 +4988,8 @@
} }
} }
enableDismissTrigger(Toast);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -4986,12 +4997,11 @@
* add .Toast to jQuery only if jQuery is present * add .Toast to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(Toast); defineJQueryPlugin(Toast);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): index.umd.js * Bootstrap (v5.1.0): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

122
js/dist/alert.js vendored
View File

@ -1,19 +1,26 @@
/*! /*!
* Bootstrap alert.js v5.0.2 (https://getbootstrap.com/) * Bootstrap alert.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.SelectorEngine, global.EventHandler, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.EventHandler, global.Base));
}(this, (function (SelectorEngine, EventHandler, BaseComponent) { 'use strict'; }(this, (function (EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getSelector = element => { const getSelector = element => {
let selector = element.getAttribute('data-bs-target'); let selector = element.getAttribute('data-bs-target');
@ -43,6 +50,22 @@
return selector ? document.querySelector(selector) : null; return selector ? document.querySelector(selector) : null;
}; };
const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true;
}
if (element.classList.contains('disabled')) {
return true;
}
if (typeof element.disabled !== 'undefined') {
return element.disabled;
}
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
};
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -93,7 +116,33 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): alert.js * Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler__default['default'].on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -106,12 +155,8 @@
const NAME = 'alert'; const NAME = 'alert';
const DATA_KEY = 'bs.alert'; const DATA_KEY = 'bs.alert';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const DATA_API_KEY = '.data-api';
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
const EVENT_CLOSE = `close${EVENT_KEY}`; const EVENT_CLOSE = `close${EVENT_KEY}`;
const EVENT_CLOSED = `closed${EVENT_KEY}`; const EVENT_CLOSED = `closed${EVENT_KEY}`;
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const CLASS_NAME_ALERT = 'alert';
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
/** /**
@ -127,37 +172,26 @@
} // Public } // Public
close(element) { close() {
const rootElement = element ? this._getRootElement(element) : this._element; const closeEvent = EventHandler__default['default'].trigger(this._element, EVENT_CLOSE);
const customEvent = this._triggerCloseEvent(rootElement); if (closeEvent.defaultPrevented) {
if (customEvent === null || customEvent.defaultPrevented) {
return; return;
} }
this._removeElement(rootElement); this._element.classList.remove(CLASS_NAME_SHOW);
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE);
this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
} // Private } // Private
_getRootElement(element) { _destroyElement() {
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`); this._element.remove();
}
_triggerCloseEvent(element) { EventHandler__default['default'].trigger(this._element, EVENT_CLOSED);
return EventHandler__default['default'].trigger(element, EVENT_CLOSE); this.dispose();
}
_removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW);
const isAnimated = element.classList.contains(CLASS_NAME_FADE);
this._queueCallback(() => this._destroyElement(element), element, isAnimated);
}
_destroyElement(element) {
element.remove();
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
} // Static } // Static
@ -165,22 +199,18 @@
return this.each(function () { return this.each(function () {
const data = Alert.getOrCreateInstance(this); const data = Alert.getOrCreateInstance(this);
if (config === 'close') { if (typeof config !== 'string') {
return;
}
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`);
}
data[config](this); data[config](this);
}
}); });
} }
static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
}
alertInstance.close(this);
};
}
} }
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -189,7 +219,7 @@
*/ */
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert())); enableDismissTrigger(Alert, 'close');
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery

File diff suppressed because one or more lines are too long

View File

@ -1,20 +1,25 @@
/*! /*!
* Bootstrap base-component.js v5.0.2 (https://getbootstrap.com/) * Bootstrap base-component.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./dom/event-handler.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './dom/event-handler'], factory) : typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.SelectorEngine, global.EventHandler)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.EventHandler));
}(this, (function (Data, SelectorEngine, EventHandler) { 'use strict'; }(this, (function (Data, EventHandler) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -64,7 +69,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -108,7 +113,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): base-component.js * Bootstrap (v5.1.0): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -118,7 +123,7 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.2'; const VERSION = '5.1.0';
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {
@ -147,7 +152,7 @@
static getInstance(element) { static getInstance(element) {
return Data__default['default'].get(element, this.DATA_KEY); return Data__default['default'].get(getElement(element), this.DATA_KEY);
} }
static getOrCreateInstance(element, config = {}) { static getOrCreateInstance(element, config = {}) {

File diff suppressed because one or more lines are too long

19
js/dist/button.js vendored
View File

@ -1,19 +1,26 @@
/*! /*!
* Bootstrap button.js v5.0.2 (https://getbootstrap.com/) * Bootstrap button.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.SelectorEngine, global.EventHandler, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.EventHandler, global.Base));
}(this, (function (SelectorEngine, EventHandler, BaseComponent) { 'use strict'; }(this, (function (EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -64,7 +71,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): button.js * Bootstrap (v5.1.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

34
js/dist/carousel.js vendored
View File

@ -1,21 +1,27 @@
/*! /*!
* Bootstrap carousel.js v5.0.2 (https://getbootstrap.com/) * Bootstrap carousel.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict'; }(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => { const toType = obj => {
@ -90,8 +96,20 @@
return getComputedStyle(element).getPropertyValue('visibility') === 'visible'; return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
}; };
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -172,7 +190,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): carousel.js * Bootstrap (v5.1.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

184
js/dist/collapse.js vendored
View File

@ -1,22 +1,29 @@
/*! /*!
* Bootstrap collapse.js v5.0.2 (https://getbootstrap.com/) * Bootstrap collapse.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -83,7 +90,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -100,8 +107,20 @@
} }
}); });
}; };
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -153,7 +172,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): collapse.js * Bootstrap (v5.1.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -169,11 +188,11 @@
const DATA_API_KEY = '.data-api'; const DATA_API_KEY = '.data-api';
const Default = { const Default = {
toggle: true, toggle: true,
parent: '' parent: null
}; };
const DefaultType = { const DefaultType = {
toggle: 'boolean', toggle: 'boolean',
parent: '(string|element)' parent: '(null|element)'
}; };
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
@ -184,6 +203,7 @@
const CLASS_NAME_COLLAPSE = 'collapse'; const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing'; const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed'; const CLASS_NAME_COLLAPSED = 'collapsed';
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width'; const WIDTH = 'width';
const HEIGHT = 'height'; const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.show, .collapsing'; const SELECTOR_ACTIVES = '.show, .collapsing';
@ -199,7 +219,7 @@
super(element); super(element);
this._isTransitioning = false; this._isTransitioning = false;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._triggerArray = SelectorEngine__default['default'].find(`${SELECTOR_DATA_TOGGLE}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE}[data-bs-target="#${this._element.id}"]`); this._triggerArray = [];
const toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE); const toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
for (let i = 0, len = toggleList.length; i < len; i++) { for (let i = 0, len = toggleList.length; i < len; i++) {
@ -214,10 +234,10 @@
} }
} }
this._parent = this._config.parent ? this._getParent() : null; this._initializeChildren();
if (!this._config.parent) { if (!this._config.parent) {
this._addAriaAndCollapsedClass(this._element, this._triggerArray); this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
} }
if (this._config.toggle) { if (this._config.toggle) {
@ -236,7 +256,7 @@
toggle() { toggle() {
if (this._element.classList.contains(CLASS_NAME_SHOW)) { if (this._isShown()) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@ -244,30 +264,21 @@
} }
show() { show() {
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) { if (this._isTransitioning || this._isShown()) {
return; return;
} }
let actives; let actives = [];
let activesData; let activesData;
if (this._parent) { if (this._config.parent) {
actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(elem => { const children = SelectorEngine__default['default'].find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
if (typeof this._config.parent === 'string') { actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
return elem.getAttribute('data-bs-parent') === this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if (actives.length === 0) {
actives = null;
}
} }
const container = SelectorEngine__default['default'].findOne(this._selector); const container = SelectorEngine__default['default'].findOne(this._selector);
if (actives) { if (actives.length) {
const tempActiveData = actives.find(elem => container !== elem); const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
@ -282,17 +293,17 @@
return; return;
} }
if (actives) {
actives.forEach(elemActive => { actives.forEach(elemActive => {
if (container !== elemActive) { if (container !== elemActive) {
Collapse.collapseInterface(elemActive, 'hide'); Collapse.getOrCreateInstance(elemActive, {
toggle: false
}).hide();
} }
if (!activesData) { if (!activesData) {
Data__default['default'].set(elemActive, DATA_KEY, null); Data__default['default'].set(elemActive, DATA_KEY, null);
} }
}); });
}
const dimension = this._getDimension(); const dimension = this._getDimension();
@ -302,22 +313,18 @@
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
if (this._triggerArray.length) { this._addAriaAndCollapsedClass(this._triggerArray, true);
this._triggerArray.forEach(element => {
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
this._element.style[dimension] = ''; this._element.style[dimension] = '';
this.setTransitioning(false);
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN); EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
}; };
@ -330,7 +337,7 @@
} }
hide() { hide() {
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) { if (this._isTransitioning || !this._isShown()) {
return; return;
} }
@ -351,22 +358,19 @@
const triggerArrayLength = this._triggerArray.length; const triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (let i = 0; i < triggerArrayLength; i++) { for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i]; const trigger = this._triggerArray[i];
const elem = getElementFromSelector(trigger); const elem = getElementFromSelector(trigger);
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) { if (elem && !this._isShown(elem)) {
trigger.classList.add(CLASS_NAME_COLLAPSED); this._addAriaAndCollapsedClass([trigger], false);
trigger.setAttribute('aria-expanded', false);
}
} }
} }
this.setTransitioning(true); this._isTransitioning = true;
const complete = () => { const complete = () => {
this.setTransitioning(false); this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
@ -380,45 +384,47 @@
this._queueCallback(complete, this._element, true); this._queueCallback(complete, this._element, true);
} }
setTransitioning(isTransitioning) { _isShown(element = this._element) {
this._isTransitioning = isTransitioning; return element.classList.contains(CLASS_NAME_SHOW);
} // Private } // Private
_getConfig(config) { _getConfig(config) {
config = { ...Default, config = { ...Default,
...Manipulator__default['default'].getDataAttributes(this._element),
...config ...config
}; };
config.toggle = Boolean(config.toggle); // Coerce string values config.toggle = Boolean(config.toggle); // Coerce string values
config.parent = getElement(config.parent);
typeCheckConfig(NAME, config, DefaultType); typeCheckConfig(NAME, config, DefaultType);
return config; return config;
} }
_getDimension() { _getDimension() {
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT; return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
} }
_getParent() { _initializeChildren() {
let { if (!this._config.parent) {
parent return;
} = this._config; }
parent = getElement(parent);
const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`; const children = SelectorEngine__default['default'].find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
SelectorEngine__default['default'].find(selector, parent).forEach(element => { SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selected = getElementFromSelector(element); const selected = getElementFromSelector(element);
this._addAriaAndCollapsedClass(selected, [element]); if (selected) {
}); this._addAriaAndCollapsedClass([element], this._isShown(selected));
return parent; }
} });
}
_addAriaAndCollapsedClass(element, triggerArray) {
if (!element || !triggerArray.length) { _addAriaAndCollapsedClass(triggerArray, isOpen) {
if (!triggerArray.length) {
return; return;
} }
const isOpen = element.classList.contains(CLASS_NAME_SHOW);
triggerArray.forEach(elem => { triggerArray.forEach(elem => {
if (isOpen) { if (isOpen) {
elem.classList.remove(CLASS_NAME_COLLAPSED); elem.classList.remove(CLASS_NAME_COLLAPSED);
@ -431,20 +437,15 @@
} // Static } // Static
static collapseInterface(element, config) { static jQueryInterface(config) {
let data = Collapse.getInstance(element); return this.each(function () {
const _config = { ...Default, const _config = {};
...Manipulator__default['default'].getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
};
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { if (typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false; _config.toggle = false;
} }
if (!data) { const data = Collapse.getOrCreateInstance(this, _config);
data = new Collapse(element, _config);
}
if (typeof config === 'string') { if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
@ -453,11 +454,6 @@
data[config](); data[config]();
} }
}
static jQueryInterface(config) {
return this.each(function () {
Collapse.collapseInterface(this, config);
}); });
} }
@ -475,26 +471,12 @@
event.preventDefault(); event.preventDefault();
} }
const triggerData = Manipulator__default['default'].getDataAttributes(this);
const selector = getSelectorFromElement(this); const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine__default['default'].find(selector); const selectorElements = SelectorEngine__default['default'].find(selector);
selectorElements.forEach(element => { selectorElements.forEach(element => {
const data = Collapse.getInstance(element); Collapse.getOrCreateInstance(element, {
let config; toggle: false
}).toggle();
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse.collapseInterface(element, config);
}); });
}); });
/** /**

File diff suppressed because one or more lines are too long

4
js/dist/dom/data.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap data.js v5.0.2 (https://getbootstrap.com/) * Bootstrap data.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,7 +11,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/data.js * Bootstrap (v5.1.0): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1 +1 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,aAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"} {"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.0): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,aAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"}

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap event-handler.js v5.0.2 (https://getbootstrap.com/) * Bootstrap event-handler.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -9,6 +9,13 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory()); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
}(this, (function () { 'use strict'; }(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -23,7 +30,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/event-handler.js * Bootstrap (v5.1.0): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap manipulator.js v5.0.2 (https://getbootstrap.com/) * Bootstrap manipulator.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,7 +11,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/manipulator.js * Bootstrap (v5.1.0): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -69,8 +69,8 @@
offset(element) { offset(element) {
const rect = element.getBoundingClientRect(); const rect = element.getBoundingClientRect();
return { return {
top: rect.top + document.body.scrollTop, top: rect.top + window.pageYOffset,
left: rect.left + document.body.scrollLeft left: rect.left + window.pageXOffset
}; };
}, },

View File

@ -1 +1 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,IAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP;EACD;;QAEKC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeO,KAAf,EAAsB;EACpCD,IAAAA,OAAO,CAACE,YAAR,CAAsB,WAAUT,gBAAgB,CAACC,GAAD,CAAM,EAAtD,EAAyDO,KAAzD;EACD,GAHiB;;EAKlBE,EAAAA,mBAAmB,CAACH,OAAD,EAAUN,GAAV,EAAe;EAChCM,IAAAA,OAAO,CAACI,eAAR,CAAyB,WAAUX,gBAAgB,CAACC,GAAD,CAAM,EAAzD;EACD,GAPiB;;EASlBW,EAAAA,iBAAiB,CAACL,OAAD,EAAU;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,UAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACUhB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CADjB,EAEGC,OAFH,CAEWlB,GAAG,IAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;;EA2BlBW,EAAAA,gBAAgB,CAACjB,OAAD,EAAUN,GAAV,EAAe;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,CAAsB,WAAUzB,gBAAgB,CAACC,GAAD,CAAM,EAAtD,CAAD,CAApB;EACD,GA7BiB;;EA+BlByB,EAAAA,MAAM,CAACnB,OAAD,EAAU;EACd,UAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;;EAwClBC,EAAAA,QAAQ,CAAC5B,OAAD,EAAU;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;;EA7CiB;;;;;;;;"} {"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.0): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + window.pageYOffset,\n left: rect.left + window.pageXOffset\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","window","pageYOffset","left","pageXOffset","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,IAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP;EACD;;QAEKC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeO,KAAf,EAAsB;EACpCD,IAAAA,OAAO,CAACE,YAAR,CAAsB,WAAUT,gBAAgB,CAACC,GAAD,CAAM,EAAtD,EAAyDO,KAAzD;EACD,GAHiB;;EAKlBE,EAAAA,mBAAmB,CAACH,OAAD,EAAUN,GAAV,EAAe;EAChCM,IAAAA,OAAO,CAACI,eAAR,CAAyB,WAAUX,gBAAgB,CAACC,GAAD,CAAM,EAAzD;EACD,GAPiB;;EASlBW,EAAAA,iBAAiB,CAACL,OAAD,EAAU;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,UAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACUhB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CADjB,EAEGC,OAFH,CAEWlB,GAAG,IAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;;EA2BlBW,EAAAA,gBAAgB,CAACjB,OAAD,EAAUN,GAAV,EAAe;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,CAAsB,WAAUzB,gBAAgB,CAACC,GAAD,CAAM,EAAtD,CAAD,CAApB;EACD,GA7BiB;;EA+BlByB,EAAAA,MAAM,CAACnB,OAAD,EAAU;EACd,UAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,MAAM,CAACC,WADlB;EAELC,MAAAA,IAAI,EAAEL,IAAI,CAACK,IAAL,GAAYF,MAAM,CAACG;EAFpB,KAAP;EAID,GAtCiB;;EAwClBC,EAAAA,QAAQ,CAAC3B,OAAD,EAAU;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC4B,SADR;EAELH,MAAAA,IAAI,EAAEzB,OAAO,CAAC6B;EAFT,KAAP;EAID;;EA7CiB;;;;;;;;"}

View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap selector-engine.js v5.0.2 (https://getbootstrap.com/) * Bootstrap selector-engine.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,15 +11,52 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/selector-engine.js * Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const isVisible = element => {
if (!isElement(element) || element.getClientRects().length === 0) {
return false;
}
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true;
}
if (element.classList.contains('disabled')) {
return true;
}
if (typeof element.disabled !== 'undefined') {
return element.disabled;
}
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
};
/** /**
* ------------------------------------------------------------------------ * --------------------------------------------------------------------------
* Constants * Bootstrap (v5.1.0): dom/selector-engine.js
* ------------------------------------------------------------------------ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/ */
const NODE_TEXT = 3; const NODE_TEXT = 3;
const SelectorEngine = { const SelectorEngine = {
@ -76,6 +113,11 @@
} }
return []; return [];
},
focusableChildren(element) {
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
} }
}; };

File diff suppressed because one or more lines are too long

140
js/dist/dropdown.js vendored
View File

@ -1,13 +1,13 @@
/*! /*!
* Bootstrap dropdown.js v5.0.2 (https://getbootstrap.com/) * Bootstrap dropdown.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (Popper, SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict'; }(this, (function (Popper, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -32,11 +32,18 @@
} }
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -93,7 +100,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -216,7 +223,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dropdown.js * Bootstrap (v5.1.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -242,7 +249,6 @@
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const EVENT_CLICK = `click${EVENT_KEY}`;
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`; const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`;
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`; const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`;
@ -290,8 +296,6 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._menu = this._getMenuElement(); this._menu = this._getMenuElement();
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
this._addEventListeners();
} // Getters } // Getters
@ -309,26 +313,14 @@
toggle() { toggle() {
if (isDisabled(this._element)) { return this._isShown() ? this.hide() : this.show();
return;
}
const isActive = this._element.classList.contains(CLASS_NAME_SHOW);
if (isActive) {
this.hide();
return;
}
this.show();
} }
show() { show() {
if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) { if (isDisabled(this._element) || this._isShown(this._menu)) {
return; return;
} }
const parent = Dropdown.getParentFromElement(this._element);
const relatedTarget = { const relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
@ -336,34 +328,14 @@
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} // Totally disable Popper for Dropdowns in Navbar }
const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
if (this._inNavbar) { if (this._inNavbar) {
Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'none'); Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'none');
} else { } else {
if (typeof Popper__namespace === 'undefined') { this._createPopper(parent);
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'static');
}
} // If this is a touch-enabled device we add extra } // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
@ -378,15 +350,15 @@
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
this._menu.classList.toggle(CLASS_NAME_SHOW); this._menu.classList.add(CLASS_NAME_SHOW);
this._element.classList.toggle(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOW);
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, relatedTarget); EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, relatedTarget);
} }
hide() { hide() {
if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) { if (isDisabled(this._element) || !this._isShown(this._menu)) {
return; return;
} }
@ -414,13 +386,6 @@
} // Private } // Private
_addEventListeners() {
EventHandler__default['default'].on(this._element, EVENT_CLICK, event => {
event.preventDefault();
this.toggle();
});
}
_completeHide(relatedTarget) { _completeHide(relatedTarget) {
const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE, relatedTarget); const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE, relatedTarget);
@ -463,6 +428,35 @@
return config; return config;
} }
_createPopper(parent) {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'static');
}
}
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW);
}
_getMenuElement() { _getMenuElement() {
return SelectorEngine__default['default'].next(this._element, SELECTOR_MENU)[0]; return SelectorEngine__default['default'].next(this._element, SELECTOR_MENU)[0];
} }
@ -552,21 +546,19 @@
} // Static } // Static
static dropdownInterface(element, config) { static jQueryInterface(config) {
const data = Dropdown.getOrCreateInstance(element, config); return this.each(function () {
const data = Dropdown.getOrCreateInstance(this, config);
if (typeof config !== 'string') {
return;
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}
}
static jQueryInterface(config) {
return this.each(function () {
Dropdown.dropdownInterface(this, config);
}); });
} }
@ -584,7 +576,7 @@
continue; continue;
} }
if (!context._element.classList.contains(CLASS_NAME_SHOW)) { if (!context._isShown()) {
continue; continue;
} }
@ -643,20 +635,20 @@
return; return;
} }
const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0]; const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (event.key === ESCAPE_KEY) { if (event.key === ESCAPE_KEY) {
getToggleButton().focus(); instance.hide();
Dropdown.clearMenus();
return; return;
} }
if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) { if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
if (!isActive) { if (!isActive) {
getToggleButton().click(); instance.show();
} }
Dropdown.getInstance(getToggleButton())._selectMenuItem(event); instance._selectMenuItem(event);
return; return;
} }
@ -680,7 +672,7 @@
EventHandler__default['default'].on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); EventHandler__default['default'].on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault(); event.preventDefault();
Dropdown.dropdownInterface(this); Dropdown.getOrCreateInstance(this).toggle();
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

250
js/dist/modal.js vendored
View File

@ -1,21 +1,27 @@
/*! /*!
* Bootstrap modal.js v5.0.2 (https://getbootstrap.com/) * Bootstrap modal.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict'; }(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -102,7 +108,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -128,7 +134,35 @@
return getComputedStyle(element).getPropertyValue('visibility') === 'visible'; return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
}; };
const reflow = element => element.offsetHeight; const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true;
}
if (element.classList.contains('disabled')) {
return true;
}
if (typeof element.disabled !== 'undefined') {
return element.disabled;
}
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -218,7 +252,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/scrollBar.js * Bootstrap (v5.1.0): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -322,11 +356,12 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/backdrop.js * Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const Default$1 = { const Default$2 = {
className: 'modal-backdrop',
isVisible: true, isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom // if false, we use the backdrop helper without adding any element to the dom
isAnimated: false, isAnimated: false,
@ -334,17 +369,17 @@
// give the choice to place backdrop under different elements // give the choice to place backdrop under different elements
clickCallback: null clickCallback: null
}; };
const DefaultType$1 = { const DefaultType$2 = {
className: 'string',
isVisible: 'boolean', isVisible: 'boolean',
isAnimated: 'boolean', isAnimated: 'boolean',
rootElement: '(element|string)', rootElement: '(element|string)',
clickCallback: '(function|null)' clickCallback: '(function|null)'
}; };
const NAME$1 = 'backdrop'; const NAME$2 = 'backdrop';
const CLASS_NAME_BACKDROP = 'modal-backdrop';
const CLASS_NAME_FADE$1 = 'fade'; const CLASS_NAME_FADE$1 = 'fade';
const CLASS_NAME_SHOW$1 = 'show'; const CLASS_NAME_SHOW$1 = 'show';
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$1}`; const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$2}`;
class Backdrop { class Backdrop {
constructor(config) { constructor(config) {
@ -390,7 +425,7 @@
_getElement() { _getElement() {
if (!this._element) { if (!this._element) {
const backdrop = document.createElement('div'); const backdrop = document.createElement('div');
backdrop.className = CLASS_NAME_BACKDROP; backdrop.className = this._config.className;
if (this._config.isAnimated) { if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE$1); backdrop.classList.add(CLASS_NAME_FADE$1);
@ -403,12 +438,12 @@
} }
_getConfig(config) { _getConfig(config) {
config = { ...Default$1, config = { ...Default$2,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; // use getElement() with the default "body" to get a fresh Element on each instantiation }; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement); config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$1, config, DefaultType$1); typeCheckConfig(NAME$2, config, DefaultType$2);
return config; return config;
} }
@ -417,7 +452,7 @@
return; return;
} }
this._config.rootElement.appendChild(this._getElement()); this._config.rootElement.append(this._getElement());
EventHandler__default['default'].on(this._getElement(), EVENT_MOUSEDOWN, () => { EventHandler__default['default'].on(this._getElement(), EVENT_MOUSEDOWN, () => {
execute(this._config.clickCallback); execute(this._config.clickCallback);
@ -445,7 +480,136 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): modal.js * Bootstrap (v5.1.0): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$1 = {
trapElement: null,
// The element to trap focus inside of
autofocus: true
};
const DefaultType$1 = {
trapElement: 'element',
autofocus: 'boolean'
};
const NAME$1 = 'focustrap';
const DATA_KEY$1 = 'bs.focustrap';
const EVENT_KEY$1 = `.${DATA_KEY$1}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY$1}`;
const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$1}`;
const TAB_KEY = 'Tab';
const TAB_NAV_FORWARD = 'forward';
const TAB_NAV_BACKWARD = 'backward';
class FocusTrap {
constructor(config) {
this._config = this._getConfig(config);
this._isActive = false;
this._lastTabNavDirection = null;
}
activate() {
const {
trapElement,
autofocus
} = this._config;
if (this._isActive) {
return;
}
if (autofocus) {
trapElement.focus();
}
EventHandler__default['default'].off(document, EVENT_KEY$1); // guard against infinite focus loop
EventHandler__default['default'].on(document, EVENT_FOCUSIN, event => this._handleFocusin(event));
EventHandler__default['default'].on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
this._isActive = true;
}
deactivate() {
if (!this._isActive) {
return;
}
this._isActive = false;
EventHandler__default['default'].off(document, EVENT_KEY$1);
} // Private
_handleFocusin(event) {
const {
target
} = event;
const {
trapElement
} = this._config;
if (target === document || target === trapElement || trapElement.contains(target)) {
return;
}
const elements = SelectorEngine__default['default'].focusableChildren(trapElement);
if (elements.length === 0) {
trapElement.focus();
} else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
elements[elements.length - 1].focus();
} else {
elements[0].focus();
}
}
_handleKeydown(event) {
if (event.key !== TAB_KEY) {
return;
}
this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
}
_getConfig(config) {
config = { ...Default$1,
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME$1, config, DefaultType$1);
return config;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler__default['default'].on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -475,7 +639,6 @@
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
const EVENT_RESIZE = `resize${EVENT_KEY}`; const EVENT_RESIZE = `resize${EVENT_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;
@ -489,7 +652,6 @@
const SELECTOR_DIALOG = '.modal-dialog'; const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body'; const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]'; const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]';
const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -502,6 +664,7 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._dialog = SelectorEngine__default['default'].findOne(SELECTOR_DIALOG, this._element); this._dialog = SelectorEngine__default['default'].findOne(SELECTOR_DIALOG, this._element);
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._isShown = false; this._isShown = false;
this._ignoreBackdropClick = false; this._ignoreBackdropClick = false;
this._isTransitioning = false; this._isTransitioning = false;
@ -551,7 +714,6 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event));
EventHandler__default['default'].on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => { EventHandler__default['default'].on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
EventHandler__default['default'].one(this._element, EVENT_MOUSEUP_DISMISS, event => { EventHandler__default['default'].one(this._element, EVENT_MOUSEUP_DISMISS, event => {
if (event.target === this._element) { if (event.target === this._element) {
@ -563,11 +725,7 @@
this._showBackdrop(() => this._showElement(relatedTarget)); this._showBackdrop(() => this._showElement(relatedTarget));
} }
hide(event) { hide() {
if (event && ['A', 'AREA'].includes(event.target.tagName)) {
event.preventDefault();
}
if (!this._isShown || this._isTransitioning) { if (!this._isShown || this._isTransitioning) {
return; return;
} }
@ -590,7 +748,7 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler__default['default'].off(document, EVENT_FOCUSIN); this._focustrap.deactivate();
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
@ -605,14 +763,9 @@
this._backdrop.dispose(); this._backdrop.dispose();
super.dispose(); this._focustrap.deactivate();
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
EventHandler__default['default'].off(document, EVENT_FOCUSIN); super.dispose();
} }
handleUpdate() { handleUpdate() {
@ -628,6 +781,12 @@
}); });
} }
_initializeFocusTrap() {
return new FocusTrap({
trapElement: this._element
});
}
_getConfig(config) { _getConfig(config) {
config = { ...Default, config = { ...Default,
...Manipulator__default['default'].getDataAttributes(this._element), ...Manipulator__default['default'].getDataAttributes(this._element),
@ -644,7 +803,7 @@
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position // Don't move modal's DOM position
document.body.appendChild(this._element); document.body.append(this._element);
} }
this._element.style.display = 'block'; this._element.style.display = 'block';
@ -667,13 +826,9 @@
this._element.classList.add(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOW);
if (this._config.focus) {
this._enforceFocus();
}
const transitionComplete = () => { const transitionComplete = () => {
if (this._config.focus) { if (this._config.focus) {
this._element.focus(); this._focustrap.activate();
} }
this._isTransitioning = false; this._isTransitioning = false;
@ -685,16 +840,6 @@
this._queueCallback(transitionComplete, this._dialog, isAnimated); this._queueCallback(transitionComplete, this._dialog, isAnimated);
} }
_enforceFocus() {
EventHandler__default['default'].off(document, EVENT_FOCUSIN); // guard against infinite focus loop
EventHandler__default['default'].on(document, EVENT_FOCUSIN, event => {
if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
this._element.focus();
}
});
}
_setEscapeEvent() { _setEscapeEvent() {
if (this._isShown) { if (this._isShown) {
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, event => {
@ -873,6 +1018,7 @@
const data = Modal.getOrCreateInstance(target); const data = Modal.getOrCreateInstance(target);
data.toggle(this); data.toggle(this);
}); });
enableDismissTrigger(Modal);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery

File diff suppressed because one or more lines are too long

208
js/dist/offcanvas.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap offcanvas.js v5.0.2 (https://getbootstrap.com/) * Bootstrap offcanvas.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -16,6 +16,12 @@
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000; const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@ -102,7 +108,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -143,8 +149,20 @@
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'; return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
}; };
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -232,7 +250,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/scrollBar.js * Bootstrap (v5.1.0): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -336,11 +354,12 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/backdrop.js * Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const Default$1 = { const Default$2 = {
className: 'modal-backdrop',
isVisible: true, isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom // if false, we use the backdrop helper without adding any element to the dom
isAnimated: false, isAnimated: false,
@ -348,17 +367,17 @@
// give the choice to place backdrop under different elements // give the choice to place backdrop under different elements
clickCallback: null clickCallback: null
}; };
const DefaultType$1 = { const DefaultType$2 = {
className: 'string',
isVisible: 'boolean', isVisible: 'boolean',
isAnimated: 'boolean', isAnimated: 'boolean',
rootElement: '(element|string)', rootElement: '(element|string)',
clickCallback: '(function|null)' clickCallback: '(function|null)'
}; };
const NAME$1 = 'backdrop'; const NAME$2 = 'backdrop';
const CLASS_NAME_BACKDROP = 'modal-backdrop';
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW$1 = 'show'; const CLASS_NAME_SHOW$1 = 'show';
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$1}`; const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$2}`;
class Backdrop { class Backdrop {
constructor(config) { constructor(config) {
@ -404,7 +423,7 @@
_getElement() { _getElement() {
if (!this._element) { if (!this._element) {
const backdrop = document.createElement('div'); const backdrop = document.createElement('div');
backdrop.className = CLASS_NAME_BACKDROP; backdrop.className = this._config.className;
if (this._config.isAnimated) { if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE); backdrop.classList.add(CLASS_NAME_FADE);
@ -417,12 +436,12 @@
} }
_getConfig(config) { _getConfig(config) {
config = { ...Default$1, config = { ...Default$2,
...(typeof config === 'object' ? config : {}) ...(typeof config === 'object' ? config : {})
}; // use getElement() with the default "body" to get a fresh Element on each instantiation }; // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = getElement(config.rootElement); config.rootElement = getElement(config.rootElement);
typeCheckConfig(NAME$1, config, DefaultType$1); typeCheckConfig(NAME$2, config, DefaultType$2);
return config; return config;
} }
@ -431,7 +450,7 @@
return; return;
} }
this._config.rootElement.appendChild(this._getElement()); this._config.rootElement.append(this._getElement());
EventHandler__default['default'].on(this._getElement(), EVENT_MOUSEDOWN, () => { EventHandler__default['default'].on(this._getElement(), EVENT_MOUSEDOWN, () => {
execute(this._config.clickCallback); execute(this._config.clickCallback);
@ -459,7 +478,136 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): offcanvas.js * Bootstrap (v5.1.0): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$1 = {
trapElement: null,
// The element to trap focus inside of
autofocus: true
};
const DefaultType$1 = {
trapElement: 'element',
autofocus: 'boolean'
};
const NAME$1 = 'focustrap';
const DATA_KEY$1 = 'bs.focustrap';
const EVENT_KEY$1 = `.${DATA_KEY$1}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY$1}`;
const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$1}`;
const TAB_KEY = 'Tab';
const TAB_NAV_FORWARD = 'forward';
const TAB_NAV_BACKWARD = 'backward';
class FocusTrap {
constructor(config) {
this._config = this._getConfig(config);
this._isActive = false;
this._lastTabNavDirection = null;
}
activate() {
const {
trapElement,
autofocus
} = this._config;
if (this._isActive) {
return;
}
if (autofocus) {
trapElement.focus();
}
EventHandler__default['default'].off(document, EVENT_KEY$1); // guard against infinite focus loop
EventHandler__default['default'].on(document, EVENT_FOCUSIN, event => this._handleFocusin(event));
EventHandler__default['default'].on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
this._isActive = true;
}
deactivate() {
if (!this._isActive) {
return;
}
this._isActive = false;
EventHandler__default['default'].off(document, EVENT_KEY$1);
} // Private
_handleFocusin(event) {
const {
target
} = event;
const {
trapElement
} = this._config;
if (target === document || target === trapElement || trapElement.contains(target)) {
return;
}
const elements = SelectorEngine__default['default'].focusableChildren(trapElement);
if (elements.length === 0) {
trapElement.focus();
} else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
elements[elements.length - 1].focus();
} else {
elements[0].focus();
}
}
_handleKeydown(event) {
if (event.key !== TAB_KEY) {
return;
}
this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
}
_getConfig(config) {
config = { ...Default$1,
...(typeof config === 'object' ? config : {})
};
typeCheckConfig(NAME$1, config, DefaultType$1);
return config;
}
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler__default['default'].on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -486,16 +634,14 @@
scroll: 'boolean' scroll: 'boolean'
}; };
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
const OPEN_SELECTOR = '.offcanvas.show'; const OPEN_SELECTOR = '.offcanvas.show';
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const EVENT_HIDE = `hide${EVENT_KEY}`; const EVENT_HIDE = `hide${EVENT_KEY}`;
const EVENT_HIDDEN = `hidden${EVENT_KEY}`; const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;
const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="offcanvas"]';
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="offcanvas"]'; const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="offcanvas"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -509,6 +655,7 @@
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._isShown = false; this._isShown = false;
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap();
this._addEventListeners(); this._addEventListeners();
} // Getters } // Getters
@ -547,8 +694,6 @@
if (!this._config.scroll) { if (!this._config.scroll) {
new ScrollBarHelper().hide(); new ScrollBarHelper().hide();
this._enforceFocusOnElement(this._element);
} }
this._element.removeAttribute('aria-hidden'); this._element.removeAttribute('aria-hidden');
@ -560,6 +705,10 @@
this._element.classList.add(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOW);
const completeCallBack = () => { const completeCallBack = () => {
if (!this._config.scroll) {
this._focustrap.activate();
}
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, { EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, {
relatedTarget relatedTarget
}); });
@ -579,7 +728,7 @@
return; return;
} }
EventHandler__default['default'].off(document, EVENT_FOCUSIN); this._focustrap.deactivate();
this._element.blur(); this._element.blur();
@ -611,8 +760,9 @@
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
this._focustrap.deactivate();
super.dispose(); super.dispose();
EventHandler__default['default'].off(document, EVENT_FOCUSIN);
} // Private } // Private
@ -627,6 +777,7 @@
_initializeBackDrop() { _initializeBackDrop() {
return new Backdrop({ return new Backdrop({
className: CLASS_NAME_BACKDROP,
isVisible: this._config.backdrop, isVisible: this._config.backdrop,
isAnimated: true, isAnimated: true,
rootElement: this._element.parentNode, rootElement: this._element.parentNode,
@ -634,19 +785,13 @@
}); });
} }
_enforceFocusOnElement(element) { _initializeFocusTrap() {
EventHandler__default['default'].off(document, EVENT_FOCUSIN); // guard against infinite focus loop return new FocusTrap({
trapElement: this._element
EventHandler__default['default'].on(document, EVENT_FOCUSIN, event => {
if (document !== event.target && element !== event.target && !element.contains(event.target)) {
element.focus();
}
}); });
element.focus();
} }
_addEventListeners() { _addEventListeners() {
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, event => {
if (this._config.keyboard && event.key === ESCAPE_KEY) { if (this._config.keyboard && event.key === ESCAPE_KEY) {
this.hide(); this.hide();
@ -707,6 +852,7 @@
data.toggle(this); data.toggle(this);
}); });
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => SelectorEngine__default['default'].find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show())); EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => SelectorEngine__default['default'].find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
enableDismissTrigger(Offcanvas);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery

File diff suppressed because one or more lines are too long

71
js/dist/popover.js vendored
View File

@ -1,19 +1,25 @@
/*! /*!
* Bootstrap popover.js v5.0.2 (https://getbootstrap.com/) * Bootstrap popover.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./tooltip.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './tooltip'], factory) : typeof define === 'function' && define.amd ? define(['./tooltip'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Tooltip)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Tooltip));
}(this, (function (SelectorEngine, Tooltip) { 'use strict'; }(this, (function (Tooltip) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getjQuery = () => { const getjQuery = () => {
const { const {
jQuery jQuery
@ -64,7 +70,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): popover.js * Bootstrap (v5.1.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -78,7 +84,6 @@
const DATA_KEY = 'bs.popover'; const DATA_KEY = 'bs.popover';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const CLASS_PREFIX = 'bs-popover'; const CLASS_PREFIX = 'bs-popover';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const Default = { ...Tooltip__default['default'].Default, const Default = { ...Tooltip__default['default'].Default,
placement: 'right', placement: 'right',
offset: [0, 8], offset: [0, 8],
@ -101,8 +106,6 @@
MOUSEENTER: `mouseenter${EVENT_KEY}`, MOUSEENTER: `mouseenter${EVENT_KEY}`,
MOUSELEAVE: `mouseleave${EVENT_KEY}` MOUSELEAVE: `mouseleave${EVENT_KEY}`
}; };
const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show';
const SELECTOR_TITLE = '.popover-header'; const SELECTOR_TITLE = '.popover-header';
const SELECTOR_CONTENT = '.popover-body'; const SELECTOR_CONTENT = '.popover-body';
/** /**
@ -134,55 +137,19 @@
return this.getTitle() || this._getContent(); return this.getTitle() || this._getContent();
} }
getTipElement() { setContent(tip) {
if (this.tip) { this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
return this.tip;
}
this.tip = super.getTipElement(); this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
if (!this.getTitle()) {
SelectorEngine__default['default'].findOne(SELECTOR_TITLE, this.tip).remove();
}
if (!this._getContent()) {
SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, this.tip).remove();
}
return this.tip;
}
setContent() {
const tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle());
let content = this._getContent();
if (typeof content === 'function') {
content = content.call(this._element);
}
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
} // Private } // Private
_addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
}
_getContent() { _getContent() {
return this._element.getAttribute('data-bs-content') || this._config.content; return this._resolvePossibleFunction(this._config.content);
} }
_cleanTipClass() { _getBasicClassPrefix() {
const tip = this.getTipElement(); return CLASS_PREFIX;
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
} // Static } // Static

File diff suppressed because one or more lines are too long

75
js/dist/scrollspy.js vendored
View File

@ -1,30 +1,28 @@
/*! /*!
* Bootstrap scrollspy.js v5.0.2 (https://getbootstrap.com/) * Bootstrap scrollspy.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict'; }(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/index.js * Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const MAX_UID = 1000000;
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -32,20 +30,6 @@
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
const getUID = prefix => {
do {
prefix += Math.floor(Math.random() * MAX_UID);
} while (document.getElementById(prefix));
return prefix;
};
const getSelector = element => { const getSelector = element => {
let selector = element.getAttribute('data-bs-target'); let selector = element.getAttribute('data-bs-target');
@ -93,6 +77,19 @@
return typeof obj.nodeType !== 'undefined'; return typeof obj.nodeType !== 'undefined';
}; };
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return document.querySelector(obj);
}
return null;
};
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes).forEach(property => { Object.keys(configTypes).forEach(property => {
const expectedTypes = configTypes[property]; const expectedTypes = configTypes[property];
@ -155,7 +152,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): scrollspy.js * Bootstrap (v5.1.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -189,6 +186,7 @@
const SELECTOR_NAV_LINKS = '.nav-link'; const SELECTOR_NAV_LINKS = '.nav-link';
const SELECTOR_NAV_ITEMS = '.nav-item'; const SELECTOR_NAV_ITEMS = '.nav-item';
const SELECTOR_LIST_ITEMS = '.list-group-item'; const SELECTOR_LIST_ITEMS = '.list-group-item';
const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;
const SELECTOR_DROPDOWN = '.dropdown'; const SELECTOR_DROPDOWN = '.dropdown';
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
const METHOD_OFFSET = 'offset'; const METHOD_OFFSET = 'offset';
@ -204,7 +202,6 @@
super(element); super(element);
this._scrollElement = this._element.tagName === 'BODY' ? window : this._element; this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._activeTarget = null; this._activeTarget = null;
@ -232,7 +229,7 @@
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._scrollHeight = this._getScrollHeight(); this._scrollHeight = this._getScrollHeight();
const targets = SelectorEngine__default['default'].find(this._selector); const targets = SelectorEngine__default['default'].find(SELECTOR_LINK_ITEMS, this._config.target);
targets.map(element => { targets.map(element => {
const targetSelector = getSelectorFromElement(element); const targetSelector = getSelectorFromElement(element);
const target = targetSelector ? SelectorEngine__default['default'].findOne(targetSelector) : null; const target = targetSelector ? SelectorEngine__default['default'].findOne(targetSelector) : null;
@ -264,20 +261,7 @@
...Manipulator__default['default'].getDataAttributes(this._element), ...Manipulator__default['default'].getDataAttributes(this._element),
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config.target = getElement(config.target) || document.documentElement;
if (typeof config.target !== 'string' && isElement(config.target)) {
let {
id
} = config.target;
if (!id) {
id = getUID(NAME);
config.target.id = id;
}
config.target = `#${id}`;
}
typeCheckConfig(NAME, config, DefaultType); typeCheckConfig(NAME, config, DefaultType);
return config; return config;
} }
@ -337,16 +321,13 @@
this._clear(); this._clear();
const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`); const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
const link = SelectorEngine__default['default'].findOne(queries.join(','), this._config.target);
const link = SelectorEngine__default['default'].findOne(queries.join(',')); link.classList.add(CLASS_NAME_ACTIVE);
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine__default['default'].findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE); SelectorEngine__default['default'].findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
link.classList.add(CLASS_NAME_ACTIVE);
} else { } else {
// Set triggered link as active
link.classList.add(CLASS_NAME_ACTIVE);
SelectorEngine__default['default'].parents(link, SELECTOR_NAV_LIST_GROUP).forEach(listGroup => { SelectorEngine__default['default'].parents(link, SELECTOR_NAV_LIST_GROUP).forEach(listGroup => {
// Set triggered links parents as active // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
@ -364,7 +345,7 @@
} }
_clear() { _clear() {
SelectorEngine__default['default'].find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE)); SelectorEngine__default['default'].find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE));
} // Static } // Static

File diff suppressed because one or more lines are too long

35
js/dist/tab.js vendored
View File

@ -1,20 +1,27 @@
/*! /*!
* Bootstrap tab.js v5.0.2 (https://getbootstrap.com/) * Bootstrap tab.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.SelectorEngine, global.EventHandler, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.EventHandler, global.SelectorEngine, global.Base));
}(this, (function (SelectorEngine, EventHandler, BaseComponent) { 'use strict'; }(this, (function (EventHandler, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const getSelector = element => { const getSelector = element => {
let selector = element.getAttribute('data-bs-target'); let selector = element.getAttribute('data-bs-target');
@ -59,8 +66,20 @@
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'; return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
}; };
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => element.offsetHeight;
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -112,7 +131,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tab.js * Bootstrap (v5.1.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

121
js/dist/toast.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap toast.js v5.0.2 (https://getbootstrap.com/) * Bootstrap toast.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -15,6 +15,13 @@
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const toType = obj => { const toType = obj => {
if (obj === null || obj === undefined) { if (obj === null || obj === undefined) {
return `${obj}`; return `${obj}`;
@ -23,6 +30,35 @@
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
const getSelector = element => {
let selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
// `document.querySelector` will rightfully complain it is invalid.
// See https://github.com/twbs/bootstrap/issues/32273
if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
return null;
} // Just in case some CMS puts out a full URL with the anchor appended
if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
hrefAttr = `#${hrefAttr.split('#')[1]}`;
}
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
const getElementFromSelector = element => {
const selector = getSelector(element);
return selector ? document.querySelector(selector) : null;
};
const isElement = obj => { const isElement = obj => {
if (!obj || typeof obj !== 'object') { if (!obj || typeof obj !== 'object') {
return false; return false;
@ -47,7 +83,35 @@
}); });
}; };
const reflow = element => element.offsetHeight; const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true;
}
if (element.classList.contains('disabled')) {
return true;
}
if (typeof element.disabled !== 'undefined') {
return element.disabled;
}
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const getjQuery = () => { const getjQuery = () => {
const { const {
@ -99,7 +163,33 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): toast.js * Bootstrap (v5.1.0): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler__default['default'].on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -112,7 +202,6 @@
const NAME = 'toast'; const NAME = 'toast';
const DATA_KEY = 'bs.toast'; const DATA_KEY = 'bs.toast';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`; const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`; const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`; const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
@ -122,7 +211,8 @@
const EVENT_SHOW = `show${EVENT_KEY}`; const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_HIDE = 'hide'; const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_SHOWING = 'showing'; const CLASS_NAME_SHOWING = 'showing';
const DefaultType = { const DefaultType = {
@ -135,7 +225,6 @@
autohide: true, autohide: true,
delay: 5000 delay: 5000
}; };
const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -183,17 +272,18 @@
const complete = () => { const complete = () => {
this._element.classList.remove(CLASS_NAME_SHOWING); this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.add(CLASS_NAME_SHOW);
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN); EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
this._maybeScheduleHide(); this._maybeScheduleHide();
}; };
this._element.classList.remove(CLASS_NAME_HIDE); this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
reflow(this._element); reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
@ -211,12 +301,17 @@
} }
const complete = () => { const complete = () => {
this._element.classList.add(CLASS_NAME_HIDE); this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
this._element.classList.remove(CLASS_NAME_SHOWING);
this._element.classList.remove(CLASS_NAME_SHOW);
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN); EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
}; };
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
} }
@ -284,7 +379,6 @@
} }
_setListeners() { _setListeners() {
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
EventHandler__default['default'].on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); EventHandler__default['default'].on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler__default['default'].on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); EventHandler__default['default'].on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler__default['default'].on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); EventHandler__default['default'].on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
@ -312,6 +406,8 @@
} }
} }
enableDismissTrigger(Toast);
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
@ -319,7 +415,6 @@
* add .Toast to jQuery only if jQuery is present * add .Toast to jQuery only if jQuery is present
*/ */
defineJQueryPlugin(Toast); defineJQueryPlugin(Toast);
return Toast; return Toast;

File diff suppressed because one or more lines are too long

98
js/dist/tooltip.js vendored
View File

@ -1,13 +1,13 @@
/*! /*!
* Bootstrap tooltip.js v5.0.2 (https://getbootstrap.com/) * Bootstrap tooltip.js v5.1.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict'; }(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@ -32,19 +32,18 @@
} }
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator); var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent); var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/index.js * Bootstrap (v5.1.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
const MAX_UID = 1000000; const MAX_UID = 1000000;
const toType = obj => { const toType = obj => {
@ -88,7 +87,7 @@
} }
if (typeof obj === 'string' && obj.length > 0) { if (typeof obj === 'string' && obj.length > 0) {
return SelectorEngine__default['default'].findOne(obj); return document.querySelector(obj);
} }
return null; return null;
@ -183,7 +182,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/sanitizer.js * Bootstrap (v5.1.0): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -296,7 +295,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tooltip.js * Bootstrap (v5.1.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -310,7 +309,6 @@
const DATA_KEY = 'bs.tooltip'; const DATA_KEY = 'bs.tooltip';
const EVENT_KEY = `.${DATA_KEY}`; const EVENT_KEY = `.${DATA_KEY}`;
const CLASS_PREFIX = 'bs-tooltip'; const CLASS_PREFIX = 'bs-tooltip';
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
const DefaultType = { const DefaultType = {
animation: 'boolean', animation: 'boolean',
@ -375,6 +373,8 @@
const HOVER_STATE_SHOW = 'show'; const HOVER_STATE_SHOW = 'show';
const HOVER_STATE_OUT = 'out'; const HOVER_STATE_OUT = 'out';
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
const EVENT_MODAL_HIDE = 'hide.bs.modal';
const TRIGGER_HOVER = 'hover'; const TRIGGER_HOVER = 'hover';
const TRIGGER_FOCUS = 'focus'; const TRIGGER_FOCUS = 'focus';
const TRIGGER_CLICK = 'click'; const TRIGGER_CLICK = 'click';
@ -463,7 +463,7 @@
dispose() { dispose() {
clearTimeout(this._timeout); clearTimeout(this._timeout);
EventHandler__default['default'].off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler__default['default'].off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this.tip) { if (this.tip) {
this.tip.remove(); this.tip.remove();
@ -499,8 +499,6 @@
this._element.setAttribute('aria-describedby', tipId); this._element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this._config.animation) { if (this._config.animation) {
tip.classList.add(CLASS_NAME_FADE); tip.classList.add(CLASS_NAME_FADE);
} }
@ -517,7 +515,7 @@
Data__default['default'].set(tip, this.constructor.DATA_KEY, this); Data__default['default'].set(tip, this.constructor.DATA_KEY, this);
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip); container.append(tip);
EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED); EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED);
} }
@ -528,7 +526,8 @@
} }
tip.classList.add(CLASS_NAME_SHOW); tip.classList.add(CLASS_NAME_SHOW);
const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
const customClass = this._resolvePossibleFunction(this._config.customClass);
if (customClass) { if (customClass) {
tip.classList.add(...customClass.split(' ')); tip.classList.add(...customClass.split(' '));
@ -629,14 +628,27 @@
const element = document.createElement('div'); const element = document.createElement('div');
element.innerHTML = this._config.template; element.innerHTML = this._config.template;
this.tip = element.children[0]; const tip = element.children[0];
this.setContent(tip);
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
this.tip = tip;
return this.tip; return this.tip;
} }
setContent() { setContent(tip) {
const tip = this.getTipElement(); this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()); }
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
_sanitizeAndSetContent(template, content, selector) {
const templateElement = SelectorEngine__default['default'].findOne(selector, template);
if (!content && templateElement) {
templateElement.remove();
return;
} // we use append for html objects to maintain js events
this.setElementContent(templateElement, content);
} }
setElementContent(element, content) { setElementContent(element, content) {
@ -650,7 +662,7 @@
if (this._config.html) { if (this._config.html) {
if (content.parentNode !== element) { if (content.parentNode !== element) {
element.innerHTML = ''; element.innerHTML = '';
element.appendChild(content); element.append(content);
} }
} else { } else {
element.textContent = content.textContent; element.textContent = content.textContent;
@ -671,13 +683,9 @@
} }
getTitle() { getTitle() {
let title = this._element.getAttribute('data-bs-original-title'); const title = this._element.getAttribute('data-bs-original-title') || this._config.title;
if (!title) { return this._resolvePossibleFunction(title);
title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
}
return title;
} }
updateAttachment(attachment) { updateAttachment(attachment) {
@ -694,15 +702,7 @@
_initializeOnDelegatedTarget(event, context) { _initializeOnDelegatedTarget(event, context) {
const dataKey = this.constructor.DATA_KEY; return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
context = context || Data__default['default'].get(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data__default['default'].set(event.delegateTarget, dataKey, context);
}
return context;
} }
_getOffset() { _getOffset() {
@ -721,6 +721,10 @@
return offset; return offset;
} }
_resolvePossibleFunction(content) {
return typeof content === 'function' ? content.call(this._element) : content;
}
_getPopperConfig(attachment) { _getPopperConfig(attachment) {
const defaultBsPopperConfig = { const defaultBsPopperConfig = {
placement: attachment, placement: attachment,
@ -762,7 +766,7 @@
} }
_addAttachmentClass(attachment) { _addAttachmentClass(attachment) {
this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`); this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);
} }
_getAttachment(placement) { _getAttachment(placement) {
@ -789,7 +793,7 @@
} }
}; };
EventHandler__default['default'].on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler); EventHandler__default['default'].on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this._config.selector) { if (this._config.selector) {
this._config = { ...this._config, this._config = { ...this._config,
@ -920,26 +924,32 @@
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
if (this._config) {
for (const key in this._config) { for (const key in this._config) {
if (this.constructor.Default[key] !== this._config[key]) { if (this.constructor.Default[key] !== this._config[key]) {
config[key] = this._config[key]; config[key] = this._config[key];
} }
} } // In the future can be replaced with:
} // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
// `Object.fromEntries(keysWithDifferentValues)`
return config; return config;
} }
_cleanTipClass() { _cleanTipClass() {
const tip = this.getTipElement(); const tip = this.getTipElement();
const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX); const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g');
const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);
if (tabClass !== null && tabClass.length > 0) { if (tabClass !== null && tabClass.length > 0) {
tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass)); tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
} }
} }
_getBasicClassPrefix() {
return CLASS_PREFIX;
}
_handlePopperPlacementChange(popperData) { _handlePopperPlacementChange(popperData) {
const { const {
state state

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): index.esm.js * Bootstrap (v5.1.0): index.esm.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): index.umd.js * Bootstrap (v5.1.0): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): alert.js * Bootstrap (v5.1.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): base-component.js * Bootstrap (v5.1.0): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -18,7 +18,7 @@ import EventHandler from './dom/event-handler'
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
const VERSION = '5.0.2' const VERSION = '5.1.0'
class BaseComponent { class BaseComponent {
constructor(element) { constructor(element) {

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): button.js * Bootstrap (v5.1.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): carousel.js * Bootstrap (v5.1.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): collapse.js * Bootstrap (v5.1.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/data.js * Bootstrap (v5.1.0): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/event-handler.js * Bootstrap (v5.1.0): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/manipulator.js * Bootstrap (v5.1.0): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dom/selector-engine.js * Bootstrap (v5.1.0): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): dropdown.js * Bootstrap (v5.1.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): modal.js * Bootstrap (v5.1.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): offcanvas.js * Bootstrap (v5.1.0): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): popover.js * Bootstrap (v5.1.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): scrollspy.js * Bootstrap (v5.1.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tab.js * Bootstrap (v5.1.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): toast.js * Bootstrap (v5.1.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): tooltip.js * Bootstrap (v5.1.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

View File

@ -1,6 +1,6 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.0.2): util/backdrop.js * Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */

Some files were not shown because too many files have changed in this diff Show More