bootstrap 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +8 -8
- data/assets/javascripts/bootstrap.js +329 -377
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/javascripts/bootstrap/alert.js +13 -73
- data/assets/javascripts/bootstrap/base-component.js +115 -10
- data/assets/javascripts/bootstrap/button.js +11 -17
- data/assets/javascripts/bootstrap/carousel.js +35 -85
- data/assets/javascripts/bootstrap/collapse.js +34 -82
- data/assets/javascripts/bootstrap/dom/data.js +2 -2
- data/assets/javascripts/bootstrap/dom/event-handler.js +2 -9
- data/assets/javascripts/bootstrap/dom/manipulator.js +2 -2
- data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -2
- data/assets/javascripts/bootstrap/dropdown.js +41 -38
- data/assets/javascripts/bootstrap/modal.js +31 -43
- data/assets/javascripts/bootstrap/offcanvas.js +25 -25
- data/assets/javascripts/bootstrap/popover.js +11 -25
- data/assets/javascripts/bootstrap/scrollspy.js +26 -21
- data/assets/javascripts/bootstrap/tab.js +14 -68
- data/assets/javascripts/bootstrap/toast.js +69 -77
- data/assets/javascripts/bootstrap/tooltip.js +71 -135
- 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/_list-group.scss +5 -5
- data/assets/stylesheets/bootstrap/_modal.scss +2 -11
- data/assets/stylesheets/bootstrap/_tables.scss +1 -0
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +5 -5
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -1
- data/lib/bootstrap/version.rb +2 -2
- metadata +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap offcanvas.js v5.0.
|
2
|
+
* Bootstrap offcanvas.js v5.0.1 (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
|
*/
|
@@ -17,12 +17,6 @@
|
|
17
17
|
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
18
18
|
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
19
19
|
|
20
|
-
/**
|
21
|
-
* --------------------------------------------------------------------------
|
22
|
-
* Bootstrap (v5.0.0): util/index.js
|
23
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
24
|
-
* --------------------------------------------------------------------------
|
25
|
-
*/
|
26
20
|
const MILLISECONDS_MULTIPLIER = 1000;
|
27
21
|
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
28
22
|
|
@@ -90,7 +84,17 @@
|
|
90
84
|
element.dispatchEvent(new Event(TRANSITION_END));
|
91
85
|
};
|
92
86
|
|
93
|
-
const isElement = obj =>
|
87
|
+
const isElement = obj => {
|
88
|
+
if (!obj || typeof obj !== 'object') {
|
89
|
+
return false;
|
90
|
+
}
|
91
|
+
|
92
|
+
if (typeof obj.jquery !== 'undefined') {
|
93
|
+
obj = obj[0];
|
94
|
+
}
|
95
|
+
|
96
|
+
return typeof obj.nodeType !== 'undefined';
|
97
|
+
};
|
94
98
|
|
95
99
|
const emulateTransitionEnd = (element, duration) => {
|
96
100
|
let called = false;
|
@@ -174,12 +178,13 @@
|
|
174
178
|
}
|
175
179
|
};
|
176
180
|
|
177
|
-
const defineJQueryPlugin =
|
181
|
+
const defineJQueryPlugin = plugin => {
|
178
182
|
onDOMContentLoaded(() => {
|
179
183
|
const $ = getjQuery();
|
180
184
|
/* istanbul ignore if */
|
181
185
|
|
182
186
|
if ($) {
|
187
|
+
const name = plugin.NAME;
|
183
188
|
const JQUERY_NO_CONFLICT = $.fn[name];
|
184
189
|
$.fn[name] = plugin.jQueryInterface;
|
185
190
|
$.fn[name].Constructor = plugin;
|
@@ -200,7 +205,7 @@
|
|
200
205
|
|
201
206
|
/**
|
202
207
|
* --------------------------------------------------------------------------
|
203
|
-
* Bootstrap (v5.0.
|
208
|
+
* Bootstrap (v5.0.1): util/scrollBar.js
|
204
209
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
205
210
|
* --------------------------------------------------------------------------
|
206
211
|
*/
|
@@ -274,7 +279,7 @@
|
|
274
279
|
|
275
280
|
/**
|
276
281
|
* --------------------------------------------------------------------------
|
277
|
-
* Bootstrap (v5.0.
|
282
|
+
* Bootstrap (v5.0.1): util/backdrop.js
|
278
283
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
279
284
|
* --------------------------------------------------------------------------
|
280
285
|
*/
|
@@ -358,6 +363,7 @@
|
|
358
363
|
config = { ...Default$1,
|
359
364
|
...(typeof config === 'object' ? config : {})
|
360
365
|
};
|
366
|
+
config.rootElement = config.rootElement || document.body;
|
361
367
|
typeCheckConfig(NAME$1, config, DefaultType$1);
|
362
368
|
return config;
|
363
369
|
}
|
@@ -402,7 +408,7 @@
|
|
402
408
|
|
403
409
|
/**
|
404
410
|
* --------------------------------------------------------------------------
|
405
|
-
* Bootstrap (v5.0.
|
411
|
+
* Bootstrap (v5.0.1): offcanvas.js
|
406
412
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
407
413
|
* --------------------------------------------------------------------------
|
408
414
|
*/
|
@@ -457,12 +463,12 @@
|
|
457
463
|
} // Getters
|
458
464
|
|
459
465
|
|
460
|
-
static get
|
461
|
-
return
|
466
|
+
static get NAME() {
|
467
|
+
return NAME;
|
462
468
|
}
|
463
469
|
|
464
|
-
static get
|
465
|
-
return
|
470
|
+
static get Default() {
|
471
|
+
return Default;
|
466
472
|
} // Public
|
467
473
|
|
468
474
|
|
@@ -508,9 +514,7 @@
|
|
508
514
|
});
|
509
515
|
};
|
510
516
|
|
511
|
-
|
512
|
-
EventHandler__default['default'].one(this._element, 'transitionend', completeCallBack);
|
513
|
-
emulateTransitionEnd(this._element, transitionDuration);
|
517
|
+
this._queueCallback(completeCallBack, this._element, true);
|
514
518
|
}
|
515
519
|
|
516
520
|
hide() {
|
@@ -550,9 +554,7 @@
|
|
550
554
|
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
|
551
555
|
};
|
552
556
|
|
553
|
-
|
554
|
-
EventHandler__default['default'].one(this._element, 'transitionend', completeCallback);
|
555
|
-
emulateTransitionEnd(this._element, transitionDuration);
|
557
|
+
this._queueCallback(completeCallback, this._element, true);
|
556
558
|
}
|
557
559
|
|
558
560
|
dispose() {
|
@@ -560,8 +562,6 @@
|
|
560
562
|
|
561
563
|
super.dispose();
|
562
564
|
EventHandler__default['default'].off(document, EVENT_FOCUSIN);
|
563
|
-
this._config = null;
|
564
|
-
this._backdrop = null;
|
565
565
|
} // Private
|
566
566
|
|
567
567
|
|
@@ -664,7 +664,7 @@
|
|
664
664
|
* ------------------------------------------------------------------------
|
665
665
|
*/
|
666
666
|
|
667
|
-
defineJQueryPlugin(
|
667
|
+
defineJQueryPlugin(Offcanvas);
|
668
668
|
|
669
669
|
return Offcanvas;
|
670
670
|
|
@@ -1,27 +1,20 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap popover.js v5.0.
|
2
|
+
* Bootstrap popover.js v5.0.1 (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
|
*/
|
6
6
|
(function (global, factory) {
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/
|
8
|
-
typeof define === 'function' && define.amd ? define(['./dom/
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.
|
10
|
-
}(this, (function (
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./tooltip.js')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './tooltip'], factory) :
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Data, global.Tooltip));
|
10
|
+
}(this, (function (SelectorEngine, Data, Tooltip) { 'use strict';
|
11
11
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
13
13
|
|
14
|
-
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
15
14
|
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
15
|
+
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
16
16
|
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
17
17
|
|
18
|
-
/**
|
19
|
-
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.0.0): util/index.js
|
21
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
|
-
* --------------------------------------------------------------------------
|
23
|
-
*/
|
24
|
-
|
25
18
|
const getjQuery = () => {
|
26
19
|
const {
|
27
20
|
jQuery
|
@@ -42,12 +35,13 @@
|
|
42
35
|
}
|
43
36
|
};
|
44
37
|
|
45
|
-
const defineJQueryPlugin =
|
38
|
+
const defineJQueryPlugin = plugin => {
|
46
39
|
onDOMContentLoaded(() => {
|
47
40
|
const $ = getjQuery();
|
48
41
|
/* istanbul ignore if */
|
49
42
|
|
50
43
|
if ($) {
|
44
|
+
const name = plugin.NAME;
|
51
45
|
const JQUERY_NO_CONFLICT = $.fn[name];
|
52
46
|
$.fn[name] = plugin.jQueryInterface;
|
53
47
|
$.fn[name].Constructor = plugin;
|
@@ -62,7 +56,7 @@
|
|
62
56
|
|
63
57
|
/**
|
64
58
|
* --------------------------------------------------------------------------
|
65
|
-
* Bootstrap (v5.0.
|
59
|
+
* Bootstrap (v5.0.1): popover.js
|
66
60
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
67
61
|
* --------------------------------------------------------------------------
|
68
62
|
*/
|
@@ -119,18 +113,10 @@
|
|
119
113
|
return NAME;
|
120
114
|
}
|
121
115
|
|
122
|
-
static get DATA_KEY() {
|
123
|
-
return DATA_KEY;
|
124
|
-
}
|
125
|
-
|
126
116
|
static get Event() {
|
127
117
|
return Event;
|
128
118
|
}
|
129
119
|
|
130
|
-
static get EVENT_KEY() {
|
131
|
-
return EVENT_KEY;
|
132
|
-
}
|
133
|
-
|
134
120
|
static get DefaultType() {
|
135
121
|
return DefaultType;
|
136
122
|
} // Overrides
|
@@ -161,7 +147,7 @@
|
|
161
147
|
}
|
162
148
|
|
163
149
|
_getContent() {
|
164
|
-
return this._element.getAttribute('data-bs-content') || this.
|
150
|
+
return this._element.getAttribute('data-bs-content') || this._config.content;
|
165
151
|
}
|
166
152
|
|
167
153
|
_cleanTipClass() {
|
@@ -208,7 +194,7 @@
|
|
208
194
|
*/
|
209
195
|
|
210
196
|
|
211
|
-
defineJQueryPlugin(
|
197
|
+
defineJQueryPlugin(Popover);
|
212
198
|
|
213
199
|
return Popover;
|
214
200
|
|
@@ -1,27 +1,28 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap scrollspy.js v5.0.
|
2
|
+
* Bootstrap scrollspy.js v5.0.1 (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
|
*/
|
6
6
|
(function (global, factory) {
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/
|
8
|
-
typeof define === 'function' && define.amd ? define(['./dom/
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.
|
10
|
-
}(this, (function (EventHandler, Manipulator,
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
|
10
|
+
}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
|
11
11
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
13
13
|
|
14
|
+
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
14
15
|
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
15
16
|
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
|
16
|
-
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
17
17
|
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
18
18
|
|
19
19
|
/**
|
20
20
|
* --------------------------------------------------------------------------
|
21
|
-
* Bootstrap (v5.0.
|
21
|
+
* Bootstrap (v5.0.1): util/index.js
|
22
22
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
23
23
|
* --------------------------------------------------------------------------
|
24
24
|
*/
|
25
|
+
|
25
26
|
const MAX_UID = 1000000;
|
26
27
|
|
27
28
|
const toType = obj => {
|
@@ -80,7 +81,17 @@
|
|
80
81
|
return null;
|
81
82
|
};
|
82
83
|
|
83
|
-
const isElement = obj =>
|
84
|
+
const isElement = obj => {
|
85
|
+
if (!obj || typeof obj !== 'object') {
|
86
|
+
return false;
|
87
|
+
}
|
88
|
+
|
89
|
+
if (typeof obj.jquery !== 'undefined') {
|
90
|
+
obj = obj[0];
|
91
|
+
}
|
92
|
+
|
93
|
+
return typeof obj.nodeType !== 'undefined';
|
94
|
+
};
|
84
95
|
|
85
96
|
const typeCheckConfig = (componentName, config, configTypes) => {
|
86
97
|
Object.keys(configTypes).forEach(property => {
|
@@ -114,12 +125,13 @@
|
|
114
125
|
}
|
115
126
|
};
|
116
127
|
|
117
|
-
const defineJQueryPlugin =
|
128
|
+
const defineJQueryPlugin = plugin => {
|
118
129
|
onDOMContentLoaded(() => {
|
119
130
|
const $ = getjQuery();
|
120
131
|
/* istanbul ignore if */
|
121
132
|
|
122
133
|
if ($) {
|
134
|
+
const name = plugin.NAME;
|
123
135
|
const JQUERY_NO_CONFLICT = $.fn[name];
|
124
136
|
$.fn[name] = plugin.jQueryInterface;
|
125
137
|
$.fn[name].Constructor = plugin;
|
@@ -134,7 +146,7 @@
|
|
134
146
|
|
135
147
|
/**
|
136
148
|
* --------------------------------------------------------------------------
|
137
|
-
* Bootstrap (v5.0.
|
149
|
+
* Bootstrap (v5.0.1): scrollspy.js
|
138
150
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
139
151
|
* --------------------------------------------------------------------------
|
140
152
|
*/
|
@@ -199,8 +211,8 @@
|
|
199
211
|
return Default;
|
200
212
|
}
|
201
213
|
|
202
|
-
static get
|
203
|
-
return
|
214
|
+
static get NAME() {
|
215
|
+
return NAME;
|
204
216
|
} // Public
|
205
217
|
|
206
218
|
|
@@ -233,15 +245,8 @@
|
|
233
245
|
}
|
234
246
|
|
235
247
|
dispose() {
|
236
|
-
super.dispose();
|
237
248
|
EventHandler__default['default'].off(this._scrollElement, EVENT_KEY);
|
238
|
-
|
239
|
-
this._config = null;
|
240
|
-
this._selector = null;
|
241
|
-
this._offsets = null;
|
242
|
-
this._targets = null;
|
243
|
-
this._activeTarget = null;
|
244
|
-
this._scrollHeight = null;
|
249
|
+
super.dispose();
|
245
250
|
} // Private
|
246
251
|
|
247
252
|
|
@@ -388,7 +393,7 @@
|
|
388
393
|
* add .ScrollSpy to jQuery only if jQuery is present
|
389
394
|
*/
|
390
395
|
|
391
|
-
defineJQueryPlugin(
|
396
|
+
defineJQueryPlugin(ScrollSpy);
|
392
397
|
|
393
398
|
return ScrollSpy;
|
394
399
|
|
@@ -1,30 +1,21 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tab.js v5.0.
|
2
|
+
* Bootstrap tab.js v5.0.1 (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
|
*/
|
6
6
|
(function (global, factory) {
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/
|
8
|
-
typeof define === 'function' && define.amd ? define(['./dom/
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.
|
10
|
-
}(this, (function (Data, EventHandler,
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
|
8
|
+
typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
|
10
|
+
}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
|
11
11
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
13
13
|
|
14
|
+
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
14
15
|
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
|
15
16
|
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
|
16
|
-
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
|
17
17
|
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
18
18
|
|
19
|
-
/**
|
20
|
-
* --------------------------------------------------------------------------
|
21
|
-
* Bootstrap (v5.0.0): util/index.js
|
22
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
23
|
-
* --------------------------------------------------------------------------
|
24
|
-
*/
|
25
|
-
const MILLISECONDS_MULTIPLIER = 1000;
|
26
|
-
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
27
|
-
|
28
19
|
const getSelector = element => {
|
29
20
|
let selector = element.getAttribute('data-bs-target');
|
30
21
|
|
@@ -54,51 +45,6 @@
|
|
54
45
|
return selector ? document.querySelector(selector) : null;
|
55
46
|
};
|
56
47
|
|
57
|
-
const getTransitionDurationFromElement = element => {
|
58
|
-
if (!element) {
|
59
|
-
return 0;
|
60
|
-
} // Get transition-duration of the element
|
61
|
-
|
62
|
-
|
63
|
-
let {
|
64
|
-
transitionDuration,
|
65
|
-
transitionDelay
|
66
|
-
} = window.getComputedStyle(element);
|
67
|
-
const floatTransitionDuration = Number.parseFloat(transitionDuration);
|
68
|
-
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
69
|
-
|
70
|
-
if (!floatTransitionDuration && !floatTransitionDelay) {
|
71
|
-
return 0;
|
72
|
-
} // If multiple durations are defined, take the first
|
73
|
-
|
74
|
-
|
75
|
-
transitionDuration = transitionDuration.split(',')[0];
|
76
|
-
transitionDelay = transitionDelay.split(',')[0];
|
77
|
-
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
78
|
-
};
|
79
|
-
|
80
|
-
const triggerTransitionEnd = element => {
|
81
|
-
element.dispatchEvent(new Event(TRANSITION_END));
|
82
|
-
};
|
83
|
-
|
84
|
-
const emulateTransitionEnd = (element, duration) => {
|
85
|
-
let called = false;
|
86
|
-
const durationPadding = 5;
|
87
|
-
const emulatedDuration = duration + durationPadding;
|
88
|
-
|
89
|
-
function listener() {
|
90
|
-
called = true;
|
91
|
-
element.removeEventListener(TRANSITION_END, listener);
|
92
|
-
}
|
93
|
-
|
94
|
-
element.addEventListener(TRANSITION_END, listener);
|
95
|
-
setTimeout(() => {
|
96
|
-
if (!called) {
|
97
|
-
triggerTransitionEnd(element);
|
98
|
-
}
|
99
|
-
}, emulatedDuration);
|
100
|
-
};
|
101
|
-
|
102
48
|
const isDisabled = element => {
|
103
49
|
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
|
104
50
|
return true;
|
@@ -137,12 +83,13 @@
|
|
137
83
|
}
|
138
84
|
};
|
139
85
|
|
140
|
-
const defineJQueryPlugin =
|
86
|
+
const defineJQueryPlugin = plugin => {
|
141
87
|
onDOMContentLoaded(() => {
|
142
88
|
const $ = getjQuery();
|
143
89
|
/* istanbul ignore if */
|
144
90
|
|
145
91
|
if ($) {
|
92
|
+
const name = plugin.NAME;
|
146
93
|
const JQUERY_NO_CONFLICT = $.fn[name];
|
147
94
|
$.fn[name] = plugin.jQueryInterface;
|
148
95
|
$.fn[name].Constructor = plugin;
|
@@ -157,7 +104,7 @@
|
|
157
104
|
|
158
105
|
/**
|
159
106
|
* --------------------------------------------------------------------------
|
160
|
-
* Bootstrap (v5.0.
|
107
|
+
* Bootstrap (v5.0.1): tab.js
|
161
108
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
162
109
|
* --------------------------------------------------------------------------
|
163
110
|
*/
|
@@ -195,8 +142,8 @@
|
|
195
142
|
|
196
143
|
class Tab extends BaseComponent__default['default'] {
|
197
144
|
// Getters
|
198
|
-
static get
|
199
|
-
return
|
145
|
+
static get NAME() {
|
146
|
+
return NAME;
|
200
147
|
} // Public
|
201
148
|
|
202
149
|
|
@@ -254,10 +201,9 @@
|
|
254
201
|
const complete = () => this._transitionComplete(element, active, callback);
|
255
202
|
|
256
203
|
if (active && isTransitioning) {
|
257
|
-
const transitionDuration = getTransitionDurationFromElement(active);
|
258
204
|
active.classList.remove(CLASS_NAME_SHOW);
|
259
|
-
|
260
|
-
|
205
|
+
|
206
|
+
this._queueCallback(complete, element, true);
|
261
207
|
} else {
|
262
208
|
complete();
|
263
209
|
}
|
@@ -352,7 +298,7 @@
|
|
352
298
|
* add .Tab to jQuery only if jQuery is present
|
353
299
|
*/
|
354
300
|
|
355
|
-
defineJQueryPlugin(
|
301
|
+
defineJQueryPlugin(Tab);
|
356
302
|
|
357
303
|
return Tab;
|
358
304
|
|