bootstrap 5.0.0.beta1 → 5.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/README.md +3 -3
  4. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  5. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  6. data/assets/javascripts/bootstrap-sprockets.js +3 -0
  7. data/assets/javascripts/bootstrap.js +429 -486
  8. data/assets/javascripts/bootstrap.min.js +3 -3
  9. data/assets/javascripts/bootstrap/alert.js +81 -80
  10. data/assets/javascripts/bootstrap/base-component.js +75 -0
  11. data/assets/javascripts/bootstrap/button.js +60 -72
  12. data/assets/javascripts/bootstrap/carousel.js +131 -110
  13. data/assets/javascripts/bootstrap/collapse.js +94 -77
  14. data/assets/javascripts/bootstrap/dom/data.js +3 -3
  15. data/assets/javascripts/bootstrap/dom/event-handler.js +6 -5
  16. data/assets/javascripts/bootstrap/dom/manipulator.js +3 -3
  17. data/assets/javascripts/bootstrap/dom/selector-engine.js +6 -11
  18. data/assets/javascripts/bootstrap/dropdown.js +159 -90
  19. data/assets/javascripts/bootstrap/modal.js +132 -125
  20. data/assets/javascripts/bootstrap/popover.js +73 -25
  21. data/assets/javascripts/bootstrap/scrollspy.js +93 -76
  22. data/assets/javascripts/bootstrap/tab.js +78 -82
  23. data/assets/javascripts/bootstrap/toast.js +79 -75
  24. data/assets/javascripts/bootstrap/tooltip.js +207 -185
  25. data/assets/stylesheets/_bootstrap-grid.scss +3 -3
  26. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  27. data/assets/stylesheets/_bootstrap.scss +3 -3
  28. data/assets/stylesheets/bootstrap/_accordion.scss +1 -0
  29. data/assets/stylesheets/bootstrap/_alert.scss +6 -6
  30. data/assets/stylesheets/bootstrap/_carousel.scss +12 -6
  31. data/assets/stylesheets/bootstrap/_close.scss +1 -1
  32. data/assets/stylesheets/bootstrap/_dropdown.scss +29 -15
  33. data/assets/stylesheets/bootstrap/_list-group.scss +5 -5
  34. data/assets/stylesheets/bootstrap/_nav.scss +5 -0
  35. data/assets/stylesheets/bootstrap/_navbar.scss +12 -1
  36. data/assets/stylesheets/bootstrap/_pagination.scss +2 -2
  37. data/assets/stylesheets/bootstrap/_popover.scss +0 -15
  38. data/assets/stylesheets/bootstrap/_reboot.scss +6 -6
  39. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_toasts.scss +1 -0
  41. data/assets/stylesheets/bootstrap/_utilities.scss +6 -0
  42. data/assets/stylesheets/bootstrap/_variables.scss +30 -7
  43. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +5 -5
  44. data/assets/stylesheets/bootstrap/forms/_form-check.scss +1 -0
  45. data/assets/stylesheets/bootstrap/forms/_form-range.scss +1 -1
  46. data/assets/stylesheets/bootstrap/forms/_form-select.scss +1 -2
  47. data/assets/stylesheets/bootstrap/forms/_validation.scss +1 -1
  48. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +2 -2
  49. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +1 -1
  50. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +4 -4
  51. data/assets/stylesheets/bootstrap/mixins/_forms.scss +13 -6
  52. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +4 -0
  53. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +3 -2
  54. data/assets/stylesheets/bootstrap/utilities/_api.scss +1 -1
  55. data/bootstrap.gemspec +1 -3
  56. data/lib/bootstrap/version.rb +2 -2
  57. data/tasks/updater/js.rb +15 -2
  58. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  59. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  60. data/test/dummy_rails/app/views/pages/root.html +89 -0
  61. data/test/dummy_rails/config/application.rb +0 -3
  62. data/test/gemfiles/rails_6_1.gemfile +7 -0
  63. metadata +13 -36
  64. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
