bootstrap 5.0.0.alpha2 → 5.0.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -2
  3. data/assets/javascripts/bootstrap-sprockets.js +6 -7
  4. data/assets/javascripts/bootstrap.js +220 -267
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +25 -15
  7. data/assets/javascripts/bootstrap/button.js +25 -15
  8. data/assets/javascripts/bootstrap/carousel.js +46 -24
  9. data/assets/javascripts/bootstrap/collapse.js +25 -15
  10. data/assets/javascripts/bootstrap/dom/data.js +2 -2
  11. data/assets/javascripts/bootstrap/dom/event-handler.js +8 -16
  12. data/assets/javascripts/bootstrap/dom/manipulator.js +2 -13
  13. data/assets/javascripts/bootstrap/dom/selector-engine.js +9 -9
  14. data/assets/javascripts/bootstrap/dropdown.js +34 -24
  15. data/assets/javascripts/bootstrap/modal.js +25 -15
  16. data/assets/javascripts/bootstrap/popover.js +26 -15
  17. data/assets/javascripts/bootstrap/scrollspy.js +25 -14
  18. data/assets/javascripts/bootstrap/tab.js +25 -15
  19. data/assets/javascripts/bootstrap/toast.js +26 -16
  20. data/assets/javascripts/bootstrap/tooltip.js +27 -17
  21. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  22. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  23. data/assets/stylesheets/_bootstrap.scss +2 -1
  24. data/assets/stylesheets/bootstrap/_accordion.scss +125 -0
  25. data/assets/stylesheets/bootstrap/_alert.scss +10 -3
  26. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -3
  27. data/assets/stylesheets/bootstrap/_button-group.scss +0 -2
  28. data/assets/stylesheets/bootstrap/_buttons.scss +0 -15
  29. data/assets/stylesheets/bootstrap/_card.scss +0 -27
  30. data/assets/stylesheets/bootstrap/_close.scss +1 -2
  31. data/assets/stylesheets/bootstrap/_forms.scss +1 -1
  32. data/assets/stylesheets/bootstrap/_functions.scss +12 -12
  33. data/assets/stylesheets/bootstrap/_list-group.scss +8 -2
  34. data/assets/stylesheets/bootstrap/_popover.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_progress.scss +1 -1
  36. data/assets/stylesheets/bootstrap/_reboot.scss +19 -17
  37. data/assets/stylesheets/bootstrap/_root.scss +5 -5
  38. data/assets/stylesheets/bootstrap/_spinners.scss +11 -2
  39. data/assets/stylesheets/bootstrap/_tables.scss +16 -16
  40. data/assets/stylesheets/bootstrap/_utilities.scss +27 -13
  41. data/assets/stylesheets/bootstrap/_variables.scss +183 -160
  42. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  43. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  44. data/assets/stylesheets/bootstrap/forms/_form-check.scss +15 -6
  45. data/assets/stylesheets/bootstrap/forms/_form-control.scss +115 -8
  46. data/assets/stylesheets/bootstrap/forms/_form-range.scss +0 -45
  47. data/assets/stylesheets/bootstrap/forms/_form-select.scss +0 -14
  48. data/assets/stylesheets/bootstrap/forms/_input-group.scss +20 -39
  49. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +2 -2
  50. data/assets/stylesheets/bootstrap/mixins/_alert.scss +1 -1
  51. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +4 -4
  52. data/assets/stylesheets/bootstrap/mixins/_forms.scss +0 -16
  53. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  54. data/assets/stylesheets/bootstrap/mixins/_grid.scss +10 -10
  55. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  56. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +7 -7
  57. data/lib/bootstrap/version.rb +2 -2
  58. metadata +4 -4
  59. data/assets/javascripts/bootstrap/dom/polyfill.js +0 -110
  60. data/assets/stylesheets/bootstrap/forms/_form-file.scss +0 -91
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap manipulator.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap manipulator.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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
  */
@@ -13,7 +13,7 @@
13
13
 
14
14
  /**
15
15
  * --------------------------------------------------------------------------
16
- * Bootstrap (v5.0.0-alpha2): dom/manipulator.js
16
+ * Bootstrap (v5.0.0-alpha3): dom/manipulator.js
17
17
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
18
18
  * --------------------------------------------------------------------------
19
19
  */
