bootstrap 5.0.0.alpha3 → 5.0.0.beta1

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.
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 collapse.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap collapse.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.Collapse = 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
  */
@@ -34,7 +34,7 @@
34
34
  };
35
35
 
36
36
  var getSelector = function getSelector(element) {
37
- var selector = element.getAttribute('data-target');
37
+ var selector = element.getAttribute('data-bs-target');
38
38
 
39
39
  if (!selector || selector === '#') {
40
40
  var hrefAttr = element.getAttribute('href');
@@ -69,8 +69,8 @@
69
69
  transitionDuration = _window$getComputedSt.transitionDuration,
70
70
  transitionDelay = _window$getComputedSt.transitionDelay;
71
71
 
72
- var floatTransitionDuration = parseFloat(transitionDuration);
73
- var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
72
+ var floatTransitionDuration = Number.parseFloat(transitionDuration);
73
+ var floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
74
74
 
75
75
  if (!floatTransitionDuration && !floatTransitionDelay) {
76
76
  return 0;
@@ -79,7 +79,7 @@
79
79
 
80
80
  transitionDuration = transitionDuration.split(',')[0];
81
81
  transitionDelay = transitionDelay.split(',')[0];
82
- return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
82
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
83
83
  };
84
84
 
85
85
  var triggerTransitionEnd = function triggerTransitionEnd(element) {
@@ -128,7 +128,7 @@
128
128
  var _window = window,
129
129
  jQuery = _window.jQuery;
130
130
 
131
- if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
131
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
132
132
  return jQuery;
133
133
  }
134
134
 
@@ -143,7 +143,7 @@
143
143
  }
144
144
  };
145
145
 
146
- 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); }
146
+ var isRTL = document.documentElement.dir === 'rtl';
147
147
 
148
148
  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); } }
149
149
 
@@ -154,8 +154,55 @@
154
154
  * ------------------------------------------------------------------------
155
155
  */
156
156
 
157
+ var VERSION = '5.0.0-beta1';
158
+
159
+ var BaseComponent = /*#__PURE__*/function () {
160
+ function BaseComponent(element) {
161
+ if (!element) {
162
+ return;
163
+ }
164
+
165
+ this._element = element;
166
+ Data__default['default'].setData(element, this.constructor.DATA_KEY, this);
167
+ }
168
+
169
+ var _proto = BaseComponent.prototype;
170
+
171
+ _proto.dispose = function dispose() {
172
+ Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
173
+ this._element = null;
174
+ }
175
+ /** Static */
176
+ ;
177
+
178
+ BaseComponent.getInstance = function getInstance(element) {
179
+ return Data__default['default'].getData(element, this.DATA_KEY);
180
+ };
181
+
182
+ _createClass(BaseComponent, null, [{
183
+ key: "VERSION",
184
+ get: function get() {
185
+ return VERSION;
186
+ }
187
+ }]);
188
+
189
+ return BaseComponent;
190
+ }();
191
+
192
+ 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); }
193
+
194
+ 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); } }
195
+
196
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
197
+
198
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
199
+ /**
200
+ * ------------------------------------------------------------------------
201
+ * Constants
202
+ * ------------------------------------------------------------------------
203
+ */
204
+
157
205
  var NAME = 'collapse';
158
- var VERSION = '5.0.0-alpha3';
159
206
  var DATA_KEY = 'bs.collapse';
160
207
  var EVENT_KEY = "." + DATA_KEY;
161
208
  var DATA_API_KEY = '.data-api';
@@ -179,19 +226,23 @@
179
226
  var WIDTH = 'width';
180
227
  var HEIGHT = 'height';
181
228
  var SELECTOR_ACTIVES = '.show, .collapsing';
182
- var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
229
+ var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]';
183
230
  /**
184
231
  * ------------------------------------------------------------------------
185
232
  * Class Definition
186
233
  * ------------------------------------------------------------------------
187
234
  */
188
235
 
189
- var Collapse = /*#__PURE__*/function () {
236
+ var Collapse = /*#__PURE__*/function (_BaseComponent) {
237
+ _inheritsLoose(Collapse, _BaseComponent);
238
+
190
239
  function Collapse(element, config) {
191
- this._isTransitioning = false;
192
- this._element = element;
193
- this._config = this._getConfig(config);
194
- this._triggerArray = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-target=\"#" + element.id + "\"]"));
240
+ var _this;
241
+
242
+ _this = _BaseComponent.call(this, element) || this;
243
+ _this._isTransitioning = false;
244
+ _this._config = _this._getConfig(config);
245
+ _this._triggerArray = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-bs-target=\"#" + element.id + "\"]"));
195
246
  var toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