@@ -1,13 +1,13 @@
1
1
  /*!
2
- * Bootstrap scrollspy.js v5.0.0-beta1 (https://getbootstrap.com/)
3
- * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap scrollspy.js v5.0.0-beta2 (https://getbootstrap.com/)
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/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', './dom/event-handler', './dom/manipulator', './dom/selector-engine'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
10
- }(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
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'), require('./base-component.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
10
+ }(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
11
11
 
12
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
13
 
@@ -15,10 +15,61 @@
15
15
  var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
16
16
  var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
17
17
  var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
18
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
19
+
20
+ function _defineProperties(target, props) {
21
+ for (var i = 0; i < props.length; i++) {
22
+ var descriptor = props[i];
23
+ descriptor.enumerable = descriptor.enumerable || false;
24
+ descriptor.configurable = true;
25
+ if ("value" in descriptor) descriptor.writable = true;
26
+ Object.defineProperty(target, descriptor.key, descriptor);
27
+ }
28
+ }
29
+
30
+ function _createClass(Constructor, protoProps, staticProps) {
31
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
32
+ if (staticProps) _defineProperties(Constructor, staticProps);
33
+ return Constructor;
34
+ }
35
+
36
+ function _extends() {
37
+ _extends = Object.assign || function (target) {
38
+ for (var i = 1; i < arguments.length; i++) {
39
+ var source = arguments[i];
40
+
41
+ for (var key in source) {
42
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
43
+ target[key] = source[key];
44
+ }
45
+ }
46
+ }
47
+
48
+ return target;
49
+ };
50
+
51
+ return _extends.apply(this, arguments);
52
+ }
53
+
54
+ function _inheritsLoose(subClass, superClass) {
55
+ subClass.prototype = Object.create(superClass.prototype);
56
+ subClass.prototype.constructor = subClass;
57
+
58
+ _setPrototypeOf(subClass, superClass);
59
+ }
60
+
61
+ function _setPrototypeOf(o, p) {
62
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
63
+ o.__proto__ = p;
64
+ return o;
65
+ };
66
+
67
+ return _setPrototypeOf(o, p);
68
+ }
18
69
 
19
70
  /**
20
71
  * --------------------------------------------------------------------------
21
- * Bootstrap (v5.0.0-beta1): util/index.js
72
+ * Bootstrap (v5.0.0-beta2): util/index.js
22
73
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
23
74
  * --------------------------------------------------------------------------
24
75
  */
@@ -50,7 +101,20 @@
50
101
  var selector = element.getAttribute('data-bs-target');
51
102
 
52
103
  if (!selector || selector === '#') {
53
- var hrefAttr = element.getAttribute('href');
104
+ var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
105
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
106
+ // `document.querySelector` will rightfully complain it is invalid.
107
+ // See https://github.com/twbs/bootstrap/issues/32273
108
+
109
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
110
+ return null;
111
+ } // Just in case some CMS puts out a full URL with the anchor appended
112
+
113
+
114
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
115
+ hrefAttr = '#' + hrefAttr.split('#')[1];
116
+ }
117
+
54
118
  selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
55
119
  }
56
120
 
@@ -78,7 +142,7 @@
78
142
  var valueType = value && isElement(value) ? 'element' : toType(value);
79
143
 
80
144
  if (!new RegExp(expectedTypes).test(valueType)) {
81
- throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
145
+ throw new TypeError(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
82
146
  }
83
147
  });
84
148
  };
@@ -102,59 +166,26 @@
102
166
  }
103
167
  };
104
168
 
105
- var isRTL = document.documentElement.dir === 'rtl';
106
-
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
-
109
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
110
- /**
111
- * ------------------------------------------------------------------------
112
- * Constants
113
- * ------------------------------------------------------------------------
114
- */
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;
169
+ document.documentElement.dir === 'rtl';
129
170
 