@@ -77,17 +77,6 @@
77
77
  top: element.offsetTop,
78
78
  left: element.offsetLeft
79
79
  };
80
- },
81
- toggleClass: function toggleClass(element, className) {
82
- if (!element) {
83
- return;
84
- }
85
-
86
- if (element.classList.contains(className)) {
87
- element.classList.remove(className);
88
- } else {
89
- element.classList.add(className);
90
- }
91
80
  }
92
81
  };
93
82
 
@@ -1,26 +1,26 @@
1
1
  /*!
2
- * Bootstrap selector-engine.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap selector-engine.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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('./polyfill.js')) :
8
- typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory(global.Polyfill));
10
- }(this, (function (polyfill_js) { 'use strict';
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8
+ typeof define === 'function' && define.amd ? define(factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory());
10
+ }(this, (function () { 'use strict';
11
11
 
12
12
  /**
13
13
  * --------------------------------------------------------------------------
14
- * Bootstrap (v5.0.0-alpha2): dom/selector-engine.js
14
+ * Bootstrap (v5.0.0-alpha3): dom/selector-engine.js
15
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
16
  * --------------------------------------------------------------------------
17
17
  */
18
+
18
19
  /**
19
20
  * ------------------------------------------------------------------------
20
21
  * Constants
21
22
  * ------------------------------------------------------------------------
22
23
  */
23
-
24
24
  var NODE_TEXT = 3;
25
25
  var SelectorEngine = {
26
26
  matches: function matches(element, selector) {
@@ -33,14 +33,14 @@
33
33
  element = document.documentElement;
34
34
  }
35
35
 
36
- return (_ref = []).concat.apply(_ref, polyfill_js.find.call(element, selector));
36
+ return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));
37
37
  },
38
38
  findOne: function findOne(selector, element) {
39
39
  if (element === void 0) {
40
40
  element = document.documentElement;
41
41
  }
42
42
 
43
- return polyfill_js.findOne.call(element, selector);
43
+ return Element.prototype.querySelector.call(element, selector);
44
44
  },
45
45
  children: function children(element, selector) {
46
46
  var _ref2;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap dropdown.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap dropdown.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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
  */
@@ -19,7 +19,7 @@
19
19
 
20
20
  /**
21
21
  * --------------------------------------------------------------------------
22
- * Bootstrap (v5.0.0-alpha2): util/index.js
22
+ * Bootstrap (v5.0.0-alpha3): util/index.js
23
23
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
24
24
  * --------------------------------------------------------------------------
25
25
  */
@@ -93,6 +93,14 @@
93
93
  return null;
94
94
  };
95
95
 
96
+ var onDOMContentLoaded = function onDOMContentLoaded(callback) {
97
+ if (document.readyState === 'loading') {
98
+ document.addEventListener('DOMContentLoaded', callback);
99
+ } else {
100
+ callback();
101
+ }
102
+ };
103
+
96
104
  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); }
97
105
 
98
106
  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); } }
@@ -105,7 +113,7 @@
105
113
  */
106
114
 
107
115
  var NAME = 'dropdown';
108
- var VERSION = '5.0.0-alpha2';
116
+ var VERSION = '5.0.0-alpha3';
109
117
  var DATA_KEY = 'bs.dropdown';
110
118
  var EVENT_KEY = "." + DATA_KEY;
111
119
  var DATA_API_KEY = '.data-api';
@@ -258,8 +266,10 @@
258
266
 
259
267
  this._element.setAttribute('aria-expanded', true);
260
268
 
261
- Manipulator__default['default'].toggleClass(this._menu, CLASS_NAME_SHOW);
262
- Manipulator__default['default'].toggleClass(this._element, CLASS_NAME_SHOW);
269
+ this._menu.classList.toggle(CLASS_NAME_SHOW);
270
+
271
+ this._element.classList.toggle(CLASS_NAME_SHOW);
272
+
263
273
  EventHandler__default['default'].trigger(parent, EVENT_SHOWN, relatedTarget);
264
274
  };
265
275
 
@@ -282,8 +292,10 @@
282
292
  this._popper.destroy();
283
293
  }
284
294
 