196
247
 
197
248
  for (var i = 0, len = toggleList.length; i < len; i++) {
@@ -202,23 +253,23 @@
202
253
  });
203
254
 
204
255
  if (selector !== null && filterElement.length) {
205
- this._selector = selector;
256
+ _this._selector = selector;
206
257
 
207
- this._triggerArray.push(elem);
258
+ _this._triggerArray.push(elem);
208
259
  }
209
260
  }
210
261
 
211
- this._parent = this._config.parent ? this._getParent() : null;
262
+ _this._parent = _this._config.parent ? _this._getParent() : null;
212
263
 
213
- if (!this._config.parent) {
214
- this._addAriaAndCollapsedClass(this._element, this._triggerArray);
264
+ if (!_this._config.parent) {
265
+ _this._addAriaAndCollapsedClass(_this._element, _this._triggerArray);
215
266
  }
216
267
 
217
- if (this._config.toggle) {
218
- this.toggle();
268
+ if (_this._config.toggle) {
269
+ _this.toggle();
219
270
  }
220
271
 
221
- Data__default['default'].setData(element, DATA_KEY, this);
272
+ return _this;
222
273
  } // Getters
223
274
 
224
275
 
@@ -234,7 +285,7 @@
234
285
  };
235
286
 
236
287
  _proto.show = function show() {
237
- var _this = this;
288
+ var _this2 = this;
238
289
 
239
290
  if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
240
291
  return;
@@ -245,8 +296,8 @@
245
296
 
246
297
  if (this._parent) {
247
298
  actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
248
- if (typeof _this._config.parent === 'string') {
249
- return elem.getAttribute('data-parent') === _this._config.parent;
299
+ if (typeof _this2._config.parent === 'string') {
300
+ return elem.getAttribute('data-bs-parent') === _this2._config.parent;
250
301
  }
251
302
 
252
303
  return elem.classList.contains(CLASS_NAME_COLLAPSE);
@@ -260,10 +311,10 @@
260
311
  var container = SelectorEngine__default['default'].findOne(this._selector);
261
312
 
262
313
  if (actives) {
263
- var tempActiveData = actives.filter(function (elem) {
314
+ var tempActiveData = actives.find(function (elem) {
264
315
  return container !== elem;
265
316
  });
266
- activesData = tempActiveData[0] ? Data__default['default'].getData(tempActiveData[0], DATA_KEY) : null;
317
+ activesData = tempActiveData ? Data__default['default'].getData(tempActiveData, DATA_KEY) : null;
267
318
 
268
319
  if (activesData && activesData._isTransitioning) {
269
320
  return;
@@ -306,15 +357,15 @@
306
357
  this.setTransitioning(true);
307
358
 
308
359
  var complete = function complete() {
309
- _this._element.classList.remove(CLASS_NAME_COLLAPSING);
360
+ _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
310
361
 
311
- _this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
362
+ _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
312
363
 
313
- _this._element.style[dimension] = '';
364
+ _this2._element.style[dimension] = '';
314
365
 
315
- _this.setTransitioning(false);
366
+ _this2.setTransitioning(false);
316
367
 
317
- EventHandler__default['default'].trigger(_this._element, EVENT_SHOWN);
368
+ EventHandler__default['default'].trigger(_this2._element, EVENT_SHOWN);
318
369
  };
319
370
 
320
371
  var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
@@ -326,7 +377,7 @@
326
377
  };
327
378
 
328
379
  _proto.hide = function hide() {
329
- var _this2 = this;
380
+ var _this3 = this;
330
381
 
331
382
  if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
332
383
  return;
@@ -364,13 +415,13 @@
364
415
  this.setTransitioning(true);
365
416
 
366
417
  var complete = function complete() {
367
- _this2.setTransitioning(false);
418
+ _this3.setTransitioning(false);
368
419
 
369
- _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
420
+ _this3._element.classList.remove(CLASS_NAME_COLLAPSING);
370
421
 
371
- _this2._element.classList.add(CLASS_NAME_COLLAPSE);
422
+ _this3._element.classList.add(CLASS_NAME_COLLAPSE);
372
423
 
373
- EventHandler__default['default'].trigger(_this2._element, EVENT_HIDDEN);
424
+ EventHandler__default['default'].trigger(_this3._element, EVENT_HIDDEN);
374
425
  };
375
426
 
376
427
  this._element.style[dimension] = '';
@@ -384,10 +435,10 @@
384
435
  };
385
436
 
386
437
  _proto.dispose = function dispose() {
387
- Data__default['default'].removeData(this._element, DATA_KEY);
438
+ _BaseComponent.prototype.dispose.call(this);
439
+
388
440
  this._config = null;
389
441
  this._parent = null;
390
- this._element = null;
391
442
  this._triggerArray = null;
392
443
  this._isTransitioning = null;
393
444
  } // Private
@@ -406,7 +457,7 @@
406
457
  };
407
458
 
408
459
  _proto._getParent = function _getParent() {
409
- var _this3 = this;
460
+ var _this4 = this;
410
461
 
411
462
  var parent = this._config.parent;
412
463
 
@@ -419,11 +470,11 @@
419
470
  parent = SelectorEngine__default['default'].findOne(parent);
420
471
  }
421
472
 
422
- var selector = SELECTOR_DATA_TOGGLE + "[data-parent=\"" + parent + "\"]";
473
+ var selector = SELECTOR_DATA_TOGGLE + "[data-bs-parent=\"" + parent + "\"]";
423
474
  SelectorEngine__default['default'].find(selector, parent).forEach(function (element) {
424
475
  var selected = getElementFromSelector(element);
425
476
 
426
- _this3._addAriaAndCollapsedClass(selected, [element]);
477
+ _this4._addAriaAndCollapsedClass(selected, [element]);
427
478
  });
428
479
  return parent;
429
480
  };
@@ -474,24 +525,20 @@
474
525
  });
475
526
  };
476
527
 
477
- Collapse.getInstance = function getInstance(element) {
478
- return Data__default['default'].getData(element, DATA_KEY);
479
- };
480
-
481
- _createClass(Collapse, null, [{
482
- key: "VERSION",
528
+ _createClass$1(Collapse, null, [{
529
+ key: "Default",
483
530
  get: function get() {
484
- return VERSION;
531
+ return Default;
485
532
  }
486
533
  }, {
487
- key: "Default",
534
+ key: "DATA_KEY",
488
535
  get: function get() {
489
- return Default;
536
+ return DATA_KEY;
490
537
  }
491
538
  }]);
492
539
 
493
540
  return Collapse;
494
- }();
541
+ }(BaseComponent);
495
542
  /**
496
543
  * ------------------------------------------------------------------------
497
544
  * Data Api implementation
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap data.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap data.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
  */
@@ -11,7 +11,7 @@
11
11
 
12
12
  /**
13
13
  * --------------------------------------------------------------------------
14
- * Bootstrap (v5.0.0-alpha3): dom/data.js
14
+ * Bootstrap (v5.0.0-beta1): dom/data.js
15
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
16
  * --------------------------------------------------------------------------
17
17
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap event-handler.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap event-handler.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
  */
@@ -11,7 +11,7 @@
11
11
 
12
12
  /**
13
13
  * --------------------------------------------------------------------------
14
- * Bootstrap (v5.0.0-alpha3): util/index.js
14
+ * Bootstrap (v5.0.0-beta1): util/index.js
15
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
16
  * --------------------------------------------------------------------------
17
17
  */
@@ -20,16 +20,18 @@
20
20
  var _window = window,
21
21
  jQuery = _window.jQuery;
22
22
 
23
- if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
23
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
24
24
  return jQuery;
25
25
  }
26
26
 
27
27
  return null;
28
28
  };