130
- _proto.dispose = function dispose() {
131
- Data__default['default'].removeData(this._element, this.constructor.DATA_KEY);
132
- this._element = null;
133
- }
134
- /** Static */
135
- ;
171
+ var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) {
172
+ onDOMContentLoaded(function () {
173
+ var $ = getjQuery();
174
+ /* istanbul ignore if */
136
175
 
137
- BaseComponent.getInstance = function getInstance(element) {
138
- return Data__default['default'].getData(element, this.DATA_KEY);
139
- };
176
+ if ($) {
177
+ var JQUERY_NO_CONFLICT = $.fn[name];
178
+ $.fn[name] = plugin.jQueryInterface;
179
+ $.fn[name].Constructor = plugin;
140
180
 
141
- _createClass(BaseComponent, null, [{
142
- key: "VERSION",
143
- get: function get() {
144
- return VERSION;
181
+ $.fn[name].noConflict = function () {
182
+ $.fn[name] = JQUERY_NO_CONFLICT;
183
+ return plugin.jQueryInterface;
184
+ };
145
185
  }
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; }
186
+ });
187
+ };
156
188
 
157
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
158
189
  /**
159
190
  * ------------------------------------------------------------------------
160
191
  * Constants
@@ -209,8 +240,8 @@
209
240
  _this._targets = [];
210
241
  _this._activeTarget = null;
211
242
  _this._scrollHeight = 0;
212
- EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function (event) {
213
- return _this._process(event);
243
+ EventHandler__default['default'].on(_this._scrollElement, EVENT_SCROLL, function () {
244
+ return _this._process();
214
245
  });
215
246
 
216
247
  _this.refresh();
@@ -406,7 +437,7 @@
406
437
  });
407
438
  };
408
439
 
409
- _createClass$1(ScrollSpy, null, [{
440
+ _createClass(ScrollSpy, null, [{
410
441
  key: "Default",
411
442
  get: function get() {
412
443
  return Default;
@@ -419,7 +450,7 @@
419
450
  }]);
420
451
 
421
452
  return ScrollSpy;
422
- }(BaseComponent);
453
+ }(BaseComponent__default['default']);
423
454
  /**
424
455
  * ------------------------------------------------------------------------
425
456
  * Data Api implementation
@@ -439,21 +470,7 @@
439
470
  * add .ScrollSpy to jQuery only if jQuery is present
440
471
  */
441
472
 
442
- onDOMContentLoaded(function () {
443
- var $ = getjQuery();
444
- /* istanbul ignore if */
445
-
446
- if ($) {
447
- var JQUERY_NO_CONFLICT = $.fn[NAME];
448
- $.fn[NAME] = ScrollSpy.jQueryInterface;
449
- $.fn[NAME].Constructor = ScrollSpy;
450
-
451
- $.fn[NAME].noConflict = function () {
452
- $.fn[NAME] = JQUERY_NO_CONFLICT;
453
- return ScrollSpy.jQueryInterface;
454
- };
455
- }
456
- });
473
+ defineJQueryPlugin(NAME, ScrollSpy);
457
474
 
458
475
  return ScrollSpy;
459
476
 
@@ -1,23 +1,56 @@
1
1
  /*!
2
- * Bootstrap tab.js v5.0.0-beta1 (https://getbootstrap.com/)
3
- * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap tab.js v5.0.0-beta2 (https://getbootstrap.com/)
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/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) :
8
- typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
10
- }(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/selector-engine', './base-component'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine, global.Base));
10
+ }(this, (function (Data, EventHandler, SelectorEngine, BaseComponent) { 'use strict';
11
11
 
12
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
13
 
14
14
  var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
15
15
  var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
16
16
  var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
17
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
18
+
19
+ function _defineProperties(target, props) {
20
+ for (var i = 0; i < props.length; i++) {
21
+ var descriptor = props[i];
22
+ descriptor.enumerable = descriptor.enumerable || false;
23
+ descriptor.configurable = true;
24
+ if ("value" in descriptor) descriptor.writable = true;
25
+ Object.defineProperty(target, descriptor.key, descriptor);
26
+ }
27
+ }
28
+
29
+ function _createClass(Constructor, protoProps, staticProps) {
30
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
31
+ if (staticProps) _defineProperties(Constructor, staticProps);
32
+ return Constructor;
33
+ }
34
+
35
+ function _inheritsLoose(subClass, superClass) {
36
+ subClass.prototype = Object.create(superClass.prototype);
37
+ subClass.prototype.constructor = subClass;
38
+
39
+ _setPrototypeOf(subClass, superClass);
40
+ }
41
+
42
+ function _setPrototypeOf(o, p) {
43
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
44
+ o.__proto__ = p;
45
+ return o;
46
+ };
47
+
48
+ return _setPrototypeOf(o, p);
49
+ }
17
50
 
18
51
  /**
19
52
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.0.0-beta1): util/index.js
53
+ * Bootstrap (v5.0.0-beta2): util/index.js
21
54
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
55
  * --------------------------------------------------------------------------
23
56
  */
@@ -28,7 +61,20 @@
28
61
  var selector = element.getAttribute('data-bs-target');
29
62
 
30
63
  if (!selector || selector === '#') {
31
- var hrefAttr = element.getAttribute('href');
64
+ var hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
65
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
66
+ // `document.querySelector` will rightfully complain it is invalid.
67
+ // See https://github.com/twbs/bootstrap/issues/32273
68
+
69
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
70
+ return null;
71
+ } // Just in case some CMS puts out a full URL with the anchor appended
72
+
73
+
74
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
75
+ hrefAttr = '#' + hrefAttr.split('#')[1];
76
+ }
77
+
32
78
  selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
33
79
  }
34
80
 
@@ -108,57 +154,26 @@
108
154
  }