285
- Manipulator__default['default'].toggleClass(this._menu, CLASS_NAME_SHOW);
286
- Manipulator__default['default'].toggleClass(this._element, CLASS_NAME_SHOW);
295
+ this._menu.classList.toggle(CLASS_NAME_SHOW);
296
+
297
+ this._element.classList.toggle(CLASS_NAME_SHOW);
298
+
287
299
  EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget);
288
300
  };
289
301
 
@@ -335,11 +347,7 @@
335
347
  var placement = PLACEMENT_BOTTOM; // Handle dropup
336
348
 
337
349
  if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
338
- placement = PLACEMENT_TOP;
339
-
340
- if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
341
- placement = PLACEMENT_TOPEND;
342
- }
350
+ placement = this._menu.classList.contains(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
343
351
  } else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
344
352
  placement = PLACEMENT_RIGHT;
345
353
  } else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
@@ -583,26 +591,28 @@
583
591
  EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
584
592
  return e.stopPropagation();
585
593
  });
586
- var $ = getjQuery();
587
594
  /**
588
595
  * ------------------------------------------------------------------------
589
596
  * jQuery
590
597
  * ------------------------------------------------------------------------
591
- * add .dropdown to jQuery only if jQuery is present
598
+ * add .Dropdown to jQuery only if jQuery is present
592
599
  */
593
600
 
594
- /* istanbul ignore if */
601
+ onDOMContentLoaded(function () {
602
+ var $ = getjQuery();
603
+ /* istanbul ignore if */
595
604
 
596
- if ($) {
597
- var JQUERY_NO_CONFLICT = $.fn[NAME];
598
- $.fn[NAME] = Dropdown.jQueryInterface;
599
- $.fn[NAME].Constructor = Dropdown;
605
+ if ($) {
606
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
607
+ $.fn[NAME] = Dropdown.jQueryInterface;
608
+ $.fn[NAME].Constructor = Dropdown;
600
609
 
601
- $.fn[NAME].noConflict = function () {
602
- $.fn[NAME] = JQUERY_NO_CONFLICT;
603
- return Dropdown.jQueryInterface;
604
- };
605
- }
610
+ $.fn[NAME].noConflict = function () {
611
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
612
+ return Dropdown.jQueryInterface;
613
+ };
614
+ }
615
+ });
606
616
 
607
617
  return Dropdown;
608
618
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap modal.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap modal.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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
  */
@@ -18,7 +18,7 @@
18
18
 
19
19
  /**
20
20
  * --------------------------------------------------------------------------
21
- * Bootstrap (v5.0.0-alpha2): util/index.js
21
+ * Bootstrap (v5.0.0-alpha3): util/index.js
22
22
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
23
23
  * --------------------------------------------------------------------------
24
24
  */
@@ -139,6 +139,14 @@
139
139
  return null;
140
140
  };
141
141
 
142
+ var onDOMContentLoaded = function onDOMContentLoaded(callback) {
143
+ if (document.readyState === 'loading') {
144
+ document.addEventListener('DOMContentLoaded', callback);
145
+ } else {
146
+ callback();
147
+ }
148
+ };
149
+
142
150
  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); }
143
151
 
144
152
  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); } }
@@ -151,7 +159,7 @@
151
159
  */
152
160
 
153
161
  var NAME = 'modal';
154
- var VERSION = '5.0.0-alpha2';
162
+ var VERSION = '5.0.0-alpha3';
155
163
  var DATA_KEY = 'bs.modal';
156
164
  var EVENT_KEY = "." + DATA_KEY;
157
165
  var DATA_API_KEY = '.data-api';
@@ -752,26 +760,28 @@
752
760
 
753
761
  data.show(this);
754
762
  });
755
- var $ = getjQuery();
756
763
  /**
757
764
  * ------------------------------------------------------------------------
758
765
  * jQuery
759
766
  * ------------------------------------------------------------------------
760
- * add .modal to jQuery only if jQuery is present
767
+ * add .Modal to jQuery only if jQuery is present
761
768
  */
762
769
 
