bootstrap 5.1.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +13 -13
- data/assets/javascripts/bootstrap/base-component.js +13 -13
- data/assets/javascripts/bootstrap/button.js +10 -10
- data/assets/javascripts/bootstrap/carousel.js +39 -39
- data/assets/javascripts/bootstrap/collapse.js +28 -27
- data/assets/javascripts/bootstrap/dom/data.js +5 -5
- data/assets/javascripts/bootstrap/dom/event-handler.js +5 -5
- data/assets/javascripts/bootstrap/dom/manipulator.js +4 -4
- data/assets/javascripts/bootstrap/dom/selector-engine.js +5 -5
- data/assets/javascripts/bootstrap/dropdown.js +37 -39
- data/assets/javascripts/bootstrap/modal.js +51 -51
- data/assets/javascripts/bootstrap/offcanvas.js +40 -40
- data/assets/javascripts/bootstrap/popover.js +10 -10
- data/assets/javascripts/bootstrap/scrollspy.js +27 -27
- data/assets/javascripts/bootstrap/tab.js +19 -19
- data/assets/javascripts/bootstrap/toast.js +21 -21
- data/assets/javascripts/bootstrap/tooltip.js +55 -58
- data/assets/javascripts/bootstrap-sprockets.js +7 -7
- data/assets/javascripts/bootstrap.js +64 -66
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/stylesheets/_bootstrap-grid.scss +1 -1
- data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
- data/assets/stylesheets/_bootstrap.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +1 -0
- data/assets/stylesheets/bootstrap/_tables.scss +8 -4
- data/assets/stylesheets/bootstrap/_variables.scss +6 -4
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +4 -3
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +1 -1
- data/lib/bootstrap/version.rb +2 -2
- metadata +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap data.js v5.1.
|
2
|
+
* Bootstrap data.js v5.1.2 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -7,11 +7,11 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8
8
|
typeof define === 'function' && define.amd ? define(factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());
|
10
|
-
}(this, (function () { 'use strict';
|
10
|
+
})(this, (function () { 'use strict';
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.1.
|
14
|
+
* Bootstrap (v5.1.2): dom/data.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -22,7 +22,7 @@
|
|
22
22
|
* ------------------------------------------------------------------------
|
23
23
|
*/
|
24
24
|
const elementMap = new Map();
|
25
|
-
|
25
|
+
const data = {
|
26
26
|
set(element, key, instance) {
|
27
27
|
if (!elementMap.has(element)) {
|
28
28
|
elementMap.set(element, new Map());
|
@@ -65,4 +65,4 @@
|
|
65
65
|
|
66
66
|
return data;
|
67
67
|
|
68
|
-
}))
|
68
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap event-handler.js v5.1.
|
2
|
+
* Bootstrap event-handler.js v5.1.2 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -7,11 +7,11 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8
8
|
typeof define === 'function' && define.amd ? define(factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
|
10
|
-
}(this, (function () { 'use strict';
|
10
|
+
})(this, (function () { 'use strict';
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.1.
|
14
|
+
* Bootstrap (v5.1.2): util/index.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
/**
|
32
32
|
* --------------------------------------------------------------------------
|
33
|
-
* Bootstrap (v5.1.
|
33
|
+
* Bootstrap (v5.1.2): dom/event-handler.js
|
34
34
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
35
35
|
* --------------------------------------------------------------------------
|
36
36
|
*/
|
@@ -318,4 +318,4 @@
|
|
318
318
|
|
319
319
|
return EventHandler;
|
320
320
|
|
321
|
-
}))
|
321
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap manipulator.js v5.1.
|
2
|
+
* Bootstrap manipulator.js v5.1.2 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -7,11 +7,11 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8
8
|
typeof define === 'function' && define.amd ? define(factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());
|
10
|
-
}(this, (function () { 'use strict';
|
10
|
+
})(this, (function () { 'use strict';
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.1.
|
14
|
+
* Bootstrap (v5.1.2): dom/manipulator.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -85,4 +85,4 @@
|
|
85
85
|
|
86
86
|
return Manipulator;
|
87
87
|
|
88
|
-
}))
|
88
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap selector-engine.js v5.1.
|
2
|
+
* Bootstrap selector-engine.js v5.1.2 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -7,11 +7,11 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8
8
|
typeof define === 'function' && define.amd ? define(factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory());
|
10
|
-
}(this, (function () { 'use strict';
|
10
|
+
})(this, (function () { 'use strict';
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.1.
|
14
|
+
* Bootstrap (v5.1.2): util/index.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
/**
|
56
56
|
* --------------------------------------------------------------------------
|
57
|
-
* Bootstrap (v5.1.
|
57
|
+
* Bootstrap (v5.1.2): dom/selector-engine.js
|
58
58
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
59
59
|
* --------------------------------------------------------------------------
|
60
60
|
*/
|
@@ -124,4 +124,4 @@
|
|
124
124
|
|
125
125
|
return SelectorEngine;
|
126
126
|
|
127
|
-
}))
|
127
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap dropdown.js v5.1.
|
2
|
+
* Bootstrap dropdown.js v5.1.2 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -7,39 +7,37 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
|
10
|
-
}(this, (function (Popper, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
|
10
|
+
})(this, (function (Popper, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
|
11
11
|
|
12
|
-
|
12
|
+
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
13
13
|
|
14
14
|
function _interopNamespace(e) {
|
15
15
|
if (e && e.__esModule) return e;
|
16
|
-
|
16
|
+
const n = Object.create(null);
|
17
17
|
if (e) {
|
18
|
-
|
18
|
+
for (const k in e) {
|
19
19
|
if (k !== 'default') {
|
20
|
-
|
20
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
21
21
|
Object.defineProperty(n, k, d.get ? d : {
|
22
22
|
enumerable: true,
|
23
|
-
get:
|
24
|
-
return e[k];
|
25
|
-
}
|
23
|
+
get: () => e[k]
|
26
24
|
});
|
27
25
|
}
|
28
|
-
}
|
26
|
+
}
|
29
27
|
}
|
30
|
-
n
|
28
|
+
n.default = e;
|
31
29
|
return Object.freeze(n);
|
32
30
|
}
|
33
31
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
const Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
|
33
|
+
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
34
|
+
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
35
|
+
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
36
|
+
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
39
37
|
|
40
38
|
/**
|
41
39
|
* --------------------------------------------------------------------------
|
42
|
-
* Bootstrap (v5.1.
|
40
|
+
* Bootstrap (v5.1.2): util/index.js
|
43
41
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
44
42
|
* --------------------------------------------------------------------------
|
45
43
|
*/
|
@@ -223,7 +221,7 @@
|
|
223
221
|
|
224
222
|
/**
|
225
223
|
* --------------------------------------------------------------------------
|
226
|
-
* Bootstrap (v5.1.
|
224
|
+
* Bootstrap (v5.1.2): dropdown.js
|
227
225
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
228
226
|
* --------------------------------------------------------------------------
|
229
227
|
*/
|
@@ -289,7 +287,7 @@
|
|
289
287
|
* ------------------------------------------------------------------------
|
290
288
|
*/
|
291
289
|
|
292
|
-
class Dropdown extends BaseComponent__default
|
290
|
+
class Dropdown extends BaseComponent__default.default {
|
293
291
|
constructor(element, config) {
|
294
292
|
super(element);
|
295
293
|
this._popper = null;
|
@@ -324,7 +322,7 @@
|
|
324
322
|
const relatedTarget = {
|
325
323
|
relatedTarget: this._element
|
326
324
|
};
|
327
|
-
const showEvent = EventHandler__default
|
325
|
+
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, relatedTarget);
|
328
326
|
|
329
327
|
if (showEvent.defaultPrevented) {
|
330
328
|
return;
|
@@ -333,7 +331,7 @@
|
|
333
331
|
const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
|
334
332
|
|
335
333
|
if (this._inNavbar) {
|
336
|
-
Manipulator__default
|
334
|
+
Manipulator__default.default.setDataAttribute(this._menu, 'popper', 'none');
|
337
335
|
} else {
|
338
336
|
this._createPopper(parent);
|
339
337
|
} // If this is a touch-enabled device we add extra
|
@@ -343,7 +341,7 @@
|
|
343
341
|
|
344
342
|
|
345
343
|
if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
|
346
|
-
[].concat(...document.body.children).forEach(elem => EventHandler__default
|
344
|
+
[].concat(...document.body.children).forEach(elem => EventHandler__default.default.on(elem, 'mouseover', noop));
|
347
345
|
}
|
348
346
|
|
349
347
|
this._element.focus();
|
@@ -354,7 +352,7 @@
|
|
354
352
|
|
355
353
|
this._element.classList.add(CLASS_NAME_SHOW);
|
356
354
|
|
357
|
-
EventHandler__default
|
355
|
+
EventHandler__default.default.trigger(this._element, EVENT_SHOWN, relatedTarget);
|
358
356
|
}
|
359
357
|
|
360
358
|
hide() {
|
@@ -387,7 +385,7 @@
|
|
387
385
|
|
388
386
|
|
389
387
|
_completeHide(relatedTarget) {
|
390
|
-
const hideEvent = EventHandler__default
|
388
|
+
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE, relatedTarget);
|
391
389
|
|
392
390
|
if (hideEvent.defaultPrevented) {
|
393
391
|
return;
|
@@ -396,7 +394,7 @@
|
|
396
394
|
|
397
395
|
|
398
396
|
if ('ontouchstart' in document.documentElement) {
|
399
|
-
[].concat(...document.body.children).forEach(elem => EventHandler__default
|
397
|
+
[].concat(...document.body.children).forEach(elem => EventHandler__default.default.off(elem, 'mouseover', noop));
|
400
398
|
}
|
401
399
|
|
402
400
|
if (this._popper) {
|
@@ -409,13 +407,13 @@
|
|
409
407
|
|
410
408
|
this._element.setAttribute('aria-expanded', 'false');
|
411
409
|
|
412
|
-
Manipulator__default
|
413
|
-
EventHandler__default
|
410
|
+
Manipulator__default.default.removeDataAttribute(this._menu, 'popper');
|
411
|
+
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN, relatedTarget);
|
414
412
|
}
|
415
413
|
|
416
414
|
_getConfig(config) {
|
417
415
|
config = { ...this.constructor.Default,
|
418
|
-
...Manipulator__default
|
416
|
+
...Manipulator__default.default.getDataAttributes(this._element),
|
419
417
|
...config
|
420
418
|
};
|
421
419
|
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
@@ -449,7 +447,7 @@
|
|
449
447
|
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
|
450
448
|
|
451
449
|
if (isDisplayStatic) {
|
452
|
-
Manipulator__default
|
450
|
+
Manipulator__default.default.setDataAttribute(this._menu, 'popper', 'static');
|
453
451
|
}
|
454
452
|
}
|
455
453
|
|
@@ -458,7 +456,7 @@
|
|
458
456
|
}
|
459
457
|
|
460
458
|
_getMenuElement() {
|
461
|
-
return SelectorEngine__default
|
459
|
+
return SelectorEngine__default.default.next(this._element, SELECTOR_MENU)[0];
|
462
460
|
}
|
463
461
|
|
464
462
|
_getPlacement() {
|
@@ -534,7 +532,7 @@
|
|
534
532
|
key,
|
535
533
|
target
|
536
534
|
}) {
|
537
|
-
const items = SelectorEngine__default
|
535
|
+
const items = SelectorEngine__default.default.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
|
538
536
|
|
539
537
|
if (!items.length) {
|
540
538
|
return;
|
@@ -567,7 +565,7 @@
|
|
567
565
|
return;
|
568
566
|
}
|
569
567
|
|
570
|
-
const toggles = SelectorEngine__default
|
568
|
+
const toggles = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE);
|
571
569
|
|
572
570
|
for (let i = 0, len = toggles.length; i < len; i++) {
|
573
571
|
const context = Dropdown.getInstance(toggles[i]);
|
@@ -635,7 +633,7 @@
|
|
635
633
|
return;
|
636
634
|
}
|
637
635
|
|
638
|
-
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default
|
636
|
+
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default.default.prev(this, SELECTOR_DATA_TOGGLE)[0];
|
639
637
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
640
638
|
|
641
639
|
if (event.key === ESCAPE_KEY) {
|
@@ -666,11 +664,11 @@
|
|
666
664
|
*/
|
667
665
|
|
668
666
|
|
669
|
-
EventHandler__default
|
670
|
-
EventHandler__default
|
671
|
-
EventHandler__default
|
672
|
-
EventHandler__default
|
673
|
-
EventHandler__default
|
667
|
+
EventHandler__default.default.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
|
668
|
+
EventHandler__default.default.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
|
669
|
+
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
|
670
|
+
EventHandler__default.default.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
|
671
|
+
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
674
672
|
event.preventDefault();
|
675
673
|
Dropdown.getOrCreateInstance(this).toggle();
|
676
674
|
});
|
@@ -685,4 +683,4 @@
|
|
685
683
|
|
686
684
|
return Dropdown;
|
687
685
|
|
688
|
-
}))
|
686
|
+
}));
|