29
29
 
30
+ var isRTL = document.documentElement.dir === 'rtl';
31
+
30
32
  /**
31
33
  * --------------------------------------------------------------------------
32
- * Bootstrap (v5.0.0-alpha3): dom/event-handler.js
34
+ * Bootstrap (v5.0.0-beta1): dom/event-handler.js
33
35
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
34
36
  * --------------------------------------------------------------------------
35
37
  */
@@ -49,7 +51,7 @@
49
51
  mouseenter: 'mouseover',
50
52
  mouseleave: 'mouseout'
51
53
  };
52
- var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
54
+ var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
53
55
  /**
54
56
  * ------------------------------------------------------------------------
55
57
  * Private methods
@@ -131,7 +133,7 @@
131
133
  typeEvent = custom;
132
134
  }
133
135
 
134
- var isNative = nativeEvents.indexOf(typeEvent) > -1;
136
+ var isNative = nativeEvents.has(typeEvent);
135
137
 
136
138
  if (!isNative) {
137
139
  typeEvent = originalTypeEvent;
@@ -188,7 +190,7 @@
188
190
  function removeNamespacedHandlers(element, events, typeEvent, namespace) {
189
191
  var storeElementEvent = events[typeEvent] || {};
190
192
  Object.keys(storeElementEvent).forEach(function (handlerKey) {
191
- if (handlerKey.indexOf(namespace) > -1) {
193
+ if (handlerKey.includes(namespace)) {
192
194
  var event = storeElementEvent[handlerKey];
193
195
  removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
194
196
  }
@@ -214,7 +216,7 @@
214
216
 
215
217
  var inNamespace = typeEvent !== originalTypeEvent;
216
218
  var events = getEvent(element);
217
- var isNamespace = originalTypeEvent.charAt(0) === '.';
219
+ var isNamespace = originalTypeEvent.startsWith('.');
218
220
 
219
221
  if (typeof originalHandler !== 'undefined') {
220
222
  // Simplest case: handler is passed, remove that listener ONLY.
@@ -236,7 +238,7 @@
236
238
  Object.keys(storeElementEvent).forEach(function (keyHandlers) {
237
239
  var handlerKey = keyHandlers.replace(stripUidRegex, '');
238
240
 
239
- if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
241
+ if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
240
242
  var event = storeElementEvent[keyHandlers];
241
243
  removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
242
244
  }
@@ -250,7 +252,7 @@
250
252
  var $ = getjQuery();
251
253
  var typeEvent = event.replace(stripNameRegex, '');
252
254
  var inNamespace = event !== typeEvent;
253
- var isNative = nativeEvents.indexOf(typeEvent) > -1;
255
+ var isNative = nativeEvents.has(typeEvent);
254
256
  var jQueryEvent;
255
257
  var bubbles = true;
256
258
  var nativeDispatch = true;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap manipulator.js v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap manipulator.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
  */
@@ -9,11 +9,9 @@
9
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());
10
10
  }(this, (function () { 'use strict';
11
11
 
12
- 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); }
13
-
14
12
  /**
15
13
  * --------------------------------------------------------------------------
16
- * Bootstrap (v5.0.0-alpha3): dom/manipulator.js
14
+ * Bootstrap (v5.0.0-beta1): dom/manipulator.js
17
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
18
16
  * --------------------------------------------------------------------------
19
17
  */
@@ -45,25 +43,28 @@
45
43
 
46
44
  var Manipulator = {
47
45
  setDataAttribute: function setDataAttribute(element, key, value) {
48
- element.setAttribute("data-" + normalizeDataKey(key), value);
46
+ element.setAttribute("data-bs-" + normalizeDataKey(key), value);
49
47
  },
50
48
  removeDataAttribute: function removeDataAttribute(element, key) {
51
- element.removeAttribute("data-" + normalizeDataKey(key));
49
+ element.removeAttribute("data-bs-" + normalizeDataKey(key));
52
50
  },
53
51
  getDataAttributes: function getDataAttributes(element) {
54
52
  if (!element) {
55
53
  return {};
56
54
  }
57
55
 
58
- var attributes = _extends({}, element.dataset);
59
-
60
- Object.keys(attributes).forEach(function (key) {
61
- attributes[key] = normalizeData(attributes[key]);
56
+ var attributes = {};
57
+ Object.keys(element.dataset).filter(function (key) {
58
+ return key.startsWith('bs');
59
+ }).forEach(function (key) {
60
+ var pureKey = key.replace(/^bs/, '');
61
+ pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
62
+ attributes[pureKey] = normalizeData(element.dataset[key]);
62
63
  });
63
64
  return attributes;
64
65
  },
65
66
  getDataAttribute: function getDataAttribute(element, key) {
66
- return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
67
+ return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key)));
67
68
  },
68
69
  offset: function offset(element) {
69
70
  var rect = element.getBoundingClientRect();