Compare commits

..

598 commits

Author SHA1 Message Date
XhmikosR
0b51219bac Backport #32469 and #32799
Improve zip-examples.js by only including the assets we need
2021-01-14 16:32:29 +02:00
Mark Otto
ce778dd7d0 Document some basic code conventions for us (#32778)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-14 12:52:11 +02:00
XhmikosR
0c678f9ff4 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-14 12:51:23 +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
XhmikosR
7a6da5e3e7 Dist 2020-05-12 20:44:42 +03:00
XhmikosR
109ad5db90 Bump version to 4.5.0. 2020-05-12 20:44:42 +03:00
Mark Otto
4a0ddb02db Wording fixes 2020-05-12 19:21:36 +03:00
XhmikosR
0f26be5ff3 Move the input groups validation workaround in docs. 2020-05-12 19:21:36 +03:00
XhmikosR
842b0d2ae4 Remove mention of build tools
They are not included in npm.
2020-05-12 19:21:36 +03:00
XhmikosR
32932d27d5 Grammar fixes 2020-05-12 19:21:36 +03:00
XhmikosR
4a26e51540 Include the newly added utilities/interactions.scss file
We missed it in #30562
2020-05-12 19:21:36 +03:00
XhmikosR
0f3eda8254 Update devDependencies and gems. 2020-05-12 19:21:36 +03:00
XhmikosR
30e7df6cca Backport d59de33 from #30772
Add a test about the scrollbar issue on non-integer width
2020-05-12 19:21:36 +03:00
Giovanni Mendoza
f1827ce9cd Avoid bad scrollbar replacement into width values
Refs #30772
2020-05-12 19:21:36 +03:00
XhmikosR
eb1df3e079 Update codeql.yml (#30777)
Remove moot fail-fast option
2020-05-12 19:21:36 +03:00
XhmikosR
df91d2cab0 Improve build/zip-examples.js (#30759)
* remove favicons meta tags
* copy the two brand images we use in the examples
* copy dist and brand images into an assets folder
2020-05-12 19:21:36 +03:00
Rohit Sharma
d2f9fbd055 Removed role="document" from the modal dialog (#30755) 2020-05-12 19:21:36 +03:00
XhmikosR
bad48dc3b9 CI: simplify cache
While it might not be possible to invalidate the cache by changing test.yml, this should speed things up a lot due to `bundle i` taking most of the time.
2020-05-12 19:21:36 +03:00
XhmikosR
86f2c01459 Partially revert "Use regex.test() when we want to check for a Boolean. (#29969)"
This partially reverts commit 6c46493803.
2020-05-12 19:21:36 +03:00
XhmikosR
955c437f32 collapse.js: combine classes 2020-05-12 19:21:36 +03:00
XhmikosR
eb720f20ff Minor lint tweaks and rules cleanup 2020-05-12 19:21:36 +03:00
XhmikosR
53eace04df build-plugins.js: add missing shebang (#30743) 2020-05-12 19:21:36 +03:00
XhmikosR
1c9e203c52 dropdown.js: switch to a ternary 2020-05-12 19:21:36 +03:00
XhmikosR
5f79b75ea8 tests: switch to strictEqual/notStrictEqual 2020-05-12 19:21:36 +03:00
XhmikosR
195585f5a6 scrollspy.js add more tests 2020-05-12 19:21:36 +03:00
XhmikosR
fa8a7eca06 Remove variables used once. 2020-05-12 19:21:36 +03:00
XhmikosR
52fdab8d70 Join/break a few lines, no functional changes 2020-05-12 19:21:36 +03:00
XhmikosR
b3601aae5b README.md: change Tests badge to point to v4-dev 2020-05-12 19:21:36 +03:00
XhmikosR
456194da11 package.json: add a docs-build script
Make the `docs-compile` one an alias of `docs-build`.
2020-05-12 19:21:36 +03:00
XhmikosR
fb4c8eacb0 CI: stop updating RubyGems since it's not needed 2020-05-12 19:21:36 +03:00
Mark Otto
5d10e4a58e
Add new interaction utilities and role attr to Reboot (#30562)
- Adds .user-select-* utils from v5
- Adds button role attribute util, one of the top requested features in our issues for adding pointer cursors
- Adds new docs page to demonstrate both
- Includes Sass list for customizing user select
2020-05-11 20:57:29 +03:00
XhmikosR
fce3370843 Backport #29272 and adapt if for v4-dev
docs: fix tap targets
2020-05-10 12:19:58 -07:00
XhmikosR
345d68cdbb Add loading="lazy" in images
Backport of #30199 after adapting it for v4-dev.
2020-05-10 12:19:58 -07:00
Mark Otto
a1d8ed4413 v4: Update homepage, examples, and general docs styles
- Refreshes the look and feel of the homepage with fresh colors, new content, and simplified styles.
- Updates docs button styles
- Replaces bytesize icons with Bootstrap icons
- Adds themes callout to examples page
2020-05-10 12:19:58 -07:00
XhmikosR
4111242cbb Update devDependencies and gems 2020-05-07 09:31:49 +03:00
XhmikosR
e82888daf4 Revert "Avoid bad scrollbar replacement into width values (#30690)"
This reverts commit 5f00bba652.
2020-05-07 09:31:49 +03:00
Johann-S
015aaf3c3d ensure build plugins can exit in error (#30744)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-05-07 09:31:49 +03:00
Johann-S
22f75ca2e3 enforce element check on scrollspy target 2020-05-07 09:31:49 +03:00
XhmikosR
5f267b1854 Update jQuery to v3.5.1. 2020-05-07 09:31:49 +03:00
XhmikosR
0f6cb9139f scrollspy.js: remove temporary variable (#30724) 2020-05-07 09:31:49 +03:00
XhmikosR
f3aed77dc7 Backport #30723
Move babel whitelist helpers to a common file
2020-05-07 09:31:49 +03:00
XhmikosR
d8691fcd5a Update codeql.yml (#30719)
Remove `pull_request` event since it's not supported.
2020-05-07 09:31:49 +03:00
XhmikosR
566c829a1c package.json: fix release script for v4. 2020-05-07 09:31:49 +03:00
Mark Otto
e51a09a2b8 Wording fixes 2020-05-06 20:56:04 +03:00
XhmikosR
8876866399 Update browser-bugs.md
Add a danger callout that the page is outdated
2020-05-06 20:56:04 +03:00
Quy
d63b651f37
Fix typo (#30745)
Use possessive form of it
2020-05-06 06:54:42 +03:00
XhmikosR
1fef25b777
Revert "v4: Add Release Drafter (#30701)" (#30711)
This reverts commit f93e58eddb.
2020-05-04 20:00:19 +03:00
XhmikosR
63dbe4705d search.js: make the check for URL stricter (#30695) 2020-05-02 15:39:19 +03:00
Johann-S
5f00bba652 Avoid bad scrollbar replacement into width values (#30690) 2020-05-02 15:39:19 +03:00
XhmikosR
c06a1f305d Backport #30130
Add a script to zip the built examples
2020-05-02 15:39:19 +03:00
Johann-S
1b16736a72 fix package.json add extension in main field 2020-05-02 15:39:19 +03:00
Martijn Cuppens
ec637483f2 Backport #30685
`<pre>`: Disable auto-hiding scrollbar in IE & legacy Edge
2020-05-02 15:39:19 +03:00
XhmikosR
971738b4b5 Backport the CodeQL Action addition 2020-05-02 15:39:19 +03:00
XhmikosR
33f47771ca Fix redirect 2020-05-02 15:39:19 +03:00
XhmikosR
6d9256d2b1 Backport #30362
Remove unneeded og:image:secure_url from social.html

The image is always available over HTTPS anyway
2020-05-02 15:39:19 +03:00
Mark Otto
f93e58eddb
v4: Add Release Drafter (#30701)
* Create release-drafter.yml
* Create release-notes.yml
2020-05-01 11:22:10 +03:00
Shohei Yoshida
e344ed4446
v4: Change input group validation examples (#30180)
* Change input group examples

* Update forms.md

* Update site/docs/4.4/components/forms.md

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-04-30 09:29:03 +03:00
Mark Otto
f79d14f7c8
Fixes #30503 to replace renamed position utility (#30505) 2020-04-30 08:11:51 +02:00
XhmikosR
748b1b9a5a CI: remove no longer needed steps (#30674)
The latest `actions/setup-node` prints this info by default
2020-04-28 20:59:30 +03:00
XhmikosR
5ecccd1171 Update devDependencies and gems. 2020-04-28 20:59:30 +03:00
Martijn Cuppens
92fe8445b1 Prevent list group style leaks (#30660) 2020-04-28 20:59:30 +03:00
XhmikosR
9c7ee5e554 CI: set CI_BRANCH_BASE to v4-dev
This is so that bundlewatch compares against v4-dev and not master.
2020-04-28 20:59:30 +03:00
XhmikosR
f5c7da4c78 Backport 9b97dc6
Tweak syntax highlighting colors to be WCAG2AA valid.

Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-04-28 20:59:30 +03:00
Martijn Cuppens
7a678fc64f Backport #30633
Remove caret element
2020-04-28 20:59:30 +03:00
Martijn Cuppens
a66d9a3d50 Backport #30605
grid: checks for `$grid-columns > 0`
2020-04-28 20:59:30 +03:00
Catalin Zalog
9d0097013a Backport #30606 (#30612)
checks for `$grid-row-columns`
2020-04-28 20:59:30 +03:00
Catalin Zalog
4853c5b527 feat: checks for $grid-breakpoints map list (#30609)
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-04-28 20:59:30 +03:00
Mark Otto
c4355e4a6b v5: Improve the responsiveness of our Dashboard example (#30573)
Cleans up some column classes to ensure things line up across all viewports. Also fixes some broken padding on the .navbar-brand.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-04-28 20:59:30 +03:00
k-utsumi
0321c632ed Delete appearance from button.close (#30582) 2020-04-28 20:59:30 +03:00
XhmikosR
e33e344410 Revert "Add dependabot config for v4 (#30008)"
This reverts commit 04b8219c18.
2020-04-28 20:59:30 +03:00
Martijn Cuppens
9f7fc4ac2b
Deprecate bg-gradient-variant mixin (#30594)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-04-18 09:12:51 +03:00
XhmikosR
f5ec0dbf74 collapse: fix error with jQuery v3.5.0. 2020-04-17 11:41:32 +03:00
XhmikosR
d848c32297 Fix tests for jQuery v3.5.0. 2020-04-17 11:41:32 +03:00
XhmikosR
05cfefd32b Update jQuery to v3.5.0. 2020-04-17 11:41:32 +03:00
XhmikosR
04b8219c18
Add dependabot config for v4 (#30008) 2020-04-13 21:51:22 +03:00
XhmikosR
341ad62517 Update clipboard.js to v2.0.6 2020-04-13 21:12:29 +03:00
XhmikosR
5053725870 Update bs-custom-file-input.js to v1.3.4 2020-04-13 21:12:29 +03:00
XhmikosR
04c1ecd79d Update devDependencies and gems 2020-04-13 21:12:29 +03:00
Martijn Cuppens
abc17a4858 Backport #30555
Use `box-shadow` mixin for `.form-select`
2020-04-13 21:12:29 +03:00
Martijn Cuppens
4d863effdb Backport #30512
Use `box-shadow` mixin for `.btn`
2020-04-13 21:12:29 +03:00
XhmikosR
5455e30048 Backport #30542
Remove redundant class and line height
2020-04-13 21:12:29 +03:00
XhmikosR
c1a75a7d8f Add v4-dev in bundlewatch config. (#30541) 2020-04-13 21:12:29 +03:00
XhmikosR
adb08ca33a Replace bundlesize with bundlewatch. (#30538) 2020-04-13 21:12:29 +03:00
Mark Otto
5f15f8cdbd Fix spinner-grow animation (#30504)
* Fix spinner-grow animation

Safari seems to be interpreting the old keyframes animation as incomplete. Adding `transform` to the second frame seems to resolve the issue.

Co-Authored-By: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-04-13 21:12:29 +03:00
Catalin Zalog
6edeaa4291 Add .card-footer color (#30515) 2020-04-13 21:12:29 +03:00
Martijn Cuppens
fe9384c216 Backport #30497
Fix card list group borders & radii
2020-04-13 21:12:29 +03:00
Martijn Cuppens
ddc58343d3 Backport #30480
Use `box-shadow` mixin for form controls
2020-04-13 21:12:29 +03:00
Martijn Cuppens
706bd3602d Backport #30391
transition() mixin prevent redundant 'transition: none' and pass `null`
2020-04-13 21:12:29 +03:00
Laussel Loïc
0cf29baf63
v4 tabs - accessibility issue when using ul/li semantic (#30381)
Add aria-role presentation on li element when ul element has role tablist and remove dropdown from visual tests as they've been removed from doc
2020-04-10 08:35:09 +03:00
luktom
8cc9defbc0
Fix event propagation from inactive and disabled dropdowns (#30510) (#30511) 2020-04-07 21:16:17 +03:00
Martijn Cuppens
1b575c27cd
Backport #30353 (#30361)
Remove appearance from date inputs

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-04-01 08:53:07 +03:00
XhmikosR
f7ed579d91
Switch to string constants. (#30490)
This allows the minifier to mangle the constants. It also allows the linter to find unused strings properly.

While at it, remove a few unused properties.

File                        Before      After       Diff
--------------------------------------------------------
bootstrap.bundle.min.js     22.09 kB    21.13 kB    -0.96 kB (-4.35 %)
bootstrap.min.js            15.4 kB     14.46 kB    -0.94 kB (-3.86 %)
2020-03-31 21:27:35 +03:00
XhmikosR
0225c1173b Bump devDependencies and gems. 2020-03-31 21:11:29 +03:00
XhmikosR
467c961976 Remove holder.js leftovers (#30469) 2020-03-31 21:11:29 +03:00
Tim Dujardin
b30c68f8a1 Added focus state to .btn-link (#30036) 2020-03-31 21:11:29 +03:00
XhmikosR
573c10f099 Backport #30041 and #30448
Switch links to the GitHub organization and fix redirected links
2020-03-31 21:11:29 +03:00
Shohei Yoshida
effe4e9588 Update modal docs (#30325) 2020-03-31 21:11:29 +03:00
Johann-S
dabd458b4b Backport (#30383)
fix: ensure totype always return stringified null when null passed
2020-03-31 21:11:29 +03:00
XhmikosR
0c8d8a48e1 Backport (#30418)
Open icons in a new tab like the rest of the external links
2020-03-31 21:11:29 +03:00
XhmikosR
03fec36b44 Clarify card group behavior (#30416)
Co-authored-by: Mark Otto <markd.otto@gmail.com>
2020-03-31 21:11:29 +03:00
XhmikosR
138e8da421 CI: switch to Ruby 2.6. 2020-03-31 21:11:29 +03:00
Frank Liepert
45c99f7130
Prevent vertical offset in IE 11 (#29413)
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-03-31 14:09:09 +02:00
Laussel Loïc
8b6dd449d7
fix $().button('toggle') not working for checkbox inside label (#30388) 2020-03-16 14:28:33 +02:00
XhmikosR
ac5685d368 Update .github/workflows/test.yml 2020-03-09 16:26:10 +02:00
XhmikosR
81e8f52fcb Revert "CI: switch to Ruby 2.6" 2020-03-09 16:26:10 +02:00
XhmikosR
d65977a991 Backport #29920
Add lockfile-lint
2020-03-09 16:26:10 +02:00
XhmikosR
90fef3086d CI: switch to Ruby 2.6 2020-03-09 16:26:10 +02:00
XhmikosR
9b71d9817d Update CI caching 2020-03-09 16:26:10 +02:00
XhmikosR
3b5283602c Replace uglify-js with terser. 2020-03-09 16:26:10 +02:00
XhmikosR
cc3ca2586f Update Jekyll to v4.0.0. 2020-03-09 16:26:10 +02:00
XhmikosR
906a5de548 Replace broken-link-checker with linkinator 2020-03-09 16:26:10 +02:00
XhmikosR
61276d0881 Drop Node.js < 10 support and update all devDependencies.
* sinon 8.x doesn't work with IE, so leave it at 7.x.
2020-03-09 16:26:10 +02:00
XhmikosR
0ca1ec6fc3 Update devDependencies and gems 2020-03-09 16:08:41 +02:00
XhmikosR
f852dff122 build/ship.sh: shellcheck fixes. (#30197)
Also add `set -e` so that if a command fails the whole script fails too.
2020-03-09 16:08:41 +02:00
Martijn Cuppens
efb3fc402e $link-decoration: underline affects some components (#30262)
Co-authored-by: Shohei Yoshida <fellows3@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-03-09 16:08:41 +02:00
Martijn Cuppens
81ba76bb3c CSS & alignment tweaks 2020-03-09 16:08:41 +02:00
Minobi
39ac525f6e Example dashboard: fix menu disappearing on small viewport 2020-03-09 16:08:41 +02:00
Shohei Yoshida
fa7510c6af Fix centered modal scrolling issue (#30244)
Use the `min-content` property.
2020-03-09 16:08:41 +02:00
XhmikosR
69f36286f9 Update jekyll-toc to v0.13.1. 2020-02-17 21:33:54 +02:00
XhmikosR
52c13233a3 Update devDependencies and gems. 2020-02-17 21:33:54 +02:00
XhmikosR
642d1001e3 .gitattributes: add .sh and remove .rb files. (#30196) 2020-02-17 21:33:54 +02:00
Gaël Poupard
473d36ff38 docs(theming): improve headings hierarchy under Sass → Functions (#30207) 2020-02-17 21:33:54 +02:00
XhmikosR
4a7cbd5b9f Backport #29971
Remove old versions from docs-navbar.html
2020-02-17 21:33:54 +02:00
Shohei Yoshida
c40b71318c Remove unnecessary reduce motion when $enable-transition: false (#30183) 2020-02-17 21:33:54 +02:00
Christian Oliff
037bad148c Add Microsoft Edge for MacOS to supported browsers (#29956)
The new Chromium-based Edge has been available as a beta for sometime and general availability of the final version is expected to ship from Jan 15. I think it makes sense to add it as a supported browser once it's out of beta.
REF: https://blogs.windows.com/windowsexperience/2019/11/04/introducing-the-new-microsoft-edge-and-bing/
2020-02-17 21:33:54 +02:00
Giovanni Mendoza
0bd57ce212 Added new variable for padding on dropdown header (#29946)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-02-17 21:33:54 +02:00
XhmikosR
8c4b61e30c change-version.js: Remove nuspec files (#30161)
The version in the nuspec files is updated automatically from package.json through MyGet.ps1
2020-02-17 21:33:54 +02:00
Shohei Yoshida
c77ec4fb06 Avoid border-radius functions return negative values (#30166)
* Avoid border-radius functions return negative values

* Update _border-radius.scss

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-02-17 21:33:54 +02:00
XhmikosR
4ea685a001 Bump bootstrap.min.js bundle size limit. 2020-02-17 21:33:54 +02:00
Martijn Cuppens
0d35f10842 Add ysds to the team page (#30145) 2020-02-17 21:33:54 +02:00
Giovanni Mendoza
6daae47cc0 Backport #29886
Close modal with keyboard=true & backdrop=static
2020-02-17 21:33:54 +02:00
Jesse Mandel
0f0a8c364d Updated nuspec content files and icon (#30148)
* #30045 - Update nuspec for updated content type

* Update iconUrl (deprecated) to icon

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-02-17 21:33:54 +02:00
Jens Luyten
7ca811315f Prevent grid with default cols from breaking when large pre was present (#30049) 2020-02-17 21:33:54 +02:00
Martijn Cuppens
1884b8a421 Backport #29325. (#30074)
`.text-break` fix
2020-02-17 21:33:54 +02:00
jorimvanhove
92525e9ec4 IE auto-size input-group to column (#30043) 2020-02-17 21:33:54 +02:00
XhmikosR
6c46493803 Use regex.test() when we want to check for a Boolean. (#29969) 2020-02-17 21:33:54 +02:00
XhmikosR
f737c73a27 javascript.md: Add srcset in sanitizer docs (#30007) 2020-02-17 21:33:54 +02:00
XhmikosR
411922b14d sanitizer.js: Add srcset in the allowed attributes (#29968) 2020-02-17 21:33:54 +02:00
Martijn Cuppens
21041eecb7
Backport #30090 (#30175)
Add version number to documentation `<title>`
2020-02-14 22:15:04 +02:00
Martijn Cuppens
fbf294a605
Fix disabled .btn cursor (#30004) 2020-02-03 19:54:29 +01:00
XhmikosR
0d1aee6a2f reboot.md: Add missing Noto Sans font (#29937)
* reboot.md: Add missing Noto Sans font

* Sans serif order fix

Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
2020-01-02 12:11:56 +02:00
XhmikosR
3c0cf9365b Bump copyright year to 2020. (#29944) 2020-01-02 12:11:56 +02:00
XhmikosR
0e09c6b831 package.json: move funding property higher. (#29936) 2020-01-02 12:11:56 +02:00
XhmikosR
80d842b501 Update devDependencies and gems 2020-01-02 12:11:56 +02:00
Martijn Cuppens
55945dcc36 README.md: show sponsors first (#29931) 2020-01-02 12:11:56 +02:00
XhmikosR
42714733b6 CI: fix Ruby caching 2020-01-02 12:11:56 +02:00
Martijn Cuppens
35d5cbf4fd Escape brackets (#29857)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-01-02 12:11:56 +02:00
Martijn Cuppens
0d08c74d2f Allow percentages in container widths (#29819) 2020-01-02 12:11:56 +02:00
Martijn Cuppens
00b0e0a9b7 Documentation fix: move width after make-container() mixin (#29820)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-01-02 12:11:56 +02:00
XhmikosR
16a82e7e99 Update test.yml (#29863)
Fix cache name
2020-01-02 12:11:56 +02:00
XhmikosR
e2530bf312 Update devDependencies and gems 2019-12-14 17:09:46 +02:00
XhmikosR
2d54fa9c3f Actions: add gems caching 2019-12-14 17:09:46 +02:00
XhmikosR
97e2e0da7c CI: update to actions/checkout@v2 (#29847) 2019-12-14 17:09:46 +02:00
XhmikosR
b77af55325 Actions: add npm cache (#29765) 2019-12-14 17:09:46 +02:00
AlexKoala
52aceee0ab docs: Add Korean translation link 2019-12-14 17:09:46 +02:00
719media
70de5e8398 Fix breadcrumb spacing with whitespace (#29745) 2019-12-14 17:09:46 +02:00
Shohei Yoshida
52762f83d8 Improve wrapping and hit area of accordion example titles (#29782) 2019-12-14 17:09:46 +02:00
XhmikosR
dca1ab7d87 Release v4.4.1. 2019-11-28 14:59:49 +02:00
Shohei Yoshida
b07b6f743c Fix dart Sass compatibility for subtract (#29763) 2019-11-28 14:59:49 +02:00
Shohei Yoshida
0d148d8854 V4: Add :disabled for disabled fieldset (#29762) 2019-11-28 14:59:49 +02:00
Martijn Cuppens
c24aaa6cbf Fix dart Sass compatibility (#29755) 2019-11-28 14:59:49 +02:00
XhmikosR
301ee1972d Update Gemfile.lock 2019-11-28 14:59:49 +02:00
XhmikosR
593574d510
Release v4.4.0 (#29735) 2019-11-26 19:12:00 +02:00
XhmikosR
d61bba584f Backport #29734
justify-content:between ⇒ justify-content:space-between
2019-11-26 09:51:27 +02:00
XhmikosR
7aa1722a97 Update change-version.js (#29736)
Add `.nuspec` to the extensions list
2019-11-26 09:51:27 +02:00
XhmikosR
340009e6de Update devDependencies and gems. 2019-11-25 13:12:53 +02:00
XhmikosR
bdd8752994 Switch to the Coveralls Action (#29478)
This is the official way of using Coveralls with Actions. Also this brings back Coveralls for PRs.
2019-11-25 13:12:53 +02:00
XhmikosR
e0a2d5890d Backport #29624
config.yml: update popper.js to v1.16.0
2019-11-25 13:12:53 +02:00
XhmikosR
136afcf59b Update anchor.js to v4.2.1 (#29662) 2019-11-25 13:12:53 +02:00
Sam Duvall
eb1e1cfb49 Fixed input-height-sm and input-height-lg calculations (#29653) 2019-11-25 13:12:53 +02:00
Martijn Cuppens
5be0fe8820 package.json: Add funding property (#29646) 2019-11-25 13:12:53 +02:00
XhmikosR
a0bb417691 Fix icons link. 2019-11-25 13:12:53 +02:00
Martijn Cuppens
590c1baeeb progress: Fix IE overflow (#29629) 2019-11-25 13:12:53 +02:00
XhmikosR
f12ae8cea2 Sass: fix version in deprecation messages.
The final version will be bumped when the next version is released.
2019-11-25 13:12:53 +02:00
Gary PEGEOT
6b7ca1234b Make check label cursor customizable (#29633) 2019-11-07 21:02:10 +02:00
XhmikosR
0aa6a81c11 Update devDependencies and gems. 2019-11-02 10:02:07 +02:00
XhmikosR
7629daedc1 Update modal.md (#29621)
Fix typo
2019-11-02 10:02:07 +02:00
Johann-S
dd96b832f7 backport #29516: added animation when modal backdrop is static 2019-11-02 10:02:07 +02:00
Johann-S
29f585365f backport #29523: skip hidden dropdowns while focusing 2019-11-02 10:02:07 +02:00
Martijn Cuppens
f55566e36b Add configurable button text wrapping (#29554) 2019-11-02 10:02:07 +02:00
XhmikosR
7ecfa6a343 Backport #29585
Enable eslint no-console rule except for build directory
2019-11-02 10:02:07 +02:00
XhmikosR
7453733ff6 Backport #29544
Add link to Icons site in our docs
2019-11-02 10:02:07 +02:00
XhmikosR
dd6b8682a6 CI: disable gem docs globally 2019-11-02 10:02:07 +02:00
XhmikosR
8e935b60c8 CI: install bundler 1.17 and without docs 2019-11-02 10:02:07 +02:00
Mark Otto
9be7aac831 Add make-col-auto mixin (#29367) 2019-11-02 10:02:07 +02:00
XhmikosR
f830450ca8 Fix highlighting.
v4-dev is using Jekyll, not Hugo.
2019-11-01 20:22:37 +02:00
Martijn Cuppens
b0b8d3c982 Convert v4-dev calc() left overs to add/subtract functions 2019-11-01 20:22:37 +02:00
Martijn Cuppens
90d4b72e06 Add calc() to function blacklist 2019-11-01 20:22:37 +02:00
Mark Otto
ea1d09c444 Doc tweaks. 2019-11-01 20:22:37 +02:00
ysds
7bd70e54f2 Add add and subtract function 2019-11-01 20:22:37 +02:00
Martijn Cuppens
ed4a4e6081 Link to versioned RFS repo (#29598) 2019-10-28 08:41:08 +02:00
Christian Oliff
087d0ea1e1 The HTML5 Boilerplate Print CSS moved to a separate repo (#29522)
The HTML5 Boilerplate CSS has moved to a separate GitHub repo (h5bp/main.css) so the source link referenced here no longer works. This PR updates the link to the new correct location.
2019-10-15 09:40:01 +03:00
XhmikosR
8cf6c209d8 Update devDependencies and gems.
Locked qunit to v2.9.2 to prevent test failures. We should revisit qunit later.
2019-10-14 12:12:05 +03:00
ysds
db19e8c706 Fix incorrect aspect ratio on IE11 2019-10-14 12:12:05 +03:00
Martijn Cuppens
510a446be6 Remove redundant properties 2019-10-14 12:12:05 +03:00
Martijn Cuppens
327bfca418 Fix top level ampersand (#29518)
Fixes dart sass compatibility.
2019-10-14 12:12:05 +03:00
XhmikosR
be452a0ed3 CI: move CI env variable to the root of the workflow. (#29499)
This way we match the Travis CI behavior, and it's inherited by all steps.
2019-10-14 12:12:05 +03:00
XhmikosR
23a78f0ab1 Update .gitignore.
Remove the old Hugo static dist folder.
2019-10-14 12:12:05 +03:00
Martijn Cuppens
6c9640c245 Backport #29445
Remove outline from select box in Firefox
2019-10-14 12:12:05 +03:00
astrahov
1260b4fb3f Add variable for $breadcrumb-font-size (#29467) 2019-10-14 12:12:05 +03:00
Martijn Cuppens
d521e147f9 Fix border for single card in accordion (#29453) 2019-10-14 12:12:05 +03:00
Martijn Cuppens
f47243460e Variable card height (#29462) 2019-10-14 12:12:05 +03:00
XhmikosR
91a9fd96b9 coveralls: Add COVERALLS_GIT_BRANCH (#29458)
Without this, coveralls didn't receive the branch info thus leading to failures when we switched branches.
2019-10-14 12:12:05 +03:00
XhmikosR
5e304b60a1 workflows/test.yml: specify CI=true (#29440) 2019-10-14 12:12:05 +03:00
XhmikosR
4c74d58f26 README.md: link to the Actions page for Tests (#29480) 2019-10-14 12:12:05 +03:00
Martijn Cuppens
cd64a164f1 IE image fix (#29483) 2019-10-08 08:49:29 +03:00
XhmikosR
1f2b048312 Use 180 for the grid-cards placeholder images' height. 2019-09-26 18:37:07 +03:00
XhmikosR
caf889e49e Update devDependencies and gems. 2019-09-26 18:37:07 +03:00
Shohei Yoshida
b5ba078b12 Grid card example tweaks (#29409)
Stack in cards in one column when < md
2019-09-26 18:37:07 +03:00
XhmikosR
cdfba0be4a GH Actions updates. (#29429) 2019-09-26 18:37:07 +03:00
XhmikosR
61cc86d68d workflows/test.yml: use ruby-version.
`version` is deprecated.
2019-09-26 18:37:07 +03:00
XhmikosR
846b603413 workflows/test.yml: switch to setup-node@v1. (#29410) 2019-09-26 18:37:07 +03:00
XhmikosR
791b1943f2 Bump bundlesize limits. 2019-09-26 18:37:07 +03:00
ysds
8741eed7a5 Add responsive example 2019-09-26 18:37:07 +03:00
ysds
afc9cae32c Allow override default col width 2019-09-26 18:37:07 +03:00
Mark Otto
d08567797f Cleanup
- Rename and move the variable to variables file
- Move code to the grid file
- Use the mixin to generate our own classes
- Wrap in a grid classes enabled conditional
- Document the mixin
2019-09-26 18:37:07 +03:00
Mark Otto
acb2b7061c Move margins, and equal height via utility example 2019-09-26 18:37:07 +03:00
Mark Otto
9ed860ef24 First pass at .row-cols classes
Trying to find a new way to do responsive card decks while not locking ourselves into the cards themselves. My thinking here is we can easily control the column (.col) width by the parent, but I don't know how many we need (have 0-5 now) across each breakpoint. This works for cards so far, and I think could get us equal height, too.
2019-09-26 18:37:07 +03:00
XhmikosR
28758a03f0 carousel.md: Remove duplicate bd-example div. (#29341)
The example shortcode already adds this.
2019-09-26 18:37:07 +03:00
XhmikosR
f732bf025a docs: remove swatches for theme colors. (#29327)
Use the built-in utilities instead.
2019-09-26 18:37:07 +03:00
XhmikosR
68ddcec057 theming.md: bring :root up to par with Scss. (#29323)
Also, add a warning in _root.scss so that we don't miss it again.
2019-09-26 18:37:07 +03:00
XhmikosR
6d5739320e blog example: remove unused CSS. (#29316) 2019-09-26 18:37:07 +03:00
Martijn Cuppens
5d39e36083 Don't bind validation to form controls 2019-09-26 18:37:07 +03:00
XhmikosR
269e5351aa Update devDependencies and gems. 2019-08-27 16:32:25 +03:00
Johann-S
ef1c7aadbc Backport #29298
dropdown show method should do the same as toggle
2019-08-27 16:32:25 +03:00
XhmikosR
dd181e91bd Actions CI tweaks (#29276)
* Allow bundlesize to run for forks too.
* Add name for clone step.
* Add` fail-fast: false`
2019-08-27 16:32:25 +03:00
Johann-S
bab999701c Backport #29277
dropdown - destroy old popper.js references
2019-08-27 16:32:25 +03:00
tracyjordan
41b8ce278b fixed minor typo (#29291) 2019-08-27 16:32:25 +03:00
XhmikosR
de94f6003f test.yml: reindent. 2019-08-27 16:32:25 +03:00
XhmikosR
3a3b0a4eae change-version.js: Add _gh_pages folder in ignores. (#29270) 2019-08-27 16:32:25 +03:00
Martijn Cuppens
c4e5aa0d32 docs: fix tap targets (#29272) 2019-08-27 16:32:25 +03:00
Johann-S
7652d326e4 Backport #29251
allow to pass popper.js configuration for tooltip/popover and dropdown
2019-08-27 16:32:25 +03:00
Martijn Cuppens
6381c63fb1 Add deprecation warning 2019-08-26 09:29:50 +02:00
Martijn Cuppens
9e1ef5623f Deprecate nav-divider() mixin 2019-08-22 08:10:03 +02:00
Martijn Cuppens
9519b9e055 Enable wrapping for elements in .modal-footer (#25103) 2019-08-17 17:03:00 +03:00
Martijn Cuppens
94395af932 Restore cursor: pointer for checkbox/radio buttons (#29239) 2019-08-17 17:03:00 +03:00
Martijn Cuppens
81d5e6eb1b Clarify order documentation (#29252) 2019-08-17 17:03:00 +03:00
XhmikosR
38d055e7fb Fix redirects. (#29254) 2019-08-17 17:03:00 +03:00
XhmikosR
727c1684bb Update devDependencies and gems. 2019-08-17 17:03:00 +03:00
Martijn Cuppens
e538b9f23e Fix Firefox rendering issue (#29234) 2019-08-17 17:03:00 +03:00
XhmikosR
116da0b746 Bump bootstrap.min.css bundlesize limit. 2019-08-17 17:03:00 +03:00
Shohei Yoshida
c387223720 Fix min-width of input-group flex items (#29209) 2019-08-17 17:03:00 +03:00
Mark Otto
81fa902454 Responsive containers (follow-up to #29095) (#29118)
* Follow-up to #29095

This PR fixes the responsive containers that were added in #29095, originally stubbed out in #25631. Apologies to @browner12 for getting that wrong.

Fixes #25631.

* update navbar as well because we cannot reset all containers uniformly

* Update navbars example to include container-xl example to ensure containers match

* rewrite responsive containers docs, add table of max-widths

* Update container docs
- Move table up to the intro
- Remove the container example because it's actually hella confusing
- Update and link to grid example as a demo instead
2019-08-17 17:03:00 +03:00
XhmikosR
d55f6c3073 Simplify css-prefix scripts. (#29205) 2019-08-17 17:03:00 +03:00
Martijn Cuppens
e5a3ee5e9c Extend .container-fluid (#29106) 2019-08-17 17:03:00 +03:00
Mark Otto
3695c3a1fb fix broken classes 2019-08-17 17:03:00 +03:00
Mark Otto
2892675f65 v4/v5: Add responsive containers (#29095)
* create responsive containers

provide more flexibility and allow the user to determine when containers switch from fluid to fixed width.

* fix the base container code

this commit fixes the non-media portion of the generated CSS. I learned about the `@extends` directive and was able to put it to good use.

I create a new temporary map that contains all the main `$container-max-widths` and join it to our 2 special cases of 'xs' and 'fluid'.  Then we loop through that and, with the appropriate infixes, extend our placeholder

* formatting for style

forgot to run my tests before the last push, i think these are better.

* finish incomplete comment

* fix the responsive containers

using the `@extend` directive I was able to clean up this code

* fix responsive containers in the navbar

mostly we just look through all of our breakpoints so we can include all of the responsive container classes in the tweaks we have to do for the navbar (redeclaring flex properties, don't double up on padding, etc)

* Simplify container extends

* Simplify navbar containers

* Rearrange, add comments, ensure everything is nested in $enable-grid-classes

* Reduce new CSS by using attribute selector

We avoid using `@extend` whenever possible, and this is more readable

* Update _grid.scss

* Update _navbar.scss

* Add docs for responsive containers, redesign the container layout page

* Add to the Grid example
2019-08-17 17:03:00 +03:00
XhmikosR
9abaafa546
Add workflows/test.yml for v4-dev. (#29230) 2019-08-09 10:38:33 +03:00
XhmikosR
c93fdec2f0
Disallow crawling on Netlify. (#29194) 2019-08-03 17:09:25 +03:00
Herst
8c3a1298f7 Add missing role="document" (#29172) 2019-07-31 11:37:39 +03:00
XhmikosR
fb6266a8df carousel: fix transition properties order. (#29173) 2019-07-31 11:37:39 +03:00
XhmikosR
96d4a64944 Update devDependencies and gems. 2019-07-31 11:37:39 +03:00
Patrick H. Lauke
cf07b5a7ab Fix minor typo (#29168) 2019-07-31 11:37:39 +03:00
Shohei Yoshida
f6b00cda24 Fix reboot for placeholder links (#29164) 2019-07-31 11:37:39 +03:00
Patrick H. Lauke
af0786b10f Minor: fix sentence (#29160)
"Popovers whose both title..."
2019-07-31 11:37:39 +03:00
Patrick H. Lauke
d5266dc995 Fix reboot for placeholder links (#29162)
Backport of #29140
2019-07-31 11:37:39 +03:00
Chandan Deep
397359154c Change property from background to background-image (#29149)
For Gradient, We have to use the background-image instead of only background.
2019-07-31 11:37:39 +03:00
Brian Juul Andersen
cd58245f10 Update scrollspy.md (#29156)
Fixed minor grammatical error:

"... the best method get scroll ..."

=>

"... the best method to get scroll ..."
2019-07-31 11:37:39 +03:00
Johann-S
e4d4c5d0bc Backport #29155
allow dynamic modal body for scrollable modals
2019-07-31 11:37:39 +03:00
Martijn Cuppens
8f95b26d65 Haha, floats. It's 2019 (#29147) 2019-07-31 11:37:39 +03:00
XhmikosR
e1cd51e4fb Update docs vendor libs (#29134)
* Update bs-custom-file-input.min.js to v1.3.2.
* Update anchor.min.js to v4.2.0.
2019-07-31 11:37:39 +03:00
XhmikosR
dcdd9be0b3 Backport #29121.
Remove https://glyph.smarticons.co/ from list of suggestions.
The domain is now for sale and is triggers warnings in Firefox and Chrome
2019-07-31 11:37:39 +03:00
Martijn Cuppens
48e86c5796 Apply at-mixin-argumentless-call-parentheses: always stylelint rule for v4 mixins 2019-07-31 11:37:39 +03:00
Martijn Cuppens
d59aa2c702 Apply at-mixin-argumentless-call-parentheses: always stylelint rule 2019-07-31 11:37:39 +03:00
XhmikosR
22f6a4beea Add --continue-on-error in the css-lint script. (#29119) 2019-07-31 11:37:39 +03:00
Shohei Yoshida
470adc3f16 Force reflow for fade-in animation (#29113) 2019-07-31 11:37:39 +03:00
XhmikosR
e01103e3f9 Downgrade karma-browserstack-launcher to v1.4.0. (#29109)
This might fix the build failures we are getting.
2019-07-31 11:37:39 +03:00
Martijn Cuppens
9322cc83bc Simplify css-compile-main script (#29102) 2019-07-31 11:37:39 +03:00
XhmikosR
0f376c1107 Update svgo.yml. (#29089) 2019-07-31 11:37:39 +03:00
Kitten King
b66abdf3b1 Fix Typos across Bootstrap repository (#29082) 2019-07-31 11:37:39 +03:00
XhmikosR
1bee3c03cf Remove iconic and add feather icons. (#29079) 2019-07-31 11:37:39 +03:00
Martijn Cuppens
a2a38058af .custom-select: combine properties. 2019-07-30 15:43:38 +03:00
XhmikosR
41fd25abe1 Optimize the inline SVGs. 2019-07-30 15:43:38 +03:00
XhmikosR
f233e05acc Disable the !default rule for our docs variables. 2019-07-30 15:43:38 +03:00
XhmikosR
eeea633150 Use the background shorthand. 2019-07-30 15:43:38 +03:00
XhmikosR
a5d280365b docs: use the escape_svg function. 2019-07-30 15:43:38 +03:00
Martijn Cuppens
c26e68427c Backport "Use escape-svg() function (#29077)"
Adapted for v4-dev.
2019-07-30 15:43:38 +03:00
XhmikosR
68ab243ffa SVGs: lowercase hex values. 2019-07-30 15:43:38 +03:00
XhmikosR
cac30c0722 Update devDependencies. 2019-07-17 14:48:26 +03:00
XhmikosR
def8173e7b Fix bootstrap-themes.png. (#29061)
For some reason the old image was bad quality.
2019-07-17 14:48:26 +03:00
M. Wacker
921f17a650 Fix breaking layout breaking error in code (#28328)
Change `word-break: break-word;` to `word-wrap: break-word;`
2019-07-17 14:48:26 +03:00
Brian Juul Andersen
636204974b Updated sentence (#29051)
Checkboxes and radios use are built to support HTML-based form

=>

Checkboxes and radio buttons support ...
2019-07-17 14:48:26 +03:00
Manuel Alcaraz
c6cbae6b2a #29034 Fix broken links (#29035) 2019-07-17 14:48:26 +03:00
Sunny Dhoke
4e4a1febb0 Added link to creative commons license (#29032)
The previous link is dead one.
2019-07-17 14:48:26 +03:00
Brian Juul Andersen
f2185b9b5f Update collapse.md (#29025)
Corrected minor spelling error.
2019-07-17 14:48:26 +03:00
Johann-S
a894ea3a51 updated babel 2019-07-17 14:48:26 +03:00
XhmikosR
0ad0985ac0 Update devDependencies and gems.
Also lock babel versions, since we get failures with newer ones.
2019-07-10 11:03:54 +03:00
XhmikosR
d361194a99 Move bundlesize config to a separate file. (#29002) 2019-07-10 11:03:54 +03:00
Patrick H. Lauke
3d72b94ee9 Add prefers-reduced-motion callout to toast documentation (#28993)
x-ref #28987
2019-07-10 11:03:54 +03:00
Bardi Harborow
d395dfaafc Add ARIA search landmark to documentation. (#28983) 2019-07-10 11:03:54 +03:00
Martijn Cuppens
e61d609bc0 Ignore the bg-variant deprecation warning in our files. 2019-07-10 11:03:54 +03:00
Martijn Cuppens
23d7dd6dbd Remove redundant radius properties (#28956) 2019-07-10 11:03:54 +03:00
Patrick H. Lauke
be80d26cdb Ensure button plugin sets/removes active class correctly on page load (#28952)
* Ensure correct active class is set on button toggles/checkboxes/radios on page load

Sanity check, ensures that the UI visually matches the actual values/states of controls. Also ensures that if any autocomplete/autofill happened, this is visually accounted for
by having the correct class set.

Includes unit tests (and `autocomplete` has been removed from these as it's no longer necessary)

* Remove now unnecessary autocomplete attribute

As the attribute was there to force/ensure that the visual presentation matched the state, and this is now taken care of programmatically, there's no need to unnecessarily suppress autocomplete...let them autocomplete if they want to...
2019-07-10 11:03:54 +03:00
Sergey Kovalenko
22f6b373f9 Remove negative margins for group list items (#28940)
To fix RGBA borders overlapping issue.
2019-07-10 11:03:54 +03:00
XhmikosR
a92f838c8d Minor wording changes. 2019-07-10 11:03:54 +03:00
Jonathan Hawkins
e76fce5852 Combine duplicate documentation examples into one to fix the confusing text. 2019-07-10 11:03:54 +03:00
Martijn Cuppens
c121778b49 Change invalid icon from cross to exclamation mark (#28944)
The cross icon was confusing since some browsers use it as a reset button.
2019-07-10 11:03:54 +03:00
Robin D'Arcy
4376d92ea7 Docs – update extend/approach.md (#28941) 2019-07-10 11:03:54 +03:00
Martijn Cuppens
de163b337c
Deprecate bg-variant() mixin (#28938) 2019-06-20 21:30:09 +02:00
Patrick H. Lauke
5f44e01dab Add missing dropdown unit test for closing with ESC (#28929)
Backport of the unit test from https://github.com/twbs/bootstrap/pull/28928
2019-06-19 13:43:48 +03:00
Martijn Cuppens
1c5e1cb3c9 Typo fix (#28920) 2019-06-18 15:02:58 +03:00
Shohei Yoshida
b165aff2f7 Fix position of browser default validation message (#28852) 2019-06-18 15:02:58 +03:00
Morteza Ziyae
1bdeab8159 Fix width and height of data svg images in IE10 (#28883) 2019-06-18 15:02:58 +03:00
Patrick H. Lauke
1da3aa3103 Don't open dropdown on ESC on trigger element (#28912)
* Don't open dropdown on ESC on trigger element

Closes #28751
2019-06-18 15:02:58 +03:00
XhmikosR
6587e5cf80 Update devDependencies and gems. 2019-06-18 15:02:58 +03:00
Johann-S
6c9f833a90 tooltip dispose:removing only own event handler (#28896) 2019-06-18 15:02:58 +03:00
Patrick H. Lauke
24abed1336 Fix keyboard handling of button-style checkbox/radio button groups (#28834)
- adds more defensive checks to make sure no unnecessary toggling happens on disabled buttons; this also fixes an up-to-now undiscovered bug where a toggle button with `.disabled` class would still have its `aria-pressed` toggled
- adds a set of explicit tests for the above case of disabled buttons and `aria-pressed`
- remove a now irrelevant (or at least very nonsensical) test for `<label>` containing both an actionable and a `hidden` `<input>`
- expand the test for disabled checkbox to also explicitly test starting conditions (used mainly in my debugging)
- ensure that `$btn[0].click()` is used to click checkboxes in tests, rather than the `click()` on the jquery object which is simply a shorthand for `trigger('click')` and does not actually trigger the browser default behavior
- remove the `preventDefault()` from the button handling, which was preventing correct keyboard functionality for checkboxes/radio buttons
- add extra logic to the button.js code to handle checkboxes correctly and avoid double-triggering as a result of mouse interactions (which saw the checkboxes being toggled twice, thus returning them to their original state)
- add logic that prevents the `checked` property from being added incorrectly for any inputs other than radio buttons and checkboxes
- added more tests (including the most basic test for a properly triggered fake checkbox button)
- work around Firefox bug #1540995 (which this code was hitting after removing the `preventDefault()`, due to Firefox's incorrect toggling of disabled checkboxes when programmatically (but not manually) activated with a `click()` event
2019-06-18 15:02:58 +03:00
Patrick H. Lauke
5bf876cb0f Docs: add accessibility/keyboard callout to popovers, tweak tooltips callout (#28851)
- Add same advice about keyboard/AT handling to popovers as a callout; also add information about not adding excessive content or interactive controls (and the suggestion to opt for a modal)
- Tweak the tooltips callout for consistency
2019-06-18 15:02:58 +03:00
Shohei Yoshida
911b72cf78 Workaround for the image size bug in IE (#28855) 2019-06-18 15:02:58 +03:00
Christian Oliff
e0d0f5a1c6 HTTPS link to codeguide.co (#28860) 2019-06-18 15:02:58 +03:00
XhmikosR
5baad13902 Use npm-run-all in the netlify script. (#28846) 2019-05-30 11:58:34 +03:00
XhmikosR
d9a8b8ea80 Update devDependencies and gems. 2019-05-30 11:58:34 +03:00
Jay Pinho
1161bff6eb Make example description more accurate (#28842) 2019-05-30 11:58:34 +03:00
Shohei Yoshida
a84a05a56a Clean input group flex basis (#28785) 2019-05-30 11:58:34 +03:00
Shohei Yoshida
9d075734cb Calc modal header/footer border radius according to the border width (#28775) 2019-05-30 11:58:34 +03:00
Aditya Shankar
9508c4c11b Correct grammar in modal.scss (#28829) 2019-05-30 11:58:34 +03:00
Sezer Esen
01a71532d9 Fix background position (#28814) 2019-05-30 11:58:34 +03:00
XhmikosR
621391255b vnu.jar: Update ignores. (#28817)
Pass the `--no-langdetect` flag instead of ignoring the warning manually.
2019-05-30 11:58:34 +03:00
Johann-S
c6dd1a7d93 Backport #28777.
Toast should allow prevent default for hide and show events
2019-05-30 11:58:34 +03:00
Shohei Yoshida
fe777292b5 Fix z-index according to our z-index rule (#28784)
https://getbootstrap.com/docs/4.3/extend/approach/#z-index-scales
2019-05-30 11:58:34 +03:00
Christian Oliff
67be130c7b Update Yarn package link to link to the Bootstrap package (#28781)
I think it makes more sense to link to the Bootstrap package on Yarn here (like the package link for NPM above)
2019-05-30 11:58:34 +03:00
XhmikosR
be7198a05b Travis CI: Add Node.js 12. 2019-05-30 11:58:34 +03:00
XhmikosR
f72d2511ba Update devDependencies. 2019-05-09 21:30:32 +03:00
Shohei Yoshida
4251c23f71 Reset input padding for cross browser consistency (#28208) 2019-05-09 21:30:32 +03:00
zhangbao
fc745a3ec8 Consistency modification (#28750) 2019-05-09 21:30:32 +03:00
Martijn Cuppens
e9d8c1a9dd Backport #28679.
* Documentation tweaks
* Remove redundant `col-12` classes
2019-05-09 21:30:32 +03:00
Patrick H. Lauke
36ea7e7421 Album example: remove misleading jumbotron-heading classname (#28741) 2019-05-09 21:30:32 +03:00
Shohei Yoshida
aa7b055064 Fix incorrect variable for popover border radius (#28733)
* Use $popover-border-radius

* Move and rename the local $offset-border-width to the global variable
2019-05-09 21:30:32 +03:00
Christian Oliff
add38103ad Fix broken link to css-discuss.incutio.com/wiki/Printing_Tables (#28637)
Instead now pointing to the most recent Wayback Machine archive copy.
2019-05-09 21:30:32 +03:00
Martijn Cuppens
5c65ea6a38 Scrollbar fix (#28417) 2019-05-09 21:30:32 +03:00
XhmikosR
27287a6884 Update devDependencies including jQuery to v3.4.1. 2019-05-02 16:59:49 +03:00
XhmikosR
cc5292f510 Backport #28551.
Show the other navbar items on small screens too.
2019-05-02 16:59:49 +03:00
XhmikosR
7da9729a62 Update (dev)Dependencies and gems.
Also, fix the `update-deps` excludes and add karma since 4.x requires Node.js >= 8.
2019-04-29 17:41:28 +03:00
Mark Otto
605704d7f5 Prevent form validation mixin from generating invalid CSS (#28447)
Extrapolates the previously used selector into a new mixin that only generates valid CSS by creating psuedo-classes for `valid` and `invalid`, and nothing else.

Fixes #28380.
2019-04-29 17:41:28 +03:00
Shohei Yoshida
68932330f0 Sync plain text font-size with $input-font-size (#28464) 2019-04-29 17:41:28 +03:00
Martijn Cuppens
78f47133e9 Remove redundant slashes (#28677) 2019-04-29 17:41:28 +03:00
Johann-S
c50c1e9d23 fix unit tests for chrome mobile 2019-04-29 17:41:28 +03:00
Shohei Yoshida
10f91729aa Add $custom-control-label-color variable (#28633) 2019-04-29 17:41:28 +03:00
ysds
57ff6ee9ef Call hide() after delay time 2019-04-29 17:41:28 +03:00
XhmikosR
77973cd7fb Fix clean-css breakWith option. 2019-04-29 17:41:28 +03:00
Matěj Kříž
41eea9edc4 Fix buttons :focus state styles (#27890)
* Fix buttons :focus state styles

Buttons :hover and :focus state shares styles.
Buttons :focus text color on 'a.btn' is now consistent with others '.btn'.

* `:focus` styles should be in sync with `.focus`.

So shared styles with hover were copy to focus definition. Rather then using
`hover-focus` mixin which do not contain `.focus`.
2019-04-29 17:41:28 +03:00
XhmikosR
060880296a karma.conf.js: switch to CI === true. (#28588) 2019-04-29 17:41:28 +03:00
Loïc Goyet
1c7cb61072 Remove scss variable defined twice (#28567) 2019-04-29 17:41:28 +03:00
XhmikosR
3bf08d87c9 Update devDependencies and gems. 2019-03-27 20:57:28 +02:00
Johann-S
8fda884ad3 Reset carousel touch delta x to prevent click transformation in swipe (#28558) 2019-03-27 20:57:28 +02:00
XhmikosR
c0b2f72a06 Add a netlify npm script. (#28552) 2019-03-27 20:57:28 +02:00
XhmikosR
12532dc913 Remove http from docs search. (#28557)
We use only `https` for a few months now.
2019-03-27 20:57:28 +02:00
Patrick H. Lauke
3ab0441667 Check prefers-reduced-motion variable before adding reduced motion media query for animated progress bars (#28530) 2019-03-27 20:57:28 +02:00
Shohei Yoshida
60f31b32f8 Workaround for MS edge bug (#28275) 2019-03-27 20:57:28 +02:00
XhmikosR
77212386c0 Revert back to the old snippet and just add anonymize IP.
We don't need the extra bloat of gtag.
2019-03-27 20:57:28 +02:00
Mark Otto
e34ba3532f Update GA to latest script & anonymize IPs 2019-03-27 20:57:28 +02:00
XhmikosR
72a1437dae .gitignore: add the Hugo folders. 2019-03-27 20:57:28 +02:00
XhmikosR
413c313644 Use local doc versions favicon.ico. 2019-03-27 20:57:28 +02:00
XhmikosR
c9159ccf05 Include favicons for examples. 2019-03-27 20:57:28 +02:00
Jim Jiang
9ba80d31d4 Remove redundant placeholders in forms docs (#28406)
* Change state field to select
* Include "Choose..." placeholder for select
* Change validated select to .custom-select
2019-03-12 15:23:12 +02:00
Patrick H. Lauke
86a97d197e Remove indiscriminate outline suppression for tabindex="-1" elements (#28437)
instead, only apply outline suppression if the browser wouldn't normally apply the focus outline, using the (currently experimental) `:focus-visible` pseudo-class
2019-03-12 15:16:49 +02:00
Shohei Yoshida
87527d8149 Add <ol> to nav's comment (#28426) 2019-03-08 00:30:25 +02:00
mspae
be8ef5f655 disable assert assending check if the previous unit was a percentual value (#28400) 2019-03-08 00:30:25 +02:00
Johann-S
86de1d3875 fix jquery detection 2019-03-08 00:30:24 +02:00
XhmikosR
dad0765ed3 Update devDependencies and gems. (#28347) 2019-03-08 00:30:24 +02:00
Chris Barr
f2b9055c2b Fix issue template links to the contributing guidelines (#28378) 2019-03-08 00:29:21 +02:00
Laussel Loïc
a5179125b0 put secondary navigation in an explicit landmark nav and add a label on each nav (#28361) 2019-03-08 00:29:21 +02:00
Laussel Loïc
1a8886b7f7 add an explicit aria-label on link with svg on sample pages (#28360) 2019-03-08 00:29:21 +02:00
Martijn Cuppens
ba641ae507 Fix border if only one card (#28365) 2019-03-08 00:29:21 +02:00
XhmikosR
11c40217cf Add --continue-on-error in npm run lint. (#28338)
So if one of the two sub-tasks fails, it still completes linting the other one.
2019-03-08 00:29:21 +02:00
Pierre GIRAUD
3b6c5ee620 Fix indentation (#28321) 2019-03-08 00:29:21 +02:00
XhmikosR
d30039c1a9 Update CONTRIBUTING.md for the current state of things. (#28283) 2019-03-08 00:29:20 +02:00
Laussel Loïc
a46866c950 add tabindex="-1" and aria-disabled="true" on disabled links (#28305) 2019-03-08 00:29:20 +02:00
Bardi Harborow
146cfa21a3 Create SECURITY.md (#28288) 2019-03-08 00:29:20 +02:00
XhmikosR
5e9fd345da Use npm-run-all for the release script. (#28307)
It's shorter.
2019-03-08 00:29:20 +02:00
XhmikosR
b2e9341b8c Update devDependencies. (#28292) 2019-03-01 17:26:36 +02:00
XhmikosR
58a1c6ef92 Update devDependencies. (#28271) 2019-03-01 17:26:35 +02:00
Martijn Cuppens
fad6dda456 Deprecate form-control-focus mixin (#28262) 2019-03-01 17:25:58 +02:00
XhmikosR
60ba89b9a7 Replace 4.3.0 with 4.3.1 in nuget files. (#28273) 2019-03-01 17:25:58 +02:00
XhmikosR
8d109b62ba Update docs and meta for 3.4.1. (#28255) 2019-03-01 17:25:58 +02:00
700 changed files with 48071 additions and 88482 deletions

View file

@ -8,5 +8,10 @@ module.exports = {
modules: false modules: false
} }
] ]
] ],
env: {
test: {
plugins: [ 'istanbul' ]
}
}
}; };

View file

@ -1,15 +1,13 @@
# https://github.com/browserslist/browserslist#readme # https://github.com/browserslist/browserslist#readme
>= 0.5% >= 1%
last 2 major versions last 1 major version
not dead not dead
Chrome >= 60 Chrome >= 45
Firefox >= 60 Firefox >= 38
# needed since Legacy Edge still has usage; 79 was the first Chromium Edge version Edge >= 12
# should be removed in the future when its usage drops or when it's moved to dead browsers Explorer >= 10
not Edge < 79 iOS >= 9
Firefox ESR Safari >= 9
iOS >= 10 Android >= 4.4
Safari >= 10 Opera >= 30
Android >= 6
not Explorer <= 11

View file

@ -6,55 +6,39 @@
}, },
{ {
"path": "./dist/css/bootstrap-grid.min.css", "path": "./dist/css/bootstrap-grid.min.css",
"maxSize": "6 kB" "maxSize": "6.25 kB"
}, },
{ {
"path": "./dist/css/bootstrap-reboot.css", "path": "./dist/css/bootstrap-reboot.css",
"maxSize": "2.25 kB" "maxSize": "2 kB"
}, },
{ {
"path": "./dist/css/bootstrap-reboot.min.css", "path": "./dist/css/bootstrap-reboot.min.css",
"maxSize": "2 kB" "maxSize": "2 kB"
}, },
{
"path": "./dist/css/bootstrap-utilities.css",
"maxSize": "7.5 kB"
},
{
"path": "./dist/css/bootstrap-utilities.min.css",
"maxSize": "6.75 kB"
},
{ {
"path": "./dist/css/bootstrap.css", "path": "./dist/css/bootstrap.css",
"maxSize": "24 kB" "maxSize": "25.5 kB"
}, },
{ {
"path": "./dist/css/bootstrap.min.css", "path": "./dist/css/bootstrap.min.css",
"maxSize": "22 kB" "maxSize": "23.5 kB"
}, },
{ {
"path": "./dist/js/bootstrap.bundle.js", "path": "./dist/js/bootstrap.bundle.js",
"maxSize": "41 kB" "maxSize": "48 kB"
}, },
{ {
"path": "./dist/js/bootstrap.bundle.min.js", "path": "./dist/js/bootstrap.bundle.min.js",
"maxSize": "21.5 kB" "maxSize": "21.5 kB"
}, },
{
"path": "./dist/js/bootstrap.esm.js",
"maxSize": "27 kB"
},
{
"path": "./dist/js/bootstrap.esm.min.js",
"maxSize": "18 kB"
},
{ {
"path": "./dist/js/bootstrap.js", "path": "./dist/js/bootstrap.js",
"maxSize": "28 kB" "maxSize": "25.5 kB"
}, },
{ {
"path": "./dist/js/bootstrap.min.js", "path": "./dist/js/bootstrap.min.js",
"maxSize": "15.5 kB" "maxSize": "14.75 kB"
} }
], ],
"ci": { "ci": {

View file

@ -9,3 +9,6 @@ indent_size = 2
indent_style = space indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

View file

@ -21,10 +21,6 @@
"warn", "warn",
5 5
], ],
"multiline-ternary": [
"error",
"always-multiline"
],
"new-cap": [ "new-cap": [
"error", "error",
{ {
@ -32,6 +28,8 @@
} }
], ],
"no-console": "error", "no-console": "error",
"no-mixed-operators": "off",
"no-negated-condition": "off",
"object-curly-spacing": [ "object-curly-spacing": [
"error", "error",
"always" "always"
@ -43,16 +41,23 @@
], ],
"unicorn/consistent-function-scoping": "off", "unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off", "unicorn/explicit-length-check": "off",
"unicorn/import-index": "off",
"unicorn/no-array-callback-reference": "off", "unicorn/no-array-callback-reference": "off",
"unicorn/no-for-loop": "off", "unicorn/no-for-loop": "off",
"unicorn/no-null": "off", "unicorn/no-null": "off",
"unicorn/no-unused-properties": "error", "unicorn/no-unused-properties": "error",
"unicorn/no-useless-undefined": "off", "unicorn/no-useless-undefined": "off",
"unicorn/prefer-dom-node-append": "off", "unicorn/prefer-array-find": "off",
"unicorn/prefer-dom-node-dataset": "off", "unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-includes": "off",
"unicorn/prefer-math-trunc": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-remove": "off", "unicorn/prefer-dom-node-remove": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-optional-catch-binding": "off", "unicorn/prefer-optional-catch-binding": "off",
"unicorn/prefer-query-selector": "off", "unicorn/prefer-query-selector": "off",
"unicorn/prefer-reflect-apply": "off",
"unicorn/prefer-set-has": "off",
"unicorn/prevent-abbreviations": "off" "unicorn/prevent-abbreviations": "off"
} }
} }

View file

@ -19,7 +19,7 @@ and [submitting pull requests](#pull-requests), but please respect the following
restrictions: restrictions:
* Please **do not** use the issue tracker for personal support requests. Stack * Please **do not** use the issue tracker for personal support requests. Stack
Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag), Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag),
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help. [Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
* Please **do not** derail or troll issues. Keep the discussion on topic and * Please **do not** derail or troll issues. Keep the discussion on topic and
@ -58,14 +58,14 @@ Good bug reports are extremely helpful, so thanks!
Guidelines for bug reports: Guidelines for bug reports:
0. **[Validate your HTML](https://html5.validator.nu/)** to ensure your 0. **[validate your HTML](https://html5.validator.nu/)** to ensure your
problem isn't caused by a simple error in your own code. problem isn't caused by a simple error in your own code.
1. **Use the GitHub issue search** &mdash; check if the issue has already been 1. **Use the GitHub issue search** &mdash; check if the issue has already been
reported. reported.
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the 2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `main` (or `v4-dev` branch if the issue is about v4) in the repository. latest `master` or `v4-dev` branch in the repository.
3. **Isolate the problem** &mdash; ideally create a [reduced test 3. **Isolate the problem** &mdash; ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/) and a live example. case](https://css-tricks.com/reduced-test-cases/) and a live example.
@ -100,6 +100,7 @@ Example:
### Reporting upstream browser bugs ### Reporting upstream browser bugs
Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se. Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes | | Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- | | ------------- | ---------------------------- | ---------------- | ------------------------------------------------------ | -------------------------------------------------------- |
@ -136,12 +137,12 @@ project (indentation, accurate comments, etc.) and any other requirements
**Do not edit `bootstrap.css` or `bootstrap.js`, and do not commit **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 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/main/scss) 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/main/js/src) instead. 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 Similarly, when contributing to Bootstrap's documentation, you should edit the
documentation source files in documentation source files in
[the `/bootstrap/site/content/docs/` directory of the `main` branch](https://github.com/twbs/bootstrap/tree/main/site/content/docs). [the `/bootstrap/site/content/docs/` directory of the `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 **Do not edit the `gh-pages` branch.** That branch is generated from the
documentation source files and is managed separately by the Bootstrap Core Team. documentation source files and is managed separately by the Bootstrap Core Team.
@ -163,8 +164,8 @@ included in the project:
2. If you cloned a while ago, get the latest changes from upstream: 2. If you cloned a while ago, get the latest changes from upstream:
```bash ```bash
git checkout main git checkout v4-dev
git pull upstream main git pull upstream v4-dev
``` ```
3. Create a new topic branch (off the main project development branch) to 3. Create a new topic branch (off the main project development branch) to
@ -183,7 +184,7 @@ included in the project:
5. Locally merge (or rebase) the upstream development branch into your topic branch: 5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash ```bash
git pull [--rebase] upstream main git pull [--rebase] upstream v4-dev
``` ```
6. Push your topic branch up to your fork: 6. Push your topic branch up to your fork:
@ -193,7 +194,7 @@ included in the project:
``` ```
7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/) 7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
with a clear title and description against the `main` branch. with a clear title and description against the `v4-dev` branch.
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to **IMPORTANT**: By submitting a patch, you agree to allow the project owners to
license your work under the terms of the [MIT License](../LICENSE) (if it license your work under the terms of the [MIT License](../LICENSE) (if it
@ -225,6 +226,7 @@ includes code changes) and under the terms of the
- 2 spaces (no tabs) - 2 spaces (no tabs)
- strict mode - strict mode
- "Attractive" - "Attractive"
- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
### Checking coding style ### Checking coding style

3
.github/FUNDING.yml vendored
View file

@ -1,3 +0,0 @@
# These are supported funding model platforms
open_collective: bootstrap

View file

@ -11,10 +11,10 @@ Before opening:
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) - [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems - [Validate](https://html5.validator.nu/) any HTML to avoid common problems
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md) - Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
Bug reports must include: Bug reports must include:
- Operating system and version (Windows, macOS, Android, iOS) - Operating system and version (Windows, macOS, Android, iOS)
- Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser) - 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/) - 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/)

View file

@ -1,4 +0,0 @@
contact_links:
- name: Ask a question
url: https://github.com/twbs/bootstrap/discussions/new
about: Ask and discuss questions with other Bootstrap community members

View file

@ -10,7 +10,7 @@ assignees: ''
Before opening: Before opening:
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) - [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md) - Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md)
Feature requests must include: Feature requests must include:

2
.github/SUPPORT.md vendored
View file

@ -8,4 +8,4 @@ For general troubleshooting or help getting started:
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). - Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. - Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag. - Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag.

View file

@ -1,24 +0,0 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: tuesday
time: "12:00"
timezone: Europe/Athens
open-pull-requests-limit: 10
reviewers:
- XhmikosR
labels:
- dependencies
- v5
versioning-strategy: increase
rebase-strategy: disabled
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
day: tuesday
time: "12:00"
timezone: Europe/Athens

View file

@ -1,54 +0,0 @@
name-template: 'v$NEXT_MAJOR_VERSION'
tag-template: 'v$NEXT_MAJOR_VERSION'
prerelease: true
exclude-labels:
- 'skip-changelog'
categories:
- title: '❗ Breaking Changes'
labels:
- 'breaking-change'
- title: '🚀 Features'
labels:
- 'new-feature'
- 'feature'
- 'enhancement'
- title: '🐛 Bug fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '⚡ Performance Improvements'
labels:
- 'performance'
- title: '🎨 CSS'
labels:
- 'css'
- title: '☕️ JavaScript'
labels:
- 'js'
- title: '📖 Docs'
labels:
- 'docs'
- title: '🌎 Accessibility'
labels:
- 'accessibility'
- title: '🔧 Utility API'
labels:
- 'utility API'
- 'utilities'
- title: '🏭 Tests'
labels:
- 'tests'
- title: '🧰 Misc'
labels:
- 'build'
- 'meta'
- 'chore'
- 'CI'
- title: '📦 Dependencies'
labels:
- 'dependencies'
change-template: '- #$NUMBER: $TITLE'
template: |
## Changes
$CHANGES

View file

@ -42,4 +42,4 @@ jobs:
run: npm run bundlewatch run: npm run bundlewatch
env: env:
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}" BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
CI_BRANCH_BASE: main CI_BRANCH_BASE: v4-dev

View file

@ -1,4 +1,4 @@
name: CSS (node-sass) name: CSS (Dart Sass)
on: on:
push: push:
@ -23,8 +23,8 @@ jobs:
with: with:
node-version: "${{ env.NODE }}" node-version: "${{ env.NODE }}"
- name: Build CSS with node-sass - name: Build CSS with Dart Sass
run: | run: |
npx --package node-sass@latest node-sass --version npx --package sass@latest sass --version
npx --package node-sass@latest node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist-sass/css/ npx --package sass@latest sass --style expanded --source-map --embed-sources --no-error-css scss/:dist-sass/css/
ls -Al dist-sass/css ls -Al dist-sass/css

View file

@ -1,14 +0,0 @@
name: Release notes
on:
push:
branches:
- main
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
.gitignore vendored
View file

@ -1,6 +1,6 @@
# Ignore docs files # Ignore docs files
/_gh_pages/ /_gh_pages/
# Hugo resources folder # Hugo folders
/resources/ /resources/
# Numerous always-ignore extensions # Numerous always-ignore extensions

View file

@ -8,9 +8,7 @@
"outline": "none" "outline": "none"
}, },
"function-disallowed-list": [ "function-disallowed-list": [
"calc", "calc"
"lighten",
"darken"
], ],
"property-disallowed-list": [ "property-disallowed-list": [
"border-radius", "border-radius",
@ -19,13 +17,6 @@
"border-bottom-right-radius", "border-bottom-right-radius",
"border-bottom-left-radius", "border-bottom-left-radius",
"transition" "transition"
], ]
"scss/dollar-variable-default": [
true,
{
"ignore": "local"
}
],
"scss/selector-no-union-class-name": true
} }
} }

View file

@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include: Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language * Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences * Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism * Gracefully accepting constructive criticism
- Focusing on what is best for the community * Focusing on what is best for the community
- Showing empathy towards other community members * Showing empathy towards other community members
Examples of unacceptable behavior by participants include: Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances * The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks * Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment * Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission * Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting * Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities ## Our Responsibilities

134
README.md
View file

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://getbootstrap.com/"> <a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165"> <img src="https://getbootstrap.com/docs/4.5/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
</a> </a>
</p> </p>
@ -9,7 +9,7 @@
<p align="center"> <p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development. Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br> <br>
<a href="https://getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a> <a href="https://getbootstrap.com/docs/4.5/"><strong>Explore Bootstrap docs »</strong></a>
<br> <br>
<br> <br>
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a> <a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
@ -22,11 +22,6 @@
</p> </p>
## Bootstrap 4
Our default branch is for development of our upcoming Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
## Table of contents ## Table of contents
- [Quick start](#quick-start) - [Quick start](#quick-start)
@ -46,20 +41,20 @@ Our default branch is for development of our upcoming Bootstrap 5 release. Head
Several quick start options are available: Several quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0-beta1.zip) - [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.5.3.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` - Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@next` - Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@next` - Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.5.3`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0-beta1` - Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.5.3`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` - Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more. Read the [Getting started page](https://getbootstrap.com/docs/4.5/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
## Status ## Status
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/) [![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/)
[![Build Status](https://github.com/twbs/bootstrap/workflows/JS%20Tests/badge.svg?branch=main)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain) [![Build Status](https://github.com/twbs/bootstrap/workflows/JS%20Tests/badge.svg?branch=v4-dev)](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) [![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) [![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) [![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue)](https://atmospherejs.com/twbs/bootstrap)
@ -67,11 +62,9 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-starte
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest) [![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=peer) [![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=peer)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=dev) [![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=dev)
[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/main)](https://coveralls.io/github/twbs/bootstrap?branch=main) [![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/main/dist/css/bootstrap.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css) [![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)
[![CSS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=brotli&label=CSS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/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)
[![JS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=gzip&label=JS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
[![JS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=brotli&label=JS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/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) [![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://img.shields.io/opencollective/backers/bootstrap)](#backers) [![Backers on Open Collective](https://img.shields.io/opencollective/backers/bootstrap)](#backers)
[![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap)](#sponsors) [![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap)](#sponsors)
@ -83,60 +76,37 @@ Within the download you'll find the following directories and files, logically g
```text ```text
bootstrap/ bootstrap/
├── css/ └── dist/
│ ├── bootstrap-grid.css ├── css/
│ ├── bootstrap-grid.css.map │ ├── bootstrap-grid.css
│ ├── bootstrap-grid.min.css │ ├── bootstrap-grid.css.map
│ ├── bootstrap-grid.min.css.map │ ├── bootstrap-grid.min.css
│ ├── bootstrap-grid.rtl.css │ ├── bootstrap-grid.min.css.map
│ ├── bootstrap-grid.rtl.css.map │ ├── bootstrap-reboot.css
│ ├── bootstrap-grid.rtl.min.css │ ├── bootstrap-reboot.css.map
│ ├── bootstrap-grid.rtl.min.css.map │ ├── bootstrap-reboot.min.css
│ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.min.css.map
│ ├── bootstrap-reboot.css.map │ ├── bootstrap.css
│ ├── bootstrap-reboot.min.css │ ├── bootstrap.css.map
│ ├── bootstrap-reboot.min.css.map │ ├── bootstrap.min.css
│ ├── bootstrap-reboot.rtl.css │ └── bootstrap.min.css.map
│ ├── bootstrap-reboot.rtl.css.map └── js/
│ ├── bootstrap-reboot.rtl.min.css ├── bootstrap.bundle.js
│ ├── bootstrap-reboot.rtl.min.css.map ├── bootstrap.bundle.js.map
│ ├── bootstrap-utilities.css ├── bootstrap.bundle.min.js
│ ├── bootstrap-utilities.css.map ├── bootstrap.bundle.min.js.map
│ ├── bootstrap-utilities.min.css ├── bootstrap.js
│ ├── bootstrap-utilities.min.css.map ├── bootstrap.js.map
│ ├── bootstrap-utilities.rtl.css ├── bootstrap.min.js
│ ├── bootstrap-utilities.rtl.css.map └── bootstrap.min.js.map
│ ├── bootstrap-utilities.rtl.min.css
│ ├── bootstrap-utilities.rtl.min.css.map
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── bootstrap.rtl.css
│ ├── bootstrap.rtl.css.map
│ ├── bootstrap.rtl.min.css
│ └── bootstrap.rtl.min.css.map
└── js/
├── bootstrap.bundle.js
├── bootstrap.bundle.js.map
├── bootstrap.bundle.min.js
├── bootstrap.bundle.min.js.map
├── bootstrap.esm.js
├── bootstrap.esm.js.map
├── bootstrap.esm.min.js
├── bootstrap.esm.min.js.map
├── bootstrap.js
├── bootstrap.js.map
├── bootstrap.min.js
└── bootstrap.min.js.map
``` ```
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/). We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/).
## Bugs and feature requests ## Bugs and feature requests
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/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 ## Documentation
@ -149,7 +119,7 @@ Documentation search is powered by [Algolia's DocSearch](https://community.algol
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder). 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. 2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line. 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 Hugo by reading its [documentation](https://gohugo.io/documentation/). Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
@ -163,11 +133,11 @@ You can find all our previous releases docs on <https://getbootstrap.com/docs/ve
## Contributing ## Contributing
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/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/main/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo). Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/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/main/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>. Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/v4-dev/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
## Community ## Community
@ -178,7 +148,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/). - Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). - Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. - Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)). - Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability. - Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
@ -215,16 +185,16 @@ Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infras
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)] Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
[![OC sponsor 0](https://opencollective.com/bootstrap/sponsor/0/avatar.svg)](https://opencollective.com/bootstrap/sponsor/0/website) [![](https://opencollective.com/bootstrap/sponsor/0/avatar.svg)](https://opencollective.com/bootstrap/sponsor/0/website)
[![OC sponsor 1](https://opencollective.com/bootstrap/sponsor/1/avatar.svg)](https://opencollective.com/bootstrap/sponsor/1/website) [![](https://opencollective.com/bootstrap/sponsor/1/avatar.svg)](https://opencollective.com/bootstrap/sponsor/1/website)
[![OC sponsor 2](https://opencollective.com/bootstrap/sponsor/2/avatar.svg)](https://opencollective.com/bootstrap/sponsor/2/website) [![](https://opencollective.com/bootstrap/sponsor/2/avatar.svg)](https://opencollective.com/bootstrap/sponsor/2/website)
[![OC sponsor 3](https://opencollective.com/bootstrap/sponsor/3/avatar.svg)](https://opencollective.com/bootstrap/sponsor/3/website) [![](https://opencollective.com/bootstrap/sponsor/3/avatar.svg)](https://opencollective.com/bootstrap/sponsor/3/website)
[![OC sponsor 4](https://opencollective.com/bootstrap/sponsor/4/avatar.svg)](https://opencollective.com/bootstrap/sponsor/4/website) [![](https://opencollective.com/bootstrap/sponsor/4/avatar.svg)](https://opencollective.com/bootstrap/sponsor/4/website)
[![OC sponsor 5](https://opencollective.com/bootstrap/sponsor/5/avatar.svg)](https://opencollective.com/bootstrap/sponsor/5/website) [![](https://opencollective.com/bootstrap/sponsor/5/avatar.svg)](https://opencollective.com/bootstrap/sponsor/5/website)
[![OC sponsor 6](https://opencollective.com/bootstrap/sponsor/6/avatar.svg)](https://opencollective.com/bootstrap/sponsor/6/website) [![](https://opencollective.com/bootstrap/sponsor/6/avatar.svg)](https://opencollective.com/bootstrap/sponsor/6/website)
[![OC sponsor 7](https://opencollective.com/bootstrap/sponsor/7/avatar.svg)](https://opencollective.com/bootstrap/sponsor/7/website) [![](https://opencollective.com/bootstrap/sponsor/7/avatar.svg)](https://opencollective.com/bootstrap/sponsor/7/website)
[![OC sponsor 8](https://opencollective.com/bootstrap/sponsor/8/avatar.svg)](https://opencollective.com/bootstrap/sponsor/8/website) [![](https://opencollective.com/bootstrap/sponsor/8/avatar.svg)](https://opencollective.com/bootstrap/sponsor/8/website)
[![OC sponsor 9](https://opencollective.com/bootstrap/sponsor/9/avatar.svg)](https://opencollective.com/bootstrap/sponsor/9/website) [![](https://opencollective.com/bootstrap/sponsor/9/avatar.svg)](https://opencollective.com/bootstrap/sponsor/9/website)
## Backers ## Backers
@ -236,4 +206,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
## Copyright and license ## Copyright and license
Code and documentation copyright 20112021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/). Code and documentation copyright 2011-2021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).

View file

@ -14,7 +14,7 @@ const rollup = require('rollup')
const { babel } = require('@rollup/plugin-babel') const { babel } = require('@rollup/plugin-babel')
const banner = require('./banner.js') const banner = require('./banner.js')
const rootPath = path.resolve(__dirname, '../js/dist/') const TEST = process.env.NODE_ENV === 'test'
const plugins = [ const plugins = [
babel({ babel({
// Only transpile our source code // Only transpile our source code
@ -24,12 +24,7 @@ const plugins = [
}) })
] ]
const bsPlugins = { const bsPlugins = {
Data: path.resolve(__dirname, '../js/src/dom/data.js'),
EventHandler: path.resolve(__dirname, '../js/src/dom/event-handler.js'),
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
Alert: path.resolve(__dirname, '../js/src/alert.js'), Alert: path.resolve(__dirname, '../js/src/alert.js'),
Base: path.resolve(__dirname, '../js/src/base-component.js'),
Button: path.resolve(__dirname, '../js/src/button.js'), Button: path.resolve(__dirname, '../js/src/button.js'),
Carousel: path.resolve(__dirname, '../js/src/carousel.js'), Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
Collapse: path.resolve(__dirname, '../js/src/collapse.js'), Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
@ -39,124 +34,33 @@ const bsPlugins = {
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'), ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
Tab: path.resolve(__dirname, '../js/src/tab.js'), Tab: path.resolve(__dirname, '../js/src/tab.js'),
Toast: path.resolve(__dirname, '../js/src/toast.js'), Toast: path.resolve(__dirname, '../js/src/toast.js'),
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js') Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'),
Util: path.resolve(__dirname, '../js/src/util.js')
} }
const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/'
const defaultPluginConfig = {
external: [
bsPlugins.Data,
bsPlugins.Base,
bsPlugins.EventHandler,
bsPlugins.SelectorEngine
],
globals: {
[bsPlugins.Data]: 'Data',
[bsPlugins.Base]: 'Base',
[bsPlugins.EventHandler]: 'EventHandler',
[bsPlugins.SelectorEngine]: 'SelectorEngine'
}
}
const getConfigByPluginKey = pluginKey => {
if (
pluginKey === 'Data' ||
pluginKey === 'Manipulator' ||
pluginKey === 'EventHandler' ||
pluginKey === 'SelectorEngine' ||
pluginKey === 'Util' ||
pluginKey === 'Sanitizer'
) {
return {
external: []
}
}
if (pluginKey === 'Alert' || pluginKey === 'Tab') {
return defaultPluginConfig
}
if (
pluginKey === 'Base' ||
pluginKey === 'Button' ||
pluginKey === 'Carousel' ||
pluginKey === 'Collapse' ||
pluginKey === 'Modal' ||
pluginKey === 'ScrollSpy'
) {
const config = Object.assign(defaultPluginConfig)
config.external.push(bsPlugins.Manipulator)
config.globals[bsPlugins.Manipulator] = 'Manipulator'
return config
}
if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
const config = Object.assign(defaultPluginConfig)
config.external.push(bsPlugins.Manipulator, '@popperjs/core')
config.globals[bsPlugins.Manipulator] = 'Manipulator'
config.globals['@popperjs/core'] = 'Popper'
return config
}
if (pluginKey === 'Popover') {
return {
external: [
bsPlugins.Data,
bsPlugins.SelectorEngine,
bsPlugins.Tooltip
],
globals: {
[bsPlugins.Data]: 'Data',
[bsPlugins.SelectorEngine]: 'SelectorEngine',
[bsPlugins.Tooltip]: 'Tooltip'
}
}
}
if (pluginKey === 'Toast') {
return {
external: [
bsPlugins.Data,
bsPlugins.Base,
bsPlugins.EventHandler,
bsPlugins.Manipulator
],
globals: {
[bsPlugins.Data]: 'Data',
[bsPlugins.Base]: 'Base',
[bsPlugins.EventHandler]: 'EventHandler',
[bsPlugins.Manipulator]: 'Manipulator'
}
}
}
}
const utilObjects = new Set([
'Util',
'Sanitizer'
])
const domObjects = new Set([
'Data',
'EventHandler',
'Manipulator',
'SelectorEngine'
])
const build = async plugin => { const build = async plugin => {
console.log(`Building ${plugin} plugin...`) console.log(`Building ${plugin} plugin...`)
const { external, globals } = getConfigByPluginKey(plugin) const external = ['jquery', 'popper.js']
const pluginFilename = path.basename(bsPlugins[plugin]) const globals = {
let pluginPath = rootPath jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
'popper.js': 'Popper'
if (utilObjects.has(plugin)) {
pluginPath = `${rootPath}/util/`
} }
if (domObjects.has(plugin)) { // Do not bundle Util in plugins
pluginPath = `${rootPath}/dom/` if (plugin !== 'Util') {
external.push(bsPlugins.Util)
globals[bsPlugins.Util] = 'Util'
} }
// Do not bundle Tooltip in Popover
if (plugin === 'Popover') {
external.push(bsPlugins.Tooltip)
globals[bsPlugins.Tooltip] = 'Tooltip'
}
const pluginFilename = `${plugin.toLowerCase()}.js`
const bundle = await rollup.rollup({ const bundle = await rollup.rollup({
input: bsPlugins[plugin], input: bsPlugins[plugin],
plugins, plugins,
@ -169,7 +73,7 @@ const build = async plugin => {
name: plugin, name: plugin,
sourcemap: true, sourcemap: true,
globals, globals,
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`) file: path.resolve(__dirname, `${rootPath}${pluginFilename}`)
}) })
console.log(`Building ${plugin} plugin... Done!`) console.log(`Building ${plugin} plugin... Done!`)

26
build/change-version.js Normal file → Executable file
View file

@ -17,7 +17,7 @@ sh.config.fatal = true
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 // Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) { function regExpQuote(string) {
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&') return string.replace(/[$()*+.?[\\\]^{|}-]/g, '\\$&')
} }
function regExpQuoteReplacement(string) { function regExpQuoteReplacement(string) {
@ -58,19 +58,17 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(regExpQuote(original), 'g') original = new RegExp(regExpQuote(original), 'g')
replacement = regExpQuoteReplacement(replacement) replacement = regExpQuoteReplacement(replacement)
const updateFile = DRY_RUN ? const updateFile = DRY_RUN ? filepath => {
filepath => { if (allowedExtensions.has(path.parse(filepath).ext)) {
if (allowedExtensions.has(path.parse(filepath).ext)) { console.log(`FILE: ${filepath}`)
console.log(`FILE: ${filepath}`) } else {
} else { console.log(`EXCLUDED:${filepath}`)
console.log(`EXCLUDED:${filepath}`)
}
} :
filepath => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sh.sed('-i', original, replacement, filepath)
}
} }
} : filepath => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sh.sed('-i', original, replacement, filepath)
}
}
walkAsync(directory, excludedDirectories, updateFile, err => { walkAsync(directory, excludedDirectories, updateFile, err => {
console.error('ERROR while traversing directory!:') console.error('ERROR while traversing directory!:')
@ -95,7 +93,7 @@ function main(args) {
'vendor' 'vendor'
]) ])
const INCLUDED_EXTENSIONS = new Set([ const INCLUDED_EXTENSIONS = new Set([
// This extension allowlist is how we avoid modifying binary files // This extension whitelist is how we avoid modifying binary files
'', '',
'.css', '.css',
'.html', '.html',

View file

@ -17,6 +17,8 @@ const fs = require('fs')
const path = require('path') const path = require('path')
const sh = require('shelljs') const sh = require('shelljs')
const pkg = require('../package.json')
sh.config.fatal = true sh.config.fatal = true
const configFile = path.join(__dirname, '../config.yml') const configFile = path.join(__dirname, '../config.yml')
@ -29,10 +31,6 @@ const files = [
file: 'dist/css/bootstrap.min.css', file: 'dist/css/bootstrap.min.css',
configPropertyName: 'css_hash' configPropertyName: 'css_hash'
}, },
{
file: 'dist/css/bootstrap.rtl.min.css',
configPropertyName: 'css_rtl_hash'
},
{ {
file: 'dist/js/bootstrap.min.js', file: 'dist/js/bootstrap.min.js',
configPropertyName: 'js_hash' configPropertyName: 'js_hash'
@ -42,7 +40,11 @@ const files = [
configPropertyName: 'js_bundle_hash' configPropertyName: 'js_bundle_hash'
}, },
{ {
file: 'node_modules/@popperjs/core/dist/umd/popper.min.js', file: `site/static/docs/${pkg.config.version_short}/assets/js/vendor/jquery.slim.min.js`,
configPropertyName: 'jquery_hash'
},
{
file: 'node_modules/popper.js/dist/umd/popper.min.js',
configPropertyName: 'popper_hash' configPropertyName: 'popper_hash'
} }
] ]

View file

@ -12,8 +12,7 @@ module.exports = ctx => {
plugins: { plugins: {
autoprefixer: { autoprefixer: {
cascade: false cascade: false
}, }
rtlcss: ctx.env === 'RTL' ? {} : false
} }
} }
} }

View file

@ -3,14 +3,12 @@
const path = require('path') const path = require('path')
const { babel } = require('@rollup/plugin-babel') const { babel } = require('@rollup/plugin-babel')
const { nodeResolve } = require('@rollup/plugin-node-resolve') const { nodeResolve } = require('@rollup/plugin-node-resolve')
const replace = require('@rollup/plugin-replace')
const banner = require('./banner.js') const banner = require('./banner.js')
const BUNDLE = process.env.BUNDLE === 'true' const BUNDLE = process.env.BUNDLE === 'true'
const ESM = process.env.ESM === 'true'
let fileDest = `bootstrap${ESM ? '.esm' : ''}` let fileDest = 'bootstrap.js'
const external = ['@popperjs/core'] const external = ['jquery', 'popper.js']
const plugins = [ const plugins = [
babel({ babel({
// Only transpile our source code // Only transpile our source code
@ -20,31 +18,27 @@ const plugins = [
}) })
] ]
const globals = { const globals = {
'@popperjs/core': 'Popper' jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode
'popper.js': 'Popper'
} }
if (BUNDLE) { if (BUNDLE) {
fileDest += '.bundle' fileDest = 'bootstrap.bundle.js'
// Remove last entry in external array to bundle Popper // Remove last entry in external array to bundle Popper
external.pop() external.pop()
delete globals['@popperjs/core'] delete globals['popper.js']
plugins.push(replace({ 'process.env.NODE_ENV': '"production"' }), nodeResolve()) plugins.push(nodeResolve())
} }
const rollupConfig = { module.exports = {
input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`), input: path.resolve(__dirname, '../js/index.js'),
output: { output: {
banner, banner,
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`), file: path.resolve(__dirname, `../dist/js/${fileDest}`),
format: ESM ? 'esm' : 'umd', format: 'umd',
globals globals,
name: 'bootstrap'
}, },
external, external,
plugins plugins
} }
if (!ESM) {
rollupConfig.output.name = 'bootstrap'
}
module.exports = rollupConfig

2
build/ship.sh Normal file → Executable file
View file

@ -29,7 +29,7 @@ fi
printf "\n%s=======================================================%s" "$magenta" "$end" printf "\n%s=======================================================%s" "$magenta" "$end"
printf "\n%sPulling latest changes...%s" "$magenta" "$end" printf "\n%sPulling latest changes...%s" "$magenta" "$end"
printf "\n%s=======================================================\n\n%s" "$magenta" "$end" printf "\n%s=======================================================\n\n%s" "$magenta" "$end"
git pull origin main git pull origin v4-dev
# Update version number # Update version number
printf "\n%s=======================================================%s" "$magenta" "$end" printf "\n%s=======================================================%s" "$magenta" "$end"

View file

@ -15,9 +15,10 @@ js2svg:
indent: 2 indent: 2
plugins: plugins:
# - addAttributesToSVGElement: # remove this with IE 11 is no longer supported
# attributes: - addAttributesToSVGElement:
# - focusable: false attributes:
- focusable: false
- cleanupAttrs: true - cleanupAttrs: true
- cleanupEnableBackground: true - cleanupEnableBackground: true
- cleanupIDs: true - cleanupIDs: true

View file

@ -33,11 +33,10 @@ childProcess.exec('java -version', (error, stdout, stderr) => {
// Content → Reboot uses various date/time inputs as a visual example. // Content → Reboot uses various date/time inputs as a visual example.
// Documentation does not rely on them being usable. // Documentation does not rely on them being usable.
'The “date” input type is not supported in all browsers.*', 'The “date” input type is not supported in all browsers.*',
'The “week” input type is not supported in all browsers.*', 'The “time” input type is not supported in all browsers.*',
'The “month” input type is not supported in all browsers.*', // IE11 doesn't recognise <main> / give the element an implicit "main" landmark.
'The “color” input type is not supported in all browsers.*', // Explicit role="main" is redundant for other modern browsers, but still valid.
'The “datetime-local” input type is not supported in all browsers.*', 'The “main” role is unnecessary for element “main”.'
'The “time” input type is not supported in all browsers.*'
].join('|') ].join('|')
const args = [ const args = [

View file

@ -22,17 +22,15 @@ const docsDir = `${rootDocsDir}/docs/${versionShort}/`
// these are the files we need in the examples // these are the files we need in the examples
const cssFiles = [ const cssFiles = [
'bootstrap.min.css', 'bootstrap.min.css',
'bootstrap.min.css.map', 'bootstrap.min.css.map'
'bootstrap.rtl.min.css',
'bootstrap.rtl.min.css.map'
] ]
const jsFiles = [ const jsFiles = [
'bootstrap.bundle.min.js', 'bootstrap.bundle.min.js',
'bootstrap.bundle.min.js.map' 'bootstrap.bundle.min.js.map'
] ]
const imgFiles = [ const imgFiles = [
'bootstrap-logo.svg', 'bootstrap-outline.svg',
'bootstrap-logo-white.svg' 'bootstrap-solid.svg'
] ]
sh.config.fatal = true sh.config.fatal = true

View file

@ -26,6 +26,11 @@
"issues": "https://github.com/twbs/bootstrap/issues" "issues": "https://github.com/twbs/bootstrap/issues"
}, },
"license": "MIT", "license": "MIT",
"extra": {
"branch-alias": {
"dev-master": "3.3.x-dev"
}
},
"replace": { "replace": {
"twitter/bootstrap": "self.version" "twitter/bootstrap": "self.version"
} }

View file

@ -25,7 +25,7 @@ publishDir: "_gh_pages"
module: module:
mounts: mounts:
- source: dist - source: dist
target: static/docs/5.0/dist target: static/docs/4.5/dist
- source: site/assets - source: site/assets
target: assets target: assets
- source: site/content - source: site/content
@ -36,44 +36,44 @@ module:
target: layouts target: layouts
- source: site/static - source: site/static
target: static target: static
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png - source: site/static/docs/4.5/assets/img/favicons/apple-touch-icon.png
target: static/apple-touch-icon.png target: static/apple-touch-icon.png
- source: site/static/docs/5.0/assets/img/favicons/favicon.ico - source: site/static/docs/4.5/assets/img/favicons/favicon.ico
target: static/favicon.ico target: static/favicon.ico
params: params:
description: "The most popular HTML, CSS, and JS library in the world." description: "The most popular HTML, CSS, and JS library in the world."
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors" authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png social_image_path: /docs/4.5/assets/brand/bootstrap-social.png
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png social_logo_path: /docs/4.5/assets/brand/bootstrap-social-logo.png
current_version: "5.0.0-beta1" current_version: "4.5.3"
current_ruby_version: "5.0.0.beta1" current_ruby_version: "4.5.3"
docs_version: "5.0" docs_version: "4.5"
rfs_version: "9.0.3"
github_org: "https://github.com/twbs" github_org: "https://github.com/twbs"
repo: "https://github.com/twbs/bootstrap" repo: "https://github.com/twbs/bootstrap"
twitter: "getbootstrap" twitter: "getbootstrap"
slack: "https://bootstrap-slack.herokuapp.com/" slack: "https://bootstrap-slack.herokuapp.com/"
opencollective: "https://opencollective.com/bootstrap" opencollective: "https://opencollective.com/bootstrap"
blog: "https://blog.getbootstrap.com/" blog: "https://blog.getbootstrap.com/"
expo: "https://expo.getbootstrap.com/"
themes: "https://themes.getbootstrap.com/" themes: "https://themes.getbootstrap.com/"
icons: "https://icons.getbootstrap.com/" icons: "https://icons.getbootstrap.com/"
download: download:
source: "https://github.com/twbs/bootstrap/archive/v5.0.0-beta1.zip" source: "https://github.com/twbs/bootstrap/archive/v4.5.3.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-beta1/bootstrap-5.0.0-beta1-dist.zip" dist: "https://github.com/twbs/bootstrap/releases/download/v4.5.3/bootstrap-4.5.3-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0-beta1/bootstrap-5.0.0-beta1-examples.zip" dist_examples: "https://github.com/twbs/bootstrap/releases/download/v4.5.3/bootstrap-4.5.3-examples.zip"
cdn: cdn:
# See https://www.srihash.org for info on how to generate the hashes # See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" css: "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
css_hash: "sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" css_hash: "sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.rtl.min.css" js: "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
css_rtl_hash: "sha384-mUkCBeyHPdg0tqB6JDd+65Gpw5h/l8DKcCTV2D2UpaMMFd7Jo8A+mDAosaWgFBPl" js_hash: "sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"
js_hash: "sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" js_bundle_hash: "sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" jquery: "https://code.jquery.com/jquery-3.5.1.slim.min.js"
js_bundle_hash: "sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" jquery_hash: "sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js" popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
popper_hash: "sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi" popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap Reboot v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors * Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc. * Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -11,22 +11,26 @@
box-sizing: border-box; box-sizing: border-box;
} }
@media (prefers-reduced-motion: no-preference) { html {
:root { font-family: sans-serif;
scroll-behavior: smooth; line-height: 1.15;
} -webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
} }
body { body {
margin: 0; margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem; font-size: 1rem;
font-weight: 400; font-weight: 400;
line-height: 1.5; line-height: 1.5;
color: #212529; color: #212529;
text-align: left;
background-color: #fff; background-color: #fff;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
[tabindex="-1"]:focus:not(:focus-visible) { [tabindex="-1"]:focus:not(:focus-visible) {
@ -34,66 +38,14 @@ body {
} }
hr { hr {
margin: 1rem 0; box-sizing: content-box;
color: inherit; height: 0;
background-color: currentColor; overflow: visible;
border: 0;
opacity: 0.25;
} }
hr:not([size]) { h1, h2, h3, h4, h5, h6 {
height: 1px;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0; margin-top: 0;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
} }
p { p {
@ -102,11 +54,12 @@ p {
} }
abbr[title], abbr[title],
abbr[data-bs-original-title] { abbr[data-original-title] {
text-decoration: underline; text-decoration: underline;
-webkit-text-decoration: underline dotted; -webkit-text-decoration: underline dotted;
text-decoration: underline dotted; text-decoration: underline dotted;
cursor: help; cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none; -webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none; text-decoration-skip-ink: none;
} }
@ -117,11 +70,6 @@ address {
line-height: inherit; line-height: inherit;
} }
ol,
ul {
padding-left: 2rem;
}
ol, ol,
ul, ul,
dl { dl {
@ -141,7 +89,7 @@ dt {
} }
dd { dd {
margin-bottom: 0.5rem; margin-bottom: .5rem;
margin-left: 0; margin-left: 0;
} }
@ -155,39 +103,42 @@ strong {
} }
small { small {
font-size: 0.875em; font-size: 80%;
}
mark {
padding: 0.2em;
background-color: #fcf8e3;
} }
sub, sub,
sup { sup {
position: relative; position: relative;
font-size: 0.75em; font-size: 75%;
line-height: 0; line-height: 0;
vertical-align: baseline; vertical-align: baseline;
} }
sub { sub {
bottom: -0.25em; bottom: -.25em;
} }
sup { sup {
top: -0.5em; top: -.5em;
} }
a { a {
color: #0d6efd; color: #007bff;
text-decoration: underline; text-decoration: none;
} background-color: transparent;
a:hover {
color: #0a58ca;
} }
a:not([href]):not([class]), a:not([href]):not([class]):hover { a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):not([class]):hover {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
@ -198,64 +149,39 @@ kbd,
samp { samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em; font-size: 1em;
direction: ltr /* rtl:ignore */;
unicode-bidi: bidi-override;
} }
pre { pre {
display: block;
margin-top: 0; margin-top: 0;
margin-bottom: 1rem; margin-bottom: 1rem;
overflow: auto; overflow: auto;
font-size: 0.875em; -ms-overflow-style: scrollbar;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: #d63384;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.2rem 0.4rem;
font-size: 0.875em;
color: #fff;
background-color: #212529;
border-radius: 0.2rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
font-weight: 700;
} }
figure { figure {
margin: 0 0 1rem; margin: 0 0 1rem;
} }
img, img {
vertical-align: middle;
border-style: none;
}
svg { svg {
overflow: hidden;
vertical-align: middle; vertical-align: middle;
} }
table { table {
caption-side: bottom;
border-collapse: collapse; border-collapse: collapse;
} }
caption { caption {
padding-top: 0.5rem; padding-top: 0.75rem;
padding-bottom: 0.5rem; padding-bottom: 0.75rem;
color: #6c757d; color: #6c757d;
text-align: left; text-align: left;
caption-side: bottom;
} }
th { th {
@ -263,19 +189,9 @@ th {
text-align: -webkit-match-parent; text-align: -webkit-match-parent;
} }
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label { label {
display: inline-block; display: inline-block;
margin-bottom: 0.5rem;
} }
button { button {
@ -283,8 +199,8 @@ button {
} }
button:focus { button:focus {
outline: dotted 1px; outline: 1px dotted;
outline: -webkit-focus-ring-color auto 5px; outline: 5px auto -webkit-focus-ring-color;
} }
input, input,
@ -298,12 +214,17 @@ textarea {
line-height: inherit; line-height: inherit;
} }
button,
input {
overflow: visible;
}
button, button,
select { select {
text-transform: none; text-transform: none;
} }
[role=button] { [role="button"] {
cursor: pointer; cursor: pointer;
} }
@ -311,29 +232,36 @@ select {
word-wrap: normal; word-wrap: normal;
} }
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button, button,
[type=button], [type="button"],
[type=reset], [type="reset"],
[type=submit] { [type="submit"] {
-webkit-appearance: button; -webkit-appearance: button;
} }
button:not(:disabled), button:not(:disabled),
[type=button]:not(:disabled), [type="button"]:not(:disabled),
[type=reset]:not(:disabled), [type="reset"]:not(:disabled),
[type=submit]:not(:disabled) { [type="submit"]:not(:disabled) {
cursor: pointer; cursor: pointer;
} }
::-moz-focus-inner { button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0; padding: 0;
border-style: none; border-style: none;
} }
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
textarea { textarea {
overflow: auto;
resize: vertical; resize: vertical;
} }
@ -345,59 +273,33 @@ fieldset {
} }
legend { legend {
float: left; display: block;
width: 100%; width: 100%;
max-width: 100%;
padding: 0; padding: 0;
margin-bottom: 0.5rem; margin-bottom: .5rem;
font-size: calc(1.275rem + 0.3vw); font-size: 1.5rem;
line-height: inherit; line-height: inherit;
} color: inherit;
@media (min-width: 1200px) { white-space: normal;
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
} }
::-webkit-datetime-edit-fields-wrapper, progress {
::-webkit-datetime-edit-text, vertical-align: baseline;
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
} }
::-webkit-inner-spin-button { [type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto; height: auto;
} }
[type=search] { [type="search"] {
outline-offset: -2px; outline-offset: -2px;
-webkit-appearance: textfield;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }
::-webkit-color-swatch-wrapper { [type="search"]::-webkit-search-decoration {
padding: 0; -webkit-appearance: none;
}
::file-selector-button {
font: inherit;
} }
::-webkit-file-upload-button { ::-webkit-file-upload-button {
@ -409,21 +311,16 @@ output {
display: inline-block; display: inline-block;
} }
iframe {
border: 0;
}
summary { summary {
display: list-item; display: list-item;
cursor: pointer; cursor: pointer;
} }
progress { template {
vertical-align: baseline; display: none;
} }
[hidden] { [hidden] {
display: none !important; display: none !important;
} }
/*# sourceMappingURL=bootstrap-reboot.css.map */ /*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

View file

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

File diff suppressed because one or more lines are too long

View file

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

File diff suppressed because one or more lines are too long

View file

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

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4961
dist/js/bootstrap.esm.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

259
js/dist/alert.js vendored
View file

@ -1,109 +1,18 @@
/*! /*!
* Bootstrap alert.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap alert.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util));
}(this, (function (Data, EventHandler) { 'use strict'; }(this, (function ($, Util) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var getSelector = function getSelector(element) {
var selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
var getElementFromSelector = function getElementFromSelector(element) {
var selector = getSelector(element);
return selector ? document.querySelector(selector) : null;
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = Number.parseFloat(transitionDuration);
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -114,133 +23,107 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'alert'; var NAME = 'alert';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.alert'; var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var SELECTOR_DISMISS = '[data-bs-dismiss="alert"]'; var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
var EVENT_CLOSE = "close" + EVENT_KEY; var EVENT_CLOSE = "close" + EVENT_KEY;
var EVENT_CLOSED = "closed" + EVENT_KEY; var EVENT_CLOSED = "closed" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY; var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
var CLASSNAME_ALERT = 'alert'; var CLASS_NAME_ALERT = 'alert';
var CLASSNAME_FADE = 'fade'; var CLASS_NAME_FADE = 'fade';
var CLASSNAME_SHOW = 'show'; var CLASS_NAME_SHOW = 'show';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Alert = /*#__PURE__*/function (_BaseComponent) { var Alert = /*#__PURE__*/function () {
_inheritsLoose(Alert, _BaseComponent); function Alert(element) {
this._element = element;
} // Getters
function Alert() {
return _BaseComponent.apply(this, arguments) || this;
}
var _proto = Alert.prototype; var _proto = Alert.prototype;
// Public // Public
_proto.close = function close(element) { _proto.close = function close(element) {
var rootElement = element ? this._getRootElement(element) : this._element; var rootElement = this._element;
if (element) {
rootElement = this._getRootElement(element);
}
var customEvent = this._triggerCloseEvent(rootElement); var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent === null || customEvent.defaultPrevented) { if (customEvent.isDefaultPrevented()) {
return; return;
} }
this._removeElement(rootElement); this._removeElement(rootElement);
};
_proto.dispose = function dispose() {
$__default['default'].removeData(this._element, DATA_KEY);
this._element = null;
} // Private } // Private
; ;
_proto._getRootElement = function _getRootElement(element) { _proto._getRootElement = function _getRootElement(element) {
return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT); var selector = Util__default['default'].getSelectorFromElement(element);
var parent = false;
if (selector) {
parent = document.querySelector(selector);
}
if (!parent) {
parent = $__default['default'](element).closest("." + CLASS_NAME_ALERT)[0];
}
return parent;
}; };
_proto._triggerCloseEvent = function _triggerCloseEvent(element) { _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
return EventHandler__default['default'].trigger(element, EVENT_CLOSE); var closeEvent = $__default['default'].Event(EVENT_CLOSE);
$__default['default'](element).trigger(closeEvent);
return closeEvent;
}; };
_proto._removeElement = function _removeElement(element) { _proto._removeElement = function _removeElement(element) {
var _this = this; var _this = this;
element.classList.remove(CLASSNAME_SHOW); $__default['default'](element).removeClass(CLASS_NAME_SHOW);
if (!element.classList.contains(CLASSNAME_FADE)) { if (!$__default['default'](element).hasClass(CLASS_NAME_FADE)) {
this._destroyElement(element); this._destroyElement(element);
return; return;
} }
var transitionDuration = getTransitionDurationFromElement(element); var transitionDuration = Util__default['default'].getTransitionDurationFromElement(element);
EventHandler__default['default'].one(element, TRANSITION_END, function () { $__default['default'](element).one(Util__default['default'].TRANSITION_END, function (event) {
return _this._destroyElement(element); return _this._destroyElement(element, event);
}); }).emulateTransitionEnd(transitionDuration);
emulateTransitionEnd(element, transitionDuration);
}; };
_proto._destroyElement = function _destroyElement(element) { _proto._destroyElement = function _destroyElement(element) {
if (element.parentNode) { $__default['default'](element).detach().trigger(EVENT_CLOSED).remove();
element.parentNode.removeChild(element);
}
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
} // Static } // Static
; ;
Alert.jQueryInterface = function jQueryInterface(config) { Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () { return this.each(function () {
var data = Data__default['default'].getData(this, DATA_KEY); var $element = $__default['default'](this);
var data = $element.data(DATA_KEY);
if (!data) { if (!data) {
data = new Alert(this); data = new Alert(this);
$element.data(DATA_KEY, data);
} }
if (config === 'close') { if (config === 'close') {
@ -249,7 +132,7 @@
}); });
}; };
Alert.handleDismiss = function handleDismiss(alertInstance) { Alert._handleDismiss = function _handleDismiss(alertInstance) {
return function (event) { return function (event) {
if (event) { if (event) {
event.preventDefault(); event.preventDefault();
@ -259,16 +142,15 @@
}; };
}; };
_createClass$1(Alert, null, [{ _createClass(Alert, null, [{
key: "DATA_KEY", key: "VERSION",
// Getters
get: function get() { get: function get() {
return DATA_KEY; return VERSION;
} }
}]); }]);
return Alert; return Alert;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -276,29 +158,20 @@
*/ */
EventHandler__default['default'].on(document, 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 * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Alert to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Alert._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Alert;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Alert.jQueryInterface; return Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert.jQueryInterface;
};
}
});
return Alert; return Alert;

File diff suppressed because one or more lines are too long

260
js/dist/button.js vendored
View file

@ -1,46 +1,17 @@
/*! /*!
* Bootstrap button.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap button.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) : typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.jQuery));
}(this, (function (Data, EventHandler) { 'use strict'; }(this, (function ($) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -51,105 +22,122 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'button'; var NAME = 'button';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.button'; var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var CLASS_NAME_ACTIVE = 'active'; var CLASS_NAME_ACTIVE = 'active';
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]'; var CLASS_NAME_BUTTON = 'btn';
var CLASS_NAME_FOCUS = 'focus';
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
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_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 (_BaseComponent) { var Button = /*#__PURE__*/function () {
_inheritsLoose(Button, _BaseComponent); function Button(element) {
this._element = element;
this.shouldAvoidTriggerChange = false;
} // Getters
function Button() {
return _BaseComponent.apply(this, arguments) || this;
}
var _proto = Button.prototype; var _proto = Button.prototype;
// Public // Public
_proto.toggle = function toggle() { _proto.toggle = function toggle() {
// Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method var triggerChangeEvent = true;
this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE)); var addAriaPressed = true;
var rootElement = $__default['default'](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
if (rootElement) {
var input = this._element.querySelector(SELECTOR_INPUT);
if (input) {
if (input.type === 'radio') {
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
triggerChangeEvent = false;
} else {
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
if (activeElement) {
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
}
}
}
if (triggerChangeEvent) {
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
if (input.type === 'checkbox' || input.type === 'radio') {
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
}
if (!this.shouldAvoidTriggerChange) {
$__default['default'](input).trigger('change');
}
}
input.focus();
addAriaPressed = false;
}
}
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
if (addAriaPressed) {
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
}
if (triggerChangeEvent) {
$__default['default'](this._element).toggleClass(CLASS_NAME_ACTIVE);
}
}
};
_proto.dispose = function dispose() {
$__default['default'].removeData(this._element, DATA_KEY);
this._element = null;
} // Static } // Static
; ;
Button.jQueryInterface = function jQueryInterface(config) { Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
return this.each(function () { return this.each(function () {
var data = Data__default['default'].getData(this, DATA_KEY); var $element = $__default['default'](this);
var data = $element.data(DATA_KEY);
if (!data) { if (!data) {
data = new Button(this); data = new Button(this);
$element.data(DATA_KEY, data);
} }
data.shouldAvoidTriggerChange = avoidTriggerChange;
if (config === 'toggle') { if (config === 'toggle') {
data[config](); data[config]();
} }
}); });
}; };
_createClass$1(Button, null, [{ _createClass(Button, null, [{
key: "DATA_KEY", key: "VERSION",
// Getters
get: function get() { get: function get() {
return DATA_KEY; return VERSION;
} }
}]); }]);
return Button; return Button;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -157,39 +145,75 @@
*/ */
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
event.preventDefault(); var button = event.target;
var button = event.target.closest(SELECTOR_DATA_TOGGLE); var initialButton = button;
var data = Data__default['default'].getData(button, DATA_KEY);
if (!data) { if (!$__default['default'](button).hasClass(CLASS_NAME_BUTTON)) {
data = new Button(button); button = $__default['default'](button).closest(SELECTOR_BUTTON)[0];
} }
data.toggle(); if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
event.preventDefault(); // work around Firefox bug #1540995
} else {
var inputBtn = button.querySelector(SELECTOR_INPUT);
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
event.preventDefault(); // work around Firefox bug #1540995
return;
}
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
Button._jQueryInterface.call($__default['default'](button), 'toggle', initialButton.tagName === 'INPUT');
}
}
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = $__default['default'](event.target).closest(SELECTOR_BUTTON)[0];
$__default['default'](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
});
$__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));
for (var i = 0, len = buttons.length; i < len; i++) {
var button = buttons[i];
var input = button.querySelector(SELECTOR_INPUT);
if (input.checked || input.hasAttribute('checked')) {
button.classList.add(CLASS_NAME_ACTIVE);
} else {
button.classList.remove(CLASS_NAME_ACTIVE);
}
} // find all button toggles
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
var _button = buttons[_i];
if (_button.getAttribute('aria-pressed') === 'true') {
_button.classList.add(CLASS_NAME_ACTIVE);
} else {
_button.classList.remove(CLASS_NAME_ACTIVE);
}
}
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Button to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Button._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Button;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Button.jQueryInterface; return Button._jQueryInterface;
$.fn[NAME].Constructor = Button; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Button.jQueryInterface;
};
}
});
return Button; return Button;

File diff suppressed because one or more lines are too long

577
js/dist/carousel.js vendored
View file

@ -1,153 +1,20 @@
/*! /*!
* Bootstrap carousel.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap carousel.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function ($, Util) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
/** function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelector = function getSelector(element) {
var selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
var getElementFromSelector = function getElementFromSelector(element) {
var selector = getSelector(element);
return selector ? document.querySelector(selector) : null;
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = Number.parseFloat(transitionDuration);
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
var elementStyle = getComputedStyle(element);
var parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -158,60 +25,16 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'carousel'; var NAME = 'carousel';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.carousel'; var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var ARROW_LEFT_KEY = 'ArrowLeft'; var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var ARROW_RIGHT_KEY = 'ArrowRight'; var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
var SWIPE_THRESHOLD = 40; var SWIPE_THRESHOLD = 40;
@ -251,8 +74,8 @@
var CLASS_NAME_CAROUSEL = 'carousel'; var CLASS_NAME_CAROUSEL = 'carousel';
var CLASS_NAME_ACTIVE = 'active'; var CLASS_NAME_ACTIVE = 'active';
var CLASS_NAME_SLIDE = 'slide'; var CLASS_NAME_SLIDE = 'slide';
var CLASS_NAME_END = 'carousel-item-end'; var CLASS_NAME_RIGHT = 'carousel-item-right';
var CLASS_NAME_START = 'carousel-item-start'; var CLASS_NAME_LEFT = 'carousel-item-left';
var CLASS_NAME_NEXT = 'carousel-item-next'; var CLASS_NAME_NEXT = 'carousel-item-next';
var CLASS_NAME_PREV = 'carousel-item-prev'; var CLASS_NAME_PREV = 'carousel-item-prev';
var CLASS_NAME_POINTER_EVENT = 'pointer-event'; var CLASS_NAME_POINTER_EVENT = 'pointer-event';
@ -262,8 +85,8 @@
var SELECTOR_ITEM_IMG = '.carousel-item img'; var SELECTOR_ITEM_IMG = '.carousel-item img';
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
var SELECTOR_INDICATORS = '.carousel-indicators'; var SELECTOR_INDICATORS = '.carousel-indicators';
var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
var PointerType = { var PointerType = {
TOUCH: 'touch', TOUCH: 'touch',
PEN: 'pen' PEN: 'pen'
@ -274,29 +97,23 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Carousel = /*#__PURE__*/function (_BaseComponent) { var Carousel = /*#__PURE__*/function () {
_inheritsLoose(Carousel, _BaseComponent);
function Carousel(element, config) { function Carousel(element, config) {
var _this; this._items = null;
this._interval = null;
this._activeElement = null;
this._isPaused = false;
this._isSliding = false;
this.touchTimeout = null;
this.touchStartX = 0;
this.touchDeltaX = 0;
this._config = this._getConfig(config);
this._element = element;
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
_this = _BaseComponent.call(this, element) || this; this._addEventListeners();
_this._items = null;
_this._interval = null;
_this._activeElement = null;
_this._isPaused = false;
_this._isSliding = false;
_this.touchTimeout = null;
_this.touchStartX = 0;
_this.touchDeltaX = 0;
_this._config = _this._getConfig(config);
_this._indicatorsElement = SelectorEngine__default['default'].findOne(SELECTOR_INDICATORS, _this._element);
_this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
_this._pointerEvent = Boolean(window.PointerEvent);
_this._addEventListeners();
return _this;
} // Getters } // Getters
@ -310,9 +127,10 @@
}; };
_proto.nextWhenVisible = function nextWhenVisible() { _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 // or the carousel or its parent isn't visible
if (!document.hidden && isVisible(this._element)) {
if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
this.next(); this.next();
} }
}; };
@ -328,8 +146,8 @@
this._isPaused = true; this._isPaused = true;
} }
if (SelectorEngine__default['default'].findOne(SELECTOR_NEXT_PREV, this._element)) { if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
triggerTransitionEnd(this._element); Util__default['default'].triggerTransitionEnd(this._element);
this.cycle(true); this.cycle(true);
} }
@ -347,17 +165,15 @@
this._interval = null; this._interval = null;
} }
if (this._config && this._config.interval && !this._isPaused) { if (this._config.interval && !this._isPaused) {
this._updateInterval();
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
} }
}; };
_proto.to = function to(index) { _proto.to = function to(index) {
var _this2 = this; var _this = this;
this._activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element); this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
var activeIndex = this._getItemIndex(this._activeElement); var activeIndex = this._getItemIndex(this._activeElement);
@ -366,8 +182,8 @@
} }
if (this._isSliding) { if (this._isSliding) {
EventHandler__default['default'].one(this._element, EVENT_SLID, function () { $__default['default'](this._element).one(EVENT_SLID, function () {
return _this2.to(index); return _this.to(index);
}); });
return; return;
} }
@ -384,11 +200,11 @@
}; };
_proto.dispose = function dispose() { _proto.dispose = function dispose() {
_BaseComponent.prototype.dispose.call(this); $__default['default'](this._element).off(EVENT_KEY);
$__default['default'].removeData(this._element, DATA_KEY);
EventHandler__default['default'].off(this._element, EVENT_KEY);
this._items = null; this._items = null;
this._config = null; this._config = null;
this._element = null;
this._interval = null; this._interval = null;
this._isPaused = null; this._isPaused = null;
this._isSliding = null; this._isSliding = null;
@ -399,7 +215,7 @@
_proto._getConfig = function _getConfig(config) { _proto._getConfig = function _getConfig(config) {
config = _extends({}, Default, config); config = _extends({}, Default, config);
typeCheckConfig(NAME, config, DefaultType); Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
return config; return config;
}; };
@ -424,56 +240,59 @@
}; };
_proto._addEventListeners = function _addEventListeners() { _proto._addEventListeners = function _addEventListeners() {
var _this3 = this; var _this2 = this;
if (this._config.keyboard) { if (this._config.keyboard) {
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN, function (event) { $__default['default'](this._element).on(EVENT_KEYDOWN, function (event) {
return _this3._keydown(event); return _this2._keydown(event);
}); });
} }
if (this._config.pause === 'hover') { if (this._config.pause === 'hover') {
EventHandler__default['default'].on(this._element, EVENT_MOUSEENTER, function (event) { $__default['default'](this._element).on(EVENT_MOUSEENTER, function (event) {
return _this3.pause(event); return _this2.pause(event);
}); }).on(EVENT_MOUSELEAVE, function (event) {
EventHandler__default['default'].on(this._element, EVENT_MOUSELEAVE, function (event) { return _this2.cycle(event);
return _this3.cycle(event);
}); });
} }
if (this._config.touch && this._touchSupported) { if (this._config.touch) {
this._addTouchEventListeners(); this._addTouchEventListeners();
} }
}; };
_proto._addTouchEventListeners = function _addTouchEventListeners() { _proto._addTouchEventListeners = function _addTouchEventListeners() {
var _this4 = this; var _this3 = this;
if (!this._touchSupported) {
return;
}
var start = function start(event) { var start = function start(event) {
if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this4.touchStartX = event.clientX; _this3.touchStartX = event.originalEvent.clientX;
} else if (!_this4._pointerEvent) { } else if (!_this3._pointerEvent) {
_this4.touchStartX = event.touches[0].clientX; _this3.touchStartX = event.originalEvent.touches[0].clientX;
} }
}; };
var move = function move(event) { var move = function move(event) {
// ensure swiping with one touch and not pinching // ensure swiping with one touch and not pinching
if (event.touches && event.touches.length > 1) { if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
_this4.touchDeltaX = 0; _this3.touchDeltaX = 0;
} else { } else {
_this4.touchDeltaX = event.touches[0].clientX - _this4.touchStartX; _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
} }
}; };
var end = function end(event) { var end = function end(event) {
if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) { if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this4.touchDeltaX = event.clientX - _this4.touchStartX; _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
} }
_this4._handleSwipe(); _this3._handleSwipe();
if (_this4._config.pause === 'hover') { if (_this3._config.pause === 'hover') {
// If it's a touch-enabled device, mouseenter/leave are fired as // If it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel // part of the mouse compatibility events on first tap - the carousel
// would stop cycling until user tapped out of it; // would stop cycling until user tapped out of it;
@ -481,41 +300,39 @@
// (as if it's the second time we tap on it, mouseenter compat event // (as if it's the second time we tap on it, mouseenter compat event
// is NOT fired) and after a timeout (to allow for mouse compatibility // is NOT fired) and after a timeout (to allow for mouse compatibility
// events to fire) we explicitly restart cycling // events to fire) we explicitly restart cycling
_this4.pause(); _this3.pause();
if (_this4.touchTimeout) { if (_this3.touchTimeout) {
clearTimeout(_this4.touchTimeout); clearTimeout(_this3.touchTimeout);
} }
_this4.touchTimeout = setTimeout(function (event) { _this3.touchTimeout = setTimeout(function (event) {
return _this4.cycle(event); return _this3.cycle(event);
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval); }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
} }
}; };
SelectorEngine__default['default'].find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) { $__default['default'](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
EventHandler__default['default'].on(itemImg, EVENT_DRAG_START, function (e) { return e.preventDefault();
return e.preventDefault();
});
}); });
if (this._pointerEvent) { if (this._pointerEvent) {
EventHandler__default['default'].on(this._element, EVENT_POINTERDOWN, function (event) { $__default['default'](this._element).on(EVENT_POINTERDOWN, function (event) {
return start(event); return start(event);
}); });
EventHandler__default['default'].on(this._element, EVENT_POINTERUP, function (event) { $__default['default'](this._element).on(EVENT_POINTERUP, function (event) {
return end(event); return end(event);
}); });
this._element.classList.add(CLASS_NAME_POINTER_EVENT); this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else { } else {
EventHandler__default['default'].on(this._element, EVENT_TOUCHSTART, function (event) { $__default['default'](this._element).on(EVENT_TOUCHSTART, function (event) {
return start(event); return start(event);
}); });
EventHandler__default['default'].on(this._element, EVENT_TOUCHMOVE, function (event) { $__default['default'](this._element).on(EVENT_TOUCHMOVE, function (event) {
return move(event); return move(event);
}); });
EventHandler__default['default'].on(this._element, EVENT_TOUCHEND, function (event) { $__default['default'](this._element).on(EVENT_TOUCHEND, function (event) {
return end(event); return end(event);
}); });
} }
@ -526,13 +343,13 @@
return; return;
} }
switch (event.key) { switch (event.which) {
case ARROW_LEFT_KEY: case ARROW_LEFT_KEYCODE:
event.preventDefault(); event.preventDefault();
this.prev(); this.prev();
break; break;
case ARROW_RIGHT_KEY: case ARROW_RIGHT_KEYCODE:
event.preventDefault(); event.preventDefault();
this.next(); this.next();
break; break;
@ -540,7 +357,7 @@
}; };
_proto._getItemIndex = function _getItemIndex(element) { _proto._getItemIndex = function _getItemIndex(element) {
this._items = element && element.parentNode ? SelectorEngine__default['default'].find(SELECTOR_ITEM, element.parentNode) : []; this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
return this._items.indexOf(element); return this._items.indexOf(element);
}; };
@ -565,53 +382,35 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget); var targetIndex = this._getItemIndex(relatedTarget);
var fromIndex = this._getItemIndex(SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element)); var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
return EventHandler__default['default'].trigger(this._element, EVENT_SLIDE, { var slideEvent = $__default['default'].Event(EVENT_SLIDE, {
relatedTarget: relatedTarget, relatedTarget: relatedTarget,
direction: eventDirectionName, direction: eventDirectionName,
from: fromIndex, from: fromIndex,
to: targetIndex to: targetIndex
}); });
$__default['default'](this._element).trigger(slideEvent);
return slideEvent;
}; };
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) { if (this._indicatorsElement) {
var indicators = SelectorEngine__default['default'].find(SELECTOR_ACTIVE, this._indicatorsElement); var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
$__default['default'](indicators).removeClass(CLASS_NAME_ACTIVE);
for (var i = 0; i < indicators.length; i++) {
indicators[i].classList.remove(CLASS_NAME_ACTIVE);
}
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) { if (nextIndicator) {
nextIndicator.classList.add(CLASS_NAME_ACTIVE); $__default['default'](nextIndicator).addClass(CLASS_NAME_ACTIVE);
} }
} }
}; };
_proto._updateInterval = function _updateInterval() {
var element = this._activeElement || SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
if (!element) {
return;
}
var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
if (elementInterval) {
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
this._config.interval = elementInterval;
} else {
this._config.interval = this._config.defaultInterval || this._config.interval;
}
};
_proto._slide = function _slide(direction, element) { _proto._slide = function _slide(direction, element) {
var _this5 = this; var _this4 = this;
var activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element); var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
var activeElementIndex = this._getItemIndex(activeElement); var activeElementIndex = this._getItemIndex(activeElement);
@ -625,23 +424,23 @@
var eventDirectionName; var eventDirectionName;
if (direction === DIRECTION_NEXT) { if (direction === DIRECTION_NEXT) {
directionalClassName = CLASS_NAME_START; directionalClassName = CLASS_NAME_LEFT;
orderClassName = CLASS_NAME_NEXT; orderClassName = CLASS_NAME_NEXT;
eventDirectionName = DIRECTION_LEFT; eventDirectionName = DIRECTION_LEFT;
} else { } else {
directionalClassName = CLASS_NAME_END; directionalClassName = CLASS_NAME_RIGHT;
orderClassName = CLASS_NAME_PREV; orderClassName = CLASS_NAME_PREV;
eventDirectionName = DIRECTION_RIGHT; eventDirectionName = DIRECTION_RIGHT;
} }
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) { if (nextElement && $__default['default'](nextElement).hasClass(CLASS_NAME_ACTIVE)) {
this._isSliding = false; this._isSliding = false;
return; return;
} }
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
if (slideEvent.defaultPrevented) { if (slideEvent.isDefaultPrevented()) {
return; return;
} }
@ -658,39 +457,41 @@
this._setActiveIndicatorElement(nextElement); this._setActiveIndicatorElement(nextElement);
this._activeElement = nextElement; var slidEvent = $__default['default'].Event(EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
if (this._element.classList.contains(CLASS_NAME_SLIDE)) { if ($__default['default'](this._element).hasClass(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName); $__default['default'](nextElement).addClass(orderClassName);
reflow(nextElement); Util__default['default'].reflow(nextElement);
activeElement.classList.add(directionalClassName); $__default['default'](activeElement).addClass(directionalClassName);
nextElement.classList.add(directionalClassName); $__default['default'](nextElement).addClass(directionalClassName);
var transitionDuration = getTransitionDurationFromElement(activeElement); var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
EventHandler__default['default'].one(activeElement, TRANSITION_END, function () {
nextElement.classList.remove(directionalClassName, orderClassName); if (nextElementInterval) {
nextElement.classList.add(CLASS_NAME_ACTIVE); this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName); this._config.interval = nextElementInterval;
_this5._isSliding = false; } else {
this._config.interval = this._config.defaultInterval || this._config.interval;
}
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 () { setTimeout(function () {
EventHandler__default['default'].trigger(_this5._element, EVENT_SLID, { return $__default['default'](_this4._element).trigger(slidEvent);
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0); }, 0);
}); }).emulateTransitionEnd(transitionDuration);
emulateTransitionEnd(activeElement, transitionDuration);
} else { } else {
activeElement.classList.remove(CLASS_NAME_ACTIVE); $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
nextElement.classList.add(CLASS_NAME_ACTIVE); $__default['default'](nextElement).addClass(CLASS_NAME_ACTIVE);
this._isSliding = false; this._isSliding = false;
EventHandler__default['default'].trigger(this._element, EVENT_SLID, { $__default['default'](this._element).trigger(slidEvent);
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
} }
if (isCycling) { if (isCycling) {
@ -699,79 +500,82 @@
} // Static } // Static
; ;
Carousel.carouselInterface = function carouselInterface(element, config) { Carousel._jQueryInterface = function _jQueryInterface(config) {
var data = Data__default['default'].getData(element, DATA_KEY); return this.each(function () {
var data = $__default['default'](this).data(DATA_KEY);
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(element)); var _config = _extends({}, Default, $__default['default'](this).data());
if (typeof config === 'object') { if (typeof config === 'object') {
_config = _extends({}, _config, config); _config = _extends({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(element, _config);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new TypeError("No method named \"" + action + "\"");
} }
data[action](); var action = typeof config === 'string' ? config : _config.slide;
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
};
Carousel.jQueryInterface = function jQueryInterface(config) { if (!data) {
return this.each(function () { data = new Carousel(this, _config);
Carousel.carouselInterface(this, config); $__default['default'](this).data(DATA_KEY, data);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new TypeError("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
}); });
}; };
Carousel.dataApiClickHandler = function dataApiClickHandler(event) { Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
var target = getElementFromSelector(this); var selector = Util__default['default'].getSelectorFromElement(this);
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) { if (!selector) {
return; return;
} }
var config = _extends({}, Manipulator__default['default'].getDataAttributes(target), Manipulator__default['default'].getDataAttributes(this)); var target = $__default['default'](selector)[0];
var slideIndex = this.getAttribute('data-bs-slide-to'); if (!target || !$__default['default'](target).hasClass(CLASS_NAME_CAROUSEL)) {
return;
}
var config = _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
var slideIndex = this.getAttribute('data-slide-to');
if (slideIndex) { if (slideIndex) {
config.interval = false; config.interval = false;
} }
Carousel.carouselInterface(target, config); Carousel._jQueryInterface.call($__default['default'](target), config);
if (slideIndex) { if (slideIndex) {
Data__default['default'].getData(target, DATA_KEY).to(slideIndex); $__default['default'](target).data(DATA_KEY).to(slideIndex);
} }
event.preventDefault(); event.preventDefault();
}; };
_createClass$1(Carousel, null, [{ _createClass(Carousel, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}, {
key: "Default", key: "Default",
get: function get() { get: function get() {
return Default; return Default;
} }
}, {
key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}]); }]);
return Carousel; return Carousel;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -779,36 +583,29 @@
*/ */
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler); $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, function () { $__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
var carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE); var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) { for (var i = 0, len = carousels.length; i < len; i++) {
Carousel.carouselInterface(carousels[i], Data__default['default'].getData(carousels[i], DATA_KEY)); var $carousel = $__default['default'](carousels[i]);
Carousel._jQueryInterface.call($carousel, $carousel.data());
} }
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Carousel to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Carousel._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Carousel;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Carousel.jQueryInterface; return Carousel._jQueryInterface;
$.fn[NAME].Constructor = Carousel; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Carousel.jQueryInterface;
};
}
});
return Carousel; return Carousel;

File diff suppressed because one or more lines are too long

505
js/dist/collapse.js vendored
View file

@ -1,149 +1,20 @@
/*! /*!
* Bootstrap collapse.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap collapse.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.jQuery, global.Util));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function ($, Util) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
/** function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelector = function getSelector(element) {
var selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = getSelector(element);
if (selector) {
return document.querySelector(selector) ? selector : null;
}
return null;
};
var getElementFromSelector = function getElementFromSelector(element) {
var selector = getSelector(element);
return selector ? document.querySelector(selector) : null;
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = Number.parseFloat(transitionDuration);
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -154,58 +25,12 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'collapse'; var NAME = 'collapse';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.collapse'; var DATA_KEY = 'bs.collapse';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var Default = { var Default = {
toggle: true, toggle: true,
parent: '' parent: ''
@ -223,53 +48,47 @@
var CLASS_NAME_COLLAPSE = 'collapse'; var CLASS_NAME_COLLAPSE = 'collapse';
var CLASS_NAME_COLLAPSING = 'collapsing'; var CLASS_NAME_COLLAPSING = 'collapsing';
var CLASS_NAME_COLLAPSED = 'collapsed'; var CLASS_NAME_COLLAPSED = 'collapsed';
var WIDTH = 'width'; var DIMENSION_WIDTH = 'width';
var HEIGHT = 'height'; var DIMENSION_HEIGHT = 'height';
var SELECTOR_ACTIVES = '.show, .collapsing'; var SELECTOR_ACTIVES = '.show, .collapsing';
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Collapse = /*#__PURE__*/function (_BaseComponent) { var Collapse = /*#__PURE__*/function () {
_inheritsLoose(Collapse, _BaseComponent);
function Collapse(element, config) { function Collapse(element, config) {
var _this; this._isTransitioning = false;
this._element = element;
_this = _BaseComponent.call(this, element) || this; this._config = this._getConfig(config);
_this._isTransitioning = false; this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
_this._config = _this._getConfig(config); var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
_this._triggerArray = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-bs-target=\"#" + element.id + "\"]"));
var toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
for (var i = 0, len = toggleList.length; i < len; i++) { for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i]; var elem = toggleList[i];
var selector = getSelectorFromElement(elem); var selector = Util__default['default'].getSelectorFromElement(elem);
var filterElement = SelectorEngine__default['default'].find(selector).filter(function (foundElem) { var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
return foundElem === element; return foundElem === element;
}); });
if (selector !== null && filterElement.length) { if (selector !== null && filterElement.length > 0) {
_this._selector = selector; this._selector = selector;
_this._triggerArray.push(elem); this._triggerArray.push(elem);
} }
} }
_this._parent = _this._config.parent ? _this._getParent() : null; this._parent = this._config.parent ? this._getParent() : null;
if (!_this._config.parent) { if (!this._config.parent) {
_this._addAriaAndCollapsedClass(_this._element, _this._triggerArray); this._addAriaAndCollapsedClass(this._element, this._triggerArray);
} }
if (_this._config.toggle) { if (this._config.toggle) {
_this.toggle(); this.toggle();
} }
return _this;
} // Getters } // Getters
@ -277,7 +96,7 @@
// Public // Public
_proto.toggle = function toggle() { _proto.toggle = function toggle() {
if (this._element.classList.contains(CLASS_NAME_SHOW)) { if ($__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@ -285,9 +104,9 @@
}; };
_proto.show = function show() { _proto.show = function show() {
var _this2 = this; var _this = this;
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) { if (this._isTransitioning || $__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
return; return;
} }
@ -295,9 +114,9 @@
var activesData; var activesData;
if (this._parent) { if (this._parent) {
actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(function (elem) { actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
if (typeof _this2._config.parent === 'string') { if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-bs-parent') === _this2._config.parent; return elem.getAttribute('data-parent') === _this._config.parent;
} }
return elem.classList.contains(CLASS_NAME_COLLAPSE); return elem.classList.contains(CLASS_NAME_COLLAPSE);
@ -308,106 +127,88 @@
} }
} }
var container = SelectorEngine__default['default'].findOne(this._selector);
if (actives) { if (actives) {
var tempActiveData = actives.find(function (elem) { activesData = $__default['default'](actives).not(this._selector).data(DATA_KEY);
return container !== elem;
});
activesData = tempActiveData ? Data__default['default'].getData(tempActiveData, DATA_KEY) : null;
if (activesData && activesData._isTransitioning) { if (activesData && activesData._isTransitioning) {
return; return;
} }
} }
var startEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW); var startEvent = $__default['default'].Event(EVENT_SHOW);
$__default['default'](this._element).trigger(startEvent);
if (startEvent.defaultPrevented) { if (startEvent.isDefaultPrevented()) {
return; return;
} }
if (actives) { if (actives) {
actives.forEach(function (elemActive) { Collapse._jQueryInterface.call($__default['default'](actives).not(this._selector), 'hide');
if (container !== elemActive) {
Collapse.collapseInterface(elemActive, 'hide');
}
if (!activesData) { if (!activesData) {
Data__default['default'].setData(elemActive, DATA_KEY, null); $__default['default'](actives).data(DATA_KEY, null);
} }
});
} }
var dimension = this._getDimension(); var dimension = this._getDimension();
this._element.classList.remove(CLASS_NAME_COLLAPSE); $__default['default'](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
if (this._triggerArray.length) { if (this._triggerArray.length) {
this._triggerArray.forEach(function (element) { $__default['default'](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
} }
this.setTransitioning(true); this.setTransitioning(true);
var complete = function complete() { var complete = function complete() {
_this2._element.classList.remove(CLASS_NAME_COLLAPSING); $__default['default'](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
_this._element.style[dimension] = '';
_this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); _this.setTransitioning(false);
_this2._element.style[dimension] = ''; $__default['default'](_this._element).trigger(EVENT_SHOWN);
_this2.setTransitioning(false);
EventHandler__default['default'].trigger(_this2._element, EVENT_SHOWN);
}; };
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension; var scrollSize = "scroll" + capitalizedDimension;
var transitionDuration = getTransitionDurationFromElement(this._element); var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, TRANSITION_END, complete); $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px"; this._element.style[dimension] = this._element[scrollSize] + "px";
}; };
_proto.hide = function hide() { _proto.hide = function hide() {
var _this3 = this; var _this2 = this;
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) { if (this._isTransitioning || !$__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
return; return;
} }
var startEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE); var startEvent = $__default['default'].Event(EVENT_HIDE);
$__default['default'](this._element).trigger(startEvent);
if (startEvent.defaultPrevented) { if (startEvent.isDefaultPrevented()) {
return; return;
} }
var dimension = this._getDimension(); var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
reflow(this._element); Util__default['default'].reflow(this._element);
$__default['default'](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
var triggerArrayLength = this._triggerArray.length; var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) { if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) { for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i]; var trigger = this._triggerArray[i];
var elem = getElementFromSelector(trigger); var selector = Util__default['default'].getSelectorFromElement(trigger);
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) { if (selector !== null) {
trigger.classList.add(CLASS_NAME_COLLAPSED); var $elem = $__default['default']([].slice.call(document.querySelectorAll(selector)));
trigger.setAttribute('aria-expanded', false);
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
$__default['default'](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
}
} }
} }
} }
@ -415,19 +216,14 @@
this.setTransitioning(true); this.setTransitioning(true);
var complete = function complete() { var complete = function complete() {
_this3.setTransitioning(false); _this2.setTransitioning(false);
_this3._element.classList.remove(CLASS_NAME_COLLAPSING); $__default['default'](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
_this3._element.classList.add(CLASS_NAME_COLLAPSE);
EventHandler__default['default'].trigger(_this3._element, EVENT_HIDDEN);
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
var transitionDuration = getTransitionDurationFromElement(this._element); var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, TRANSITION_END, complete); $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
emulateTransitionEnd(this._element, transitionDuration);
}; };
_proto.setTransitioning = function setTransitioning(isTransitioning) { _proto.setTransitioning = function setTransitioning(isTransitioning) {
@ -435,10 +231,10 @@
}; };
_proto.dispose = function dispose() { _proto.dispose = function dispose() {
_BaseComponent.prototype.dispose.call(this); $__default['default'].removeData(this._element, DATA_KEY);
this._config = null; this._config = null;
this._parent = null; this._parent = null;
this._element = null;
this._triggerArray = null; this._triggerArray = null;
this._isTransitioning = null; this._isTransitioning = null;
} // Private } // Private
@ -448,97 +244,92 @@
config = _extends({}, Default, config); config = _extends({}, Default, config);
config.toggle = Boolean(config.toggle); // Coerce string values config.toggle = Boolean(config.toggle); // Coerce string values
typeCheckConfig(NAME, config, DefaultType); Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
return config; return config;
}; };
_proto._getDimension = function _getDimension() { _proto._getDimension = function _getDimension() {
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT; var hasWidth = $__default['default'](this._element).hasClass(DIMENSION_WIDTH);
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
}; };
_proto._getParent = function _getParent() { _proto._getParent = function _getParent() {
var _this4 = this; var _this3 = this;
var parent = this._config.parent; var parent;
if (isElement(parent)) { if (Util__default['default'].isElement(this._config.parent)) {
// it's a jQuery object parent = this._config.parent; // It's a jQuery object
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
parent = parent[0]; if (typeof this._config.parent.jquery !== 'undefined') {
parent = this._config.parent[0];
} }
} else { } else {
parent = SelectorEngine__default['default'].findOne(parent); parent = document.querySelector(this._config.parent);
} }
var selector = SELECTOR_DATA_TOGGLE + "[data-bs-parent=\"" + parent + "\"]"; var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
SelectorEngine__default['default'].find(selector, parent).forEach(function (element) { var children = [].slice.call(parent.querySelectorAll(selector));
var selected = getElementFromSelector(element); $__default['default'](children).each(function (i, element) {
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
_this4._addAriaAndCollapsedClass(selected, [element]);
}); });
return parent; return parent;
}; };
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (!element || !triggerArray.length) { var isOpen = $__default['default'](element).hasClass(CLASS_NAME_SHOW);
return;
if (triggerArray.length) {
$__default['default'](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
} }
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
triggerArray.forEach(function (elem) {
if (isOpen) {
elem.classList.remove(CLASS_NAME_COLLAPSED);
} else {
elem.classList.add(CLASS_NAME_COLLAPSED);
}
elem.setAttribute('aria-expanded', isOpen);
});
} // Static } // Static
; ;
Collapse.collapseInterface = function collapseInterface(element, config) { Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var data = Data__default['default'].getData(element, DATA_KEY); var selector = Util__default['default'].getSelectorFromElement(element);
return selector ? document.querySelector(selector) : null;
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(element), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
}; };
Collapse.jQueryInterface = function jQueryInterface(config) { Collapse._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () { return this.each(function () {
Collapse.collapseInterface(this, config); var $element = $__default['default'](this);
var data = $element.data(DATA_KEY);
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;
}
if (!data) {
data = new Collapse(this, _config);
$element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
}); });
}; };
_createClass$1(Collapse, null, [{ _createClass(Collapse, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}, {
key: "Default", key: "Default",
get: function get() { get: function get() {
return Default; return Default;
} }
}, {
key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}]); }]);
return Collapse; return Collapse;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -546,56 +337,36 @@
*/ */
EventHandler__default['default'].on(document, 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 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.target.tagName === 'A') { if (event.currentTarget.tagName === 'A') {
event.preventDefault(); event.preventDefault();
} }
var triggerData = Manipulator__default['default'].getDataAttributes(this); var $trigger = $__default['default'](this);
var selector = getSelectorFromElement(this); var selector = Util__default['default'].getSelectorFromElement(this);
var selectorElements = SelectorEngine__default['default'].find(selector); var selectors = [].slice.call(document.querySelectorAll(selector));
selectorElements.forEach(function (element) { $__default['default'](selectors).each(function () {
var data = Data__default['default'].getData(element, DATA_KEY); var $target = $__default['default'](this);
var config; var data = $target.data(DATA_KEY);
var config = data ? 'toggle' : $trigger.data();
if (data) { Collapse._jQueryInterface.call($target, config);
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse.collapseInterface(element, config);
}); });
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Collapse to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Collapse._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Collapse;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Collapse.jQueryInterface; return Collapse._jQueryInterface;
$.fn[NAME].Constructor = Collapse; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Collapse.jQueryInterface;
};
}
});
return Collapse; return Collapse;

File diff suppressed because one or more lines are too long

82
js/dist/dom/data.js vendored
View file

@ -1,82 +0,0 @@
/*!
* Bootstrap data.js v5.0.0-beta1 (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/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var mapData = function () {
var storeData = {};
var id = 1;
return {
set: function set(element, key, data) {
if (typeof element.bsKey === 'undefined') {
element.bsKey = {
key: key,
id: id
};
id++;
}
storeData[element.bsKey.id] = data;
},
get: function get(element, key) {
if (!element || typeof element.bsKey === 'undefined') {
return null;
}
var keyProperties = element.bsKey;
if (keyProperties.key === key) {
return storeData[keyProperties.id];
}
return null;
},
delete: function _delete(element, key) {
if (typeof element.bsKey === 'undefined') {
return;
}
var keyProperties = element.bsKey;
if (keyProperties.key === key) {
delete storeData[keyProperties.id];
delete element.bsKey;
}
}
};
}();
var Data = {
setData: function setData(instance, key, data) {
mapData.set(instance, key, data);
},
getData: function getData(instance, key) {
return mapData.get(instance, key);
},
removeData: function removeData(instance, key) {
mapData.delete(instance, key);
}
};
return Data;
})));
//# sourceMappingURL=data.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.bsKey === 'undefined') {\n element.bsKey = {\n key,\n id\n }\n id++\n }\n\n storeData[element.bsKey.id] = data\n },\n get(element, key) {\n if (!element || typeof element.bsKey === 'undefined') {\n return null\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n\n return null\n },\n delete(element, key) {\n if (typeof element.bsKey === 'undefined') {\n return\n }\n\n const keyProperties = element.bsKey\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.bsKey\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","bsKey","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,OAAO,GAAI,YAAM;EACrB,MAAMC,SAAS,GAAG,EAAlB;EACA,MAAIC,EAAE,GAAG,CAAT;EACA,SAAO;EACLC,IAAAA,GADK,eACDC,OADC,EACQC,GADR,EACaC,IADb,EACmB;EACtB,UAAI,OAAOF,OAAO,CAACG,KAAf,KAAyB,WAA7B,EAA0C;EACxCH,QAAAA,OAAO,CAACG,KAAR,GAAgB;EACdF,UAAAA,GAAG,EAAHA,GADc;EAEdH,UAAAA,EAAE,EAAFA;EAFc,SAAhB;EAIAA,QAAAA,EAAE;EACH;;EAEDD,MAAAA,SAAS,CAACG,OAAO,CAACG,KAAR,CAAcL,EAAf,CAAT,GAA8BI,IAA9B;EACD,KAXI;EAYLE,IAAAA,GAZK,eAYDJ,OAZC,EAYQC,GAZR,EAYa;EAChB,UAAI,CAACD,OAAD,IAAY,OAAOA,OAAO,CAACG,KAAf,KAAyB,WAAzC,EAAsD;EACpD,eAAO,IAAP;EACD;;EAED,UAAME,aAAa,GAAGL,OAAO,CAACG,KAA9B;;EACA,UAAIE,aAAa,CAACJ,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACQ,aAAa,CAACP,EAAf,CAAhB;EACD;;EAED,aAAO,IAAP;EACD,KAvBI;EAwBLQ,IAAAA,MAxBK,mBAwBEN,OAxBF,EAwBWC,GAxBX,EAwBgB;EACnB,UAAI,OAAOD,OAAO,CAACG,KAAf,KAAyB,WAA7B,EAA0C;EACxC;EACD;;EAED,UAAME,aAAa,GAAGL,OAAO,CAACG,KAA9B;;EACA,UAAIE,aAAa,CAACJ,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACQ,aAAa,CAACP,EAAf,CAAhB;EACA,eAAOE,OAAO,CAACG,KAAf;EACD;EACF;EAlCI,GAAP;EAoCD,CAvCe,EAAhB;;MAyCMI,IAAI,GAAG;EACXC,EAAAA,OADW,mBACHC,QADG,EACOR,GADP,EACYC,IADZ,EACkB;EAC3BN,IAAAA,OAAO,CAACG,GAAR,CAAYU,QAAZ,EAAsBR,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXQ,EAAAA,OAJW,mBAIHD,QAJG,EAIOR,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACQ,GAAR,CAAYK,QAAZ,EAAsBR,GAAtB,CAAP;EACD,GANU;EAOXU,EAAAA,UAPW,sBAOAF,QAPA,EAOUR,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACU,MAAR,CAAeG,QAAf,EAAyBR,GAAzB;EACD;EATU;;;;;;;;"}

View file

@ -1,310 +0,0 @@
/*!
* Bootstrap event-handler.js v5.0.0-beta1 (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/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var isRTL = document.documentElement.dir === 'rtl';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
var stripNameRegex = /\..*/;
var stripUidRegex = /::\d+$/;
var eventRegistry = {}; // Events storage
var uidEvent = 1;
var customEvents = {
mouseenter: 'mouseover',
mouseleave: 'mouseout'
};
var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
/**
* ------------------------------------------------------------------------
* Private methods
* ------------------------------------------------------------------------
*/
function getUidEvent(element, uid) {
return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
}
function getEvent(element) {
var uid = getUidEvent(element);
element.uidEvent = uid;
eventRegistry[uid] = eventRegistry[uid] || {};
return eventRegistry[uid];
}
function bootstrapHandler(element, fn) {
return function handler(event) {
event.delegateTarget = element;
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(element, [event]);
};
}
function bootstrapDelegationHandler(element, selector, fn) {
return function handler(event) {
var domElements = element.querySelectorAll(selector);
for (var target = event.target; target && target !== this; target = target.parentNode) {
for (var i = domElements.length; i--;) {
if (domElements[i] === target) {
event.delegateTarget = target;
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(target, [event]);
}
}
} // To please ESLint
return null;
};
}
function findHandler(events, handler, delegationSelector) {
if (delegationSelector === void 0) {
delegationSelector = null;
}
var uidEventList = Object.keys(events);
for (var i = 0, len = uidEventList.length; i < len; i++) {
var event = events[uidEventList[i]];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
return event;
}
}
return null;
}
function normalizeParams(originalTypeEvent, handler, delegationFn) {
var delegation = typeof handler === 'string';
var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
var custom = customEvents[typeEvent];
if (custom) {
typeEvent = custom;
}
var isNative = nativeEvents.has(typeEvent);
if (!isNative) {
typeEvent = originalTypeEvent;
}
return [delegation, originalHandler, typeEvent];
}
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
if (!handler) {
handler = delegationFn;
delegationFn = null;
}
var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams[0],
originalHandler = _normalizeParams[1],
typeEvent = _normalizeParams[2];
var events = getEvent(element);
var handlers = events[typeEvent] || (events[typeEvent] = {});
var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
if (previousFn) {
previousFn.oneOff = previousFn.oneOff && oneOff;
return;
}
var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
fn.delegationSelector = delegation ? handler : null;
fn.originalHandler = originalHandler;
fn.oneOff = oneOff;
fn.uidEvent = uid;
handlers[uid] = fn;
element.addEventListener(typeEvent, fn, delegation);
}
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
var fn = findHandler(events[typeEvent], handler, delegationSelector);
if (!fn) {
return;
}
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent];
}
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (handlerKey) {
if (handlerKey.includes(namespace)) {
var event = storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
}
var EventHandler = {
on: function on(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, false);
},
one: function one(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, true);
},
off: function off(element, originalTypeEvent, handler, delegationFn) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams2[0],
originalHandler = _normalizeParams2[1],
typeEvent = _normalizeParams2[2];
var inNamespace = typeEvent !== originalTypeEvent;
var events = getEvent(element);
var isNamespace = originalTypeEvent.startsWith('.');
if (typeof originalHandler !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY.
if (!events || !events[typeEvent]) {
return;
}
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
return;
}
if (isNamespace) {
Object.keys(events).forEach(function (elementEvent) {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
});
}
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
var handlerKey = keyHandlers.replace(stripUidRegex, '');
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
var event = storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
},
trigger: function trigger(element, event, args) {
if (typeof event !== 'string' || !element) {
return null;
}
var $ = getjQuery();
var typeEvent = event.replace(stripNameRegex, '');
var inNamespace = event !== typeEvent;
var isNative = nativeEvents.has(typeEvent);
var jQueryEvent;
var bubbles = true;
var nativeDispatch = true;
var defaultPrevented = false;
var evt = null;
if (inNamespace && $) {
jQueryEvent = $.Event(event, args);
$(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();
}
if (isNative) {
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
} // merge custom information in our event
if (typeof args !== 'undefined') {
Object.keys(args).forEach(function (key) {
Object.defineProperty(evt, key, {
get: function get() {
return args[key];
}
});
});
}
if (defaultPrevented) {
evt.preventDefault();
}
if (nativeDispatch) {
element.dispatchEvent(evt);
}
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
jQueryEvent.preventDefault();
}
return evt;
}
};
return EventHandler;
})));
//# sourceMappingURL=event-handler.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,87 +0,0 @@
/*!
* Bootstrap manipulator.js v5.0.0-beta1 (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/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
function normalizeData(val) {
if (val === 'true') {
return true;
}
if (val === 'false') {
return false;
}
if (val === Number(val).toString()) {
return Number(val);
}
if (val === '' || val === 'null') {
return null;
}
return val;
}
function normalizeDataKey(key) {
return key.replace(/[A-Z]/g, function (chr) {
return "-" + chr.toLowerCase();
});
}
var Manipulator = {
setDataAttribute: function setDataAttribute(element, key, value) {
element.setAttribute("data-bs-" + normalizeDataKey(key), value);
},
removeDataAttribute: function removeDataAttribute(element, key) {
element.removeAttribute("data-bs-" + normalizeDataKey(key));
},
getDataAttributes: function getDataAttributes(element) {
if (!element) {
return {};
}
var attributes = {};
Object.keys(element.dataset).filter(function (key) {
return key.startsWith('bs');
}).forEach(function (key) {
var pureKey = key.replace(/^bs/, '');
pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
attributes[pureKey] = normalizeData(element.dataset[key]);
});
return attributes;
},
getDataAttribute: function getDataAttribute(element, key) {
return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key)));
},
offset: function offset(element) {
var rect = element.getBoundingClientRect();
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};
},
position: function position(element) {
return {
top: element.offsetTop,
left: element.offsetLeft
};
}
};
return Manipulator;
})));
//# sourceMappingURL=manipulator.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsB,UAAAC,GAAG;EAAA,iBAAQA,GAAG,CAACC,WAAJ,EAAR;EAAA,GAAzB,CAAP;EACD;;MAEKC,WAAW,GAAG;EAClBC,EAAAA,gBADkB,4BACDC,OADC,EACQN,GADR,EACaO,KADb,EACoB;EACpCD,IAAAA,OAAO,CAACE,YAAR,cAAgCT,gBAAgB,CAACC,GAAD,CAAhD,EAAyDO,KAAzD;EACD,GAHiB;EAKlBE,EAAAA,mBALkB,+BAKEH,OALF,EAKWN,GALX,EAKgB;EAChCM,IAAAA,OAAO,CAACI,eAAR,cAAmCX,gBAAgB,CAACC,GAAD,CAAnD;EACD,GAPiB;EASlBW,EAAAA,iBATkB,6BASAL,OATA,EASS;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,QAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACU,UAAAhB,GAAG;EAAA,aAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CAAJ;EAAA,KADb,EAEGC,OAFH,CAEW,UAAAlB,GAAG,EAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;EA2BlBW,EAAAA,gBA3BkB,4BA2BDjB,OA3BC,EA2BQN,GA3BR,EA2Ba;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,cAAgCzB,gBAAgB,CAACC,GAAD,CAAhD,CAAD,CAApB;EACD,GA7BiB;EA+BlByB,EAAAA,MA/BkB,kBA+BXnB,OA/BW,EA+BF;EACd,QAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;EAwClBC,EAAAA,QAxCkB,oBAwCT5B,OAxCS,EAwCA;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;EA7CiB;;;;;;;;"}

View file

@ -1,99 +0,0 @@
/*!
* Bootstrap selector-engine.js v5.0.0-beta1 (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/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory());
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
},
find: function find(selector, element) {
var _ref;
if (element === void 0) {
element = document.documentElement;
}
return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));
},
findOne: function findOne(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
return Element.prototype.querySelector.call(element, selector);
},
children: function children(element, selector) {
var _ref2;
var children = (_ref2 = []).concat.apply(_ref2, element.children);
return children.filter(function (child) {
return child.matches(selector);
});
},
parents: function parents(element, selector) {
var parents = [];
var ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (this.matches(ancestor, selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
prev: function prev(element, selector) {
var previous = element.previousElementSibling;
while (previous) {
if (previous.matches(selector)) {
return [previous];
}
previous = previous.previousElementSibling;
}
return [];
},
next: function next(element, selector) {
var next = element.nextElementSibling;
while (next) {
if (this.matches(next, selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
}
};
return SelectorEngine;
})));
//# sourceMappingURL=selector-engine.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"selector-engine.js","sources":["../../src/dom/selector-engine.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n matches(element, selector) {\n return element.matches(selector)\n },\n\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n const children = [].concat(...element.children)\n\n return children.filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n\n let ancestor = element.parentNode\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (this.matches(ancestor, selector)) {\n parents.push(ancestor)\n }\n\n ancestor = ancestor.parentNode\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (this.matches(next, selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n }\n}\n\nexport default SelectorEngine\n"],"names":["NODE_TEXT","SelectorEngine","matches","element","selector","find","document","documentElement","concat","Element","prototype","querySelectorAll","call","findOne","querySelector","children","filter","child","parents","ancestor","parentNode","nodeType","Node","ELEMENT_NODE","push","prev","previous","previousElementSibling","next","nextElementSibling"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EAEA,IAAMA,SAAS,GAAG,CAAlB;MAEMC,cAAc,GAAG;EACrBC,EAAAA,OADqB,mBACbC,OADa,EACJC,QADI,EACM;EACzB,WAAOD,OAAO,CAACD,OAAR,CAAgBE,QAAhB,CAAP;EACD,GAHoB;EAKrBC,EAAAA,IALqB,gBAKhBD,QALgB,EAKND,OALM,EAK8B;EAAA;;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BG,QAAQ,CAACC,eAAiB;EAAA;;EACjD,WAAO,YAAGC,MAAH,aAAaC,OAAO,CAACC,SAAR,CAAkBC,gBAAlB,CAAmCC,IAAnC,CAAwCT,OAAxC,EAAiDC,QAAjD,CAAb,CAAP;EACD,GAPoB;EASrBS,EAAAA,OATqB,mBASbT,QATa,EASHD,OATG,EASiC;EAAA,QAApCA,OAAoC;EAApCA,MAAAA,OAAoC,GAA1BG,QAAQ,CAACC,eAAiB;EAAA;;EACpD,WAAOE,OAAO,CAACC,SAAR,CAAkBI,aAAlB,CAAgCF,IAAhC,CAAqCT,OAArC,EAA8CC,QAA9C,CAAP;EACD,GAXoB;EAarBW,EAAAA,QAbqB,oBAaZZ,OAbY,EAaHC,QAbG,EAaO;EAAA;;EAC1B,QAAMW,QAAQ,GAAG,aAAGP,MAAH,cAAaL,OAAO,CAACY,QAArB,CAAjB;;EAEA,WAAOA,QAAQ,CAACC,MAAT,CAAgB,UAAAC,KAAK;EAAA,aAAIA,KAAK,CAACf,OAAN,CAAcE,QAAd,CAAJ;EAAA,KAArB,CAAP;EACD,GAjBoB;EAmBrBc,EAAAA,OAnBqB,mBAmBbf,OAnBa,EAmBJC,QAnBI,EAmBM;EACzB,QAAMc,OAAO,GAAG,EAAhB;EAEA,QAAIC,QAAQ,GAAGhB,OAAO,CAACiB,UAAvB;;EAEA,WAAOD,QAAQ,IAAIA,QAAQ,CAACE,QAAT,KAAsBC,IAAI,CAACC,YAAvC,IAAuDJ,QAAQ,CAACE,QAAT,KAAsBrB,SAApF,EAA+F;EAC7F,UAAI,KAAKE,OAAL,CAAaiB,QAAb,EAAuBf,QAAvB,CAAJ,EAAsC;EACpCc,QAAAA,OAAO,CAACM,IAAR,CAAaL,QAAb;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,UAApB;EACD;;EAED,WAAOF,OAAP;EACD,GAjCoB;EAmCrBO,EAAAA,IAnCqB,gBAmChBtB,OAnCgB,EAmCPC,QAnCO,EAmCG;EACtB,QAAIsB,QAAQ,GAAGvB,OAAO,CAACwB,sBAAvB;;EAEA,WAAOD,QAAP,EAAiB;EACf,UAAIA,QAAQ,CAACxB,OAAT,CAAiBE,QAAjB,CAAJ,EAAgC;EAC9B,eAAO,CAACsB,QAAD,CAAP;EACD;;EAEDA,MAAAA,QAAQ,GAAGA,QAAQ,CAACC,sBAApB;EACD;;EAED,WAAO,EAAP;EACD,GA/CoB;EAiDrBC,EAAAA,IAjDqB,gBAiDhBzB,OAjDgB,EAiDPC,QAjDO,EAiDG;EACtB,QAAIwB,IAAI,GAAGzB,OAAO,CAAC0B,kBAAnB;;EAEA,WAAOD,IAAP,EAAa;EACX,UAAI,KAAK1B,OAAL,CAAa0B,IAAb,EAAmBxB,QAAnB,CAAJ,EAAkC;EAChC,eAAO,CAACwB,IAAD,CAAP;EACD;;EAEDA,MAAAA,IAAI,GAAGA,IAAI,CAACC,kBAAZ;EACD;;EAED,WAAO,EAAP;EACD;EA7DoB;;;;;;;;"}

599
js/dist/dropdown.js vendored
View file

@ -1,127 +1,21 @@
/*! /*!
* Bootstrap dropdown.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap dropdown.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function ($, Popper, Util) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopNamespace(e) { var $__default = /*#__PURE__*/_interopDefaultLegacy($);
if (e && e.__esModule) return e; var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
var n = Object.create(null); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () {
return e[k];
}
});
}
});
}
n['default'] = e;
return Object.freeze(n);
}
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelector = function getSelector(element) {
var selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
var getElementFromSelector = function getElementFromSelector(element) {
var selector = getSelector(element);
return selector ? document.querySelector(selector) : null;
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
var elementStyle = getComputedStyle(element);
var parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
};
var noop = function noop() {
return function () {};
};
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -132,66 +26,25 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'dropdown'; var NAME = 'dropdown';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.dropdown'; var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var ESCAPE_KEY = 'Escape'; var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var SPACE_KEY = 'Space'; var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var TAB_KEY = 'Tab';
var ARROW_UP_KEY = 'ArrowUp';
var ARROW_DOWN_KEY = 'ArrowDown';
var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY); var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
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 EVENT_HIDE = "hide" + EVENT_KEY; var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY; var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY; var EVENT_SHOW = "show" + EVENT_KEY;
@ -203,24 +56,25 @@
var CLASS_NAME_DISABLED = 'disabled'; var CLASS_NAME_DISABLED = 'disabled';
var CLASS_NAME_SHOW = 'show'; var CLASS_NAME_SHOW = 'show';
var CLASS_NAME_DROPUP = 'dropup'; var CLASS_NAME_DROPUP = 'dropup';
var CLASS_NAME_DROPEND = 'dropend'; var CLASS_NAME_DROPRIGHT = 'dropright';
var CLASS_NAME_DROPSTART = 'dropstart'; var CLASS_NAME_DROPLEFT = 'dropleft';
var CLASS_NAME_NAVBAR = 'navbar'; var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]'; var CLASS_NAME_POSITION_STATIC = 'position-static';
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
var SELECTOR_FORM_CHILD = '.dropdown form'; var SELECTOR_FORM_CHILD = '.dropdown form';
var SELECTOR_MENU = '.dropdown-menu'; var SELECTOR_MENU = '.dropdown-menu';
var SELECTOR_NAVBAR_NAV = '.navbar-nav'; var SELECTOR_NAVBAR_NAV = '.navbar-nav';
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
var PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start'; var PLACEMENT_TOP = 'top-start';
var PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end'; var PLACEMENT_TOPEND = 'top-end';
var PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start'; var PLACEMENT_BOTTOM = 'bottom-start';
var PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end'; var PLACEMENT_BOTTOMEND = 'bottom-end';
var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'; var PLACEMENT_RIGHT = 'right-start';
var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'; var PLACEMENT_LEFT = 'left-start';
var Default = { var Default = {
offset: 0, offset: 0,
flip: true, flip: true,
boundary: 'clippingParents', boundary: 'scrollParent',
reference: 'toggle', reference: 'toggle',
display: 'dynamic', display: 'dynamic',
popperConfig: null popperConfig: null
@ -239,21 +93,15 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Dropdown = /*#__PURE__*/function (_BaseComponent) { var Dropdown = /*#__PURE__*/function () {
_inheritsLoose(Dropdown, _BaseComponent);
function Dropdown(element, config) { function Dropdown(element, config) {
var _this; this._element = element;
this._popper = null;
this._config = this._getConfig(config);
this._menu = this._getMenuElement();
this._inNavbar = this._detectNavbar();
_this = _BaseComponent.call(this, element) || this; this._addEventListeners();
_this._popper = null;
_this._config = _this._getConfig(config);
_this._menu = _this._getMenuElement();
_this._inNavbar = _this._detectNavbar();
_this._addEventListeners();
return _this;
} // Getters } // Getters
@ -261,92 +109,106 @@
// Public // Public
_proto.toggle = function toggle() { _proto.toggle = function toggle() {
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) { if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
return; return;
} }
var isActive = this._element.classList.contains(CLASS_NAME_SHOW); var isActive = $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW);
Dropdown.clearMenus(); Dropdown._clearMenus();
if (isActive) { if (isActive) {
return; return;
} }
this.show(); this.show(true);
}; };
_proto.show = function show() { _proto.show = function show(usePopper) {
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) { if (usePopper === void 0) {
usePopper = false;
}
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
return; return;
} }
var parent = Dropdown.getParentFromElement(this._element);
var relatedTarget = { var relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, relatedTarget); var showEvent = $__default['default'].Event(EVENT_SHOW, relatedTarget);
if (showEvent.defaultPrevented) { var parent = Dropdown._getParentFromElement(this._element);
$__default['default'](parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
return; return;
} // Totally disable Popper for Dropdowns in Navbar } // Disable totally Popper.js for Dropdown in Navbar
if (!this._inNavbar) { if (!this._inNavbar && usePopper) {
if (typeof Popper__namespace === 'undefined') { /**
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); * Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper__default['default'] === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
} }
var referenceElement = this._element; var referenceElement = this._element;
if (this._config.reference === 'parent') { if (this._config.reference === 'parent') {
referenceElement = parent; referenceElement = parent;
} else if (isElement(this._config.reference)) { } else if (Util__default['default'].isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') { if (typeof this._config.reference.jquery !== 'undefined') {
referenceElement = this._config.reference[0]; referenceElement = this._config.reference[0];
} }
} // If boundary is not `scrollParent`, then set position to `static`
// to allow the menu to "escape" the scroll parent's boundaries
// https://github.com/twbs/bootstrap/issues/24251
if (this._config.boundary !== 'scrollParent') {
$__default['default'](parent).addClass(CLASS_NAME_POSITION_STATIC);
} }
this._popper = Popper.createPopper(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 } // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) { if ('ontouchstart' in document.documentElement && $__default['default'](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
var _ref; $__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
return EventHandler__default['default'].on(elem, 'mouseover', null, noop());
});
} }
this._element.focus(); this._element.focus();
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
this._menu.classList.toggle(CLASS_NAME_SHOW); $__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
$__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_SHOWN, relatedTarget));
this._element.classList.toggle(CLASS_NAME_SHOW);
EventHandler__default['default'].trigger(parent, EVENT_SHOWN, relatedTarget);
}; };
_proto.hide = function hide() { _proto.hide = function hide() {
if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) { if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
return; return;
} }
var parent = Dropdown.getParentFromElement(this._element);
var relatedTarget = { var relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget); var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
if (hideEvent.defaultPrevented) { var parent = Dropdown._getParentFromElement(this._element);
$__default['default'](parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
return; return;
} }
@ -354,20 +216,17 @@
this._popper.destroy(); this._popper.destroy();
} }
this._menu.classList.toggle(CLASS_NAME_SHOW); $__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
$__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
this._element.classList.toggle(CLASS_NAME_SHOW);
EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget);
}; };
_proto.dispose = function dispose() { _proto.dispose = function dispose() {
_BaseComponent.prototype.dispose.call(this); $__default['default'].removeData(this._element, DATA_KEY);
$__default['default'](this._element).off(EVENT_KEY);
EventHandler__default['default'].off(this._element, EVENT_KEY); this._element = null;
this._menu = null; this._menu = null;
if (this._popper) { if (this._popper !== null) {
this._popper.destroy(); this._popper.destroy();
this._popper = null; this._popper = null;
@ -377,115 +236,135 @@
_proto.update = function update() { _proto.update = function update() {
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
if (this._popper) { if (this._popper !== null) {
this._popper.update(); this._popper.scheduleUpdate();
} }
} // Private } // Private
; ;
_proto._addEventListeners = function _addEventListeners() { _proto._addEventListeners = function _addEventListeners() {
var _this2 = this; var _this = this;
EventHandler__default['default'].on(this._element, EVENT_CLICK, function (event) { $__default['default'](this._element).on(EVENT_CLICK, function (event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
_this2.toggle(); _this.toggle();
}); });
}; };
_proto._getConfig = function _getConfig(config) { _proto._getConfig = function _getConfig(config) {
config = _extends({}, this.constructor.Default, Manipulator__default['default'].getDataAttributes(this._element), config); config = _extends({}, this.constructor.Default, $__default['default'](this._element).data(), config);
typeCheckConfig(NAME, config, this.constructor.DefaultType); Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config; return config;
}; };
_proto._getMenuElement = function _getMenuElement() { _proto._getMenuElement = function _getMenuElement() {
return SelectorEngine__default['default'].next(this._element, SELECTOR_MENU)[0]; if (!this._menu) {
var parent = Dropdown._getParentFromElement(this._element);
if (parent) {
this._menu = parent.querySelector(SELECTOR_MENU);
}
}
return this._menu;
}; };
_proto._getPlacement = function _getPlacement() { _proto._getPlacement = function _getPlacement() {
var parentDropdown = this._element.parentNode; var $parentDropdown = $__default['default'](this._element.parentNode);
var placement = PLACEMENT_BOTTOM; // Handle dropup
if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) { if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
return PLACEMENT_RIGHT; 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 ($__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND;
} }
if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) { return placement;
return PLACEMENT_LEFT;
} // We need to trim the value because custom properties can also include spaces
var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
}
return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
}; };
_proto._detectNavbar = function _detectNavbar() { _proto._detectNavbar = function _detectNavbar() {
return this._element.closest("." + CLASS_NAME_NAVBAR) !== null; return $__default['default'](this._element).closest('.navbar').length > 0;
};
_proto._getOffset = function _getOffset() {
var _this2 = this;
var offset = {};
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
offset.offset = this._config.offset;
}
return offset;
}; };
_proto._getPopperConfig = function _getPopperConfig() { _proto._getPopperConfig = function _getPopperConfig() {
var popperConfig = { var popperConfig = {
placement: this._getPlacement(), placement: this._getPlacement(),
modifiers: [{ modifiers: {
name: 'preventOverflow', offset: this._getOffset(),
options: { flip: {
altBoundary: this._config.flip, enabled: this._config.flip
rootBoundary: this._config.boundary },
preventOverflow: {
boundariesElement: this._config.boundary
} }
}] }
}; // Disable Popper if we have a static display }; // Disable Popper.js if we have a static display
if (this._config.display === 'static') { if (this._config.display === 'static') {
popperConfig.modifiers = [{ popperConfig.modifiers.applyStyle = {
name: 'applyStyles',
enabled: false enabled: false
}]; };
} }
return _extends({}, popperConfig, this._config.popperConfig); return _extends({}, popperConfig, this._config.popperConfig);
} // Static } // Static
; ;
Dropdown.dropdownInterface = function dropdownInterface(element, config) { Dropdown._jQueryInterface = function _jQueryInterface(config) {
var data = Data__default['default'].getData(element, DATA_KEY); return this.each(function () {
var data = $__default['default'](this).data(DATA_KEY);
var _config = typeof config === 'object' ? config : null; var _config = typeof config === 'object' ? config : null;
if (!data) { if (!data) {
data = new Dropdown(element, _config); data = new Dropdown(this, _config);
} $__default['default'](this).data(DATA_KEY, data);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
} }
data[config](); if (typeof config === 'string') {
} if (typeof data[config] === 'undefined') {
}; throw new TypeError("No method named \"" + config + "\"");
}
Dropdown.jQueryInterface = function jQueryInterface(config) { data[config]();
return this.each(function () { }
Dropdown.dropdownInterface(this, config);
}); });
}; };
Dropdown.clearMenus = function clearMenus(event) { Dropdown._clearMenus = function _clearMenus(event) {
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) { if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
return; return;
} }
var toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE); var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
for (var i = 0, len = toggles.length; i < len; i++) { for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown.getParentFromElement(toggles[i]); var parent = Dropdown._getParentFromElement(toggles[i]);
var context = Data__default['default'].getData(toggles[i], DATA_KEY);
var context = $__default['default'](toggles[i]).data(DATA_KEY);
var relatedTarget = { var relatedTarget = {
relatedTarget: toggles[i] relatedTarget: toggles[i]
}; };
@ -500,28 +379,25 @@
var dropdownMenu = context._menu; var dropdownMenu = context._menu;
if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) { if (!$__default['default'](parent).hasClass(CLASS_NAME_SHOW)) {
continue; continue;
} }
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(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; continue;
} }
var hideEvent = EventHandler__default['default'].trigger(parent, EVENT_HIDE, relatedTarget); var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
$__default['default'](parent).trigger(hideEvent);
if (hideEvent.defaultPrevented) { if (hideEvent.isDefaultPrevented()) {
continue; continue;
} // If this is a touch-enabled device we remove the extra } // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
var _ref2; $__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
(_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
return EventHandler__default['default'].off(elem, 'mouseover', null, noop());
});
} }
toggles[i].setAttribute('aria-expanded', 'false'); toggles[i].setAttribute('aria-expanded', 'false');
@ -530,17 +406,24 @@
context._popper.destroy(); context._popper.destroy();
} }
dropdownMenu.classList.remove(CLASS_NAME_SHOW); $__default['default'](dropdownMenu).removeClass(CLASS_NAME_SHOW);
toggles[i].classList.remove(CLASS_NAME_SHOW); $__default['default'](parent).removeClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget);
} }
}; };
Dropdown.getParentFromElement = function getParentFromElement(element) { Dropdown._getParentFromElement = function _getParentFromElement(element) {
return getElementFromSelector(element) || element.parentNode; var parent;
}; var selector = Util__default['default'].getSelectorFromElement(element);
Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) { if (selector) {
parent = document.querySelector(selector);
}
return parent || element.parentNode;
} // eslint-disable-next-line complexity
;
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
// If not input/textarea: // If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command // - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea: // If input/textarea:
@ -548,55 +431,67 @@
// - If key is other than escape // - If key is other than escape
// - If key is not up or down => not a dropdown command // - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command // - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) { 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 || $__default['default'](this).hasClass(CLASS_NAME_DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $__default['default'](parent).hasClass(CLASS_NAME_SHOW);
if (!isActive && event.which === ESCAPE_KEYCODE) {
return; return;
} }
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) { if (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
if (event.which === ESCAPE_KEYCODE) {
$__default['default'](parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
}
$__default['default'](this).trigger('click');
return; return;
} }
var parent = Dropdown.getParentFromElement(this); var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
var isActive = this.classList.contains(CLASS_NAME_SHOW); return $__default['default'](item).is(':visible');
});
if (event.key === ESCAPE_KEY) { if (items.length === 0) {
var button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0];
button.focus();
Dropdown.clearMenus();
return; return;
} }
if (!isActive || event.key === SPACE_KEY) { var index = items.indexOf(event.target);
Dropdown.clearMenus();
return;
}
var items = SelectorEngine__default['default'].find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible); if (event.which === ARROW_UP_KEYCODE && index > 0) {
// Up
if (!items.length) {
return;
}
var index = items.indexOf(event.target); // Up
if (event.key === ARROW_UP_KEY && index > 0) {
index--; index--;
} // Down }
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) { // Down
index++; index++;
} // index is -1 if the first keydown is an ArrowUp }
if (index < 0) {
index = 0;
}
index = index === -1 ? 0 : index;
items[index].focus(); items[index].focus();
}; };
_createClass$1(Dropdown, null, [{ _createClass(Dropdown, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}, {
key: "Default", key: "Default",
get: function get() { get: function get() {
return Default; return Default;
@ -606,15 +501,10 @@
get: function get() { get: function get() {
return DefaultType; return DefaultType;
} }
}, {
key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}]); }]);
return Dropdown; return Dropdown;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -622,40 +512,27 @@
*/ */
EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler); $__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) {
EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
EventHandler__default['default'].on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
Dropdown.dropdownInterface(this, 'toggle');
}); Dropdown._jQueryInterface.call($__default['default'](this), 'toggle');
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) { }).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
return e.stopPropagation(); e.stopPropagation();
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Dropdown to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Dropdown._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Dropdown;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Dropdown.jQueryInterface; return Dropdown._jQueryInterface;
$.fn[NAME].Constructor = Dropdown; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Dropdown.jQueryInterface;
};
}
});
return Dropdown; return Dropdown;

File diff suppressed because one or more lines are too long

22
js/dist/index.js vendored Normal file
View file

@ -0,0 +1,22 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.3): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
(function ($) {
if (typeof $ === '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 minMajor = 1;
var ltMajor = 2;
var minMinor = 9;
var minPatch = 1;
var maxMajor = 4;
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
}
})($);

617
js/dist/modal.js vendored
View file

@ -1,153 +1,20 @@
/*! /*!
* Bootstrap modal.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap modal.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function ($, Util) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
/** function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelector = function getSelector(element) {
var selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
var getElementFromSelector = function getElementFromSelector(element) {
var selector = getSelector(element);
return selector ? document.querySelector(selector) : null;
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = Number.parseFloat(transitionDuration);
var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
var elementStyle = getComputedStyle(element);
var parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -158,68 +25,25 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'modal'; var NAME = 'modal';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.modal'; var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var ESCAPE_KEY = 'Escape'; var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var Default = { var Default = {
backdrop: true, backdrop: true,
keyboard: true, keyboard: true,
focus: true focus: true,
show: true
}; };
var DefaultType = { var DefaultType = {
backdrop: '(boolean|string)', backdrop: '(boolean|string)',
keyboard: 'boolean', keyboard: 'boolean',
focus: 'boolean' focus: 'boolean',
show: 'boolean'
}; };
var EVENT_HIDE = "hide" + EVENT_KEY; var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY; var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
@ -233,6 +57,7 @@
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY; var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY; var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_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_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
var CLASS_NAME_BACKDROP = 'modal-backdrop'; var CLASS_NAME_BACKDROP = 'modal-backdrop';
var CLASS_NAME_OPEN = 'modal-open'; var CLASS_NAME_OPEN = 'modal-open';
@ -241,8 +66,8 @@
var CLASS_NAME_STATIC = 'modal-static'; var CLASS_NAME_STATIC = 'modal-static';
var SELECTOR_DIALOG = '.modal-dialog'; var SELECTOR_DIALOG = '.modal-dialog';
var SELECTOR_MODAL_BODY = '.modal-body'; var SELECTOR_MODAL_BODY = '.modal-body';
var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]'; var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
var SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]'; var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
var SELECTOR_STICKY_CONTENT = '.sticky-top'; var SELECTOR_STICKY_CONTENT = '.sticky-top';
/** /**
@ -251,22 +76,17 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Modal = /*#__PURE__*/function (_BaseComponent) { var Modal = /*#__PURE__*/function () {
_inheritsLoose(Modal, _BaseComponent);
function Modal(element, config) { function Modal(element, config) {
var _this; this._config = this._getConfig(config);
this._element = element;
_this = _BaseComponent.call(this, element) || this; this._dialog = element.querySelector(SELECTOR_DIALOG);
_this._config = _this._getConfig(config); this._backdrop = null;
_this._dialog = SelectorEngine__default['default'].findOne(SELECTOR_DIALOG, element); this._isShown = false;
_this._backdrop = null; this._isBodyOverflowing = false;
_this._isShown = false; this._ignoreBackdropClick = false;
_this._isBodyOverflowing = false; this._isTransitioning = false;
_this._ignoreBackdropClick = false; this._scrollbarWidth = 0;
_this._isTransitioning = false;
_this._scrollbarWidth = 0;
return _this;
} // Getters } // Getters
@ -278,21 +98,22 @@
}; };
_proto.show = function show(relatedTarget) { _proto.show = function show(relatedTarget) {
var _this2 = this; var _this = this;
if (this._isShown || this._isTransitioning) { if (this._isShown || this._isTransitioning) {
return; return;
} }
if (this._element.classList.contains(CLASS_NAME_FADE)) { if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
this._isTransitioning = true; this._isTransitioning = true;
} }
var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, { var showEvent = $__default['default'].Event(EVENT_SHOW, {
relatedTarget: relatedTarget relatedTarget: relatedTarget
}); });
$__default['default'](this._element).trigger(showEvent);
if (this._isShown || showEvent.defaultPrevented) { if (this._isShown || showEvent.isDefaultPrevented()) {
return; return;
} }
@ -308,24 +129,24 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) { $__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
return _this2.hide(event); return _this.hide(event);
}); });
EventHandler__default['default'].on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () { $__default['default'](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
EventHandler__default['default'].one(_this2._element, EVENT_MOUSEUP_DISMISS, function (event) { $__default['default'](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
if (event.target === _this2._element) { if ($__default['default'](event.target).is(_this._element)) {
_this2._ignoreBackdropClick = true; _this._ignoreBackdropClick = true;
} }
}); });
}); });
this._showBackdrop(function () { this._showBackdrop(function () {
return _this2._showElement(relatedTarget); return _this._showElement(relatedTarget);
}); });
}; };
_proto.hide = function hide(event) { _proto.hide = function hide(event) {
var _this3 = this; var _this2 = this;
if (event) { if (event) {
event.preventDefault(); event.preventDefault();
@ -335,15 +156,15 @@
return; return;
} }
var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE); var hideEvent = $__default['default'].Event(EVENT_HIDE);
$__default['default'](this._element).trigger(hideEvent);
if (hideEvent.defaultPrevented) { if (!this._isShown || hideEvent.isDefaultPrevented()) {
return; return;
} }
this._isShown = false; this._isShown = false;
var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
var transition = this._element.classList.contains(CLASS_NAME_FADE);
if (transition) { if (transition) {
this._isTransitioning = true; this._isTransitioning = true;
@ -353,19 +174,16 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler__default['default'].off(document, EVENT_FOCUSIN); $__default['default'](document).off(EVENT_FOCUSIN);
$__default['default'](this._element).removeClass(CLASS_NAME_SHOW);
this._element.classList.remove(CLASS_NAME_SHOW); $__default['default'](this._element).off(EVENT_CLICK_DISMISS);
$__default['default'](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS);
EventHandler__default['default'].off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (transition) { if (transition) {
var transitionDuration = getTransitionDurationFromElement(this._element); var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, TRANSITION_END, function (event) { $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function (event) {
return _this3._hideModal(event); return _this2._hideModal(event);
}); }).emulateTransitionEnd(transitionDuration);
emulateTransitionEnd(this._element, transitionDuration);
} else { } else {
this._hideModal(); this._hideModal();
} }
@ -373,19 +191,18 @@
_proto.dispose = function dispose() { _proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) { [window, this._element, this._dialog].forEach(function (htmlElement) {
return EventHandler__default['default'].off(htmlElement, EVENT_KEY); return $__default['default'](htmlElement).off(EVENT_KEY);
}); });
_BaseComponent.prototype.dispose.call(this);
/** /**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array * Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain * It will remove `EVENT_CLICK_DATA_API` event that should remain
*/ */
$__default['default'](document).off(EVENT_FOCUSIN);
EventHandler__default['default'].off(document, EVENT_FOCUSIN); $__default['default'].removeData(this._element, DATA_KEY);
this._config = null; this._config = null;
this._element = null;
this._dialog = null; this._dialog = null;
this._backdrop = null; this._backdrop = null;
this._isShown = null; this._isShown = null;
@ -402,16 +219,52 @@
_proto._getConfig = function _getConfig(config) { _proto._getConfig = function _getConfig(config) {
config = _extends({}, Default, config); config = _extends({}, Default, config);
typeCheckConfig(NAME, config, DefaultType); Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
return config; return config;
}; };
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
var _this3 = this;
if (this._config.backdrop === 'static') {
var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED);
$__default['default'](this._element).trigger(hideEventPrevented);
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();
} else {
this.hide();
}
};
_proto._showElement = function _showElement(relatedTarget) { _proto._showElement = function _showElement(relatedTarget) {
var _this4 = this; var _this4 = this;
var transition = this._element.classList.contains(CLASS_NAME_FADE); var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
var modalBody = SelectorEngine__default['default'].findOne(SELECTOR_MODAL_BODY, this._dialog);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position // Don't move modal's DOM position
@ -426,37 +279,38 @@
this._element.setAttribute('role', 'dialog'); this._element.setAttribute('role', 'dialog');
this._element.scrollTop = 0; if ($__default['default'](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
if (modalBody) {
modalBody.scrollTop = 0; modalBody.scrollTop = 0;
} else {
this._element.scrollTop = 0;
} }
if (transition) { if (transition) {
reflow(this._element); Util__default['default'].reflow(this._element);
} }
this._element.classList.add(CLASS_NAME_SHOW); $__default['default'](this._element).addClass(CLASS_NAME_SHOW);
if (this._config.focus) { if (this._config.focus) {
this._enforceFocus(); this._enforceFocus();
} }
var shownEvent = $__default['default'].Event(EVENT_SHOWN, {
relatedTarget: relatedTarget
});
var transitionComplete = function transitionComplete() { var transitionComplete = function transitionComplete() {
if (_this4._config.focus) { if (_this4._config.focus) {
_this4._element.focus(); _this4._element.focus();
} }
_this4._isTransitioning = false; _this4._isTransitioning = false;
EventHandler__default['default'].trigger(_this4._element, EVENT_SHOWN, { $__default['default'](_this4._element).trigger(shownEvent);
relatedTarget: relatedTarget
});
}; };
if (transition) { if (transition) {
var transitionDuration = getTransitionDurationFromElement(this._dialog); var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
EventHandler__default['default'].one(this._dialog, TRANSITION_END, transitionComplete); $__default['default'](this._dialog).one(Util__default['default'].TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
emulateTransitionEnd(this._dialog, transitionDuration);
} else { } else {
transitionComplete(); transitionComplete();
} }
@ -465,10 +319,9 @@
_proto._enforceFocus = function _enforceFocus() { _proto._enforceFocus = function _enforceFocus() {
var _this5 = this; var _this5 = this;
EventHandler__default['default'].off(document, EVENT_FOCUSIN); // guard against infinite focus loop $__default['default'](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
.on(EVENT_FOCUSIN, function (event) {
EventHandler__default['default'].on(document, EVENT_FOCUSIN, function (event) { if (document !== event.target && _this5._element !== event.target && $__default['default'](_this5._element).has(event.target).length === 0) {
if (document !== event.target && _this5._element !== event.target && !_this5._element.contains(event.target)) {
_this5._element.focus(); _this5._element.focus();
} }
}); });
@ -478,17 +331,17 @@
var _this6 = this; var _this6 = this;
if (this._isShown) { if (this._isShown) {
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, function (event) { $__default['default'](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
if (_this6._config.keyboard && event.key === ESCAPE_KEY) { if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
event.preventDefault(); event.preventDefault();
_this6.hide(); _this6.hide();
} else if (!_this6._config.keyboard && event.key === ESCAPE_KEY) { } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
_this6._triggerBackdropTransition(); _this6._triggerBackdropTransition();
} }
}); });
} else { } else if (!this._isShown) {
EventHandler__default['default'].off(this._element, EVENT_KEYDOWN_DISMISS); $__default['default'](this._element).off(EVENT_KEYDOWN_DISMISS);
} }
}; };
@ -496,11 +349,11 @@
var _this7 = this; var _this7 = this;
if (this._isShown) { if (this._isShown) {
EventHandler__default['default'].on(window, EVENT_RESIZE, function () { $__default['default'](window).on(EVENT_RESIZE, function (event) {
return _this7._adjustDialog(); return _this7.handleUpdate(event);
}); });
} else { } else {
EventHandler__default['default'].off(window, EVENT_RESIZE); $__default['default'](window).off(EVENT_RESIZE);
} }
}; };
@ -518,26 +371,27 @@
this._isTransitioning = false; this._isTransitioning = false;
this._showBackdrop(function () { this._showBackdrop(function () {
document.body.classList.remove(CLASS_NAME_OPEN); $__default['default'](document.body).removeClass(CLASS_NAME_OPEN);
_this8._resetAdjustments(); _this8._resetAdjustments();
_this8._resetScrollbar(); _this8._resetScrollbar();
EventHandler__default['default'].trigger(_this8._element, EVENT_HIDDEN); $__default['default'](_this8._element).trigger(EVENT_HIDDEN);
}); });
}; };
_proto._removeBackdrop = function _removeBackdrop() { _proto._removeBackdrop = function _removeBackdrop() {
this._backdrop.parentNode.removeChild(this._backdrop); if (this._backdrop) {
$__default['default'](this._backdrop).remove();
this._backdrop = null; this._backdrop = null;
}
}; };
_proto._showBackdrop = function _showBackdrop(callback) { _proto._showBackdrop = function _showBackdrop(callback) {
var _this9 = this; var _this9 = this;
var animate = this._element.classList.contains(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) { if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div'); this._backdrop = document.createElement('div');
@ -547,8 +401,8 @@
this._backdrop.classList.add(animate); this._backdrop.classList.add(animate);
} }
document.body.appendChild(this._backdrop); $__default['default'](this._backdrop).appendTo(document.body);
EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, function (event) { $__default['default'](this._element).on(EVENT_CLICK_DISMISS, function (event) {
if (_this9._ignoreBackdropClick) { if (_this9._ignoreBackdropClick) {
_this9._ignoreBackdropClick = false; _this9._ignoreBackdropClick = false;
return; return;
@ -558,94 +412,61 @@
return; return;
} }
if (_this9._config.backdrop === 'static') { _this9._triggerBackdropTransition();
_this9._triggerBackdropTransition();
} else {
_this9.hide();
}
}); });
if (animate) { if (animate) {
reflow(this._backdrop); Util__default['default'].reflow(this._backdrop);
} }
this._backdrop.classList.add(CLASS_NAME_SHOW); $__default['default'](this._backdrop).addClass(CLASS_NAME_SHOW);
if (!callback) {
return;
}
if (!animate) { if (!animate) {
callback(); callback();
return; return;
} }
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); var backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callback); $__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) { } else if (!this._isShown && this._backdrop) {
this._backdrop.classList.remove(CLASS_NAME_SHOW); $__default['default'](this._backdrop).removeClass(CLASS_NAME_SHOW);
var callbackRemove = function callbackRemove() { var callbackRemove = function callbackRemove() {
_this9._removeBackdrop(); _this9._removeBackdrop();
callback(); if (callback) {
callback();
}
}; };
if (this._element.classList.contains(CLASS_NAME_FADE)) { if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); var _backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
EventHandler__default['default'].one(this._backdrop, TRANSITION_END, callbackRemove); $__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
} else { } else {
callbackRemove(); callbackRemove();
} }
} else { } else if (callback) {
callback(); callback();
} }
};
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
var _this10 = this;
var hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE_PREVENTED);
if (hideEvent.defaultPrevented) {
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 = getTransitionDurationFromElement(this._dialog);
EventHandler__default['default'].off(this._element, TRANSITION_END);
EventHandler__default['default'].one(this._element, TRANSITION_END, function () {
_this10._element.classList.remove(CLASS_NAME_STATIC);
if (!isModalOverflowing) {
EventHandler__default['default'].one(_this10._element, TRANSITION_END, function () {
_this10._element.style.overflowY = '';
});
emulateTransitionEnd(_this10._element, modalTransitionDuration);
}
});
emulateTransitionEnd(this._element, modalTransitionDuration);
this._element.focus();
} // ---------------------------------------------------------------------- } // ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals // the following methods are used to handle overflowing modals
// todo (fat): these should probably be refactored out of modal.js
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
; ;
_proto._adjustDialog = function _adjustDialog() { _proto._adjustDialog = function _adjustDialog() {
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
if (!this._isBodyOverflowing && isModalOverflowing && !isRTL || this._isBodyOverflowing && !isModalOverflowing && isRTL) { if (!this._isBodyOverflowing && isModalOverflowing) {
this._element.style.paddingLeft = this._scrollbarWidth + "px"; this._element.style.paddingLeft = this._scrollbarWidth + "px";
} }
if (this._isBodyOverflowing && !isModalOverflowing && !isRTL || !this._isBodyOverflowing && isModalOverflowing && isRTL) { if (this._isBodyOverflowing && !isModalOverflowing) {
this._element.style.paddingRight = this._scrollbarWidth + "px"; this._element.style.paddingRight = this._scrollbarWidth + "px";
} }
}; };
@ -662,63 +483,55 @@
}; };
_proto._setScrollbar = function _setScrollbar() { _proto._setScrollbar = function _setScrollbar() {
var _this11 = this; var _this10 = this;
if (this._isBodyOverflowing) { if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
// Adjust fixed content padding var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) { var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
$__default['default'](fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight; var actualPadding = element.style.paddingRight;
var calculatedPadding = window.getComputedStyle(element)['padding-right']; var calculatedPadding = $__default['default'](element).css('padding-right');
Manipulator__default['default'].setDataAttribute(element, 'padding-right', actualPadding); $__default['default'](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px";
}); // Adjust sticky content margin }); // Adjust sticky content margin
SelectorEngine__default['default'].find(SELECTOR_STICKY_CONTENT).forEach(function (element) { $__default['default'](stickyContent).each(function (index, element) {
var actualMargin = element.style.marginRight; var actualMargin = element.style.marginRight;
var calculatedMargin = window.getComputedStyle(element)['margin-right']; var calculatedMargin = $__default['default'](element).css('margin-right');
Manipulator__default['default'].setDataAttribute(element, 'margin-right', actualMargin); $__default['default'](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px";
}); // Adjust body padding }); // Adjust body padding
var actualPadding = document.body.style.paddingRight; var actualPadding = document.body.style.paddingRight;
var calculatedPadding = window.getComputedStyle(document.body)['padding-right']; var calculatedPadding = $__default['default'](document.body).css('padding-right');
Manipulator__default['default'].setDataAttribute(document.body, 'padding-right', actualPadding); $__default['default'](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
} }
document.body.classList.add(CLASS_NAME_OPEN); $__default['default'](document.body).addClass(CLASS_NAME_OPEN);
}; };
_proto._resetScrollbar = function _resetScrollbar() { _proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding // Restore fixed content padding
SelectorEngine__default['default'].find(SELECTOR_FIXED_CONTENT).forEach(function (element) { var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
var padding = Manipulator__default['default'].getDataAttribute(element, '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
if (typeof padding !== 'undefined') { var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
Manipulator__default['default'].removeDataAttribute(element, 'padding-right'); $__default['default'](elements).each(function (index, element) {
element.style.paddingRight = padding; var margin = $__default['default'](element).data('margin-right');
}
}); // Restore sticky content and navbar-toggler margin
SelectorEngine__default['default'].find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
var margin = Manipulator__default['default'].getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') { if (typeof margin !== 'undefined') {
Manipulator__default['default'].removeDataAttribute(element, 'margin-right'); $__default['default'](element).css('margin-right', margin).removeData('margin-right');
element.style.marginRight = margin;
} }
}); // Restore body padding }); // Restore body padding
var padding = Manipulator__default['default'].getDataAttribute(document.body, 'padding-right'); var padding = $__default['default'](document.body).data('padding-right');
$__default['default'](document.body).removeData('padding-right');
if (typeof padding === 'undefined') { document.body.style.paddingRight = padding ? padding : '';
document.body.style.paddingRight = '';
} else {
Manipulator__default['default'].removeDataAttribute(document.body, 'padding-right');
document.body.style.paddingRight = padding;
}
}; };
_proto._getScrollbarWidth = function _getScrollbarWidth() { _proto._getScrollbarWidth = function _getScrollbarWidth() {
@ -732,14 +545,15 @@
} // Static } // Static
; ;
Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) { Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
return this.each(function () { return this.each(function () {
var data = Data__default['default'].getData(this, DATA_KEY); var data = $__default['default'](this).data(DATA_KEY);
var _config = _extends({}, Default, Manipulator__default['default'].getDataAttributes(this), typeof config === 'object' && config ? config : {}); var _config = _extends({}, Default, $__default['default'](this).data(), typeof config === 'object' && config ? config : {});
if (!data) { if (!data) {
data = new Modal(this, _config); data = new Modal(this, _config);
$__default['default'](this).data(DATA_KEY, data);
} }
if (typeof config === 'string') { if (typeof config === 'string') {
@ -748,24 +562,26 @@
} }
data[config](relatedTarget); data[config](relatedTarget);
} else if (_config.show) {
data.show(relatedTarget);
} }
}); });
}; };
_createClass$1(Modal, null, [{ _createClass(Modal, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}, {
key: "Default", key: "Default",
get: function get() { get: function get() {
return Default; return Default;
} }
}, {
key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}]); }]);
return Modal; return Modal;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -773,59 +589,50 @@
*/ */
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
var _this12 = this; var _this11 = this;
var target = getElementFromSelector(this); var target;
var selector = Util__default['default'].getSelectorFromElement(this);
if (selector) {
target = document.querySelector(selector);
}
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') { if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault(); event.preventDefault();
} }
EventHandler__default['default'].one(target, EVENT_SHOW, function (showEvent) { var $target = $__default['default'](target).one(EVENT_SHOW, function (showEvent) {
if (showEvent.defaultPrevented) { if (showEvent.isDefaultPrevented()) {
// only register focus restorer if modal will actually get shown // Only register focus restorer if modal will actually get shown
return; return;
} }
EventHandler__default['default'].one(target, EVENT_HIDDEN, function () { $target.one(EVENT_HIDDEN, function () {
if (isVisible(_this12)) { if ($__default['default'](_this11).is(':visible')) {
_this12.focus(); _this11.focus();
} }
}); });
}); });
var data = Data__default['default'].getData(target, DATA_KEY);
if (!data) { Modal._jQueryInterface.call($__default['default'](target), config, this);
var config = _extends({}, Manipulator__default['default'].getDataAttributes(target), Manipulator__default['default'].getDataAttributes(this));
data = new Modal(target, config);
}
data.show(this);
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Modal to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Modal._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Modal;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Modal.jQueryInterface; return Modal._jQueryInterface;
$.fn[NAME].Constructor = Modal; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Modal.jQueryInterface;
};
}
});
return Modal; return Modal;

File diff suppressed because one or more lines are too long

124
js/dist/popover.js vendored
View file

@ -1,48 +1,19 @@
/*! /*!
* Bootstrap popover.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap popover.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './tooltip'], factory) : typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip));
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict'; }(this, (function ($, Tooltip) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip); var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
@ -57,8 +28,10 @@
*/ */
var NAME = 'popover'; var NAME = 'popover';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.popover'; var DATA_KEY = 'bs.popover';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var CLASS_PREFIX = 'bs-popover'; var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
@ -66,13 +39,17 @@
placement: 'right', placement: 'right',
trigger: 'click', trigger: 'click',
content: '', content: '',
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>' template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
}); });
var DefaultType = _extends({}, Tooltip__default['default'].DefaultType, { var DefaultType = _extends({}, Tooltip__default['default'].DefaultType, {
content: '(string|element|function)' 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 = { var Event = {
HIDE: "hide" + EVENT_KEY, HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY,
@ -85,10 +62,6 @@
MOUSEENTER: "mouseenter" + EVENT_KEY, MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY MOUSELEAVE: "mouseleave" + EVENT_KEY
}; };
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TITLE = '.popover-header';
var SELECTOR_CONTENT = '.popover-body';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
@ -109,47 +82,48 @@
return this.getTitle() || this._getContent(); return this.getTitle() || this._getContent();
}; };
_proto.setContent = function setContent() { _proto.addAttachmentClass = function addAttachmentClass(attachment) {
var tip = this.getTipElement(); // we use append for html objects to maintain js events $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
};
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle()); _proto.getTipElement = function getTipElement() {
this.tip = this.tip || $__default['default'](this.config.template)[0];
return this.tip;
};
_proto.setContent = function setContent() {
var $tip = $__default['default'](this.getTipElement()); // We use append for html objects to maintain js events
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
var content = this._getContent(); var content = this._getContent();
if (typeof content === 'function') { if (typeof content === 'function') {
content = content.call(this._element); content = content.call(this.element);
} }
this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content); this.setElementContent($tip.find(SELECTOR_CONTENT), content);
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW); $tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
} // Private } // Private
; ;
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
this.getTipElement().classList.add(CLASS_PREFIX + "-" + this.updateAttachment(attachment));
};
_proto._getContent = function _getContent() { _proto._getContent = function _getContent() {
return this._element.getAttribute('data-bs-content') || this.config.content; return this.element.getAttribute('data-content') || this.config.content;
}; };
_proto._cleanTipClass = function _cleanTipClass() { _proto._cleanTipClass = function _cleanTipClass() {
var tip = this.getTipElement(); var $tip = $__default['default'](this.getTipElement());
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX); var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) { if (tabClass !== null && tabClass.length > 0) {
tabClass.map(function (token) { $tip.removeClass(tabClass.join(''));
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
} }
} // Static } // Static
; ;
Popover.jQueryInterface = function jQueryInterface(config) { Popover._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () { return this.each(function () {
var data = Data__default['default'].getData(this, DATA_KEY); var data = $__default['default'](this).data(DATA_KEY);
var _config = typeof config === 'object' ? config : null; var _config = typeof config === 'object' ? config : null;
@ -159,7 +133,7 @@
if (!data) { if (!data) {
data = new Popover(this, _config); data = new Popover(this, _config);
Data__default['default'].setData(this, DATA_KEY, data); $__default['default'](this).data(DATA_KEY, data);
} }
if (typeof config === 'string') { if (typeof config === 'string') {
@ -173,8 +147,13 @@
}; };
_createClass(Popover, null, [{ _createClass(Popover, null, [{
key: "Default", key: "VERSION",
// Getters // Getters
get: function get() {
return VERSION;
}
}, {
key: "Default",
get: function get() { get: function get() {
return Default; return Default;
} }
@ -211,25 +190,16 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .Popover to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = Popover._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = Popover;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = Popover.jQueryInterface; return Popover._jQueryInterface;
$.fn[NAME].Constructor = Popover; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Popover.jQueryInterface;
};
}
});
return Popover; return Popover;

File diff suppressed because one or more lines are too long

302
js/dist/scrollspy.js vendored
View file

@ -1,108 +1,20 @@
/*! /*!
* Bootstrap scrollspy.js v5.0.0-beta1 (https://getbootstrap.com/) * Bootstrap scrollspy.js v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function ($, Util) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data); var $__default = /*#__PURE__*/_interopDefaultLegacy($);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler); var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
/** function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-beta1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var getUID = function getUID(prefix) {
do {
prefix += Math.floor(Math.random() * MAX_UID);
} while (document.getElementById(prefix));
return prefix;
};
var getSelector = function getSelector(element) {
var selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
return selector;
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = getSelector(element);
if (selector) {
return document.querySelector(selector) ? selector : null;
}
return null;
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var getjQuery = function getjQuery() {
var _window = window,
jQuery = _window.jQuery;
if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
return jQuery;
}
return null;
};
var onDOMContentLoaded = function onDOMContentLoaded(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
var isRTL = document.documentElement.dir === 'rtl';
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@ -113,58 +25,12 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var VERSION = '5.0.0-beta1';
var BaseComponent = /*#__PURE__*/function () {
function BaseComponent(element) {
if (!element) {
return;
}
this._element = element;
Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
}
var _proto = BaseComponent.prototype;
_proto.dispose = function dispose() {
Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
this._element = null;
}
/** Static */
;
BaseComponent.getInstance = function getInstance(element) {
return Data__default['default'].getData(element, this.DATA_KEY);
};
_createClass(BaseComponent, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}]);
return BaseComponent;
}();
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'scrollspy'; var NAME = 'scrollspy';
var VERSION = '4.5.3';
var DATA_KEY = 'bs.scrollspy'; var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
var Default = { var Default = {
offset: 10, offset: 10,
method: 'auto', method: 'auto',
@ -180,12 +46,13 @@
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY; var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
var CLASS_NAME_ACTIVE = 'active'; var CLASS_NAME_ACTIVE = 'active';
var SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]'; var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_NAV_LINKS = '.nav-link'; var SELECTOR_NAV_LINKS = '.nav-link';
var SELECTOR_NAV_ITEMS = '.nav-item'; var SELECTOR_NAV_ITEMS = '.nav-item';
var SELECTOR_LIST_ITEMS = '.list-group-item'; var SELECTOR_LIST_ITEMS = '.list-group-item';
var SELECTOR_DROPDOWN = '.dropdown'; var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
var METHOD_OFFSET = 'offset'; var METHOD_OFFSET = 'offset';
var METHOD_POSITION = 'position'; var METHOD_POSITION = 'position';
@ -195,29 +62,24 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var ScrollSpy = /*#__PURE__*/function (_BaseComponent) { var ScrollSpy = /*#__PURE__*/function () {
_inheritsLoose(ScrollSpy, _BaseComponent);
function ScrollSpy(element, config) { function ScrollSpy(element, config) {
var _this; var _this = this;
_this = _BaseComponent.call(this, element) || this; this._element = element;
_this._scrollElement = element.tagName === 'BODY' ? window : element; this._scrollElement = element.tagName === 'BODY' ? window : element;
_this._config = _this._getConfig(config); this._config = this._getConfig(config);
_this._selector = _this._config.target + " " + SELECTOR_NAV_LINKS + ", " + _this._config.target + " " + SELECTOR_LIST_ITEMS + ", " + _this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM; this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
_this._offsets = []; this._offsets = [];
_this._targets = []; this._targets = [];
_this._activeTarget = null; this._activeTarget = null;
_this._scrollHeight = 0; this._scrollHeight = 0;
EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function (event) { $__default['default'](this._scrollElement).on(EVENT_SCROLL, function (event) {
return _this._process(event); return _this._process(event);
}); });
this.refresh();
_this.refresh(); this._process();
_this._process();
return _this;
} // Getters } // Getters
@ -233,16 +95,21 @@
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._scrollHeight = this._getScrollHeight(); this._scrollHeight = this._getScrollHeight();
var targets = SelectorEngine__default['default'].find(this._selector); var targets = [].slice.call(document.querySelectorAll(this._selector));
targets.map(function (element) { targets.map(function (element) {
var targetSelector = getSelectorFromElement(element); var target;
var target = targetSelector ? SelectorEngine__default['default'].findOne(targetSelector) : null; var targetSelector = Util__default['default'].getSelectorFromElement(element);
if (targetSelector) {
target = document.querySelector(targetSelector);
}
if (target) { if (target) {
var targetBCR = target.getBoundingClientRect(); var targetBCR = target.getBoundingClientRect();
if (targetBCR.width || targetBCR.height) { if (targetBCR.width || targetBCR.height) {
return [Manipulator__default['default'][offsetMethod](target).top + offsetBase, targetSelector]; // TODO (fat): remove sketch reliance on jQuery position/offset
return [$__default['default'](target)[offsetMethod]().top + offsetBase, targetSelector];
} }
} }
@ -259,9 +126,9 @@
}; };
_proto.dispose = function dispose() { _proto.dispose = function dispose() {
_BaseComponent.prototype.dispose.call(this); $__default['default'].removeData(this._element, DATA_KEY);
$__default['default'](this._scrollElement).off(EVENT_KEY);
EventHandler__default['default'].off(this._scrollElement, EVENT_KEY); this._element = null;
this._scrollElement = null; this._scrollElement = null;
this._config = null; this._config = null;
this._selector = null; this._selector = null;
@ -275,18 +142,18 @@
_proto._getConfig = function _getConfig(config) { _proto._getConfig = function _getConfig(config) {
config = _extends({}, Default, typeof config === 'object' && config ? config : {}); config = _extends({}, Default, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string' && isElement(config.target)) { if (typeof config.target !== 'string' && Util__default['default'].isElement(config.target)) {
var id = config.target.id; var id = $__default['default'](config.target).attr('id');
if (!id) { if (!id) {
id = getUID(NAME); id = Util__default['default'].getUID(NAME);
config.target.id = id; $__default['default'](config.target).attr('id', id);
} }
config.target = "#" + id; config.target = "#" + id;
} }
typeCheckConfig(NAME, config, DefaultType); Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
return config; return config;
}; };
@ -346,39 +213,31 @@
this._clear(); this._clear();
var queries = this._selector.split(',').map(function (selector) { var queries = this._selector.split(',').map(function (selector) {
return selector + "[data-bs-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
}); });
var link = SelectorEngine__default['default'].findOne(queries.join(',')); var $link = $__default['default']([].slice.call(document.querySelectorAll(queries.join(','))));
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine__default['default'].findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE); $link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);
link.classList.add(CLASS_NAME_ACTIVE); $link.addClass(CLASS_NAME_ACTIVE);
} else { } else {
// Set triggered link as active // Set triggered link as active
link.classList.add(CLASS_NAME_ACTIVE); $link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active
SelectorEngine__default['default'].parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) { // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
SelectorEngine__default['default'].prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) {
return item.classList.add(CLASS_NAME_ACTIVE);
}); // Handle special case when .nav-link is inside .nav-item
SelectorEngine__default['default'].prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) { $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item
SelectorEngine__default['default'].children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
return item.classList.add(CLASS_NAME_ACTIVE); $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE);
});
});
});
} }
EventHandler__default['default'].trigger(this._scrollElement, EVENT_ACTIVATE, { $__default['default'](this._scrollElement).trigger(EVENT_ACTIVATE, {
relatedTarget: target relatedTarget: target
}); });
}; };
_proto._clear = function _clear() { _proto._clear = function _clear() {
SelectorEngine__default['default'].find(this._selector).filter(function (node) { [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
return node.classList.contains(CLASS_NAME_ACTIVE); return node.classList.contains(CLASS_NAME_ACTIVE);
}).forEach(function (node) { }).forEach(function (node) {
return node.classList.remove(CLASS_NAME_ACTIVE); return node.classList.remove(CLASS_NAME_ACTIVE);
@ -386,14 +245,15 @@
} // Static } // Static
; ;
ScrollSpy.jQueryInterface = function jQueryInterface(config) { ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () { return this.each(function () {
var data = Data__default['default'].getData(this, DATA_KEY); var data = $__default['default'](this).data(DATA_KEY);
var _config = typeof config === 'object' && config; var _config = typeof config === 'object' && config;
if (!data) { if (!data) {
data = new ScrollSpy(this, _config); data = new ScrollSpy(this, _config);
$__default['default'](this).data(DATA_KEY, data);
} }
if (typeof config === 'string') { if (typeof config === 'string') {
@ -406,20 +266,20 @@
}); });
}; };
_createClass$1(ScrollSpy, null, [{ _createClass(ScrollSpy, null, [{
key: "VERSION",
get: function get() {
return VERSION;
}
}, {
key: "Default", key: "Default",
get: function get() { get: function get() {
return Default; return Default;
} }
}, {
key: "DATA_KEY",
get: function get() {
return DATA_KEY;
}
}]); }]);
return ScrollSpy; return ScrollSpy;
}(BaseComponent); }();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Data Api implementation * Data Api implementation
@ -427,33 +287,29 @@
*/ */
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, function () { $__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
SelectorEngine__default['default'].find(SELECTOR_DATA_SPY).forEach(function (spy) { var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
return new ScrollSpy(spy, Manipulator__default['default'].getDataAttributes(spy)); var scrollSpysLength = scrollSpys.length;
});
for (var i = scrollSpysLength; i--;) {
var $spy = $__default['default'](scrollSpys[i]);
ScrollSpy._jQueryInterface.call($spy, $spy.data());
}
}); });
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* jQuery * jQuery
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* add .ScrollSpy to jQuery only if jQuery is present
*/ */
onDOMContentLoaded(function () { $__default['default'].fn[NAME] = ScrollSpy._jQueryInterface;
var $ = getjQuery(); $__default['default'].fn[NAME].Constructor = ScrollSpy;
/* istanbul ignore if */
if ($) { $__default['default'].fn[NAME].noConflict = function () {
var JQUERY_NO_CONFLICT = $.fn[NAME]; $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
$.fn[NAME] = ScrollSpy.jQueryInterface; return ScrollSpy._jQueryInterface;
$.fn[NAME].Constructor = ScrollSpy; };
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return ScrollSpy.jQueryInterface;
};
}
});
return ScrollSpy; return ScrollSpy;

File diff suppressed because one or more lines are too long

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