bootstrap 4.6.0 → 5.0.0

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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/README.md +7 -4
  4. data/assets/javascripts/bootstrap/alert.js +181 -109
  5. data/assets/javascripts/bootstrap/base-component.js +63 -0
  6. data/assets/javascripts/bootstrap/button.js +85 -173
  7. data/assets/javascripts/bootstrap/carousel.js +458 -355
  8. data/assets/javascripts/bootstrap/collapse.js +366 -218
  9. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  10. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  11. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  12. data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
  13. data/assets/javascripts/bootstrap/dropdown.js +459 -351
  14. data/assets/javascripts/bootstrap/modal.js +597 -429
  15. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  16. data/assets/javascripts/bootstrap/popover.js +130 -154
  17. data/assets/javascripts/bootstrap/scrollspy.js +238 -188
  18. data/assets/javascripts/bootstrap/tab.js +235 -137
  19. data/assets/javascripts/bootstrap/toast.js +210 -148
  20. data/assets/javascripts/bootstrap/tooltip.js +627 -466
  21. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  22. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  23. data/assets/javascripts/bootstrap-sprockets.js +15 -8
  24. data/assets/javascripts/bootstrap.js +3174 -2563
  25. data/assets/javascripts/bootstrap.min.js +2 -2
  26. data/assets/stylesheets/_bootstrap-grid.scss +51 -16
  27. data/assets/stylesheets/_bootstrap-reboot.scss +4 -1
  28. data/assets/stylesheets/_bootstrap.scss +16 -8
  29. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  30. data/assets/stylesheets/bootstrap/_alert.scss +15 -10
  31. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  32. data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -17
  33. data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
  34. data/assets/stylesheets/bootstrap/_buttons.scss +29 -60
  35. data/assets/stylesheets/bootstrap/_card.scss +20 -91
  36. data/assets/stylesheets/bootstrap/_carousel.scss +65 -33
  37. data/assets/stylesheets/bootstrap/_close.scss +30 -30
  38. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  39. data/assets/stylesheets/bootstrap/_dropdown.scss +84 -36
  40. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  41. data/assets/stylesheets/bootstrap/_functions.scss +84 -23
  42. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  43. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  44. data/assets/stylesheets/bootstrap/_list-group.scss +28 -8
  45. data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
  46. data/assets/stylesheets/bootstrap/_modal.scss +43 -55
  47. data/assets/stylesheets/bootstrap/_nav.scss +23 -4
  48. data/assets/stylesheets/bootstrap/_navbar.scss +45 -71
  49. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  50. data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
  51. data/assets/stylesheets/bootstrap/_popover.scss +15 -27
  52. data/assets/stylesheets/bootstrap/_progress.scss +5 -4
  53. data/assets/stylesheets/bootstrap/_reboot.scss +316 -179
  54. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  55. data/assets/stylesheets/bootstrap/_spinners.scss +11 -7
  56. data/assets/stylesheets/bootstrap/_tables.scss +79 -114
  57. data/assets/stylesheets/bootstrap/_toasts.scss +20 -15
  58. data/assets/stylesheets/bootstrap/_tooltip.scss +17 -17
  59. data/assets/stylesheets/bootstrap/_transitions.scss +2 -1
  60. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  61. data/assets/stylesheets/bootstrap/_utilities.scss +594 -18
  62. data/assets/stylesheets/bootstrap/_variables.scss +800 -482
  63. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  64. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  65. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  66. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  67. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  70. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  71. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  72. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  73. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  74. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  75. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  76. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  77. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  78. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  79. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  80. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
  81. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  82. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
  83. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +71 -48
  84. data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
  85. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  86. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  87. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  88. data/assets/stylesheets/bootstrap/mixins/_forms.scss +38 -86
  89. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  90. data/assets/stylesheets/bootstrap/mixins/_grid.scss +89 -33
  91. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  92. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  93. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  94. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
  95. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  96. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  97. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  98. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  99. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  100. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  101. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  102. data/bootstrap.gemspec +1 -3
  103. data/lib/bootstrap/version.rb +2 -2
  104. data/tasks/updater/js.rb +20 -5
  105. data/tasks/updater/network.rb +7 -1
  106. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  107. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  108. data/test/dummy_rails/app/views/pages/root.html +89 -0
  109. data/test/dummy_rails/config/application.rb +0 -3
  110. data/test/gemfiles/rails_6_1.gemfile +7 -0
  111. metadata +45 -73
  112. data/assets/javascripts/bootstrap/util.js +0 -192
  113. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  114. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  115. data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
  116. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  117. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  118. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  119. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  120. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  121. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  122. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  123. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  124. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  125. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
  126. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  127. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  128. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  129. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  130. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  131. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  132. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  133. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  134. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  135. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  136. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  137. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  138. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  139. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  140. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  141. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  142. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  143. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  144. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  145. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  146. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  147. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
  148. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  149. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,164 +1,184 @@