109
155
  };
110
156
 
111
- var isRTL = document.documentElement.dir === 'rtl';
157
+ document.documentElement.dir === 'rtl';
112
158
 
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); } }
159
+ var defineJQueryPlugin = function defineJQueryPlugin(name, plugin) {
160
+ onDOMContentLoaded(function () {
161
+ var $ = getjQuery();
162
+ /* istanbul ignore if */
114
163
 
115
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
116
- /**
117
- * ------------------------------------------------------------------------
118
- * Constants
119
- * ------------------------------------------------------------------------
120
- */
164
+ if ($) {
165
+ var JQUERY_NO_CONFLICT = $.fn[name];
166
+ $.fn[name] = plugin.jQueryInterface;
167
+ $.fn[name].Constructor = plugin;
121
168
 
122
- var VERSION = '5.0.0-beta1';
123
-
124
- var BaseComponent = /*#__PURE__*/function () {
125
- function BaseComponent(element) {
126
- if (!element) {
127
- return;
169
+ $.fn[name].noConflict = function () {
170
+ $.fn[name] = JQUERY_NO_CONFLICT;
171
+ return plugin.jQueryInterface;
172
+ };
128
173
  }
174
+ });
175
+ };
129
176
 
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
177
  /**
163
178
  * ------------------------------------------------------------------------
164
179
  * Constants
@@ -220,14 +235,9 @@
220
235
  previous = previous[previous.length - 1];
221
236
  }
222
237
 
223
- var hideEvent = null;
224
-
225
- if (previous) {
226
- hideEvent = EventHandler__default['default'].trigger(previous, EVENT_HIDE, {
227
- relatedTarget: this._element
228
- });
229
- }
230
-
238
+ var hideEvent = previous ? EventHandler__default['default'].trigger(previous, EVENT_HIDE, {
239
+ relatedTarget: this._element
240
+ }) : null;
231
241
  var showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, {
232
242
  relatedTarget: previous
233
243
  });
@@ -269,7 +279,7 @@
269
279
  if (active && isTransitioning) {
270
280
  var transitionDuration = getTransitionDurationFromElement(active);
271
281
  active.classList.remove(CLASS_NAME_SHOW);
272
- EventHandler__default['default'].one(active, TRANSITION_END, complete);
282
+ EventHandler__default['default'].one(active, 'transitionend', complete);
273
283
  emulateTransitionEnd(active, transitionDuration);
274
284
  } else {
275
285
  complete();
@@ -334,16 +344,16 @@
334
344
  });
335
345
  };
336
346
 
337
- _createClass$1(Tab, null, [{
347
+ _createClass(Tab, null, [{
338
348
  key: "DATA_KEY",
339
- // Getters
340
- get: function get() {
349
+ get: // Getters
350
+ function get() {
341
351
  return DATA_KEY;
342
352
  }
343
353
  }]);
344
354
 
345
355
  return Tab;
346
- }(BaseComponent);
356
+ }(BaseComponent__default['default']);
347
357
  /**
348
358
  * ------------------------------------------------------------------------
349
359
  * Data Api implementation
@@ -363,21 +373,7 @@
363
373
  * add .Tab to jQuery only if jQuery is present
364
374
  */
365
375
 
366
- onDOMContentLoaded(function () {
367
- var $ = getjQuery();
368
- /* istanbul ignore if */
369
-
370
- if ($) {
371
- var JQUERY_NO_CONFLICT = $.fn[NAME];
372
- $.fn[NAME] = Tab.jQueryInterface;
373
- $.fn[NAME].Constructor = Tab;
374
-
375
- $.fn[NAME].noConflict = function () {
376
- $.fn[NAME] = JQUERY_NO_CONFLICT;
377
- return Tab.jQueryInterface;
378
- };
379
- }
380
- });
376
+ defineJQueryPlugin(NAME, Tab);
381
377
 
382
378
  return Tab;
383
379