763
- /* istanbul ignore if */
770
+ onDOMContentLoaded(function () {
771
+ var $ = getjQuery();
772
+ /* istanbul ignore if */
764
773
 
765
- if ($) {
766
- var JQUERY_NO_CONFLICT = $.fn[NAME];
767
- $.fn[NAME] = Modal.jQueryInterface;
768
- $.fn[NAME].Constructor = Modal;
774
+ if ($) {
775
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
776
+ $.fn[NAME] = Modal.jQueryInterface;
777
+ $.fn[NAME].Constructor = Modal;
769
778
 
770
- $.fn[NAME].noConflict = function () {
771
- $.fn[NAME] = JQUERY_NO_CONFLICT;
772
- return Modal.jQueryInterface;
773
- };
774
- }
779
+ $.fn[NAME].noConflict = function () {
780
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
781
+ return Modal.jQueryInterface;
782
+ };
783
+ }
784
+ });
775
785
 
776
786
  return Modal;
777
787
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap popover.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap popover.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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,7 +17,7 @@
17
17
 
18
18
  /**
19
19
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.0.0-alpha2): util/index.js
20
+ * Bootstrap (v5.0.0-alpha3): util/index.js
21
21
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
22
  * --------------------------------------------------------------------------
23
23
  */
@@ -33,6 +33,14 @@
33
33
  return null;
34
34
  };
35
35
 
36
+ var onDOMContentLoaded = function onDOMContentLoaded(callback) {
37
+ if (document.readyState === 'loading') {
38
+ document.addEventListener('DOMContentLoaded', callback);
39
+ } else {
40
+ callback();
41
+ }
42
+ };
43
+
36
44
  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); } }
37
45
 
38
46
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
@@ -47,7 +55,7 @@
47
55
  */
48
56
 
49
57
  var NAME = 'popover';
50
- var VERSION = '5.0.0-alpha2';
58
+ var VERSION = '5.0.0-alpha3';
51
59
  var DATA_KEY = 'bs.popover';
52
60
  var EVENT_KEY = "." + DATA_KEY;
53
61
  var CLASS_PREFIX = 'bs-popover';
@@ -207,26 +215,29 @@
207
215
 
208
216
  return Popover;
209
217
  }(Tooltip__default['default']);
210
-
211
- var $ = getjQuery();
212
218
  /**
213
219
  * ------------------------------------------------------------------------
214
220
  * jQuery
215
221
  * ------------------------------------------------------------------------
222
+ * add .Popover to jQuery only if jQuery is present
216
223
  */
217
224
 
218
- /* istanbul ignore if */
219
225
 
220
- if ($) {
221
- var JQUERY_NO_CONFLICT = $.fn[NAME];
222
- $.fn[NAME] = Popover.jQueryInterface;
223
- $.fn[NAME].Constructor = Popover;
226
+ onDOMContentLoaded(function () {
227
+ var $ = getjQuery();
228
+ /* istanbul ignore if */
224
229
 
225
- $.fn[NAME].noConflict = function () {
226
- $.fn[NAME] = JQUERY_NO_CONFLICT;
227
- return Popover.jQueryInterface;
228
- };
229
- }
230
+ if ($) {
231
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
232
+ $.fn[NAME] = Popover.jQueryInterface;
233
+ $.fn[NAME].Constructor = Popover;
234
+
235
+ $.fn[NAME].noConflict = function () {
236
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
237
+ return Popover.jQueryInterface;
238
+ };
239
+ }
240
+ });
230
241
 
231
242
  return Popover;
232
243
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap scrollspy.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap scrollspy.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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
  */
@@ -18,7 +18,7 @@
18
18
 
19
19
  /**
20
20
  * --------------------------------------------------------------------------
21
- * Bootstrap (v5.0.0-alpha2): util/index.js
21
+ * Bootstrap (v5.0.0-alpha3): util/index.js
22
22
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
23
23
  * --------------------------------------------------------------------------
24
24
  */
@@ -94,6 +94,14 @@
94
94
  return null;
95
95
  };
96
96
 
97
+ var onDOMContentLoaded = function onDOMContentLoaded(callback) {
98
+ if (document.readyState === 'loading') {
99
+ document.addEventListener('DOMContentLoaded', callback);
100
+ } else {
101
+ callback();
102
+ }
103
+ };
104
+
97
105
  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); }
98
106
 
99
107
  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); } }
@@ -106,7 +114,7 @@
106
114
  */
107
115
 
108
116
  var NAME = 'scrollspy';
109
- var VERSION = '5.0.0-alpha2';
117
+ var VERSION = '5.0.0-alpha3';
110
118
  var DATA_KEY = 'bs.scrollspy';
111
119
  var EVENT_KEY = "." + DATA_KEY;
112
120
  var DATA_API_KEY = '.data-api';
@@ -378,25 +386,28 @@
378
386
  return new ScrollSpy(spy, Manipulator__default['default'].getDataAttributes(spy));
379
387
  });
380
388
  });
381
- var $ = getjQuery();
382
389
  /**
383
390
  * ------------------------------------------------------------------------
384
391
  * jQuery
385
392
  * ------------------------------------------------------------------------
393
+ * add .ScrollSpy to jQuery only if jQuery is present
386
394
  */
387
395
 
388
- /* istanbul ignore if */
396
+ onDOMContentLoaded(function () {
397
+ var $ = getjQuery();
398
+ /* istanbul ignore if */
389
399
 
390
- if ($) {
391
- var JQUERY_NO_CONFLICT = $.fn[NAME];
392
- $.fn[NAME] = ScrollSpy.jQueryInterface;
393
- $.fn[NAME].Constructor = ScrollSpy;
400
+ if ($) {
401
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
402
+ $.fn[NAME] = ScrollSpy.jQueryInterface;
403
+ $.fn[NAME].Constructor = ScrollSpy;
394
404
 
395
- $.fn[NAME].noConflict = function () {
396
- $.fn[NAME] = JQUERY_NO_CONFLICT;
397
- return ScrollSpy.jQueryInterface;
398
- };
399
- }
405
+ $.fn[NAME].noConflict = function () {
406
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
407
+ return ScrollSpy.jQueryInterface;
408
+ };
409
+ }
410
+ });
400
411
 
401
412
  return ScrollSpy;
402
413
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap tab.js v5.0.0-alpha2 (https://getbootstrap.com/)
2
+ * Bootstrap tab.js v5.0.0-alpha3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 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,7 +17,7 @@
17
17
 
18
18
  /**
19
19
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.0.0-alpha2): util/index.js
20
+ * Bootstrap (v5.0.0-alpha3): util/index.js
21
21
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
22
  * --------------------------------------------------------------------------
23
23
  */
@@ -100,6 +100,14 @@
100
100
  return null;
101
101
  };
102
102
 
103
+ var onDOMContentLoaded = function onDOMContentLoaded(callback) {
104
+ if (document.readyState === 'loading') {
105
+ document.addEventListener('DOMContentLoaded', callback);
106
+ } else {
107
+ callback();
108
+ }
109
+ };
110
+
103
111
  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); } }
104
112
 
105
113
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
@@ -110,7 +118,7 @@
110
118
  */
111
119
 
112
120
  var NAME = 'tab';
113
- var VERSION = '5.0.0-alpha2';
121
+ var VERSION = '5.0.0-alpha3';
114
122
  var DATA_KEY = 'bs.tab';
115
123
  var EVENT_KEY = "." + DATA_KEY;
116
124
  var DATA_API_KEY = '.data-api';
@@ -309,26 +317,28 @@
309
317
  var data = Data__default['default'].getData(this, DATA_KEY) || new Tab(this);
310
318
  data.show();
311
319
  });
312
- var $ = getjQuery();
313
320
  /**
314
321
  * ------------------------------------------------------------------------
315
322
  * jQuery
316
323
  * ------------------------------------------------------------------------
317
- * add .tab to jQuery only if jQuery is present
324
+ * add .Tab to jQuery only if jQuery is present
318
325
  */
319
326
 
320
- /* istanbul ignore if */
327
+ onDOMContentLoaded(function () {
328
+ var $ = getjQuery();
329
+ /* istanbul ignore if */
321
330
 
322
- if ($) {
323
- var JQUERY_NO_CONFLICT = $.fn[NAME];
324
- $.fn[NAME] = Tab.jQueryInterface;
325
- $.fn[NAME].Constructor = Tab;
331
+ if ($) {
332
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
333
+ $.fn[NAME] = Tab.jQueryInterface;
334
+ $.fn[NAME].Constructor = Tab;
326
335
 
327
- $.fn[NAME].noConflict = function () {
328
- $.fn[NAME] = JQUERY_NO_CONFLICT;
329
- return Tab.jQueryInterface;
330
- };
331
- }
336
+ $.fn[NAME].noConflict = function () {
337
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
338
+ return Tab.jQueryInterface;
339
+ };
340
+ }
341
+ });
332
342
 
333
343
  return Tab;
334
344