Compare commits
1 commit
main
...
patrickhla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42c55c1b09 |
710 changed files with 57472 additions and 91042 deletions
16
.babelrc.js
16
.babelrc.js
|
|
@ -1,12 +1,20 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
'@babel/preset-env',
|
'@babel/env',
|
||||||
{
|
{
|
||||||
loose: true,
|
loose: true,
|
||||||
bugfixes: true,
|
modules: false,
|
||||||
modules: false
|
exclude: ['transform-typeof-symbol']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
|
plugins: [
|
||||||
|
'@babel/plugin-proposal-object-rest-spread'
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
test: {
|
||||||
|
plugins: [ 'istanbul' ]
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
# https://github.com/browserslist/browserslist#readme
|
# https://github.com/browserslist/browserslist#readme
|
||||||
|
|
||||||
>= 0.5%
|
>= 1%
|
||||||
last 2 major versions
|
last 1 major version
|
||||||
not dead
|
not dead
|
||||||
Chrome >= 60
|
Chrome >= 60
|
||||||
Firefox >= 60
|
Firefox >= 60
|
||||||
# needed since Legacy Edge still has usage; 79 was the first Chromium Edge version
|
Edge >= 15.15063
|
||||||
# should be removed in the future when its usage drops or when it's moved to dead browsers
|
Explorer 11
|
||||||
not Edge < 79
|
|
||||||
Firefox ESR
|
|
||||||
iOS >= 10
|
iOS >= 10
|
||||||
Safari >= 10
|
Safari >= 10
|
||||||
Android >= 6
|
Android >= 6
|
||||||
not Explorer <= 11
|
not ExplorerMobile <= 11
|
||||||
|
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
{
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-grid.css",
|
|
||||||
"maxSize": "7 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-grid.min.css",
|
|
||||||
"maxSize": "6 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-reboot.css",
|
|
||||||
"maxSize": "2.25 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-reboot.min.css",
|
|
||||||
"maxSize": "2 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-utilities.css",
|
|
||||||
"maxSize": "7.5 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap-utilities.min.css",
|
|
||||||
"maxSize": "6.75 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap.css",
|
|
||||||
"maxSize": "24 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/css/bootstrap.min.css",
|
|
||||||
"maxSize": "22 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.bundle.js",
|
|
||||||
"maxSize": "41 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.bundle.min.js",
|
|
||||||
"maxSize": "21.5 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.esm.js",
|
|
||||||
"maxSize": "27 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.esm.min.js",
|
|
||||||
"maxSize": "18 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.js",
|
|
||||||
"maxSize": "28 kB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/js/bootstrap.min.js",
|
|
||||||
"maxSize": "15.5 kB"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ci": {
|
|
||||||
"trackBranches": [
|
|
||||||
"main",
|
|
||||||
"v4-dev"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -9,3 +9,6 @@ indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@
|
||||||
**/vendor/
|
**/vendor/
|
||||||
/_gh_pages/
|
/_gh_pages/
|
||||||
/js/coverage/
|
/js/coverage/
|
||||||
/site/static/sw.js
|
/package.js
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"root": true,
|
"root": true,
|
||||||
|
"parser": "babel-eslint",
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:import/errors",
|
"plugin:import/errors",
|
||||||
"plugin:import/warnings",
|
"plugin:import/warnings",
|
||||||
|
|
@ -25,34 +26,32 @@
|
||||||
"error",
|
"error",
|
||||||
"always-multiline"
|
"always-multiline"
|
||||||
],
|
],
|
||||||
"new-cap": [
|
"new-cap": "off",
|
||||||
"error",
|
"no-mixed-operators": "off",
|
||||||
{
|
|
||||||
"properties": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-console": "error",
|
|
||||||
"object-curly-spacing": [
|
"object-curly-spacing": [
|
||||||
"error",
|
"error",
|
||||||
"always"
|
"always"
|
||||||
],
|
],
|
||||||
"prefer-named-capture-group": "off",
|
"prefer-destructuring": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"object": true,
|
||||||
|
"array": false
|
||||||
|
}
|
||||||
|
],
|
||||||
"semi": [
|
"semi": [
|
||||||
"error",
|
"error",
|
||||||
"never"
|
"never"
|
||||||
],
|
],
|
||||||
"unicorn/consistent-function-scoping": "off",
|
|
||||||
"unicorn/explicit-length-check": "off",
|
"unicorn/explicit-length-check": "off",
|
||||||
"unicorn/no-array-callback-reference": "off",
|
"unicorn/import-index": "off",
|
||||||
"unicorn/no-for-loop": "off",
|
"unicorn/no-for-loop": "off",
|
||||||
"unicorn/no-null": "off",
|
|
||||||
"unicorn/no-unused-properties": "error",
|
"unicorn/no-unused-properties": "error",
|
||||||
"unicorn/no-useless-undefined": "off",
|
"unicorn/prefer-includes": "off",
|
||||||
"unicorn/prefer-dom-node-append": "off",
|
"unicorn/prefer-node-append": "off",
|
||||||
"unicorn/prefer-dom-node-dataset": "off",
|
"unicorn/prefer-node-remove": "off",
|
||||||
"unicorn/prefer-dom-node-remove": "off",
|
|
||||||
"unicorn/prefer-optional-catch-binding": "off",
|
|
||||||
"unicorn/prefer-query-selector": "off",
|
"unicorn/prefer-query-selector": "off",
|
||||||
|
"unicorn/prefer-text-content": "off",
|
||||||
"unicorn/prevent-abbreviations": "off"
|
"unicorn/prevent-abbreviations": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
.gitattributes
vendored
14
.gitattributes
vendored
|
|
@ -1,8 +1,18 @@
|
||||||
# Enforce Unix newlines
|
# Enforce Unix newlines
|
||||||
* text=auto eol=lf
|
*.css text eol=lf
|
||||||
|
*.html text eol=lf
|
||||||
|
*.js text eol=lf
|
||||||
|
*.json text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.rb text eol=lf
|
||||||
|
*.scss text eol=lf
|
||||||
|
*.svg text eol=lf
|
||||||
|
*.txt text eol=lf
|
||||||
|
*.xml text eol=lf
|
||||||
|
*.yml text eol=lf
|
||||||
|
|
||||||
# Don't diff or textually merge source maps
|
# Don't diff or textually merge source maps
|
||||||
*.map binary
|
*.map binary
|
||||||
|
|
||||||
bootstrap.css linguist-vendored=false
|
bootstrap.css linguist-vendored=false
|
||||||
bootstrap.js linguist-vendored=false
|
bootstrap.js linguist-vendored=false
|
||||||
|
|
|
||||||
49
.github/CONTRIBUTING.md
vendored
49
.github/CONTRIBUTING.md
vendored
|
|
@ -19,7 +19,7 @@ and [submitting pull requests](#pull-requests), but please respect the following
|
||||||
restrictions:
|
restrictions:
|
||||||
|
|
||||||
* Please **do not** use the issue tracker for personal support requests. Stack
|
* Please **do not** use the issue tracker for personal support requests. Stack
|
||||||
Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag),
|
Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag),
|
||||||
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
|
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
|
||||||
|
|
||||||
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
||||||
|
|
@ -58,14 +58,14 @@ Good bug reports are extremely helpful, so thanks!
|
||||||
|
|
||||||
Guidelines for bug reports:
|
Guidelines for bug reports:
|
||||||
|
|
||||||
0. **[Validate your HTML](https://html5.validator.nu/)** to ensure your
|
0. **[validate your HTML](https://html5.validator.nu/)** to ensure your
|
||||||
problem isn't caused by a simple error in your own code.
|
problem isn't caused by a simple error in your own code.
|
||||||
|
|
||||||
1. **Use the GitHub issue search** — check if the issue has already been
|
1. **Use the GitHub issue search** — check if the issue has already been
|
||||||
reported.
|
reported.
|
||||||
|
|
||||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||||
latest `main` (or `v4-dev` branch if the issue is about v4) in the repository.
|
latest `master` or development branch in the repository.
|
||||||
|
|
||||||
3. **Isolate the problem** — ideally create a [reduced test
|
3. **Isolate the problem** — ideally create a [reduced test
|
||||||
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||||
|
|
@ -100,13 +100,14 @@ Example:
|
||||||
### Reporting upstream browser bugs
|
### Reporting upstream browser bugs
|
||||||
|
|
||||||
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
|
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
|
||||||
|
When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
|
||||||
|
|
||||||
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
|
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
|
||||||
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
|
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
||||||
| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. |
|
| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. |
|
||||||
| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit | In Apple's bug reporter, choose "Safari" as the product. |
|
| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit <br> https://bugreport.apple.com/ | In Apple's bug reporter, choose "Safari" as the product. |
|
||||||
| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. |
|
| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. |
|
||||||
| Microsoft | Edge | Blink | https://developer.microsoft.com/en-us/microsoft-edge/ | Go to "Help > Send Feedback" from the browser |
|
| Microsoft | Edge | EdgeHTML | https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ | |
|
||||||
|
|
||||||
|
|
||||||
## Feature requests
|
## Feature requests
|
||||||
|
|
@ -123,25 +124,23 @@ Good pull requests—patches, improvements, new features—are a fantastic
|
||||||
help. They should remain focused in scope and avoid containing unrelated
|
help. They should remain focused in scope and avoid containing unrelated
|
||||||
commits.
|
commits.
|
||||||
|
|
||||||
**Please ask first** before embarking on any **significant** pull request (e.g.
|
**Please ask first** before embarking on any significant pull request (e.g.
|
||||||
implementing features, refactoring code, porting to a different language),
|
implementing features, refactoring code, porting to a different language),
|
||||||
otherwise you risk spending a lot of time working on something that the
|
otherwise you risk spending a lot of time working on something that the
|
||||||
project's developers might not want to merge into the project. For trivial
|
project's developers might not want to merge into the project.
|
||||||
things, or things that don't require a lot of your time, you can go ahead and
|
|
||||||
make a PR.
|
|
||||||
|
|
||||||
Please adhere to the [coding guidelines](#code-guidelines) used throughout the
|
Please adhere to the [coding guidelines](#code-guidelines) used throughout the
|
||||||
project (indentation, accurate comments, etc.) and any other requirements
|
project (indentation, accurate comments, etc.) and any other requirements
|
||||||
(such as test coverage).
|
(such as test coverage).
|
||||||
|
|
||||||
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit
|
**Do not edit `bootstrap.css`, or `bootstrap.js`
|
||||||
any dist files (`dist/` or `js/dist`).** Those files are automatically generated by our build tools. You should
|
directly!** Those files are automatically generated. You should edit the
|
||||||
edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/main/scss)
|
source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/master/scss)
|
||||||
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/main/js/src) instead.
|
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/master/js/src) instead.
|
||||||
|
|
||||||
Similarly, when contributing to Bootstrap's documentation, you should edit the
|
Similarly, when contributing to Bootstrap's documentation, you should edit the
|
||||||
documentation source files in
|
documentation source files in
|
||||||
[the `/bootstrap/site/content/docs/` directory of the `main` branch](https://github.com/twbs/bootstrap/tree/main/site/content/docs).
|
[the `/bootstrap/site/content/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/site/content/docs).
|
||||||
**Do not edit the `gh-pages` branch.** That branch is generated from the
|
**Do not edit the `gh-pages` branch.** That branch is generated from the
|
||||||
documentation source files and is managed separately by the Bootstrap Core Team.
|
documentation source files and is managed separately by the Bootstrap Core Team.
|
||||||
|
|
||||||
|
|
@ -163,8 +162,8 @@ included in the project:
|
||||||
2. If you cloned a while ago, get the latest changes from upstream:
|
2. If you cloned a while ago, get the latest changes from upstream:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout main
|
git checkout master
|
||||||
git pull upstream main
|
git pull upstream master
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Create a new topic branch (off the main project development branch) to
|
3. Create a new topic branch (off the main project development branch) to
|
||||||
|
|
@ -183,7 +182,7 @@ included in the project:
|
||||||
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git pull [--rebase] upstream main
|
git pull [--rebase] upstream master
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Push your topic branch up to your fork:
|
6. Push your topic branch up to your fork:
|
||||||
|
|
@ -193,10 +192,10 @@ included in the project:
|
||||||
```
|
```
|
||||||
|
|
||||||
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
|
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
|
||||||
with a clear title and description against the `main` branch.
|
with a clear title and description against the `master` branch.
|
||||||
|
|
||||||
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
|
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
|
||||||
license your work under the terms of the [MIT License](../LICENSE) (if it
|
license your work under the terms of the [MIT License](LICENSE) (if it
|
||||||
includes code changes) and under the terms of the
|
includes code changes) and under the terms of the
|
||||||
[Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)
|
[Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)
|
||||||
(if it includes documentation changes).
|
(if it includes documentation changes).
|
||||||
|
|
@ -217,7 +216,7 @@ includes code changes) and under the terms of the
|
||||||
[Adhere to the Code Guide.](https://codeguide.co/#css)
|
[Adhere to the Code Guide.](https://codeguide.co/#css)
|
||||||
|
|
||||||
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast).
|
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast).
|
||||||
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://www.a11yproject.com/posts/2013-01-25-never-remove-css-outlines/) for more details.
|
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://a11yproject.com/posts/never-remove-css-outlines/) for more details.
|
||||||
|
|
||||||
### JS
|
### JS
|
||||||
|
|
||||||
|
|
@ -233,7 +232,7 @@ Run `npm run test` before committing to ensure your changes follow our coding st
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
By contributing your code, you agree to license your contribution under the [MIT License](../LICENSE).
|
By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
|
||||||
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/).
|
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/).
|
||||||
|
|
||||||
Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0.
|
Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0.
|
||||||
|
|
|
||||||
11
.github/ISSUE_TEMPLATE/bug.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/bug.md
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
Before opening:
|
||||||
|
|
||||||
|
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||||
|
- [Validate](https://html5.validator.nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
|
||||||
|
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
|
Bug reports must include:
|
||||||
|
|
||||||
|
- Operating system and version (Windows, macOS, Android, iOS, Win10 Mobile)
|
||||||
|
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
|
||||||
|
- [Reduced test case](https://css-tricks.com/reduced-test-cases/) and suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
||||||
13
.github/ISSUE_TEMPLATE/bug_report.md
vendored
13
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -1,20 +1,17 @@
|
||||||
---
|
---
|
||||||
name: Bug report
|
name: Bug report
|
||||||
about: Tell us about a bug you may have identified in Bootstrap.
|
about: Tell us about a bug you may have identified in Bootstrap.
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Before opening:
|
Before opening:
|
||||||
|
|
||||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||||
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
|
- [Validate](https://html5.validator.nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
|
||||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
Bug reports must include:
|
Bug reports must include:
|
||||||
|
|
||||||
- Operating system and version (Windows, macOS, Android, iOS)
|
- Operating system and version (Windows, macOS, Android, iOS, Win10 Mobile)
|
||||||
- Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser)
|
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
|
||||||
- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
- [Reduced test case](https://css-tricks.com/reduced-test-cases/) and suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
|
||||||
|
|
|
||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
contact_links:
|
|
||||||
- name: Ask a question
|
|
||||||
url: https://github.com/twbs/bootstrap/discussions/new
|
|
||||||
about: Ask and discuss questions with other Bootstrap community members
|
|
||||||
9
.github/ISSUE_TEMPLATE/feature.md
vendored
Normal file
9
.github/ISSUE_TEMPLATE/feature.md
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
Before opening:
|
||||||
|
|
||||||
|
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||||
|
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
|
Feature requests must include:
|
||||||
|
|
||||||
|
- As much detail as possible for what we should add and why it's important to Bootstrap
|
||||||
|
- Relevant links to prior art, screenshots, or live demos whenever possible
|
||||||
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
|
@ -1,16 +1,13 @@
|
||||||
---
|
---
|
||||||
name: Feature request
|
name: Feature request
|
||||||
about: Suggest an idea for a new feature in Bootstrap.
|
about: Suggest an idea for a new feature in Bootstrap.
|
||||||
title: ''
|
|
||||||
labels: feature
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Before opening:
|
Before opening:
|
||||||
|
|
||||||
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
|
||||||
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
|
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
Feature requests must include:
|
Feature requests must include:
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/SUPPORT.md
vendored
2
.github/SUPPORT.md
vendored
|
|
@ -8,4 +8,4 @@ For general troubleshooting or help getting started:
|
||||||
|
|
||||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||||
- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag.
|
- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.
|
||||||
|
|
|
||||||
24
.github/dependabot.yml
vendored
24
.github/dependabot.yml
vendored
|
|
@ -1,24 +0,0 @@
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: npm
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: tuesday
|
|
||||||
time: "12:00"
|
|
||||||
timezone: Europe/Athens
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
reviewers:
|
|
||||||
- XhmikosR
|
|
||||||
labels:
|
|
||||||
- dependencies
|
|
||||||
- v5
|
|
||||||
versioning-strategy: increase
|
|
||||||
rebase-strategy: disabled
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: tuesday
|
|
||||||
time: "12:00"
|
|
||||||
timezone: Europe/Athens
|
|
||||||
54
.github/release-drafter.yml
vendored
54
.github/release-drafter.yml
vendored
|
|
@ -1,54 +0,0 @@
|
||||||
name-template: 'v$NEXT_MAJOR_VERSION'
|
|
||||||
tag-template: 'v$NEXT_MAJOR_VERSION'
|
|
||||||
prerelease: true
|
|
||||||
exclude-labels:
|
|
||||||
- 'skip-changelog'
|
|
||||||
categories:
|
|
||||||
- title: '❗ Breaking Changes'
|
|
||||||
labels:
|
|
||||||
- 'breaking-change'
|
|
||||||
- title: '🚀 Features'
|
|
||||||
labels:
|
|
||||||
- 'new-feature'
|
|
||||||
- 'feature'
|
|
||||||
- 'enhancement'
|
|
||||||
- title: '🐛 Bug fixes'
|
|
||||||
labels:
|
|
||||||
- 'fix'
|
|
||||||
- 'bugfix'
|
|
||||||
- 'bug'
|
|
||||||
- title: '⚡ Performance Improvements'
|
|
||||||
labels:
|
|
||||||
- 'performance'
|
|
||||||
- title: '🎨 CSS'
|
|
||||||
labels:
|
|
||||||
- 'css'
|
|
||||||
- title: '☕️ JavaScript'
|
|
||||||
labels:
|
|
||||||
- 'js'
|
|
||||||
- title: '📖 Docs'
|
|
||||||
labels:
|
|
||||||
- 'docs'
|
|
||||||
- title: '🌎 Accessibility'
|
|
||||||
labels:
|
|
||||||
- 'accessibility'
|
|
||||||
- title: '🔧 Utility API'
|
|
||||||
labels:
|
|
||||||
- 'utility API'
|
|
||||||
- 'utilities'
|
|
||||||
- title: '🏭 Tests'
|
|
||||||
labels:
|
|
||||||
- 'tests'
|
|
||||||
- title: '🧰 Misc'
|
|
||||||
labels:
|
|
||||||
- 'build'
|
|
||||||
- 'meta'
|
|
||||||
- 'chore'
|
|
||||||
- 'CI'
|
|
||||||
- title: '📦 Dependencies'
|
|
||||||
labels:
|
|
||||||
- 'dependencies'
|
|
||||||
change-template: '- #$NUMBER: $TITLE'
|
|
||||||
template: |
|
|
||||||
## Changes
|
|
||||||
$CHANGES
|
|
||||||
44
.github/workflows/browserstack.yml
vendored
44
.github/workflows/browserstack.yml
vendored
|
|
@ -1,44 +0,0 @@
|
||||||
name: BrowserStack
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
NODE: 14
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
browserstack:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'twbs/bootstrap' && (!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]'))
|
|
||||||
timeout-minutes: 30
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "${{ env.NODE }}"
|
|
||||||
|
|
||||||
- name: Set up npm cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Run dist
|
|
||||||
run: npm run dist
|
|
||||||
|
|
||||||
- name: Run BrowserStack tests
|
|
||||||
run: npm run js-test-cloud
|
|
||||||
env:
|
|
||||||
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
|
|
||||||
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
|
|
||||||
45
.github/workflows/bundlewatch.yml
vendored
45
.github/workflows/bundlewatch.yml
vendored
|
|
@ -1,45 +0,0 @@
|
||||||
name: Bundlewatch
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
NODE: 14
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
bundlewatch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "${{ env.NODE }}"
|
|
||||||
|
|
||||||
- name: Set up npm cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Run dist
|
|
||||||
run: npm run dist
|
|
||||||
|
|
||||||
- name: Run bundlewatch
|
|
||||||
run: npm run bundlewatch
|
|
||||||
env:
|
|
||||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
|
||||||
CI_BRANCH_BASE: main
|
|
||||||
36
.github/workflows/codeql.yml
vendored
36
.github/workflows/codeql.yml
vendored
|
|
@ -1,36 +0,0 @@
|
||||||
name: "CodeQL"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- v4-dev
|
|
||||||
- "!dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- v4-dev
|
|
||||||
schedule:
|
|
||||||
- cron: "0 2 * * 5"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v1
|
|
||||||
with:
|
|
||||||
languages: "javascript"
|
|
||||||
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v1
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v1
|
|
||||||
39
.github/workflows/css.yml
vendored
39
.github/workflows/css.yml
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
name: CSS
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
NODE: 14
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
css:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "${{ env.NODE }}"
|
|
||||||
|
|
||||||
- name: Set up npm cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build CSS
|
|
||||||
run: npm run css
|
|
||||||
41
.github/workflows/docs.yml
vendored
41
.github/workflows/docs.yml
vendored
|
|
@ -1,41 +0,0 @@
|
||||||
name: Docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
NODE: 14
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "${{ env.NODE }}"
|
|
||||||
|
|
||||||
- run: java -version
|
|
||||||
|
|
||||||
- name: Set up npm cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Test docs
|
|
||||||
run: npm run docs
|
|
||||||
54
.github/workflows/js.yml
vendored
54
.github/workflows/js.yml
vendored
|
|
@ -1,54 +0,0 @@
|
||||||
name: JS Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
name: Node ${{ matrix.node }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
node: [10, 12, 14]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node }}
|
|
||||||
|
|
||||||
- name: Set up npm cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
${{ runner.os }}-node-v${{ matrix.node }}-
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Run dist
|
|
||||||
run: npm run js
|
|
||||||
|
|
||||||
- name: Run JS tests
|
|
||||||
run: npm run js-test
|
|
||||||
|
|
||||||
- name: Run Coveralls
|
|
||||||
uses: coverallsapp/github-action@master
|
|
||||||
if: matrix.node == 14
|
|
||||||
with:
|
|
||||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
path-to-lcov: "./js/coverage/lcov.info"
|
|
||||||
39
.github/workflows/lint.yml
vendored
39
.github/workflows/lint.yml
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
name: Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
NODE: 14
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "${{ env.NODE }}"
|
|
||||||
|
|
||||||
- name: Set up npm cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
|
|
||||||
${{ runner.os }}-node-v${{ env.NODE }}-
|
|
||||||
|
|
||||||
- name: Install npm dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: npm run lint
|
|
||||||
30
.github/workflows/node-sass.yml
vendored
30
.github/workflows/node-sass.yml
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
name: CSS (node-sass)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- "dependabot/**"
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_COLOR: 2
|
|
||||||
NODE: 14
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
css:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: "${{ env.NODE }}"
|
|
||||||
|
|
||||||
- name: Build CSS with node-sass
|
|
||||||
run: |
|
|
||||||
npx --package node-sass@latest node-sass --version
|
|
||||||
npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/
|
|
||||||
ls -Al dist-sass/css
|
|
||||||
14
.github/workflows/release-notes.yml
vendored
14
.github/workflows/release-notes.yml
vendored
|
|
@ -1,14 +0,0 @@
|
||||||
name: Release notes
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update_release_draft:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: release-drafter/release-drafter@v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
13
.gitignore
vendored
13
.gitignore
vendored
|
|
@ -1,8 +1,18 @@
|
||||||
# Ignore docs files
|
# Ignore docs files
|
||||||
/_gh_pages/
|
/_gh_pages/
|
||||||
|
# This is the old Jekyll docs dist folder;
|
||||||
|
# keeping it here so that when we switch branches it doesn't show up
|
||||||
|
/site/docs/**/dist/
|
||||||
|
/site/static/**/dist/
|
||||||
# Hugo resources folder
|
# Hugo resources folder
|
||||||
/resources/
|
/resources/
|
||||||
|
|
||||||
|
# Ignore ruby/bundler files;
|
||||||
|
# keeping them here so that when we switch branches they don't show up
|
||||||
|
/.bundle/
|
||||||
|
/vendor/
|
||||||
|
/.ruby-version
|
||||||
|
|
||||||
# Numerous always-ignore extensions
|
# Numerous always-ignore extensions
|
||||||
*.diff
|
*.diff
|
||||||
*.err
|
*.err
|
||||||
|
|
@ -28,9 +38,6 @@
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
nbproject
|
nbproject
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
/.vscode/
|
|
||||||
# Local Netlify folder
|
|
||||||
.netlify
|
|
||||||
|
|
||||||
# Komodo
|
# Komodo
|
||||||
.komodotools
|
.komodotools
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,3 @@
|
||||||
**/dist/
|
**/dist/
|
||||||
**/vendor/
|
**/vendor/
|
||||||
/_gh_pages/
|
/_gh_pages/
|
||||||
/js/coverage/
|
|
||||||
|
|
|
||||||
20
.stylelintrc
20
.stylelintrc
|
|
@ -3,29 +3,13 @@
|
||||||
"stylelint-config-twbs-bootstrap/scss"
|
"stylelint-config-twbs-bootstrap/scss"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"declaration-property-value-disallowed-list": {
|
"property-blacklist": [
|
||||||
"border": "none",
|
|
||||||
"outline": "none"
|
|
||||||
},
|
|
||||||
"function-disallowed-list": [
|
|
||||||
"calc",
|
|
||||||
"lighten",
|
|
||||||
"darken"
|
|
||||||
],
|
|
||||||
"property-disallowed-list": [
|
|
||||||
"border-radius",
|
"border-radius",
|
||||||
"border-top-left-radius",
|
"border-top-left-radius",
|
||||||
"border-top-right-radius",
|
"border-top-right-radius",
|
||||||
"border-bottom-right-radius",
|
"border-bottom-right-radius",
|
||||||
"border-bottom-left-radius",
|
"border-bottom-left-radius",
|
||||||
"transition"
|
"transition"
|
||||||
],
|
]
|
||||||
"scss/dollar-variable-default": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"ignore": "local"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"scss/selector-no-union-class-name": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
20
.travis.yml
Normal file
20
.travis.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
addons:
|
||||||
|
chrome: stable
|
||||||
|
language: node_js
|
||||||
|
git:
|
||||||
|
depth: 3
|
||||||
|
node_js:
|
||||||
|
- "8"
|
||||||
|
- "10"
|
||||||
|
- "12"
|
||||||
|
before_script:
|
||||||
|
- google-chrome-stable --product-version
|
||||||
|
script:
|
||||||
|
- npm test || travis_terminate 1
|
||||||
|
- if [[ "$TRAVIS_NODE_VERSION" = "10" ]]; then npm run linkinator; fi
|
||||||
|
- if [[ "$TRAVIS_NODE_VERSION" = "10" && "$TRAVIS_EVENT_TYPE" = "push" && ! `git log --format=%B --no-merges -n 1 | grep '\[skip browser\]'` ]]; then npm run js-test-cloud; fi
|
||||||
|
after_success:
|
||||||
|
- if [[ "$TRAVIS_NODE_VERSION" = "10" ]]; then npm run coveralls; fi
|
||||||
|
cache: npm
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
- Using welcoming and inclusive language
|
* Using welcoming and inclusive language
|
||||||
- Being respectful of differing viewpoints and experiences
|
* Being respectful of differing viewpoints and experiences
|
||||||
- Gracefully accepting constructive criticism
|
* Gracefully accepting constructive criticism
|
||||||
- Focusing on what is best for the community
|
* Focusing on what is best for the community
|
||||||
- Showing empathy towards other community members
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
- Public or private harassment
|
* Public or private harassment
|
||||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
## Our Responsibilities
|
## Our Responsibilities
|
||||||
|
|
||||||
|
|
@ -40,4 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org/
|
||||||
|
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
|
||||||
4
LICENSE
4
LICENSE
|
|
@ -1,7 +1,7 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2011-2021 Twitter, Inc.
|
Copyright (c) 2011-2019 Twitter, Inc.
|
||||||
Copyright (c) 2011-2021 The Bootstrap Authors
|
Copyright (c) 2011-2019 The Bootstrap Authors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
172
README.md
172
README.md
|
|
@ -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/4.3/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -9,12 +9,12 @@
|
||||||
<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/4.3/"><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.md">Report bug</a>
|
||||||
·
|
·
|
||||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature_request.md">Request feature</a>
|
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature.md&labels=feature">Request feature</a>
|
||||||
·
|
·
|
||||||
<a href="https://themes.getbootstrap.com/">Themes</a>
|
<a href="https://themes.getbootstrap.com/">Themes</a>
|
||||||
·
|
·
|
||||||
|
|
@ -22,11 +22,6 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
## Bootstrap 4
|
|
||||||
|
|
||||||
Our default branch is for development of our upcoming Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
|
|
||||||
|
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
- [Quick start](#quick-start)
|
- [Quick start](#quick-start)
|
||||||
|
|
@ -46,35 +41,33 @@ Our default branch is for development of our upcoming Bootstrap 5 release. Head
|
||||||
|
|
||||||
Several quick start options are available:
|
Several quick start options are available:
|
||||||
|
|
||||||
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0-beta1.zip)
|
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.3.1.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@next`
|
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
|
||||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@next`
|
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.3.1`
|
||||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0-beta1`
|
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.3.1`
|
||||||
- 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/4.3/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
||||||
|
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
[](https://bootstrap-slack.herokuapp.com/)
|
[](https://bootstrap-slack.herokuapp.com/)
|
||||||
[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain)
|
[](https://travis-ci.org/twbs/bootstrap)
|
||||||
[](https://www.npmjs.com/package/bootstrap)
|
[](https://www.npmjs.com/package/bootstrap)
|
||||||
[](https://rubygems.org/gems/bootstrap)
|
[](https://rubygems.org/gems/bootstrap)
|
||||||
[](https://atmospherejs.com/twbs/bootstrap)
|
[](https://atmospherejs.com/twbs/bootstrap)
|
||||||
[](https://packagist.org/packages/twbs/bootstrap)
|
[](https://packagist.org/packages/twbs/bootstrap)
|
||||||
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
||||||
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
||||||
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
||||||
[](https://coveralls.io/github/twbs/bootstrap?branch=main)
|
[](https://coveralls.io/github/twbs/bootstrap?branch=master)
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
|
[](https://github.com/twbs/bootstrap/tree/master/dist/css/bootstrap.min.css)
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
|
[](https://github.com/twbs/bootstrap/tree/master/dist/js/bootstrap.min.js)
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
|
|
||||||
[](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
|
|
||||||
[](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
|
[](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
|
||||||
[](#backers)
|
[](#backers)
|
||||||
[](#sponsors)
|
[](#sponsors)
|
||||||
|
|
||||||
|
|
||||||
## What's included
|
## What's included
|
||||||
|
|
@ -83,52 +76,33 @@ Within the download you'll find the following directories and files, logically g
|
||||||
|
|
||||||
```text
|
```text
|
||||||
bootstrap/
|
bootstrap/
|
||||||
├── css/
|
└── dist/
|
||||||
│ ├── bootstrap-grid.css
|
├── css/
|
||||||
│ ├── bootstrap-grid.css.map
|
│ ├── bootstrap-grid.css
|
||||||
│ ├── bootstrap-grid.min.css
|
│ ├── bootstrap-grid.css.map
|
||||||
│ ├── bootstrap-grid.min.css.map
|
│ ├── bootstrap-grid.min.css
|
||||||
│ ├── bootstrap-grid.rtl.css
|
│ ├── bootstrap-grid.min.css.map
|
||||||
│ ├── bootstrap-grid.rtl.css.map
|
│ ├── bootstrap-reboot.css
|
||||||
│ ├── bootstrap-grid.rtl.min.css
|
│ ├── bootstrap-reboot.css.map
|
||||||
│ ├── bootstrap-grid.rtl.min.css.map
|
│ ├── bootstrap-reboot.min.css
|
||||||
│ ├── bootstrap-reboot.css
|
│ ├── bootstrap-reboot.min.css.map
|
||||||
│ ├── bootstrap-reboot.css.map
|
│ ├── bootstrap.css
|
||||||
│ ├── bootstrap-reboot.min.css
|
│ ├── bootstrap.css.map
|
||||||
│ ├── bootstrap-reboot.min.css.map
|
│ ├── bootstrap.min.css
|
||||||
│ ├── bootstrap-reboot.rtl.css
|
│ └── bootstrap.min.css.map
|
||||||
│ ├── bootstrap-reboot.rtl.css.map
|
└── js/
|
||||||
│ ├── bootstrap-reboot.rtl.min.css
|
├── bootstrap.bundle.js
|
||||||
│ ├── bootstrap-reboot.rtl.min.css.map
|
├── bootstrap.bundle.js.map
|
||||||
│ ├── bootstrap-utilities.css
|
├── bootstrap.bundle.min.js
|
||||||
│ ├── bootstrap-utilities.css.map
|
├── bootstrap.bundle.min.js.map
|
||||||
│ ├── bootstrap-utilities.min.css
|
├── bootstrap.esm.js
|
||||||
│ ├── bootstrap-utilities.min.css.map
|
├── bootstrap.esm.js.map
|
||||||
│ ├── bootstrap-utilities.rtl.css
|
├── bootstrap.esm.min.js
|
||||||
│ ├── bootstrap-utilities.rtl.css.map
|
├── bootstrap.esm.min.js.map
|
||||||
│ ├── bootstrap-utilities.rtl.min.css
|
├── bootstrap.js
|
||||||
│ ├── bootstrap-utilities.rtl.min.css.map
|
├── bootstrap.js.map
|
||||||
│ ├── bootstrap.css
|
├── bootstrap.min.js
|
||||||
│ ├── bootstrap.css.map
|
└── bootstrap.min.js.map
|
||||||
│ ├── bootstrap.min.css
|
|
||||||
│ ├── bootstrap.min.css.map
|
|
||||||
│ ├── bootstrap.rtl.css
|
|
||||||
│ ├── bootstrap.rtl.css.map
|
|
||||||
│ ├── bootstrap.rtl.min.css
|
|
||||||
│ └── bootstrap.rtl.min.css.map
|
|
||||||
└── js/
|
|
||||||
├── bootstrap.bundle.js
|
|
||||||
├── bootstrap.bundle.js.map
|
|
||||||
├── bootstrap.bundle.min.js
|
|
||||||
├── bootstrap.bundle.min.js.map
|
|
||||||
├── bootstrap.esm.js
|
|
||||||
├── bootstrap.esm.js.map
|
|
||||||
├── bootstrap.esm.min.js
|
|
||||||
├── bootstrap.esm.min.js.map
|
|
||||||
├── bootstrap.js
|
|
||||||
├── bootstrap.js.map
|
|
||||||
├── bootstrap.min.js
|
|
||||||
└── bootstrap.min.js.map
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
|
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/).
|
||||||
|
|
@ -136,14 +110,14 @@ We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified
|
||||||
|
|
||||||
## Bugs and feature requests
|
## Bugs and feature requests
|
||||||
|
|
||||||
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
||||||
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
||||||
|
|
||||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.
|
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/static/docs/4.3/assets/js/src/search.js` file.
|
||||||
|
|
||||||
### Running documentation locally
|
### Running documentation locally
|
||||||
|
|
||||||
|
|
@ -163,11 +137,11 @@ You can find all our previous releases docs on <https://getbootstrap.com/docs/ve
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
||||||
|
|
||||||
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/main/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
||||||
|
|
||||||
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/main/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
||||||
|
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
@ -178,7 +152,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
|
||||||
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
|
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
|
||||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
|
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
|
||||||
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -211,29 +185,29 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
|
||||||
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
||||||
|
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
|
|
||||||
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/0/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/1/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
|
||||||
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
|
||||||
|
|
||||||
|
|
||||||
## Backers
|
## Backers
|
||||||
|
|
||||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
|
||||||
|
|
||||||
[](https://opencollective.com/bootstrap#backers)
|
[](https://opencollective.com/bootstrap#backers)
|
||||||
|
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
|
||||||
|
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/0/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/1/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
||||||
|
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
||||||
|
|
||||||
|
|
||||||
## Copyright and license
|
## Copyright and license
|
||||||
|
|
||||||
Code and documentation copyright 2011–2021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
Code and documentation copyright 2011-2019 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,5 @@
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"sourceType": "script"
|
"sourceType": "script"
|
||||||
},
|
},
|
||||||
"extends": "../.eslintrc.json",
|
"extends": "../.eslintrc.json"
|
||||||
"rules": {
|
|
||||||
"no-console": "off",
|
|
||||||
"strict": "error"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function getBanner(pluginFilename) {
|
||||||
return `/*!
|
return `/*!
|
||||||
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
|
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
|
||||||
* Copyright 2011-${year} ${pkg.author}
|
* Copyright 2011-${year} ${pkg.author}
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/`
|
*/`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,30 @@
|
||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Script to build our plugins to use them separately.
|
* Script to build our plugins to use them separately.
|
||||||
* Copyright 2020-2021 The Bootstrap Authors
|
* Copyright 2019 The Bootstrap Authors
|
||||||
* Copyright 2020-2021 Twitter, Inc.
|
* Copyright 2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const rollup = require('rollup')
|
const rollup = require('rollup')
|
||||||
const { babel } = require('@rollup/plugin-babel')
|
const babel = require('rollup-plugin-babel')
|
||||||
const banner = require('./banner.js')
|
const banner = require('./banner.js')
|
||||||
|
|
||||||
const rootPath = path.resolve(__dirname, '../js/dist/')
|
const TEST = process.env.NODE_ENV === 'test'
|
||||||
const plugins = [
|
const plugins = [
|
||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
exclude: 'node_modules/**',
|
exclude: 'node_modules/**',
|
||||||
// Include the helpers in each file, at most one copy of each
|
// Include only required helpers
|
||||||
babelHelpers: 'bundled'
|
externalHelpersWhitelist: [
|
||||||
|
'defineProperties',
|
||||||
|
'createClass',
|
||||||
|
'inheritsLoose',
|
||||||
|
'defineProperty',
|
||||||
|
'objectSpread'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const bsPlugins = {
|
const bsPlugins = {
|
||||||
|
|
@ -29,7 +33,6 @@ const bsPlugins = {
|
||||||
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
|
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
|
||||||
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
|
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
|
||||||
Alert: path.resolve(__dirname, '../js/src/alert.js'),
|
Alert: path.resolve(__dirname, '../js/src/alert.js'),
|
||||||
Base: path.resolve(__dirname, '../js/src/base-component.js'),
|
|
||||||
Button: path.resolve(__dirname, '../js/src/button.js'),
|
Button: path.resolve(__dirname, '../js/src/button.js'),
|
||||||
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
||||||
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
|
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
|
||||||
|
|
@ -41,23 +44,27 @@ const bsPlugins = {
|
||||||
Toast: path.resolve(__dirname, '../js/src/toast.js'),
|
Toast: path.resolve(__dirname, '../js/src/toast.js'),
|
||||||
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js')
|
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js')
|
||||||
}
|
}
|
||||||
|
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'
|
||||||
|
|
||||||
|
if (TEST) {
|
||||||
|
bsPlugins.Util = path.resolve(__dirname, '../js/src/util/index.js')
|
||||||
|
bsPlugins.Sanitizer = path.resolve(__dirname, '../js/src/util/sanitizer.js')
|
||||||
|
}
|
||||||
|
|
||||||
const defaultPluginConfig = {
|
const defaultPluginConfig = {
|
||||||
external: [
|
external: [
|
||||||
bsPlugins.Data,
|
bsPlugins.Data,
|
||||||
bsPlugins.Base,
|
|
||||||
bsPlugins.EventHandler,
|
bsPlugins.EventHandler,
|
||||||
bsPlugins.SelectorEngine
|
bsPlugins.SelectorEngine
|
||||||
],
|
],
|
||||||
globals: {
|
globals: {
|
||||||
[bsPlugins.Data]: 'Data',
|
[bsPlugins.Data]: 'Data',
|
||||||
[bsPlugins.Base]: 'Base',
|
|
||||||
[bsPlugins.EventHandler]: 'EventHandler',
|
[bsPlugins.EventHandler]: 'EventHandler',
|
||||||
[bsPlugins.SelectorEngine]: 'SelectorEngine'
|
[bsPlugins.SelectorEngine]: 'SelectorEngine'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getConfigByPluginKey = pluginKey => {
|
function getConfigByPluginKey(pluginKey) {
|
||||||
if (
|
if (
|
||||||
pluginKey === 'Data' ||
|
pluginKey === 'Data' ||
|
||||||
pluginKey === 'Manipulator' ||
|
pluginKey === 'Manipulator' ||
|
||||||
|
|
@ -67,7 +74,8 @@ const getConfigByPluginKey = pluginKey => {
|
||||||
pluginKey === 'Sanitizer'
|
pluginKey === 'Sanitizer'
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
external: []
|
external: [],
|
||||||
|
globals: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,7 +84,6 @@ const getConfigByPluginKey = pluginKey => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
pluginKey === 'Base' ||
|
|
||||||
pluginKey === 'Button' ||
|
pluginKey === 'Button' ||
|
||||||
pluginKey === 'Carousel' ||
|
pluginKey === 'Carousel' ||
|
||||||
pluginKey === 'Collapse' ||
|
pluginKey === 'Collapse' ||
|
||||||
|
|
@ -91,9 +98,9 @@ const getConfigByPluginKey = pluginKey => {
|
||||||
|
|
||||||
if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
|
if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
|
||||||
const config = Object.assign(defaultPluginConfig)
|
const config = Object.assign(defaultPluginConfig)
|
||||||
config.external.push(bsPlugins.Manipulator, '@popperjs/core')
|
config.external.push(bsPlugins.Manipulator, 'popper.js')
|
||||||
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
config.globals[bsPlugins.Manipulator] = 'Manipulator'
|
||||||
config.globals['@popperjs/core'] = 'Popper'
|
config.globals['popper.js'] = 'Popper'
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,13 +123,11 @@ const getConfigByPluginKey = pluginKey => {
|
||||||
return {
|
return {
|
||||||
external: [
|
external: [
|
||||||
bsPlugins.Data,
|
bsPlugins.Data,
|
||||||
bsPlugins.Base,
|
|
||||||
bsPlugins.EventHandler,
|
bsPlugins.EventHandler,
|
||||||
bsPlugins.Manipulator
|
bsPlugins.Manipulator
|
||||||
],
|
],
|
||||||
globals: {
|
globals: {
|
||||||
[bsPlugins.Data]: 'Data',
|
[bsPlugins.Data]: 'Data',
|
||||||
[bsPlugins.Base]: 'Base',
|
|
||||||
[bsPlugins.EventHandler]: 'EventHandler',
|
[bsPlugins.EventHandler]: 'EventHandler',
|
||||||
[bsPlugins.Manipulator]: 'Manipulator'
|
[bsPlugins.Manipulator]: 'Manipulator'
|
||||||
}
|
}
|
||||||
|
|
@ -130,59 +135,50 @@ const getConfigByPluginKey = pluginKey => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const utilObjects = new Set([
|
const utilObjects = [
|
||||||
'Util',
|
'Util',
|
||||||
'Sanitizer'
|
'Sanitizer'
|
||||||
])
|
]
|
||||||
|
|
||||||
const domObjects = new Set([
|
const domObjects = [
|
||||||
'Data',
|
'Data',
|
||||||
'EventHandler',
|
'EventHandler',
|
||||||
'Manipulator',
|
'Manipulator',
|
||||||
'SelectorEngine'
|
'SelectorEngine'
|
||||||
])
|
]
|
||||||
|
|
||||||
const build = async plugin => {
|
function build(plugin) {
|
||||||
console.log(`Building ${plugin} plugin...`)
|
console.log(`Building ${plugin} plugin...`)
|
||||||
|
|
||||||
const { external, globals } = getConfigByPluginKey(plugin)
|
const { external, globals } = getConfigByPluginKey(plugin)
|
||||||
const pluginFilename = path.basename(bsPlugins[plugin])
|
const pluginFilename = path.basename(bsPlugins[plugin])
|
||||||
let pluginPath = rootPath
|
let pluginPath = rootPath
|
||||||
|
|
||||||
if (utilObjects.has(plugin)) {
|
if (utilObjects.includes(plugin)) {
|
||||||
pluginPath = `${rootPath}/util/`
|
pluginPath = `${rootPath}/util/`
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domObjects.has(plugin)) {
|
if (domObjects.includes(plugin)) {
|
||||||
pluginPath = `${rootPath}/dom/`
|
pluginPath = `${rootPath}/dom/`
|
||||||
}
|
}
|
||||||
|
|
||||||
const bundle = await rollup.rollup({
|
rollup.rollup({
|
||||||
input: bsPlugins[plugin],
|
input: bsPlugins[plugin],
|
||||||
plugins,
|
plugins,
|
||||||
external
|
external
|
||||||
|
}).then(bundle => {
|
||||||
|
bundle.write({
|
||||||
|
banner: banner(pluginFilename),
|
||||||
|
format: 'umd',
|
||||||
|
name: plugin,
|
||||||
|
sourcemap: true,
|
||||||
|
globals,
|
||||||
|
file: path.resolve(__dirname, `${pluginPath}${pluginFilename}`)
|
||||||
|
})
|
||||||
|
.then(() => console.log(`Building ${plugin} plugin... Done!`))
|
||||||
|
.catch(error => console.error(`${plugin}: ${error}`))
|
||||||
})
|
})
|
||||||
|
|
||||||
await bundle.write({
|
|
||||||
banner: banner(pluginFilename),
|
|
||||||
format: 'umd',
|
|
||||||
name: plugin,
|
|
||||||
sourcemap: true,
|
|
||||||
globals,
|
|
||||||
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log(`Building ${plugin} plugin... Done!`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const main = async () => {
|
Object.keys(bsPlugins)
|
||||||
try {
|
.forEach(plugin => build(plugin))
|
||||||
await Promise.all(Object.keys(bsPlugins).map(plugin => build(plugin)))
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
|
|
||||||
process.exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
|
||||||
13
build/change-version.js
Normal file → Executable file
13
build/change-version.js
Normal file → Executable file
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Script to update version number references in the project.
|
* Script to update version number references in the project.
|
||||||
* Copyright 2017-2021 The Bootstrap Authors
|
* Copyright 2017-2019 The Bootstrap Authors
|
||||||
* Copyright 2017-2021 Twitter, Inc.
|
* Copyright 2017-2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
@ -17,11 +17,11 @@ sh.config.fatal = true
|
||||||
|
|
||||||
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
|
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
|
||||||
function regExpQuote(string) {
|
function regExpQuote(string) {
|
||||||
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
|
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||||
}
|
}
|
||||||
|
|
||||||
function regExpQuoteReplacement(string) {
|
function regExpQuoteReplacement(string) {
|
||||||
return string.replace(/\$/g, '$$')
|
return string.replace(/[$]/g, '$$')
|
||||||
}
|
}
|
||||||
|
|
||||||
const DRY_RUN = false
|
const DRY_RUN = false
|
||||||
|
|
@ -90,12 +90,11 @@ function main(args) {
|
||||||
const newVersion = args[1]
|
const newVersion = args[1]
|
||||||
const EXCLUDED_DIRS = new Set([
|
const EXCLUDED_DIRS = new Set([
|
||||||
'.git',
|
'.git',
|
||||||
'_gh_pages',
|
|
||||||
'node_modules',
|
'node_modules',
|
||||||
'vendor'
|
'vendor'
|
||||||
])
|
])
|
||||||
const INCLUDED_EXTENSIONS = new Set([
|
const INCLUDED_EXTENSIONS = new Set([
|
||||||
// This extension allowlist is how we avoid modifying binary files
|
// This extension whitelist is how we avoid modifying binary files
|
||||||
'',
|
'',
|
||||||
'.css',
|
'.css',
|
||||||
'.html',
|
'.html',
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
* Remember to use the same vendor files as the CDN ones,
|
* Remember to use the same vendor files as the CDN ones,
|
||||||
* otherwise the hashes won't match!
|
* otherwise the hashes won't match!
|
||||||
*
|
*
|
||||||
* Copyright 2017-2021 The Bootstrap Authors
|
* Copyright 2017-2019 The Bootstrap Authors
|
||||||
* Copyright 2017-2021 Twitter, Inc.
|
* Copyright 2017-2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
@ -29,10 +29,6 @@ const files = [
|
||||||
file: 'dist/css/bootstrap.min.css',
|
file: 'dist/css/bootstrap.min.css',
|
||||||
configPropertyName: 'css_hash'
|
configPropertyName: 'css_hash'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
file: 'dist/css/bootstrap.rtl.min.css',
|
|
||||||
configPropertyName: 'css_rtl_hash'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
file: 'dist/js/bootstrap.min.js',
|
file: 'dist/js/bootstrap.min.js',
|
||||||
configPropertyName: 'js_hash'
|
configPropertyName: 'js_hash'
|
||||||
|
|
@ -42,7 +38,7 @@ const files = [
|
||||||
configPropertyName: 'js_bundle_hash'
|
configPropertyName: 'js_bundle_hash'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
file: 'node_modules/@popperjs/core/dist/umd/popper.min.js',
|
file: 'node_modules/popper.js/dist/umd/popper.min.js',
|
||||||
configPropertyName: 'popper_hash'
|
configPropertyName: 'popper_hash'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -59,6 +55,6 @@ files.forEach(file => {
|
||||||
|
|
||||||
console.log(`${file.configPropertyName}: ${integrity}`)
|
console.log(`${file.configPropertyName}: ${integrity}`)
|
||||||
|
|
||||||
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
|
sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,16 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
module.exports = ctx => {
|
module.exports = ctx => ({
|
||||||
return {
|
map: ctx.file.dirname.includes('examples') ?
|
||||||
map: ctx.file.dirname.includes('examples') ?
|
false :
|
||||||
false :
|
{
|
||||||
{
|
inline: false,
|
||||||
inline: false,
|
annotation: true,
|
||||||
annotation: true,
|
sourcesContent: true
|
||||||
sourcesContent: true
|
},
|
||||||
},
|
plugins: {
|
||||||
plugins: {
|
autoprefixer: {
|
||||||
autoprefixer: {
|
cascade: false
|
||||||
cascade: false
|
|
||||||
},
|
|
||||||
rtlcss: ctx.env === 'RTL' ? {} : false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,39 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const { babel } = require('@rollup/plugin-babel')
|
const babel = require('rollup-plugin-babel')
|
||||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
const resolve = require('rollup-plugin-node-resolve')
|
||||||
const replace = require('@rollup/plugin-replace')
|
|
||||||
const banner = require('./banner.js')
|
const banner = require('./banner.js')
|
||||||
|
|
||||||
const BUNDLE = process.env.BUNDLE === 'true'
|
const BUNDLE = process.env.BUNDLE === 'true'
|
||||||
const ESM = process.env.ESM === 'true'
|
const ESM = process.env.ESM === 'true'
|
||||||
|
|
||||||
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
||||||
const external = ['@popperjs/core']
|
const external = ['popper.js']
|
||||||
const plugins = [
|
const plugins = [
|
||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
exclude: 'node_modules/**',
|
exclude: 'node_modules/**',
|
||||||
// Include the helpers in the bundle, at most one copy of each
|
// Include only required helpers
|
||||||
babelHelpers: 'bundled'
|
externalHelpersWhitelist: [
|
||||||
|
'defineProperties',
|
||||||
|
'createClass',
|
||||||
|
'inheritsLoose',
|
||||||
|
'defineProperty',
|
||||||
|
'objectSpread'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const globals = {
|
const globals = {
|
||||||
'@popperjs/core': 'Popper'
|
'popper.js': 'Popper'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BUNDLE) {
|
if (BUNDLE) {
|
||||||
fileDest += '.bundle'
|
fileDest += '.bundle'
|
||||||
// Remove last entry in external array to bundle Popper
|
// Remove last entry in external array to bundle Popper
|
||||||
external.pop()
|
external.pop()
|
||||||
delete globals['@popperjs/core']
|
delete globals['popper.js']
|
||||||
plugins.push(replace({ 'process.env.NODE_ENV': '"production"' }), nodeResolve())
|
plugins.push(resolve())
|
||||||
}
|
}
|
||||||
|
|
||||||
const rollupConfig = {
|
const rollupConfig = {
|
||||||
|
|
|
||||||
37
build/ship.sh
Normal file → Executable file
37
build/ship.sh
Normal file → Executable file
|
|
@ -1,7 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
# ---------------
|
# ---------------
|
||||||
|
|
@ -21,35 +18,35 @@ end=$'\e[0m'
|
||||||
current_version=$(node -p "require('./package.json').version")
|
current_version=$(node -p "require('./package.json').version")
|
||||||
|
|
||||||
if [[ $# -lt 1 ]]; then
|
if [[ $# -lt 1 ]]; then
|
||||||
printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" "$red" "$end"
|
printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" $red $end
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pulling latest changes, just to be sure
|
# Pulling latest changes, just to be sure
|
||||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
printf "\n%s=======================================================%s" $magenta $end
|
||||||
printf "\n%sPulling latest changes...%s" "$magenta" "$end"
|
printf "\n%sPulling latest changes...%s" $magenta $end
|
||||||
printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
|
printf "\n%s=======================================================\n\n%s" $magenta $end
|
||||||
git pull origin main
|
git pull origin master
|
||||||
|
|
||||||
# Update version number
|
# Update version number
|
||||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
printf "\n%s=======================================================%s" $magenta $end
|
||||||
printf "\n%sUpdating version number...%s" "$magenta" "$end"
|
printf "\n%sUpdating version number...%s" $magenta $end
|
||||||
printf "\n%s=======================================================\n%s" "$magenta" "$end"
|
printf "\n%s=======================================================\n%s" $magenta $end
|
||||||
npm run release-version "$current_version" "$1"
|
npm run release-version "$current_version" "$1"
|
||||||
|
|
||||||
# Build release
|
# Build release
|
||||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
printf "\n%s=======================================================%s" $magenta $end
|
||||||
printf "\n%sBuilding release...%s" "$magenta" "$end"
|
printf "\n%sBuilding release...%s" $magenta $end
|
||||||
printf "\n%s=======================================================\n%s" "$magenta" "$end"
|
printf "\n%s=======================================================\n%s" $magenta $end
|
||||||
npm run release
|
npm run release
|
||||||
|
|
||||||
# Copy the contents of the built docs site over to `bs-docs` repo
|
# Copy the contents of the built docs site over to `bs-docs` repo
|
||||||
printf "\n%s=======================================================%s" "$magenta" "$end"
|
printf "\n%s=======================================================%s" $magenta $end
|
||||||
printf "\n%sCopy it over...%s" "$magenta" "$end"
|
printf "\n%sCopy it over...%s" $magenta $end
|
||||||
printf "\n%s=======================================================\n%s" "$magenta" "$end"
|
printf "\n%s=======================================================\n%s" $magenta $end
|
||||||
cp -rf _gh_pages/. ../bs-docs/
|
cp -rf _gh_pages/. ../bs-docs/
|
||||||
printf "\nDone!\n"
|
printf "\nDone!\n"
|
||||||
|
|
||||||
printf "\n%s=======================================================%s" "$green" "$end"
|
printf "\n%s=======================================================%s" $green $end
|
||||||
printf "\n%sSuccess, $1 is ready to review and publish.%s" "$green" "$end"
|
printf "\n%sSuccess, $1 is ready to review and publish.%s" $green $end
|
||||||
printf "\n%s=======================================================\n\n%s" "$green" "$end"
|
printf "\n%s=======================================================\n\n%s" $green $end
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@ js2svg:
|
||||||
indent: 2
|
indent: 2
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
# - addAttributesToSVGElement:
|
|
||||||
# attributes:
|
|
||||||
# - focusable: false
|
|
||||||
- cleanupAttrs: true
|
- cleanupAttrs: true
|
||||||
- cleanupEnableBackground: true
|
- cleanupEnableBackground: true
|
||||||
- cleanupIDs: true
|
- cleanupIDs: true
|
||||||
|
|
@ -34,9 +31,6 @@ plugins:
|
||||||
- minifyStyles: true
|
- minifyStyles: true
|
||||||
- moveElemsAttrsToGroup: true
|
- moveElemsAttrsToGroup: true
|
||||||
- moveGroupAttrsToElems: true
|
- moveGroupAttrsToElems: true
|
||||||
- removeAttrs:
|
|
||||||
attrs:
|
|
||||||
- "data-name"
|
|
||||||
- removeComments: true
|
- removeComments: true
|
||||||
- removeDesc: true
|
- removeDesc: true
|
||||||
- removeDoctype: true
|
- removeDoctype: true
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Script to run vnu-jar if Java is available.
|
* Script to run vnu-jar if Java is available.
|
||||||
* Copyright 2017-2021 The Bootstrap Authors
|
* Copyright 2017-2019 The Bootstrap Authors
|
||||||
* Copyright 2017-2021 Twitter, Inc.
|
* Copyright 2017-2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
@ -18,7 +18,7 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const is32bitJava = !/64-Bit/.test(stderr)
|
const is32bitJava = !stderr.match(/64-Bit/)
|
||||||
|
|
||||||
// vnu-jar accepts multiple ignores joined with a `|`.
|
// vnu-jar accepts multiple ignores joined with a `|`.
|
||||||
// Also note that the ignores are regular expressions.
|
// Also note that the ignores are regular expressions.
|
||||||
|
|
@ -33,11 +33,10 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
|
||||||
// Content → Reboot uses various date/time inputs as a visual example.
|
// Content → Reboot uses various date/time inputs as a visual example.
|
||||||
// Documentation does not rely on them being usable.
|
// Documentation does not rely on them being usable.
|
||||||
'The “date” input type is not supported in all browsers.*',
|
'The “date” input type is not supported in all browsers.*',
|
||||||
'The “week” input type is not supported in all browsers.*',
|
'The “time” input type is not supported in all browsers.*',
|
||||||
'The “month” input type is not supported in all browsers.*',
|
// IE11 doesn't recognise <main> / give the element an implicit "main" landmark.
|
||||||
'The “color” input type is not supported in all browsers.*',
|
// Explicit role="main" is redundant for other modern browsers, but still valid.
|
||||||
'The “datetime-local” input type is not supported in all browsers.*',
|
'The “main” role is unnecessary for element “main”.'
|
||||||
'The “time” input type is not supported in all browsers.*'
|
|
||||||
].join('|')
|
].join('|')
|
||||||
|
|
||||||
const args = [
|
const args = [
|
||||||
|
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Script to create the built examples zip archive;
|
|
||||||
* requires the `zip` command to be present!
|
|
||||||
* Copyright 2020-2021 The Bootstrap Authors
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
const path = require('path')
|
|
||||||
const sh = require('shelljs')
|
|
||||||
|
|
||||||
const pkg = require('../package.json')
|
|
||||||
|
|
||||||
const versionShort = pkg.config.version_short
|
|
||||||
const distFolder = `bootstrap-${pkg.version}-examples`
|
|
||||||
const rootDocsDir = '_gh_pages'
|
|
||||||
const docsDir = `${rootDocsDir}/docs/${versionShort}/`
|
|
||||||
|
|
||||||
// these are the files we need in the examples
|
|
||||||
const cssFiles = [
|
|
||||||
'bootstrap.min.css',
|
|
||||||
'bootstrap.min.css.map',
|
|
||||||
'bootstrap.rtl.min.css',
|
|
||||||
'bootstrap.rtl.min.css.map'
|
|
||||||
]
|
|
||||||
const jsFiles = [
|
|
||||||
'bootstrap.bundle.min.js',
|
|
||||||
'bootstrap.bundle.min.js.map'
|
|
||||||
]
|
|
||||||
const imgFiles = [
|
|
||||||
'bootstrap-logo.svg',
|
|
||||||
'bootstrap-logo-white.svg'
|
|
||||||
]
|
|
||||||
|
|
||||||
sh.config.fatal = true
|
|
||||||
|
|
||||||
if (!sh.test('-d', rootDocsDir)) {
|
|
||||||
throw new Error(`The "${rootDocsDir}" folder does not exist, did you forget building the docs?`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// switch to the root dir
|
|
||||||
sh.cd(path.join(__dirname, '..'))
|
|
||||||
|
|
||||||
// remove any previously created folder/zip with the same name
|
|
||||||
sh.rm('-rf', [distFolder, `${distFolder}.zip`])
|
|
||||||
|
|
||||||
// create any folders so that `cp` works
|
|
||||||
sh.mkdir('-p', [
|
|
||||||
distFolder,
|
|
||||||
`${distFolder}/assets/brand/`,
|
|
||||||
`${distFolder}/assets/dist/css/`,
|
|
||||||
`${distFolder}/assets/dist/js/`
|
|
||||||
])
|
|
||||||
|
|
||||||
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
|
|
||||||
|
|
||||||
cssFiles.forEach(file => {
|
|
||||||
sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
|
|
||||||
})
|
|
||||||
|
|
||||||
jsFiles.forEach(file => {
|
|
||||||
sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
|
|
||||||
})
|
|
||||||
|
|
||||||
imgFiles.forEach(file => {
|
|
||||||
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
|
|
||||||
})
|
|
||||||
|
|
||||||
sh.rm(`${distFolder}/index.html`)
|
|
||||||
|
|
||||||
// get all examples' HTML files
|
|
||||||
sh.find(`${distFolder}/**/*.html`).forEach(file => {
|
|
||||||
const fileContents = sh.cat(file)
|
|
||||||
.toString()
|
|
||||||
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
|
|
||||||
.replace(/"..\/dist\//g, '"../assets/dist/')
|
|
||||||
.replace(/(<link href="\.\.\/.*) integrity=".*>/g, '$1>')
|
|
||||||
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
|
|
||||||
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
|
|
||||||
new sh.ShellString(fileContents).to(file)
|
|
||||||
})
|
|
||||||
|
|
||||||
// create the zip file
|
|
||||||
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
|
|
||||||
|
|
||||||
// remove the folder we created
|
|
||||||
sh.rm('-rf', distFolder)
|
|
||||||
|
|
@ -26,6 +26,11 @@
|
||||||
"issues": "https://github.com/twbs/bootstrap/issues"
|
"issues": "https://github.com/twbs/bootstrap/issues"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"twitter/bootstrap": "self.version"
|
"twitter/bootstrap": "self.version"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
85
config.yml
85
config.yml
|
|
@ -3,15 +3,9 @@ title: "Bootstrap"
|
||||||
baseURL: "https://getbootstrap.com"
|
baseURL: "https://getbootstrap.com"
|
||||||
enableInlineShortcodes: true
|
enableInlineShortcodes: true
|
||||||
|
|
||||||
markup:
|
pygmentsUseClasses: true
|
||||||
goldmark:
|
# you can use ```lang if you want too
|
||||||
renderer:
|
pygmentsCodeFences: true
|
||||||
unsafe: true
|
|
||||||
highlight:
|
|
||||||
noClasses: false
|
|
||||||
tableOfContents:
|
|
||||||
startLevel: 2
|
|
||||||
endLevel: 6
|
|
||||||
|
|
||||||
buildDrafts: true
|
buildDrafts: true
|
||||||
buildFuture: true
|
buildFuture: true
|
||||||
|
|
@ -20,60 +14,45 @@ enableRobotsTXT: true
|
||||||
metaDataFormat: "yaml"
|
metaDataFormat: "yaml"
|
||||||
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
|
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
|
||||||
|
|
||||||
publishDir: "_gh_pages"
|
blackfriday:
|
||||||
|
fractions: false
|
||||||
|
|
||||||
module:
|
publishDir: "_gh_pages"
|
||||||
mounts:
|
archetypeDir: "site/archetypes"
|
||||||
- source: dist
|
assetDir: "site/assets"
|
||||||
target: static/docs/5.0/dist
|
contentDir: "site/content"
|
||||||
- source: site/assets
|
dataDir: "site/data"
|
||||||
target: assets
|
layoutDir: "site/layouts"
|
||||||
- source: site/content
|
staticDir: "site/static"
|
||||||
target: content
|
themesDir: "site/themes"
|
||||||
- source: site/data
|
|
||||||
target: data
|
|
||||||
- source: site/layouts
|
|
||||||
target: layouts
|
|
||||||
- source: site/static
|
|
||||||
target: static
|
|
||||||
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png
|
|
||||||
target: static/apple-touch-icon.png
|
|
||||||
- source: site/static/docs/5.0/assets/img/favicons/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/4.3/assets/brand/bootstrap-social.png
|
||||||
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
|
social_logo_path: /docs/4.3/assets/brand/bootstrap-social-logo.png
|
||||||
|
|
||||||
current_version: "5.0.0-beta1"
|
current_version: "4.3.1"
|
||||||
current_ruby_version: "5.0.0.beta1"
|
current_ruby_version: "4.3.1"
|
||||||
docs_version: "5.0"
|
docs_version: "4.3"
|
||||||
rfs_version: "9.0.3"
|
|
||||||
github_org: "https://github.com/twbs"
|
|
||||||
repo: "https://github.com/twbs/bootstrap"
|
repo: "https://github.com/twbs/bootstrap"
|
||||||
twitter: "getbootstrap"
|
twitter: "getbootstrap"
|
||||||
slack: "https://bootstrap-slack.herokuapp.com/"
|
slack: "https://bootstrap-slack.herokuapp.com"
|
||||||
opencollective: "https://opencollective.com/bootstrap"
|
blog: "https://blog.getbootstrap.com"
|
||||||
blog: "https://blog.getbootstrap.com/"
|
expo: "https://expo.getbootstrap.com"
|
||||||
themes: "https://themes.getbootstrap.com/"
|
themes: "https://themes.getbootstrap.com"
|
||||||
icons: "https://icons.getbootstrap.com/"
|
|
||||||
|
|
||||||
download:
|
download:
|
||||||
source: "https://github.com/twbs/bootstrap/archive/v5.0.0-beta1.zip"
|
source: "https://github.com/twbs/bootstrap/archive/v4.3.1.zip"
|
||||||
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-beta1/bootstrap-5.0.0-beta1-dist.zip"
|
dist: "https://github.com/twbs/bootstrap/releases/download/v4.3.1/bootstrap-4.3.1-dist.zip"
|
||||||
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-beta1/bootstrap-5.0.0-beta1-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.0-beta1/dist/css/bootstrap.min.css"
|
css: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
css_hash: "sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
|
css_hash: "sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
|
||||||
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.rtl.min.css"
|
js: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
||||||
css_rtl_hash: "sha384-mUkCBeyHPdg0tqB6JDd+65Gpw5h/l8DKcCTV2D2UpaMMFd7Jo8A+mDAosaWgFBPl"
|
js_hash: "sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
||||||
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js"
|
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"
|
||||||
js_hash: "sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj"
|
js_bundle_hash: "sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o"
|
||||||
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
|
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/umd/popper.min.js"
|
||||||
js_bundle_hash: "sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
|
popper_hash: "sha384-L2pyEeut/H3mtgCBaUNw7KWzp5n9+4pDQiExs933/5QfaTh8YStYFFkOzSoXjlTb"
|
||||||
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js"
|
|
||||||
popper_hash: "sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi"
|
|
||||||
|
|
|
||||||
6680
dist/css/bootstrap-grid.css
vendored
6680
dist/css/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load diff
2
dist/css/bootstrap-grid.css.map
vendored
2
dist/css/bootstrap-grid.css.map
vendored
File diff suppressed because one or more lines are too long
10
dist/css/bootstrap-grid.min.css
vendored
10
dist/css/bootstrap-grid.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap-grid.min.css.map
vendored
2
dist/css/bootstrap-grid.min.css.map
vendored
File diff suppressed because one or more lines are too long
4996
dist/css/bootstrap-grid.rtl.css
vendored
4996
dist/css/bootstrap-grid.rtl.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap-grid.rtl.css.map
vendored
1
dist/css/bootstrap-grid.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap-grid.rtl.min.css
vendored
7
dist/css/bootstrap-grid.rtl.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap-grid.rtl.min.css.map
vendored
1
dist/css/bootstrap-grid.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
300
dist/css/bootstrap-reboot.css
vendored
300
dist/css/bootstrap-reboot.css
vendored
|
|
@ -1,8 +1,8 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/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)
|
||||||
*/
|
*/
|
||||||
*,
|
*,
|
||||||
|
|
@ -11,22 +11,26 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
html {
|
||||||
:root {
|
font-family: sans-serif;
|
||||||
scroll-behavior: smooth;
|
line-height: 1.15;
|
||||||
}
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
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: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #212529;
|
color: #212529;
|
||||||
|
text-align: left;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||||
|
|
@ -34,66 +38,14 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
margin: 1rem 0;
|
box-sizing: content-box;
|
||||||
color: inherit;
|
height: 0;
|
||||||
background-color: currentColor;
|
overflow: visible;
|
||||||
border: 0;
|
|
||||||
opacity: 0.25;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hr:not([size]) {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6, h5, h4, h3, h2, h1 {
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.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 + 0.9vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h2 {
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: calc(1.3rem + 0.6vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h3 {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h4 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6 {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
@ -102,11 +54,12 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
abbr[title],
|
abbr[title],
|
||||||
abbr[data-bs-original-title] {
|
abbr[data-original-title] {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
-webkit-text-decoration: underline dotted;
|
-webkit-text-decoration: underline dotted;
|
||||||
text-decoration: underline dotted;
|
text-decoration: underline dotted;
|
||||||
cursor: help;
|
cursor: help;
|
||||||
|
border-bottom: 0;
|
||||||
-webkit-text-decoration-skip-ink: none;
|
-webkit-text-decoration-skip-ink: none;
|
||||||
text-decoration-skip-ink: none;
|
text-decoration-skip-ink: none;
|
||||||
}
|
}
|
||||||
|
|
@ -117,11 +70,6 @@ address {
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol,
|
|
||||||
ul {
|
|
||||||
padding-left: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol,
|
ol,
|
||||||
ul,
|
ul,
|
||||||
dl {
|
dl {
|
||||||
|
|
@ -141,7 +89,7 @@ dt {
|
||||||
}
|
}
|
||||||
|
|
||||||
dd {
|
dd {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: .5rem;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -155,127 +103,97 @@ strong {
|
||||||
}
|
}
|
||||||
|
|
||||||
small {
|
small {
|
||||||
font-size: 0.875em;
|
font-size: 80%;
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
padding: 0.2em;
|
|
||||||
background-color: #fcf8e3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub,
|
sub,
|
||||||
sup {
|
sup {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 0.75em;
|
font-size: 75%;
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub {
|
sub {
|
||||||
bottom: -0.25em;
|
bottom: -.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
sup {
|
sup {
|
||||||
top: -0.5em;
|
top: -.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #0d6efd;
|
color: #007bff;
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
}
|
background-color: transparent;
|
||||||
a:hover {
|
|
||||||
color: #0a58ca;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]) {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
pre,
|
pre,
|
||||||
code,
|
code,
|
||||||
kbd,
|
kbd,
|
||||||
samp {
|
samp {
|
||||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
direction: ltr /* rtl:ignore */;
|
|
||||||
unicode-bidi: bidi-override;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
display: block;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-size: 0.875em;
|
|
||||||
}
|
|
||||||
pre code {
|
|
||||||
font-size: inherit;
|
|
||||||
color: inherit;
|
|
||||||
word-break: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #d63384;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
a > code {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #212529;
|
|
||||||
border-radius: 0.2rem;
|
|
||||||
}
|
|
||||||
kbd kbd {
|
|
||||||
padding: 0;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
img,
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
|
overflow: hidden;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
caption-side: bottom;
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
caption {
|
caption {
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.75rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.75rem;
|
||||||
color: #6c757d;
|
color: #6c757d;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
caption-side: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
text-align: inherit;
|
text-align: inherit;
|
||||||
text-align: -webkit-match-parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead,
|
|
||||||
tbody,
|
|
||||||
tfoot,
|
|
||||||
tr,
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
border-color: inherit;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|
@ -283,8 +201,8 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
button:focus {
|
button:focus {
|
||||||
outline: dotted 1px;
|
outline: 1px dotted;
|
||||||
outline: -webkit-focus-ring-color auto 5px;
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
input,
|
input,
|
||||||
|
|
@ -299,41 +217,56 @@ textarea {
|
||||||
}
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
select {
|
input {
|
||||||
text-transform: none;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
[role=button] {
|
button,
|
||||||
cursor: pointer;
|
select {
|
||||||
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
word-wrap: normal;
|
word-wrap: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
[list]::-webkit-calendar-picker-indicator {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
button,
|
||||||
[type=button],
|
[type="button"],
|
||||||
[type=reset],
|
[type="reset"],
|
||||||
[type=submit] {
|
[type="submit"] {
|
||||||
-webkit-appearance: button;
|
-webkit-appearance: button;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:not(:disabled),
|
button:not(:disabled),
|
||||||
[type=button]:not(:disabled),
|
[type="button"]:not(:disabled),
|
||||||
[type=reset]:not(:disabled),
|
[type="reset"]:not(:disabled),
|
||||||
[type=submit]:not(:disabled) {
|
[type="submit"]:not(:disabled) {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-moz-focus-inner {
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="radio"],
|
||||||
|
input[type="checkbox"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="date"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="datetime-local"],
|
||||||
|
input[type="month"] {
|
||||||
|
-webkit-appearance: listbox;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -345,59 +278,33 @@ fieldset {
|
||||||
}
|
}
|
||||||
|
|
||||||
legend {
|
legend {
|
||||||
float: left;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: .5rem;
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
font-size: 1.5rem;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
color: inherit;
|
||||||
@media (min-width: 1200px) {
|
white-space: normal;
|
||||||
legend {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legend + * {
|
|
||||||
clear: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-datetime-edit-fields-wrapper,
|
progress {
|
||||||
::-webkit-datetime-edit-text,
|
vertical-align: baseline;
|
||||||
::-webkit-datetime-edit-minute,
|
|
||||||
::-webkit-datetime-edit-hour-field,
|
|
||||||
::-webkit-datetime-edit-day-field,
|
|
||||||
::-webkit-datetime-edit-month-field,
|
|
||||||
::-webkit-datetime-edit-year-field {
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-inner-spin-button {
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
[type=search] {
|
[type="search"] {
|
||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
-webkit-appearance: textfield;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* rtl:raw:
|
|
||||||
[type="tel"],
|
|
||||||
[type="url"],
|
|
||||||
[type="email"],
|
|
||||||
[type="number"] {
|
|
||||||
direction: ltr;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-color-swatch-wrapper {
|
[type="search"]::-webkit-search-decoration {
|
||||||
padding: 0;
|
-webkit-appearance: none;
|
||||||
}
|
|
||||||
|
|
||||||
::file-selector-button {
|
|
||||||
font: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
::-webkit-file-upload-button {
|
||||||
|
|
@ -409,21 +316,16 @@ output {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
summary {
|
summary {
|
||||||
display: list-item;
|
display: list-item;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
progress {
|
template {
|
||||||
vertical-align: baseline;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hidden] {
|
[hidden] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||||
2
dist/css/bootstrap-reboot.css.map
vendored
2
dist/css/bootstrap-reboot.css.map
vendored
File diff suppressed because one or more lines are too long
10
dist/css/bootstrap-reboot.min.css
vendored
10
dist/css/bootstrap-reboot.min.css
vendored
|
|
@ -1,8 +1,8 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/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}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}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]{text-decoration:underline;-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{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}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}[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}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto 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;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}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:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[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}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||||
2
dist/css/bootstrap-reboot.min.css.map
vendored
2
dist/css/bootstrap-reboot.min.css.map
vendored
File diff suppressed because one or more lines are too long
426
dist/css/bootstrap-reboot.rtl.css
vendored
426
dist/css/bootstrap-reboot.rtl.css
vendored
|
|
@ -1,426 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
|
||||||
* 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)
|
|
||||||
*/
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
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: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
|
||||||
outline: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin: 1rem 0;
|
|
||||||
color: inherit;
|
|
||||||
background-color: currentColor;
|
|
||||||
border: 0;
|
|
||||||
opacity: 0.25;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr:not([size]) {
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h6, h5, h4, h3, h2, h1 {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0.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 + 0.9vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h2 {
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: calc(1.3rem + 0.6vw);
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
h3 {
|
|
||||||
font-size: 1.75rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-size: calc(1.275rem + 0.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[title],
|
|
||||||
abbr[data-bs-original-title] {
|
|
||||||
text-decoration: underline;
|
|
||||||
-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol,
|
|
||||||
ul,
|
|
||||||
dl {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol ol,
|
|
||||||
ul ul,
|
|
||||||
ol ul,
|
|
||||||
ul ol {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dt {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
dd {
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
margin: 0 0 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong {
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
small {
|
|
||||||
font-size: 0.875em;
|
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
padding: 0.2em;
|
|
||||||
background-color: #fcf8e3;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub,
|
|
||||||
sup {
|
|
||||||
position: relative;
|
|
||||||
font-size: 0.75em;
|
|
||||||
line-height: 0;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub {
|
|
||||||
bottom: -0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
top: -0.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre,
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
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: 0.875em;
|
|
||||||
}
|
|
||||||
pre code {
|
|
||||||
font-size: inherit;
|
|
||||||
color: inherit;
|
|
||||||
word-break: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #d63384;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
a > code {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd {
|
|
||||||
padding: 0.2rem 0.4rem;
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #212529;
|
|
||||||
border-radius: 0.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: 0.5rem;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
color: #6c757d;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
text-align: inherit;
|
|
||||||
text-align: -webkit-match-parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead,
|
|
||||||
tbody,
|
|
||||||
tfoot,
|
|
||||||
tr,
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
border-color: inherit;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:focus {
|
|
||||||
outline: dotted 1px;
|
|
||||||
outline: -webkit-focus-ring-color auto 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input,
|
|
||||||
button,
|
|
||||||
select,
|
|
||||||
optgroup,
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
[list]::-webkit-calendar-picker-indicator {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
|
||||||
[type=button],
|
|
||||||
[type=reset],
|
|
||||||
[type=submit] {
|
|
||||||
-webkit-appearance: button;
|
|
||||||
}
|
|
||||||
button:not(:disabled),
|
|
||||||
[type=button]:not(:disabled),
|
|
||||||
[type=reset]:not(:disabled),
|
|
||||||
[type=submit]: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: 0.5rem;
|
|
||||||
font-size: calc(1.275rem + 0.3vw);
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
legend {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legend + * {
|
|
||||||
clear: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-datetime-edit-fields-wrapper,
|
|
||||||
::-webkit-datetime-edit-text,
|
|
||||||
::-webkit-datetime-edit-minute,
|
|
||||||
::-webkit-datetime-edit-hour-field,
|
|
||||||
::-webkit-datetime-edit-day-field,
|
|
||||||
::-webkit-datetime-edit-month-field,
|
|
||||||
::-webkit-datetime-edit-year-field {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-inner-spin-button {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
[type=search] {
|
|
||||||
outline-offset: -2px;
|
|
||||||
-webkit-appearance: textfield;
|
|
||||||
}
|
|
||||||
|
|
||||||
[type="tel"],
|
|
||||||
[type="url"],
|
|
||||||
[type="email"],
|
|
||||||
[type="number"] {
|
|
||||||
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.css.map */
|
|
||||||
1
dist/css/bootstrap-reboot.rtl.css.map
vendored
1
dist/css/bootstrap-reboot.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
8
dist/css/bootstrap-reboot.rtl.min.css
vendored
8
dist/css/bootstrap-reboot.rtl.min.css
vendored
|
|
@ -1,8 +0,0 @@
|
||||||
/*!
|
|
||||||
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
|
||||||
* 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)
|
|
||||||
*/*,::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}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}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]{text-decoration:underline;-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{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}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}[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 */
|
|
||||||
1
dist/css/bootstrap-reboot.rtl.min.css.map
vendored
1
dist/css/bootstrap-reboot.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
4617
dist/css/bootstrap-utilities.css
vendored
4617
dist/css/bootstrap-utilities.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap-utilities.css.map
vendored
1
dist/css/bootstrap-utilities.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap-utilities.min.css
vendored
7
dist/css/bootstrap-utilities.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap-utilities.min.css.map
vendored
1
dist/css/bootstrap-utilities.min.css.map
vendored
File diff suppressed because one or more lines are too long
4608
dist/css/bootstrap-utilities.rtl.css
vendored
4608
dist/css/bootstrap-utilities.rtl.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap-utilities.rtl.css.map
vendored
1
dist/css/bootstrap-utilities.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap-utilities.rtl.min.css
vendored
7
dist/css/bootstrap-utilities.rtl.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap-utilities.rtl.min.css.map
vendored
1
dist/css/bootstrap-utilities.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
13661
dist/css/bootstrap.css
13661
dist/css/bootstrap.css
File diff suppressed because it is too large
Load diff
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
12
dist/css/bootstrap.min.css
vendored
12
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css.map
vendored
2
dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
10693
dist/css/bootstrap.rtl.css
vendored
10693
dist/css/bootstrap.rtl.css
vendored
File diff suppressed because it is too large
Load diff
1
dist/css/bootstrap.rtl.css.map
vendored
1
dist/css/bootstrap.rtl.css.map
vendored
File diff suppressed because one or more lines are too long
7
dist/css/bootstrap.rtl.min.css
vendored
7
dist/css/bootstrap.rtl.min.css
vendored
File diff suppressed because one or more lines are too long
1
dist/css/bootstrap.rtl.min.css.map
vendored
1
dist/css/bootstrap.rtl.min.css.map
vendored
File diff suppressed because one or more lines are too long
7645
dist/js/bootstrap.bundle.js
vendored
7645
dist/js/bootstrap.bundle.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/js/bootstrap.bundle.js.map
vendored
2
dist/js/bootstrap.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
8
dist/js/bootstrap.bundle.min.js
vendored
8
dist/js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/bootstrap.bundle.min.js.map
vendored
2
dist/js/bootstrap.bundle.min.js.map
vendored
File diff suppressed because one or more lines are too long
3486
dist/js/bootstrap.esm.js
vendored
3486
dist/js/bootstrap.esm.js
vendored
File diff suppressed because it is too large
Load diff
2
dist/js/bootstrap.esm.js.map
vendored
2
dist/js/bootstrap.esm.js.map
vendored
File diff suppressed because one or more lines are too long
8
dist/js/bootstrap.esm.min.js
vendored
8
dist/js/bootstrap.esm.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/bootstrap.esm.min.js.map
vendored
2
dist/js/bootstrap.esm.min.js.map
vendored
File diff suppressed because one or more lines are too long
3518
dist/js/bootstrap.js
3518
dist/js/bootstrap.js
File diff suppressed because it is too large
Load diff
2
dist/js/bootstrap.js.map
vendored
2
dist/js/bootstrap.js.map
vendored
File diff suppressed because one or more lines are too long
8
dist/js/bootstrap.min.js
vendored
8
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/bootstrap.min.js.map
vendored
2
dist/js/bootstrap.min.js.map
vendored
File diff suppressed because one or more lines are too long
271
js/dist/alert.js
vendored
271
js/dist/alert.js
vendored
|
|
@ -1,42 +1,58 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap alert.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap alert.js v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2019 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/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
|
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/selector-engine.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler));
|
(global = global || self, global.Alert = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||||
}(this, (function (Data, EventHandler) { 'use strict';
|
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||||
|
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||||
|
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
function _defineProperties(target, props) {
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
* Bootstrap (v4.3.1): util/index.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
var MILLISECONDS_MULTIPLIER = 1000;
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
var TRANSITION_END = 'transitionend';
|
||||||
|
var _window = window,
|
||||||
|
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
var getSelectorFromElement = function getSelectorFromElement(element) {
|
||||||
var selector = element.getAttribute('data-bs-target');
|
var selector = element.getAttribute('data-target');
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
if (!selector || selector === '#') {
|
||||||
var hrefAttr = element.getAttribute('href');
|
var hrefAttr = element.getAttribute('href');
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return selector;
|
try {
|
||||||
};
|
return document.querySelector(selector) ? selector : null;
|
||||||
|
} catch (error) {
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
return null;
|
||||||
var selector = getSelector(element);
|
}
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
||||||
|
|
@ -49,8 +65,8 @@
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
transitionDuration = _window$getComputedSt.transitionDuration,
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
transitionDelay = _window$getComputedSt.transitionDelay;
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -59,11 +75,13 @@
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
transitionDuration = transitionDuration.split(',')[0];
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
transitionDelay = transitionDelay.split(',')[0];
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||||
};
|
};
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
var evt = document.createEvent('HTMLEvents');
|
||||||
|
evt.initEvent(TRANSITION_END, true, true);
|
||||||
|
element.dispatchEvent(evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
||||||
|
|
@ -84,76 +102,6 @@
|
||||||
}, emulatedDuration);
|
}, emulatedDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
|
|
@ -161,34 +109,51 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'alert';
|
var NAME = 'alert';
|
||||||
|
var VERSION = '4.3.1';
|
||||||
var DATA_KEY = 'bs.alert';
|
var DATA_KEY = 'bs.alert';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
|
var Selector = {
|
||||||
var EVENT_CLOSE = "close" + EVENT_KEY;
|
DISMISS: '[data-dismiss="alert"]'
|
||||||
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
};
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
var Event = {
|
||||||
var CLASSNAME_ALERT = 'alert';
|
CLOSE: "close" + EVENT_KEY,
|
||||||
var CLASSNAME_FADE = 'fade';
|
CLOSED: "closed" + EVENT_KEY,
|
||||||
var CLASSNAME_SHOW = 'show';
|
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||||
/**
|
};
|
||||||
* ------------------------------------------------------------------------
|
var ClassName = {
|
||||||
* Class Definition
|
ALERT: 'alert',
|
||||||
* ------------------------------------------------------------------------
|
FADE: 'fade',
|
||||||
*/
|
SHOW: 'show'
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Class Definition
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
var Alert = /*#__PURE__*/function (_BaseComponent) {
|
};
|
||||||
_inheritsLoose(Alert, _BaseComponent);
|
|
||||||
|
var Alert =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function () {
|
||||||
|
function Alert(element) {
|
||||||
|
this._element = element;
|
||||||
|
|
||||||
|
if (this._element) {
|
||||||
|
Data.setData(element, DATA_KEY, this);
|
||||||
|
}
|
||||||
|
} // Getters
|
||||||
|
|
||||||
function Alert() {
|
|
||||||
return _BaseComponent.apply(this, arguments) || this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = Alert.prototype;
|
var _proto = Alert.prototype;
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.close = function close(element) {
|
_proto.close = function close(element) {
|
||||||
var rootElement = element ? this._getRootElement(element) : this._element;
|
var rootElement = this._element;
|
||||||
|
|
||||||
|
if (element) {
|
||||||
|
rootElement = this._getRootElement(element);
|
||||||
|
}
|
||||||
|
|
||||||
var customEvent = this._triggerCloseEvent(rootElement);
|
var customEvent = this._triggerCloseEvent(rootElement);
|
||||||
|
|
||||||
|
|
@ -197,31 +162,47 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this._removeElement(rootElement);
|
this._removeElement(rootElement);
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.dispose = function dispose() {
|
||||||
|
Data.removeData(this._element, DATA_KEY);
|
||||||
|
this._element = null;
|
||||||
} // Private
|
} // Private
|
||||||
;
|
;
|
||||||
|
|
||||||
_proto._getRootElement = function _getRootElement(element) {
|
_proto._getRootElement = function _getRootElement(element) {
|
||||||
return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
|
var selector = getSelectorFromElement(element);
|
||||||
|
var parent = false;
|
||||||
|
|
||||||
|
if (selector) {
|
||||||
|
parent = SelectorEngine.findOne(selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!parent) {
|
||||||
|
parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||||
return EventHandler__default['default'].trigger(element, EVENT_CLOSE);
|
return EventHandler.trigger(element, Event.CLOSE);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._removeElement = function _removeElement(element) {
|
_proto._removeElement = function _removeElement(element) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
element.classList.remove(CLASSNAME_SHOW);
|
element.classList.remove(ClassName.SHOW);
|
||||||
|
|
||||||
if (!element.classList.contains(CLASSNAME_FADE)) {
|
if (!element.classList.contains(ClassName.FADE)) {
|
||||||
this._destroyElement(element);
|
this._destroyElement(element);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var transitionDuration = getTransitionDurationFromElement(element);
|
var transitionDuration = getTransitionDurationFromElement(element);
|
||||||
EventHandler__default['default'].one(element, TRANSITION_END, function () {
|
EventHandler.one(element, TRANSITION_END, function (event) {
|
||||||
return _this._destroyElement(element);
|
return _this._destroyElement(element, event);
|
||||||
});
|
});
|
||||||
emulateTransitionEnd(element, transitionDuration);
|
emulateTransitionEnd(element, transitionDuration);
|
||||||
};
|
};
|
||||||
|
|
@ -231,13 +212,13 @@
|
||||||
element.parentNode.removeChild(element);
|
element.parentNode.removeChild(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
|
EventHandler.trigger(element, Event.CLOSED);
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Alert.jQueryInterface = function jQueryInterface(config) {
|
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = Data__default['default'].getData(this, DATA_KEY);
|
var data = Data.getData(this, DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Alert(this);
|
data = new Alert(this);
|
||||||
|
|
@ -249,7 +230,7 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Alert.handleDismiss = function handleDismiss(alertInstance) {
|
Alert._handleDismiss = function _handleDismiss(alertInstance) {
|
||||||
return function (event) {
|
return function (event) {
|
||||||
if (event) {
|
if (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -259,16 +240,19 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Alert, null, [{
|
Alert._getInstance = function _getInstance(element) {
|
||||||
key: "DATA_KEY",
|
return Data.getData(element, DATA_KEY);
|
||||||
// Getters
|
};
|
||||||
|
|
||||||
|
_createClass(Alert, null, [{
|
||||||
|
key: "VERSION",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return DATA_KEY;
|
return VERSION;
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Alert;
|
return Alert;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -276,31 +260,26 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
|
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Alert to jQuery only if jQuery is present
|
* add .alert to jQuery only if jQuery is present
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
if (typeof jQuery !== 'undefined') {
|
||||||
var $ = getjQuery();
|
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||||
/* istanbul ignore if */
|
jQuery.fn[NAME] = Alert._jQueryInterface;
|
||||||
|
jQuery.fn[NAME].Constructor = Alert;
|
||||||
|
|
||||||
if ($) {
|
jQuery.fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Alert.jQueryInterface;
|
return Alert._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Alert;
|
};
|
||||||
|
}
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Alert.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Alert;
|
return Alert;
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=alert.js.map
|
//# sourceMappingURL=alert.js.map
|
||||||
|
|
|
||||||
2
js/dist/alert.js.map
vendored
2
js/dist/alert.js.map
vendored
File diff suppressed because one or more lines are too long
273
js/dist/button.js
vendored
273
js/dist/button.js
vendored
|
|
@ -1,96 +1,43 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap button.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap button.js v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2019 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/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
|
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/selector-engine.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler));
|
(global = global || self, global.Button = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||||
}(this, (function (Data, EventHandler) { 'use strict';
|
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||||
|
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||||
|
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
function _defineProperties(target, props) {
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
* Bootstrap (v4.3.1): util/index.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
var _window = window,
|
||||||
|
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
|
|
@ -98,37 +45,99 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'button';
|
var NAME = 'button';
|
||||||
|
var VERSION = '4.3.1';
|
||||||
var DATA_KEY = 'bs.button';
|
var DATA_KEY = 'bs.button';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var CLASS_NAME_ACTIVE = 'active';
|
var ClassName = {
|
||||||
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
|
ACTIVE: 'active',
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
BUTTON: 'btn',
|
||||||
/**
|
FOCUS: 'focus'
|
||||||
* ------------------------------------------------------------------------
|
};
|
||||||
* Class Definition
|
var Selector = {
|
||||||
* ------------------------------------------------------------------------
|
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||||
*/
|
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||||
|
INPUT: 'input:not([type="hidden"])',
|
||||||
|
ACTIVE: '.active',
|
||||||
|
BUTTON: '.btn'
|
||||||
|
};
|
||||||
|
var Event = {
|
||||||
|
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
|
||||||
|
FOCUS_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY,
|
||||||
|
BLUR_DATA_API: "blur" + EVENT_KEY + DATA_API_KEY
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Class Definition
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
var Button = /*#__PURE__*/function (_BaseComponent) {
|
};
|
||||||
_inheritsLoose(Button, _BaseComponent);
|
|
||||||
|
var Button =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function () {
|
||||||
|
function Button(element) {
|
||||||
|
this._element = element;
|
||||||
|
Data.setData(element, DATA_KEY, this);
|
||||||
|
} // Getters
|
||||||
|
|
||||||
function Button() {
|
|
||||||
return _BaseComponent.apply(this, arguments) || this;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = Button.prototype;
|
var _proto = Button.prototype;
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
// Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
|
var triggerChangeEvent = true;
|
||||||
this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
|
var addAriaPressed = true;
|
||||||
|
var rootElement = SelectorEngine.closest(this._element, Selector.DATA_TOGGLE);
|
||||||
|
|
||||||
|
if (rootElement) {
|
||||||
|
var input = SelectorEngine.findOne(Selector.INPUT, this._element);
|
||||||
|
|
||||||
|
if (input) {
|
||||||
|
if (input.type === 'radio') {
|
||||||
|
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
|
||||||
|
triggerChangeEvent = false;
|
||||||
|
} else {
|
||||||
|
var activeElement = SelectorEngine.findOne(Selector.ACTIVE, rootElement);
|
||||||
|
|
||||||
|
if (activeElement) {
|
||||||
|
activeElement.classList.remove(ClassName.ACTIVE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (triggerChangeEvent) {
|
||||||
|
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
|
||||||
|
EventHandler.trigger(input, 'change');
|
||||||
|
}
|
||||||
|
|
||||||
|
input.focus();
|
||||||
|
addAriaPressed = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addAriaPressed) {
|
||||||
|
this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (triggerChangeEvent) {
|
||||||
|
this._element.classList.toggle(ClassName.ACTIVE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_proto.dispose = function dispose() {
|
||||||
|
Data.removeData(this._element, DATA_KEY);
|
||||||
|
this._element = null;
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Button.jQueryInterface = function jQueryInterface(config) {
|
Button._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var data = Data__default['default'].getData(this, DATA_KEY);
|
var data = Data.getData(this, DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Button(this);
|
data = new Button(this);
|
||||||
|
|
@ -140,16 +149,19 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Button, null, [{
|
Button._getInstance = function _getInstance(element) {
|
||||||
key: "DATA_KEY",
|
return Data.getData(element, DATA_KEY);
|
||||||
// Getters
|
};
|
||||||
|
|
||||||
|
_createClass(Button, null, [{
|
||||||
|
key: "VERSION",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return DATA_KEY;
|
return VERSION;
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Button;
|
return Button;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -157,41 +169,56 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var button = event.target.closest(SELECTOR_DATA_TOGGLE);
|
var button = event.target;
|
||||||
var data = Data__default['default'].getData(button, DATA_KEY);
|
|
||||||
|
if (!button.classList.contains(ClassName.BUTTON)) {
|
||||||
|
button = SelectorEngine.closest(button, Selector.BUTTON);
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = Data.getData(button, DATA_KEY);
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = new Button(button);
|
data = new Button(button);
|
||||||
|
Data.setData(button, DATA_KEY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
data.toggle();
|
data.toggle();
|
||||||
});
|
});
|
||||||
|
EventHandler.on(document, Event.FOCUS_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||||
|
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
|
||||||
|
|
||||||
|
if (button) {
|
||||||
|
button.classList.add(ClassName.FOCUS);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||||
|
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
|
||||||
|
|
||||||
|
if (button) {
|
||||||
|
button.classList.remove(ClassName.FOCUS);
|
||||||
|
}
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Button to jQuery only if jQuery is present
|
* add .button to jQuery only if jQuery is present
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
if (typeof jQuery !== 'undefined') {
|
||||||
var $ = getjQuery();
|
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||||
/* istanbul ignore if */
|
jQuery.fn[NAME] = Button._jQueryInterface;
|
||||||
|
jQuery.fn[NAME].Constructor = Button;
|
||||||
|
|
||||||
if ($) {
|
jQuery.fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Button.jQueryInterface;
|
return Button._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Button;
|
};
|
||||||
|
}
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Button.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Button;
|
return Button;
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=button.js.map
|
//# sourceMappingURL=button.js.map
|
||||||
|
|
|
||||||
2
js/dist/button.js.map
vendored
2
js/dist/button.js.map
vendored
File diff suppressed because one or more lines are too long
602
js/dist/carousel.js
vendored
602
js/dist/carousel.js
vendored
|
|
@ -1,52 +1,97 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap carousel.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap carousel.js v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2019 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/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
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')) :
|
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')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
|
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
(global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||||
|
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||||
|
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||||
|
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
function _defineProperties(target, props) {
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
for (var i = 0; i < props.length; i++) {
|
||||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
var descriptor = props[i];
|
||||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _defineProperty(obj, key, value) {
|
||||||
|
if (key in obj) {
|
||||||
|
Object.defineProperty(obj, key, {
|
||||||
|
value: value,
|
||||||
|
enumerable: true,
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
obj[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _objectSpread(target) {
|
||||||
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
|
var source = arguments[i] != null ? arguments[i] : {};
|
||||||
|
var ownKeys = Object.keys(source);
|
||||||
|
|
||||||
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||||
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||||
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
ownKeys.forEach(function (key) {
|
||||||
|
_defineProperty(target, key, source[key]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
* Bootstrap (v4.3.1): util/index.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
var MILLISECONDS_MULTIPLIER = 1000;
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
var TRANSITION_END = 'transitionend';
|
||||||
|
var _window = window,
|
||||||
|
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
|
|
||||||
var toType = function toType(obj) {
|
var toType = function toType(obj) {
|
||||||
if (obj === null || obj === undefined) {
|
|
||||||
return "" + obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||||
};
|
};
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
var getSelectorFromElement = function getSelectorFromElement(element) {
|
||||||
var selector = element.getAttribute('data-bs-target');
|
var selector = element.getAttribute('data-target');
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
if (!selector || selector === '#') {
|
||||||
var hrefAttr = element.getAttribute('href');
|
var hrefAttr = element.getAttribute('href');
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return selector;
|
try {
|
||||||
};
|
return document.querySelector(selector) ? selector : null;
|
||||||
|
} catch (error) {
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
return null;
|
||||||
var selector = getSelector(element);
|
}
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
||||||
|
|
@ -59,8 +104,8 @@
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
transitionDuration = _window$getComputedSt.transitionDuration,
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
transitionDelay = _window$getComputedSt.transitionDelay;
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -69,11 +114,13 @@
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
transitionDuration = transitionDuration.split(',')[0];
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
transitionDelay = transitionDelay.split(',')[0];
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||||
};
|
};
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
var evt = document.createEvent('HTMLEvents');
|
||||||
|
evt.initEvent(TRANSITION_END, true, true);
|
||||||
|
element.dispatchEvent(evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
var isElement = function isElement(obj) {
|
var isElement = function isElement(obj) {
|
||||||
|
|
@ -110,15 +157,21 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var makeArray = function makeArray(nodeList) {
|
||||||
|
if (!nodeList) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [].slice.call(nodeList);
|
||||||
|
};
|
||||||
|
|
||||||
var isVisible = function isVisible(element) {
|
var isVisible = function isVisible(element) {
|
||||||
if (!element) {
|
if (!element) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element.style && element.parentNode && element.parentNode.style) {
|
if (element.style && element.parentNode && element.parentNode.style) {
|
||||||
var elementStyle = getComputedStyle(element);
|
return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
|
||||||
var parentNodeStyle = getComputedStyle(element.parentNode);
|
|
||||||
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -128,78 +181,6 @@
|
||||||
return element.offsetHeight;
|
return element.offsetHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
|
|
@ -207,11 +188,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'carousel';
|
var NAME = 'carousel';
|
||||||
|
var VERSION = '4.3.1';
|
||||||
var DATA_KEY = 'bs.carousel';
|
var DATA_KEY = 'bs.carousel';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
var ARROW_LEFT_KEY = 'ArrowLeft';
|
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||||
var ARROW_RIGHT_KEY = 'ArrowRight';
|
|
||||||
|
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||||
|
|
||||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||||
|
|
||||||
var SWIPE_THRESHOLD = 40;
|
var SWIPE_THRESHOLD = 40;
|
||||||
|
|
@ -231,72 +215,80 @@
|
||||||
wrap: 'boolean',
|
wrap: 'boolean',
|
||||||
touch: 'boolean'
|
touch: 'boolean'
|
||||||
};
|
};
|
||||||
var DIRECTION_NEXT = 'next';
|
var Direction = {
|
||||||
var DIRECTION_PREV = 'prev';
|
NEXT: 'next',
|
||||||
var DIRECTION_LEFT = 'left';
|
PREV: 'prev',
|
||||||
var DIRECTION_RIGHT = 'right';
|
LEFT: 'left',
|
||||||
var EVENT_SLIDE = "slide" + EVENT_KEY;
|
RIGHT: 'right'
|
||||||
var EVENT_SLID = "slid" + EVENT_KEY;
|
};
|
||||||
var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
|
var Event = {
|
||||||
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
|
SLIDE: "slide" + EVENT_KEY,
|
||||||
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
|
SLID: "slid" + EVENT_KEY,
|
||||||
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
|
KEYDOWN: "keydown" + EVENT_KEY,
|
||||||
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
|
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||||
var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
|
MOUSELEAVE: "mouseleave" + EVENT_KEY,
|
||||||
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
|
TOUCHSTART: "touchstart" + EVENT_KEY,
|
||||||
var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
|
TOUCHMOVE: "touchmove" + EVENT_KEY,
|
||||||
var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
|
TOUCHEND: "touchend" + EVENT_KEY,
|
||||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
POINTERDOWN: "pointerdown" + EVENT_KEY,
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
POINTERUP: "pointerup" + EVENT_KEY,
|
||||||
var CLASS_NAME_CAROUSEL = 'carousel';
|
DRAG_START: "dragstart" + EVENT_KEY,
|
||||||
var CLASS_NAME_ACTIVE = 'active';
|
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
|
||||||
var CLASS_NAME_SLIDE = 'slide';
|
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||||
var CLASS_NAME_END = 'carousel-item-end';
|
};
|
||||||
var CLASS_NAME_START = 'carousel-item-start';
|
var ClassName = {
|
||||||
var CLASS_NAME_NEXT = 'carousel-item-next';
|
CAROUSEL: 'carousel',
|
||||||
var CLASS_NAME_PREV = 'carousel-item-prev';
|
ACTIVE: 'active',
|
||||||
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
SLIDE: 'slide',
|
||||||
var SELECTOR_ACTIVE = '.active';
|
RIGHT: 'carousel-item-right',
|
||||||
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
|
LEFT: 'carousel-item-left',
|
||||||
var SELECTOR_ITEM = '.carousel-item';
|
NEXT: 'carousel-item-next',
|
||||||
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
PREV: 'carousel-item-prev',
|
||||||
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
ITEM: 'carousel-item',
|
||||||
var SELECTOR_INDICATORS = '.carousel-indicators';
|
POINTER_EVENT: 'pointer-event'
|
||||||
var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
|
};
|
||||||
var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
|
var Selector = {
|
||||||
|
ACTIVE: '.active',
|
||||||
|
ACTIVE_ITEM: '.active.carousel-item',
|
||||||
|
ITEM: '.carousel-item',
|
||||||
|
ITEM_IMG: '.carousel-item img',
|
||||||
|
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
|
||||||
|
INDICATORS: '.carousel-indicators',
|
||||||
|
DATA_SLIDE: '[data-slide], [data-slide-to]',
|
||||||
|
DATA_RIDE: '[data-ride="carousel"]'
|
||||||
|
};
|
||||||
var PointerType = {
|
var PointerType = {
|
||||||
TOUCH: 'touch',
|
TOUCH: 'touch',
|
||||||
PEN: 'pen'
|
PEN: 'pen'
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Class Definition
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Class Definition
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var Carousel = /*#__PURE__*/function (_BaseComponent) {
|
|
||||||
_inheritsLoose(Carousel, _BaseComponent);
|
|
||||||
|
|
||||||
|
var Carousel =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function () {
|
||||||
function Carousel(element, config) {
|
function Carousel(element, config) {
|
||||||
var _this;
|
this._items = null;
|
||||||
|
this._interval = null;
|
||||||
|
this._activeElement = null;
|
||||||
|
this._isPaused = false;
|
||||||
|
this._isSliding = false;
|
||||||
|
this.touchTimeout = null;
|
||||||
|
this.touchStartX = 0;
|
||||||
|
this.touchDeltaX = 0;
|
||||||
|
this._config = this._getConfig(config);
|
||||||
|
this._element = element;
|
||||||
|
this._indicatorsElement = SelectorEngine.findOne(Selector.INDICATORS, this._element);
|
||||||
|
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
||||||
|
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
|
||||||
|
|
||||||
_this = _BaseComponent.call(this, element) || this;
|
this._addEventListeners();
|
||||||
_this._items = null;
|
|
||||||
_this._interval = null;
|
|
||||||
_this._activeElement = null;
|
|
||||||
_this._isPaused = false;
|
|
||||||
_this._isSliding = false;
|
|
||||||
_this.touchTimeout = null;
|
|
||||||
_this.touchStartX = 0;
|
|
||||||
_this.touchDeltaX = 0;
|
|
||||||
_this._config = _this._getConfig(config);
|
|
||||||
_this._indicatorsElement = SelectorEngine__default['default'].findOne(SELECTOR_INDICATORS, _this._element);
|
|
||||||
_this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
|
||||||
_this._pointerEvent = Boolean(window.PointerEvent);
|
|
||||||
|
|
||||||
_this._addEventListeners();
|
Data.setData(element, DATA_KEY, this);
|
||||||
|
|
||||||
return _this;
|
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -305,7 +297,7 @@
|
||||||
// Public
|
// Public
|
||||||
_proto.next = function next() {
|
_proto.next = function next() {
|
||||||
if (!this._isSliding) {
|
if (!this._isSliding) {
|
||||||
this._slide(DIRECTION_NEXT);
|
this._slide(Direction.NEXT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -319,7 +311,7 @@
|
||||||
|
|
||||||
_proto.prev = function prev() {
|
_proto.prev = function prev() {
|
||||||
if (!this._isSliding) {
|
if (!this._isSliding) {
|
||||||
this._slide(DIRECTION_PREV);
|
this._slide(Direction.PREV);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -328,7 +320,7 @@
|
||||||
this._isPaused = true;
|
this._isPaused = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SelectorEngine__default['default'].findOne(SELECTOR_NEXT_PREV, this._element)) {
|
if (SelectorEngine.findOne(Selector.NEXT_PREV, this._element)) {
|
||||||
triggerTransitionEnd(this._element);
|
triggerTransitionEnd(this._element);
|
||||||
this.cycle(true);
|
this.cycle(true);
|
||||||
}
|
}
|
||||||
|
|
@ -348,16 +340,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config && this._config.interval && !this._isPaused) {
|
if (this._config && this._config.interval && !this._isPaused) {
|
||||||
this._updateInterval();
|
|
||||||
|
|
||||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.to = function to(index) {
|
_proto.to = function to(index) {
|
||||||
var _this2 = this;
|
var _this = this;
|
||||||
|
|
||||||
this._activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
this._activeElement = SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element);
|
||||||
|
|
||||||
var activeIndex = this._getItemIndex(this._activeElement);
|
var activeIndex = this._getItemIndex(this._activeElement);
|
||||||
|
|
||||||
|
|
@ -366,8 +356,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._isSliding) {
|
if (this._isSliding) {
|
||||||
EventHandler__default['default'].one(this._element, EVENT_SLID, function () {
|
EventHandler.one(this._element, Event.SLID, function () {
|
||||||
return _this2.to(index);
|
return _this.to(index);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -378,17 +368,17 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
|
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
|
||||||
|
|
||||||
this._slide(direction, this._items[index]);
|
this._slide(direction, this._items[index]);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
_BaseComponent.prototype.dispose.call(this);
|
EventHandler.off(this._element, EVENT_KEY);
|
||||||
|
Data.removeData(this._element, DATA_KEY);
|
||||||
EventHandler__default['default'].off(this._element, EVENT_KEY);
|
|
||||||
this._items = null;
|
this._items = null;
|
||||||
this._config = null;
|
this._config = null;
|
||||||
|
this._element = null;
|
||||||
this._interval = null;
|
this._interval = null;
|
||||||
this._isPaused = null;
|
this._isPaused = null;
|
||||||
this._isSliding = null;
|
this._isSliding = null;
|
||||||
|
|
@ -398,7 +388,7 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _extends({}, Default, config);
|
config = _objectSpread({}, Default, config);
|
||||||
typeCheckConfig(NAME, config, DefaultType);
|
typeCheckConfig(NAME, config, DefaultType);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
@ -424,56 +414,60 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addEventListeners = function _addEventListeners() {
|
_proto._addEventListeners = function _addEventListeners() {
|
||||||
var _this3 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (this._config.keyboard) {
|
if (this._config.keyboard) {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN, function (event) {
|
EventHandler.on(this._element, Event.KEYDOWN, function (event) {
|
||||||
return _this3._keydown(event);
|
return _this2._keydown(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.pause === 'hover') {
|
if (this._config.pause === 'hover') {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_MOUSEENTER, function (event) {
|
EventHandler.on(this._element, Event.MOUSEENTER, function (event) {
|
||||||
return _this3.pause(event);
|
return _this2.pause(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_MOUSELEAVE, function (event) {
|
EventHandler.on(this._element, Event.MOUSELEAVE, function (event) {
|
||||||
return _this3.cycle(event);
|
return _this2.cycle(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.touch && this._touchSupported) {
|
if (this._config.touch) {
|
||||||
this._addTouchEventListeners();
|
this._addTouchEventListeners();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||||
var _this4 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
|
if (!this._touchSupported) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var start = function start(event) {
|
var start = function start(event) {
|
||||||
if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
||||||
_this4.touchStartX = event.clientX;
|
_this3.touchStartX = event.clientX;
|
||||||
} else if (!_this4._pointerEvent) {
|
} else if (!_this3._pointerEvent) {
|
||||||
_this4.touchStartX = event.touches[0].clientX;
|
_this3.touchStartX = event.touches[0].clientX;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var move = function move(event) {
|
var move = function move(event) {
|
||||||
// ensure swiping with one touch and not pinching
|
// ensure swiping with one touch and not pinching
|
||||||
if (event.touches && event.touches.length > 1) {
|
if (event.touches && event.touches.length > 1) {
|
||||||
_this4.touchDeltaX = 0;
|
_this3.touchDeltaX = 0;
|
||||||
} else {
|
} else {
|
||||||
_this4.touchDeltaX = event.touches[0].clientX - _this4.touchStartX;
|
_this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var end = function end(event) {
|
var end = function end(event) {
|
||||||
if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
||||||
_this4.touchDeltaX = event.clientX - _this4.touchStartX;
|
_this3.touchDeltaX = event.clientX - _this3.touchStartX;
|
||||||
}
|
}
|
||||||
|
|
||||||
_this4._handleSwipe();
|
_this3._handleSwipe();
|
||||||
|
|
||||||
if (_this4._config.pause === 'hover') {
|
if (_this3._config.pause === 'hover') {
|
||||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||||
// part of the mouse compatibility events on first tap - the carousel
|
// part of the mouse compatibility events on first tap - the carousel
|
||||||
// would stop cycling until user tapped out of it;
|
// would stop cycling until user tapped out of it;
|
||||||
|
|
@ -481,41 +475,41 @@
|
||||||
// (as if it's the second time we tap on it, mouseenter compat event
|
// (as if it's the second time we tap on it, mouseenter compat event
|
||||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||||
// events to fire) we explicitly restart cycling
|
// events to fire) we explicitly restart cycling
|
||||||
_this4.pause();
|
_this3.pause();
|
||||||
|
|
||||||
if (_this4.touchTimeout) {
|
if (_this3.touchTimeout) {
|
||||||
clearTimeout(_this4.touchTimeout);
|
clearTimeout(_this3.touchTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
_this4.touchTimeout = setTimeout(function (event) {
|
_this3.touchTimeout = setTimeout(function (event) {
|
||||||
return _this4.cycle(event);
|
return _this3.cycle(event);
|
||||||
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
|
}, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SelectorEngine__default['default'].find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
|
makeArray(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach(function (itemImg) {
|
||||||
EventHandler__default['default'].on(itemImg, EVENT_DRAG_START, function (e) {
|
EventHandler.on(itemImg, Event.DRAG_START, function (e) {
|
||||||
return e.preventDefault();
|
return e.preventDefault();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this._pointerEvent) {
|
if (this._pointerEvent) {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_POINTERDOWN, function (event) {
|
EventHandler.on(this._element, Event.POINTERDOWN, function (event) {
|
||||||
return start(event);
|
return start(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_POINTERUP, function (event) {
|
EventHandler.on(this._element, Event.POINTERUP, function (event) {
|
||||||
return end(event);
|
return end(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
this._element.classList.add(ClassName.POINTER_EVENT);
|
||||||
} else {
|
} else {
|
||||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHSTART, function (event) {
|
EventHandler.on(this._element, Event.TOUCHSTART, function (event) {
|
||||||
return start(event);
|
return start(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHMOVE, function (event) {
|
EventHandler.on(this._element, Event.TOUCHMOVE, function (event) {
|
||||||
return move(event);
|
return move(event);
|
||||||
});
|
});
|
||||||
EventHandler__default['default'].on(this._element, EVENT_TOUCHEND, function (event) {
|
EventHandler.on(this._element, Event.TOUCHEND, function (event) {
|
||||||
return end(event);
|
return end(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -526,27 +520,29 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event.key) {
|
switch (event.which) {
|
||||||
case ARROW_LEFT_KEY:
|
case ARROW_LEFT_KEYCODE:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.prev();
|
this.prev();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARROW_RIGHT_KEY:
|
case ARROW_RIGHT_KEYCODE:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.next();
|
this.next();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getItemIndex = function _getItemIndex(element) {
|
_proto._getItemIndex = function _getItemIndex(element) {
|
||||||
this._items = element && element.parentNode ? SelectorEngine__default['default'].find(SELECTOR_ITEM, element.parentNode) : [];
|
this._items = element && element.parentNode ? makeArray(SelectorEngine.find(Selector.ITEM, element.parentNode)) : [];
|
||||||
return this._items.indexOf(element);
|
return this._items.indexOf(element);
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
|
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
|
||||||
var isNextDirection = direction === DIRECTION_NEXT;
|
var isNextDirection = direction === Direction.NEXT;
|
||||||
var isPrevDirection = direction === DIRECTION_PREV;
|
var isPrevDirection = direction === Direction.PREV;
|
||||||
|
|
||||||
var activeIndex = this._getItemIndex(activeElement);
|
var activeIndex = this._getItemIndex(activeElement);
|
||||||
|
|
||||||
|
|
@ -557,7 +553,7 @@
|
||||||
return activeElement;
|
return activeElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
var delta = direction === DIRECTION_PREV ? -1 : 1;
|
var delta = direction === Direction.PREV ? -1 : 1;
|
||||||
var itemIndex = (activeIndex + delta) % this._items.length;
|
var itemIndex = (activeIndex + delta) % this._items.length;
|
||||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
||||||
};
|
};
|
||||||
|
|
@ -565,9 +561,9 @@
|
||||||
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||||
var targetIndex = this._getItemIndex(relatedTarget);
|
var targetIndex = this._getItemIndex(relatedTarget);
|
||||||
|
|
||||||
var fromIndex = this._getItemIndex(SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element));
|
var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element));
|
||||||
|
|
||||||
return EventHandler__default['default'].trigger(this._element, EVENT_SLIDE, {
|
return EventHandler.trigger(this._element, Event.SLIDE, {
|
||||||
relatedTarget: relatedTarget,
|
relatedTarget: relatedTarget,
|
||||||
direction: eventDirectionName,
|
direction: eventDirectionName,
|
||||||
from: fromIndex,
|
from: fromIndex,
|
||||||
|
|
@ -577,41 +573,24 @@
|
||||||
|
|
||||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||||
if (this._indicatorsElement) {
|
if (this._indicatorsElement) {
|
||||||
var indicators = SelectorEngine__default['default'].find(SELECTOR_ACTIVE, this._indicatorsElement);
|
var indicators = SelectorEngine.find(Selector.ACTIVE, this._indicatorsElement);
|
||||||
|
|
||||||
for (var i = 0; i < indicators.length; i++) {
|
for (var i = 0; i < indicators.length; i++) {
|
||||||
indicators[i].classList.remove(CLASS_NAME_ACTIVE);
|
indicators[i].classList.remove(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
||||||
|
|
||||||
if (nextIndicator) {
|
if (nextIndicator) {
|
||||||
nextIndicator.classList.add(CLASS_NAME_ACTIVE);
|
nextIndicator.classList.add(ClassName.ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._updateInterval = function _updateInterval() {
|
|
||||||
var element = this._activeElement || SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
|
||||||
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
|
|
||||||
|
|
||||||
if (elementInterval) {
|
|
||||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
|
||||||
this._config.interval = elementInterval;
|
|
||||||
} else {
|
|
||||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
_proto._slide = function _slide(direction, element) {
|
_proto._slide = function _slide(direction, element) {
|
||||||
var _this5 = this;
|
var _this4 = this;
|
||||||
|
|
||||||
var activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
|
var activeElement = SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element);
|
||||||
|
|
||||||
var activeElementIndex = this._getItemIndex(activeElement);
|
var activeElementIndex = this._getItemIndex(activeElement);
|
||||||
|
|
||||||
|
|
@ -624,17 +603,17 @@
|
||||||
var orderClassName;
|
var orderClassName;
|
||||||
var eventDirectionName;
|
var eventDirectionName;
|
||||||
|
|
||||||
if (direction === DIRECTION_NEXT) {
|
if (direction === Direction.NEXT) {
|
||||||
directionalClassName = CLASS_NAME_START;
|
directionalClassName = ClassName.LEFT;
|
||||||
orderClassName = CLASS_NAME_NEXT;
|
orderClassName = ClassName.NEXT;
|
||||||
eventDirectionName = DIRECTION_LEFT;
|
eventDirectionName = Direction.LEFT;
|
||||||
} else {
|
} else {
|
||||||
directionalClassName = CLASS_NAME_END;
|
directionalClassName = ClassName.RIGHT;
|
||||||
orderClassName = CLASS_NAME_PREV;
|
orderClassName = ClassName.PREV;
|
||||||
eventDirectionName = DIRECTION_RIGHT;
|
eventDirectionName = Direction.RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
|
if (nextElement && nextElement.classList.contains(ClassName.ACTIVE)) {
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -658,21 +637,31 @@
|
||||||
|
|
||||||
this._setActiveIndicatorElement(nextElement);
|
this._setActiveIndicatorElement(nextElement);
|
||||||
|
|
||||||
this._activeElement = nextElement;
|
if (this._element.classList.contains(ClassName.SLIDE)) {
|
||||||
|
|
||||||
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
|
|
||||||
nextElement.classList.add(orderClassName);
|
nextElement.classList.add(orderClassName);
|
||||||
reflow(nextElement);
|
reflow(nextElement);
|
||||||
activeElement.classList.add(directionalClassName);
|
activeElement.classList.add(directionalClassName);
|
||||||
nextElement.classList.add(directionalClassName);
|
nextElement.classList.add(directionalClassName);
|
||||||
|
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
|
||||||
|
|
||||||
|
if (nextElementInterval) {
|
||||||
|
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
||||||
|
this._config.interval = nextElementInterval;
|
||||||
|
} else {
|
||||||
|
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||||
|
}
|
||||||
|
|
||||||
var transitionDuration = getTransitionDurationFromElement(activeElement);
|
var transitionDuration = getTransitionDurationFromElement(activeElement);
|
||||||
EventHandler__default['default'].one(activeElement, TRANSITION_END, function () {
|
EventHandler.one(activeElement, TRANSITION_END, function () {
|
||||||
nextElement.classList.remove(directionalClassName, orderClassName);
|
nextElement.classList.remove(directionalClassName);
|
||||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
nextElement.classList.remove(orderClassName);
|
||||||
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
|
nextElement.classList.add(ClassName.ACTIVE);
|
||||||
_this5._isSliding = false;
|
activeElement.classList.remove(ClassName.ACTIVE);
|
||||||
|
activeElement.classList.remove(orderClassName);
|
||||||
|
activeElement.classList.remove(directionalClassName);
|
||||||
|
_this4._isSliding = false;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
EventHandler__default['default'].trigger(_this5._element, EVENT_SLID, {
|
EventHandler.trigger(_this4._element, Event.SLID, {
|
||||||
relatedTarget: nextElement,
|
relatedTarget: nextElement,
|
||||||
direction: eventDirectionName,
|
direction: eventDirectionName,
|
||||||
from: activeElementIndex,
|
from: activeElementIndex,
|
||||||
|
|
@ -682,10 +671,10 @@
|
||||||
});
|
});
|
||||||
emulateTransitionEnd(activeElement, transitionDuration);
|
emulateTransitionEnd(activeElement, transitionDuration);
|
||||||
} else {
|
} else {
|
||||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
activeElement.classList.remove(ClassName.ACTIVE);
|
||||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
nextElement.classList.add(ClassName.ACTIVE);
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
|
EventHandler.trigger(this._element, Event.SLID, {
|
||||||
relatedTarget: nextElement,
|
relatedTarget: nextElement,
|
||||||
direction: eventDirectionName,
|
direction: eventDirectionName,
|
||||||
from: activeElementIndex,
|
from: activeElementIndex,
|
||||||
|
|
@ -699,13 +688,13 @@
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Carousel.carouselInterface = function carouselInterface(element, config) {
|
Carousel._carouselInterface = function _carouselInterface(element, config) {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
var data = Data.getData(element, DATA_KEY);
|
||||||
|
|
||||||
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(element));
|
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element));
|
||||||
|
|
||||||
if (typeof config === 'object') {
|
if (typeof config === 'object') {
|
||||||
_config = _extends({}, _config, config);
|
_config = _objectSpread({}, _config, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
var action = typeof config === 'string' ? config : _config.slide;
|
var action = typeof config === 'string' ? config : _config.slide;
|
||||||
|
|
@ -728,50 +717,60 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Carousel.jQueryInterface = function jQueryInterface(config) {
|
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
Carousel.carouselInterface(this, config);
|
Carousel._carouselInterface(this, config);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
|
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
|
||||||
var target = getElementFromSelector(this);
|
var selector = getSelectorFromElement(this);
|
||||||
|
|
||||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
if (!selector) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = _extends({}, Manipulator__default['default'].getDataAttributes(target), Manipulator__default['default'].getDataAttributes(this));
|
var target = SelectorEngine.findOne(selector);
|
||||||
|
|
||||||
var slideIndex = this.getAttribute('data-bs-slide-to');
|
if (!target || !target.classList.contains(ClassName.CAROUSEL)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
|
||||||
|
|
||||||
|
var slideIndex = this.getAttribute('data-slide-to');
|
||||||
|
|
||||||
if (slideIndex) {
|
if (slideIndex) {
|
||||||
config.interval = false;
|
config.interval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Carousel.carouselInterface(target, config);
|
Carousel._carouselInterface(target, config);
|
||||||
|
|
||||||
if (slideIndex) {
|
if (slideIndex) {
|
||||||
Data__default['default'].getData(target, DATA_KEY).to(slideIndex);
|
Data.getData(target, DATA_KEY).to(slideIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Carousel, null, [{
|
Carousel._getInstance = function _getInstance(element) {
|
||||||
|
return Data.getData(element, DATA_KEY);
|
||||||
|
};
|
||||||
|
|
||||||
|
_createClass(Carousel, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "Default",
|
key: "Default",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return Default;
|
return Default;
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "DATA_KEY",
|
|
||||||
get: function get() {
|
|
||||||
return DATA_KEY;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Carousel;
|
return Carousel;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -779,38 +778,33 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
|
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||||
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, function () {
|
EventHandler.on(window, Event.LOAD_DATA_API, function () {
|
||||||
var carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE);
|
var carousels = makeArray(SelectorEngine.find(Selector.DATA_RIDE));
|
||||||
|
|
||||||
for (var i = 0, len = carousels.length; i < len; i++) {
|
for (var i = 0, len = carousels.length; i < len; i++) {
|
||||||
Carousel.carouselInterface(carousels[i], Data__default['default'].getData(carousels[i], DATA_KEY));
|
Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Carousel to jQuery only if jQuery is present
|
* add .carousel to jQuery only if jQuery is present
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
if (typeof jQuery !== 'undefined') {
|
||||||
var $ = getjQuery();
|
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||||
/* istanbul ignore if */
|
jQuery.fn[NAME] = Carousel._jQueryInterface;
|
||||||
|
jQuery.fn[NAME].Constructor = Carousel;
|
||||||
|
|
||||||
if ($) {
|
jQuery.fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Carousel.jQueryInterface;
|
return Carousel._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Carousel;
|
};
|
||||||
|
}
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Carousel.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Carousel;
|
return Carousel;
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=carousel.js.map
|
//# sourceMappingURL=carousel.js.map
|
||||||
|
|
|
||||||
2
js/dist/carousel.js.map
vendored
2
js/dist/carousel.js.map
vendored
File diff suppressed because one or more lines are too long
474
js/dist/collapse.js
vendored
474
js/dist/collapse.js
vendored
|
|
@ -1,62 +1,97 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap collapse.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap collapse.js v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2019 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/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
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')) :
|
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')) :
|
||||||
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
|
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
(global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||||
|
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||||
|
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||||
|
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||||
|
|
||||||
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
function _defineProperties(target, props) {
|
||||||
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
for (var i = 0; i < props.length; i++) {
|
||||||
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
var descriptor = props[i];
|
||||||
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _defineProperty(obj, key, value) {
|
||||||
|
if (key in obj) {
|
||||||
|
Object.defineProperty(obj, key, {
|
||||||
|
value: value,
|
||||||
|
enumerable: true,
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
obj[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _objectSpread(target) {
|
||||||
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
|
var source = arguments[i] != null ? arguments[i] : {};
|
||||||
|
var ownKeys = Object.keys(source);
|
||||||
|
|
||||||
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||||
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||||
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
ownKeys.forEach(function (key) {
|
||||||
|
_defineProperty(target, key, source[key]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
* Bootstrap (v4.3.1): util/index.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
var MILLISECONDS_MULTIPLIER = 1000;
|
var MILLISECONDS_MULTIPLIER = 1000;
|
||||||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
var TRANSITION_END = 'transitionend';
|
||||||
|
var _window = window,
|
||||||
|
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
|
|
||||||
var toType = function toType(obj) {
|
var toType = function toType(obj) {
|
||||||
if (obj === null || obj === undefined) {
|
|
||||||
return "" + obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||||
};
|
};
|
||||||
|
|
||||||
var getSelector = function getSelector(element) {
|
var getSelectorFromElement = function getSelectorFromElement(element) {
|
||||||
var selector = element.getAttribute('data-bs-target');
|
var selector = element.getAttribute('data-target');
|
||||||
|
|
||||||
if (!selector || selector === '#') {
|
if (!selector || selector === '#') {
|
||||||
var hrefAttr = element.getAttribute('href');
|
var hrefAttr = element.getAttribute('href');
|
||||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
|
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return selector;
|
try {
|
||||||
};
|
|
||||||
|
|
||||||
var getSelectorFromElement = function getSelectorFromElement(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
|
|
||||||
if (selector) {
|
|
||||||
return document.querySelector(selector) ? selector : null;
|
return document.querySelector(selector) ? selector : null;
|
||||||
|
} catch (error) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var getElementFromSelector = function getElementFromSelector(element) {
|
|
||||||
var selector = getSelector(element);
|
|
||||||
return selector ? document.querySelector(selector) : null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
||||||
|
|
@ -69,8 +104,8 @@
|
||||||
transitionDuration = _window$getComputedSt.transitionDuration,
|
transitionDuration = _window$getComputedSt.transitionDuration,
|
||||||
transitionDelay = _window$getComputedSt.transitionDelay;
|
transitionDelay = _window$getComputedSt.transitionDelay;
|
||||||
|
|
||||||
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||||
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||||
|
|
||||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -79,11 +114,13 @@
|
||||||
|
|
||||||
transitionDuration = transitionDuration.split(',')[0];
|
transitionDuration = transitionDuration.split(',')[0];
|
||||||
transitionDelay = transitionDelay.split(',')[0];
|
transitionDelay = transitionDelay.split(',')[0];
|
||||||
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||||
};
|
};
|
||||||
|
|
||||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||||
element.dispatchEvent(new Event(TRANSITION_END));
|
var evt = document.createEvent('HTMLEvents');
|
||||||
|
evt.initEvent(TRANSITION_END, true, true);
|
||||||
|
element.dispatchEvent(evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
var isElement = function isElement(obj) {
|
var isElement = function isElement(obj) {
|
||||||
|
|
@ -120,82 +157,18 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var makeArray = function makeArray(nodeList) {
|
||||||
|
if (!nodeList) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [].slice.call(nodeList);
|
||||||
|
};
|
||||||
|
|
||||||
var reflow = function reflow(element) {
|
var reflow = function reflow(element) {
|
||||||
return element.offsetHeight;
|
return element.offsetHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
|
||||||
return jQuery;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', callback);
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
|
||||||
|
|
||||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Constants
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
var VERSION = '5.0.0-beta1';
|
|
||||||
|
|
||||||
var BaseComponent = /*#__PURE__*/function () {
|
|
||||||
function BaseComponent(element) {
|
|
||||||
if (!element) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._element = element;
|
|
||||||
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _proto = BaseComponent.prototype;
|
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
|
||||||
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
|
|
||||||
this._element = null;
|
|
||||||
}
|
|
||||||
/** Static */
|
|
||||||
;
|
|
||||||
|
|
||||||
BaseComponent.getInstance = function getInstance(element) {
|
|
||||||
return Data__default['default'].getData(element, this.DATA_KEY);
|
|
||||||
};
|
|
||||||
|
|
||||||
_createClass(BaseComponent, null, [{
|
|
||||||
key: "VERSION",
|
|
||||||
get: function get() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BaseComponent;
|
|
||||||
}();
|
|
||||||
|
|
||||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
||||||
|
|
||||||
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
||||||
|
|
||||||
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
||||||
|
|
||||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Constants
|
* Constants
|
||||||
|
|
@ -203,6 +176,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var NAME = 'collapse';
|
var NAME = 'collapse';
|
||||||
|
var VERSION = '4.3.1';
|
||||||
var DATA_KEY = 'bs.collapse';
|
var DATA_KEY = 'bs.collapse';
|
||||||
var EVENT_KEY = "." + DATA_KEY;
|
var EVENT_KEY = "." + DATA_KEY;
|
||||||
var DATA_API_KEY = '.data-api';
|
var DATA_API_KEY = '.data-api';
|
||||||
|
|
@ -214,62 +188,69 @@
|
||||||
toggle: 'boolean',
|
toggle: 'boolean',
|
||||||
parent: '(string|element)'
|
parent: '(string|element)'
|
||||||
};
|
};
|
||||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
var Event = {
|
||||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
SHOW: "show" + EVENT_KEY,
|
||||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
SHOWN: "shown" + EVENT_KEY,
|
||||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
HIDE: "hide" + EVENT_KEY,
|
||||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
HIDDEN: "hidden" + EVENT_KEY,
|
||||||
var CLASS_NAME_SHOW = 'show';
|
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||||
var CLASS_NAME_COLLAPSE = 'collapse';
|
};
|
||||||
var CLASS_NAME_COLLAPSING = 'collapsing';
|
var ClassName = {
|
||||||
var CLASS_NAME_COLLAPSED = 'collapsed';
|
SHOW: 'show',
|
||||||
var WIDTH = 'width';
|
COLLAPSE: 'collapse',
|
||||||
var HEIGHT = 'height';
|
COLLAPSING: 'collapsing',
|
||||||
var SELECTOR_ACTIVES = '.show, .collapsing';
|
COLLAPSED: 'collapsed'
|
||||||
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]';
|
};
|
||||||
/**
|
var Dimension = {
|
||||||
* ------------------------------------------------------------------------
|
WIDTH: 'width',
|
||||||
* Class Definition
|
HEIGHT: 'height'
|
||||||
* ------------------------------------------------------------------------
|
};
|
||||||
*/
|
var Selector = {
|
||||||
|
ACTIVES: '.show, .collapsing',
|
||||||
|
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Class Definition
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
var Collapse = /*#__PURE__*/function (_BaseComponent) {
|
};
|
||||||
_inheritsLoose(Collapse, _BaseComponent);
|
|
||||||
|
|
||||||
|
var Collapse =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function () {
|
||||||
function Collapse(element, config) {
|
function Collapse(element, config) {
|
||||||
var _this;
|
this._isTransitioning = false;
|
||||||
|
this._element = element;
|
||||||
_this = _BaseComponent.call(this, element) || this;
|
this._config = this._getConfig(config);
|
||||||
_this._isTransitioning = false;
|
this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
|
||||||
_this._config = _this._getConfig(config);
|
var toggleList = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE));
|
||||||
_this._triggerArray = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-bs-target=\"#" + element.id + "\"]"));
|
|
||||||
var toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
|
|
||||||
|
|
||||||
for (var i = 0, len = toggleList.length; i < len; i++) {
|
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||||
var elem = toggleList[i];
|
var elem = toggleList[i];
|
||||||
var selector = getSelectorFromElement(elem);
|
var selector = getSelectorFromElement(elem);
|
||||||
var filterElement = SelectorEngine__default['default'].find(selector).filter(function (foundElem) {
|
var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) {
|
||||||
return foundElem === element;
|
return foundElem === element;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (selector !== null && filterElement.length) {
|
if (selector !== null && filterElement.length) {
|
||||||
_this._selector = selector;
|
this._selector = selector;
|
||||||
|
|
||||||
_this._triggerArray.push(elem);
|
this._triggerArray.push(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_this._parent = _this._config.parent ? _this._getParent() : null;
|
this._parent = this._config.parent ? this._getParent() : null;
|
||||||
|
|
||||||
if (!_this._config.parent) {
|
if (!this._config.parent) {
|
||||||
_this._addAriaAndCollapsedClass(_this._element, _this._triggerArray);
|
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_this._config.toggle) {
|
if (this._config.toggle) {
|
||||||
_this.toggle();
|
this.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
return _this;
|
Data.setData(element, DATA_KEY, this);
|
||||||
} // Getters
|
} // Getters
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -277,7 +258,7 @@
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
_proto.toggle = function toggle() {
|
_proto.toggle = function toggle() {
|
||||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
if (this._element.classList.contains(ClassName.SHOW)) {
|
||||||
this.hide();
|
this.hide();
|
||||||
} else {
|
} else {
|
||||||
this.show();
|
this.show();
|
||||||
|
|
@ -285,9 +266,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.show = function show() {
|
_proto.show = function show() {
|
||||||
var _this2 = this;
|
var _this = this;
|
||||||
|
|
||||||
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
if (this._isTransitioning || this._element.classList.contains(ClassName.SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -295,12 +276,12 @@
|
||||||
var activesData;
|
var activesData;
|
||||||
|
|
||||||
if (this._parent) {
|
if (this._parent) {
|
||||||
actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
|
actives = makeArray(SelectorEngine.find(Selector.ACTIVES, this._parent)).filter(function (elem) {
|
||||||
if (typeof _this2._config.parent === 'string') {
|
if (typeof _this._config.parent === 'string') {
|
||||||
return elem.getAttribute('data-bs-parent') === _this2._config.parent;
|
return elem.getAttribute('data-parent') === _this._config.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
return elem.classList.contains(CLASS_NAME_COLLAPSE);
|
return elem.classList.contains(ClassName.COLLAPSE);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (actives.length === 0) {
|
if (actives.length === 0) {
|
||||||
|
|
@ -308,20 +289,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var container = SelectorEngine__default['default'].findOne(this._selector);
|
var container = SelectorEngine.findOne(this._selector);
|
||||||
|
|
||||||
if (actives) {
|
if (actives) {
|
||||||
var tempActiveData = actives.find(function (elem) {
|
var tempActiveData = actives.filter(function (elem) {
|
||||||
return container !== elem;
|
return container !== elem;
|
||||||
});
|
});
|
||||||
activesData = tempActiveData ? Data__default['default'].getData(tempActiveData, DATA_KEY) : null;
|
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null;
|
||||||
|
|
||||||
if (activesData && activesData._isTransitioning) {
|
if (activesData && activesData._isTransitioning) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var startEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
|
var startEvent = EventHandler.trigger(this._element, Event.SHOW);
|
||||||
|
|
||||||
if (startEvent.defaultPrevented) {
|
if (startEvent.defaultPrevented) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -330,26 +311,26 @@
|
||||||
if (actives) {
|
if (actives) {
|
||||||
actives.forEach(function (elemActive) {
|
actives.forEach(function (elemActive) {
|
||||||
if (container !== elemActive) {
|
if (container !== elemActive) {
|
||||||
Collapse.collapseInterface(elemActive, 'hide');
|
Collapse._collapseInterface(elemActive, 'hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!activesData) {
|
if (!activesData) {
|
||||||
Data__default['default'].setData(elemActive, DATA_KEY, null);
|
Data.setData(elemActive, DATA_KEY, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var dimension = this._getDimension();
|
var dimension = this._getDimension();
|
||||||
|
|
||||||
this._element.classList.remove(CLASS_NAME_COLLAPSE);
|
this._element.classList.remove(ClassName.COLLAPSE);
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
this._element.classList.add(ClassName.COLLAPSING);
|
||||||
|
|
||||||
this._element.style[dimension] = 0;
|
this._element.style[dimension] = 0;
|
||||||
|
|
||||||
if (this._triggerArray.length) {
|
if (this._triggerArray.length) {
|
||||||
this._triggerArray.forEach(function (element) {
|
this._triggerArray.forEach(function (element) {
|
||||||
element.classList.remove(CLASS_NAME_COLLAPSED);
|
element.classList.remove(ClassName.COLLAPSED);
|
||||||
element.setAttribute('aria-expanded', true);
|
element.setAttribute('aria-expanded', true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -357,33 +338,35 @@
|
||||||
this.setTransitioning(true);
|
this.setTransitioning(true);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
_this2._element.classList.remove(CLASS_NAME_COLLAPSING);
|
_this._element.classList.remove(ClassName.COLLAPSING);
|
||||||
|
|
||||||
_this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
_this._element.classList.add(ClassName.COLLAPSE);
|
||||||
|
|
||||||
_this2._element.style[dimension] = '';
|
_this._element.classList.add(ClassName.SHOW);
|
||||||
|
|
||||||
_this2.setTransitioning(false);
|
_this._element.style[dimension] = '';
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(_this2._element, EVENT_SHOWN);
|
_this.setTransitioning(false);
|
||||||
|
|
||||||
|
EventHandler.trigger(_this._element, Event.SHOWN);
|
||||||
};
|
};
|
||||||
|
|
||||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||||
var scrollSize = "scroll" + capitalizedDimension;
|
var scrollSize = "scroll" + capitalizedDimension;
|
||||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||||
EventHandler__default['default'].one(this._element, TRANSITION_END, complete);
|
EventHandler.one(this._element, TRANSITION_END, complete);
|
||||||
emulateTransitionEnd(this._element, transitionDuration);
|
emulateTransitionEnd(this._element, transitionDuration);
|
||||||
this._element.style[dimension] = this._element[scrollSize] + "px";
|
this._element.style[dimension] = this._element[scrollSize] + "px";
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.hide = function hide() {
|
_proto.hide = function hide() {
|
||||||
var _this3 = this;
|
var _this2 = this;
|
||||||
|
|
||||||
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
if (this._isTransitioning || !this._element.classList.contains(ClassName.SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var startEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
|
var startEvent = EventHandler.trigger(this._element, Event.HIDE);
|
||||||
|
|
||||||
if (startEvent.defaultPrevented) {
|
if (startEvent.defaultPrevented) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -394,20 +377,26 @@
|
||||||
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
||||||
reflow(this._element);
|
reflow(this._element);
|
||||||
|
|
||||||
this._element.classList.add(CLASS_NAME_COLLAPSING);
|
this._element.classList.add(ClassName.COLLAPSING);
|
||||||
|
|
||||||
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
|
this._element.classList.remove(ClassName.COLLAPSE);
|
||||||
|
|
||||||
|
this._element.classList.remove(ClassName.SHOW);
|
||||||
|
|
||||||
var triggerArrayLength = this._triggerArray.length;
|
var triggerArrayLength = this._triggerArray.length;
|
||||||
|
|
||||||
if (triggerArrayLength > 0) {
|
if (triggerArrayLength > 0) {
|
||||||
for (var i = 0; i < triggerArrayLength; i++) {
|
for (var i = 0; i < triggerArrayLength; i++) {
|
||||||
var trigger = this._triggerArray[i];
|
var trigger = this._triggerArray[i];
|
||||||
var elem = getElementFromSelector(trigger);
|
var selector = getSelectorFromElement(trigger);
|
||||||
|
|
||||||
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
if (selector !== null) {
|
||||||
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
var elem = SelectorEngine.findOne(selector);
|
||||||
trigger.setAttribute('aria-expanded', false);
|
|
||||||
|
if (!elem.classList.contains(ClassName.SHOW)) {
|
||||||
|
trigger.classList.add(ClassName.COLLAPSED);
|
||||||
|
trigger.setAttribute('aria-expanded', false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -415,18 +404,18 @@
|
||||||
this.setTransitioning(true);
|
this.setTransitioning(true);
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
_this3.setTransitioning(false);
|
_this2.setTransitioning(false);
|
||||||
|
|
||||||
_this3._element.classList.remove(CLASS_NAME_COLLAPSING);
|
_this2._element.classList.remove(ClassName.COLLAPSING);
|
||||||
|
|
||||||
_this3._element.classList.add(CLASS_NAME_COLLAPSE);
|
_this2._element.classList.add(ClassName.COLLAPSE);
|
||||||
|
|
||||||
EventHandler__default['default'].trigger(_this3._element, EVENT_HIDDEN);
|
EventHandler.trigger(_this2._element, Event.HIDDEN);
|
||||||
};
|
};
|
||||||
|
|
||||||
this._element.style[dimension] = '';
|
this._element.style[dimension] = '';
|
||||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||||
EventHandler__default['default'].one(this._element, TRANSITION_END, complete);
|
EventHandler.one(this._element, TRANSITION_END, complete);
|
||||||
emulateTransitionEnd(this._element, transitionDuration);
|
emulateTransitionEnd(this._element, transitionDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -435,17 +424,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto.dispose = function dispose() {
|
_proto.dispose = function dispose() {
|
||||||
_BaseComponent.prototype.dispose.call(this);
|
Data.removeData(this._element, DATA_KEY);
|
||||||
|
|
||||||
this._config = null;
|
this._config = null;
|
||||||
this._parent = null;
|
this._parent = null;
|
||||||
|
this._element = null;
|
||||||
this._triggerArray = null;
|
this._triggerArray = null;
|
||||||
this._isTransitioning = null;
|
this._isTransitioning = null;
|
||||||
} // Private
|
} // Private
|
||||||
;
|
;
|
||||||
|
|
||||||
_proto._getConfig = function _getConfig(config) {
|
_proto._getConfig = function _getConfig(config) {
|
||||||
config = _extends({}, Default, config);
|
config = _objectSpread({}, Default, config);
|
||||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||||
|
|
||||||
typeCheckConfig(NAME, config, DefaultType);
|
typeCheckConfig(NAME, config, DefaultType);
|
||||||
|
|
@ -453,11 +442,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getDimension = function _getDimension() {
|
_proto._getDimension = function _getDimension() {
|
||||||
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
|
var hasWidth = this._element.classList.contains(Dimension.WIDTH);
|
||||||
|
|
||||||
|
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._getParent = function _getParent() {
|
_proto._getParent = function _getParent() {
|
||||||
var _this4 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var parent = this._config.parent;
|
var parent = this._config.parent;
|
||||||
|
|
||||||
|
|
@ -467,42 +458,46 @@
|
||||||
parent = parent[0];
|
parent = parent[0];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
parent = SelectorEngine__default['default'].findOne(parent);
|
parent = SelectorEngine.findOne(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
var selector = SELECTOR_DATA_TOGGLE + "[data-bs-parent=\"" + parent + "\"]";
|
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + parent + "\"]";
|
||||||
SelectorEngine__default['default'].find(selector, parent).forEach(function (element) {
|
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
|
||||||
var selected = getElementFromSelector(element);
|
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||||
|
|
||||||
_this4._addAriaAndCollapsedClass(selected, [element]);
|
|
||||||
});
|
});
|
||||||
return parent;
|
return parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||||
if (!element || !triggerArray.length) {
|
if (element) {
|
||||||
return;
|
var isOpen = element.classList.contains(ClassName.SHOW);
|
||||||
}
|
|
||||||
|
|
||||||
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
if (triggerArray.length) {
|
||||||
triggerArray.forEach(function (elem) {
|
triggerArray.forEach(function (elem) {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
elem.classList.remove(ClassName.COLLAPSED);
|
||||||
} else {
|
} else {
|
||||||
elem.classList.add(CLASS_NAME_COLLAPSED);
|
elem.classList.add(ClassName.COLLAPSED);
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.setAttribute('aria-expanded', isOpen);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
elem.setAttribute('aria-expanded', isOpen);
|
|
||||||
});
|
|
||||||
} // Static
|
} // Static
|
||||||
;
|
;
|
||||||
|
|
||||||
Collapse.collapseInterface = function collapseInterface(element, config) {
|
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
var selector = getSelectorFromElement(element);
|
||||||
|
return selector ? SelectorEngine.findOne(selector) : null;
|
||||||
|
};
|
||||||
|
|
||||||
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(element), typeof config === 'object' && config ? config : {});
|
Collapse._collapseInterface = function _collapseInterface(element, config) {
|
||||||
|
var data = Data.getData(element, DATA_KEY);
|
||||||
|
|
||||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
|
||||||
|
|
||||||
|
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||||
_config.toggle = false;
|
_config.toggle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -519,26 +514,30 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Collapse.jQueryInterface = function jQueryInterface(config) {
|
Collapse._jQueryInterface = function _jQueryInterface(config) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
Collapse.collapseInterface(this, config);
|
Collapse._collapseInterface(this, config);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
_createClass$1(Collapse, null, [{
|
Collapse._getInstance = function _getInstance(element) {
|
||||||
|
return Data.getData(element, DATA_KEY);
|
||||||
|
};
|
||||||
|
|
||||||
|
_createClass(Collapse, null, [{
|
||||||
|
key: "VERSION",
|
||||||
|
get: function get() {
|
||||||
|
return VERSION;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
key: "Default",
|
key: "Default",
|
||||||
get: function get() {
|
get: function get() {
|
||||||
return Default;
|
return Default;
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
key: "DATA_KEY",
|
|
||||||
get: function get() {
|
|
||||||
return DATA_KEY;
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
return Collapse;
|
return Collapse;
|
||||||
}(BaseComponent);
|
}();
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Data Api implementation
|
* Data Api implementation
|
||||||
|
|
@ -546,17 +545,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||||
if (event.target.tagName === 'A') {
|
if (event.target.tagName === 'A') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
var triggerData = Manipulator__default['default'].getDataAttributes(this);
|
var triggerData = Manipulator.getDataAttributes(this);
|
||||||
var selector = getSelectorFromElement(this);
|
var selector = getSelectorFromElement(this);
|
||||||
var selectorElements = SelectorEngine__default['default'].find(selector);
|
var selectorElements = makeArray(SelectorEngine.find(selector));
|
||||||
selectorElements.forEach(function (element) {
|
selectorElements.forEach(function (element) {
|
||||||
var data = Data__default['default'].getData(element, DATA_KEY);
|
var data = Data.getData(element, DATA_KEY);
|
||||||
var config;
|
var config;
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
@ -571,33 +570,28 @@
|
||||||
config = triggerData;
|
config = triggerData;
|
||||||
}
|
}
|
||||||
|
|
||||||
Collapse.collapseInterface(element, config);
|
Collapse._collapseInterface(element, config);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* jQuery
|
* jQuery
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* add .Collapse to jQuery only if jQuery is present
|
* add .collapse to jQuery only if jQuery is present
|
||||||
*/
|
*/
|
||||||
|
|
||||||
onDOMContentLoaded(function () {
|
if (typeof jQuery !== 'undefined') {
|
||||||
var $ = getjQuery();
|
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
|
||||||
/* istanbul ignore if */
|
jQuery.fn[NAME] = Collapse._jQueryInterface;
|
||||||
|
jQuery.fn[NAME].Constructor = Collapse;
|
||||||
|
|
||||||
if ($) {
|
jQuery.fn[NAME].noConflict = function () {
|
||||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||||
$.fn[NAME] = Collapse.jQueryInterface;
|
return Collapse._jQueryInterface;
|
||||||
$.fn[NAME].Constructor = Collapse;
|
};
|
||||||
|
}
|
||||||
$.fn[NAME].noConflict = function () {
|
|
||||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
||||||
return Collapse.jQueryInterface;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return Collapse;
|
return Collapse;
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=collapse.js.map
|
//# sourceMappingURL=collapse.js.map
|
||||||
|
|
|
||||||
2
js/dist/collapse.js.map
vendored
2
js/dist/collapse.js.map
vendored
File diff suppressed because one or more lines are too long
32
js/dist/dom/data.js
vendored
32
js/dist/dom/data.js
vendored
|
|
@ -1,18 +1,18 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap data.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap data.js v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2019 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/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());
|
(global = global || self, global.Data = factory());
|
||||||
}(this, (function () { 'use strict';
|
}(this, function () { 'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): dom/data.js
|
* Bootstrap (v4.3.1): dom/data.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -26,22 +26,22 @@
|
||||||
var id = 1;
|
var id = 1;
|
||||||
return {
|
return {
|
||||||
set: function set(element, key, data) {
|
set: function set(element, key, data) {
|
||||||
if (typeof element.bsKey === 'undefined') {
|
if (typeof element.key === 'undefined') {
|
||||||
element.bsKey = {
|
element.key = {
|
||||||
key: key,
|
key: key,
|
||||||
id: id
|
id: id
|
||||||
};
|
};
|
||||||
id++;
|
id++;
|
||||||
}
|
}
|
||||||
|
|
||||||
storeData[element.bsKey.id] = data;
|
storeData[element.key.id] = data;
|
||||||
},
|
},
|
||||||
get: function get(element, key) {
|
get: function get(element, key) {
|
||||||
if (!element || typeof element.bsKey === 'undefined') {
|
if (!element || typeof element.key === 'undefined') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var keyProperties = element.bsKey;
|
var keyProperties = element.key;
|
||||||
|
|
||||||
if (keyProperties.key === key) {
|
if (keyProperties.key === key) {
|
||||||
return storeData[keyProperties.id];
|
return storeData[keyProperties.id];
|
||||||
|
|
@ -50,15 +50,15 @@
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
delete: function _delete(element, key) {
|
delete: function _delete(element, key) {
|
||||||
if (typeof element.bsKey === 'undefined') {
|
if (typeof element.key === 'undefined') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var keyProperties = element.bsKey;
|
var keyProperties = element.key;
|
||||||
|
|
||||||
if (keyProperties.key === key) {
|
if (keyProperties.key === key) {
|
||||||
delete storeData[keyProperties.id];
|
delete storeData[keyProperties.id];
|
||||||
delete element.bsKey;
|
delete element.key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -78,5 +78,5 @@
|
||||||
|
|
||||||
return Data;
|
return Data;
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=data.js.map
|
//# sourceMappingURL=data.js.map
|
||||||
|
|
|
||||||
2
js/dist/dom/data.js.map
vendored
2
js/dist/dom/data.js.map
vendored
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): 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 mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.bsKey === 'undefined') {\n element.bsKey = {\n key,\n id\n }\n id++\n }\n\n storeData[element.bsKey.id] = data\n },\n get(element, key) {\n if (!element || typeof element.bsKey === 'undefined') {\n return null\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.bsKey === 'undefined') {\n return\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.bsKey\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","bsKey","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAI,YAAM;EACrB,MAAMC,SAAS,GAAG,EAAlB;EACA,MAAIC,EAAE,GAAG,CAAT;EACA,SAAO;EACLC,IAAAA,GADK,eACDC,OADC,EACQC,GADR,EACaC,IADb,EACmB;EACtB,UAAI,OAAOF,OAAO,CAACG,KAAf,KAAyB,WAA7B,EAA0C;EACxCH,QAAAA,OAAO,CAACG,KAAR,GAAgB;EACdF,UAAAA,GAAG,EAAHA,GADc;EAEdH,UAAAA,EAAE,EAAFA;EAFc,SAAhB;EAIAA,QAAAA,EAAE;EACH;;EAEDD,MAAAA,SAAS,CAACG,OAAO,CAACG,KAAR,CAAcL,EAAf,CAAT,GAA8BI,IAA9B;EACD,KAXI;EAYLE,IAAAA,GAZK,eAYDJ,OAZC,EAYQC,GAZR,EAYa;EAChB,UAAI,CAACD,OAAD,IAAY,OAAOA,OAAO,CAACG,KAAf,KAAyB,WAAzC,EAAsD;EACpD,eAAO,IAAP;EACD;;EAED,UAAME,aAAa,GAAGL,OAAO,CAACG,KAA9B;;EACA,UAAIE,aAAa,CAACJ,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACQ,aAAa,CAACP,EAAf,CAAhB;EACD;;EAED,aAAO,IAAP;EACD,KAvBI;EAwBLQ,IAAAA,MAxBK,mBAwBEN,OAxBF,EAwBWC,GAxBX,EAwBgB;EACnB,UAAI,OAAOD,OAAO,CAACG,KAAf,KAAyB,WAA7B,EAA0C;EACxC;EACD;;EAED,UAAME,aAAa,GAAGL,OAAO,CAACG,KAA9B;;EACA,UAAIE,aAAa,CAACJ,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACQ,aAAa,CAACP,EAAf,CAAhB;EACA,eAAOE,OAAO,CAACG,KAAf;EACD;EACF;EAlCI,GAAP;EAoCD,CAvCe,EAAhB;;MAyCMI,IAAI,GAAG;EACXC,EAAAA,OADW,mBACHC,QADG,EACOR,GADP,EACYC,IADZ,EACkB;EAC3BN,IAAAA,OAAO,CAACG,GAAR,CAAYU,QAAZ,EAAsBR,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXQ,EAAAA,OAJW,mBAIHD,QAJG,EAIOR,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACQ,GAAR,CAAYK,QAAZ,EAAsBR,GAAtB,CAAP;EACD,GANU;EAOXU,EAAAA,UAPW,sBAOAF,QAPA,EAOUR,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACU,MAAR,CAAeG,QAAf,EAAyBR,GAAzB;EACD;EATU;;;;;;;;"}
|
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.key === 'undefined') {\n element.key = {\n key,\n id\n }\n id++\n }\n\n storeData[element.key.id] = data\n },\n get(element, key) {\n if (!element || typeof element.key === 'undefined') {\n return null\n }\n\n const keyProperties = element.key\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.key === 'undefined') {\n return\n }\n\n const keyProperties = element.key\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.key\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;;;;;;;EAOA;;;;;EAMA,IAAMA,OAAO,GAAI,YAAM;EACrB,MAAMC,SAAS,GAAG,EAAlB;EACA,MAAIC,EAAE,GAAG,CAAT;EACA,SAAO;EACLC,IAAAA,GADK,eACDC,OADC,EACQC,GADR,EACaC,IADb,EACmB;EACtB,UAAI,OAAOF,OAAO,CAACC,GAAf,KAAuB,WAA3B,EAAwC;EACtCD,QAAAA,OAAO,CAACC,GAAR,GAAc;EACZA,UAAAA,GAAG,EAAHA,GADY;EAEZH,UAAAA,EAAE,EAAFA;EAFY,SAAd;EAIAA,QAAAA,EAAE;EACH;;EAEDD,MAAAA,SAAS,CAACG,OAAO,CAACC,GAAR,CAAYH,EAAb,CAAT,GAA4BI,IAA5B;EACD,KAXI;EAYLC,IAAAA,GAZK,eAYDH,OAZC,EAYQC,GAZR,EAYa;EAChB,UAAI,CAACD,OAAD,IAAY,OAAOA,OAAO,CAACC,GAAf,KAAuB,WAAvC,EAAoD;EAClD,eAAO,IAAP;EACD;;EAED,UAAMG,aAAa,GAAGJ,OAAO,CAACC,GAA9B;;EACA,UAAIG,aAAa,CAACH,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACO,aAAa,CAACN,EAAf,CAAhB;EACD;;EAED,aAAO,IAAP;EACD,KAvBI;EAwBLO,IAAAA,MAxBK,mBAwBEL,OAxBF,EAwBWC,GAxBX,EAwBgB;EACnB,UAAI,OAAOD,OAAO,CAACC,GAAf,KAAuB,WAA3B,EAAwC;EACtC;EACD;;EAED,UAAMG,aAAa,GAAGJ,OAAO,CAACC,GAA9B;;EACA,UAAIG,aAAa,CAACH,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACO,aAAa,CAACN,EAAf,CAAhB;EACA,eAAOE,OAAO,CAACC,GAAf;EACD;EACF;EAlCI,GAAP;EAoCD,CAvCe,EAAhB;;EAyCA,IAAMK,IAAI,GAAG;EACXC,EAAAA,OADW,mBACHC,QADG,EACOP,GADP,EACYC,IADZ,EACkB;EAC3BN,IAAAA,OAAO,CAACG,GAAR,CAAYS,QAAZ,EAAsBP,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXO,EAAAA,OAJW,mBAIHD,QAJG,EAIOP,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACO,GAAR,CAAYK,QAAZ,EAAsBP,GAAtB,CAAP;EACD,GANU;EAOXS,EAAAA,UAPW,sBAOAF,QAPA,EAOUP,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACS,MAAR,CAAeG,QAAf,EAAyBP,GAAzB;EACD;EATU,CAAb;;;;;;;;"}
|
||||||
238
js/dist/dom/event-handler.js
vendored
238
js/dist/dom/event-handler.js
vendored
|
|
@ -1,38 +1,182 @@
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap event-handler.js v5.0.0-beta1 (https://getbootstrap.com/)
|
* Bootstrap event-handler.js v4.3.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2019 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/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
|
(global = global || self, global.EventHandler = factory());
|
||||||
}(this, (function () { 'use strict';
|
}(this, function () { 'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): util/index.js
|
* Bootstrap (v4.3.1): util/index.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
var MAX_UID = 1000000;
|
||||||
|
var _window = window,
|
||||||
|
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Public Util Api
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var getjQuery = function getjQuery() {
|
|
||||||
var _window = window,
|
|
||||||
jQuery = _window.jQuery;
|
|
||||||
|
|
||||||
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
|
var getUID = function getUID(prefix) {
|
||||||
return jQuery;
|
do {
|
||||||
}
|
// eslint-disable-next-line no-bitwise
|
||||||
|
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
||||||
|
} while (document.getElementById(prefix));
|
||||||
|
|
||||||
return null;
|
return prefix;
|
||||||
};
|
};
|
||||||
|
|
||||||
var isRTL = document.documentElement.dir === 'rtl';
|
/* istanbul ignore file */
|
||||||
|
var _Element$prototype = Element.prototype,
|
||||||
|
matches = _Element$prototype.matches,
|
||||||
|
closest = _Element$prototype.closest;
|
||||||
|
var find = Element.prototype.querySelectorAll;
|
||||||
|
var findOne = Element.prototype.querySelector;
|
||||||
|
|
||||||
|
var createCustomEvent = function createCustomEvent(eventName, params) {
|
||||||
|
var cEvent = new CustomEvent(eventName, params);
|
||||||
|
return cEvent;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof window.CustomEvent !== 'function') {
|
||||||
|
createCustomEvent = function createCustomEvent(eventName, params) {
|
||||||
|
params = params || {
|
||||||
|
bubbles: false,
|
||||||
|
cancelable: false,
|
||||||
|
detail: null
|
||||||
|
};
|
||||||
|
var evt = document.createEvent('CustomEvent');
|
||||||
|
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
|
||||||
|
return evt;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var workingDefaultPrevented = function () {
|
||||||
|
var e = document.createEvent('CustomEvent');
|
||||||
|
e.initEvent('Bootstrap', true, true);
|
||||||
|
e.preventDefault();
|
||||||
|
return e.defaultPrevented;
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (!workingDefaultPrevented) {
|
||||||
|
var origPreventDefault = Event.prototype.preventDefault;
|
||||||
|
|
||||||
|
Event.prototype.preventDefault = function () {
|
||||||
|
if (!this.cancelable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
origPreventDefault.call(this);
|
||||||
|
Object.defineProperty(this, 'defaultPrevented', {
|
||||||
|
get: function get() {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
};
|
||||||
|
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
|
||||||
|
|
||||||
|
|
||||||
|
var defaultPreventedPreservedOnDispatch = function () {
|
||||||
|
var e = createCustomEvent('Bootstrap', {
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
|
var element = document.createElement('div');
|
||||||
|
element.addEventListener('Bootstrap', function () {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
e.preventDefault();
|
||||||
|
element.dispatchEvent(e);
|
||||||
|
return e.defaultPrevented;
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (!matches) {
|
||||||
|
matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!closest) {
|
||||||
|
closest = function closest(selector) {
|
||||||
|
var element = this;
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (matches.call(element, selector)) {
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
element = element.parentElement || element.parentNode;
|
||||||
|
} while (element !== null && element.nodeType === 1);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var scopeSelectorRegex = /:scope\b/;
|
||||||
|
|
||||||
|
var supportScopeQuery = function () {
|
||||||
|
var element = document.createElement('div');
|
||||||
|
|
||||||
|
try {
|
||||||
|
element.querySelectorAll(':scope *');
|
||||||
|
} catch (error) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}();
|
||||||
|
|
||||||
|
if (!supportScopeQuery) {
|
||||||
|
find = function find(selector) {
|
||||||
|
if (!scopeSelectorRegex.test(selector)) {
|
||||||
|
return this.querySelectorAll(selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hasId = Boolean(this.id);
|
||||||
|
|
||||||
|
if (!hasId) {
|
||||||
|
this.id = getUID('scope');
|
||||||
|
}
|
||||||
|
|
||||||
|
var nodeList = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
|
||||||
|
nodeList = this.querySelectorAll(selector);
|
||||||
|
} finally {
|
||||||
|
if (!hasId) {
|
||||||
|
this.removeAttribute('id');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nodeList;
|
||||||
|
};
|
||||||
|
|
||||||
|
findOne = function findOne(selector) {
|
||||||
|
if (!scopeSelectorRegex.test(selector)) {
|
||||||
|
return this.querySelector(selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
var matches = find.call(this, selector);
|
||||||
|
|
||||||
|
if (typeof matches[0] !== 'undefined') {
|
||||||
|
return matches[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
* Bootstrap (v5.0.0-beta1): dom/event-handler.js
|
* Bootstrap (v4.3.1): dom/event-handler.js
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,6 +187,7 @@
|
||||||
|
|
||||||
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
|
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
|
||||||
var stripNameRegex = /\..*/;
|
var stripNameRegex = /\..*/;
|
||||||
|
var keyEventRegex = /^key/;
|
||||||
var stripUidRegex = /::\d+$/;
|
var stripUidRegex = /::\d+$/;
|
||||||
var eventRegistry = {}; // Events storage
|
var eventRegistry = {}; // Events storage
|
||||||
|
|
||||||
|
|
@ -51,7 +196,7 @@
|
||||||
mouseenter: 'mouseover',
|
mouseenter: 'mouseover',
|
||||||
mouseleave: 'mouseout'
|
mouseleave: 'mouseout'
|
||||||
};
|
};
|
||||||
var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
|
var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
|
||||||
/**
|
/**
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
* Private methods
|
* Private methods
|
||||||
|
|
@ -69,9 +214,18 @@
|
||||||
return eventRegistry[uid];
|
return eventRegistry[uid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fixEvent(event, element) {
|
||||||
|
// Add which for key events
|
||||||
|
if (event.which === null && keyEventRegex.test(event.type)) {
|
||||||
|
event.which = event.charCode === null ? event.keyCode : event.charCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
event.delegateTarget = element;
|
||||||
|
}
|
||||||
|
|
||||||
function bootstrapHandler(element, fn) {
|
function bootstrapHandler(element, fn) {
|
||||||
return function handler(event) {
|
return function handler(event) {
|
||||||
event.delegateTarget = element;
|
fixEvent(event, element);
|
||||||
|
|
||||||
if (handler.oneOff) {
|
if (handler.oneOff) {
|
||||||
EventHandler.off(element, event.type, fn);
|
EventHandler.off(element, event.type, fn);
|
||||||
|
|
@ -88,7 +242,7 @@
|
||||||
for (var target = event.target; target && target !== this; target = target.parentNode) {
|
for (var target = event.target; target && target !== this; target = target.parentNode) {
|
||||||
for (var i = domElements.length; i--;) {
|
for (var i = domElements.length; i--;) {
|
||||||
if (domElements[i] === target) {
|
if (domElements[i] === target) {
|
||||||
event.delegateTarget = target;
|
fixEvent(event, target);
|
||||||
|
|
||||||
if (handler.oneOff) {
|
if (handler.oneOff) {
|
||||||
EventHandler.off(element, event.type, fn);
|
EventHandler.off(element, event.type, fn);
|
||||||
|
|
@ -109,13 +263,12 @@
|
||||||
delegationSelector = null;
|
delegationSelector = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var uidEventList = Object.keys(events);
|
for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) {
|
||||||
|
var uid = _Object$keys[_i];
|
||||||
for (var i = 0, len = uidEventList.length; i < len; i++) {
|
var event = events[uid];
|
||||||
var event = events[uidEventList[i]];
|
|
||||||
|
|
||||||
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
|
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
|
||||||
return event;
|
return events[uid];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,7 +286,7 @@
|
||||||
typeEvent = custom;
|
typeEvent = custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
var isNative = nativeEvents.has(typeEvent);
|
var isNative = nativeEvents.indexOf(typeEvent) > -1;
|
||||||
|
|
||||||
if (!isNative) {
|
if (!isNative) {
|
||||||
typeEvent = originalTypeEvent;
|
typeEvent = originalTypeEvent;
|
||||||
|
|
@ -179,7 +332,7 @@
|
||||||
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
||||||
var fn = findHandler(events[typeEvent], handler, delegationSelector);
|
var fn = findHandler(events[typeEvent], handler, delegationSelector);
|
||||||
|
|
||||||
if (!fn) {
|
if (fn === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,7 +343,7 @@
|
||||||
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
|
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
|
||||||
var storeElementEvent = events[typeEvent] || {};
|
var storeElementEvent = events[typeEvent] || {};
|
||||||
Object.keys(storeElementEvent).forEach(function (handlerKey) {
|
Object.keys(storeElementEvent).forEach(function (handlerKey) {
|
||||||
if (handlerKey.includes(namespace)) {
|
if (handlerKey.indexOf(namespace) > -1) {
|
||||||
var event = storeElementEvent[handlerKey];
|
var event = storeElementEvent[handlerKey];
|
||||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +369,7 @@
|
||||||
|
|
||||||
var inNamespace = typeEvent !== originalTypeEvent;
|
var inNamespace = typeEvent !== originalTypeEvent;
|
||||||
var events = getEvent(element);
|
var events = getEvent(element);
|
||||||
var isNamespace = originalTypeEvent.startsWith('.');
|
var isNamespace = originalTypeEvent.charAt(0) === '.';
|
||||||
|
|
||||||
if (typeof originalHandler !== 'undefined') {
|
if (typeof originalHandler !== 'undefined') {
|
||||||
// Simplest case: handler is passed, remove that listener ONLY.
|
// Simplest case: handler is passed, remove that listener ONLY.
|
||||||
|
|
@ -230,7 +383,7 @@
|
||||||
|
|
||||||
if (isNamespace) {
|
if (isNamespace) {
|
||||||
Object.keys(events).forEach(function (elementEvent) {
|
Object.keys(events).forEach(function (elementEvent) {
|
||||||
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
|
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -238,7 +391,7 @@
|
||||||
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
|
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
|
||||||
var handlerKey = keyHandlers.replace(stripUidRegex, '');
|
var handlerKey = keyHandlers.replace(stripUidRegex, '');
|
||||||
|
|
||||||
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
|
if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
|
||||||
var event = storeElementEvent[keyHandlers];
|
var event = storeElementEvent[keyHandlers];
|
||||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||||
}
|
}
|
||||||
|
|
@ -249,19 +402,18 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $ = getjQuery();
|
|
||||||
var typeEvent = event.replace(stripNameRegex, '');
|
var typeEvent = event.replace(stripNameRegex, '');
|
||||||
var inNamespace = event !== typeEvent;
|
var inNamespace = event !== typeEvent;
|
||||||
var isNative = nativeEvents.has(typeEvent);
|
var isNative = nativeEvents.indexOf(typeEvent) > -1;
|
||||||
var jQueryEvent;
|
var jQueryEvent;
|
||||||
var bubbles = true;
|
var bubbles = true;
|
||||||
var nativeDispatch = true;
|
var nativeDispatch = true;
|
||||||
var defaultPrevented = false;
|
var defaultPrevented = false;
|
||||||
var evt = null;
|
var evt = null;
|
||||||
|
|
||||||
if (inNamespace && $) {
|
if (inNamespace && typeof jQuery !== 'undefined') {
|
||||||
jQueryEvent = $.Event(event, args);
|
jQueryEvent = jQuery.Event(event, args);
|
||||||
$(element).trigger(jQueryEvent);
|
jQuery(element).trigger(jQueryEvent);
|
||||||
bubbles = !jQueryEvent.isPropagationStopped();
|
bubbles = !jQueryEvent.isPropagationStopped();
|
||||||
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
||||||
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
||||||
|
|
@ -271,11 +423,11 @@
|
||||||
evt = document.createEvent('HTMLEvents');
|
evt = document.createEvent('HTMLEvents');
|
||||||
evt.initEvent(typeEvent, bubbles, true);
|
evt.initEvent(typeEvent, bubbles, true);
|
||||||
} else {
|
} else {
|
||||||
evt = new CustomEvent(event, {
|
evt = createCustomEvent(event, {
|
||||||
bubbles: bubbles,
|
bubbles: bubbles,
|
||||||
cancelable: true
|
cancelable: true
|
||||||
});
|
});
|
||||||
} // merge custom information in our event
|
} // merge custom informations in our event
|
||||||
|
|
||||||
|
|
||||||
if (typeof args !== 'undefined') {
|
if (typeof args !== 'undefined') {
|
||||||
|
|
@ -290,6 +442,14 @@
|
||||||
|
|
||||||
if (defaultPrevented) {
|
if (defaultPrevented) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
|
if (!defaultPreventedPreservedOnDispatch) {
|
||||||
|
Object.defineProperty(evt, 'defaultPrevented', {
|
||||||
|
get: function get() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nativeDispatch) {
|
if (nativeDispatch) {
|
||||||
|
|
@ -306,5 +466,5 @@
|
||||||
|
|
||||||
return EventHandler;
|
return EventHandler;
|
||||||
|
|
||||||
})));
|
}));
|
||||||
//# sourceMappingURL=event-handler.js.map
|
//# sourceMappingURL=event-handler.js.map
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue