bootstrap 5.0.0.alpha3 → 5.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +8 -8
  4. data/assets/javascripts/bootstrap.js +597 -595
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +67 -31
  7. data/assets/javascripts/bootstrap/button.js +63 -24
  8. data/assets/javascripts/bootstrap/carousel.js +121 -74
  9. data/assets/javascripts/bootstrap/collapse.js +101 -54
  10. data/assets/javascripts/bootstrap/dom/data.js +2 -2
  11. data/assets/javascripts/bootstrap/dom/event-handler.js +12 -10
  12. data/assets/javascripts/bootstrap/dom/manipulator.js +12 -11
  13. data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -2
  14. data/assets/javascripts/bootstrap/dropdown.js +142 -99
  15. data/assets/javascripts/bootstrap/modal.js +153 -109
  16. data/assets/javascripts/bootstrap/popover.js +11 -19
  17. data/assets/javascripts/bootstrap/scrollspy.js +82 -36
  18. data/assets/javascripts/bootstrap/tab.js +67 -28
  19. data/assets/javascripts/bootstrap/toast.js +90 -42
  20. data/assets/javascripts/bootstrap/tooltip.js +227 -148
  21. data/assets/stylesheets/_bootstrap-grid.scss +7 -7
  22. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  23. data/assets/stylesheets/_bootstrap.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_alert.scss +3 -3
  25. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_button-group.scss +5 -5
  27. data/assets/stylesheets/bootstrap/_card.scss +3 -3
  28. data/assets/stylesheets/bootstrap/_carousel.scss +23 -12
  29. data/assets/stylesheets/bootstrap/_dropdown.scss +22 -23
  30. data/assets/stylesheets/bootstrap/_functions.scss +1 -2
  31. data/assets/stylesheets/bootstrap/_list-group.scss +6 -6
  32. data/assets/stylesheets/bootstrap/_navbar.scss +1 -1
  33. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_popover.scss +17 -14
  35. data/assets/stylesheets/bootstrap/_reboot.scss +19 -3
  36. data/assets/stylesheets/bootstrap/_spinners.scss +1 -1
  37. data/assets/stylesheets/bootstrap/_tables.scss +0 -1
  38. data/assets/stylesheets/bootstrap/_toasts.scss +14 -12
  39. data/assets/stylesheets/bootstrap/_tooltip.scss +12 -12
  40. data/assets/stylesheets/bootstrap/_utilities.scss +39 -24
  41. data/assets/stylesheets/bootstrap/_variables.scss +22 -20
  42. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  43. data/assets/stylesheets/bootstrap/forms/_form-check.scss +5 -5
  44. data/assets/stylesheets/bootstrap/forms/_input-group.scss +3 -3
  45. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +6 -6
  46. data/assets/stylesheets/bootstrap/mixins/_caret.scss +6 -6
  47. data/assets/stylesheets/bootstrap/mixins/_container.scss +2 -4
  48. data/assets/stylesheets/bootstrap/mixins/_forms.scss +1 -1
  49. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +3 -3
  50. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +19 -0
  51. data/lib/bootstrap/version.rb +2 -2
  52. data/tasks/updater/js.rb +6 -4
  53. metadata +2 -2
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Bootstrap popover.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap popover.js v5.0.0-beta1 (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
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) :
8
- typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/selector-engine.js', './tooltip.js'], factory) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/selector-engine', './tooltip'], factory) :
9
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
10
10
  }(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
11
11
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  /**
19
19
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.0.0-alpha3): util/index.js
20
+ * Bootstrap (v5.0.0-beta1): util/index.js
21
21
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
22
  * --------------------------------------------------------------------------
23
23
  */
@@ -26,7 +26,7 @@
26
26
  var _window = window,
27
27
  jQuery = _window.jQuery;
28
28
 
29
- if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
29
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
30
30
  return jQuery;
31
31
  }
32
32
 
@@ -41,6 +41,8 @@
41
41
  }
42
42
  };
43
43
 
44
+ var isRTL = document.documentElement.dir === 'rtl';
45
+
44
46
  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); } }
45
47
 
46
48
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
@@ -55,7 +57,6 @@
55
57
  */
56
58
 
57
59
  var NAME = 'popover';
58
- var VERSION = '5.0.0-alpha3';
59
60
  var DATA_KEY = 'bs.popover';
60
61
  var EVENT_KEY = "." + DATA_KEY;
61
62
  var CLASS_PREFIX = 'bs-popover';
@@ -65,7 +66,7 @@
65
66
  placement: 'right',
66
67
  trigger: 'click',
67
68
  content: '',
68
- template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
69
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
69
70
  });
70
71
 
71
72
  var DefaultType = _extends({}, Tooltip__default['default'].DefaultType, {
@@ -116,7 +117,7 @@
116
117
  var content = this._getContent();
117
118
 
118
119
  if (typeof content === 'function') {
119
- content = content.call(this.element);
120
+ content = content.call(this._element);
120
121
  }
121
122
 
122
123
  this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content);
@@ -125,11 +126,11 @@
125
126
  ;
126
127
 
127
128
  _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
128
- this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
129
+ this.getTipElement().classList.add(CLASS_PREFIX + "-" + this.updateAttachment(attachment));
129
130
  };
130
131
 
131
132
  _proto._getContent = function _getContent() {
132
- return this.element.getAttribute('data-content') || this.config.content;
133
+ return this._element.getAttribute('data-bs-content') || this.config.content;
133
134
  };
134
135
 
135
136
  _proto._cleanTipClass = function _cleanTipClass() {
@@ -171,18 +172,9 @@
171
172
  });
172
173
  };
173
174
 
174
- Popover.getInstance = function getInstance(element) {
175
- return Data__default['default'].getData(element, DATA_KEY);
176
- };
177
-
178
175
  _createClass(Popover, null, [{
179
- key: "VERSION",
180
- // Getters
181
- get: function get() {
182
- return VERSION;
183
- }
184
- }, {
185
176
  key: "Default",
177
+ // Getters
186
178
  get: function get() {
187
179
  return Default;
188
180
  }
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Bootstrap scrollspy.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap scrollspy.js v5.0.0-beta1 (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
7
  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')) :
8
- typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
9
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
10
10
  }(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
11
11
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  /**
20
20
  * --------------------------------------------------------------------------
21
- * Bootstrap (v5.0.0-alpha3): util/index.js
21
+ * Bootstrap (v5.0.0-beta1): util/index.js
22
22
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
23
23
  * --------------------------------------------------------------------------
24
24
  */
@@ -47,7 +47,7 @@
47
47
  };
48
48
 
49
49
  var getSelector = function getSelector(element) {
50
- var selector = element.getAttribute('data-target');
50
+ var selector = element.getAttribute('data-bs-target');
51
51
 
52
52
  if (!selector || selector === '#') {
53
53
  var hrefAttr = element.getAttribute('href');
@@ -87,7 +87,7 @@
87
87
  var _window = window,
88
88
  jQuery = _window.jQuery;
89
89
 
90
- if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
90
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
91
91
  return jQuery;
92
92
  }
93
93
 
@@ -102,7 +102,7 @@
102
102
  }
103
103
  };
104
104
 
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); }
105
+ var isRTL = document.documentElement.dir === 'rtl';
106
106
 
107
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); } }
108
108
 
@@ -113,8 +113,55 @@
113
113
  * ------------------------------------------------------------------------
114
114
  */
115
115
 
116
+ var VERSION = '5.0.0-beta1';
117
+
118
+ var BaseComponent = /*#__PURE__*/function () {
119
+ function BaseComponent(element) {
120
+ if (!element) {
121
+ return;
122
+ }
123
+
124
+ this._element = element;
125
+ Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
126
+ }
127
+
128
+ var _proto = BaseComponent.prototype;
129
+
130
+ _proto.dispose = function dispose() {
131
+ Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
132
+ this._element = null;
133
+ }
134
+ /** Static */
135
+ ;
136
+
137
+ BaseComponent.getInstance = function getInstance(element) {
138
+ return Data__default['default'].getData(element, this.DATA_KEY);
139
+ };
140
+
141
+ _createClass(BaseComponent, null, [{
142
+ key: "VERSION",
143
+ get: function get() {
144
+ return VERSION;
145
+ }
146
+ }]);
147
+
148
+ return BaseComponent;
149
+ }();
150
+
151
+ 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); }
152
+
153
+ 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); } }
154
+
155
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
156
+
157
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
158
+ /**
159
+ * ------------------------------------------------------------------------
160
+ * Constants
161
+ * ------------------------------------------------------------------------
162
+ */
163
+
116
164
  var NAME = 'scrollspy';
117
- var VERSION = '5.0.0-alpha3';
118
165
  var DATA_KEY = 'bs.scrollspy';
119
166
  var EVENT_KEY = "." + DATA_KEY;
120
167
  var DATA_API_KEY = '.data-api';
@@ -133,7 +180,7 @@
133
180
  var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
134
181
  var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
135
182
  var CLASS_NAME_ACTIVE = 'active';
136
- var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
183
+ var SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
137
184
  var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
138
185
  var SELECTOR_NAV_LINKS = '.nav-link';
139
186
  var SELECTOR_NAV_ITEMS = '.nav-item';
@@ -148,26 +195,29 @@
148
195
  * ------------------------------------------------------------------------
149
196
  */
150
197
 
151
- var ScrollSpy = /*#__PURE__*/function () {
152
- function ScrollSpy(element, config) {
153
- var _this = this;
198
+ var ScrollSpy = /*#__PURE__*/function (_BaseComponent) {
199
+ _inheritsLoose(ScrollSpy, _BaseComponent);
154
200
 
155
- this._element = element;
156
- this._scrollElement = element.tagName === 'BODY' ? window : element;
157
- this._config = this._getConfig(config);
158
- this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + ", " + this._config.target + " " + SELECTOR_LIST_ITEMS + ", " + this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM;
159
- this._offsets = [];
160
- this._targets = [];
161
- this._activeTarget = null;
162
- this._scrollHeight = 0;
163
- EventHandler__default['default'].on(this._scrollElement, EVENT_SCROLL, function (event) {
201
+ function ScrollSpy(element, config) {
202
+ var _this;
203
+
204
+ _this = _BaseComponent.call(this, element) || this;
205
+ _this._scrollElement = element.tagName === 'BODY' ? window : element;
206
+ _this._config = _this._getConfig(config);
207
+ _this._selector = _this._config.target + " " + SELECTOR_NAV_LINKS + ", " + _this._config.target + " " + SELECTOR_LIST_ITEMS + ", " + _this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM;
208
+ _this._offsets = [];
209
+ _this._targets = [];
210
+ _this._activeTarget = null;
211
+ _this._scrollHeight = 0;
212
+ EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function (event) {
164
213
  return _this._process(event);
165
214
  });
166
- this.refresh();
167
215
 
168
- this._process();
216
+ _this.refresh();
217
+
218
+ _this._process();
169
219
 
170
- Data__default['default'].setData(element, DATA_KEY, this);
220
+ return _this;
171
221
  } // Getters
172
222
 
173
223
 
@@ -209,9 +259,9 @@
209
259
  };
210
260
 
211
261
  _proto.dispose = function dispose() {
212
- Data__default['default'].removeData(this._element, DATA_KEY);
262
+ _BaseComponent.prototype.dispose.call(this);
263
+
213
264
  EventHandler__default['default'].off(this._scrollElement, EVENT_KEY);
214
- this._element = null;
215
265
  this._scrollElement = null;
216
266
  this._config = null;
217
267
  this._selector = null;
@@ -296,7 +346,7 @@
296
346
  this._clear();
297
347
 
298
348
  var queries = this._selector.split(',').map(function (selector) {
299
- return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
349
+ return selector + "[data-bs-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
300
350
  });
301
351
 
302
352
  var link = SelectorEngine__default['default'].findOne(queries.join(','));
@@ -356,24 +406,20 @@
356
406
  });
357
407
  };
358
408
 
359
- ScrollSpy.getInstance = function getInstance(element) {
360
- return Data__default['default'].getData(element, DATA_KEY);
361
- };
362
-
363
- _createClass(ScrollSpy, null, [{
364
- key: "VERSION",
409
+ _createClass$1(ScrollSpy, null, [{
410
+ key: "Default",
365
411
  get: function get() {
366
- return VERSION;
412
+ return Default;
367
413
  }
368
414
  }, {
369
- key: "Default",
415
+ key: "DATA_KEY",
370
416
  get: function get() {
371
- return Default;
417
+ return DATA_KEY;
372
418
  }
373
419
  }]);
374
420
 
375
421
  return ScrollSpy;
376
- }();
422
+ }(BaseComponent);
377
423
  /**
378
424
  * ------------------------------------------------------------------------
379
425
  * Data Api implementation
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Bootstrap tab.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap tab.js v5.0.0-beta1 (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
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) :
8
- typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/selector-engine.js'], factory) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine'], factory) :
9
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
10
10
  }(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
11
11
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  /**
19
19
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.0.0-alpha3): util/index.js
20
+ * Bootstrap (v5.0.0-beta1): util/index.js
21
21
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
22
  * --------------------------------------------------------------------------
23
23
  */
@@ -25,7 +25,7 @@
25
25
  var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
26
26
 
27
27
  var getSelector = function getSelector(element) {
28
- var selector = element.getAttribute('data-target');
28
+ var selector = element.getAttribute('data-bs-target');
29
29
 
30
30
  if (!selector || selector === '#') {
31
31
  var hrefAttr = element.getAttribute('href');
@@ -50,8 +50,8 @@
50
50
  transitionDuration = _window$getComputedSt.transitionDuration,
51
51
  transitionDelay = _window$getComputedSt.transitionDelay;
52
52
 
53
- var floatTransitionDuration = parseFloat(transitionDuration);
54
- var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
53
+ var floatTransitionDuration = Number.parseFloat(transitionDuration);
54
+ var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
55
55
 
56
56
  if (!floatTransitionDuration && !floatTransitionDelay) {
57
57
  return 0;
@@ -60,7 +60,7 @@
60
60
 
61
61
  transitionDuration = transitionDuration.split(',')[0];
62
62
  transitionDelay = transitionDelay.split(',')[0];
63
- return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
63
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
64
64
  };
65
65
 
66
66
  var triggerTransitionEnd = function triggerTransitionEnd(element) {
@@ -93,7 +93,7 @@
93
93
  var _window = window,
94
94
  jQuery = _window.jQuery;
95
95
 
96
- if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
96
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
97
97
  return jQuery;
98
98
  }
99
99
 
@@ -108,6 +108,8 @@
108
108
  }
109
109
  };
110
110
 
111
+ var isRTL = document.documentElement.dir === 'rtl';
112
+
111
113
  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); } }