1
1
  /*!
2
- * Bootstrap popover.js v4.6.0 (https://getbootstrap.com/)
2
+ * Bootstrap popover.js v5.0.0 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
8
- typeof define === 'function' && define.amd ? define(['jquery', './tooltip'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip));
10
- }(this, (function ($, Tooltip) { 'use strict';
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', './dom/selector-engine', './tooltip'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
10
+ }(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
11
11
 
12
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
13
 
14
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
14
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
15
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
15
16
  var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
16
17
 
17
- function _defineProperties(target, props) {
18
- for (var i = 0; i < props.length; i++) {
19
- var descriptor = props[i];
20
- descriptor.enumerable = descriptor.enumerable || false;
21
- descriptor.configurable = true;
22
- if ("value" in descriptor) descriptor.writable = true;
23
- Object.defineProperty(target, descriptor.key, descriptor);
24
- }
25
- }
18
+ /**
19
+ * --------------------------------------------------------------------------
20
+ * Bootstrap (v5.0.0): util/index.js
21
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
+ * --------------------------------------------------------------------------
23
+ */
26
24
 
27
- function _createClass(Constructor, protoProps, staticProps) {
28
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
29
- if (staticProps) _defineProperties(Constructor, staticProps);
30
- return Constructor;
31
- }
25
+ const getjQuery = () => {
26
+ const {
27
+ jQuery
28
+ } = window;
32
29
 
33
- function _extends() {
34
- _extends = Object.assign || function (target) {
35
- for (var i = 1; i < arguments.length; i++) {
36
- var source = arguments[i];
30
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
31
+ return jQuery;
32
+ }
37
33
 
38
- for (var key in source) {
39
- if (Object.prototype.hasOwnProperty.call(source, key)) {
40
- target[key] = source[key];
41
- }
42
- }
43
- }
34
+ return null;
35
+ };
44
36
 
45
- return target;
46
- };
37
+ const onDOMContentLoaded = callback => {
38
+ if (document.readyState === 'loading') {
39
+ document.addEventListener('DOMContentLoaded', callback);
40
+ } else {
41
+ callback();
42
+ }
43
+ };
47
44
 
48
- return _extends.apply(this, arguments);
49
- }
45
+ const defineJQueryPlugin = (name, plugin) => {
46
+ onDOMContentLoaded(() => {
47
+ const $ = getjQuery();
48
+ /* istanbul ignore if */
50
49
 
51
- function _inheritsLoose(subClass, superClass) {
52
- subClass.prototype = Object.create(superClass.prototype);
53
- subClass.prototype.constructor = subClass;
54
- subClass.__proto__ = superClass;
55
- }
50
+ if ($) {
51
+ const JQUERY_NO_CONFLICT = $.fn[name];
52
+ $.fn[name] = plugin.jQueryInterface;
53
+ $.fn[name].Constructor = plugin;
54
+
55
+ $.fn[name].noConflict = () => {
56
+ $.fn[name] = JQUERY_NO_CONFLICT;
57
+ return plugin.jQueryInterface;
58
+ };
59
+ }
60
+ });
61
+ };
56
62
 
63
+ /**
64
+ * --------------------------------------------------------------------------
65
+ * Bootstrap (v5.0.0): popover.js
66
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
67
+ * --------------------------------------------------------------------------
68
+ */
57
69
  /**
58
70
  * ------------------------------------------------------------------------
59
71
  * Constants
60
72
  * ------------------------------------------------------------------------
61
73
  */
62
74
 
