Compare commits

..

375 Commits

Author SHA1 Message Date
XhmikosR 5816fae803 Bring in .bd-announcement fixes 2024-03-22 08:02:12 +02:00
XhmikosR b04b43619d Fix link and drop prettier crappy formatting 2024-03-21 16:38:44 +02:00
XhmikosR 00da6cc06b Drop slack 2024-03-21 16:38:12 +02:00
Mark Otto 1b8b70b067 NES fixes 2024-03-21 16:38:12 +02:00
Edward Ezekiel a8f4adc864 feat(eol): Add End of Life documentation page 2024-03-06 10:18:03 -06:00
Edward Ezekiel 6bbc12ba12 feat(EOL): Add announcement to Examples page 2024-03-06 09:48:11 -06:00
Edward Ezekiel 26f225831a feat(announcement): Add End of Life announcement 2024-03-05 13:37:35 -06:00
Jesse Mandel fa4fbc8798 Backport: NuGet Changes
Update authors and copyright to match npm, add repository reference. Also incorporates licensing expression change by @vanillajonathan (#37378)

Co-authored-by: Jesse Mandel <jesse.mandel@jdpa.com>
2022-11-09 09:17:19 +02:00
Louis-Maxime Piton 5aa7f72689 Change view in GitHub links (#37223) 2022-09-28 13:12:21 +02:00
XhmikosR e5643aaa89 Release v4.6.2 (#36725)
* Bump version to 4.6.2.

* Dist
2022-07-19 18:13:44 +03:00
Julien Déramond 82a1f334cf Docs: Capitalize Unicode (#36735) 2022-07-13 18:53:40 +03:00
Mark Otto 4954ea15fa Add Fathom to v4 (#36727) 2022-07-12 18:41:19 +03:00
XhmikosR fdf1c372d4 Update devDependencies (#36724)
* @babel/cli               ^7.17.10  →  ^7.18.6
* @babel/core               ^7.18.2  →  ^7.18.6
* @babel/preset-env         ^7.18.2  →  ^7.18.6
* @rollup/plugin-commonjs   ^22.0.0  →  ^22.0.1
* eslint                    ^8.17.0  →  ^8.19.0
* eslint-plugin-qunit        ^7.2.0  →   ^7.3.1
* hugo-bin                  ^0.88.2  →  ^0.89.0
* karma                     ^6.3.20  →   ^6.4.0
* lockfile-lint              ^4.7.4  →   ^4.7.6
* nodemon                   ^2.0.16  →  ^2.0.19
* postcss-cli                ^9.1.0  →  ^10.0.0
* rollup                    ^2.75.6  →  ^2.76.0
* stylelint                 ^14.9.0  →  ^14.9.1
* terser                    ^5.14.0  →  ^5.14.1
2022-07-12 15:36:38 +03:00
Julien Déramond 35be9e74af Docs: update clipboard.js to v2.0.11 2022-06-28 20:31:51 -07:00
XhmikosR def158dc10 Update devDependencies (#36522)
* eslint                           ^8.16.0  →  ^8.17.0
* hugo-bin                         ^0.87.1  →  ^0.88.2
* rollup                           ^2.74.1  →  ^2.75.6
* stylelint-config-twbs-bootstrap   ^3.1.0  →   ^4.0.0
* stylelint                        ^14.8.5  →  ^14.9.0
* terser                           ^5.13.1  →  ^5.14.0
2022-06-28 07:52:23 +02:00
Patrick H. Lauke 6fd203060b v4: Improve accessible name of version dropdown in docs navbar (#36504)
- add `sr-only` "Bootstrap", which will be part of the accessible name
- extra `sr-only` text to give some context - that the dropdown is about switching versions
- remove the redundant id/aria-labelledby for the dropdown
- change the control from `<a>` to `<button>`
2022-06-05 10:33:18 +01:00
Patrick H. Lauke d136302a57 v4 Docs: Update outdated ARIA/PF link, expand color contrast explanation in accessibility.md (#36492)
PF link is backport of https://github.com/twbs/bootstrap/pull/36489
change in `accessibility.md` is to bring this in line with existing v5 prose
2022-06-03 17:43:01 +01:00
Patrick H. Lauke b4c994d296 Remove confusing unnecessary id/aria-labelledby for dropdown menus (#36491)
v4 port of https://github.com/twbs/bootstrap/pull/36487
2022-06-03 17:28:18 +01:00
Julien Déramond 4e951f8bc9 Docs: fix some ARIA Authoring Practices Guides broken links (#36490) 2022-06-03 10:41:59 +01:00
Louis-Maxime Piton 8274bf25d0 Fixing tabs' tests (#36485) 2022-06-02 12:58:43 +03:00
Mark Otto 4444f090b6 Add horizontal collapse support 2022-06-01 20:14:35 -07:00
Julien Déramond 5968ef23ca Fix closing HTML tag in navs docs (#36466) 2022-05-31 17:40:36 +03:00
XhmikosR 261b418798 Update devDependencies 2022-05-26 08:00:04 +03:00
XhmikosR c043a75d53 Update GitHub actions 2022-05-26 08:00:04 +03:00
XhmikosR c1b42e3538 build/change-version.js: remove the executable flag 2022-05-26 08:00:04 +03:00
Patrick H. Lauke 7d57d9a68b Dynamic tabs: use buttons rather than links (backport to v4) (#33163)
* Manually backport 32630

Dynamic tabs: use buttons rather than links

* Tweak unit test

* Tweak unit tests

* More tweakage

* show() should also bail if `disabled` attribute is set

* Tweak tests

* Simplify test for relatedTarget

* Temporarily remove problematic test

(as i can't get local tests to run just noww)

* Revert previous

* test: fix broken test cases for tab.js

* test: fix role=tablist invalid on nav element

* test: prefer <div/> over <div></div>

* Manually backport 32630

Dynamic tabs: use buttons rather than links

* test: fix broken test cases for tab.js

* Fixes

* Remove and ignore lock file

Co-authored-by: alpadev <alpa.muc@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-05-24 11:16:58 -07:00
Julien Déramond e4dc2e91a5 Doc: remove role="group" from some split drop* buttons (#36254) 2022-05-24 11:04:59 +03:00
Adrian Curtin 6a500849de Replace the deprecated color-adjust with print-color-adjust (#36283) 2022-05-24 10:36:27 +03:00
Wladyslaw Dudko d9481ee054 _custom-forms.scss: fix order of attributes (#36231) 2022-05-14 21:37:08 +03:00
XhmikosR d36b1a46cf Fix lint issues 2022-04-19 09:07:15 +03:00
XhmikosR 7613953998 Update devDependencies 2022-04-19 09:07:15 +03:00
XhmikosR 0090af6a9c package.json: add GitHub Sponsors and reorder properties (#35451) 2022-04-19 09:07:15 +03:00
XhmikosR bae047fcee Move linkinator to GitHub Actions. (#35573)
* Move linkinator to GitHub Actions.

* Remove `docs-linkinator` npm script since it's no longer used
2022-04-19 09:07:15 +03:00
pricop 3b63d509de Updated the small-font-size to use a round value
This is a backport from BS5 to BS4.

As per https://github.com/twbs/bootstrap/issues/35553

The ```small-font -size``` will actually increase from ```13px``` to ```14px``` with this proposed change. Personally I'd prefer keeping it the BS5 way (```14px```), as the text is more readable now.

If it's needed, I can do another PR with the ```$small-font-size:             .8125rem !default;``` to resemble BS4 more closely but I feel like this would be a move forward even for BS4.
2022-04-14 09:25:38 -07:00
Julien Déramond 5299abeeab Doc: Reorder alphabetically lists of components (#36128) 2022-04-08 16:30:58 +03:00
XhmikosR 349a373ff6 Update devDependencies
* @babel/cli                       ^7.16.0  →  ^7.16.7
* @babel/core                      ^7.16.5  →  ^7.16.7
* @babel/preset-env                ^7.16.5  →  ^7.16.7
* @rollup/plugin-node-resolve      ^13.1.1  →  ^13.1.2
* autoprefixer                     ^10.4.0  →  ^10.4.1
* eslint                            ^8.4.1  →   ^8.6.0
* eslint-plugin-import             ^2.25.3  →  ^2.25.4
* eslint-plugin-qunit               ^7.1.0  →   ^7.2.0
* eslint-plugin-unicorn            ^39.0.0  →  ^40.0.0
* hugo-bin                         ^0.78.1  →  ^0.79.2
* linkinator                       ^2.16.2  →   ^3.0.3
* node-sass                         ^7.0.0  →   ^7.0.1
* rollup                           ^2.61.1  →  ^2.63.0
* stylelint                        ^14.1.0  →  ^14.2.0
* stylelint-config-twbs-bootstrap   ^3.0.0  →   ^3.0.1

Also, remove the unused glob package.
2022-01-04 09:50:53 +02:00
XhmikosR 69c5dc8934 Bump copyright year to 2022 2022-01-04 09:50:53 +02:00
Patrick H. Lauke 8469f695f9 Strengthen and expand note about dynamic tabs with dropdown menus (#35588)
following on from https://github.com/twbs/bootstrap/pull/35213 this

- expands the note, making it clear it's not supported
- makes it a callout
2022-01-04 09:50:53 +02:00
XhmikosR bee3847e6d Add note to carousel crossfade docs about bg color (#35587) 2022-01-04 09:50:53 +02:00
Patrick H. Lauke a3d14bb7b7 Tweak toast docs (#35633)
- a few rewordings/tweaks
- add info about toasts with focusable/actionable controls (shouldn't autohide them)

manual backport of https://github.com/twbs/bootstrap/pull/33810
2022-01-03 10:15:29 +02:00
Julien Déramond 9c60983949 Backport #35556 (#35558)
* Use param to set Bootstrap version in Contents doc

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-16 11:22:03 +02:00
XhmikosR f7cb3639a7 Update devDependencies 2021-12-16 09:23:08 +02:00
XhmikosR c488b8fcc3 Update Stylelint and our config too 2021-12-16 09:23:08 +02:00
Ty Mick 0b3796e33d docs: Add responsive variations for align-content-between (#35532)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-16 09:23:08 +02:00
XhmikosR c24f751c63 JS tests: only test one Node.js version (#35481) 2021-12-16 09:23:08 +02:00
XhmikosR 33f37880df CI: add workflow_dispatch (#35454) 2021-12-16 09:23:08 +02:00
XhmikosR 9a5a5c57aa Remove the now outdated build/svgo.yml (#35447) 2021-12-16 09:23:08 +02:00
XhmikosR 7245437856 build/change-version.js: fix wrong map usage (#35395) 2021-12-16 09:23:08 +02:00
XhmikosR d99c820f9c README.md: wrap file contents in a details element (#35452)
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2021-12-16 09:23:08 +02:00
Christian Oliff b81ce1f9e2 README.md remove broken "David DM" dependency badges (#35313) 2021-12-16 09:23:08 +02:00
Patrick H. Lauke 4097441977 Update links to CCA, MQ5 prefers-reduced-motion, evergreen WCAG urls, more resources (#35427)
Manual backport of https://github.com/twbs/bootstrap/pull/33797
2021-11-30 08:38:07 +02:00
pricop e87eeb4ad6 Fixed docs for Toasts referencing blur transparency (#35190) 2021-11-15 12:49:55 +02:00
XhmikosR 043a03c95a Release v4.6.1 (#35272)
* Bump version to v4.6.1

* Dist
2021-10-28 17:45:21 +03:00
Barabas ef6a418535 images.md: remove zero-width space (#35234)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-10-28 14:22:59 +03:00
XhmikosR 3f88326815 Update devDependencies (#35271)
* autoprefixer  ^10.3.7  →  ^10.4.0
* eslint         ^8.0.1  →   ^8.1.0
* karma          ^6.3.5  →   ^6.3.6
* rollup        ^2.58.0  →  ^2.58.3
2021-10-28 13:53:14 +03:00
XhmikosR 41330696b9 Update devDependencies and switch to Node.js 16/npm 8
* @babel/core                      ^7.15.5  →   ^7.15.8
* @babel/preset-env                ^7.15.6  →   ^7.15.8
* @rollup/plugin-commonjs          ^20.0.0  →   ^21.0.1
* @rollup/plugin-node-resolve      ^13.0.5  →   ^13.0.6
* autoprefixer                     ^10.3.6  →   ^10.3.7
* babel-plugin-istanbul             ^6.0.0  →    ^6.1.1
* clean-css-cli                     ^5.3.3  →    ^5.4.2
* eslint                           ^7.32.0  →    ^8.0.0
* eslint-config-xo                 ^0.38.0  →   ^0.39.0
* eslint-plugin-import             ^2.24.2  →   ^2.25.1
* eslint-plugin-qunit               ^6.2.0  →    ^7.0.0
* eslint-plugin-unicorn            ^36.0.0  →   ^37.0.1
* karma                             ^6.3.4  →    ^6.3.5
* linkinator                       ^2.14.0  →   ^2.14.4
* nodemon                          ^2.0.13  →   ^2.0.14
* postcss                           ^8.3.8  →   ^8.3.11
* postcss-cli                       ^9.0.0  →    ^9.0.1
* rollup                           ^2.57.0  →   ^2.58.0
* stylelint-config-twbs-bootstrap   ^2.2.3  →    ^2.2.4
* vnu-jar                           21.9.2  →  21.10.12
2021-10-22 17:07:51 +03:00
XhmikosR fc492edfa3 terser: specify 2 passes as it offers slightly better compression 2021-10-22 17:07:51 +03:00
XhmikosR fe73da982f JS: minor refactoring
* shorten block comments
* reorder constants
2021-10-22 17:07:51 +03:00
XhmikosR 4f0187c891 Revert "Bundlewatch: stop ignoring dependabot branches (#33192)" (#35069)
This reverts commit 5560c86070.
2021-10-22 17:07:51 +03:00
XhmikosR 6d0fd8c3a5 Backport #35074
sanitizer: add `sms` in the `SAFE_URL_PATTERN`
2021-10-22 17:07:51 +03:00
XhmikosR 7b3a47ee3d Update terser to v5.9.0. 2021-10-22 17:07:51 +03:00
Gaël Poupard e482fbb159 fix(input-group): custom-file with validation (#33239) 2021-10-21 09:00:22 +03:00
Julien Déramond 8133c3e5b2 Fix capitalization after period in Markdown files (#35112) 2021-10-05 17:51:44 +03:00
XhmikosR 44a01ec5b7 Update devDependencies (#35068)
* @babel/cli                   ^7.15.4  →  ^7.15.7
* @rollup/plugin-node-resolve  ^13.0.4  →  ^13.0.5
* autoprefixer                 ^10.3.4  →  ^10.3.6
* glob                          ^7.1.7  →   ^7.2.0
* nodemon                      ^2.0.12  →  ^2.0.13
* postcss                       ^8.3.6  →   ^8.3.8
* postcss-cli                   ^8.3.1  →   ^9.0.0
* qunit                        ^2.17.1  →  ^2.17.2
* rollup                       ^2.56.3  →  ^2.57.0
2021-09-28 18:32:57 +03:00
Julien Déramond 8ebd6d95d6 Remove extra spaces in Markdown files (#35047) 2021-09-28 12:22:52 +03:00
XhmikosR bdab948670 Remove unneeded conditional 2021-09-15 15:44:20 +03:00
XhmikosR af52795501 Remove duplicate test. 2021-09-15 15:44:20 +03:00
XhmikosR f6ff736a59 Change test description so that it's unique 2021-09-15 15:44:20 +03:00
XhmikosR 77e0855e5e Merge duplicate test. 2021-09-15 15:44:20 +03:00
XhmikosR ed62ab6e41 Remove commented out test 2021-09-15 15:44:20 +03:00
XhmikosR d4e162f4ac Skip tests if attachShadow is not present 2021-09-15 15:44:20 +03:00
XhmikosR 551f37aff6 tests: comply to the new rules
Use `assert.strictEqual`/`assert.true`/`assert.false`
2021-09-15 15:44:20 +03:00
XhmikosR 5391ecdfde Add eslint-plugin-qunit 2021-09-15 15:44:20 +03:00
XhmikosR e202996a2b Update devDependencies
* @babel/cli                   ^7.14.8  →  ^7.15.5
* @babel/core                  ^7.14.8  →  ^7.15.4
* @babel/preset-env            ^7.14.8  →  ^7.15.6
* @rollup/plugin-commonjs      ^19.0.1  →  ^20.0.0
* @rollup/plugin-node-resolve  ^13.0.2  →  ^13.0.4
* autoprefixer                 ^10.3.1  →  ^10.3.4
* clean-css-cli                 ^5.3.0  →   ^5.3.3
* eslint                       ^7.31.0  →  ^7.32.0
* eslint-config-xo             ^0.37.0  →  ^0.38.0
* eslint-plugin-import         ^2.23.4  →  ^2.24.2
* eslint-plugin-unicorn        ^34.0.1  →  ^36.0.0
* hugo-bin                     ^0.74.0  →  ^0.76.1
* qunit                        ^2.16.0  →  ^2.17.1
* postcss                       ^8.3.5  →   ^8.3.6
* rollup                       ^2.53.3  →  ^2.56.3
* vnu-jar                      21.6.11  →   21.9.2
2021-09-15 15:31:00 +03:00
XhmikosR cb55e389b8 Update CodeQL workflow (#34961) 2021-09-15 15:31:00 +03:00
XhmikosR 08a550a044 Backport #34937
Update a URL mentioning dead name
2021-09-15 15:31:00 +03:00
XhmikosR b0cd2078f7 docs: backport layouts updates from the main branch 2021-09-15 15:31:00 +03:00
XhmikosR 9cdfbc06ce docs-navbar: use the config variable and update to 5.1 2021-09-15 15:31:00 +03:00
XhmikosR f9a79141be npm scripts: add aggregate-output (#32907) 2021-09-15 15:31:00 +03:00
Gaël Poupard 1db75d111b More concise improvements for add() and subtract() (#34432) 2021-09-15 15:31:00 +03:00
Mark Otto 01036ff2ef Update description of active buttons (#34966) 2021-09-14 15:05:07 +03:00
Patrick H. Lauke f4a1a35cf2 v4: Disabled link cleanup (#34924)
manual backport of #34886

per https://www.w3.org/TR/html-aria/#docconformance

> It is NOT RECOMMENDED to use `aria-disabled="true"` on an `a` element with an `href` attribute.
>
>NOTE
>If a link needs to be "disabled", remove the `href` attribute.

This PR removes the unnecessary `href="#"`, `tabindex="-1"`, and `aria-disabled="true"` from disabled links in both docs pages and examples. `aria-disabled="true"` *is* kept for disabled link-based buttons (that have `role="button"`) as there it's appropriate to use (you *want* to convey to assistive technologies that this thing you're claiming is a button is also disabled at the moment)

Further, the PR extends the "Link functionality caveat" to show the "proper" way (removing `href` and adding `.disabled` class only) to disable a link, but then explains what to do if that's not possible (and then keeps an example with all the traditional `href="#" tabindex="-1" aria-disabled="true"`, but explains clearly that it's not ideal). Same sort of explanation is also added to the pointer event utilities page
2021-09-09 14:49:06 +03:00
XhmikosR 408252eff1 Move RFS version in config.yml and update it. 2021-09-08 09:06:42 +03:00
XhmikosR 94b310dc6f Update RFS to v8.1.0 2021-09-08 09:06:42 +03:00
Mark Otto 8dec3d0a34 Replace Sass division with multiplication and custom divide() function
Fixes #34353.

Co-Authored-By: Slaven Tomac <slaventomac@gmail.com>
2021-09-08 09:06:42 +03:00
alpadev b010a6f9f4 fix(modal): change the order we return from show() method (#34087)
In case of a modal with fading enabled, a prevented show event can cause show to not showing the modal anymore.

See #34055

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-07-25 20:36:11 +03:00
XhmikosR 5d24fef741 Update devDependencies
* @babel/cli                       ^7.14.3  →  ^7.14.8
* @babel/core                      ^7.14.3  →  ^7.14.8
* @babel/preset-env                ^7.14.2  →  ^7.14.8
* @rollup/plugin-commonjs          ^19.0.0  →  ^19.0.1
* @rollup/plugin-node-resolve      ^13.0.0  →  ^13.0.2
* autoprefixer                     ^10.2.5  →  ^10.3.1
* eslint                           ^7.26.0  →  ^7.31.0
* eslint-config-xo                 ^0.36.0  →  ^0.37.0
* eslint-plugin-import             ^2.23.2  →  ^2.23.4
* eslint-plugin-unicorn            ^31.0.0  →  ^34.0.1
* globby                           ^11.0.3  →  ^11.0.4
* hugo-bin                         ^0.71.1  →  ^0.73.0
* karma                             ^6.3.2  →   ^6.3.4
* karma-firefox-launcher            ^2.1.0  →   ^2.1.1
* linkinator                       ^2.13.6  →  ^2.14.0
* nodemon                           ^2.0.7  →   ^2.0.12
* node-sass                         ^6.0.0  →   ^6.0.1
* postcss                           ^8.3.0  →   ^8.3.5
* qunit                            ^2.15.0  →  ^2.16.0
* rollup                           ^2.48.0  →  ^2.53.3
* stylelint-config-twbs-bootstrap   ^2.2.0  →   ^2.2.3
* vnu-jar                           21.4.9  →  21.6.11
2021-07-21 16:20:01 +03:00
XhmikosR 70267da28e CI: make use of the actions/setup-node's cache option (#34453) 2021-07-21 16:20:01 +03:00
dependabot[bot] 9cf31d9f8e Bump coverallsapp/github-action from 1.1.2 to 1.1.3 (#34491)
Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](https://github.com/coverallsapp/github-action/compare/v1.1.2...1.1.3)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-07-21 16:20:01 +03:00
Kijima Daigo a6618c437b CONTRIBUTING.md: fix broken link to README.md (#34389) 2021-07-21 16:20:01 +03:00
XhmikosR 6c9951203c Backport #34336
Remove unneeded `.text-white-50` CSS rule

This is already part of Bootstrap 4.6 and 5.0.
2021-07-21 16:20:01 +03:00
XhmikosR ec986fcb57 Manually backport #34075 and #34279
Improve and clean up vnu-jar.js
2021-07-21 16:20:01 +03:00
XhmikosR c272eb80bf Update Hugo config and sitemap.xml (#34074) 2021-07-21 16:20:01 +03:00
Gaël Poupard ca3ff6dc29 Handle complex expressions in add() & subtract() (#34047) 2021-07-21 16:20:01 +03:00
XhmikosR 0ef990f18e Replace Freenode with Libera.Chat in the remaining files (#34250) 2021-07-21 16:20:01 +03:00
Christian Oliff 6c2c14d887 Remove print thead rule (#34426)
The `thead` rule is safe to remove -- it was a workaround for browsers that didn't conform to this part of the CSS 2.1 spec. (https://www.w3.org/TR/CSS21/tables.html#table-display)
In practice, this meant IE 6 & IE 7.

(thanks to @mattbrundage for this PR upstream for the main.css project (https://github.com/h5bp/main.css/pull/101)
2021-07-08 08:28:53 +03:00
k-utsumi 086c0bfc25 🐛 Enable 0.x with negative margins @ v4 (#33593)
* 🐛 Enable `0.x` with negative margins @ v4

I set it as below, but no negative margin was added.
`$spacers: (0\.5: ($spacer * .125));`

After investigating, it seems that `0 \ .5` is also evaluated as 0.
So I changed it to string comparison.

HTML example: `<img class="mt-n0.5">`

* 💚 Clear CI errors
2021-06-24 10:57:47 +03:00
Christian Oliff 538ea32cb7 Fix repetition in the description. 2021-06-09 14:08:50 -07:00
Gaël Poupard e376773ccc docs(color): wrong secondary hex code (#34159)
Closes #34146 

---

Not sure what happened but indeed, [our current `$secondary` is not what's shown in docs](https://github.com/twbs/bootstrap/blob/c2f949c1fdad09e30793b533e5502808c5e2d423/scss/_variables.scss#L68).
2021-06-02 04:59:48 +02:00
XhmikosR c2f949c1fd Update devDependencies
* @babel/cli                       ^7.13.14  →   ^7.14.3
* @babel/core                       ^7.14.0  →   ^7.14.3
* @babel/preset-env                 ^7.14.1  →   ^7.14.2
* @rollup/plugin-commonjs           ^18.0.0  →   ^19.0.0
* @rollup/plugin-node-resolve       ^11.2.1  →   ^13.0.0
* clean-css-cli                      ^5.2.2  →    ^5.3.0
* eslint                            ^7.23.0  →   ^7.26.0
* eslint-config-xo                  ^0.35.0  →   ^0.36.0
* eslint-plugin-import              ^2.22.1  →   ^2.23.2
* eslint-plugin-unicorn             ^29.0.0  →   ^31.0.0
* glob                               ^7.1.6  →    ^7.1.7
* hugo-bin                          ^0.70.0  →   ^0.71.1
* node-sass                          ^5.0.0  →    ^6.0.0
* postcss                            ^8.2.9  →    ^8.3.0
* qunit                             ^2.14.1  →   ^2.15.0
* rollup                            ^2.44.0  →   ^2.48.0
* stylelint                        ^13.12.0  →  ^13.13.1
* stylelint-config-twbs-bootstrap    ^2.1.0  →    ^2.2.0
* vnu-jar                            21.2.5  →    21.4.9
2021-05-21 08:19:22 +03:00
midzer fb604bc03f Replace freenode with libera IRC server (#34050) 2021-05-21 08:19:22 +03:00
XhmikosR 68f6aa6780 CI: remove Node.js 10 (#33923)
Node.js 10 is EOL since 30/04/2021
2021-05-21 08:19:22 +03:00
Mark Otto f61c2ed8f1 Spinner alignment changes 2021-05-21 08:19:22 +03:00
XhmikosR 6ed3845f31 JS tests: add Node.js 16 (#33720) 2021-05-21 08:19:22 +03:00
XhmikosR 5e69eab37a Update anchor.js to v4.3.1. (#33668) 2021-05-21 08:19:22 +03:00
XhmikosR 072a0402d8 docs: update clipboard.js to v2.0.8 (#33583) 2021-05-21 08:19:22 +03:00
Mark Otto 767856c7b8 Backport #33782 to v4 2021-04-30 14:40:27 -07:00
Carson Sievert 4b5eb3ca51 Backport #33634 (#33649)
Dropdown: support `.dropdown-item` wrapped in `<li>` tags
2021-04-28 07:02:22 +03:00
Patrick H. Lauke d967553913 Remove aria-haspopup from dropdowns (#33624)
`aria-haspopup="true"` is really intended to signal that an ARIA `menu` will be opened on activation. as a result, some assistive technologies will announce controls with `aria-haspopup="true"` as a menu or menu item (e.g. JAWS and NVDA).
In addition, `aria-haspopup` seems to trigger a bug in Edge/Narrator where the `aria-expanded` state is not correctly announced at the moment when `aria-haspopup` is present.
This now makes the dropdown button more like a generic disclosure widget control - see also https://www.w3.org/TR/wai-aria-practices-1.2/examples/disclosure/disclosure-navigation.html01
2021-04-15 06:35:54 +03:00
Stefano Bartoletti 016f8fff11 fix typo in docs (#33562) 2021-04-06 17:55:29 +03:00
XhmikosR 67f873f41a Update devDependencies
* @babel/cli                    ^7.13.0  →  ^7.13.14
* @babel/core                   ^7.13.8  →  ^7.13.14
* @babel/preset-env             ^7.13.9  →  ^7.13.12
* @rollup/plugin-commonjs       ^17.1.0  →   ^18.0.0
* @rollup/plugin-node-resolve   ^11.2.0  →   ^11.2.1
* autoprefixer                  ^10.2.4  →   ^10.2.5
* clean-css-cli                 ^5.2.0  →    ^5.2.2
* eslint                        ^7.21.0  →   ^7.23.0
* eslint-plugin-unicorn         ^28.0.2  →   ^29.0.0
* globby                        ^11.0.2  →   ^11.0.3
* hugo-bin                      ^0.69.0  →   ^0.70.0
* karma                         ^6.1.1  →    ^6.3.2
* postcss                       ^8.2.6  →    ^8.2.9
* qunit                         ^2.14.0  →   ^2.14.1
* rollup                        ^2.40.0  →   ^2.44.0
* stylelint                     ^13.11.0  →  ^13.12.0

Also lock jQuery to v3.5.1 since 3.6.0 has a bug that affects at least our tests
2021-04-05 07:44:39 +03:00
XhmikosR a06c2b6706 BrowserStack: test on iPhone 12 (#33398) 2021-04-05 07:44:39 +03:00
XhmikosR b58ea4a42e README.md: use shields.io for the tests badge too (#33401) 2021-04-05 07:44:39 +03:00
XhmikosR 459cc246b9 Improve change-version.js (#33148)
* switch to async/await
* remove shelljs
* switch to globby; supports .gitignore out of the box
* don't write any files to the disk if they are indentical
* add two more cmd switches: --dry and --verbose
* strip leading "v" from version arguments so that we don't end up with duplicate `v`s
2021-04-05 07:44:39 +03:00
XhmikosR 90228a4743 Delete the unused build/ship.sh (#33326) 2021-04-05 07:44:39 +03:00
Mark Otto 51c8b91d91 Manually backport #33386 to v4 to properly document Sass default variables 2021-03-18 18:57:12 -07:00
Patrick H. Lauke e16b06929a Manual backport of #32627 (#33165)
Carousel: use buttons, not links, for prev/next controls
2021-03-11 09:23:46 +02:00
XhmikosR 7365592fbe Update .bundlewatch.config.json 2021-03-10 22:38:38 -08:00
Mark Otto 40da702f80 Adjust feedback icon position and padding for select.form-control 2021-03-10 22:38:38 -08:00
XhmikosR a59d436518 Update devDependencies
* @babel/cli             ^7.12.16  →   ^7.13.0
* @babel/core            ^7.12.16  →   ^7.13.8
* @babel/preset-env      ^7.12.16  →   ^7.13.9
* eslint                  ^7.20.0  →   ^7.21.0
* eslint-config-xo        ^0.34.0  →   ^0.35.0
* eslint-plugin-unicorn   ^28.0.1  →   ^28.0.2
* hugo-bin                ^0.68.0  →   ^0.69.0
* linkinator              ^2.13.4  →   ^2.13.6
* lockfile-lint            ^4.3.7  →    ^4.6.2
* rollup                  ^2.39.0  →   ^2.40.0
* stylelint              ^13.10.0  →  ^13.11.0
2021-03-02 17:53:37 +02:00
XhmikosR cce467616f CodeQL: skip dependabot PRs too (#33130) 2021-03-02 17:53:37 +02:00
XhmikosR 58192b3cac Bundlewatch: stop ignoring dependabot branches (#33192) 2021-03-02 17:53:37 +02:00
XhmikosR cf70a58149 Rename _gh_pages to _site. (#33129) 2021-03-02 17:53:37 +02:00
XhmikosR 6692d1ed47 linkinator: replace --silent with --verbosity (#33100) 2021-03-02 17:53:37 +02:00
Nikon the Third 7ad0625b8d Adjust SAFE_URL_PATTERN regex for use with test method. (#33153)
The `test` method on regexes does not behave like `match` on strings
for checks if the regex matches when the global modifier (g) is present.

Also adds a unit test on tooltips for sanitizing the same template twice.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-02 17:16:09 +02:00
XhmikosR 8ec32eec44 Update clean-css-cli to v5.2.0 (#33144)
* Update clean-css-cli to v5.2.0

* Enable clean-css's batch flag
2021-02-18 20:59:05 +02:00
XhmikosR c341721439 Partially backport #33045
Simplify karma.conf.js

`customLaunchers` does not seem to be needed.
2021-02-17 06:54:38 +02:00
XhmikosR 23a26e12ff Update devDependencies
* @babel/cli                   ^7.12.13  →  ^7.12.16
* @babel/core                  ^7.12.13  →  ^7.12.16
* @babel/preset-env            ^7.12.13  →  ^7.12.16
* @rollup/plugin-babel           ^5.2.3  →    ^5.3.0
* @rollup/plugin-node-resolve   ^11.1.1  →   ^11.2.0
* eslint                        ^7.19.0  →   ^7.20.0
* eslint-plugin-unicorn         ^27.0.0  →   ^28.0.1
* karma                          ^6.0.4  →    ^6.1.1
* postcss                        ^8.2.5  →    ^8.2.6
* rollup                        ^2.38.5  →   ^2.39.0
* stylelint                     ^13.9.0  →  ^13.10.0

Kept clean-css-cli to 4.x for the time being.
2021-02-17 06:54:38 +02:00
XhmikosR bb5b5891da Backport #32940
* Update the default value for $enable-deprecation-messages

As seen in the https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss,
the `$enable-deprecation-messages` variable is set to `true` by default.
2021-02-17 06:54:38 +02:00
Patrick H. Lauke 210cb72872 Add a callout for the sanitizer in popovers and tooltips (#32272)
* Add a callout for the sanitizer in popovers and tooltips

* Add second reference to sanitizer in the options

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-17 06:54:38 +02:00
XhmikosR 6487ba72f5 vnu-jar.js: quote vnu path (#33016)
Should work now with folders with spaces
2021-02-17 06:54:38 +02:00
XhmikosR 9c264dbea5 CI: remove the cache fallback and shorten cache key (#33012) 2021-02-17 06:54:38 +02:00
XhmikosR 254de4cb42 CI: switch to the coverallsapp/github-action tag (#32919)
Unfortunately, they don't offer a `v1` tag
2021-02-17 06:54:38 +02:00
XhmikosR a824d09ecd change-version: remove vendor, add resources (#32917) 2021-02-17 06:54:38 +02:00
Wesley Haines 9722106781 Fix minor visual bug in FF caused by moz-focusring (v4) (#32821)
Avoid bug in Firefox where text appears "noisy" due to text-shadow applying to focused form fields.
2021-02-17 06:00:37 +02:00
Gaël Poupard 030af97fad fix(forms): input-group and validation icons (#32968)
Fixes #30131

Issue mentions `form-control` but it impacts `.custom-select` — but not `textarea` since it has a qualifying type selector that increases its specificty.

So another way could be to set `select.custom-select` and `input.form-control`. Would there be any other tag concerned by those classes?

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-15 21:13:43 +02:00
XhmikosR 29674b8426 Simplify bugify.html (#33063)
* use `in` instead of `strings.Contains` since the latter is not documented
* use `cond`
2021-02-15 21:08:44 +02:00
XhmikosR ce8af15ad1 Update devDependencies (#32967)
* @babel/cli                  ^7.12.10  →  ^7.12.13
* @babel/core                 ^7.12.10  →  ^7.12.13
* @babel/preset-env           ^7.12.11  →  ^7.12.13
* @rollup/plugin-babel          ^5.2.2  →    ^5.2.3
* @rollup/plugin-commonjs      ^17.0.0  →   ^17.1.0
* @rollup/plugin-node-resolve  ^11.1.0  →   ^11.1.1
* autoprefixer                 ^10.2.3  →   ^10.2.4
* eslint                       ^7.18.0  →   ^7.19.0
* karma                         ^5.2.3  →    ^6.0.4
* karma-qunit                   ^4.1.1  →    ^4.1.2
* linkinator                    2.11.2  →   ^2.13.4
* postcss                       ^8.2.4  →    ^8.2.5
* rollup                       ^2.38.0  →   ^2.38.5
* vnu-jar                      20.6.30  →    21.2.5
2021-02-09 07:50:00 +02:00
pricop 72a9fb4624 _variables.scss: add missing newline before new section (#32868) 2021-02-08 17:19:46 +02:00
XhmikosR 2267193d8f Switch to jsDelivr for jQuery too. (#32918) 2021-01-28 23:26:39 +02:00
XhmikosR 17d8fba548 Update devDependencies (#32852)
Pin karma and linkinator due to failures
2021-01-27 18:37:18 +02:00
XhmikosR 6ffb0b48e4 Release v4.6.0. (#32726)
* Bump version to v4.6.0.

* Dist
2021-01-19 18:16:38 +02:00
XhmikosR 9d87bd7a30 Backport #32037 (#32833)
* Backport #32037

Add `.navbar-nav-scroll` for vertical scrolling of navbar content

* drop the css var for a Sass css

Co-authored-by: Mark Otto <markdotto@gmail.com>
2021-01-19 08:18:19 +02:00
Mark Otto 9c4abcc6a1 Backport #32759 (#32832)
Mention CSP and embedded SVGs in v4 docs
2021-01-19 07:22:27 +02:00
XhmikosR d2477abecd Backport #32760 (#32827)
Add a live toast example to the docs
2021-01-18 20:59:59 +02:00
voltaek ee282aff27 Docs: Sass implementation and rounding precision (#32791)
* Backport of changes to v5 docs that updated and clarified information about the Sass compiler used and the minimum rounding precision we recommend with it.

Co-authored-by: Mark Otto <otto@github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-17 20:59:11 +02:00
Mark Otto 87e42ce7c5 Lighten disabled dropdown text to $gray-500
Fixes #32474
2021-01-15 09:22:27 +02:00
XhmikosR 5a17956e5e Backport #32469 and #32799
Improve zip-examples.js by only including the assets we need
2021-01-15 09:22:27 +02:00
Mark Otto 05a108b3d5 Document some basic code conventions for us (#32778)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-15 09:22:27 +02:00
XhmikosR ec1d745c10 CI: change Node.js to 14 (#32796)
This is so that it's consistent with the JS workflow thus the cache should match.
2021-01-15 09:22:27 +02:00
Mark Otto d674c33a04 Backport #32795 (#32809)
* Clarify Sass import and customize docs for how to modify variable defaults

* Add an npm starter project callout to a few pages
2021-01-15 09:16:32 +02:00
Patrick H. Lauke 80aefd862c Remove role="button" from CTA links in carousel example (#32789)
They're links, acting as links. Just because they're styled as buttons visually (as is often the case for "Call to action" (CTA) links) doesn't mean they need/get `role="button"`
2021-01-14 12:19:19 +02:00
XhmikosR 2ed7504783 Update devDependencies 2021-01-13 11:03:32 +02:00
XhmikosR aeccf0e270 Stylelint: disallow some property values (#32756)
* `border: none`
* `outline: none`
2021-01-13 11:03:32 +02:00
Mark Otto 17521ed43a Mention stretched-link constraints with table elements (#32761)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-13 11:03:32 +02:00
XhmikosR da458176f3 GitHub Actions cleanup (#32755)
* lowercase `runner.os`
* remove `CI` environment variable since it's already set by the runner
2021-01-13 11:03:32 +02:00
Patrick H. Lauke 67c2f2c965 Darken dropdown item hover style
Backport of https://github.com/twbs/bootstrap/pull/32754
2021-01-13 11:03:32 +02:00
Patrick H. Lauke e7cbb59d53 Consistently use outline:0 rather than outline:none
Manual backport of https://github.com/twbs/bootstrap/pull/32751 (which has not been merged yet, but assume it will shortly)
2021-01-13 11:03:32 +02:00
Patrick H. Lauke dfe4810199 Suppress focus outline for buttons when it shouldn't be visible in Chromium
Manual backport of https://github.com/twbs/bootstrap/pull/32689
2021-01-13 11:03:32 +02:00
Patrick H. Lauke 4e6c981f4e Remove old/unnecessary reboot bug fix
Manual backport of https://github.com/twbs/bootstrap/pull/32631
2021-01-13 11:03:32 +02:00
XhmikosR 2e8f70f5a1 Backport #32737
package.json: move `version_short` variable under the `config` object

This is so that it works on npm 7.x too.
2021-01-13 11:03:32 +02:00
XhmikosR 0f1069a32e Update karma config
* rename constants
* enforce the constants to be Boolean
* use the coverage plugin only one time, on the latest jQuery run
* fix karma `logLevel`
2021-01-13 10:49:09 +02:00
XhmikosR f8da510367 karma: run tests in parallel 2021-01-13 10:49:09 +02:00
XhmikosR 37186db5fc docs: add v5.0 in versions (#32728) 2021-01-08 21:03:22 +02:00
XhmikosR 6b788acf63 Update devDependencies
* @babel/cli                   ^7.12.8  →  ^7.12.10
* @babel/core                  ^7.12.8  →  ^7.12.10
* @babel/preset-env            ^7.12.7  →  ^7.12.11
* @rollup/plugin-babel          ^5.2.1  →    ^5.2.2
* @rollup/plugin-commonjs      ^16.0.0  →   ^17.0.0
* @rollup/plugin-node-resolve  ^10.0.0  →   ^11.0.1
* autoprefixer                 ^10.0.2  →   ^10.2.1
* cross-env                     ^7.0.2  →    ^7.0.3
* eslint                       ^7.14.0  →   ^7.17.0
* eslint-config-xo             ^0.33.1  →   ^0.34.0
* eslint-plugin-unicorn        ^23.0.0  →   ^25.0.1
* find-unused-sass-variables    ^3.0.0  →    ^3.1.0
* hugo-bin                     ^0.66.2  →   ^0.68.0
* linkinator                    ^2.2.2  →   ^2.11.2
* nodemon                       ^2.0.6  →    ^2.0.7
* postcss                      ^8.1.10  →    ^8.2.3
* postcss-cli                   ^8.3.0  →    ^8.3.1
* qunit                        ^2.12.0  →   ^2.13.0
* rollup                       ^2.33.3  →   ^2.36.1
2021-01-08 12:04:37 +02:00
XhmikosR cafcca31ac Backport #32423
Add two new variables for pagination border-radius values
2021-01-08 12:04:37 +02:00
XhmikosR b633c2befe Backport #32632
Docs: Tweak the wording for collapse to indicate button is preferred/more semantic
2021-01-08 12:04:37 +02:00
XhmikosR 4540436f3d Backport #32685
Clarify the `$enable-shadows` option in our docs
2021-01-08 12:04:37 +02:00
XhmikosR 3768b6e5b6 Backport #32713
Bump copyright year to 2021
2021-01-08 12:04:37 +02:00
Patrick H. Lauke 264a412589 Remove incorrect mention of dropdowns for dynamic tab behavior (#32634)
While technically it still works, we're already saying authors shouldn't do it later on, and we removed any examples of this. This was a straggler.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-08 12:04:37 +02:00
XhmikosR 1141a51789 CI: update to actions/setup-node@v2 (#32635) 2021-01-08 12:04:37 +02:00
XhmikosR ccee913e59 Tooltips: add missing space (#32529) 2021-01-08 12:04:37 +02:00
XhmikosR 378f3939c8 Backport #32489
Fix popover docs example
2021-01-08 12:04:37 +02:00
XhmikosR bb99676a8a BrowserStack: test on macOS Catalina instead of High Sierra (#32486) 2021-01-08 12:04:37 +02:00
Patrick H. Lauke 9fbf50c3ce Docs: style clipboard button on :focus, not just :hover (#32461)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-08 12:04:37 +02:00
XhmikosR 984aacc32f Update CodeQL Action (#32452) 2021-01-08 12:04:37 +02:00
XhmikosR b0e7e02ab6 CI: add a 30-min timeout for BrowserStack (#32238) 2021-01-08 12:04:37 +02:00
XhmikosR fcfd2ce4b2 CONTRIBUTING: mention dist files (#32314)
* CONTRIBUTING: mention dist files

* Update CONTRIBUTING.md

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2021-01-08 12:04:37 +02:00
Christian Oliff fca04236ad Remove duplicated 'follow Bootstrap on Twitter' link in Community section (#32399)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-08 12:04:37 +02:00
XhmikosR 810de41bc3 build-plugins: switch to "bundled" for babel helpers (#32312) 2021-01-08 12:04:37 +02:00
XhmikosR 307c08af42 README: fix path to search.js (#32257) 2021-01-08 12:04:37 +02:00
XhmikosR 4620b9838b karma: add v4 in Browserstack build ID (#32502) 2021-01-08 10:05:56 +02:00
Aleksandr Gorbatov d1e0610a45 docs: Add Russian translation (#32253) 2021-01-08 09:53:22 +02:00
Patrick H. Lauke f1b2ed93df v4: Add an actual data-touch="false" example in the carousel docs (#32639)
* v4: Add an actual `data-touch="false"` example in the carousel docs

Backport of https://github.com/twbs/bootstrap/pull/32638

* Remove data-ride from example carousel

* Correct attribute table explanation and remove slide class from example

i believe the correct option is `slide` here, not `ride`.
the `if "carousel"` bit was rather unclear/confusing

* Edits...

sorry, trying to make sense of our quirky carousel stuff, it seems some illogical things have been there ever since

* Add data-interval to suppress autoplay

* Tweak carousel options formatting

* Update site/content/docs/4.5/components/carousel.md

Co-authored-by: Mark Otto <markd.otto@gmail.com>

* Tweak language

mostly based on @mdo's suggestion, but also adds the word "attribute" after `data-ride` for better flow/legibility

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2021-01-05 23:42:55 +00:00
Patrick H. Lauke 4fc35bdc3c v4 backport: Replace Lorem Ipsum placeholder text with more representative (or at least english language) text (#32462)
Backport and expansion (for v4) of #32246 and #32479
2020-12-15 11:06:00 +02:00
Patrick H. Lauke 5db105e587 Add mention of the bs-custom-file-input plugin needed for the custom file input (#32457) 2020-12-15 09:22:34 +02:00
Kyle Tsang 1897b4cd89 v4: Move negative margin-bottom from .nav-item to .nav-link (#32211)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-12-10 11:02:28 +02:00
Mark Otto 17bb67dd5b Add hex values to colors (#32411) 2020-12-10 11:01:13 +02:00
XhmikosR fbfaba5bb8 Revert colors.yml accidental changes (#32206)
* Revert colors.yml accidental changes

* Bring colors data files up to par with the vars
2020-12-10 00:42:38 +02:00
Gaël Poupard 53542dc027 Remove useless .text-left in Layout / Overview (#32363) 2020-12-08 08:59:13 +02:00
Rohit Sharma 8e59752ee1 Partially backport #32217 (#32225)
Remove unnecessary `_getCustomClass` method.

`customClass` will be in the configuration already, even if it is provided in the data attributes, and jQuery's [`addClass()`](https://api.jquery.com/addclass/) method will handle it, either `this.config.customClass` is a function or a class name (even if it is a blank string).

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-25 09:35:36 +02:00
Rohit Sharma 22168e9b15 Fix typos (#32247) 2020-11-24 15:58:47 +02:00
XhmikosR 6f58383f5a Update codeql.yml (#32125)
Specify the branches and clean up the comments
2020-11-24 08:40:11 +02:00
XhmikosR 90ad4ffc82 introduction: split comments (#32223) 2020-11-24 08:40:11 +02:00
XhmikosR b45b5e9e65 Update _syntax.scss (#32117)
* Update _syntax.scss with the latest chroma selectors

* Sort selectors

* Remove no longer needed chroma workaround

* remove comments
2020-11-24 08:40:11 +02:00
XhmikosR c9876ed15b CI: specify FORCE_COLOR:2 (#32222)
This should show any colors in the output
2020-11-24 08:40:11 +02:00
XhmikosR b26768ee42 postcss.config.js: remove arrow return (#32235) 2020-11-24 08:40:11 +02:00
XhmikosR 9260427a34 Update devDependencies 2020-11-24 08:40:11 +02:00
XhmikosR 398ddedac7 Manually backport #32226
docs: use `event` instead of `e`
2020-11-24 08:40:11 +02:00
XhmikosR 57e045f0ab Backport #32224
Be consistent with Popper's name.
2020-11-24 08:40:11 +02:00
Noah Rosenzweig 631b5d4df1 Improve build/generate-sri.js regex (#29753)
When using single-quotes in config.yml, the previous
regular expression in build/generate-cli.js wasn't working correctly,
it was replacing ALL string values with hashes.
Now both double- and single-quotes can be used in config.yml,
and the RegExp will work as expected.

Also, allow trailing whitespaces and empty ("") values to be matched.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-24 08:40:11 +02:00
XhmikosR 13486b8e27 examples: add the version number in title (#32198) 2020-11-24 08:40:11 +02:00
XhmikosR aed84c9430 Backport #32189
docs(dropdowns): clarify where is `.show` applied
2020-11-24 08:40:11 +02:00
XhmikosR 7eee78c517 Backport #32178 and #32182
Handle Chromium to run Karma
2020-11-24 08:40:11 +02:00
Rohit Sharma bfb773d64b Backport #32179 (#32220)
Don't hide modal when `config.keyboard` is false
2020-11-21 22:14:28 +02:00
James Remeika 2d8c02eb10 tooltip/popover: add a customClass option (#31834)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-20 11:56:16 +02:00
XhmikosR ffa88deb85 docs: update selector CodePen example (#32202)
Moving it to the CodePen org so that we can all edit it.
2020-11-20 11:36:35 +02:00
XhmikosR 6bc18dc113 scss: remove needless Stylelint disables (#32212) 2020-11-20 09:54:33 +02:00
XhmikosR e567b9a7ab Backport #32158 (#32203)
Switch to jsDelivr for the remaining docs assets

Also, update feather icons and chart.js
2020-11-19 20:35:28 +02:00
Patrick H. Lauke e5b5881f8c Add overflow suppression to custom file label (#32160)
Avoids unsightly spilling out of long filename text, particularly for multi file inputs

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-19 16:29:57 +02:00
XhmikosR 052f72d360 Use the example shortcode in more places
Now, it's safe to do use it since it covers more cases
2020-11-19 11:22:22 +02:00
XhmikosR 764184fc43 Fix syntax highlighting language 2020-11-19 11:22:22 +02:00
XhmikosR b46f05a948 Switch to Hugo
This commit includes all the needed workarounds and most changes from the main branch for everything to work, like:

* removing empty lines in raw HTML that break output
* read .browserslistrc, CSS variables from disk instead of duplicating it
* using Hugo mounts
* using Hugo for the docs CSS/JS
* move ToC Sass code to a separate file while adapting it for Hugo

Thus, this patch makes our npm scripts faster since lint runs on one step and there's no separate docs assets processing.
2020-11-19 11:22:22 +02:00
XhmikosR ae87f8f7ce homepage: split snippets and show copy buttons (#32196) 2020-11-19 11:13:08 +02:00
XhmikosR 5fd0c239bc alerts.md: use Markdown (#32193) 2020-11-18 21:29:41 +02:00
Mark Otto 4bdaa2604f Mention user-select-all support in docs (#32151) 2020-11-13 20:49:32 +02:00
XhmikosR 5795e421ac Manually backport #32121 (#32141)
Use correct value order

Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-11-13 18:58:51 +02:00
Patrick H. Lauke d3cb97ad71 Avoid invisible real file input "spilling" out of container (#32145)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-13 18:52:42 +02:00
XhmikosR c41897ca98 Fix caniuse.com redirects (#32147) 2020-11-13 17:45:11 +02:00
XhmikosR 6ddedbff77 Update devDependencies and gems 2020-11-13 12:50:13 +02:00
XhmikosR 4bbc32dda7 download.md: link to JS files comparison too (#32087) 2020-11-13 12:50:13 +02:00
XhmikosR fb12b0bd6a search.js: check for search-input element early (#32100) 2020-11-13 12:50:13 +02:00
XhmikosR 45bf55e4ba package.json: fix clean-css level switch (#32097) 2020-11-13 12:50:13 +02:00
XhmikosR e2e6e867f8 browsers-devices.md: make heading an h3 (#32136) 2020-11-13 12:44:27 +02:00
XhmikosR 49d5756f01 navbar.md: remove loading=lazy from snippets (#32138) 2020-11-12 20:40:15 +02:00
XhmikosR 03ec5342e0 input-group.md: fix wrong class .visually-hidden (#32137) 2020-11-12 20:39:19 +02:00
Mitchell Bryson 896e444895 Check for data-interval on the first slide of carousel - v4 (#31820)
When starting a cycle for a carousel, it only checks for a default interval, and not an interval defined on the slide element via data props. This adds a check in before creating the interval to move to the next slide.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-12 09:34:17 +02:00
Mark Otto 9e9e1e61d5 Clarify JS bundle docs once more for v4 (#32106)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-10 09:36:04 +02:00
Patrick H. Lauke dec3d86514 Changes to navbar documentation/explanation (#32094) 2020-11-09 18:10:04 +00:00
XhmikosR 43f7befe36 docs: mention "Liberation Sans" (#32083) 2020-11-08 20:30:07 +02:00
Patrick H. Lauke 44d54eb578 Make docs anchorjs links darker on keyboard focus (#32050)
* Make docs anchorjs links darker on keyboard focus

Not just on mouse hover

* Update site/assets/scss/_anchor.scss

Co-authored-by: Mark Otto <markd.otto@gmail.com>

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2020-11-05 11:22:05 +02:00
XhmikosR f1acc7f1d8 Update devDependencies 2020-11-05 11:22:05 +02:00
XhmikosR b3aa3958da Backport #32045
tests: fix sanitizer test.

The test template does not include a `script` tag so the test always returned true.
2020-11-05 11:22:05 +02:00
XhmikosR 3063d74b86 ESLint: enable new-cap rule but ignore properties (#32036) 2020-11-05 11:22:05 +02:00
XhmikosR ecf7db731f CODE_OF_CONDUCT.md: fix redirect (#32033) 2020-11-05 11:22:05 +02:00
XhmikosR 39e9cced88 Clarify PRs section (#32027) 2020-11-05 11:22:05 +02:00
XhmikosR 30641eb346 Lint: stop ignoring package.js (#32021) 2020-11-05 11:22:05 +02:00
Patrick H. Lauke bbfd22f924 Backport #32040 (#32054)
Add callouts about using light colors ideally on a dark background
2020-11-03 09:44:42 +02:00
XhmikosR 5664e728b4 Move js/src/index.js one folder up (#32001) 2020-11-01 07:31:17 +02:00
XhmikosR 465135a0f8 Backport #32015
Fix redirects
2020-10-30 16:34:06 +02:00
XhmikosR f808026e5b Backport #31861
* Split up dropdown sizing docs to improve rendering

- Drop the included .btn-toolbar, no need
- Split large and small button examples
2020-10-30 16:34:06 +02:00
XhmikosR 76d4f728a0 Update devDependencies
* autoprefixer                ^9.8.6  →  ^10.0.1
* find-unused-sass-variables  ^2.0.0  →   ^3.0.0
* linkinator                  ^2.2.0  →   ^2.2.2
* postcss-cli                 ^7.1.2  →   ^8.2.0
2020-10-30 16:34:06 +02:00
Christian Oliff 1266103171 Update Edge's Rendering Engine on CONTRIBUTING.md (#32008)
* Update Edge's Rendering Engine on CONTRIBUTING.md

Also updated the URL to prevent a HTTP redirect.

* Add 'Go to "Help > Send Feedback" from the browser' note

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-30 16:34:06 +02:00
XhmikosR 3f0b15cca6 CI: switch to Node.js 14. (#32003) 2020-10-30 16:34:06 +02:00
XhmikosR 76958761f2 CI: Skip dependabot PR branches. (#32006)
Also, reword Node.js setup step
2020-10-30 16:34:06 +02:00
Martijn Cuppens 9a094d44ef Remove bugreport.apple.com since it doesn't work (#32005) 2020-10-30 16:34:06 +02:00
Adam Jones 71e5b7ca2b Fix form validation tooltip alignment (#31557)
* Fix form validation tooltip alignment

* Remove CSS hacks

* Update _forms.scss

Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-30 16:15:31 +02:00
XhmikosR 23cf931c7f list-group.md: fix snippet (#31981) 2020-10-27 12:11:01 +02:00
XhmikosR 09df15cc3c CI: allow skipping BrowserStack (#31878)
This basically brings back the previous behavior we had on Travis CI, where if the commit message included `[ci skip]`, BrowserStack tests didn't run.

Additionally, this allows skipping BrowserStack if the commit message contains `[skip ci]` too.
2020-10-27 12:11:01 +02:00
XhmikosR 1a90b8a418 Update devDependencies and gems 2020-10-27 12:11:01 +02:00
XhmikosR 35de511cb3 Update CodeQL action (#31930)
Should run on PRs too.
2020-10-27 12:11:01 +02:00
Patrick H. Lauke d8c189df59 Explicitly mention emoji fonts, tweak sentence in typography (#31960) 2020-10-27 12:11:01 +02:00
Patrick H. Lauke 5f1bc4a756 Remove redundant visually hidden "(current)" from pagination controls (#31892)
* Replace visually hidden span with aria-current in tests

* Remove redundant visually hidden "(current)" when `aria-current` already used

Closes #31891
2020-10-27 12:11:01 +02:00
Martijn Cuppens a7d5923470 Suppress flexbox side effects in breadcrumb (#31700)
* Suppress flexbox side effects

* Trailing whitesapce

Co-authored-by: Mark Otto <markd.otto@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-27 12:11:01 +02:00
XhmikosR 084795db82 Update anchor-js to v4.3.0. (#31951) 2020-10-27 12:11:01 +02:00
XhmikosR c0401ebfa0 Jekyll: switch to Liquid's strict mode.
This should make the build error out if there are any issues instead of emitting a warning, which we won't notice.
2020-10-27 12:11:01 +02:00
Gaël Poupard d29b05c775 Handle the Ubuntu sans-serif case (#31657)
On Ubuntu, our native font-stack doesn't output the same font on Firefox and Chrome. This is [a known aliasing issue](http://fontfamily.io/sans-serif) — check at the bottom, Ubuntu 14.04. Ubuntu 18.04 (my current) doesn't use the same (Firefox uses Liberation Sans, Chrome uses the default system font Ubuntu).

I'm inclined to prefer Liberation Sans since it's closer to Arial / Helvetica. This patch already exists in Boosted, didn't notice it was missing in bootstrap until today…

BTW, our linked Smashing Magazine's system fonts post mentions this and is even more accurate since it targets the three major Linux distributions. AFAIK this is not needed since [Liberation Sans is available everywhere](http://fontfamily.io/Liberation_Sans) — but we might go back to `Oxygen, Ubuntu, Cantarell`if we want to stick to system fonts.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-27 12:11:01 +02:00
Gaël Poupard 4b30fe622c Backport #31882
* feature(spinners): slow down spinners when prefers-reduced-motion

* docs(spinners): add reduced motion callout and mention slowing down in accessibility page

* Update spinners.md

* docs(accessibility): rewording

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
2020-10-27 12:11:01 +02:00
XhmikosR efabff3a74 browserconfig.xml: switch to relative image path 2020-10-27 12:11:01 +02:00
XhmikosR 59b65a2cb8 Backport #31893
Update manifest.json

Switch to relative URLs so that we don't need to change the path with every major/minor release
2020-10-27 12:11:01 +02:00
Gaël Poupard 5f3fa833c9 docs(forms): backport #31904
* docs(forms): use a legend for fieldset instead of aria-label

* docs(forms): fix incorrect legend nesting in fieldset
2020-10-27 12:11:01 +02:00
XhmikosR cec8e5ddc3 Remove double spaces from homepage SVGs 2020-10-27 12:11:01 +02:00
Martijn Cuppens 5d310db486 Fix mobile menu jump & double border 2020-10-26 21:47:03 -07:00
Itamar Eduardo Gonçalves de Oliveira 61b5efbaf7 v4 Examples/Floating-labels: fix bad behavior with autofill 2020-10-26 21:19:56 -07:00
Martijn Cuppens a1b2071fe0 Require .has-validation for input groups with validation 2020-10-26 13:43:52 -07:00
Julien Déramond 171da55628 docs(forms): change inline custom radio name (#31936) 2020-10-19 22:13:30 +01:00
Alexandre Rosario b1ae785f40 Fixed: Undefined mixin 'deprecate' when importing 'bootstrap-grid-scss' (#31886)
* Fixed: Undefined mixin 'deprecate' when importing 'bootstrap-grid-scss'

* Updated: Mixin import moved down to feature together with others

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-15 16:32:08 +03:00
XhmikosR f86149807d docs: switch to suggesting jsDelivr as a CDN (#31898) 2020-10-14 20:41:37 +03:00
XhmikosR a716fb03f9 Prepare v4.5.3. (#31880) 2020-10-13 18:38:30 +03:00
XhmikosR d9f4bcf6ff Update devDependencies 2020-10-13 15:24:40 +03:00
XhmikosR c049713382 Remove the unused js/dist/index.js.map 2020-10-13 15:24:40 +03:00
XhmikosR 1b48122641 Update .eslintrc.json
Enforce ES5 for tests
2020-10-13 15:24:40 +03:00
Ankit Mishra 5d066caace Backport #31809 (#31851)
carousel: add missing `to` and `nextwhenvisible` description
2020-10-09 07:51:12 +03:00
Martijn Cuppens 429a84ff33 Backport #31826 (#31846)
Fix for alert-dismissible close button not clickable with stretched-link
2020-10-09 07:44:20 +03:00
Mark Otto 91d0a65243 Update .text-break for wider browser support 2020-10-05 16:12:47 +03:00
Mark Otto c437735b6c Backport versions update from #31754 and reverse order of versions to match v5 2020-10-05 16:12:47 +03:00
Mark Otto ca68277976 Backport color-adjust for v4
Keeps checkboxes, radios, and switches with their intended design when printing.

Backports #29714
2020-10-05 16:12:47 +03:00
Mark Otto a03b2feff2 Backport Reboot's th updates
Manually backports #30781 to v4.
2020-10-05 16:12:47 +03:00
Laussel Loïc 24572b1577 buttons plugin : avoid multiple change event trigger (#31000)
- add unit test to count how many events are thrown when widget contains multiple tags inside label
- add a parameter to toggle, if click event is provided onto an input then don't trigger another change event already thrown by the browser
- simplify the case where toggle interface is called click provide from input itself OR it's a button without label. If label is present, then browser propagate click event from childrens through label and then cause multiple calls to toggle
- the test assumes that `.btn` class is always set onto the label if there's one, otherwise need to update this plugin and look for label around the input

Test with keyboard, mouse and js click call

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-02 17:40:20 +03:00
XhmikosR d9b4426b07 Update .gitignore (#31783)
Add vscode and netlify folders
2020-09-30 08:44:42 +03:00
XhmikosR d9cccf476b Compress the new images 2020-09-30 08:44:42 +03:00
Mark Otto b25e6d5fa9 Add new Bootstrap Icons homepage images 2020-09-30 08:44:42 +03:00
XhmikosR 80fc8d9f76 Stylelint: enable --rd option 2020-09-30 08:44:42 +03:00
XhmikosR e0cd05019e Stylelint: replace deprecated options 2020-09-30 08:44:42 +03:00
XhmikosR 3cd2cd25b7 Update devDependencies and gems 2020-09-30 08:44:42 +03:00
XhmikosR 6c051294aa typography.md: update wording about RFS and Bootstrap version. 2020-09-30 08:44:42 +03:00
XhmikosR ff1d751e36 docs: link to the Asynchronous functions section 2020-09-30 08:44:42 +03:00
Mark Otto d106b01dec Add new variable for -padding-x
(cherry picked from commit fe77208a01)
2020-09-30 08:44:42 +03:00
Mark Otto f927a95b6c Backport #31300 (#31769)
* Manually backport JS bundle guidance

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-09-28 10:57:42 +03:00
Johann-S e45fbe7f72 add suggested fix for gpu acceleration 2020-09-24 15:06:30 +03:00
XhmikosR 16aa05752b Update popovers.md 2020-09-24 15:06:30 +03:00
Mark Otto 34208778ba v4: Mention GPU acceleration fix in docs callout
Closes #22610
2020-09-24 15:06:30 +03:00
XhmikosR 400364c7fd Update devDependencies 2020-09-21 14:58:34 +03:00
XhmikosR 30c3cd45a2 icons.md: add icofont like in v5 2020-09-21 14:58:34 +03:00
XhmikosR 6994dacee4 Backport #31689
docs: fix a few redirects

* Fix GitHub's permanent redirects

* Fix a11yproject redirects
2020-09-21 14:58:34 +03:00
XhmikosR dfefd48c34 Backport #31516
Add new icons set - CoreUI Icons
2020-09-21 14:58:34 +03:00
XhmikosR 31eb108811 Add parentheses around multiple spread conditions 2020-09-21 14:58:34 +03:00
XhmikosR b31046aab3 Cache a few variables. 2020-09-21 14:58:34 +03:00
XhmikosR c86b74fe88 Unbreak lines and remove a TODO comment 2020-09-21 14:58:34 +03:00
XhmikosR be18957933 Backport 65d130fbd8
Mention the quotes requirement in the docs too
2020-09-21 14:58:34 +03:00
Mark Otto 8acd7c9fbe Add a comment for escape-svg function
Closes #30835 by leaving a comment in the source that the escape-svg() function must have quotes around data URIs.

(cherry picked from commit 849fea5a1e)
2020-09-21 14:58:34 +03:00
Joakim Riedel b0a0c56788 ensure hidePrevented.bs.modal can be prevented (#31696) 2020-09-21 14:41:40 +03:00
Mr. Will ab0aec397e Add new Chinese Simplified translation (#31540) 2020-09-20 14:24:13 +03:00
Patrick H. Lauke 63b8a6ffdd Docs: Add top/bottom margin to highlighted code samples (#31706)
Backport of #31036 to v4
2020-09-19 18:59:56 +03:00
Mark Otto 7539cfb29c Update _custom-forms.scss (#31693)
Typo in box-shadow attribute, global variable used instead of local.

Co-authored-by: Arthur Shlain <artur.slain@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-09-18 11:21:30 +03:00
XhmikosR dc2f1e68cd Dropdown: fix variable always evaluating to true (#31673) 2020-09-18 10:22:24 +03:00
XhmikosR 1bd1d78a78 Update devDependencies and gems (#31624)
* Update devDependencies and gems

* Bump bundlewatch limits
2020-09-15 08:31:57 +03:00
XhmikosR 3be585990c Comply to the new rules 2020-09-10 12:06:30 +03:00
XhmikosR 1c37a2ba77 Switch to xo and remove babel-eslint 2020-09-10 12:06:30 +03:00
Gaël Poupard 39282bcc9d docs(build tools): mention how to get the sources (#31589) 2020-09-04 20:17:37 +03:00
XhmikosR 5f2480a90a Prepare v4.5.2. (#31444) 2020-08-06 19:22:43 +03:00
Martijn Cuppens c0aa405632 Remove undefined $ignore-warning 2020-08-06 19:08:24 +03:00
XhmikosR e6ab4ad86a Deprecate the make-container-max-widths mixin 2020-08-06 19:08:24 +03:00
Mark Otto af4419b723 Restore make-container-max-widths mixin 2020-08-06 19:08:24 +03:00
XhmikosR f083759d03 Remove flex: 1 0 100% from rows (#31439) (#31445)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>

Co-authored-by: Mark Otto <markd.otto@gmail.com>
2020-08-06 18:59:17 +03:00
XhmikosR 89dc9750ec Prepare v4.5.1. (#31408) 2020-08-04 19:24:33 +03:00
XhmikosR e0f89dc90b Backport #31339 (#31414)
* Backport #31339

Add view on GitHub links for easier content editing from the docs
2020-08-04 18:54:01 +03:00
XhmikosR 30d375b33f Remove overflow: hidden from toasts (#31381) (#31407)
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2020-08-03 19:13:32 +03:00
XhmikosR 6879a3c51d Update devDependencies and gems
* @babel/cli                   ^7.10.4  →  ^7.11.0
* @babel/core                  ^7.10.4  →  ^7.11.0
* @rollup/plugin-babel          ^5.0.4  →   ^5.1.0
* @rollup/plugin-commonjs      ^13.0.0  →  ^14.0.0
* @rollup/plugin-node-resolve   ^8.1.0  →   ^8.4.0
* autoprefixer                  ^9.8.4  →   ^9.8.6
* eslint                        ^7.4.0  →   ^7.6.0
* karma                         ^5.1.0  →   ^5.1.1
* rollup                       ^2.21.0  →  ^2.23.0
2020-08-03 19:06:36 +03:00
XhmikosR d44a1e105e Backport #31344
Add toasts to the components requiring JavaScript
2020-08-03 19:06:36 +03:00
Gaël Poupard 81d3e2b917 docs(skippy): prevent skip links from overlapping header 2020-08-03 19:06:36 +03:00
Rohit Sharma 1abe9264aa Add unit test for toast to check clearTimeout to have been called (#31298) 2020-08-03 19:06:36 +03:00
Rohit Sharma f530ab7549 Clear timeout before showing the toast (#31155)
* clear timeout before showing the toast

* Add unit test

* Remove the check for timeout

* Check for clearTimeout to have been called

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
# Conflicts:
#	js/tests/unit/toast.spec.js
2020-08-03 19:06:36 +03:00
XhmikosR 0ec2ce44b4 Update to Ruby 2.7/Bundler 2.x. (#31296) 2020-08-02 16:26:19 +03:00
Patrick H. Lauke cc49a5b506 Turn off scroll anchoring for accordions (#31347)
New default behavior for scroll anchoring (rolled out in Chrome 84?) leads to unsightly/odd accordion interactions - see #31341
This rule suppresses this new behavior and reverts back to the old way.

See https://drafts.csswg.org/css-scroll-anchoring/
2020-07-21 21:44:41 +01:00
Patrick H. Lauke 99013a5c54 Docs: forms accessibility cleanup (backport from v5) (#31234)
* Expand advice for anchor-based controls

* Expand accessibility note in input group

* Correct statement about validation, fix server example

* Tweak label > accessible name

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2020-07-12 07:57:48 +03:00
XhmikosR 38bcf108c9 Update dependencies, gems and regenerate package-lock.json (#31261)
* @rollup/plugin-node-resolve 8.1.0
* popper.js 1.16.1
* qunit 2.10.1
* rollup 2.21.0
2020-07-09 15:21:41 +03:00
XhmikosR f40e1b651b Update devDependencies and gems 2020-07-06 16:40:27 +03:00
XhmikosR ad8d3a6c54 Update Babel config (#31011)
* remove plugin-proposal-object-rest-spread
* add bugfixes
* `exclude: ['transform-typeof-symbol']` did nothing with our config
2020-07-06 16:40:27 +03:00
ysds 9a6cfeb36e Backport #30326 (Unit test) 2020-07-06 16:40:27 +03:00
XhmikosR ea01c29294 Backport #30326
Prevent overflowing static backdrop modal animation

TODO: backport the test too
2020-07-06 16:40:27 +03:00
XhmikosR 234dd96abf Backport #31135
* Move color utility callouts to start of page

Hierarchically/structurally, in the position they are currently at, the two callouts seem like they "belong" just to the "background color" section. Moving them to the start makes it clearer that those two callouts relate to everything in the page (both "Color" and "Background color" classes.

* Change heading level

otherwise the assistive technology callout looks like it's hierarchically under the "Dealing with specificity" heading
2020-07-06 16:40:27 +03:00
XhmikosR c49b084158 BrowserStack: test on Edge 15 2020-07-06 16:40:27 +03:00
Mark Otto b2ef98f154 Remove backdrop-filter from toasts 2020-07-06 16:40:27 +03:00
Gaël Poupard 04dbb6c24c Floating labels improvements (#30966)
* docs(example): floating-labels' better Edge fallback

* docs(example): refactor floating-labels' CSS
2020-06-24 15:16:58 +03:00
XhmikosR 5a9fc2938c Update devDependencies and gems 2020-06-24 15:16:58 +03:00
Patrick H. Lauke c995886c0f Docs: add Gaël Poupard to the core team page (#31081)
Docs: add Gaël Poupard to the core team page
2020-06-24 15:16:58 +03:00
XhmikosR 9b241e630c Backport #31070
* Make example less broken-looking

don't want to give impression that now it's ok to just sprinkle `role="button"` around. this at least makes the `span` keyboard-focusable, similar to at least the start of a custom control
2020-06-24 15:16:58 +03:00
XhmikosR 920dc619a4 README.md: update badges
* remove .svg from shields.io badges since it's the default
* switch to shields.io for the OC badges too
* fix badgesize badges' labels
2020-06-24 15:16:58 +03:00
XhmikosR f6b74b8b41 Fix typo 2020-06-24 15:16:58 +03:00
XhmikosR 2e991732de Update issue templates from main. 2020-06-24 15:16:58 +03:00
XhmikosR 2314247825 Remove unused issue templates 2020-06-24 15:16:58 +03:00
XhmikosR 3349eb6a41 Update links to point to v4-dev or main branches 2020-06-24 15:16:58 +03:00
XhmikosR 6c04d186e2 Split GitHub Actions. 2020-06-24 15:16:58 +03:00
XhmikosR 7de8582657 Stylelint: remove redundant inline suppressions 2020-06-24 15:16:58 +03:00
XhmikosR 242f75cd1f Update .gitattributes (#30934)
This requires git >= 2.10 but it was released almost 4 years ago.
2020-06-24 15:16:58 +03:00
XhmikosR 78a51cb12f Backport #30973
Remove the class `.nav-item` from `.nav-link` inside the non `ul` or `ol` based navs.
This makes the consistency for `.nav-item` (This class will not be required on the `.nav-link`).
`.nav-item` was only required when you use `.nav-fill` or `.nav-justified` on the `.nav`. In other cases, it was redundant. And the purpose of `.nav-item` on `.nav-link`s can be achieved via flexbox utilities as well (Mentioned in the docs also).
2020-06-24 15:16:58 +03:00
Gaël Poupard 89be07b51f Prevent .row from shrinking in flex container (#30940) 2020-06-24 15:16:58 +03:00
Martijn Cuppens 4f44a2afd0 Remove duplicate properties after #30922 (#31148) 2020-06-23 09:28:13 +03:00
Gaël Poupard 7b5e48d307 fix(custom forms): disabled checked states weren't overriding background-image (#30922) 2020-06-15 08:41:12 +03:00
k-utsumi c3572ceca9 Avoid duplication of container breakpoints (#30969) 2020-06-14 00:25:39 +03:00
Gaël Poupard 7c6a0db820 Floating labels examples in IE (#30965)
* docs(example): drop IE workaround since it works fine in IE

* Serial comma

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2020-06-13 09:38:13 +03:00
Gaël Poupard 5b8163301c Backport #30979 (#30999)
fix(grid)[manual backport]: zero min-width on .col has too much side-effects
2020-06-10 16:12:12 +03:00
Laussel Loïc e9f039d1fe avoid preventing input event onclick (#30992)
* instead of stopping event if onclick is triggered on input, call toggle method only if its not on checkbox inside a label

* add unit test

* add a dedicated test to ensure click event is forward to label

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-06-10 15:45:31 +03:00
Gaël Poupard ba6d5e802b docs(toasts): centered examples flexbugs #3 in IE11 2020-06-10 08:14:30 +03:00
Gaël Poupard 8429acf460 fix(toasts): IE11 shrinks toasts when in flex container, unless we specify flex-basis 2020-06-10 08:14:30 +03:00
XhmikosR 3caea1ca02 visual/modal.html: fix close buttons placement 2020-06-04 17:53:16 +03:00
XhmikosR 7ac763bcdc Bump bundlewatch limits 2020-06-04 17:53:16 +03:00
XhmikosR 8bc6dcd280 Backport #30936
Add role="dialog" in modals via JavaScript
2020-06-04 17:53:16 +03:00
XhmikosR 288b9b82b5 Backport #30932
Restore word-break: break-word on .text-break to fix text breaking on flex containers
2020-06-04 17:53:16 +03:00
XhmikosR ac3c2e2356 Update devDependencies and gems 2020-06-04 17:53:16 +03:00
XhmikosR 24d5a1e996 CI: update to actions/cache@2 2020-06-04 17:53:16 +03:00
XhmikosR 35310454b1 Remove ESLint object-curly-newline rule. 2020-06-04 17:53:16 +03:00
XhmikosR 7a9bbd4489 Backport #30742
Update to `@rollup/plugin-babel`
2020-06-04 17:53:16 +03:00
Martijn Cuppens fdb596b2c3 Prevent conflicts with components with classes (#30830) 2020-06-04 17:53:16 +03:00
Mark Otto ce23903a76 v5: Add border-radius to .card-img-overlay (#30817)
Allows use of background-color and more. Fixes #29033 for v5.
2020-06-04 17:53:16 +03:00
Mark Otto ac48bbe081 Simplify list-group borders in cards (#30808) 2020-06-04 17:53:16 +03:00
Mark Otto f4a7888af5 v4: Add z-index to .custom-check to fix custom checks in CSS columns (#30810)
For some reason, custom checks in CSS columns need a new stacking order to maintain visibility. This PR adds `z-index: 1` to trigger that new stacking order. Since v5's forms are being redone entirely, and we're dropping IE10/11 there, I think this is totally fine to ship with v4 only. Will need to check v5's forms it in Edge though.

Fixes #29607.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-06-04 16:11:33 +03:00
Gaël Poupard 4e685e70b7 fix(custom forms): nullify box-shadow for custom forms' states (#30957)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-06-04 09:34:30 +03:00
Gaël Poupard b287736327 fix(forms): IE11 misalign validation tooltips in input-groups (#30960) 2020-06-04 09:27:08 +03:00
Gaël Poupard 6f4d9fff02 docs(cards): fix card-img-bottom example (#30925) 2020-05-29 18:01:40 +03:00
Gaël Poupard daa01aacb5 docs(CDN): improve wording to match master and fix #30873 (#30896) 2020-05-26 18:48:53 +03:00
Mark Otto 58dd4cc66c v4: Update docs callout for responsive SVG images (#30809)
Turns out this applies to IE11 as well as IE10, so this clarifies the docs callout.

Closes #25242.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-05-14 09:18:01 +03:00
Mark Otto a8eb919f44 v4: Mention Bootstrap Icons in extend/icons.md (#30813)
- Closes #30796
2020-05-14 09:06:08 +03:00
XhmikosR 700c6036aa Fix release script docs (#30797) 2020-05-13 09:13:27 +03:00
505 changed files with 28462 additions and 18892 deletions
+2 -5
View File
@@ -4,14 +4,11 @@ module.exports = {
'@babel/preset-env',
{
loose: true,
modules: false,
exclude: ['transform-typeof-symbol']
bugfixes: true,
modules: false
}
]
],
plugins: [
'@babel/plugin-proposal-object-rest-spread'
],
env: {
test: {
plugins: [ 'istanbul' ]
+7 -7
View File
@@ -18,32 +18,32 @@
},
{
"path": "./dist/css/bootstrap.css",
"maxSize": "25.25 kB"
"maxSize": "26 kB"
},
{
"path": "./dist/css/bootstrap.min.css",
"maxSize": "23.25 kB"
"maxSize": "23.75 kB"
},
{
"path": "./dist/js/bootstrap.bundle.js",
"maxSize": "47.50 kB"
"maxSize": "48 kB"
},
{
"path": "./dist/js/bootstrap.bundle.min.js",
"maxSize": "21.5 kB"
"maxSize": "21.75 kB"
},
{
"path": "./dist/js/bootstrap.js",
"maxSize": "25 kB"
"maxSize": "25.5 kB"
},
{
"path": "./dist/js/bootstrap.min.js",
"maxSize": "14.75 kB"
"maxSize": "15 kB"
}
],
"ci": {
"trackBranches": [
"master",
"main",
"v4-dev"
]
}
+2 -2
View File
@@ -1,6 +1,6 @@
**/*.min.js
**/dist/
**/vendor/
/_gh_pages/
/_site/
/js/coverage/
/package.js
/site/static/sw.js
+68 -224
View File
@@ -1,232 +1,76 @@
{
"root": true,
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended"],
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:unicorn/recommended",
"xo",
"xo/browser"
],
"rules": {
// Possible Errors
"no-await-in-loop": "error",
"no-extra-parens": "error",
"no-prototype-builtins": "error",
"no-template-curly-in-string": "error",
"valid-jsdoc": "error",
// Best Practices
"accessor-pairs": "error",
"array-callback-return": "error",
"block-scoped-var": "error",
"class-methods-use-this": "off",
"complexity": "error",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-caller": "error",
"no-console": "error",
"no-div-regex": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "off",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-magic-numbers": ["error", {
"ignore": [-1, 0, 1],
"ignoreArrayIndexes": true
}
],
"no-multi-spaces": ["error", {
"ignoreEOLComments": true,
"exceptions": {
"AssignmentExpression": true,
"ArrowFunctionExpression": true,
"CallExpression": true,
"VariableDeclarator": true
}
}
],
"no-multi-str": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-proto": "error",
"no-restricted-properties": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-return": "error",
"no-void": "error",
"no-warning-comments": "off",
"no-with": "error",
"prefer-promise-reject-errors": "error",
"radix": "error",
"require-await": "error",
"vars-on-top": "error",
"wrap-iife": "error",
"yoda": "error",
// Strict Mode
"strict": "error",
// Variables
"init-declarations": "off",
"no-catch-shadow": "error",
"no-label-var": "error",
"no-restricted-globals": "error",
"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-undef-init": "error",
"no-use-before-define": "off",
// Node.js and CommonJS
"callback-return": "off",
"global-require": "error",
"handle-callback-err": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",
"no-process-exit": "error",
"no-restricted-modules": "error",
"no-sync": "error",
// Stylistic Issues
"array-bracket-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"camelcase": "error",
"arrow-body-style": "off",
"capitalized-comments": "off",
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"consistent-this": "error",
"eol-last": "error",
"func-call-spacing": "error",
"func-name-matching": "error",
"func-names": "off",
"func-style": ["error", "declaration"],
"id-blacklist": "error",
"id-length": "off",
"id-match": "error",
"indent": ["error", 2, { "SwitchCase": 1 }],
"jsx-quotes": "error",
"key-spacing": "off",
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"line-comment-position": "off",
"lines-around-comment": "off",
"lines-around-directive": "error",
"max-depth": ["error", 10],
"max-len": "off",
"max-lines": "off",
"max-nested-callbacks": "error",
"max-params": "off",
"max-statements": "off",
"max-statements-per-line": "error",
"multiline-ternary": "off",
"new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
"newline-after-var": "off",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
"new-parens": "error",
"no-array-constructor": "error",
"no-bitwise": "error",
"no-continue": "off",
"no-inline-comments": "off",
"no-lonely-if": "error",
"comma-dangle": [
"error",
"never"
],
"indent": [
"error",
2,
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"max-params": [
"warn",
5
],
"new-cap": [
"error",
{
"properties": false
}
],
"no-console": "error",
"no-mixed-operators": "off",
"no-multi-assign": "error",
"no-multiple-empty-lines": "error",
"nonblock-statement-body-position": "error",
"no-negated-condition": "off",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-plusplus": "off",
"no-restricted-syntax": "error",
"no-tabs": "error",
"no-ternary": "off",
"no-trailing-spaces": "error",
"no-underscore-dangle": "off",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": ["error", { "minProperties": 1 }],
"object-curly-spacing": ["error", "always"],
"object-property-newline": "error",
"one-var": ["error", "never"],
"one-var-declaration-per-line": "error",
"operator-assignment": "error",
"operator-linebreak": "error",
"padded-blocks": ["error", "never"],
"padding-line-between-statements": "off",
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single"],
"require-jsdoc": "off",
"semi": ["error", "never"],
"semi-spacing": "error",
"sort-keys": "off",
"sort-vars": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"template-tag-spacing": "error",
"unicode-bom": "error",
"wrap-regex": "off",
// ECMAScript 6
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": "error",
"arrow-spacing": "error",
"generator-star-spacing": "error",
"no-confusing-arrow": "error",
"no-duplicate-imports": "error",
"no-restricted-imports": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "off",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": "error",
"sort-imports": "error",
"symbol-description": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error"
"object-curly-spacing": [
"error",
"always"
],
"operator-linebreak": [
"error",
"after"
],
"semi": [
"error",
"never"
],
"unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/no-unused-properties": "error",
"unicorn/no-useless-undefined": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-array-find": "off",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-dom-node-remove": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-math-trunc": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-optional-catch-binding": "off",
"unicorn/prefer-prototype-methods": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-reflect-apply": "off",
"unicorn/prefer-set-has": "off",
"unicorn/prevent-abbreviations": "off"
}
}
+2 -12
View File
@@ -1,18 +1,8 @@
# Enforce Unix newlines
*.css text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.scss text eol=lf
*.sh text eol=lf
*.svg text eol=lf
*.txt text eol=lf
*.xml text eol=lf
*.yml text eol=lf
* text=auto eol=lf
# Don't diff or textually merge source maps
*.map binary
*.map binary
bootstrap.css linguist-vendored=false
bootstrap.js linguist-vendored=false
+23 -21
View File
@@ -18,9 +18,9 @@ the preferred channel for [bug reports](#bug-reports), [features requests](#feat
and [submitting pull requests](#pull-requests), but please respect the following
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-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
respect the opinions of others.
@@ -65,7 +65,7 @@ Guidelines for bug reports:
reported.
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `master` or development branch in the repository.
latest `master` or `v4-dev` branch in the repository.
3. **Isolate the problem** &mdash; ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/) and a live example.
@@ -102,12 +102,12 @@ Example:
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 |
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| 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 <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. |
| Microsoft | Edge | EdgeHTML | https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ | |
| 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. |
| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit | 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. |
| Microsoft | Edge | Blink | https://developer.microsoft.com/en-us/microsoft-edge/ | Go to "Help > Send Feedback" from the browser |
## Feature requests
@@ -124,23 +124,25 @@ Good pull requests—patches, improvements, new features—are a fantastic
help. They should remain focused in scope and avoid containing unrelated
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),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.
project's developers might not want to merge into the project. For trivial
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
project (indentation, accurate comments, etc.) and any other requirements
(such as test coverage).
**Do not edit `bootstrap.css`, or `bootstrap.js`
directly!** Those files are automatically generated. You should edit the
source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/master/scss)
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/master/js/src) instead.
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit
any dist files (`dist/` or `js/dist`).** Those files are automatically generated by our build tools. You should
edit the source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/v4-dev/scss)
and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/v4-dev/js/src) instead.
Similarly, when contributing to Bootstrap's documentation, you should edit the
documentation source files in
[the `/bootstrap/site/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/site/docs).
[the `/bootstrap/site/content/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/content/docs).
**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.
@@ -162,8 +164,8 @@ included in the project:
2. If you cloned a while ago, get the latest changes from upstream:
```bash
git checkout master
git pull upstream master
git checkout v4-dev
git pull upstream v4-dev
```
3. Create a new topic branch (off the main project development branch) to
@@ -182,7 +184,7 @@ included in the project:
5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash
git pull [--rebase] upstream master
git pull [--rebase] upstream v4-dev
```
6. Push your topic branch up to your fork:
@@ -192,7 +194,7 @@ included in the project:
```
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
with a clear title and description against the `master` branch.
with a clear title and description against the `v4-dev` branch.
**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
@@ -216,7 +218,7 @@ includes code changes) and under the terms of the
[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).
- 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.
- 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.
### JS
-11
View File
@@ -1,11 +0,0 @@
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/)
+8 -5
View File
@@ -1,17 +1,20 @@
---
name: Bug report
about: Tell us about a bug you may have identified in Bootstrap.
title: ''
labels: ''
assignees: ''
---
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)
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.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/)
- Operating system and version (Windows, macOS, Android, iOS)
- Browser and version (Chrome, Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, 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/)
-9
View File
@@ -1,9 +0,0 @@
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
+4 -1
View File
@@ -1,13 +1,16 @@
---
name: Feature request
about: Suggest an idea for a new feature in Bootstrap.
title: ''
labels: feature
assignees: ''
---
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)
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
Feature requests must include:
+1 -1
View File
@@ -7,5 +7,5 @@ See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports.
For general troubleshooting or help getting started:
- 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.libera.chat` server, in the `#bootstrap` channel.
- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.
+37
View File
@@ -0,0 +1,37 @@
name: BrowserStack
on:
push:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
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@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- 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 }}"
+38
View File
@@ -0,0 +1,38 @@
name: Bundlewatch
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
bundlewatch:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- 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: v4-dev
+23 -10
View File
@@ -1,25 +1,38 @@
name: "Code Scanning - Action"
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
- "!dependabot/**"
schedule:
- cron: "0 0 * * 0"
- cron: "0 2 * * 5"
workflow_dispatch:
jobs:
CodeQL-Build:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v1
languages: "javascript"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
+32
View File
@@ -0,0 +1,32 @@
name: CSS
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
css:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Build CSS
run: npm run css
+31
View File
@@ -0,0 +1,31 @@
name: CSS (Dart Sass)
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
css:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
- name: Build CSS with Dart Sass
run: |
npx --package sass@latest sass --version
npx --package sass@latest sass --style expanded --source-map --embed-sources --no-error-css scss/:dist-sass/css/
ls -Al dist-sass/css
+45
View File
@@ -0,0 +1,45 @@
name: Docs
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- run: java -version
- name: Install npm dependencies
run: npm ci
- name: Build docs
run: npm run docs-build
- name: Validate HTML
run: npm run docs-vnu
- name: Run linkinator
uses: JustinBeckwith/linkinator-action@v1
with:
paths: _site
recurse: true
verbosity: error
skip: "^(?!http://localhost)"
+42
View File
@@ -0,0 +1,42 @@
name: JS Tests
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
run:
name: JS Tests
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE }}
cache: npm
- 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@1.1.3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
path-to-lcov: "./js/coverage/lcov.info"
+32
View File
@@ -0,0 +1,32 @@
name: Lint
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Lint
run: npm run lint
-88
View File
@@ -1,88 +0,0 @@
name: Tests
on: [push, pull_request]
env:
CI: true
jobs:
run:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [10, 12]
ruby: [2.6.x]
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Disable gem docs
run: 'echo "gem: --no-document" > ~/.gemrc'
- name: Set up Ruby cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-ruby-v${{ matrix.ruby }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-ruby-v${{ matrix.ruby }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }}
${{ runner.os }}-ruby-v${{ matrix.ruby }}-
- name: Set up npm cache
uses: actions/cache@v1
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: Set up Bundler
run: gem install bundler -v "~> 1.17"
- run: ruby --version
- run: gem --version
- run: bundle --version
- run: java -version
- name: Install npm dependencies
run: npm ci
- name: Install bundler dependencies
run: bundle install --deployment --jobs=4 --retry=3 --clean
- name: Run tests
run: npm test
- name: Run bundlewatch
run: npm run bundlewatch
if: matrix.node == 10
env:
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
CI_BRANCH_BASE: v4-dev
- name: Run BrowserStack tests
run: npm run js-test-cloud
if: matrix.node == 10 && github.repository == 'twbs/bootstrap' && github.event_name == 'push'
env:
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
- name: Run Coveralls
uses: coverallsapp/github-action@master
if: matrix.node == 10
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
path-to-lcov: "./js/coverage/lcov.info"
+6 -10
View File
@@ -1,15 +1,8 @@
# Ignore docs files
/_gh_pages/
/site/.jekyll-cache
/site/.jekyll-metadata
/site/docs/**/dist/
# Hugo folders
/_site/
# Hugo files
/resources/
# Ignore ruby/bundler files
/.bundle/
/vendor/
/.ruby-version
/.hugo_build.lock
# Numerous always-ignore extensions
*.diff
@@ -36,6 +29,9 @@
*.sublime-workspace
nbproject
Thumbs.db
/.vscode/
# Local Netlify folder
.netlify
# Komodo
.komodotools
+2 -1
View File
@@ -1,4 +1,5 @@
**/*.min.css
**/dist/
**/vendor/
/_gh_pages/
/_site/
/js/coverage/
+10 -4
View File
@@ -1,16 +1,22 @@
{
"extends": [
"stylelint-config-twbs-bootstrap/scss"
"stylelint-config-twbs-bootstrap"
],
"rules": {
"property-blacklist": [
"declaration-property-value-disallowed-list": {
"border": "none",
"outline": "none"
},
"function-disallowed-list": [
"calc"
],
"property-disallowed-list": [
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"transition"
],
"function-blacklist": ["calc"]
]
}
}
+1 -4
View File
@@ -40,7 +40,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
## Attribution
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
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/>
-9
View File
@@ -1,9 +0,0 @@
source 'https://rubygems.org'
group :development, :test do
gem 'jekyll', '~> 4.0.1'
gem 'jekyll-redirect-from', '~> 0.16.0'
gem 'jekyll-sitemap', '~> 1.4.0'
gem 'jekyll-toc', '~> 0.14.0'
gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
end
-89
View File
@@ -1,89 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.12.2)
ffi (1.12.2-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jekyll (4.0.1)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (>= 0.9.5, < 2)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-toc (0.14.0)
jekyll (>= 3.8)
nokogiri (~> 1.10)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.2.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.4.0)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
nokogiri (1.10.9-x64-mingw32)
mini_portile2 (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.5)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.18.0)
safe_yaml (1.0.5)
sassc (2.3.0)
ffi (~> 1.9)
sassc (2.3.0-x64-mingw32)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
wdm (0.1.1)
PLATFORMS
ruby
x64-mingw32
DEPENDENCIES
jekyll (~> 4.0.1)
jekyll-redirect-from (~> 0.16.0)
jekyll-sitemap (~> 1.4.0)
jekyll-toc (~> 0.14.0)
wdm (~> 0.1.1)
BUNDLED WITH
1.17.3
+2 -2
View File
@@ -1,7 +1,7 @@
The MIT License (MIT)
Copyright (c) 2011-2020 Twitter, Inc.
Copyright (c) 2011-2020 The Bootstrap Authors
Copyright (c) 2011-2022 Twitter, Inc.
Copyright (c) 2011-2022 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+36 -35
View File
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/docs/4.5/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
<img src="https://getbootstrap.com/docs/4.6/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
</a>
</p>
@@ -9,12 +9,12 @@
<p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br>
<a href="https://getbootstrap.com/docs/4.5/"><strong>Explore Bootstrap docs »</strong></a>
<a href="https://getbootstrap.com/docs/4.6/"><strong>Explore Bootstrap docs »</strong></a>
<br>
<br>
<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=bug_report.md">Report bug</a>
·
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature.md&labels=feature">Request feature</a>
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature_request.md">Request feature</a>
·
<a href="https://themes.getbootstrap.com/">Themes</a>
·
@@ -41,38 +41,38 @@
Several quick start options are available:
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.5.0.zip)
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.6.2.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.5.0`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.5.0`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.6.2`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.6.2`
- 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/4.5/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
Read the [Getting started page](https://getbootstrap.com/docs/4.6/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
## Status
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/)
[![Build Status](https://github.com/twbs/bootstrap/workflows/Tests/badge.svg?branch=v4-dev)](https://github.com/twbs/bootstrap/actions?query=workflow%3ATests+branch%3Av4-dev)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap)
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=peer)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev)
[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/v4-dev.svg)](https://coveralls.io/github/twbs/bootstrap?branch=v4-dev)
[![CSS gzip size](https://img.badgesize.io/twbs/bootstrap/v4-dev/dist/css/bootstrap.min.css?compression=gzip&label=CSS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/css/bootstrap.min.css)
[![JS gzip size](https://img.badgesize.io/twbs/bootstrap/v4-dev/dist/js/bootstrap.min.js?compression=gzip&label=JS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/js/bootstrap.min.js)
[![Build Status](https://img.shields.io/github/workflow/status/twbs/bootstrap/JS%20Tests/v4-dev?label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av4-dev)
[![npm version](https://img.shields.io/npm/v/bootstrap)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap)](https://rubygems.org/gems/bootstrap)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue)](https://atmospherejs.com/twbs/bootstrap)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap)](https://packagist.org/packages/twbs/bootstrap)
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/v4-dev)](https://coveralls.io/github/twbs/bootstrap?branch=v4-dev)
[![CSS gzip size](https://img.badgesize.io/twbs/bootstrap/v4-dev/dist/css/bootstrap.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap.min.css)
[![JS gzip size](https://img.badgesize.io/twbs/bootstrap/v4-dev/dist/js/bootstrap.min.js?compression=gzip&label=JS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/v4-dev/dist/js/bootstrap.min.js)
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
[![Backers on Open Collective](https://opencollective.com/bootstrap/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/bootstrap/sponsors/badge.svg)](#sponsors)
[![Backers on Open Collective](https://img.shields.io/opencollective/backers/bootstrap)](#backers)
[![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap)](#sponsors)
## What's included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
<details><summary>Download contents</summary>
```text
bootstrap/
@@ -100,29 +100,30 @@ bootstrap/
├── bootstrap.min.js
└── bootstrap.min.js.map
```
</details>
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/).
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/).
## Bugs and feature requests
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/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/v4-dev/.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
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) 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/docs/4.5/assets/js/src/search.js` file.
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`.
### Running documentation locally
1. Run through the [tooling setup](https://getbootstrap.com/docs/4.5/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
2. Run `npm install` to install Node.js dependencies.
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder).
2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
3. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes.
4. Open `http://localhost:9001` in your browser, and voilà.
4. Open `http://localhost:9001/` in your browser, and voilà.
Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/).
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
### Documentation for previous releases
@@ -133,11 +134,11 @@ You can find all our previous releases docs on <https://getbootstrap.com/docs/ve
## Contributing
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/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/v4-dev/.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/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).
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/v4-dev/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/master/.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/v4-dev/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
## Community
@@ -147,7 +148,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.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.libera.chat` server, in the `#bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
@@ -206,4 +207,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
## Copyright and license
Code and documentation copyright 2011-2020 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://creativecommons.org/licenses/by/3.0/).
Code and documentation copyright 2011-2022 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/).
-74
View File
@@ -1,74 +0,0 @@
# Dependencies
markdown: kramdown
highlighter: rouge
kramdown:
auto_ids: true
# Permalinks
permalink: pretty
# Server
source: "site"
destination: ./_gh_pages
host: "localhost"
port: 9001
baseurl: ""
url: "https://getbootstrap.com"
encoding: UTF-8
exclude:
- docs/4.5/assets/scss/
plugins:
- jekyll-redirect-from
- jekyll-sitemap
- jekyll-toc
redirect_from:
json: false
# Social
title: Bootstrap
description: "The most popular HTML, CSS, and JS library in the world."
twitter: getbootstrap
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
social_image_path: /docs/4.5/assets/brand/bootstrap-social.png
social_logo_path: /docs/4.5/assets/brand/bootstrap-social-logo.png
# Custom variables
current_version: 4.5.0
current_ruby_version: 4.5.0
docs_version: 4.5
github_org: "https://github.com/twbs"
repo: "https://github.com/twbs/bootstrap"
slack: "https://bootstrap-slack.herokuapp.com"
opencollective: "https://opencollective.com/bootstrap"
blog: "https://blog.getbootstrap.com"
expo: "https://expo.getbootstrap.com"
themes: "https://themes.getbootstrap.com"
icons: "https://icons.getbootstrap.com"
download:
source: "https://github.com/twbs/bootstrap/archive/v4.5.0.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v4.5.0/bootstrap-4.5.0-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v4.5.0/bootstrap-4.5.0-examples.zip"
cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
css_hash: "sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
js: "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
js_hash: "sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-1CmrxMRARb6aLqgBO7yyAxTOQE2AKb9GfXnEo760AUcUmFx3ibVJJAzGytlQcNXd"
jquery: "https://code.jquery.com/jquery-3.5.1.slim.min.js"
jquery_hash: "sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
popper_hash: "sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
toc:
min_level: 2
max_level: 4
no_toc_section_class:
- "bd-callout"
- "bd-example"
+1 -6
View File
@@ -8,12 +8,7 @@
},
"extends": "../.eslintrc.json",
"rules": {
"consistent-return": "off",
"func-style": "off",
"no-console": "off",
"no-magic-numbers": "off",
"no-process-exit": "off",
"no-sync": "off",
"spaced-comment": "off"
"strict": "error"
}
}
-13
View File
@@ -1,13 +0,0 @@
'use strict'
// These are the babel helpers we whitelist
const helpers = [
'createClass',
'createSuper',
'defineProperties',
'defineProperty',
'inheritsLoose',
'objectSpread2'
]
module.exports = helpers
+1 -1
View File
@@ -7,7 +7,7 @@ function getBanner(pluginFilename) {
return `/*!
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/`
}
+12 -13
View File
@@ -2,26 +2,25 @@
/*!
* Script to build our plugins to use them separately.
* Copyright 2020 The Bootstrap Authors
* Copyright 2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Copyright 2020-2022 The Bootstrap Authors
* Copyright 2020-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const path = require('path')
const rollup = require('rollup')
const babel = require('rollup-plugin-babel')
const banner = require('./banner.js')
const babelHelpers = require('./babel-helpers.js')
const path = require('path')
const rollup = require('rollup')
const { babel } = require('@rollup/plugin-babel')
const banner = require('./banner.js')
const TEST = process.env.NODE_ENV === 'test'
const TEST = process.env.NODE_ENV === 'test'
const plugins = [
babel({
// Only transpile our source code
exclude: 'node_modules/**',
// Include only required helpers
externalHelpersWhitelist: babelHelpers
// Include the helpers in each file, at most one copy of each
babelHelpers: 'bundled'
})
]
const bsPlugins = {
@@ -40,7 +39,7 @@ const bsPlugins = {
}
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'
const build = async (plugin) => {
const build = async plugin => {
console.log(`Building ${plugin} plugin...`)
const external = ['jquery', 'popper.js']
@@ -82,7 +81,7 @@ const build = async (plugin) => {
const main = async () => {
try {
await Promise.all(Object.keys(bsPlugins).map((plugin) => build(plugin)))
await Promise.all(Object.keys(bsPlugins).map(plugin => build(plugin)))
} catch (error) {
console.error(error)
Executable → Regular
+48 -72
View File
@@ -2,18 +2,28 @@
/*!
* Script to update version number references in the project.
* Copyright 2017-2020 The Bootstrap Authors
* Copyright 2017-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const fs = require('fs')
const fs = require('fs').promises
const path = require('path')
const sh = require('shelljs')
const globby = require('globby')
sh.config.fatal = true
const VERBOSE = process.argv.includes('--verbose')
const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-run')
// These are the filetypes we only care about replacing the version
const GLOB = [
'**/*.{css,html,js,json,md,scss,txt,yml}'
]
const GLOBBY_OPTIONS = {
cwd: path.join(__dirname, '..'),
gitignore: true
}
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) {
@@ -24,82 +34,48 @@ function regExpQuoteReplacement(string) {
return string.replace(/\$/g, '$$')
}
const DRY_RUN = false
async function replaceRecursively(file, oldVersion, newVersion) {
const originalString = await fs.readFile(file, 'utf8')
const newString = originalString.replace(
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
)
function walkAsync(directory, excludedDirectories, fileCallback, errback) {
if (excludedDirectories.has(path.parse(directory).base)) {
// No need to move any further if the strings are identical
if (originalString === newString) {
return
}
fs.readdir(directory, (err, names) => {
if (err) {
errback(err)
return
}
names.forEach((name) => {
const filepath = path.join(directory, name)
fs.lstat(filepath, (err, stats) => {
if (err) {
process.nextTick(errback, err)
return
}
if (stats.isDirectory()) {
process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback)
} else if (stats.isFile()) {
process.nextTick(fileCallback, filepath)
}
})
})
})
}
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(regExpQuote(original), 'g')
replacement = regExpQuoteReplacement(replacement)
const updateFile = DRY_RUN ? (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log(`FILE: ${filepath}`)
} else {
console.log(`EXCLUDED:${filepath}`)
}
} : (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sh.sed('-i', original, replacement, filepath)
}
if (VERBOSE) {
console.log(`FILE: ${file}`)
}
walkAsync(directory, excludedDirectories, updateFile, (err) => {
console.error('ERROR while traversing directory!:')
console.error(err)
process.exit(1)
})
if (DRY_RUN) {
return
}
await fs.writeFile(file, newString, 'utf8')
}
function main(args) {
if (args.length !== 2) {
console.error('USAGE: change-version old_version new_version')
async function main(args) {
let [oldVersion, newVersion] = args
if (!oldVersion || !newVersion) {
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
console.error('Got arguments:', args)
process.exit(1)
}
const oldVersion = args[0]
const newVersion = args[1]
const EXCLUDED_DIRS = new Set([
'.git',
'_gh_pages',
'node_modules',
'vendor'
])
const INCLUDED_EXTENSIONS = new Set([
// This extension whitelist is how we avoid modifying binary files
'',
'.css',
'.html',
'.js',
'.json',
'.md',
'.scss',
'.txt',
'.yml'
])
replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion)
// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
try {
const files = await globby(GLOB, GLOBBY_OPTIONS)
await Promise.all(files.map(file => replaceRecursively(file, oldVersion, newVersion)))
} catch (error) {
console.error(error)
process.exit(1)
}
}
main(process.argv.slice(2))
+8 -8
View File
@@ -5,9 +5,9 @@
* Remember to use the same vendor files as the CDN ones,
* otherwise the hashes won't match!
*
* Copyright 2017-2020 The Bootstrap Authors
* Copyright 2017-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
@@ -21,11 +21,11 @@ const pkg = require('../package.json')
sh.config.fatal = true
const configFile = path.join(__dirname, '../_config.yml')
const configFile = path.join(__dirname, '../config.yml')
// Array of objects which holds the files to generate SRI hashes for.
// `file` is the path from the root folder
// `configPropertyName` is the _config.yml variable's name of the file
// `configPropertyName` is the config.yml variable's name of the file
const files = [
{
file: 'dist/css/bootstrap.min.css',
@@ -40,7 +40,7 @@ const files = [
configPropertyName: 'js_bundle_hash'
},
{
file: `site/docs/${pkg.version_short}/assets/js/vendor/jquery.slim.min.js`,
file: `site/static/docs/${pkg.config.version_short}/assets/js/vendor/jquery.slim.min.js`,
configPropertyName: 'jquery_hash'
},
{
@@ -49,7 +49,7 @@ const files = [
}
]
files.forEach((file) => {
files.forEach(file => {
fs.readFile(file.file, 'utf8', (err, data) => {
if (err) {
throw err
@@ -61,6 +61,6 @@ files.forEach((file) => {
console.log(`${file.configPropertyName}: ${integrity}`)
sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile)
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
})
})
+14 -10
View File
@@ -1,14 +1,18 @@
'use strict'
module.exports = (ctx) => ({
map: ctx.file.dirname.includes('examples') ? false : {
inline: false,
annotation: true,
sourcesContent: true
},
plugins: {
autoprefixer: {
cascade: false
module.exports = ctx => {
return {
map: ctx.file.dirname.includes('examples') ?
false :
{
inline: false,
annotation: true,
sourcesContent: true
},
plugins: {
autoprefixer: {
cascade: false
}
}
}
})
}
+11 -12
View File
@@ -1,21 +1,20 @@
'use strict'
const path = require('path')
const babel = require('rollup-plugin-babel')
const resolve = require('@rollup/plugin-node-resolve')
const banner = require('./banner.js')
const babelHelpers = require('./babel-helpers.js')
const path = require('path')
const { babel } = require('@rollup/plugin-babel')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const banner = require('./banner.js')
const BUNDLE = process.env.BUNDLE === 'true'
const BUNDLE = process.env.BUNDLE === 'true'
let fileDest = 'bootstrap.js'
let fileDest = 'bootstrap.js'
const external = ['jquery', 'popper.js']
const plugins = [
babel({
// Only transpile our source code
// Only transpile our source code
exclude: 'node_modules/**',
// Include only required helpers
externalHelpersWhitelist: babelHelpers
// Include the helpers in the bundle, at most one copy of each
babelHelpers: 'bundled'
})
]
const globals = {
@@ -28,11 +27,11 @@ if (BUNDLE) {
// Remove last entry in external array to bundle Popper
external.pop()
delete globals['popper.js']
plugins.push(resolve())
plugins.push(nodeResolve())
}
module.exports = {
input: path.resolve(__dirname, '../js/src/index.js'),
input: path.resolve(__dirname, '../js/index.js'),
output: {
banner,
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
-55
View File
@@ -1,55 +0,0 @@
#!/usr/bin/env bash
set -e
#
# Usage
# ---------------
# 1. Clone second version of Bootstrap in sibling directory named `bs-docs`.
# 2. Within `bs-docs` copy, switch to `gh-pages` branch.
# 3. Pull latest, re-bundle, re-npm.
# 4. Run script.
red=$'\e[1;31m'
green=$'\e[1;32m'
#blue=$'\e[1;34m'
magenta=$'\e[1;35m'
#cyan=$'\e[1;36m'
end=$'\e[0m'
# Get current version from package.json
current_version=$(node -p "require('./package.json').version")
if [[ $# -lt 1 ]]; then
printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" "$red" "$end"
exit 1
fi
# Pulling latest changes, just to be sure
printf "\n%s=======================================================%s" "$magenta" "$end"
printf "\n%sPulling latest changes...%s" "$magenta" "$end"
printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
git pull origin v4-dev
# Update version number
printf "\n%s=======================================================%s" "$magenta" "$end"
printf "\n%sUpdating version number...%s" "$magenta" "$end"
printf "\n%s=======================================================\n%s" "$magenta" "$end"
npm run release-version "$current_version" "$1"
# Build release
printf "\n%s=======================================================%s" "$magenta" "$end"
printf "\n%sBuilding release...%s" "$magenta" "$end"
printf "\n%s=======================================================\n%s" "$magenta" "$end"
npm run release
# Copy the contents of the built docs site over to `bs-docs` repo
printf "\n%s=======================================================%s" "$magenta" "$end"
printf "\n%sCopy it over...%s" "$magenta" "$end"
printf "\n%s=======================================================\n%s" "$magenta" "$end"
cp -rf _gh_pages/. ../bs-docs/
printf "\nDone!\n"
printf "\n%s=======================================================%s" "$green" "$end"
printf "\n%sSuccess, $1 is ready to review and publish.%s" "$green" "$end"
printf "\n%s=======================================================\n\n%s" "$green" "$end"
-60
View File
@@ -1,60 +0,0 @@
# Usage:
# install svgo globally: `npm i -g svgo`
# svgo --config=build/svgo.yml --input=foo.svg
# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md
# replace default config
multipass: true
#full: true
# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
js2svg:
pretty: true
indent: 2
plugins:
# remove this with IE 11 is no longer supported
- addAttributesToSVGElement:
attributes:
- focusable: false
- cleanupAttrs: true
- cleanupEnableBackground: true
- cleanupIDs: true
- cleanupListOfValues: true
- cleanupNumericValues: true
- collapseGroups: true
- convertColors: true
- convertPathData: true
- convertShapeToPath: true
- convertStyleToAttrs: true
- convertTransform: true
- inlineStyles: true
- mergePaths: true
- minifyStyles: true
- moveElemsAttrsToGroup: true
- moveGroupAttrsToElems: true
- removeAttrs:
attrs:
- "data-name"
- removeComments: true
- removeDesc: true
- removeDoctype: true
- removeEditorsNSData: true
- removeEmptyAttrs: true
- removeEmptyContainers: true
- removeEmptyText: true
- removeHiddenElems: true
- removeMetadata: true
- removeNonInheritableGroupAttrs: true
- removeTitle: false
- removeUnknownsAndDefaults:
keepRoleAttr: true
- removeUnusedNS: true
- removeUselessDefs: true
- removeUselessStrokeAndFill: true
- removeViewBox: false
- removeXMLNS: false
- removeXMLProcInst: true
- sortAttrs: true
+14 -19
View File
@@ -2,17 +2,17 @@
/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2020 The Bootstrap Authors
* Copyright 2017-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const childProcess = require('child_process')
const { execFile, spawn } = require('child_process')
const vnu = require('vnu-jar')
childProcess.exec('java -version', (error, stdout, stderr) => {
execFile('java', ['-version'], (error, stdout, stderr) => {
if (error) {
console.error('Skipping vnu-jar test; Java is missing.')
return
@@ -21,34 +21,29 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
const is32bitJava = !/64-Bit/.test(stderr)
// vnu-jar accepts multiple ignores joined with a `|`.
// Also note that the ignores are regular expressions.
// Also note that the ignores are string regular expressions.
const ignores = [
// "autocomplete" is included in <button> and checkboxes and radio <input>s due to
// Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072
'Attribute “autocomplete” is only allowed when the input type is.*',
'Attribute “autocomplete” not allowed on element “button” at this point.',
// Markup used in Components → Forms → Layout → Form grid → Horizontal form is currently invalid,
// but used this way due to lack of support for flexbox layout on <fieldset> element in most browsers
'Element “legend” not allowed as child of element “div” in this context.*',
// Content → Reboot uses various date/time inputs as a visual example.
// Documentation does not rely on them being usable.
'The “date” input type is not supported in all browsers.*',
'The “time” input type is not supported in all browsers.*',
// IE11 doesn't recognise <main> / give the element an implicit "main" landmark.
// Explicit role="main" is redundant for other modern browsers, but still valid.
'The “main” role is unnecessary for element “main”.'
'The “main” role is unnecessary for element “main”.',
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal,
// and offer more robust alternatives, but also need to show a less-than-ideal example
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.'
].join('|')
const args = [
'-jar',
vnu,
`"${vnu}"`,
'--asciiquotes',
'--skip-non-html',
// Ignore the language code warnings
'--no-langdetect',
'--Werror',
`--filterpattern "${ignores}"`,
'_gh_pages/',
'_site/',
'js/tests/'
]
@@ -57,7 +52,7 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
args.splice(0, 0, '-Xss512k')
}
return childProcess.spawn('java', args, {
return spawn('java', args, {
shell: true,
stdio: 'inherit'
})
+51 -26
View File
@@ -3,8 +3,8 @@
/*!
* Script to create the built examples zip archive;
* requires the `zip` command to be present!
* Copyright 2020 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Copyright 2020-2022 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
@@ -12,38 +12,65 @@
const path = require('path')
const sh = require('shelljs')
const {
version, version_short: versionShort
} = require('../package.json')
const pkg = require('../package.json')
const folderName = `bootstrap-${version}-examples`
const versionShort = pkg.config.version_short
const distFolder = `bootstrap-${pkg.version}-examples`
const rootDocsDir = '_site'
const docsDir = `${rootDocsDir}/docs/${versionShort}/`
// these are the files we need in the examples
const cssFiles = [
'bootstrap.min.css',
'bootstrap.min.css.map'
]
const jsFiles = [
'bootstrap.bundle.min.js',
'bootstrap.bundle.min.js.map'
]
const imgFiles = [
'bootstrap-outline.svg',
'bootstrap-solid.svg'
]
sh.config.fatal = true
if (!sh.test('-d', '_gh_pages')) {
throw new Error('The "_gh_pages" folder does not exist, did you forget building the docs?')
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 with the same name
sh.rm('-rf', folderName)
// create any folders so that `cp` works
sh.mkdir('-p', folderName)
sh.mkdir('-p', `${folderName}/assets/brand/`)
// remove any previously created folder/zip with the same name
sh.rm('-rf', [distFolder, `${distFolder}.zip`])
sh.cp('-Rf', `_gh_pages/docs/${versionShort}/examples/*`, folderName)
sh.cp('-Rf', `_gh_pages/docs/${versionShort}/dist/`, `${folderName}/assets/`)
// also copy the two brand images we use in the examples
sh.cp('-f', [
`_gh_pages/docs/${versionShort}/assets/brand/bootstrap-outline.svg`,
`_gh_pages/docs/${versionShort}/assets/brand/bootstrap-solid.svg`
], `${folderName}/assets/brand/`)
sh.rm(`${folderName}/index.html`)
// 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(`${folderName}/**/*.html`).forEach((file) => {
sh.find(`${distFolder}/**/*.html`).forEach(file => {
const fileContents = sh.cat(file)
.toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
@@ -55,9 +82,7 @@ sh.find(`${folderName}/**/*.html`).forEach((file) => {
})
// create the zip file
sh.exec(`zip -r9 "${folderName}.zip" "${folderName}"`, {
fatal: true
})
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
// remove the folder we created
sh.rm('-rf', folderName)
sh.rm('-rf', distFolder)
+86
View File
@@ -0,0 +1,86 @@
languageCode: "en"
title: "Bootstrap"
baseURL: "https://getbootstrap.com"
enableInlineShortcodes: true
security:
enableInlineShortcodes: true
funcs:
getenv:
- ^HUGO_
- NETLIFY
markup:
goldmark:
renderer:
unsafe: true
highlight:
noClasses: false
tableOfContents:
startLevel: 2
endLevel: 6
buildDrafts: true
buildFuture: true
enableRobotsTXT: true
metaDataFormat: "yaml"
disableKinds: ["404", "taxonomy", "term", "RSS"]
publishDir: "_site"
module:
mounts:
- source: dist
target: static/docs/4.6/dist
- source: site/assets
target: assets
- source: site/content
target: content
- source: site/data
target: data
- source: site/layouts
target: layouts
- source: site/static
target: static
- source: site/static/docs/4.6/assets/img/favicons/apple-touch-icon.png
target: static/apple-touch-icon.png
- source: site/static/docs/4.6/assets/img/favicons/favicon.ico
target: static/favicon.ico
params:
description: "The most popular HTML, CSS, and JS library in the world."
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
social_image_path: /docs/4.6/assets/brand/bootstrap-social.png
social_logo_path: /docs/4.6/assets/brand/bootstrap-social-logo.png
current_version: "4.6.2"
current_ruby_version: "4.6.2"
docs_version: "4.6"
rfs_version: "v8.1.0"
github_org: "https://github.com/twbs"
repo: "https://github.com/twbs/bootstrap"
twitter: "getbootstrap"
opencollective: "https://opencollective.com/bootstrap"
blog: "https://blog.getbootstrap.com/"
expo: "https://expo.getbootstrap.com/"
themes: "https://themes.getbootstrap.com/"
icons: "https://icons.getbootstrap.com/"
download:
source: "https://github.com/twbs/bootstrap/archive/v4.6.2.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v4.6.2/bootstrap-4.6.2-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v4.6.2/bootstrap-4.6.2-examples.zip"
cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
css_hash: "sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
js: "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"
js_hash: "sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
jquery: "https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
jquery_hash: "sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
+10 -42
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap Grid v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap Grid v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
html {
box-sizing: border-box;
@@ -15,39 +15,12 @@ html {
box-sizing: inherit;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
.container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
width: 100%;
padding-right: 15px;
padding-left: 15px;
@@ -116,7 +89,6 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -360,7 +332,6 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-sm-1 > * {
@@ -563,7 +534,6 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-md-1 > * {
@@ -766,7 +736,6 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-lg-1 > * {
@@ -969,7 +938,6 @@ html {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-xl-1 > * {
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+10 -10
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap Reboot v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 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)
*/
*,
@@ -24,7 +24,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
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-family: -apple-system, BlinkMacSystemFont, "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;
@@ -133,12 +133,12 @@ a:hover {
text-decoration: underline;
}
a:not([href]) {
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
@@ -186,6 +186,7 @@ caption {
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
label {
@@ -197,9 +198,8 @@ button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
button:focus:not(:focus-visible) {
outline: 0;
}
input,
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap Reboot v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap Reboot v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 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}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]){color:inherit;text-decoration:none}a:not([href]):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}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}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}[role=button]{cursor:pointer}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}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}
*/*,::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","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;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([class]){color:inherit;text-decoration:none}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}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}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;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}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}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 */
File diff suppressed because one or more lines are too long
+170 -116
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--blue: #007bff;
@@ -31,7 +31,7 @@
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--font-family-sans-serif: -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-family-sans-serif: -apple-system, BlinkMacSystemFont, "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-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
@@ -54,7 +54,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
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-family: -apple-system, BlinkMacSystemFont, "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;
@@ -163,12 +163,12 @@ a:hover {
text-decoration: underline;
}
a:not([href]) {
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
@@ -216,6 +216,7 @@ caption {
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
label {
@@ -227,9 +228,8 @@ button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
button:focus:not(:focus-visible) {
outline: 0;
}
input,
@@ -422,7 +422,7 @@ hr {
small,
.small {
font-size: 80%;
font-size: 0.875em;
font-weight: 400;
}
@@ -462,7 +462,7 @@ mark,
.blockquote-footer {
display: block;
font-size: 80%;
font-size: 0.875em;
color: #6c757d;
}
@@ -539,39 +539,12 @@ pre code {
overflow-y: scroll;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
.container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
width: 100%;
padding-right: 15px;
padding-left: 15px;
@@ -640,7 +613,6 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -884,7 +856,6 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-sm-1 > * {
@@ -1087,7 +1058,6 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-md-1 > * {
@@ -1290,7 +1260,6 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-lg-1 > * {
@@ -1493,7 +1462,6 @@ pre code {
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
.row-cols-xl-1 > * {
@@ -2060,11 +2028,6 @@ pre code {
border: 0;
}
.form-control:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #495057;
}
.form-control:focus {
color: #495057;
background-color: #fff;
@@ -2112,6 +2075,11 @@ input[type="month"].form-control {
appearance: none;
}
select.form-control:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #495057;
}
select.form-control:focus::-ms-value {
color: #495057;
background-color: #fff;
@@ -2252,13 +2220,14 @@ textarea.form-control {
display: none;
width: 100%;
margin-top: 0.25rem;
font-size: 80%;
font-size: 0.875em;
color: #28a745;
}
.valid-tooltip {
position: absolute;
top: 100%;
left: 0;
z-index: 5;
display: none;
max-width: 100%;
@@ -2271,6 +2240,11 @@ textarea.form-control {
border-radius: 0.25rem;
}
.form-row > .col > .valid-tooltip,
.form-row > [class*="col-"] > .valid-tooltip {
left: 5px;
}
.was-validated :valid ~ .valid-feedback,
.was-validated :valid ~ .valid-tooltip,
.is-valid ~ .valid-feedback,
@@ -2280,7 +2254,7 @@ textarea.form-control {
.was-validated .form-control:valid, .form-control.is-valid {
border-color: #28a745;
padding-right: calc(1.5em + 0.75rem);
padding-right: calc(1.5em + 0.75rem) !important;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right calc(0.375em + 0.1875rem) center;
@@ -2292,6 +2266,11 @@ textarea.form-control {
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
.was-validated select.form-control:valid, select.form-control.is-valid {
padding-right: 3rem !important;
background-position: right 1.5rem center;
}
.was-validated textarea.form-control:valid, textarea.form-control.is-valid {
padding-right: calc(1.5em + 0.75rem);
background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
@@ -2299,8 +2278,8 @@ textarea.form-control {
.was-validated .custom-select:valid, .custom-select.is-valid {
border-color: #28a745;
padding-right: calc(0.75em + 2.3125rem);
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
padding-right: calc(0.75em + 2.3125rem) !important;
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 0.75rem center/8px 10px no-repeat, #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) no-repeat;
}
.was-validated .custom-select:valid:focus, .custom-select.is-valid:focus {
@@ -2352,13 +2331,14 @@ textarea.form-control {
display: none;
width: 100%;
margin-top: 0.25rem;
font-size: 80%;
font-size: 0.875em;
color: #dc3545;
}
.invalid-tooltip {
position: absolute;
top: 100%;
left: 0;
z-index: 5;
display: none;
max-width: 100%;
@@ -2371,6 +2351,11 @@ textarea.form-control {
border-radius: 0.25rem;
}
.form-row > .col > .invalid-tooltip,
.form-row > [class*="col-"] > .invalid-tooltip {
left: 5px;
}
.was-validated :invalid ~ .invalid-feedback,
.was-validated :invalid ~ .invalid-tooltip,
.is-invalid ~ .invalid-feedback,
@@ -2380,7 +2365,7 @@ textarea.form-control {
.was-validated .form-control:invalid, .form-control.is-invalid {
border-color: #dc3545;
padding-right: calc(1.5em + 0.75rem);
padding-right: calc(1.5em + 0.75rem) !important;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right calc(0.375em + 0.1875rem) center;
@@ -2392,6 +2377,11 @@ textarea.form-control {
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
.was-validated select.form-control:invalid, select.form-control.is-invalid {
padding-right: 3rem !important;
background-position: right 1.5rem center;
}
.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid {
padding-right: calc(1.5em + 0.75rem);
background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
@@ -2399,8 +2389,8 @@ textarea.form-control {
.was-validated .custom-select:invalid, .custom-select.is-invalid {
border-color: #dc3545;
padding-right: calc(0.75em + 2.3125rem);
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
padding-right: calc(0.75em + 2.3125rem) !important;
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 0.75rem center/8px 10px no-repeat, #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) no-repeat;
}
.was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus {
@@ -3203,6 +3193,18 @@ input[type="button"].btn-block {
}
}
.collapsing.width {
width: 0;
height: auto;
transition: width 0.35s ease;
}
@media (prefers-reduced-motion: reduce) {
.collapsing.width {
transition: none;
}
}
.dropup,
.dropright,
.dropdown,
@@ -3417,7 +3419,7 @@ input[type="button"].btn-block {
.dropdown-item:hover, .dropdown-item:focus {
color: #16181b;
text-decoration: none;
background-color: #f8f9fa;
background-color: #e9ecef;
}
.dropdown-item.active, .dropdown-item:active {
@@ -3427,7 +3429,7 @@ input[type="button"].btn-block {
}
.dropdown-item.disabled, .dropdown-item:disabled {
color: #6c757d;
color: #adb5bd;
pointer-events: none;
background-color: transparent;
}
@@ -3626,12 +3628,6 @@ input[type="button"].btn-block {
z-index: 4;
}
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
border-top-left-radius: 0;
@@ -3656,6 +3652,22 @@ input[type="button"].btn-block {
border-bottom-left-radius: 0;
}
.input-group:not(.has-validation) > .form-control:not(:last-child),
.input-group:not(.has-validation) > .custom-select:not(:last-child),
.input-group:not(.has-validation) > .custom-file:not(:last-child) .custom-file-label,
.input-group:not(.has-validation) > .custom-file:not(:last-child) .custom-file-label::after {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group.has-validation > .form-control:nth-last-child(n + 3),
.input-group.has-validation > .custom-select:nth-last-child(n + 3),
.input-group.has-validation > .custom-file:nth-last-child(n + 3) .custom-file-label,
.input-group.has-validation > .custom-file:nth-last-child(n + 3) .custom-file-label::after {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group-prepend,
.input-group-append {
display: -ms-flexbox;
@@ -3756,8 +3768,10 @@ input[type="button"].btn-block {
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-append:not(:last-child) > .btn,
.input-group > .input-group-append:not(:last-child) > .input-group-text,
.input-group:not(.has-validation) > .input-group-append:not(:last-child) > .btn,
.input-group:not(.has-validation) > .input-group-append:not(:last-child) > .input-group-text,
.input-group.has-validation > .input-group-append:nth-last-child(n + 3) > .btn,
.input-group.has-validation > .input-group-append:nth-last-child(n + 3) > .input-group-text,
.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
border-top-right-radius: 0;
@@ -3776,9 +3790,13 @@ input[type="button"].btn-block {
.custom-control {
position: relative;
z-index: 1;
display: block;
min-height: 1.5rem;
padding-left: 1.5rem;
-webkit-print-color-adjust: exact;
color-adjust: exact;
print-color-adjust: exact;
}
.custom-control-inline {
@@ -3840,7 +3858,7 @@ input[type="button"].btn-block {
pointer-events: none;
content: "";
background-color: #fff;
border: #adb5bd solid 1px;
border: 1px solid #adb5bd;
}
.custom-control-label::after {
@@ -3851,7 +3869,7 @@ input[type="button"].btn-block {
width: 1rem;
height: 1rem;
content: "";
background: no-repeat 50% / 50% 50%;
background: 50% / 50% 50% no-repeat;
}
.custom-checkbox .custom-control-label::before {
@@ -3940,7 +3958,7 @@ input[type="button"].btn-block {
line-height: 1.5;
color: #495057;
vertical-align: middle;
background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 0.75rem center/8px 10px no-repeat;
border: 1px solid #ced4da;
border-radius: 0.25rem;
-webkit-appearance: none;
@@ -4009,6 +4027,7 @@ input[type="button"].btn-block {
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
margin: 0;
overflow: hidden;
opacity: 0;
}
@@ -4038,6 +4057,7 @@ input[type="button"].btn-block {
z-index: 1;
height: calc(1.5em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
overflow: hidden;
font-weight: 400;
line-height: 1.5;
color: #495057;
@@ -4074,7 +4094,7 @@ input[type="button"].btn-block {
}
.custom-range:focus {
outline: none;
outline: 0;
}
.custom-range:focus::-webkit-slider-thumb {
@@ -4269,17 +4289,16 @@ input[type="button"].btn-block {
border-bottom: 1px solid #dee2e6;
}
.nav-tabs .nav-item {
margin-bottom: -1px;
}
.nav-tabs .nav-link {
margin-bottom: -1px;
background-color: transparent;
border: 1px solid transparent;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
isolation: isolate;
border-color: #e9ecef #e9ecef #dee2e6;
}
@@ -4303,6 +4322,8 @@ input[type="button"].btn-block {
}
.nav-pills .nav-link {
background: none;
border: 0;
border-radius: 0.25rem;
}
@@ -4312,12 +4333,14 @@ input[type="button"].btn-block {
background-color: #007bff;
}
.nav-fill > .nav-link,
.nav-fill .nav-item {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
text-align: center;
}
.nav-justified > .nav-link,
.nav-justified .nav-item {
-ms-flex-preferred-size: 0;
flex-basis: 0;
@@ -4427,8 +4450,12 @@ input[type="button"].btn-block {
height: 1.5em;
vertical-align: middle;
content: "";
background: no-repeat center center;
background-size: 100% 100%;
background: 50% / 100% 100% no-repeat;
}
.navbar-nav-scroll {
max-height: 75vh;
overflow-y: auto;
}
@media (max-width: 575.98px) {
@@ -4462,6 +4489,9 @@ input[type="button"].btn-block {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-sm .navbar-nav-scroll {
overflow: visible;
}
.navbar-expand-sm .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
@@ -4504,6 +4534,9 @@ input[type="button"].btn-block {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-md .navbar-nav-scroll {
overflow: visible;
}
.navbar-expand-md .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
@@ -4546,6 +4579,9 @@ input[type="button"].btn-block {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-lg .navbar-nav-scroll {
overflow: visible;
}
.navbar-expand-lg .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
@@ -4588,6 +4624,9 @@ input[type="button"].btn-block {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-xl .navbar-nav-scroll {
overflow: visible;
}
.navbar-expand-xl .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
@@ -4632,6 +4671,10 @@ input[type="button"].btn-block {
flex-wrap: nowrap;
}
.navbar-expand .navbar-nav-scroll {
overflow: visible;
}
.navbar-expand .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
@@ -4775,6 +4818,11 @@ input[type="button"].btn-block {
border-bottom-left-radius: calc(0.25rem - 1px);
}
.card > .card-header + .list-group,
.card > .list-group + .card-footer {
border-top: 0;
}
.card-body {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
@@ -4814,10 +4862,6 @@ input[type="button"].btn-block {
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}
.card-header + .list-group .list-group-item:first-child {
border-top: 0;
}
.card-footer {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
@@ -4847,6 +4891,7 @@ input[type="button"].btn-block {
bottom: 0;
left: 0;
padding: 1.25rem;
border-radius: calc(0.25rem - 1px);
}
.card-img,
@@ -4958,6 +5003,10 @@ input[type="button"].btn-block {
}
}
.accordion {
overflow-anchor: none;
}
.accordion > .card {
overflow: hidden;
}
@@ -4990,17 +5039,12 @@ input[type="button"].btn-block {
border-radius: 0.25rem;
}
.breadcrumb-item {
display: -ms-flexbox;
display: flex;
}
.breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem;
}
.breadcrumb-item + .breadcrumb-item::before {
display: inline-block;
float: left;
padding-right: 0.5rem;
color: #6c757d;
content: "/";
@@ -5310,6 +5354,7 @@ a.badge-dark:focus, a.badge-dark.focus {
position: absolute;
top: 0;
right: 0;
z-index: 2;
padding: 0.75rem 1.25rem;
color: inherit;
}
@@ -5482,8 +5527,8 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.progress-bar-animated {
-webkit-animation: progress-bar-stripes 1s linear infinite;
animation: progress-bar-stripes 1s linear infinite;
-webkit-animation: 1s linear infinite progress-bar-stripes;
animation: 1s linear infinite progress-bar-stripes;
}
@media (prefers-reduced-motion: reduce) {
@@ -5876,15 +5921,14 @@ a.close.disabled {
}
.toast {
-ms-flex-preferred-size: 350px;
flex-basis: 350px;
max-width: 350px;
overflow: hidden;
font-size: 0.875rem;
background-color: rgba(255, 255, 255, 0.85);
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
opacity: 0;
border-radius: 0.25rem;
}
@@ -5916,6 +5960,8 @@ a.close.disabled {
background-color: rgba(255, 255, 255, 0.85);
background-clip: padding-box;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.toast-body {
@@ -6161,7 +6207,7 @@ a.close.disabled {
z-index: 1070;
display: block;
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-family: -apple-system, BlinkMacSystemFont, "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-style: normal;
font-weight: 400;
line-height: 1.5;
@@ -6172,8 +6218,8 @@ a.close.disabled {
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
white-space: normal;
word-spacing: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
@@ -6274,7 +6320,7 @@ a.close.disabled {
z-index: 1060;
display: block;
max-width: 276px;
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-family: -apple-system, BlinkMacSystemFont, "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-style: normal;
font-weight: 400;
line-height: 1.5;
@@ -6285,8 +6331,8 @@ a.close.disabled {
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
white-space: normal;
word-spacing: normal;
line-break: auto;
font-size: 0.875rem;
word-wrap: break-word;
@@ -6527,8 +6573,11 @@ a.close.disabled {
-ms-flex-pack: center;
justify-content: center;
width: 15%;
padding: 0;
color: #fff;
text-align: center;
background: none;
border: 0;
opacity: 0.5;
transition: opacity 0.15s ease;
}
@@ -6562,7 +6611,7 @@ a.close.disabled {
display: inline-block;
width: 20px;
height: 20px;
background: no-repeat 50% / 100% 100%;
background: 50% / 100% 100% no-repeat;
}
.carousel-control-prev-icon {
@@ -6647,12 +6696,12 @@ a.close.disabled {
display: inline-block;
width: 2rem;
height: 2rem;
vertical-align: text-bottom;
border: 0.25em solid currentColor;
vertical-align: -0.125em;
border: 0.25em solid currentcolor;
border-right-color: transparent;
border-radius: 50%;
-webkit-animation: spinner-border .75s linear infinite;
animation: spinner-border .75s linear infinite;
-webkit-animation: .75s linear infinite spinner-border;
animation: .75s linear infinite spinner-border;
}
.spinner-border-sm {
@@ -6689,12 +6738,12 @@ a.close.disabled {
display: inline-block;
width: 2rem;
height: 2rem;
vertical-align: text-bottom;
background-color: currentColor;
vertical-align: -0.125em;
background-color: currentcolor;
border-radius: 50%;
opacity: 0;
-webkit-animation: spinner-grow .75s linear infinite;
animation: spinner-grow .75s linear infinite;
-webkit-animation: .75s linear infinite spinner-grow;
animation: .75s linear infinite spinner-grow;
}
.spinner-grow-sm {
@@ -6702,6 +6751,14 @@ a.close.disabled {
height: 1rem;
}
@media (prefers-reduced-motion: reduce) {
.spinner-border,
.spinner-grow {
-webkit-animation-duration: 1.5s;
animation-duration: 1.5s;
}
}
.align-baseline {
vertical-align: baseline !important;
}
@@ -7970,7 +8027,6 @@ button.bg-dark:focus {
.user-select-all {
-webkit-user-select: all !important;
-moz-user-select: all !important;
-ms-user-select: all !important;
user-select: all !important;
}
@@ -10182,6 +10238,7 @@ a.text-dark:hover, a.text-dark:focus {
}
.text-break {
word-break: break-word !important;
word-wrap: break-word !important;
}
@@ -10218,9 +10275,6 @@ a.text-dark:hover, a.text-dark:focus {
border: 1px solid #adb5bd;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+897 -959
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+888 -952
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+38 -41
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap alert.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap alert.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Alert = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,32 +27,31 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'alert';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
var EVENT_CLOSE = "close" + EVENT_KEY;
var EVENT_CLOSED = "closed" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_NAME_ALERT = 'alert';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var EVENT_CLOSE = "close" + EVENT_KEY;
var EVENT_CLOSED = "closed" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Alert = /*#__PURE__*/function () {
@@ -79,13 +80,13 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
_proto._getRootElement = function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var selector = Util__default["default"].getSelectorFromElement(element);
var parent = false;
if (selector) {
@@ -93,43 +94,43 @@
}
if (!parent) {
parent = $(element).closest("." + CLASS_NAME_ALERT)[0];
parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
}
return parent;
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(EVENT_CLOSE);
$(element).trigger(closeEvent);
var closeEvent = $__default["default"].Event(EVENT_CLOSE);
$__default["default"](element).trigger(closeEvent);
return closeEvent;
};
_proto._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(CLASS_NAME_SHOW);
$__default["default"](element).removeClass(CLASS_NAME_SHOW);
if (!$(element).hasClass(CLASS_NAME_FADE)) {
if (!$__default["default"](element).hasClass(CLASS_NAME_FADE)) {
this._destroyElement(element);
return;
}
var transitionDuration = Util.getTransitionDurationFromElement(element);
$(element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(element);
$__default["default"](element).one(Util__default["default"].TRANSITION_END, function (event) {
return _this._destroyElement(element, event);
}).emulateTransitionEnd(transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(EVENT_CLOSED).remove();
$__default["default"](element).detach().trigger(EVENT_CLOSED).remove();
} // Static
;
Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var $element = $__default["default"](this);
var data = $element.data(DATA_KEY);
if (!data) {
@@ -163,28 +164,24 @@
return Alert;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert;
$__default["default"].fn[NAME] = Alert._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Alert;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
return Alert;
})));
}));
//# sourceMappingURL=alert.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+45 -44
View File
@@ -1,15 +1,17 @@
/*!
* Bootstrap button.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap button.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, global.Button = factory(global.jQuery));
}(this, (function ($) { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.jQuery));
})(this, (function ($) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -24,24 +26,28 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'button';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_BUTTON = 'btn';
var CLASS_NAME_FOCUS = 'focus';
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
@@ -49,18 +55,14 @@
var SELECTOR_INPUT = 'input:not([type="hidden"])';
var SELECTOR_ACTIVE = '.active';
var SELECTOR_BUTTON = '.btn';
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Button = /*#__PURE__*/function () {
function Button(element) {
this._element = element;
this.shouldAvoidTriggerChange = false;
} // Getters
@@ -70,7 +72,7 @@
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0];
var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
if (rootElement) {
var input = this._element.querySelector(SELECTOR_INPUT);
@@ -83,7 +85,7 @@
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
if (activeElement) {
$(activeElement).removeClass(CLASS_NAME_ACTIVE);
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE);
}
}
}
@@ -94,7 +96,9 @@
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
}
$(input).trigger('change');
if (!this.shouldAvoidTriggerChange) {
$__default["default"](input).trigger('change');
}
}
input.focus();
@@ -108,26 +112,29 @@
}
if (triggerChangeEvent) {
$(this._element).toggleClass(CLASS_NAME_ACTIVE);
$__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE);
}
}
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
this._element = null;
} // Static
;
Button._jQueryInterface = function _jQueryInterface(config) {
Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var $element = $__default["default"](this);
var data = $element.data(DATA_KEY);
if (!data) {
data = new Button(this);
$(this).data(DATA_KEY, data);
$element.data(DATA_KEY, data);
}
data.shouldAvoidTriggerChange = avoidTriggerChange;
if (config === 'toggle') {
data[config]();
}
@@ -144,18 +151,16 @@
return Button;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = event.target;
var initialButton = button;
if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
button = $(button).closest(SELECTOR_BUTTON)[0];
if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) {
button = $__default["default"](button).closest(SELECTOR_BUTTON)[0];
}
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
@@ -169,17 +174,15 @@
return;
}
if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') {
event.preventDefault(); // work around event sent to label and input
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT');
}
Button._jQueryInterface.call($(button), 'toggle');
}
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(SELECTOR_BUTTON)[0];
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0];
$__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
});
$(window).on(EVENT_LOAD_DATA_API, function () {
$__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
// ensure correct active class is set to match the controls' actual values/states
// find all checkboxes/readio buttons inside data-toggle groups
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
@@ -209,20 +212,18 @@
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Button._jQueryInterface;
$.fn[NAME].Constructor = Button;
$__default["default"].fn[NAME] = Button._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Button;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Button._jQueryInterface;
};
return Button;
})));
}));
//# sourceMappingURL=button.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+128 -155
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap carousel.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap carousel.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Carousel = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,70 +27,39 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'carousel';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
@@ -96,22 +67,14 @@
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
var SWIPE_THRESHOLD = 40;
var Default = {
interval: 5000,
keyboard: true,
slide: false,
pause: 'hover',
wrap: true,
touch: true
};
var DefaultType = {
interval: '(number|boolean)',
keyboard: 'boolean',
slide: '(boolean|string)',
pause: '(string|boolean)',
wrap: 'boolean',
touch: 'boolean'
};
var CLASS_NAME_CAROUSEL = 'carousel';
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_SLIDE = 'slide';
var CLASS_NAME_RIGHT = 'carousel-item-right';
var CLASS_NAME_LEFT = 'carousel-item-left';
var CLASS_NAME_NEXT = 'carousel-item-next';
var CLASS_NAME_PREV = 'carousel-item-prev';
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
var DIRECTION_NEXT = 'next';
var DIRECTION_PREV = 'prev';
var DIRECTION_LEFT = 'left';
@@ -129,14 +92,6 @@
var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_CAROUSEL = 'carousel';
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_SLIDE = 'slide';
var CLASS_NAME_RIGHT = 'carousel-item-right';
var CLASS_NAME_LEFT = 'carousel-item-left';
var CLASS_NAME_NEXT = 'carousel-item-next';
var CLASS_NAME_PREV = 'carousel-item-prev';
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
var SELECTOR_ACTIVE = '.active';
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
var SELECTOR_ITEM = '.carousel-item';
@@ -145,14 +100,28 @@
var SELECTOR_INDICATORS = '.carousel-indicators';
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
var Default = {
interval: 5000,
keyboard: true,
slide: false,
pause: 'hover',
wrap: true,
touch: true
};
var DefaultType = {
interval: '(number|boolean)',
keyboard: 'boolean',
slide: '(boolean|string)',
pause: '(string|boolean)',
wrap: 'boolean',
touch: 'boolean'
};
var PointerType = {
TOUCH: 'touch',
PEN: 'pen'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Carousel = /*#__PURE__*/function () {
@@ -185,9 +154,10 @@
};
_proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
var $element = $__default["default"](this._element); // Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
this.next();
}
};
@@ -204,7 +174,7 @@
}
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
Util.triggerTransitionEnd(this._element);
Util__default["default"].triggerTransitionEnd(this._element);
this.cycle(true);
}
@@ -223,6 +193,8 @@
}
if (this._config.interval && !this._isPaused) {
this._updateInterval();
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@@ -239,7 +211,7 @@
}
if (this._isSliding) {
$(this._element).one(EVENT_SLID, function () {
$__default["default"](this._element).one(EVENT_SLID, function () {
return _this.to(index);
});
return;
@@ -257,8 +229,8 @@
};
_proto.dispose = function dispose() {
$(this._element).off(EVENT_KEY);
$.removeData(this._element, DATA_KEY);
$__default["default"](this._element).off(EVENT_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
this._items = null;
this._config = null;
this._element = null;
@@ -271,8 +243,8 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2(_objectSpread2({}, Default), config);
Util.typeCheckConfig(NAME, config, DefaultType);
config = _extends({}, Default, config);
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
return config;
};
@@ -300,13 +272,13 @@
var _this2 = this;
if (this._config.keyboard) {
$(this._element).on(EVENT_KEYDOWN, function (event) {
$__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
$(this._element).on(EVENT_MOUSEENTER, function (event) {
$__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) {
return _this2.pause(event);
}).on(EVENT_MOUSELEAVE, function (event) {
return _this2.cycle(event);
@@ -335,11 +307,7 @@
var move = function move(event) {
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
_this3.touchDeltaX = 0;
} else {
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
}
_this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
};
var end = function end(event) {
@@ -369,27 +337,27 @@
}
};
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
$__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
return e.preventDefault();
});
if (this._pointerEvent) {
$(this._element).on(EVENT_POINTERDOWN, function (event) {
$__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
return start(event);
});
$(this._element).on(EVENT_POINTERUP, function (event) {
$__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else {
$(this._element).on(EVENT_TOUCHSTART, function (event) {
$__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
return start(event);
});
$(this._element).on(EVENT_TOUCHMOVE, function (event) {
$__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
return move(event);
});
$(this._element).on(EVENT_TOUCHEND, function (event) {
$__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
return end(event);
});
}
@@ -441,29 +409,46 @@
var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
var slideEvent = $.Event(EVENT_SLIDE, {
var slideEvent = $__default["default"].Event(EVENT_SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
$(this._element).trigger(slideEvent);
$__default["default"](this._element).trigger(slideEvent);
return slideEvent;
};
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
$(indicators).removeClass(CLASS_NAME_ACTIVE);
$__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE);
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
$(nextIndicator).addClass(CLASS_NAME_ACTIVE);
$__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE);
}
}
};
_proto._updateInterval = function _updateInterval() {
var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
if (!element) {
return;
}
var elementInterval = parseInt(element.getAttribute('data-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) {
var _this4 = this;
@@ -490,7 +475,7 @@
eventDirectionName = DIRECTION_RIGHT;
}
if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE)) {
this._isSliding = false;
return;
}
@@ -514,41 +499,33 @@
this._setActiveIndicatorElement(nextElement);
var slidEvent = $.Event(EVENT_SLID, {
this._activeElement = nextElement;
var slidEvent = $__default["default"].Event(EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
$(nextElement).addClass(orderClassName);
Util.reflow(nextElement);
$(activeElement).addClass(directionalClassName);
$(nextElement).addClass(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 = Util.getTransitionDurationFromElement(activeElement);
$(activeElement).one(Util.TRANSITION_END, function () {
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
$(activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
$__default["default"](nextElement).addClass(orderClassName);
Util__default["default"].reflow(nextElement);
$__default["default"](activeElement).addClass(directionalClassName);
$__default["default"](nextElement).addClass(directionalClassName);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(activeElement);
$__default["default"](activeElement).one(Util__default["default"].TRANSITION_END, function () {
$__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
return $(_this4._element).trigger(slidEvent);
return $__default["default"](_this4._element).trigger(slidEvent);
}, 0);
}).emulateTransitionEnd(transitionDuration);
} else {
$(activeElement).removeClass(CLASS_NAME_ACTIVE);
$(nextElement).addClass(CLASS_NAME_ACTIVE);
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE);
$__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE);
this._isSliding = false;
$(this._element).trigger(slidEvent);
$__default["default"](this._element).trigger(slidEvent);
}
if (isCycling) {
@@ -559,19 +536,19 @@
Carousel._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = $__default["default"](this).data(DATA_KEY);
var _config = _objectSpread2(_objectSpread2({}, Default), $(this).data());
var _config = _extends({}, Default, $__default["default"](this).data());
if (typeof config === 'object') {
_config = _objectSpread2(_objectSpread2({}, _config), config);
_config = _extends({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(this, _config);
$(this).data(DATA_KEY, data);
$__default["default"](this).data(DATA_KEY, data);
}
if (typeof config === 'number') {
@@ -590,19 +567,19 @@
};
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
var selector = Util.getSelectorFromElement(this);
var selector = Util__default["default"].getSelectorFromElement(this);
if (!selector) {
return;
}
var target = $(selector)[0];
var target = $__default["default"](selector)[0];
if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
return;
}
var config = _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
var config = _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
var slideIndex = this.getAttribute('data-slide-to');
@@ -610,10 +587,10 @@
config.interval = false;
}
Carousel._jQueryInterface.call($(target), config);
Carousel._jQueryInterface.call($__default["default"](target), config);
if (slideIndex) {
$(target).data(DATA_KEY).to(slideIndex);
$__default["default"](target).data(DATA_KEY).to(slideIndex);
}
event.preventDefault();
@@ -634,37 +611,33 @@
return Carousel;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
$(window).on(EVENT_LOAD_DATA_API, function () {
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
$__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) {
var $carousel = $(carousels[i]);
var $carousel = $__default["default"](carousels[i]);
Carousel._jQueryInterface.call($carousel, $carousel.data());
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Carousel._jQueryInterface;
$.fn[NAME].Constructor = Carousel;
$__default["default"].fn[NAME] = Carousel._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Carousel;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Carousel._jQueryInterface;
};
return Carousel;
})));
}));
//# sourceMappingURL=carousel.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+90 -125
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap collapse.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap collapse.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Collapse = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,70 +27,52 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'collapse';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.collapse';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_COLLAPSE = 'collapse';
var CLASS_NAME_COLLAPSING = 'collapsing';
var CLASS_NAME_COLLAPSED = 'collapsed';
var DIMENSION_WIDTH = 'width';
var DIMENSION_HEIGHT = 'height';
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var SELECTOR_ACTIVES = '.show, .collapsing';
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
var Default = {
toggle: true,
parent: ''
@@ -97,23 +81,8 @@
toggle: 'boolean',
parent: '(string|element)'
};
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_COLLAPSE = 'collapse';
var CLASS_NAME_COLLAPSING = 'collapsing';
var CLASS_NAME_COLLAPSED = 'collapsed';
var DIMENSION_WIDTH = 'width';
var DIMENSION_HEIGHT = 'height';
var SELECTOR_ACTIVES = '.show, .collapsing';
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Collapse = /*#__PURE__*/function () {
@@ -126,7 +95,7 @@
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
var selector = Util.getSelectorFromElement(elem);
var selector = Util__default["default"].getSelectorFromElement(elem);
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
return foundElem === element;
});
@@ -154,7 +123,7 @@
// Public
_proto.toggle = function toggle() {
if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW)) {
this.hide();
} else {
this.show();
@@ -164,7 +133,7 @@
_proto.show = function show() {
var _this = this;
if (this._isTransitioning || $(this._element).hasClass(CLASS_NAME_SHOW)) {
if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW)) {
return;
}
@@ -186,64 +155,64 @@
}
if (actives) {
activesData = $(actives).not(this._selector).data(DATA_KEY);
activesData = $__default["default"](actives).not(this._selector).data(DATA_KEY);
if (activesData && activesData._isTransitioning) {
return;
}
}
var startEvent = $.Event(EVENT_SHOW);
$(this._element).trigger(startEvent);
var startEvent = $__default["default"].Event(EVENT_SHOW);
$__default["default"](this._element).trigger(startEvent);
if (startEvent.isDefaultPrevented()) {
return;
}
if (actives) {
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide');
if (!activesData) {
$(actives).data(DATA_KEY, null);
$__default["default"](actives).data(DATA_KEY, null);
}
}
var dimension = this._getDimension();
$(this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
$__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
$(this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
$__default["default"](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
}
this.setTransitioning(true);
var complete = function complete() {
$(_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
$__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
_this._element.style[dimension] = '';
_this.setTransitioning(false);
$(_this._element).trigger(EVENT_SHOWN);
$__default["default"](_this._element).trigger(EVENT_SHOWN);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension;
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px";
};
_proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$(this._element).hasClass(CLASS_NAME_SHOW)) {
if (this._isTransitioning || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW)) {
return;
}
var startEvent = $.Event(EVENT_HIDE);
$(this._element).trigger(startEvent);
var startEvent = $__default["default"].Event(EVENT_HIDE);
$__default["default"](this._element).trigger(startEvent);
if (startEvent.isDefaultPrevented()) {
return;
@@ -252,20 +221,20 @@
var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
Util.reflow(this._element);
$(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
Util__default["default"].reflow(this._element);
$__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i];
var selector = Util.getSelectorFromElement(trigger);
var selector = Util__default["default"].getSelectorFromElement(trigger);
if (selector !== null) {
var $elem = $([].slice.call(document.querySelectorAll(selector)));
var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector)));
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
$(trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
$__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
}
}
}
@@ -276,12 +245,12 @@
var complete = function complete() {
_this2.setTransitioning(false);
$(_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
$__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
};
this._element.style[dimension] = '';
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
};
_proto.setTransitioning = function setTransitioning(isTransitioning) {
@@ -289,7 +258,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
this._config = null;
this._parent = null;
this._element = null;
@@ -299,15 +268,15 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2(_objectSpread2({}, Default), config);
config = _extends({}, Default, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME, config, DefaultType);
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
return config;
};
_proto._getDimension = function _getDimension() {
var hasWidth = $(this._element).hasClass(DIMENSION_WIDTH);
var hasWidth = $__default["default"](this._element).hasClass(DIMENSION_WIDTH);
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
};
@@ -316,7 +285,7 @@
var parent;
if (Util.isElement(this._config.parent)) {
if (Util__default["default"].isElement(this._config.parent)) {
parent = this._config.parent; // It's a jQuery object
if (typeof this._config.parent.jquery !== 'undefined') {
@@ -328,32 +297,32 @@
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
var children = [].slice.call(parent.querySelectorAll(selector));
$(children).each(function (i, element) {
$__default["default"](children).each(function (i, element) {
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
});
return parent;
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
var isOpen = $(element).hasClass(CLASS_NAME_SHOW);
var isOpen = $__default["default"](element).hasClass(CLASS_NAME_SHOW);
if (triggerArray.length) {
$(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
$__default["default"](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
}
} // Static
;
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var selector = Util.getSelectorFromElement(element);
var selector = Util__default["default"].getSelectorFromElement(element);
return selector ? document.querySelector(selector) : null;
};
Collapse._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY);
var $element = $__default["default"](this);
var data = $element.data(DATA_KEY);
var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $this.data()), typeof config === 'object' && config ? config : {});
var _config = _extends({}, Default, $element.data(), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false;
@@ -361,7 +330,7 @@
if (!data) {
data = new Collapse(this, _config);
$this.data(DATA_KEY, data);
$element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -389,23 +358,21 @@
return Collapse;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.currentTarget.tagName === 'A') {
event.preventDefault();
}
var $trigger = $(this);
var selector = Util.getSelectorFromElement(this);
var $trigger = $__default["default"](this);
var selector = Util__default["default"].getSelectorFromElement(this);
var selectors = [].slice.call(document.querySelectorAll(selector));
$(selectors).each(function () {
var $target = $(this);
$__default["default"](selectors).each(function () {
var $target = $__default["default"](this);
var data = $target.data(DATA_KEY);
var config = data ? 'toggle' : $trigger.data();
@@ -413,20 +380,18 @@
});
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Collapse._jQueryInterface;
$.fn[NAME].Constructor = Collapse;
$__default["default"].fn[NAME] = Collapse._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Collapse;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Collapse._jQueryInterface;
};
return Collapse;
})));
}));
//# sourceMappingURL=collapse.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+95 -133
View File
@@ -1,17 +1,19 @@
/*!
* Bootstrap dropdown.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap dropdown.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
(global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
}(this, (function ($, Popper, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
})(this, (function ($, Popper, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -26,70 +28,39 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'dropdown';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
@@ -103,6 +74,13 @@
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
var CLASS_NAME_DISABLED = 'disabled';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_DROPUP = 'dropup';
var CLASS_NAME_DROPRIGHT = 'dropright';
var CLASS_NAME_DROPLEFT = 'dropleft';
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
var CLASS_NAME_POSITION_STATIC = 'position-static';
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
@@ -111,13 +89,6 @@
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_DISABLED = 'disabled';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_DROPUP = 'dropup';
var CLASS_NAME_DROPRIGHT = 'dropright';
var CLASS_NAME_DROPLEFT = 'dropleft';
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
var CLASS_NAME_POSITION_STATIC = 'position-static';
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
var SELECTOR_FORM_CHILD = '.dropdown form';
var SELECTOR_MENU = '.dropdown-menu';
@@ -146,9 +117,7 @@
popperConfig: '(null|object)'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Dropdown = /*#__PURE__*/function () {
@@ -167,11 +136,11 @@
// Public
_proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
return;
}
var isActive = $(this._menu).hasClass(CLASS_NAME_SHOW);
var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW);
Dropdown._clearMenus();
@@ -187,38 +156,35 @@
usePopper = false;
}
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW)) {
return;
}
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(EVENT_SHOW, relatedTarget);
var showEvent = $__default["default"].Event(EVENT_SHOW, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(showEvent);
$__default["default"](parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
return;
} // Disable totally Popper.js for Dropdown in Navbar
} // Totally disable Popper for Dropdowns in Navbar
if (!this._inNavbar && usePopper) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
// Check for Popper dependency
if (typeof Popper__default["default"] === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
var referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (Util.isElement(this._config.reference)) {
} else if (Util__default["default"].isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
@@ -230,41 +196,41 @@
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(CLASS_NAME_POSITION_STATIC);
$__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
this._popper = new Popper__default["default"](referenceElement, this._menu, this._getPopperConfig());
} // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
$(document.body).children().on('mouseover', null, $.noop);
if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
$__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
$(this._menu).toggleClass(CLASS_NAME_SHOW);
$(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_SHOWN, relatedTarget));
$__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW);
$__default["default"](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default["default"].Event(EVENT_SHOWN, relatedTarget));
};
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default["default"](this._menu).hasClass(CLASS_NAME_SHOW)) {
return;
}
var relatedTarget = {
relatedTarget: this._element
};
var hideEvent = $.Event(EVENT_HIDE, relatedTarget);
var hideEvent = $__default["default"].Event(EVENT_HIDE, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(hideEvent);
$__default["default"](parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
return;
@@ -274,13 +240,13 @@
this._popper.destroy();
}
$(this._menu).toggleClass(CLASS_NAME_SHOW);
$(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget));
$__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW);
$__default["default"](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default["default"].Event(EVENT_HIDDEN, relatedTarget));
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$(this._element).off(EVENT_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
$__default["default"](this._element).off(EVENT_KEY);
this._element = null;
this._menu = null;
@@ -303,7 +269,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(EVENT_CLICK, function (event) {
$__default["default"](this._element).on(EVENT_CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@@ -312,8 +278,8 @@
};
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
config = _extends({}, this.constructor.Default, $__default["default"](this._element).data(), config);
Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
@@ -330,16 +296,16 @@
};
_proto._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element.parentNode);
var $parentDropdown = $__default["default"](this._element.parentNode);
var placement = PLACEMENT_BOTTOM; // Handle dropup
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT;
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
placement = PLACEMENT_LEFT;
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
} else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND;
}
@@ -347,7 +313,7 @@
};
_proto._detectNavbar = function _detectNavbar() {
return $(this._element).closest('.navbar').length > 0;
return $__default["default"](this._element).closest('.navbar').length > 0;
};
_proto._getOffset = function _getOffset() {
@@ -357,7 +323,7 @@
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {});
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element));
return data;
};
} else {
@@ -379,7 +345,7 @@
boundariesElement: this._config.boundary
}
}
}; // Disable Popper.js if we have a static display
}; // Disable Popper if we have a static display
if (this._config.display === 'static') {
popperConfig.modifiers.applyStyle = {
@@ -387,19 +353,19 @@
};
}
return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig);
return _extends({}, popperConfig, this._config.popperConfig);
} // Static
;
Dropdown._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = $__default["default"](this).data(DATA_KEY);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(this, _config);
$(this).data(DATA_KEY, data);
$__default["default"](this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -422,7 +388,7 @@
for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown._getParentFromElement(toggles[i]);
var context = $(toggles[i]).data(DATA_KEY);
var context = $__default["default"](toggles[i]).data(DATA_KEY);
var relatedTarget = {
relatedTarget: toggles[i]
};
@@ -437,16 +403,16 @@
var dropdownMenu = context._menu;
if (!$(parent).hasClass(CLASS_NAME_SHOW)) {
if (!$__default["default"](parent).hasClass(CLASS_NAME_SHOW)) {
continue;
}
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default["default"].contains(parent, event.target)) {
continue;
}
var hideEvent = $.Event(EVENT_HIDE, relatedTarget);
$(parent).trigger(hideEvent);
var hideEvent = $__default["default"].Event(EVENT_HIDE, relatedTarget);
$__default["default"](parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
continue;
@@ -455,7 +421,7 @@
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
$__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
}
toggles[i].setAttribute('aria-expanded', 'false');
@@ -464,14 +430,14 @@
context._popper.destroy();
}
$(dropdownMenu).removeClass(CLASS_NAME_SHOW);
$(parent).removeClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget));
$__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW);
$__default["default"](parent).removeClass(CLASS_NAME_SHOW).trigger($__default["default"].Event(EVENT_HIDDEN, relatedTarget));
}
};
Dropdown._getParentFromElement = function _getParentFromElement(element) {
var parent;
var selector = Util.getSelectorFromElement(element);
var selector = Util__default["default"].getSelectorFromElement(element);
if (selector) {
parent = document.querySelector(selector);
@@ -489,17 +455,17 @@
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
return;
}
if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {
if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(CLASS_NAME_SHOW);
var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW);
if (!isActive && event.which === ESCAPE_KEYCODE) {
return;
@@ -508,17 +474,17 @@
event.preventDefault();
event.stopPropagation();
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
if (event.which === ESCAPE_KEYCODE) {
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
$__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
}
$(this).trigger('click');
$__default["default"](this).trigger('click');
return;
}
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
return $(item).is(':visible');
return $__default["default"](item).is(':visible');
});
if (items.length === 0) {
@@ -564,35 +530,31 @@
return Dropdown;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
$__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
Dropdown._jQueryInterface.call($(this), 'toggle');
Dropdown._jQueryInterface.call($__default["default"](this), 'toggle');
}).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
e.stopPropagation();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Dropdown._jQueryInterface;
$.fn[NAME].Constructor = Dropdown;
$__default["default"].fn[NAME] = Dropdown._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Dropdown;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Dropdown._jQueryInterface;
};
return Dropdown;
})));
}));
//# sourceMappingURL=dropdown.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.4.0): index.js
* Bootstrap (v4.6.0): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -20,4 +20,3 @@
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
}
})($);
//# sourceMappingURL=index.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["../src/index.js"],"names":["$","TypeError","version","fn","jquery","split","minMajor","ltMajor","minMinor","minPatch","maxMajor","Error"],"mappings":"AAaA;;;;;;AAOA,CAAC,UAACA,CAAD,EAAO;AACN,MAAI,OAAOA,CAAP,KAAa,WAAjB,EAA8B;AAC5B,UAAM,IAAIC,SAAJ,CAAc,kGAAd,CAAN;AACD;;AAED,MAAMC,UAAUF,EAAEG,EAAF,CAAKC,MAAL,CAAYC,KAAZ,CAAkB,GAAlB,EAAuB,CAAvB,EAA0BA,KAA1B,CAAgC,GAAhC,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,UAAU,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;;AAEA,MAAIR,QAAQ,CAAR,IAAaK,OAAb,IAAwBL,QAAQ,CAAR,IAAaM,QAArC,IAAiDN,QAAQ,CAAR,MAAeI,QAAf,IAA2BJ,QAAQ,CAAR,MAAeM,QAA1C,IAAsDN,QAAQ,CAAR,IAAaO,QAApH,IAAgIP,QAAQ,CAAR,KAAcQ,QAAlJ,EAA4J;AAC1J,UAAM,IAAIC,KAAJ,CAAU,8EAAV,CAAN;AACD;AACF,CAfD,EAeGX,CAfH","sourcesContent":["import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover from './popover'\nimport Scrollspy from './scrollspy'\nimport Tab from './tab'\nimport Tooltip from './tooltip'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.2): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n(($) => {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n})($)\n\nexport {\n Util,\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Popover,\n Scrollspy,\n Tab,\n Tooltip\n}\n"],"file":"index.js"}
+167 -185
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap modal.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap modal.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Modal = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,84 +27,48 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'modal';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var Default = {
backdrop: true,
keyboard: true,
focus: true,
show: true
};
var DefaultType = {
backdrop: '(boolean|string)',
keyboard: 'boolean',
focus: 'boolean',
show: 'boolean'
};
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
var CLASS_NAME_BACKDROP = 'modal-backdrop';
var CLASS_NAME_OPEN = 'modal-open';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_STATIC = 'modal-static';
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
@@ -115,23 +81,26 @@
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
var CLASS_NAME_BACKDROP = 'modal-backdrop';
var CLASS_NAME_OPEN = 'modal-open';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_STATIC = 'modal-static';
var SELECTOR_DIALOG = '.modal-dialog';
var SELECTOR_MODAL_BODY = '.modal-body';
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
var SELECTOR_STICKY_CONTENT = '.sticky-top';
var Default = {
backdrop: true,
keyboard: true,
focus: true,
show: true
};
var DefaultType = {
backdrop: '(boolean|string)',
keyboard: 'boolean',
focus: 'boolean',
show: 'boolean'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Modal = /*#__PURE__*/function () {
@@ -162,21 +131,21 @@
return;
}
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true;
}
var showEvent = $.Event(EVENT_SHOW, {
var showEvent = $__default["default"].Event(EVENT_SHOW, {
relatedTarget: relatedTarget
});
$(this._element).trigger(showEvent);
$__default["default"](this._element).trigger(showEvent);
if (this._isShown || showEvent.isDefaultPrevented()) {
if (showEvent.isDefaultPrevented()) {
return;
}
this._isShown = true;
if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true;
}
this._checkScrollbar();
this._setScrollbar();
@@ -187,12 +156,12 @@
this._setResizeEvent();
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
return _this.hide(event);
});
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
$(_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
$__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
$__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
if ($__default["default"](event.target).is(_this._element)) {
_this._ignoreBackdropClick = true;
}
});
@@ -214,15 +183,15 @@
return;
}
var hideEvent = $.Event(EVENT_HIDE);
$(this._element).trigger(hideEvent);
var hideEvent = $__default["default"].Event(EVENT_HIDE);
$__default["default"](this._element).trigger(hideEvent);
if (!this._isShown || hideEvent.isDefaultPrevented()) {
return;
}
this._isShown = false;
var transition = $(this._element).hasClass(CLASS_NAME_FADE);
var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE);
if (transition) {
this._isTransitioning = true;
@@ -232,14 +201,14 @@
this._setResizeEvent();
$(document).off(EVENT_FOCUSIN);
$(this._element).removeClass(CLASS_NAME_SHOW);
$(this._element).off(EVENT_CLICK_DISMISS);
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
$__default["default"](document).off(EVENT_FOCUSIN);
$__default["default"](this._element).removeClass(CLASS_NAME_SHOW);
$__default["default"](this._element).off(EVENT_CLICK_DISMISS);
$__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, function (event) {
return _this2._hideModal(event);
}).emulateTransitionEnd(transitionDuration);
} else {
@@ -249,7 +218,7 @@
_proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) {
return $(htmlElement).off(EVENT_KEY);
return $__default["default"](htmlElement).off(EVENT_KEY);
});
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@@ -257,8 +226,8 @@
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
$(document).off(EVENT_FOCUSIN);
$.removeData(this._element, DATA_KEY);
$__default["default"](document).off(EVENT_FOCUSIN);
$__default["default"].removeData(this._element, DATA_KEY);
this._config = null;
this._element = null;
this._dialog = null;
@@ -276,39 +245,48 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2(_objectSpread2({}, Default), config);
Util.typeCheckConfig(NAME, config, DefaultType);
config = _extends({}, Default, config);
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
return config;
};
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
var _this3 = this;
if (this._config.backdrop === 'static') {
var hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED);
$(this._element).trigger(hideEventPrevented);
var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED);
$__default["default"](this._element).trigger(hideEventPrevented);
if (hideEventPrevented.defaultPrevented) {
return;
}
this._element.classList.add(CLASS_NAME_STATIC);
var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, function () {
_this3._element.classList.remove(CLASS_NAME_STATIC);
}).emulateTransitionEnd(modalTransitionDuration);
this._element.focus();
} else {
this.hide();
if (hideEventPrevented.isDefaultPrevented()) {
return;
}
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
if (!isModalOverflowing) {
this._element.style.overflowY = 'hidden';
}
this._element.classList.add(CLASS_NAME_STATIC);
var modalTransitionDuration = Util__default["default"].getTransitionDurationFromElement(this._dialog);
$__default["default"](this._element).off(Util__default["default"].TRANSITION_END);
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, function () {
_this3._element.classList.remove(CLASS_NAME_STATIC);
if (!isModalOverflowing) {
$__default["default"](_this3._element).one(Util__default["default"].TRANSITION_END, function () {
_this3._element.style.overflowY = '';
}).emulateTransitionEnd(_this3._element, modalTransitionDuration);
}
}).emulateTransitionEnd(modalTransitionDuration);
this._element.focus();
};
_proto._showElement = function _showElement(relatedTarget) {
var _this4 = this;
var transition = $(this._element).hasClass(CLASS_NAME_FADE);
var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE);
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
@@ -322,23 +300,25 @@
this._element.setAttribute('aria-modal', true);
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
this._element.setAttribute('role', 'dialog');
if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0;
} else {
this._element.scrollTop = 0;
}
if (transition) {
Util.reflow(this._element);
Util__default["default"].reflow(this._element);
}
$(this._element).addClass(CLASS_NAME_SHOW);
$__default["default"](this._element).addClass(CLASS_NAME_SHOW);
if (this._config.focus) {
this._enforceFocus();
}
var shownEvent = $.Event(EVENT_SHOWN, {
var shownEvent = $__default["default"].Event(EVENT_SHOWN, {
relatedTarget: relatedTarget
});
@@ -348,12 +328,12 @@
}
_this4._isTransitioning = false;
$(_this4._element).trigger(shownEvent);
$__default["default"](_this4._element).trigger(shownEvent);
};
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._dialog);
$__default["default"](this._dialog).one(Util__default["default"].TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
} else {
transitionComplete();
}
@@ -362,9 +342,9 @@
_proto._enforceFocus = function _enforceFocus() {
var _this5 = this;
$(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
$__default["default"](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
.on(EVENT_FOCUSIN, function (event) {
if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) {
_this5._element.focus();
}
});
@@ -374,7 +354,7 @@
var _this6 = this;
if (this._isShown) {
$(this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
$__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
event.preventDefault();
@@ -384,7 +364,7 @@
}
});
} else if (!this._isShown) {
$(this._element).off(EVENT_KEYDOWN_DISMISS);
$__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS);
}
};
@@ -392,11 +372,11 @@
var _this7 = this;
if (this._isShown) {
$(window).on(EVENT_RESIZE, function (event) {
$__default["default"](window).on(EVENT_RESIZE, function (event) {
return _this7.handleUpdate(event);
});
} else {
$(window).off(EVENT_RESIZE);
$__default["default"](window).off(EVENT_RESIZE);
}
};
@@ -409,22 +389,24 @@
this._element.removeAttribute('aria-modal');
this._element.removeAttribute('role');
this._isTransitioning = false;
this._showBackdrop(function () {
$(document.body).removeClass(CLASS_NAME_OPEN);
$__default["default"](document.body).removeClass(CLASS_NAME_OPEN);
_this8._resetAdjustments();
_this8._resetScrollbar();
$(_this8._element).trigger(EVENT_HIDDEN);
$__default["default"](_this8._element).trigger(EVENT_HIDDEN);
});
};
_proto._removeBackdrop = function _removeBackdrop() {
if (this._backdrop) {
$(this._backdrop).remove();
$__default["default"](this._backdrop).remove();
this._backdrop = null;
}
};
@@ -432,7 +414,7 @@
_proto._showBackdrop = function _showBackdrop(callback) {
var _this9 = this;
var animate = $(this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
@@ -442,8 +424,8 @@
this._backdrop.classList.add(animate);
}
$(this._backdrop).appendTo(document.body);
$(this._element).on(EVENT_CLICK_DISMISS, function (event) {
$__default["default"](this._backdrop).appendTo(document.body);
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, function (event) {
if (_this9._ignoreBackdropClick) {
_this9._ignoreBackdropClick = false;
return;
@@ -453,14 +435,18 @@
return;
}
_this9._triggerBackdropTransition();
if (_this9._config.backdrop === 'static') {
_this9._triggerBackdropTransition();
} else {
_this9.hide();
}
});
if (animate) {
Util.reflow(this._backdrop);
Util__default["default"].reflow(this._backdrop);
}
$(this._backdrop).addClass(CLASS_NAME_SHOW);
$__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW);
if (!callback) {
return;
@@ -471,10 +457,10 @@
return;
}
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
var backdropTransitionDuration = Util__default["default"].getTransitionDurationFromElement(this._backdrop);
$__default["default"](this._backdrop).one(Util__default["default"].TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(CLASS_NAME_SHOW);
$__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW);
var callbackRemove = function callbackRemove() {
_this9._removeBackdrop();
@@ -484,10 +470,10 @@
}
};
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE)) {
var _backdropTransitionDuration = Util__default["default"].getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
$__default["default"](this._backdrop).one(Util__default["default"].TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
} else {
callbackRemove();
}
@@ -532,46 +518,46 @@
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
$(fixedContent).each(function (index, element) {
$__default["default"](fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
var calculatedPadding = $__default["default"](element).css('padding-right');
$__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
}); // Adjust sticky content margin
$(stickyContent).each(function (index, element) {
$__default["default"](stickyContent).each(function (index, element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
var calculatedMargin = $__default["default"](element).css('margin-right');
$__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
var calculatedPadding = $(document.body).css('padding-right');
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
var calculatedPadding = $__default["default"](document.body).css('padding-right');
$__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
}
$(document.body).addClass(CLASS_NAME_OPEN);
$__default["default"](document.body).addClass(CLASS_NAME_OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
$(fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right');
$(element).removeData('padding-right');
$__default["default"](fixedContent).each(function (index, element) {
var padding = $__default["default"](element).data('padding-right');
$__default["default"](element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
$(elements).each(function (index, element) {
var margin = $(element).data('margin-right');
$__default["default"](elements).each(function (index, element) {
var margin = $__default["default"](element).data('margin-right');
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removeData('margin-right');
$__default["default"](element).css('margin-right', margin).removeData('margin-right');
}
}); // Restore body padding
var padding = $(document.body).data('padding-right');
$(document.body).removeData('padding-right');
var padding = $__default["default"](document.body).data('padding-right');
$__default["default"](document.body).removeData('padding-right');
document.body.style.paddingRight = padding ? padding : '';
};
@@ -588,13 +574,13 @@
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = $__default["default"](this).data(DATA_KEY);
var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this).data()), typeof config === 'object' && config ? config : {});
var _config = _extends({}, Default, $__default["default"](this).data(), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
$(this).data(DATA_KEY, data);
$__default["default"](this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -624,58 +610,54 @@
return Modal;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
var _this11 = this;
var target;
var selector = Util.getSelectorFromElement(this);
var selector = Util__default["default"].getSelectorFromElement(this);
if (selector) {
target = document.querySelector(selector);
}
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
var config = $__default["default"](target).data(DATA_KEY) ? 'toggle' : _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
var $target = $(target).one(EVENT_SHOW, function (showEvent) {
var $target = $__default["default"](target).one(EVENT_SHOW, function (showEvent) {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
return;
}
$target.one(EVENT_HIDDEN, function () {
if ($(_this11).is(':visible')) {
if ($__default["default"](_this11).is(':visible')) {
_this11.focus();
}
});
});
Modal._jQueryInterface.call($(target), config, this);
Modal._jQueryInterface.call($__default["default"](target), config, this);
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Modal._jQueryInterface;
$.fn[NAME].Constructor = Modal;
$__default["default"].fn[NAME] = Modal._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Modal;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Modal._jQueryInterface;
};
return Modal;
})));
}));
//# sourceMappingURL=modal.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+58 -82
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap popover.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap popover.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
(global = global || self, global.Popover = factory(global.jQuery, global.Tooltip));
}(this, (function ($, Tooltip) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './tooltip'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip));
})(this, (function ($, Tooltip) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,93 +27,71 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
_setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'popover';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.popover';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TITLE = '.popover-header';
var SELECTOR_CONTENT = '.popover-body';
var Default = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, {
var Default = _extends({}, Tooltip__default["default"].Default, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
var DefaultType = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, {
var DefaultType = _extends({}, Tooltip__default["default"].DefaultType, {
content: '(string|element|function)'
});
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TITLE = '.popover-header';
var SELECTOR_CONTENT = '.popover-body';
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
@@ -125,9 +105,7 @@
MOUSELEAVE: "mouseleave" + EVENT_KEY
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Popover = /*#__PURE__*/function (_Tooltip) {
@@ -145,16 +123,16 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
$__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
this.tip = this.tip || $__default["default"](this.config.template)[0];
return this.tip;
};
_proto.setContent = function setContent() {
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
@@ -174,7 +152,7 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var $tip = $__default["default"](this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
@@ -185,7 +163,7 @@
Popover._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = $__default["default"](this).data(DATA_KEY);
var _config = typeof config === 'object' ? config : null;
@@ -195,7 +173,7 @@
if (!data) {
data = new Popover(this, _config);
$(this).data(DATA_KEY, data);
$__default["default"](this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -210,8 +188,8 @@
_createClass(Popover, null, [{
key: "VERSION",
// Getters
get: function get() {
get: // Getters
function get() {
return VERSION;
}
}, {
@@ -247,23 +225,21 @@
}]);
return Popover;
}(Tooltip);
}(Tooltip__default["default"]);
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Popover._jQueryInterface;
$.fn[NAME].Constructor = Popover;
$__default["default"].fn[NAME] = Popover._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Popover;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Popover._jQueryInterface;
};
return Popover;
})));
}));
//# sourceMappingURL=popover.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+67 -104
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap scrollspy.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap scrollspy.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,70 +27,54 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'scrollspy';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
var CLASS_NAME_ACTIVE = 'active';
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
var EVENT_SCROLL = "scroll" + EVENT_KEY;
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var METHOD_OFFSET = 'offset';
var METHOD_POSITION = 'position';
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_NAV_LINKS = '.nav-link';
var SELECTOR_NAV_ITEMS = '.nav-item';
var SELECTOR_LIST_ITEMS = '.list-group-item';
var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
var Default = {
offset: 10,
method: 'auto',
@@ -99,25 +85,8 @@
method: 'string',
target: '(string|element)'
};
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
var EVENT_SCROLL = "scroll" + EVENT_KEY;
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
var CLASS_NAME_ACTIVE = 'active';
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_NAV_LINKS = '.nav-link';
var SELECTOR_NAV_ITEMS = '.nav-item';
var SELECTOR_LIST_ITEMS = '.list-group-item';
var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
var METHOD_OFFSET = 'offset';
var METHOD_POSITION = 'position';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var ScrollSpy = /*#__PURE__*/function () {
@@ -132,7 +101,7 @@
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
$(this._scrollElement).on(EVENT_SCROLL, function (event) {
$__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
@@ -156,7 +125,7 @@
var targets = [].slice.call(document.querySelectorAll(this._selector));
targets.map(function (element) {
var target;
var targetSelector = Util.getSelectorFromElement(element);
var targetSelector = Util__default["default"].getSelectorFromElement(element);
if (targetSelector) {
target = document.querySelector(targetSelector);
@@ -167,14 +136,12 @@
if (targetBCR.width || targetBCR.height) {
// TODO (fat): remove sketch reliance on jQuery position/offset
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector];
}
}
return null;
}).filter(function (item) {
return item;
}).sort(function (a, b) {
}).filter(Boolean).sort(function (a, b) {
return a[0] - b[0];
}).forEach(function (item) {
_this2._offsets.push(item[0]);
@@ -184,8 +151,8 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$(this._scrollElement).off(EVENT_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
$__default["default"](this._scrollElement).off(EVENT_KEY);
this._element = null;
this._scrollElement = null;
this._config = null;
@@ -198,20 +165,20 @@
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2(_objectSpread2({}, Default), typeof config === 'object' && config ? config : {});
config = _extends({}, Default, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
var id = $(config.target).attr('id');
if (typeof config.target !== 'string' && Util__default["default"].isElement(config.target)) {
var id = $__default["default"](config.target).attr('id');
if (!id) {
id = Util.getUID(NAME);
$(config.target).attr('id', id);
id = Util__default["default"].getUID(NAME);
$__default["default"](config.target).attr('id', id);
}
config.target = "#" + id;
}
Util.typeCheckConfig(NAME, config, DefaultType);
Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
return config;
};
@@ -274,7 +241,7 @@
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(','))));
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
$link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);
@@ -289,7 +256,7 @@
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE);
}
$(this._scrollElement).trigger(EVENT_ACTIVATE, {
$__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, {
relatedTarget: target
});
};
@@ -305,13 +272,13 @@
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = $__default["default"](this).data(DATA_KEY);
var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
$(this).data(DATA_KEY, data);
$__default["default"](this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -339,37 +306,33 @@
return ScrollSpy;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(window).on(EVENT_LOAD_DATA_API, function () {
$__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
var scrollSpysLength = scrollSpys.length;
for (var i = scrollSpysLength; i--;) {
var $spy = $(scrollSpys[i]);
var $spy = $__default["default"](scrollSpys[i]);
ScrollSpy._jQueryInterface.call($spy, $spy.data());
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = ScrollSpy._jQueryInterface;
$.fn[NAME].Constructor = ScrollSpy;
$__default["default"].fn[NAME] = ScrollSpy._jQueryInterface;
$__default["default"].fn[NAME].Constructor = ScrollSpy;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return ScrollSpy._jQueryInterface;
};
return ScrollSpy;
})));
}));
//# sourceMappingURL=scrollspy.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+61 -58
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap tab.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap tab.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Tab = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,31 +27,32 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'tab';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_DISABLED = 'disabled';
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_ACTIVE = '.active';
@@ -58,9 +61,7 @@
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Tab = /*#__PURE__*/function () {
@@ -75,33 +76,33 @@
_proto.show = function show() {
var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(CLASS_NAME_ACTIVE) || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || this._element.hasAttribute('disabled')) {
return;
}
var target;
var previous;
var listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
var selector = Util.getSelectorFromElement(this._element);
var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
var selector = Util__default["default"].getSelectorFromElement(this._element);
if (listElement) {
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector));
previous = previous[previous.length - 1];
}
var hideEvent = $.Event(EVENT_HIDE, {
var hideEvent = $__default["default"].Event(EVENT_HIDE, {
relatedTarget: this._element
});
var showEvent = $.Event(EVENT_SHOW, {
var showEvent = $__default["default"].Event(EVENT_SHOW, {
relatedTarget: previous
});
if (previous) {
$(previous).trigger(hideEvent);
$__default["default"](previous).trigger(hideEvent);
}
$(this._element).trigger(showEvent);
$__default["default"](this._element).trigger(showEvent);
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
return;
@@ -114,14 +115,14 @@
this._activate(this._element, listElement);
var complete = function complete() {
var hiddenEvent = $.Event(EVENT_HIDDEN, {
var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN, {
relatedTarget: _this._element
});
var shownEvent = $.Event(EVENT_SHOWN, {
var shownEvent = $__default["default"].Event(EVENT_SHOWN, {
relatedTarget: previous
});
$(previous).trigger(hiddenEvent);
$(_this._element).trigger(shownEvent);
$__default["default"](previous).trigger(hiddenEvent);
$__default["default"](_this._element).trigger(shownEvent);
};
if (target) {
@@ -132,7 +133,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$__default["default"].removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
@@ -140,17 +141,17 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(SELECTOR_ACTIVE_UL) : $(container).children(SELECTOR_ACTIVE);
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(CLASS_NAME_FADE);
var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
var transitionDuration = Util.getTransitionDurationFromElement(active);
$(active).removeClass(CLASS_NAME_SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(active);
$__default["default"](active).removeClass(CLASS_NAME_SHOW).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
@@ -158,11 +159,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
$(active).removeClass(CLASS_NAME_ACTIVE);
var dropdownChild = $(active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
$__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
if (dropdownChild) {
$(dropdownChild).removeClass(CLASS_NAME_ACTIVE);
$__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
}
if (active.getAttribute('role') === 'tab') {
@@ -170,24 +171,30 @@
}
}
$(element).addClass(CLASS_NAME_ACTIVE);
$__default["default"](element).addClass(CLASS_NAME_ACTIVE);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
Util.reflow(element);
Util__default["default"].reflow(element);
if (element.classList.contains(CLASS_NAME_FADE)) {
element.classList.add(CLASS_NAME_SHOW);
}
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0];
var parent = element.parentNode;
if (parent && parent.nodeName === 'LI') {
parent = parent.parentNode;
}
if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0];
if (dropdownElement) {
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
$(dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
$__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
}
element.setAttribute('aria-expanded', true);
@@ -201,7 +208,7 @@
Tab._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var $this = $__default["default"](this);
var data = $this.data(DATA_KEY);
if (!data) {
@@ -229,32 +236,28 @@
return Tab;
}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
Tab._jQueryInterface.call($(this), 'show');
Tab._jQueryInterface.call($__default["default"](this), 'show');
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Tab._jQueryInterface;
$.fn[NAME].Constructor = Tab;
$__default["default"].fn[NAME] = Tab._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Tab;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Tab._jQueryInterface;
};
return Tab;
})));
}));
//# sourceMappingURL=tab.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+68 -95
View File
@@ -1,16 +1,18 @@
/*!
* Bootstrap toast.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap toast.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Toast = factory(global.jQuery, global.Util));
}(this, (function ($, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.jQuery, global.Util));
})(this, (function ($, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -25,93 +27,60 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'toast';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_HIDE = 'hide';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_SHOWING = 'showing';
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
var EVENT_SHOWN = "shown" + EVENT_KEY;
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_HIDE = 'hide';
var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_SHOWING = 'showing';
var DefaultType = {
animation: 'boolean',
autohide: 'boolean',
delay: 'number'
};
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
var Default = {
animation: true,
autohide: true,
delay: 500
};
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
var DefaultType = {
animation: 'boolean',
autohide: 'boolean',
delay: 'number'
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Toast = /*#__PURE__*/function () {
@@ -130,13 +99,15 @@
_proto.show = function show() {
var _this = this;
var showEvent = $.Event(EVENT_SHOW);
$(this._element).trigger(showEvent);
var showEvent = $__default["default"].Event(EVENT_SHOW);
$__default["default"](this._element).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
return;
}
this._clearTimeout();
if (this._config.animation) {
this._element.classList.add(CLASS_NAME_FADE);
}
@@ -146,7 +117,7 @@
_this._element.classList.add(CLASS_NAME_SHOW);
$(_this._element).trigger(EVENT_SHOWN);
$__default["default"](_this._element).trigger(EVENT_SHOWN);
if (_this._config.autohide) {
_this._timeout = setTimeout(function () {
@@ -157,13 +128,13 @@
this._element.classList.remove(CLASS_NAME_HIDE);
Util.reflow(this._element);
Util__default["default"].reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
@@ -174,8 +145,8 @@
return;
}
var hideEvent = $.Event(EVENT_HIDE);
$(this._element).trigger(hideEvent);
var hideEvent = $__default["default"].Event(EVENT_HIDE);
$__default["default"](this._element).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
return;
@@ -185,30 +156,29 @@
};
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
this._timeout = null;
this._clearTimeout();
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(CLASS_NAME_SHOW);
}
$(this._element).off(EVENT_CLICK_DISMISS);
$.removeData(this._element, DATA_KEY);
$__default["default"](this._element).off(EVENT_CLICK_DISMISS);
$__default["default"].removeData(this._element, DATA_KEY);
this._element = null;
this._config = null;
} // Private
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this._element).data()), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
config = _extends({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
var _this2 = this;
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
return _this2.hide();
});
};
@@ -219,23 +189,28 @@
var complete = function complete() {
_this3._element.classList.add(CLASS_NAME_HIDE);
$(_this3._element).trigger(EVENT_HIDDEN);
$__default["default"](_this3._element).trigger(EVENT_HIDDEN);
};
this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
};
_proto._clearTimeout = function _clearTimeout() {
clearTimeout(this._timeout);
this._timeout = null;
} // Static
;
Toast._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var $element = $__default["default"](this);
var data = $element.data(DATA_KEY);
var _config = typeof config === 'object' && config;
@@ -275,21 +250,19 @@
return Toast;
}();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Toast._jQueryInterface;
$.fn[NAME].Constructor = Toast;
$__default["default"].fn[NAME] = Toast._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Toast;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Toast._jQueryInterface;
};
return Toast;
})));
}));
//# sourceMappingURL=toast.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+138 -166
View File
@@ -1,17 +1,19 @@
/*!
* Bootstrap tooltip.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap tooltip.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
(global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
}(this, (function ($, Popper, Util) { 'use strict';
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
})(this, (function ($, Popper, Util) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@@ -26,62 +28,33 @@
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
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;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
}
return target;
return target;
};
return _extends.apply(this, arguments);
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
@@ -122,14 +95,14 @@
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
*/
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
@@ -139,7 +112,7 @@
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
}
return true;
@@ -150,7 +123,7 @@
}); // Check if a regular expression validates the attribute.
for (var i = 0, len = regExp.length; i < len; i++) {
if (attrName.match(regExp[i])) {
if (regExp[i].test(attrName)) {
return true;
}
}
@@ -181,7 +154,8 @@
return "continue";
}
var attributeList = [].slice.call(el.attributes);
var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) {
@@ -200,37 +174,27 @@
}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'tooltip';
var VERSION = '4.5.0';
var VERSION = '4.6.2';
var DATA_KEY = 'bs.tooltip';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
var DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
offset: '(number|string|function)',
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)',
boundary: '(string|element)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
whiteList: 'object',
popperConfig: '(null|object)'
};
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var HOVER_STATE_SHOW = 'show';
var HOVER_STATE_OUT = 'out';
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
var SELECTOR_ARROW = '.arrow';
var TRIGGER_HOVER = 'hover';
var TRIGGER_FOCUS = 'focus';
var TRIGGER_CLICK = 'click';
var TRIGGER_MANUAL = 'manual';
var AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
@@ -251,13 +215,31 @@
container: false,
fallbackPlacement: 'flip',
boundary: 'scrollParent',
customClass: '',
sanitize: true,
sanitizeFn: null,
whiteList: DefaultWhitelist,
popperConfig: null
};
var HOVER_STATE_SHOW = 'show';
var HOVER_STATE_OUT = 'out';
var DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
trigger: 'string',
delay: '(number|object)',
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
offset: '(number|string|function)',
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)',
boundary: '(string|element)',
customClass: '(string|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
whiteList: 'object',
popperConfig: '(null|object)'
};
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
@@ -270,25 +252,15 @@
MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY
};
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
var SELECTOR_ARROW = '.arrow';
var TRIGGER_HOVER = 'hover';
var TRIGGER_FOCUS = 'focus';
var TRIGGER_CLICK = 'click';
var TRIGGER_MANUAL = 'manual';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
var Tooltip = /*#__PURE__*/function () {
function Tooltip(element, config) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
} // private
if (typeof Popper__default["default"] === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
} // Private
this._isEnabled = true;
@@ -327,11 +299,11 @@
if (event) {
var dataKey = this.constructor.DATA_KEY;
var context = $(event.currentTarget).data(dataKey);
var context = $__default["default"](event.currentTarget).data(dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
$__default["default"](event.currentTarget).data(dataKey, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
@@ -342,7 +314,7 @@
context._leave(null, context);
}
} else {
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
this._leave(null, this);
return;
@@ -354,12 +326,12 @@
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
$.removeData(this.element, this.constructor.DATA_KEY);
$(this.element).off(this.constructor.EVENT_KEY);
$(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
$__default["default"].removeData(this.element, this.constructor.DATA_KEY);
$__default["default"](this.element).off(this.constructor.EVENT_KEY);
$__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
if (this.tip) {
$(this.tip).remove();
$__default["default"](this.tip).remove();
}
this._isEnabled = null;
@@ -380,29 +352,29 @@
_proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
if ($__default["default"](this.element).css('display') === 'none') {
throw new Error('Please use show on visible elements');
}
var showEvent = $.Event(this.constructor.Event.SHOW);
var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent);
var shadowRoot = Util.findShadowRoot(this.element);
var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
$__default["default"](this.element).trigger(showEvent);
var shadowRoot = Util__default["default"].findShadowRoot(this.element);
var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
if (showEvent.isDefaultPrevented() || !isInTheDom) {
return;
}
var tip = this.getTipElement();
var tipId = Util.getUID(this.constructor.NAME);
var tipId = Util__default["default"].getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
$(tip).addClass(CLASS_NAME_FADE);
$__default["default"](tip).addClass(CLASS_NAME_FADE);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@@ -413,21 +385,22 @@
var container = this._getContainer();
$(tip).data(this.constructor.DATA_KEY, this);
$__default["default"](tip).data(this.constructor.DATA_KEY, this);
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
$(tip).appendTo(container);
if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
$__default["default"](tip).appendTo(container);
}
$(this.element).trigger(this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
$(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
$__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
this._popper = new Popper__default["default"](this.element, tip, this._getPopperConfig(attachment));
$__default["default"](tip).addClass(CLASS_NAME_SHOW);
$__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
$(document.body).children().on('mouseover', null, $.noop);
$__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
}
var complete = function complete() {
@@ -437,16 +410,16 @@
var prevHoverState = _this._hoverState;
_this._hoverState = null;
$(_this.element).trigger(_this.constructor.Event.SHOWN);
$__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
if (prevHoverState === HOVER_STATE_OUT) {
_this._leave(null, _this);
}
};
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE)) {
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this.tip);
$__default["default"](this.tip).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
@@ -457,7 +430,7 @@
var _this2 = this;
var tip = this.getTipElement();
var hideEvent = $.Event(this.constructor.Event.HIDE);
var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
@@ -468,7 +441,7 @@
_this2.element.removeAttribute('aria-describedby');
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
$__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
if (_this2._popper !== null) {
_this2._popper.destroy();
@@ -479,26 +452,26 @@
}
};
$(this.element).trigger(hideEvent);
$__default["default"](this.element).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
return;
}
$(tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
$__default["default"](tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
$__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
}
this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false;
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(tip);
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE)) {
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(tip);
$__default["default"](tip).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
} else {
complete();
}
@@ -518,29 +491,29 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
$__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
this.tip = this.tip || $__default["default"](this.config.template)[0];
return this.tip;
};
_proto.setContent = function setContent() {
var tip = this.getTipElement();
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
$__default["default"](tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
};
_proto.setElementContent = function setElementContent($element, content) {
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// Content is a DOM node or a jQuery
if (this.config.html) {
if (!$(content).parent().is($element)) {
if (!$__default["default"](content).parent().is($element)) {
$element.empty().append(content);
}
} else {
$element.text($(content).text());
$element.text($__default["default"](content).text());
}
return;
@@ -594,7 +567,7 @@
return _this3._handlePopperPlacementChange(data);
}
};
return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig);
return _extends({}, defaultBsConfig, this.config.popperConfig);
};
_proto._getOffset = function _getOffset() {
@@ -604,7 +577,7 @@
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
return data;
};
} else {
@@ -619,11 +592,11 @@
return document.body;
}
if (Util.isElement(this.config.container)) {
return $(this.config.container);
if (Util__default["default"].isElement(this.config.container)) {
return $__default["default"](this.config.container);
}
return $(document).find(this.config.container);
return $__default["default"](document).find(this.config.container);
};
_proto._getAttachment = function _getAttachment(placement) {
@@ -636,13 +609,13 @@
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
$(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
$__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
return _this5.toggle(event);
});
} else if (trigger !== TRIGGER_MANUAL) {
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
$(_this5.element).on(eventIn, _this5.config.selector, function (event) {
$__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
return _this5._enter(event);
}).on(eventOut, _this5.config.selector, function (event) {
return _this5._leave(event);
@@ -656,10 +629,10 @@
}
};
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
$__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
if (this.config.selector) {
this.config = _objectSpread2(_objectSpread2({}, this.config), {}, {
this.config = _extends({}, this.config, {
trigger: 'manual',
selector: ''
});
@@ -679,18 +652,18 @@
_proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || $__default["default"](event.currentTarget).data(dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
$__default["default"](event.currentTarget).data(dataKey, context);
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
}
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW;
return;
}
@@ -712,11 +685,11 @@
_proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || $__default["default"](event.currentTarget).data(dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
$__default["default"](event.currentTarget).data(dataKey, context);
}
if (event) {
@@ -753,13 +726,13 @@
};
_proto._getConfig = function _getConfig(config) {
var dataAttributes = $(this.element).data();
var dataAttributes = $__default["default"](this.element).data();
Object.keys(dataAttributes).forEach(function (dataAttr) {
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
delete dataAttributes[dataAttr];
}
});
config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
@@ -776,7 +749,7 @@
config.content = config.content.toString();
}
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@@ -800,7 +773,7 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var $tip = $__default["default"](this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length) {
@@ -824,7 +797,7 @@
return;
}
$(tip).removeClass(CLASS_NAME_FADE);
$__default["default"](tip).removeClass(CLASS_NAME_FADE);
this.config.animation = false;
this.hide();
this.show();
@@ -834,7 +807,8 @@
Tooltip._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var $element = $__default["default"](this);
var data = $element.data(DATA_KEY);
var _config = typeof config === 'object' && config;
@@ -844,7 +818,7 @@
if (!data) {
data = new Tooltip(this, _config);
$(this).data(DATA_KEY, data);
$element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -897,21 +871,19 @@
return Tooltip;
}();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Tooltip._jQueryInterface;
$.fn[NAME].Constructor = Tooltip;
$__default["default"].fn[NAME] = Tooltip._jQueryInterface;
$__default["default"].fn[NAME].Constructor = Tooltip;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
$__default["default"].fn[NAME].noConflict = function () {
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
return Tooltip._jQueryInterface;
};
return Tooltip;
})));
}));
//# sourceMappingURL=tooltip.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+22 -25
View File
@@ -1,26 +1,26 @@
/*!
* Bootstrap util.js v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap util.js v4.6.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, global.Util = factory(global.jQuery));
}(this, (function ($) { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery));
})(this, (function ($) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var TRANSITION_END = 'transitionend';
@@ -40,7 +40,7 @@
bindType: TRANSITION_END,
delegateType: TRANSITION_END,
handle: function handle(event) {
if ($(event.target).is(this)) {
if ($__default["default"](event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
@@ -53,7 +53,7 @@
var _this = this;
var called = false;
$(this).one(Util.TRANSITION_END, function () {
$__default["default"](this).one(Util.TRANSITION_END, function () {
called = true;
});
setTimeout(function () {
@@ -65,13 +65,11 @@
}
function setTransitionEndSupport() {
$.fn.emulateTransitionEnd = transitionEndEmulator;
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
$__default["default"].fn.emulateTransitionEnd = transitionEndEmulator;
$__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
}
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
* Public Util API
*/
@@ -95,7 +93,7 @@
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
} catch (_) {
return null;
}
},
@@ -105,8 +103,8 @@
} // Get transition-duration of the element
var transitionDuration = $(element).css('transition-duration');
var transitionDelay = $(element).css('transition-delay');
var transitionDuration = $__default["default"](element).css('transition-duration');
var transitionDelay = $__default["default"](element).css('transition-delay');
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
@@ -123,9 +121,8 @@
return element.offsetHeight;
},
triggerTransitionEnd: function triggerTransitionEnd(element) {
$(element).trigger(TRANSITION_END);
$__default["default"](element).trigger(TRANSITION_END);
},
// TODO: Remove in v5
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(TRANSITION_END);
},
@@ -168,11 +165,11 @@
return Util.findShadowRoot(element.parentNode);
},
jQueryDetection: function jQueryDetection() {
if (typeof $ === 'undefined') {
if (typeof $__default["default"] === 'undefined') {
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
}
var version = $.fn.jquery.split(' ')[0].split('.');
var version = $__default["default"].fn.jquery.split(' ')[0].split('.');
var minMajor = 1;
var ltMajor = 2;
var minMinor = 9;
@@ -189,5 +186,5 @@
return Util;
})));
}));
//# sourceMappingURL=util.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+19
View File
@@ -0,0 +1,19 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.6.2): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
export { default as Alert } from './src/alert'
export { default as Button } from './src/button'
export { default as Carousel } from './src/carousel'
export { default as Collapse } from './src/collapse'
export { default as Dropdown } from './src/dropdown'
export { default as Modal } from './src/modal'
export { default as Popover } from './src/popover'
export { default as Scrollspy } from './src/scrollspy'
export { default as Tab } from './src/tab'
export { default as Toast } from './src/toast'
export { default as Tooltip } from './src/tooltip'
export { default as Util } from './src/util'
+23 -35
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,32 +9,28 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'alert'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const NAME = 'alert'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_NAME_ALERT = 'alert'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const EVENT_CLOSE = `close${EVENT_KEY}`
const EVENT_CLOSED = `closed${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const SELECTOR_DISMISS = '[data-dismiss="alert"]'
const EVENT_CLOSE = `close${EVENT_KEY}`
const EVENT_CLOSED = `closed${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_ALERT = 'alert'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Alert {
@@ -43,13 +39,11 @@ class Alert {
}
// Getters
static get VERSION() {
return VERSION
}
// Public
close(element) {
let rootElement = this._element
if (element) {
@@ -71,10 +65,9 @@ class Alert {
}
// Private
_getRootElement(element) {
const selector = Util.getSelectorFromElement(element)
let parent = false
let parent = false
if (selector) {
parent = document.querySelector(selector)
@@ -105,7 +98,7 @@ class Alert {
const transitionDuration = Util.getTransitionDurationFromElement(element)
$(element)
.one(Util.TRANSITION_END, (event) => this._destroyElement(element, event))
.one(Util.TRANSITION_END, event => this._destroyElement(element, event))
.emulateTransitionEnd(transitionDuration)
}
@@ -117,11 +110,10 @@ class Alert {
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
const $element = $(this)
let data = $element.data(DATA_KEY)
let data = $element.data(DATA_KEY)
if (!data) {
data = new Alert(this)
@@ -146,9 +138,7 @@ class Alert {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(
@@ -158,14 +148,12 @@ $(document).on(
)
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Alert._jQueryInterface
$.fn[NAME] = Alert._jQueryInterface
$.fn[NAME].Constructor = Alert
$.fn[NAME].noConflict = () => {
$.fn[NAME].noConflict = () => {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Alert._jQueryInterface
}
+39 -48
View File
@@ -1,75 +1,67 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
import $ from 'jquery'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'button'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.button'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const NAME = 'button'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.button'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_BUTTON = 'btn'
const CLASS_NAME_FOCUS = 'focus'
const CLASS_NAME_FOCUS = 'focus'
const SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'
const SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'
const SELECTOR_DATA_TOGGLE = '[data-toggle="button"]'
const SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'
const SELECTOR_INPUT = 'input:not([type="hidden"])'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_BUTTON = '.btn'
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` +
`blur${EVENT_KEY}${DATA_API_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'
const SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'
const SELECTOR_DATA_TOGGLE = '[data-toggle="button"]'
const SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'
const SELECTOR_INPUT = 'input:not([type="hidden"])'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_BUTTON = '.btn'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Button {
constructor(element) {
this._element = element
this.shouldAvoidTriggerChange = false
}
// Getters
static get VERSION() {
return VERSION
}
// Public
toggle() {
let triggerChangeEvent = true
let addAriaPressed = true
const rootElement = $(this._element).closest(
SELECTOR_DATA_TOGGLES
)[0]
const rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]
if (rootElement) {
const input = this._element.querySelector(SELECTOR_INPUT)
if (input) {
if (input.type === 'radio') {
if (input.checked &&
this._element.classList.contains(CLASS_NAME_ACTIVE)) {
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
triggerChangeEvent = false
} else {
const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)
@@ -85,7 +77,10 @@ class Button {
if (input.type === 'checkbox' || input.type === 'radio') {
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE)
}
$(input).trigger('change')
if (!this.shouldAvoidTriggerChange) {
$(input).trigger('change')
}
}
input.focus()
@@ -95,8 +90,7 @@ class Button {
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
if (addAriaPressed) {
this._element.setAttribute('aria-pressed',
!this._element.classList.contains(CLASS_NAME_ACTIVE))
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE))
}
if (triggerChangeEvent) {
@@ -111,16 +105,18 @@ class Button {
}
// Static
static _jQueryInterface(config) {
static _jQueryInterface(config, avoidTriggerChange) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const $element = $(this)
let data = $element.data(DATA_KEY)
if (!data) {
data = new Button(this)
$(this).data(DATA_KEY, data)
$element.data(DATA_KEY, data)
}
data.shouldAvoidTriggerChange = avoidTriggerChange
if (config === 'toggle') {
data[config]()
}
@@ -129,13 +125,11 @@ class Button {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document)
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, (event) => {
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {
let button = event.target
const initialButton = button
@@ -153,13 +147,12 @@ $(document)
return
}
if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') {
event.preventDefault() // work around event sent to label and input
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
Button._jQueryInterface.call($(button), 'toggle', initialButton.tagName === 'INPUT')
}
Button._jQueryInterface.call($(button), 'toggle')
}
})
.on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, (event) => {
.on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {
const button = $(event.target).closest(SELECTOR_BUTTON)[0]
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type))
})
@@ -192,9 +185,7 @@ $(window).on(EVENT_LOAD_DATA_API, () => {
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Button._jQueryInterface
+136 -134
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,109 +9,105 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'carousel'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.carousel'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key
const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key
const NAME = 'carousel'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.carousel'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key
const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key
const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch
const SWIPE_THRESHOLD = 40
const SWIPE_THRESHOLD = 40
const CLASS_NAME_CAROUSEL = 'carousel'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_SLIDE = 'slide'
const CLASS_NAME_RIGHT = 'carousel-item-right'
const CLASS_NAME_LEFT = 'carousel-item-left'
const CLASS_NAME_NEXT = 'carousel-item-next'
const CLASS_NAME_PREV = 'carousel-item-prev'
const CLASS_NAME_POINTER_EVENT = 'pointer-event'
const DIRECTION_NEXT = 'next'
const DIRECTION_PREV = 'prev'
const DIRECTION_LEFT = 'left'
const DIRECTION_RIGHT = 'right'
const EVENT_SLIDE = `slide${EVENT_KEY}`
const EVENT_SLID = `slid${EVENT_KEY}`
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`
const EVENT_TOUCHEND = `touchend${EVENT_KEY}`
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`
const EVENT_POINTERUP = `pointerup${EVENT_KEY}`
const EVENT_DRAG_START = `dragstart${EVENT_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const SELECTOR_ACTIVE = '.active'
const SELECTOR_ACTIVE_ITEM = '.active.carousel-item'
const SELECTOR_ITEM = '.carousel-item'
const SELECTOR_ITEM_IMG = '.carousel-item img'
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
const SELECTOR_INDICATORS = '.carousel-indicators'
const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'
const SELECTOR_DATA_RIDE = '[data-ride="carousel"]'
const Default = {
interval : 5000,
keyboard : true,
slide : false,
pause : 'hover',
wrap : true,
touch : true
interval: 5000,
keyboard: true,
slide: false,
pause: 'hover',
wrap: true,
touch: true
}
const DefaultType = {
interval : '(number|boolean)',
keyboard : 'boolean',
slide : '(boolean|string)',
pause : '(string|boolean)',
wrap : 'boolean',
touch : 'boolean'
interval: '(number|boolean)',
keyboard: 'boolean',
slide: '(boolean|string)',
pause: '(string|boolean)',
wrap: 'boolean',
touch: 'boolean'
}
const DIRECTION_NEXT = 'next'
const DIRECTION_PREV = 'prev'
const DIRECTION_LEFT = 'left'
const DIRECTION_RIGHT = 'right'
const EVENT_SLIDE = `slide${EVENT_KEY}`
const EVENT_SLID = `slid${EVENT_KEY}`
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`
const EVENT_TOUCHEND = `touchend${EVENT_KEY}`
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`
const EVENT_POINTERUP = `pointerup${EVENT_KEY}`
const EVENT_DRAG_START = `dragstart${EVENT_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_CAROUSEL = 'carousel'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_SLIDE = 'slide'
const CLASS_NAME_RIGHT = 'carousel-item-right'
const CLASS_NAME_LEFT = 'carousel-item-left'
const CLASS_NAME_NEXT = 'carousel-item-next'
const CLASS_NAME_PREV = 'carousel-item-prev'
const CLASS_NAME_POINTER_EVENT = 'pointer-event'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_ACTIVE_ITEM = '.active.carousel-item'
const SELECTOR_ITEM = '.carousel-item'
const SELECTOR_ITEM_IMG = '.carousel-item img'
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
const SELECTOR_INDICATORS = '.carousel-indicators'
const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'
const SELECTOR_DATA_RIDE = '[data-ride="carousel"]'
const PointerType = {
TOUCH : 'touch',
PEN : 'pen'
TOUCH: 'touch',
PEN: 'pen'
}
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Carousel {
constructor(element, config) {
this._items = null
this._interval = null
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._isPaused = false
this._isSliding = false
this.touchTimeout = null
this.touchStartX = 0
this.touchDeltaX = 0
this._config = this._getConfig(config)
this._element = element
this._config = this._getConfig(config)
this._element = element
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS)
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)
this._addEventListeners()
}
// Getters
static get VERSION() {
return VERSION
}
@@ -121,7 +117,6 @@ class Carousel {
}
// Public
next() {
if (!this._isSliding) {
this._slide(DIRECTION_NEXT)
@@ -129,10 +124,11 @@ class Carousel {
}
nextWhenVisible() {
const $element = $(this._element)
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
if (!document.hidden &&
($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) {
($element.is(':visible') && $element.css('visibility') !== 'hidden')) {
this.next()
}
}
@@ -168,6 +164,8 @@ class Carousel {
}
if (this._config.interval && !this._isPaused) {
this._updateInterval()
this._interval = setInterval(
(document.visibilityState ? this.nextWhenVisible : this.next).bind(this),
this._config.interval
@@ -195,9 +193,9 @@ class Carousel {
return
}
const direction = index > activeIndex
? DIRECTION_NEXT
: DIRECTION_PREV
const direction = index > activeIndex ?
DIRECTION_NEXT :
DIRECTION_PREV
this._slide(direction, this._items[index])
}
@@ -206,18 +204,17 @@ class Carousel {
$(this._element).off(EVENT_KEY)
$.removeData(this._element, DATA_KEY)
this._items = null
this._config = null
this._element = null
this._interval = null
this._isPaused = null
this._isSliding = null
this._activeElement = null
this._items = null
this._config = null
this._element = null
this._interval = null
this._isPaused = null
this._isSliding = null
this._activeElement = null
this._indicatorsElement = null
}
// Private
_getConfig(config) {
config = {
...Default,
@@ -251,13 +248,13 @@ class Carousel {
_addEventListeners() {
if (this._config.keyboard) {
$(this._element).on(EVENT_KEYDOWN, (event) => this._keydown(event))
$(this._element).on(EVENT_KEYDOWN, event => this._keydown(event))
}
if (this._config.pause === 'hover') {
$(this._element)
.on(EVENT_MOUSEENTER, (event) => this.pause(event))
.on(EVENT_MOUSELEAVE, (event) => this.cycle(event))
.on(EVENT_MOUSEENTER, event => this.pause(event))
.on(EVENT_MOUSELEAVE, event => this.cycle(event))
}
if (this._config.touch) {
@@ -270,7 +267,7 @@ class Carousel {
return
}
const start = (event) => {
const start = event => {
if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
this.touchStartX = event.originalEvent.clientX
} else if (!this._pointerEvent) {
@@ -278,16 +275,14 @@ class Carousel {
}
}
const move = (event) => {
const move = event => {
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
this.touchDeltaX = 0
} else {
this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX
}
this.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ?
0 :
event.originalEvent.touches[0].clientX - this.touchStartX
}
const end = (event) => {
const end = event => {
if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
this.touchDeltaX = event.originalEvent.clientX - this.touchStartX
}
@@ -306,22 +301,23 @@ class Carousel {
if (this.touchTimeout) {
clearTimeout(this.touchTimeout)
}
this.touchTimeout = setTimeout((event) => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)
this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)
}
}
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG))
.on(EVENT_DRAG_START, (e) => e.preventDefault())
.on(EVENT_DRAG_START, e => e.preventDefault())
if (this._pointerEvent) {
$(this._element).on(EVENT_POINTERDOWN, (event) => start(event))
$(this._element).on(EVENT_POINTERUP, (event) => end(event))
$(this._element).on(EVENT_POINTERDOWN, event => start(event))
$(this._element).on(EVENT_POINTERUP, event => end(event))
this._element.classList.add(CLASS_NAME_POINTER_EVENT)
} else {
$(this._element).on(EVENT_TOUCHSTART, (event) => start(event))
$(this._element).on(EVENT_TOUCHMOVE, (event) => move(event))
$(this._element).on(EVENT_TOUCHEND, (event) => end(event))
$(this._element).on(EVENT_TOUCHSTART, event => start(event))
$(this._element).on(EVENT_TOUCHMOVE, event => move(event))
$(this._element).on(EVENT_TOUCHEND, event => end(event))
}
}
@@ -344,29 +340,29 @@ class Carousel {
}
_getItemIndex(element) {
this._items = element && element.parentNode
? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM))
: []
this._items = element && element.parentNode ?
[].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) :
[]
return this._items.indexOf(element)
}
_getItemByDirection(direction, activeElement) {
const isNextDirection = direction === DIRECTION_NEXT
const isPrevDirection = direction === DIRECTION_PREV
const activeIndex = this._getItemIndex(activeElement)
const lastItemIndex = this._items.length - 1
const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
const activeIndex = this._getItemIndex(activeElement)
const lastItemIndex = this._items.length - 1
const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
isNextDirection && activeIndex === lastItemIndex
if (isGoingToWrap && !this._config.wrap) {
return activeElement
}
const delta = direction === DIRECTION_PREV ? -1 : 1
const delta = direction === DIRECTION_PREV ? -1 : 1
const 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]
}
_triggerSlideEvent(relatedTarget, eventDirectionName) {
@@ -399,10 +395,27 @@ class Carousel {
}
}
_updateInterval() {
const element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM)
if (!element) {
return
}
const elementInterval = parseInt(element.getAttribute('data-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
}
}
_slide(direction, element) {
const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
const activeElementIndex = this._getItemIndex(activeElement)
const nextElement = element || activeElement &&
const nextElement = element || activeElement &&
this._getItemByDirection(direction, activeElement)
const nextElementIndex = this._getItemIndex(nextElement)
const isCycling = Boolean(this._interval)
@@ -443,6 +456,7 @@ class Carousel {
}
this._setActiveIndicatorElement(nextElement)
this._activeElement = nextElement
const slidEvent = $.Event(EVENT_SLID, {
relatedTarget: nextElement,
@@ -459,14 +473,6 @@ class Carousel {
$(activeElement).addClass(directionalClassName)
$(nextElement).addClass(directionalClassName)
const 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
}
const transitionDuration = Util.getTransitionDurationFromElement(activeElement)
$(activeElement)
@@ -496,7 +502,6 @@ class Carousel {
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
@@ -525,6 +530,7 @@ class Carousel {
if (typeof data[action] === 'undefined') {
throw new TypeError(`No method named "${action}"`)
}
data[action]()
} else if (_config.interval && _config.ride) {
data.pause()
@@ -567,9 +573,7 @@ class Carousel {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler)
@@ -583,9 +587,7 @@ $(window).on(EVENT_LOAD_DATA_API, () => {
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Carousel._jQueryInterface
+48 -59
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,57 +9,53 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'collapse'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.collapse'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const NAME = 'collapse'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.collapse'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_COLLAPSE = 'collapse'
const CLASS_NAME_COLLAPSING = 'collapsing'
const CLASS_NAME_COLLAPSED = 'collapsed'
const DIMENSION_WIDTH = 'width'
const DIMENSION_HEIGHT = 'height'
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const SELECTOR_ACTIVES = '.show, .collapsing'
const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'
const Default = {
toggle : true,
parent : ''
toggle: true,
parent: ''
}
const DefaultType = {
toggle : 'boolean',
parent : '(string|element)'
toggle: 'boolean',
parent: '(string|element)'
}
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_COLLAPSE = 'collapse'
const CLASS_NAME_COLLAPSING = 'collapsing'
const CLASS_NAME_COLLAPSED = 'collapsed'
const DIMENSION_WIDTH = 'width'
const DIMENSION_HEIGHT = 'height'
const SELECTOR_ACTIVES = '.show, .collapsing'
const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Collapse {
constructor(element, config) {
this._isTransitioning = false
this._element = element
this._config = this._getConfig(config)
this._triggerArray = [].slice.call(document.querySelectorAll(
this._element = element
this._config = this._getConfig(config)
this._triggerArray = [].slice.call(document.querySelectorAll(
`[data-toggle="collapse"][href="#${element.id}"],` +
`[data-toggle="collapse"][data-target="#${element.id}"]`
))
@@ -69,7 +65,7 @@ class Collapse {
const elem = toggleList[i]
const selector = Util.getSelectorFromElement(elem)
const filterElement = [].slice.call(document.querySelectorAll(selector))
.filter((foundElem) => foundElem === element)
.filter(foundElem => foundElem === element)
if (selector !== null && filterElement.length > 0) {
this._selector = selector
@@ -89,7 +85,6 @@ class Collapse {
}
// Getters
static get VERSION() {
return VERSION
}
@@ -99,7 +94,6 @@ class Collapse {
}
// Public
toggle() {
if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
this.hide()
@@ -119,7 +113,7 @@ class Collapse {
if (this._parent) {
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES))
.filter((elem) => {
.filter(elem => {
if (typeof this._config.parent === 'string') {
return elem.getAttribute('data-parent') === this._config.parent
}
@@ -254,15 +248,14 @@ class Collapse {
dispose() {
$.removeData(this._element, DATA_KEY)
this._config = null
this._parent = null
this._element = null
this._triggerArray = null
this._config = null
this._parent = null
this._element = null
this._triggerArray = null
this._isTransitioning = null
}
// Private
_getConfig(config) {
config = {
...Default,
@@ -316,7 +309,6 @@ class Collapse {
}
// Static
static _getTargetFromElement(element) {
const selector = Util.getSelectorFromElement(element)
return selector ? document.querySelector(selector) : null
@@ -324,12 +316,12 @@ class Collapse {
static _jQueryInterface(config) {
return this.each(function () {
const $this = $(this)
let data = $this.data(DATA_KEY)
const $element = $(this)
let data = $element.data(DATA_KEY)
const _config = {
...Default,
...$this.data(),
...typeof config === 'object' && config ? config : {}
...$element.data(),
...(typeof config === 'object' && config ? config : {})
}
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
@@ -338,13 +330,14 @@ class Collapse {
if (!data) {
data = new Collapse(this, _config)
$this.data(DATA_KEY, data)
$element.data(DATA_KEY, data)
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
data[config]()
}
})
@@ -352,9 +345,7 @@ class Collapse {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
@@ -369,16 +360,14 @@ $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
$(selectors).each(function () {
const $target = $(this)
const data = $target.data(DATA_KEY)
const config = data ? 'toggle' : $trigger.data()
const data = $target.data(DATA_KEY)
const config = data ? 'toggle' : $trigger.data()
Collapse._jQueryInterface.call($target, config)
})
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Collapse._jQueryInterface
+76 -87
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -10,92 +10,87 @@ import Popper from 'popper.js'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'dropdown'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key
const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key
const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key
const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key
const NAME = 'dropdown'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key
const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key
const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key
const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key
const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_CLICK = `click${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_DROPUP = 'dropup'
const CLASS_NAME_DROPRIGHT = 'dropright'
const CLASS_NAME_DROPLEFT = 'dropleft'
const CLASS_NAME_MENURIGHT = 'dropdown-menu-right'
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_DROPUP = 'dropup'
const CLASS_NAME_DROPRIGHT = 'dropright'
const CLASS_NAME_DROPLEFT = 'dropleft'
const CLASS_NAME_MENURIGHT = 'dropdown-menu-right'
const CLASS_NAME_POSITION_STATIC = 'position-static'
const SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]'
const SELECTOR_FORM_CHILD = '.dropdown form'
const SELECTOR_MENU = '.dropdown-menu'
const SELECTOR_NAVBAR_NAV = '.navbar-nav'
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_CLICK = `click${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`
const SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]'
const SELECTOR_FORM_CHILD = '.dropdown form'
const SELECTOR_MENU = '.dropdown-menu'
const SELECTOR_NAVBAR_NAV = '.navbar-nav'
const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
const PLACEMENT_TOP = 'top-start'
const PLACEMENT_TOPEND = 'top-end'
const PLACEMENT_BOTTOM = 'bottom-start'
const PLACEMENT_TOP = 'top-start'
const PLACEMENT_TOPEND = 'top-end'
const PLACEMENT_BOTTOM = 'bottom-start'
const PLACEMENT_BOTTOMEND = 'bottom-end'
const PLACEMENT_RIGHT = 'right-start'
const PLACEMENT_LEFT = 'left-start'
const PLACEMENT_RIGHT = 'right-start'
const PLACEMENT_LEFT = 'left-start'
const Default = {
offset : 0,
flip : true,
boundary : 'scrollParent',
reference : 'toggle',
display : 'dynamic',
popperConfig : null
offset: 0,
flip: true,
boundary: 'scrollParent',
reference: 'toggle',
display: 'dynamic',
popperConfig: null
}
const DefaultType = {
offset : '(number|string|function)',
flip : 'boolean',
boundary : '(string|element)',
reference : '(string|element)',
display : 'string',
popperConfig : '(null|object)'
offset: '(number|string|function)',
flip: 'boolean',
boundary: '(string|element)',
reference: '(string|element)',
display: 'string',
popperConfig: '(null|object)'
}
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Dropdown {
constructor(element, config) {
this._element = element
this._popper = null
this._config = this._getConfig(config)
this._menu = this._getMenuElement()
this._element = element
this._popper = null
this._config = this._getConfig(config)
this._menu = this._getMenuElement()
this._inNavbar = this._detectNavbar()
this._addEventListeners()
}
// Getters
static get VERSION() {
return VERSION
}
@@ -109,7 +104,6 @@ class Dropdown {
}
// Public
toggle() {
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
return
@@ -143,14 +137,11 @@ class Dropdown {
return
}
// Disable totally Popper.js for Dropdown in Navbar
// Totally disable Popper for Dropdowns in Navbar
if (!this._inNavbar && usePopper) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
// Check for Popper dependency
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)')
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)')
}
let referenceElement = this._element
@@ -172,6 +163,7 @@ class Dropdown {
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(CLASS_NAME_POSITION_STATIC)
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())
}
@@ -239,9 +231,8 @@ class Dropdown {
}
// Private
_addEventListeners() {
$(this._element).on(EVENT_CLICK, (event) => {
$(this._element).on(EVENT_CLICK, event => {
event.preventDefault()
event.stopPropagation()
this.toggle()
@@ -272,6 +263,7 @@ class Dropdown {
this._menu = parent.querySelector(SELECTOR_MENU)
}
}
return this._menu
}
@@ -281,9 +273,9 @@ class Dropdown {
// Handle dropup
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT)
? PLACEMENT_TOPEND
: PLACEMENT_TOP
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ?
PLACEMENT_TOPEND :
PLACEMENT_TOP
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
@@ -291,6 +283,7 @@ class Dropdown {
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND
}
return placement
}
@@ -302,10 +295,10 @@ class Dropdown {
const offset = {}
if (typeof this._config.offset === 'function') {
offset.fn = (data) => {
offset.fn = data => {
data.offsets = {
...data.offsets,
...this._config.offset(data.offsets, this._element) || {}
...this._config.offset(data.offsets, this._element)
}
return data
@@ -331,7 +324,7 @@ class Dropdown {
}
}
// Disable Popper.js if we have a static display
// Disable Popper if we have a static display
if (this._config.display === 'static') {
popperConfig.modifiers.applyStyle = {
enabled: false
@@ -345,7 +338,6 @@ class Dropdown {
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
@@ -360,6 +352,7 @@ class Dropdown {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
data[config]()
}
})
@@ -444,8 +437,8 @@ class Dropdown {
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName)
? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&
if (/input|textarea/i.test(event.target.tagName) ?
event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&
(event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||
$(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
return
@@ -455,7 +448,7 @@ class Dropdown {
return
}
const parent = Dropdown._getParentFromElement(this)
const parent = Dropdown._getParentFromElement(this)
const isActive = $(parent).hasClass(CLASS_NAME_SHOW)
if (!isActive && event.which === ESCAPE_KEYCODE) {
@@ -465,7 +458,7 @@ class Dropdown {
event.preventDefault()
event.stopPropagation()
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')
}
@@ -475,7 +468,7 @@ class Dropdown {
}
const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS))
.filter((item) => $(item).is(':visible'))
.filter(item => $(item).is(':visible'))
if (items.length === 0) {
return
@@ -500,9 +493,7 @@ class Dropdown {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document)
@@ -514,14 +505,12 @@ $(document)
event.stopPropagation()
Dropdown._jQueryInterface.call($(this), 'toggle')
})
.on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, (e) => {
.on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => {
e.stopPropagation()
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Dropdown._jQueryInterface
-34
View File
@@ -1,34 +0,0 @@
import Alert from './alert'
import Button from './button'
import Carousel from './carousel'
import Collapse from './collapse'
import Dropdown from './dropdown'
import Modal from './modal'
import Popover from './popover'
import Scrollspy from './scrollspy'
import Tab from './tab'
import Toast from './toast'
import Tooltip from './tooltip'
import Util from './util'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
export {
Util,
Alert,
Button,
Carousel,
Collapse,
Dropdown,
Modal,
Popover,
Scrollspy,
Tab,
Toast,
Tooltip
}
+121 -116
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,82 +9,77 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'modal'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.modal'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const NAME = 'modal'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.modal'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'
const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'
const CLASS_NAME_BACKDROP = 'modal-backdrop'
const CLASS_NAME_OPEN = 'modal-open'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_STATIC = 'modal-static'
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`
const EVENT_RESIZE = `resize${EVENT_KEY}`
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const SELECTOR_DIALOG = '.modal-dialog'
const SELECTOR_MODAL_BODY = '.modal-body'
const SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]'
const SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]'
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
const SELECTOR_STICKY_CONTENT = '.sticky-top'
const Default = {
backdrop : true,
keyboard : true,
focus : true,
show : true
backdrop: true,
keyboard: true,
focus: true,
show: true
}
const DefaultType = {
backdrop : '(boolean|string)',
keyboard : 'boolean',
focus : 'boolean',
show : 'boolean'
backdrop: '(boolean|string)',
keyboard: 'boolean',
focus: 'boolean',
show: 'boolean'
}
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`
const EVENT_RESIZE = `resize${EVENT_KEY}`
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'
const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'
const CLASS_NAME_BACKDROP = 'modal-backdrop'
const CLASS_NAME_OPEN = 'modal-open'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_STATIC = 'modal-static'
const SELECTOR_DIALOG = '.modal-dialog'
const SELECTOR_MODAL_BODY = '.modal-body'
const SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]'
const SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]'
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
const SELECTOR_STICKY_CONTENT = '.sticky-top'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Modal {
constructor(element, config) {
this._config = this._getConfig(config)
this._element = element
this._dialog = element.querySelector(SELECTOR_DIALOG)
this._backdrop = null
this._isShown = false
this._isBodyOverflowing = false
this._config = this._getConfig(config)
this._element = element
this._dialog = element.querySelector(SELECTOR_DIALOG)
this._backdrop = null
this._isShown = false
this._isBodyOverflowing = false
this._ignoreBackdropClick = false
this._isTransitioning = false
this._scrollbarWidth = 0
this._isTransitioning = false
this._scrollbarWidth = 0
}
// Getters
static get VERSION() {
return VERSION
}
@@ -94,7 +89,6 @@ class Modal {
}
// Public
toggle(relatedTarget) {
return this._isShown ? this.hide() : this.show(relatedTarget)
}
@@ -104,22 +98,22 @@ class Modal {
return
}
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true
}
const showEvent = $.Event(EVENT_SHOW, {
relatedTarget
})
$(this._element).trigger(showEvent)
if (this._isShown || showEvent.isDefaultPrevented()) {
if (showEvent.isDefaultPrevented()) {
return
}
this._isShown = true
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true
}
this._checkScrollbar()
this._setScrollbar()
@@ -131,11 +125,11 @@ class Modal {
$(this._element).on(
EVENT_CLICK_DISMISS,
SELECTOR_DATA_DISMISS,
(event) => this.hide(event)
event => this.hide(event)
)
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => {
$(this._element).one(EVENT_MOUSEUP_DISMISS, (event) => {
$(this._element).one(EVENT_MOUSEUP_DISMISS, event => {
if ($(event.target).is(this._element)) {
this._ignoreBackdropClick = true
}
@@ -180,10 +174,10 @@ class Modal {
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)
if (transition) {
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
$(this._element)
.one(Util.TRANSITION_END, (event) => this._hideModal(event))
.one(Util.TRANSITION_END, event => this._hideModal(event))
.emulateTransitionEnd(transitionDuration)
} else {
this._hideModal()
@@ -192,7 +186,7 @@ class Modal {
dispose() {
[window, this._element, this._dialog]
.forEach((htmlElement) => $(htmlElement).off(EVENT_KEY))
.forEach(htmlElement => $(htmlElement).off(EVENT_KEY))
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@@ -203,15 +197,15 @@ class Modal {
$.removeData(this._element, DATA_KEY)
this._config = null
this._element = null
this._dialog = null
this._backdrop = null
this._isShown = null
this._isBodyOverflowing = null
this._config = null
this._element = null
this._dialog = null
this._backdrop = null
this._isShown = null
this._isBodyOverflowing = null
this._ignoreBackdropClick = null
this._isTransitioning = null
this._scrollbarWidth = null
this._isTransitioning = null
this._scrollbarWidth = null
}
handleUpdate() {
@@ -219,7 +213,6 @@ class Modal {
}
// Private
_getConfig(config) {
config = {
...Default,
@@ -230,26 +223,35 @@ class Modal {
}
_triggerBackdropTransition() {
if (this._config.backdrop === 'static') {
const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
$(this._element).trigger(hideEventPrevented)
if (hideEventPrevented.defaultPrevented) {
return
}
this._element.classList.add(CLASS_NAME_STATIC)
const modalTransitionDuration = Util.getTransitionDurationFromElement(this._element)
$(this._element).one(Util.TRANSITION_END, () => {
this._element.classList.remove(CLASS_NAME_STATIC)
})
.emulateTransitionEnd(modalTransitionDuration)
this._element.focus()
} else {
this.hide()
$(this._element).trigger(hideEventPrevented)
if (hideEventPrevented.isDefaultPrevented()) {
return
}
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
if (!isModalOverflowing) {
this._element.style.overflowY = 'hidden'
}
this._element.classList.add(CLASS_NAME_STATIC)
const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)
$(this._element).off(Util.TRANSITION_END)
$(this._element).one(Util.TRANSITION_END, () => {
this._element.classList.remove(CLASS_NAME_STATIC)
if (!isModalOverflowing) {
$(this._element).one(Util.TRANSITION_END, () => {
this._element.style.overflowY = ''
})
.emulateTransitionEnd(this._element, modalTransitionDuration)
}
})
.emulateTransitionEnd(modalTransitionDuration)
this._element.focus()
}
_showElement(relatedTarget) {
@@ -265,6 +267,7 @@ class Modal {
this._element.style.display = 'block'
this._element.removeAttribute('aria-hidden')
this._element.setAttribute('aria-modal', true)
this._element.setAttribute('role', 'dialog')
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0
@@ -290,12 +293,13 @@ class Modal {
if (this._config.focus) {
this._element.focus()
}
this._isTransitioning = false
$(this._element).trigger(shownEvent)
}
if (transition) {
const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)
const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)
$(this._dialog)
.one(Util.TRANSITION_END, transitionComplete)
@@ -308,7 +312,7 @@ class Modal {
_enforceFocus() {
$(document)
.off(EVENT_FOCUSIN) // Guard against infinite focus loop
.on(EVENT_FOCUSIN, (event) => {
.on(EVENT_FOCUSIN, event => {
if (document !== event.target &&
this._element !== event.target &&
$(this._element).has(event.target).length === 0) {
@@ -319,7 +323,7 @@ class Modal {
_setEscapeEvent() {
if (this._isShown) {
$(this._element).on(EVENT_KEYDOWN_DISMISS, (event) => {
$(this._element).on(EVENT_KEYDOWN_DISMISS, event => {
if (this._config.keyboard && event.which === ESCAPE_KEYCODE) {
event.preventDefault()
this.hide()
@@ -334,7 +338,7 @@ class Modal {
_setResizeEvent() {
if (this._isShown) {
$(window).on(EVENT_RESIZE, (event) => this.handleUpdate(event))
$(window).on(EVENT_RESIZE, event => this.handleUpdate(event))
} else {
$(window).off(EVENT_RESIZE)
}
@@ -344,6 +348,7 @@ class Modal {
this._element.style.display = 'none'
this._element.setAttribute('aria-hidden', true)
this._element.removeAttribute('aria-modal')
this._element.removeAttribute('role')
this._isTransitioning = false
this._showBackdrop(() => {
$(document.body).removeClass(CLASS_NAME_OPEN)
@@ -361,8 +366,8 @@ class Modal {
}
_showBackdrop(callback) {
const animate = $(this._element).hasClass(CLASS_NAME_FADE)
? CLASS_NAME_FADE : ''
const animate = $(this._element).hasClass(CLASS_NAME_FADE) ?
CLASS_NAME_FADE : ''
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div')
@@ -374,16 +379,21 @@ class Modal {
$(this._backdrop).appendTo(document.body)
$(this._element).on(EVENT_CLICK_DISMISS, (event) => {
$(this._element).on(EVENT_CLICK_DISMISS, event => {
if (this._ignoreBackdropClick) {
this._ignoreBackdropClick = false
return
}
if (event.target !== event.currentTarget) {
return
}
this._triggerBackdropTransition()
if (this._config.backdrop === 'static') {
this._triggerBackdropTransition()
} else {
this.hide()
}
})
if (animate) {
@@ -436,8 +446,7 @@ class Modal {
// ----------------------------------------------------------------------
_adjustDialog() {
const isModalOverflowing =
this._element.scrollHeight > document.documentElement.clientHeight
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
if (!this._isBodyOverflowing && isModalOverflowing) {
this._element.style.paddingLeft = `${this._scrollbarWidth}px`
@@ -529,14 +538,13 @@ class Modal {
}
// Static
static _jQueryInterface(config, relatedTarget) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _config = {
...Default,
...$(this).data(),
...typeof config === 'object' && config ? config : {}
...(typeof config === 'object' && config ? config : {})
}
if (!data) {
@@ -548,6 +556,7 @@ class Modal {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
data[config](relatedTarget)
} else if (_config.show) {
data.show(relatedTarget)
@@ -557,9 +566,7 @@ class Modal {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
@@ -570,8 +577,8 @@ $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
target = document.querySelector(selector)
}
const config = $(target).data(DATA_KEY)
? 'toggle' : {
const config = $(target).data(DATA_KEY) ?
'toggle' : {
...$(target).data(),
...$(this).data()
}
@@ -580,7 +587,7 @@ $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault()
}
const $target = $(target).one(EVENT_SHOW, (showEvent) => {
const $target = $(target).one(EVENT_SHOW, showEvent => {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
return
@@ -597,9 +604,7 @@ $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Modal._jQueryInterface
+33 -41
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,25 +9,29 @@ import $ from 'jquery'
import Tooltip from './tooltip'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'popover'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.popover'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_PREFIX = 'bs-popover'
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const NAME = 'popover'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.popover'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_PREFIX = 'bs-popover'
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const SELECTOR_TITLE = '.popover-header'
const SELECTOR_CONTENT = '.popover-body'
const Default = {
...Tooltip.Default,
placement : 'right',
trigger : 'click',
content : '',
template : '<div class="popover" role="tooltip">' +
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' +
'<div class="arrow"></div>' +
'<h3 class="popover-header"></h3>' +
'<div class="popover-body"></div></div>'
@@ -35,37 +39,28 @@ const Default = {
const DefaultType = {
...Tooltip.DefaultType,
content : '(string|element|function)'
content: '(string|element|function)'
}
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const SELECTOR_TITLE = '.popover-header'
const SELECTOR_CONTENT = '.popover-body'
const Event = {
HIDE : `hide${EVENT_KEY}`,
HIDDEN : `hidden${EVENT_KEY}`,
SHOW : `show${EVENT_KEY}`,
SHOWN : `shown${EVENT_KEY}`,
INSERTED : `inserted${EVENT_KEY}`,
CLICK : `click${EVENT_KEY}`,
FOCUSIN : `focusin${EVENT_KEY}`,
FOCUSOUT : `focusout${EVENT_KEY}`,
MOUSEENTER : `mouseenter${EVENT_KEY}`,
MOUSELEAVE : `mouseleave${EVENT_KEY}`
HIDE: `hide${EVENT_KEY}`,
HIDDEN: `hidden${EVENT_KEY}`,
SHOW: `show${EVENT_KEY}`,
SHOWN: `shown${EVENT_KEY}`,
INSERTED: `inserted${EVENT_KEY}`,
CLICK: `click${EVENT_KEY}`,
FOCUSIN: `focusin${EVENT_KEY}`,
FOCUSOUT: `focusout${EVENT_KEY}`,
MOUSEENTER: `mouseenter${EVENT_KEY}`,
MOUSELEAVE: `mouseleave${EVENT_KEY}`
}
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Popover extends Tooltip {
// Getters
static get VERSION() {
return VERSION
}
@@ -95,7 +90,6 @@ class Popover extends Tooltip {
}
// Overrides
isWithContent() {
return this.getTitle() || this._getContent()
}
@@ -118,13 +112,13 @@ class Popover extends Tooltip {
if (typeof content === 'function') {
content = content.call(this.element)
}
this.setElementContent($tip.find(SELECTOR_CONTENT), content)
$tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
}
// Private
_getContent() {
return this.element.getAttribute('data-content') ||
this.config.content
@@ -139,7 +133,6 @@ class Popover extends Tooltip {
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
@@ -158,6 +151,7 @@ class Popover extends Tooltip {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
data[config]()
}
})
@@ -165,9 +159,7 @@ class Popover extends Tooltip {
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Popover._jQueryInterface
+72 -80
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,76 +9,71 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'scrollspy'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.scrollspy'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const NAME = 'scrollspy'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.scrollspy'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'
const CLASS_NAME_ACTIVE = 'active'
const EVENT_ACTIVATE = `activate${EVENT_KEY}`
const EVENT_SCROLL = `scroll${EVENT_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const METHOD_OFFSET = 'offset'
const METHOD_POSITION = 'position'
const SELECTOR_DATA_SPY = '[data-spy="scroll"]'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_NAV_LINKS = '.nav-link'
const SELECTOR_NAV_ITEMS = '.nav-item'
const SELECTOR_LIST_ITEMS = '.list-group-item'
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const Default = {
offset : 10,
method : 'auto',
target : ''
offset: 10,
method: 'auto',
target: ''
}
const DefaultType = {
offset : 'number',
method : 'string',
target : '(string|element)'
offset: 'number',
method: 'string',
target: '(string|element)'
}
const EVENT_ACTIVATE = `activate${EVENT_KEY}`
const EVENT_SCROLL = `scroll${EVENT_KEY}`
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'
const CLASS_NAME_ACTIVE = 'active'
const SELECTOR_DATA_SPY = '[data-spy="scroll"]'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_NAV_LINKS = '.nav-link'
const SELECTOR_NAV_ITEMS = '.nav-item'
const SELECTOR_LIST_ITEMS = '.list-group-item'
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const METHOD_OFFSET = 'offset'
const METHOD_POSITION = 'position'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class ScrollSpy {
constructor(element, config) {
this._element = element
this._element = element
this._scrollElement = element.tagName === 'BODY' ? window : element
this._config = this._getConfig(config)
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +
this._config = this._getConfig(config)
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +
`${this._config.target} ${SELECTOR_LIST_ITEMS},` +
`${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}`
this._offsets = []
this._targets = []
this._activeTarget = null
this._scrollHeight = 0
this._offsets = []
this._targets = []
this._activeTarget = null
this._scrollHeight = 0
$(this._scrollElement).on(EVENT_SCROLL, (event) => this._process(event))
$(this._scrollElement).on(EVENT_SCROLL, event => this._process(event))
this.refresh()
this._process()
}
// Getters
static get VERSION() {
return VERSION
}
@@ -88,16 +83,15 @@ class ScrollSpy {
}
// Public
refresh() {
const autoMethod = this._scrollElement === this._scrollElement.window
? METHOD_OFFSET : METHOD_POSITION
const autoMethod = this._scrollElement === this._scrollElement.window ?
METHOD_OFFSET : METHOD_POSITION
const offsetMethod = this._config.method === 'auto'
? autoMethod : this._config.method
const offsetMethod = this._config.method === 'auto' ?
autoMethod : this._config.method
const offsetBase = offsetMethod === METHOD_POSITION
? this._getScrollTop() : 0
const offsetBase = offsetMethod === METHOD_POSITION ?
this._getScrollTop() : 0
this._offsets = []
this._targets = []
@@ -107,7 +101,7 @@ class ScrollSpy {
const targets = [].slice.call(document.querySelectorAll(this._selector))
targets
.map((element) => {
.map(element => {
let target
const targetSelector = Util.getSelectorFromElement(element)
@@ -125,11 +119,12 @@ class ScrollSpy {
]
}
}
return null
})
.filter((item) => item)
.filter(Boolean)
.sort((a, b) => a[0] - b[0])
.forEach((item) => {
.forEach(item => {
this._offsets.push(item[0])
this._targets.push(item[1])
})
@@ -139,22 +134,21 @@ class ScrollSpy {
$.removeData(this._element, DATA_KEY)
$(this._scrollElement).off(EVENT_KEY)
this._element = null
this._element = null
this._scrollElement = null
this._config = null
this._selector = null
this._offsets = null
this._targets = null
this._activeTarget = null
this._scrollHeight = null
this._config = null
this._selector = null
this._offsets = null
this._targets = null
this._activeTarget = null
this._scrollHeight = null
}
// Private
_getConfig(config) {
config = {
...Default,
...typeof config === 'object' && config ? config : {}
...(typeof config === 'object' && config ? config : {})
}
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
@@ -163,6 +157,7 @@ class ScrollSpy {
id = Util.getUID(NAME)
$(config.target).attr('id', id)
}
config.target = `#${id}`
}
@@ -172,8 +167,8 @@ class ScrollSpy {
}
_getScrollTop() {
return this._scrollElement === window
? this._scrollElement.pageYOffset : this._scrollElement.scrollTop
return this._scrollElement === window ?
this._scrollElement.pageYOffset : this._scrollElement.scrollTop
}
_getScrollHeight() {
@@ -184,14 +179,14 @@ class ScrollSpy {
}
_getOffsetHeight() {
return this._scrollElement === window
? window.innerHeight : this._scrollElement.getBoundingClientRect().height
return this._scrollElement === window ?
window.innerHeight : this._scrollElement.getBoundingClientRect().height
}
_process() {
const scrollTop = this._getScrollTop() + this._config.offset
const scrollTop = this._getScrollTop() + this._config.offset
const scrollHeight = this._getScrollHeight()
const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()
const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()
if (this._scrollHeight !== scrollHeight) {
this.refresh()
@@ -203,6 +198,7 @@ class ScrollSpy {
if (this._activeTarget !== target) {
this._activate(target)
}
return
}
@@ -231,7 +227,7 @@ class ScrollSpy {
const queries = this._selector
.split(',')
.map((selector) => `${selector}[data-target="${target}"],${selector}[href="${target}"]`)
.map(selector => `${selector}[data-target="${target}"],${selector}[href="${target}"]`)
const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))
@@ -262,12 +258,11 @@ class ScrollSpy {
_clear() {
[].slice.call(document.querySelectorAll(this._selector))
.filter((node) => node.classList.contains(CLASS_NAME_ACTIVE))
.forEach((node) => node.classList.remove(CLASS_NAME_ACTIVE))
.filter(node => node.classList.contains(CLASS_NAME_ACTIVE))
.forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
@@ -282,6 +277,7 @@ class ScrollSpy {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
data[config]()
}
})
@@ -289,9 +285,7 @@ class ScrollSpy {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(window).on(EVENT_LOAD_DATA_API, () => {
@@ -305,9 +299,7 @@ $(window).on(EVENT_LOAD_DATA_API, () => {
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = ScrollSpy._jQueryInterface
+37 -42
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,42 +9,38 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'tab'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.tab'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const NAME = 'tab'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.tab'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_ACTIVE_UL = '> li > .active'
const SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_ACTIVE = '.active'
const SELECTOR_ACTIVE_UL = '> li > .active'
const SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Tab {
@@ -53,18 +49,17 @@ class Tab {
}
// Getters
static get VERSION() {
return VERSION
}
// Public
show() {
if (this._element.parentNode &&
this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
$(this._element).hasClass(CLASS_NAME_ACTIVE) ||
$(this._element).hasClass(CLASS_NAME_DISABLED)) {
$(this._element).hasClass(CLASS_NAME_DISABLED) ||
this._element.hasAttribute('disabled')) {
return
}
@@ -133,11 +128,10 @@ class Tab {
}
// Private
_activate(element, container, callback) {
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL')
? $(container).find(SELECTOR_ACTIVE_UL)
: $(container).children(SELECTOR_ACTIVE)
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?
$(container).find(SELECTOR_ACTIVE_UL) :
$(container).children(SELECTOR_ACTIVE)
const active = activeElements[0]
const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE))
@@ -187,7 +181,12 @@ class Tab {
element.classList.add(CLASS_NAME_SHOW)
}
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
let parent = element.parentNode
if (parent && parent.nodeName === 'LI') {
parent = parent.parentNode
}
if (parent && $(parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]
if (dropdownElement) {
@@ -205,7 +204,6 @@ class Tab {
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
const $this = $(this)
@@ -220,6 +218,7 @@ class Tab {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`)
}
data[config]()
}
})
@@ -227,9 +226,7 @@ class Tab {
}
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
* Data API implementation
*/
$(document)
@@ -239,9 +236,7 @@ $(document)
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Tab._jQueryInterface
+42 -46
View File
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v4.6.2): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -9,58 +9,53 @@ import $ from 'jquery'
import Util from './util'
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'toast'
const VERSION = '4.5.0'
const DATA_KEY = 'bs.toast'
const EVENT_KEY = `.${DATA_KEY}`
const NAME = 'toast'
const VERSION = '4.6.2'
const DATA_KEY = 'bs.toast'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_HIDE = 'hide'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_HIDE = 'hide'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_SHOWING = 'showing'
const DefaultType = {
animation : 'boolean',
autohide : 'boolean',
delay : 'number'
}
const Default = {
animation : true,
autohide : true,
delay : 500
}
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'
const Default = {
animation: true,
autohide: true,
delay: 500
}
const DefaultType = {
animation: 'boolean',
autohide: 'boolean',
delay: 'number'
}
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
* Class definition
*/
class Toast {
constructor(element, config) {
this._element = element
this._config = this._getConfig(config)
this._config = this._getConfig(config)
this._timeout = null
this._setListeners()
}
// Getters
static get VERSION() {
return VERSION
}
@@ -74,7 +69,6 @@ class Toast {
}
// Public
show() {
const showEvent = $.Event(EVENT_SHOW)
@@ -83,6 +77,8 @@ class Toast {
return
}
this._clearTimeout()
if (this._config.animation) {
this._element.classList.add(CLASS_NAME_FADE)
}
@@ -130,8 +126,7 @@ class Toast {
}
dispose() {
clearTimeout(this._timeout)
this._timeout = null
this._clearTimeout()
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(CLASS_NAME_SHOW)
@@ -141,16 +136,15 @@ class Toast {
$.removeData(this._element, DATA_KEY)
this._element = null
this._config = null
this._config = null
}
// Private
_getConfig(config) {
config = {
...Default,
...$(this._element).data(),
...typeof config === 'object' && config ? config : {}
...(typeof config === 'object' && config ? config : {})
}
Util.typeCheckConfig(
@@ -184,13 +178,17 @@ class Toast {
}
}
// Static
_clearTimeout() {
clearTimeout(this._timeout)
this._timeout = null
}
// Static
static _jQueryInterface(config) {
return this.each(function () {
const $element = $(this)
let data = $element.data(DATA_KEY)
const _config = typeof config === 'object' && config
let data = $element.data(DATA_KEY)
const _config = typeof config === 'object' && config
if (!data) {
data = new Toast(this, _config)
@@ -209,14 +207,12 @@ class Toast {
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Toast._jQueryInterface
$.fn[NAME] = Toast._jQueryInterface
$.fn[NAME].Constructor = Toast
$.fn[NAME].noConflict = () => {
$.fn[NAME].noConflict = () => {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Toast._jQueryInterface
}

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