112
114
 
113
115
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
@@ -117,8 +119,53 @@
117
119
  * ------------------------------------------------------------------------
118
120
  */
119
121
 
122
+ var VERSION = '5.0.0-beta1';
123
+
124
+ var BaseComponent = /*#__PURE__*/function () {
125
+ function BaseComponent(element) {
126
+ if (!element) {
127
+ return;
128
+ }
129
+
130
+ this._element = element;
131
+ Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
132
+ }
133
+
134
+ var _proto = BaseComponent.prototype;
135
+
136
+ _proto.dispose = function dispose() {
137
+ Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
138
+ this._element = null;
139
+ }
140
+ /** Static */
141
+ ;
142
+
143
+ BaseComponent.getInstance = function getInstance(element) {
144
+ return Data__default['default'].getData(element, this.DATA_KEY);
145
+ };
146
+
147
+ _createClass(BaseComponent, null, [{
148
+ key: "VERSION",
149
+ get: function get() {
150
+ return VERSION;
151
+ }
152
+ }]);
153
+
154
+ return BaseComponent;
155
+ }();
156
+
157
+ 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); } }
158
+
159
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
160
+
161
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
162
+ /**
163
+ * ------------------------------------------------------------------------
164
+ * Constants
165
+ * ------------------------------------------------------------------------
166
+ */
167
+
120
168
  var NAME = 'tab';
121
- var VERSION = '5.0.0-alpha3';
122
169
  var DATA_KEY = 'bs.tab';
123
170
  var EVENT_KEY = "." + DATA_KEY;
124
171
  var DATA_API_KEY = '.data-api';
@@ -136,7 +183,7 @@
136
183
  var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
137
184
  var SELECTOR_ACTIVE = '.active';
138
185
  var SELECTOR_ACTIVE_UL = ':scope > li > .active';
139
- var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
186
+ var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
140
187
  var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
141
188
  var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
142
189
  /**
@@ -145,12 +192,12 @@
145
192
  * ------------------------------------------------------------------------
146
193
  */
147
194
 
148
- var Tab = /*#__PURE__*/function () {
149
- function Tab(element) {
150
- this._element = element;
151
- Data__default['default'].setData(this._element, DATA_KEY, this);
152
- } // Getters
195
+ var Tab = /*#__PURE__*/function (_BaseComponent) {
196
+ _inheritsLoose(Tab, _BaseComponent);
153
197
 
198
+ function Tab() {
199
+ return _BaseComponent.apply(this, arguments) || this;
200
+ }
154
201
 
155
202
  var _proto = Tab.prototype;
156
203
 
@@ -205,11 +252,6 @@
205
252
  } else {
206
253
  complete();
207
254
  }
208
- };
209
-
210
- _proto.dispose = function dispose() {
211
- Data__default['default'].removeData(this._element, DATA_KEY);
212
- this._element = null;
213
255
  } // Private
214
256
  ;
215
257
 
@@ -292,19 +334,16 @@
292
334
  });
293
335
  };
294
336
 
295
- Tab.getInstance = function getInstance(element) {
296
- return Data__default['default'].getData(element, DATA_KEY);
297
- };
298
-
299
- _createClass(Tab, null, [{
300
- key: "VERSION",
337
+ _createClass$1(Tab, null, [{
338
+ key: "DATA_KEY",
339
+ // Getters
301
340
  get: function get() {
302
- return VERSION;
341
+ return DATA_KEY;
303
342
  }
304
343
  }]);
305
344
 
306
345
  return Tab;
307
- }();
346
+ }(BaseComponent);
308
347
  /**
309
348
  * ------------------------------------------------------------------------
310
349
  * Data Api implementation