63
- var NAME = 'popover';
64
- var VERSION = '4.6.0';
65
- var DATA_KEY = 'bs.popover';
66
- var EVENT_KEY = "." + DATA_KEY;
67
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
68
- var CLASS_PREFIX = 'bs-popover';
69
- var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
70
-
71
- var Default = _extends({}, Tooltip__default['default'].Default, {
75
+ const NAME = 'popover';
76
+ const DATA_KEY = 'bs.popover';
77
+ const EVENT_KEY = `.${DATA_KEY}`;
78
+ const CLASS_PREFIX = 'bs-popover';
79
+ const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
80
+ const Default = { ...Tooltip__default['default'].Default,
72
81
  placement: 'right',
82
+ offset: [0, 8],
73
83
  trigger: 'click',
74
84
  content: '',
75
- template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
76
- });
77
-
78
- var DefaultType = _extends({}, Tooltip__default['default'].DefaultType, {
85
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
86
+ };
87
+ const DefaultType = { ...Tooltip__default['default'].DefaultType,
79
88
  content: '(string|element|function)'
80
- });
81
-
82
- var CLASS_NAME_FADE = 'fade';
83
- var CLASS_NAME_SHOW = 'show';
84
- var SELECTOR_TITLE = '.popover-header';
85
- var SELECTOR_CONTENT = '.popover-body';
86
- var Event = {
87
- HIDE: "hide" + EVENT_KEY,
88
- HIDDEN: "hidden" + EVENT_KEY,
89
- SHOW: "show" + EVENT_KEY,
90
- SHOWN: "shown" + EVENT_KEY,
91
- INSERTED: "inserted" + EVENT_KEY,
92
- CLICK: "click" + EVENT_KEY,
93
- FOCUSIN: "focusin" + EVENT_KEY,
94
- FOCUSOUT: "focusout" + EVENT_KEY,
95
- MOUSEENTER: "mouseenter" + EVENT_KEY,
96
- MOUSELEAVE: "mouseleave" + EVENT_KEY
97
89
  };
90
+ const Event = {
91
+ HIDE: `hide${EVENT_KEY}`,
92
+ HIDDEN: `hidden${EVENT_KEY}`,
93
+ SHOW: `show${EVENT_KEY}`,
94
+ SHOWN: `shown${EVENT_KEY}`,
95
+ INSERTED: `inserted${EVENT_KEY}`,
96
+ CLICK: `click${EVENT_KEY}`,
97
+ FOCUSIN: `focusin${EVENT_KEY}`,
98
+ FOCUSOUT: `focusout${EVENT_KEY}`,
99
+ MOUSEENTER: `mouseenter${EVENT_KEY}`,
100
+ MOUSELEAVE: `mouseleave${EVENT_KEY}`
101
+ };
102
+ const CLASS_NAME_FADE = 'fade';
103
+ const CLASS_NAME_SHOW = 'show';
104
+ const SELECTOR_TITLE = '.popover-header';
105
+ const SELECTOR_CONTENT = '.popover-body';
98
106
  /**
99
107
  * ------------------------------------------------------------------------
100
108
  * Class Definition
101
109
  * ------------------------------------------------------------------------
102
110
  */
103
111
 
104
- var Popover = /*#__PURE__*/function (_Tooltip) {
105
- _inheritsLoose(Popover, _Tooltip);
112
+ class Popover extends Tooltip__default['default'] {
113
+ // Getters
114
+ static get Default() {
115
+ return Default;
116
+ }
106
117
 
107
- function Popover() {
108
- return _Tooltip.apply(this, arguments) || this;
118
+ static get NAME() {
119
+ return NAME;
109
120
  }
110
121
 
111
- var _proto = Popover.prototype;
122
+ static get DATA_KEY() {
123
+ return DATA_KEY;
124
+ }
112
125
 
113
- // Overrides
114
- _proto.isWithContent = function isWithContent() {
115
- return this.getTitle() || this._getContent();
116
- };
126
+ static get Event() {
127
+ return Event;
128
+ }
129
+
130
+ static get EVENT_KEY() {
131
+ return EVENT_KEY;
132
+ }
133
+
134
+ static get DefaultType() {
135
+ return DefaultType;
136
+ } // Overrides
117
137
 
118
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
119
- $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
120
- };
121
138
 
122
- _proto.getTipElement = function getTipElement() {
123
- this.tip = this.tip || $__default['default'](this.config.template)[0];
124
- return this.tip;
125
- };
139
+ isWithContent() {
140
+ return this.getTitle() || this._getContent();
141
+ }
126
142
 
127
- _proto.setContent = function setContent() {
128
- var $tip = $__default['default'](this.getTipElement()); // We use append for html objects to maintain js events
143
+ setContent() {
144
+ const tip = this.getTipElement(); // we use append for html objects to maintain js events
129
145
 
130
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
146
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle());
131
147
 
132
- var content = this._getContent();
148
+ let content = this._getContent();
133
149
 
134
150
  if (typeof content === 'function') {
135
- content = content.call(this.element);
151
+ content = content.call(this._element);
136
152
  }
137
153
 
138
- this.setElementContent($tip.find(SELECTOR_CONTENT), content);
139
- $tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
154
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content);
155
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
140
156
  } // Private
141
- ;
142
157
 
143
- _proto._getContent = function _getContent() {
144
- return this.element.getAttribute('data-content') || this.config.content;
145
- };
146
158
 
147
- _proto._cleanTipClass = function _cleanTipClass() {
148
- var $tip = $__default['default'](this.getTipElement());
149
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
159
+ _addAttachmentClass(attachment) {
160
+ this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
161
+ }
162
+
163
+ _getContent() {
164
+ return this._element.getAttribute('data-bs-content') || this.config.content;
165
+ }
166
+
167
+ _cleanTipClass() {
168
+ const tip = this.getTipElement();
169
+ const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
150
170
 
151
171
  if (tabClass !== null && tabClass.length > 0) {
152
- $tip.removeClass(tabClass.join(''));
172
+ tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
153
173
  }
154
174
  } // Static
155
- ;
156
175
 
157
- Popover._jQueryInterface = function _jQueryInterface(config) {
176
+
177
+ static jQueryInterface(config) {
158
178
  return this.each(function () {
159
- var data = $__default['default'](this).data(DATA_KEY);
179
+ let data = Data__default['default'].get(this, DATA_KEY);
160
180
 
161
- var _config = typeof config === 'object' ? config : null;
181
+ const _config = typeof config === 'object' ? config : null;
162
182
 
163
183
  if (!data && /dispose|hide/.test(config)) {
164
184
  return;
@@ -166,73 +186,29 @@
166
186
 
167
187
  if (!data) {
168
188
  data = new Popover(this, _config);
169
- $__default['default'](this).data(DATA_KEY, data);
189
+ Data__default['default'].set(this, DATA_KEY, data);
170
190
  }
171
191
 
172
192
  if (typeof config === 'string') {
173
193
  if (typeof data[config] === 'undefined') {
174
- throw new TypeError("No method named \"" + config + "\"");
194
+ throw new TypeError(`No method named "${config}"`);
175
195
  }
176
196
 
177
197
  data[config]();
178
198
  }
179
199
  });
180
- };
181
-
182
- _createClass(Popover, null, [{
183
- key: "VERSION",
184
- // Getters
185
- get: function get() {
186
- return VERSION;
187
- }
188
- }, {
189
- key: "Default",
190
- get: function get() {
191
- return Default;
192
- }
193
- }, {
194
- key: "NAME",
195
- get: function get() {
196
- return NAME;
197
- }
198
- }, {
199
- key: "DATA_KEY",
200
- get: function get() {
201
- return DATA_KEY;
202
- }
203
- }, {
204
- key: "Event",
205
- get: function get() {
206
- return Event;
207
- }
208
- }, {
209
- key: "EVENT_KEY",
210
- get: function get() {
211
- return EVENT_KEY;
212
- }
213
- }, {
214
- key: "DefaultType",
215
- get: function get() {
216
- return DefaultType;
217
- }
218
- }]);
200
+ }
219
201
 
220
- return Popover;
221
- }(Tooltip__default['default']);
202
+ }
222
203
  /**
223
204
  * ------------------------------------------------------------------------
224
205
  * jQuery
225
206
  * ------------------------------------------------------------------------
207
+ * add .Popover to jQuery only if jQuery is present
226
208
  */
227
209
 
228
210
 
229
- $__default['default'].fn[NAME] = Popover._jQueryInterface;
230
- $__default['default'].fn[NAME].Constructor = Popover;
231
-
232
- $__default['default'].fn[NAME].noConflict = function () {
233
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
234
- return Popover._jQueryInterface;
235
- };
211
+ defineJQueryPlugin(NAME, Popover);
236
212
 
237
213
  return Popover;
238
214