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 popover.js v5.1.
|
2
|
+
* Bootstrap popover.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,15 +7,15 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./tooltip.js')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['./tooltip'], factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Tooltip));
|
10
|
-
}(this, (function (Tooltip) { 'use strict';
|
10
|
+
})(this, (function (Tooltip) { 'use strict';
|
11
11
|
|
12
|
-
|
12
|
+
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
13
13
|
|
14
|
-
|
14
|
+
const Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
15
15
|
|
16
16
|
/**
|
17
17
|
* --------------------------------------------------------------------------
|
18
|
-
* Bootstrap (v5.1.
|
18
|
+
* Bootstrap (v5.1.2): util/index.js
|
19
19
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
20
20
|
* --------------------------------------------------------------------------
|
21
21
|
*/
|
@@ -70,7 +70,7 @@
|
|
70
70
|
|
71
71
|
/**
|
72
72
|
* --------------------------------------------------------------------------
|
73
|
-
* Bootstrap (v5.1.
|
73
|
+
* Bootstrap (v5.1.2): popover.js
|
74
74
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
75
75
|
* --------------------------------------------------------------------------
|
76
76
|
*/
|
@@ -84,14 +84,14 @@
|
|
84
84
|
const DATA_KEY = 'bs.popover';
|
85
85
|
const EVENT_KEY = `.${DATA_KEY}`;
|
86
86
|
const CLASS_PREFIX = 'bs-popover';
|
87
|
-
const Default = { ...Tooltip__default
|
87
|
+
const Default = { ...Tooltip__default.default.Default,
|
88
88
|
placement: 'right',
|
89
89
|
offset: [0, 8],
|
90
90
|
trigger: 'click',
|
91
91
|
content: '',
|
92
92
|
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
|
93
93
|
};
|
94
|
-
const DefaultType = { ...Tooltip__default
|
94
|
+
const DefaultType = { ...Tooltip__default.default.DefaultType,
|
95
95
|
content: '(string|element|function)'
|
96
96
|
};
|
97
97
|
const Event = {
|
@@ -114,7 +114,7 @@
|
|
114
114
|
* ------------------------------------------------------------------------
|
115
115
|
*/
|
116
116
|
|
117
|
-
class Popover extends Tooltip__default
|
117
|
+
class Popover extends Tooltip__default.default {
|
118
118
|
// Getters
|
119
119
|
static get Default() {
|
120
120
|
return Default;
|
@@ -180,4 +180,4 @@
|
|
180
180
|
|
181
181
|
return Popover;
|
182
182
|
|
183
|
-
}))
|
183
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap scrollspy.js v5.1.
|
2
|
+
* Bootstrap scrollspy.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,18 +7,18 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
|
10
|
-
}(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
|
10
|
+
})(this, (function (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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
15
|
+
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
16
|
+
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
17
|
+
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
18
18
|
|
19
19
|
/**
|
20
20
|
* --------------------------------------------------------------------------
|
21
|
-
* Bootstrap (v5.1.
|
21
|
+
* Bootstrap (v5.1.2): util/index.js
|
22
22
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
23
23
|
* --------------------------------------------------------------------------
|
24
24
|
*/
|
@@ -152,7 +152,7 @@
|
|
152
152
|
|
153
153
|
/**
|
154
154
|
* --------------------------------------------------------------------------
|
155
|
-
* Bootstrap (v5.1.
|
155
|
+
* Bootstrap (v5.1.2): scrollspy.js
|
156
156
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
157
157
|
* --------------------------------------------------------------------------
|
158
158
|
*/
|
@@ -197,7 +197,7 @@
|
|
197
197
|
* ------------------------------------------------------------------------
|
198
198
|
*/
|
199
199
|
|
200
|
-
class ScrollSpy extends BaseComponent__default
|
200
|
+
class ScrollSpy extends BaseComponent__default.default {
|
201
201
|
constructor(element, config) {
|
202
202
|
super(element);
|
203
203
|
this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
|
@@ -206,7 +206,7 @@
|
|
206
206
|
this._targets = [];
|
207
207
|
this._activeTarget = null;
|
208
208
|
this._scrollHeight = 0;
|
209
|
-
EventHandler__default
|
209
|
+
EventHandler__default.default.on(this._scrollElement, EVENT_SCROLL, () => this._process());
|
210
210
|
this.refresh();
|
211
211
|
|
212
212
|
this._process();
|
@@ -229,16 +229,16 @@
|
|
229
229
|
this._offsets = [];
|
230
230
|
this._targets = [];
|
231
231
|
this._scrollHeight = this._getScrollHeight();
|
232
|
-
const targets = SelectorEngine__default
|
232
|
+
const targets = SelectorEngine__default.default.find(SELECTOR_LINK_ITEMS, this._config.target);
|
233
233
|
targets.map(element => {
|
234
234
|
const targetSelector = getSelectorFromElement(element);
|
235
|
-
const target = targetSelector ? SelectorEngine__default
|
235
|
+
const target = targetSelector ? SelectorEngine__default.default.findOne(targetSelector) : null;
|
236
236
|
|
237
237
|
if (target) {
|
238
238
|
const targetBCR = target.getBoundingClientRect();
|
239
239
|
|
240
240
|
if (targetBCR.width || targetBCR.height) {
|
241
|
-
return [Manipulator__default
|
241
|
+
return [Manipulator__default.default[offsetMethod](target).top + offsetBase, targetSelector];
|
242
242
|
}
|
243
243
|
}
|
244
244
|
|
@@ -251,14 +251,14 @@
|
|
251
251
|
}
|
252
252
|
|
253
253
|
dispose() {
|
254
|
-
EventHandler__default
|
254
|
+
EventHandler__default.default.off(this._scrollElement, EVENT_KEY);
|
255
255
|
super.dispose();
|
256
256
|
} // Private
|
257
257
|
|
258
258
|
|
259
259
|
_getConfig(config) {
|
260
260
|
config = { ...Default,
|
261
|
-
...Manipulator__default
|
261
|
+
...Manipulator__default.default.getDataAttributes(this._element),
|
262
262
|
...(typeof config === 'object' && config ? config : {})
|
263
263
|
};
|
264
264
|
config.target = getElement(config.target) || document.documentElement;
|
@@ -322,30 +322,30 @@
|
|
322
322
|
this._clear();
|
323
323
|
|
324
324
|
const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
|
325
|
-
const link = SelectorEngine__default
|
325
|
+
const link = SelectorEngine__default.default.findOne(queries.join(','), this._config.target);
|
326
326
|
link.classList.add(CLASS_NAME_ACTIVE);
|
327
327
|
|
328
328
|
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
|
329
|
-
SelectorEngine__default
|
329
|
+
SelectorEngine__default.default.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
|
330
330
|
} else {
|
331
|
-
SelectorEngine__default
|
331
|
+
SelectorEngine__default.default.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(listGroup => {
|
332
332
|
// Set triggered links parents as active
|
333
333
|
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
334
|
-
SelectorEngine__default
|
334
|
+
SelectorEngine__default.default.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE)); // Handle special case when .nav-link is inside .nav-item
|
335
335
|
|
336
|
-
SelectorEngine__default
|
337
|
-
SelectorEngine__default
|
336
|
+
SelectorEngine__default.default.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {
|
337
|
+
SelectorEngine__default.default.children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE));
|
338
338
|
});
|
339
339
|
});
|
340
340
|
}
|
341
341
|
|
342
|
-
EventHandler__default
|
342
|
+
EventHandler__default.default.trigger(this._scrollElement, EVENT_ACTIVATE, {
|
343
343
|
relatedTarget: target
|
344
344
|
});
|
345
345
|
}
|
346
346
|
|
347
347
|
_clear() {
|
348
|
-
SelectorEngine__default
|
348
|
+
SelectorEngine__default.default.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE));
|
349
349
|
} // Static
|
350
350
|
|
351
351
|
|
@@ -373,8 +373,8 @@
|
|
373
373
|
*/
|
374
374
|
|
375
375
|
|
376
|
-
EventHandler__default
|
377
|
-
SelectorEngine__default
|
376
|
+
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => {
|
377
|
+
SelectorEngine__default.default.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
|
378
378
|
});
|
379
379
|
/**
|
380
380
|
* ------------------------------------------------------------------------
|
@@ -387,4 +387,4 @@
|
|
387
387
|
|
388
388
|
return ScrollSpy;
|
389
389
|
|
390
|
-
}))
|
390
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tab.js v5.1.
|
2
|
+
* Bootstrap tab.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,17 +7,17 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/selector-engine', './base-component'], factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.EventHandler, global.SelectorEngine, global.Base));
|
10
|
-
}(this, (function (EventHandler, SelectorEngine, BaseComponent) { 'use strict';
|
10
|
+
})(this, (function (EventHandler, SelectorEngine, BaseComponent) { 'use strict';
|
11
11
|
|
12
|
-
|
12
|
+
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
15
|
+
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
16
|
+
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.1.
|
20
|
+
* Bootstrap (v5.1.2): util/index.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -131,7 +131,7 @@
|
|
131
131
|
|
132
132
|
/**
|
133
133
|
* --------------------------------------------------------------------------
|
134
|
-
* Bootstrap (v5.1.
|
134
|
+
* Bootstrap (v5.1.2): tab.js
|
135
135
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
136
136
|
* --------------------------------------------------------------------------
|
137
137
|
*/
|
@@ -167,7 +167,7 @@
|
|
167
167
|
* ------------------------------------------------------------------------
|
168
168
|
*/
|
169
169
|
|
170
|
-
class Tab extends BaseComponent__default
|
170
|
+
class Tab extends BaseComponent__default.default {
|
171
171
|
// Getters
|
172
172
|
static get NAME() {
|
173
173
|
return NAME;
|
@@ -186,14 +186,14 @@
|
|
186
186
|
|
187
187
|
if (listElement) {
|
188
188
|
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
|
189
|
-
previous = SelectorEngine__default
|
189
|
+
previous = SelectorEngine__default.default.find(itemSelector, listElement);
|
190
190
|
previous = previous[previous.length - 1];
|
191
191
|
}
|
192
192
|
|
193
|
-
const hideEvent = previous ? EventHandler__default
|
193
|
+
const hideEvent = previous ? EventHandler__default.default.trigger(previous, EVENT_HIDE, {
|
194
194
|
relatedTarget: this._element
|
195
195
|
}) : null;
|
196
|
-
const showEvent = EventHandler__default
|
196
|
+
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, {
|
197
197
|
relatedTarget: previous
|
198
198
|
});
|
199
199
|
|
@@ -204,10 +204,10 @@
|
|
204
204
|
this._activate(this._element, listElement);
|
205
205
|
|
206
206
|
const complete = () => {
|
207
|
-
EventHandler__default
|
207
|
+
EventHandler__default.default.trigger(previous, EVENT_HIDDEN, {
|
208
208
|
relatedTarget: this._element
|
209
209
|
});
|
210
|
-
EventHandler__default
|
210
|
+
EventHandler__default.default.trigger(this._element, EVENT_SHOWN, {
|
211
211
|
relatedTarget: previous
|
212
212
|
});
|
213
213
|
};
|
@@ -221,7 +221,7 @@
|
|
221
221
|
|
222
222
|
|
223
223
|
_activate(element, container, callback) {
|
224
|
-
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine__default
|
224
|
+
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine__default.default.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine__default.default.children(container, SELECTOR_ACTIVE);
|
225
225
|
const active = activeElements[0];
|
226
226
|
const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE);
|
227
227
|
|
@@ -239,7 +239,7 @@
|
|
239
239
|
_transitionComplete(element, active, callback) {
|
240
240
|
if (active) {
|
241
241
|
active.classList.remove(CLASS_NAME_ACTIVE);
|
242
|
-
const dropdownChild = SelectorEngine__default
|
242
|
+
const dropdownChild = SelectorEngine__default.default.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
|
243
243
|
|
244
244
|
if (dropdownChild) {
|
245
245
|
dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
|
@@ -272,7 +272,7 @@
|
|
272
272
|
const dropdownElement = element.closest(SELECTOR_DROPDOWN);
|
273
273
|
|
274
274
|
if (dropdownElement) {
|
275
|
-
SelectorEngine__default
|
275
|
+
SelectorEngine__default.default.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
|
276
276
|
}
|
277
277
|
|
278
278
|
element.setAttribute('aria-expanded', true);
|
@@ -306,7 +306,7 @@
|
|
306
306
|
*/
|
307
307
|
|
308
308
|
|
309
|
-
EventHandler__default
|
309
|
+
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
310
310
|
if (['A', 'AREA'].includes(this.tagName)) {
|
311
311
|
event.preventDefault();
|
312
312
|
}
|
@@ -329,4 +329,4 @@
|
|
329
329
|
|
330
330
|
return Tab;
|
331
331
|
|
332
|
-
}))
|
332
|
+
}));
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap toast.js v5.1.
|
2
|
+
* Bootstrap toast.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,17 +7,17 @@
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './base-component'], factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.EventHandler, global.Manipulator, global.Base));
|
10
|
-
}(this, (function (EventHandler, Manipulator, BaseComponent) { 'use strict';
|
10
|
+
})(this, (function (EventHandler, Manipulator, BaseComponent) { 'use strict';
|
11
11
|
|
12
|
-
|
12
|
+
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
15
|
+
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
16
|
+
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.1.
|
20
|
+
* Bootstrap (v5.1.2): util/index.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -163,7 +163,7 @@
|
|
163
163
|
|
164
164
|
/**
|
165
165
|
* --------------------------------------------------------------------------
|
166
|
-
* Bootstrap (v5.1.
|
166
|
+
* Bootstrap (v5.1.2): util/component-functions.js
|
167
167
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
168
168
|
* --------------------------------------------------------------------------
|
169
169
|
*/
|
@@ -171,7 +171,7 @@
|
|
171
171
|
const enableDismissTrigger = (component, method = 'hide') => {
|
172
172
|
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
|
173
173
|
const name = component.NAME;
|
174
|
-
EventHandler__default
|
174
|
+
EventHandler__default.default.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
|
175
175
|
if (['A', 'AREA'].includes(this.tagName)) {
|
176
176
|
event.preventDefault();
|
177
177
|
}
|
@@ -189,7 +189,7 @@
|
|
189
189
|
|
190
190
|
/**
|
191
191
|
* --------------------------------------------------------------------------
|
192
|
-
* Bootstrap (v5.1.
|
192
|
+
* Bootstrap (v5.1.2): toast.js
|
193
193
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
194
194
|
* --------------------------------------------------------------------------
|
195
195
|
*/
|
@@ -231,7 +231,7 @@
|
|
231
231
|
* ------------------------------------------------------------------------
|
232
232
|
*/
|
233
233
|
|
234
|
-
class Toast extends BaseComponent__default
|
234
|
+
class Toast extends BaseComponent__default.default {
|
235
235
|
constructor(element, config) {
|
236
236
|
super(element);
|
237
237
|
this._config = this._getConfig(config);
|
@@ -257,7 +257,7 @@
|
|
257
257
|
|
258
258
|
|
259
259
|
show() {
|
260
|
-
const showEvent = EventHandler__default
|
260
|
+
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW);
|
261
261
|
|
262
262
|
if (showEvent.defaultPrevented) {
|
263
263
|
return;
|
@@ -272,7 +272,7 @@
|
|
272
272
|
const complete = () => {
|
273
273
|
this._element.classList.remove(CLASS_NAME_SHOWING);
|
274
274
|
|
275
|
-
EventHandler__default
|
275
|
+
EventHandler__default.default.trigger(this._element, EVENT_SHOWN);
|
276
276
|
|
277
277
|
this._maybeScheduleHide();
|
278
278
|
};
|
@@ -294,7 +294,7 @@
|
|
294
294
|
return;
|
295
295
|
}
|
296
296
|
|
297
|
-
const hideEvent = EventHandler__default
|
297
|
+
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
|
298
298
|
|
299
299
|
if (hideEvent.defaultPrevented) {
|
300
300
|
return;
|
@@ -308,7 +308,7 @@
|
|
308
308
|
|
309
309
|
this._element.classList.remove(CLASS_NAME_SHOW);
|
310
310
|
|
311
|
-
EventHandler__default
|
311
|
+
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
|
312
312
|
};
|
313
313
|
|
314
314
|
this._element.classList.add(CLASS_NAME_SHOWING);
|
@@ -329,7 +329,7 @@
|
|
329
329
|
|
330
330
|
_getConfig(config) {
|
331
331
|
config = { ...Default,
|
332
|
-
...Manipulator__default
|
332
|
+
...Manipulator__default.default.getDataAttributes(this._element),
|
333
333
|
...(typeof config === 'object' && config ? config : {})
|
334
334
|
};
|
335
335
|
typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
@@ -379,10 +379,10 @@
|
|
379
379
|
}
|
380
380
|
|
381
381
|
_setListeners() {
|
382
|
-
EventHandler__default
|
383
|
-
EventHandler__default
|
384
|
-
EventHandler__default
|
385
|
-
EventHandler__default
|
382
|
+
EventHandler__default.default.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
|
383
|
+
EventHandler__default.default.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
|
384
|
+
EventHandler__default.default.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
|
385
|
+
EventHandler__default.default.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
|
386
386
|
}
|
387
387
|
|
388
388
|
_clearTimeout() {
|
@@ -419,4 +419,4 @@
|
|
419
419
|
|
420
420
|
return Toast;
|
421
421
|
|
422
|
-
}))
|
422
|
+
}));
|