bootstrap 4.6.2 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
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 +192 -115
  5. data/assets/javascripts/bootstrap/base-component.js +63 -0
  6. data/assets/javascripts/bootstrap/button.js +96 -179
  7. data/assets/javascripts/bootstrap/carousel.js +472 -359
  8. data/assets/javascripts/bootstrap/collapse.js +379 -225
  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 +472 -355
  14. data/assets/javascripts/bootstrap/modal.js +612 -438
  15. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  16. data/assets/javascripts/bootstrap/popover.js +138 -167
  17. data/assets/javascripts/bootstrap/scrollspy.js +250 -192
  18. data/assets/javascripts/bootstrap/tab.js +241 -144
  19. data/assets/javascripts/bootstrap/toast.js +223 -157
  20. data/assets/javascripts/bootstrap/tooltip.js +651 -487
  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 +8 -1
  24. data/assets/javascripts/bootstrap.js +3277 -2590
  25. data/assets/javascripts/bootstrap.min.js +3 -3
  26. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  27. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  28. data/assets/stylesheets/_bootstrap.scss +18 -10
  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 +64 -35
  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 -69
  42. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  43. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  44. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  45. data/assets/stylesheets/bootstrap/_list-group.scss +28 -8
  46. data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
  47. data/assets/stylesheets/bootstrap/_modal.scss +45 -57
  48. data/assets/stylesheets/bootstrap/_nav.scss +20 -6
  49. data/assets/stylesheets/bootstrap/_navbar.scss +45 -71
  50. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  51. data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
  52. data/assets/stylesheets/bootstrap/_popover.scss +24 -36
  53. data/assets/stylesheets/bootstrap/_progress.scss +5 -4
  54. data/assets/stylesheets/bootstrap/_reboot.scss +316 -179
  55. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  56. data/assets/stylesheets/bootstrap/_spinners.scss +11 -7
  57. data/assets/stylesheets/bootstrap/_tables.scss +79 -114
  58. data/assets/stylesheets/bootstrap/_toasts.scss +20 -15
  59. data/assets/stylesheets/bootstrap/_tooltip.scss +21 -21
  60. data/assets/stylesheets/bootstrap/_transitions.scss +2 -7
  61. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  62. data/assets/stylesheets/bootstrap/_utilities.scss +594 -18
  63. data/assets/stylesheets/bootstrap/_variables.scss +800 -485
  64. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  65. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  66. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  67. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  70. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  71. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  72. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  73. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  74. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  75. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  76. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  77. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  78. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  79. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  80. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  81. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
  82. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  83. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
  84. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +71 -48
  85. data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
  86. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  87. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  88. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  89. data/assets/stylesheets/bootstrap/mixins/_forms.scss +39 -97
  90. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  91. data/assets/stylesheets/bootstrap/mixins/_grid.scss +90 -34
  92. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  93. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  94. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  95. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
  96. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
  97. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  98. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  99. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  100. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  101. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  102. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +214 -130
  103. data/bootstrap.gemspec +1 -3
  104. data/lib/bootstrap/version.rb +2 -2
  105. data/tasks/updater/js.rb +19 -16
  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 -189
  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 -211
  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 -132
  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,171 +1,184 @@
1
1
  /*!
2
- * Bootstrap popover.js v4.6.2 (https://getbootstrap.com/)
3
- * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap popover.js v5.0.0 (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('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
- Object.defineProperty(Constructor, "prototype", {
31
- writable: false
32
- });
33
- return Constructor;
34
- }
25
+ const getjQuery = () => {
26
+ const {
27
+ jQuery
28
+ } = window;
35
29
 
36
- function _extends() {
37
- _extends = Object.assign ? Object.assign.bind() : function (target) {
38
- for (var i = 1; i < arguments.length; i++) {
39
- var source = arguments[i];
30
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
31
+ return jQuery;
32
+ }
40
33
 
41
- for (var key in source) {
42
- if (Object.prototype.hasOwnProperty.call(source, key)) {
43
- target[key] = source[key];
44
- }
45
- }
46
- }
34
+ return null;
35
+ };
47
36
 
48
- return target;
49
- };
50
- return _extends.apply(this, arguments);
51
- }
37
+ const onDOMContentLoaded = callback => {
38
+ if (document.readyState === 'loading') {
39
+ document.addEventListener('DOMContentLoaded', callback);
40
+ } else {
41
+ callback();
42
+ }
43
+ };
52
44
 
53
- function _inheritsLoose(subClass, superClass) {
54
- subClass.prototype = Object.create(superClass.prototype);
55
- subClass.prototype.constructor = subClass;
45
+ const defineJQueryPlugin = (name, plugin) => {
46
+ onDOMContentLoaded(() => {
47
+ const $ = getjQuery();
48
+ /* istanbul ignore if */
56
49
 
57
- _setPrototypeOf(subClass, superClass);
58
- }
50
+ if ($) {
51
+ const JQUERY_NO_CONFLICT = $.fn[name];
52
+ $.fn[name] = plugin.jQueryInterface;
53
+ $.fn[name].Constructor = plugin;
59
54
 
60
- function _setPrototypeOf(o, p) {
61
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
62
- o.__proto__ = p;
63
- return o;
64
- };
65
- return _setPrototypeOf(o, p);
66
- }
55
+ $.fn[name].noConflict = () => {
56
+ $.fn[name] = JQUERY_NO_CONFLICT;
57
+ return plugin.jQueryInterface;
58
+ };
59
+ }
60
+ });
61
+ };
67
62
 
68
63
  /**
64
+ * --------------------------------------------------------------------------
65
+ * Bootstrap (v5.0.0): popover.js
66
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
67
+ * --------------------------------------------------------------------------
68
+ */
69
+ /**
70
+ * ------------------------------------------------------------------------
69
71
  * Constants
72
+ * ------------------------------------------------------------------------
70
73
  */
71
74
 
72
- var NAME = 'popover';
73
- var VERSION = '4.6.2';
74
- var DATA_KEY = 'bs.popover';
75
- var EVENT_KEY = "." + DATA_KEY;
76
- var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
77
- var CLASS_PREFIX = 'bs-popover';
78
- var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
79
- var CLASS_NAME_FADE = 'fade';
80
- var CLASS_NAME_SHOW = 'show';
81
- var SELECTOR_TITLE = '.popover-header';
82
- var SELECTOR_CONTENT = '.popover-body';
83
-
84
- 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,
85
81
  placement: 'right',
82
+ offset: [0, 8],
86
83
  trigger: 'click',
87
84
  content: '',
88
- template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
89
- });
90
-
91
- 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,
92
88
  content: '(string|element|function)'
93
- });
94
-
95
- var Event = {
96
- HIDE: "hide" + EVENT_KEY,
97
- HIDDEN: "hidden" + EVENT_KEY,
98
- SHOW: "show" + EVENT_KEY,
99
- SHOWN: "shown" + EVENT_KEY,
100
- INSERTED: "inserted" + EVENT_KEY,
101
- CLICK: "click" + EVENT_KEY,
102
- FOCUSIN: "focusin" + EVENT_KEY,
103
- FOCUSOUT: "focusout" + EVENT_KEY,
104
- MOUSEENTER: "mouseenter" + EVENT_KEY,
105
- MOUSELEAVE: "mouseleave" + EVENT_KEY
106
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';
107
106
  /**
108
- * Class definition
107
+ * ------------------------------------------------------------------------
108
+ * Class Definition
109
+ * ------------------------------------------------------------------------
109
110
  */
110
111
 
111
- var Popover = /*#__PURE__*/function (_Tooltip) {
112
- _inheritsLoose(Popover, _Tooltip);
112
+ class Popover extends Tooltip__default['default'] {
113
+ // Getters
114
+ static get Default() {
115
+ return Default;
116
+ }
117
+
118
+ static get NAME() {
119
+ return NAME;
120
+ }
113
121
 
114
- function Popover() {
115
- return _Tooltip.apply(this, arguments) || this;
122
+ static get DATA_KEY() {
123
+ return DATA_KEY;
116
124
  }
117
125
 
118
- var _proto = Popover.prototype;
126
+ static get Event() {
127
+ return Event;
128
+ }
119
129
 
120
- // Overrides
121
- _proto.isWithContent = function isWithContent() {
122
- return this.getTitle() || this._getContent();
123
- };
130
+ static get EVENT_KEY() {
131
+ return EVENT_KEY;
132
+ }
124
133
 
125
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
126
- $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
127
- };
134
+ static get DefaultType() {
135
+ return DefaultType;
136
+ } // Overrides
128
137
 
129
- _proto.getTipElement = function getTipElement() {
130
- this.tip = this.tip || $__default["default"](this.config.template)[0];
131
- return this.tip;
132
- };
133
138
 
134
- _proto.setContent = function setContent() {
135
- var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events
139
+ isWithContent() {
140
+ return this.getTitle() || this._getContent();
141
+ }
136
142
 
137
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
143
+ setContent() {
144
+ const tip = this.getTipElement(); // we use append for html objects to maintain js events
138
145
 
139
- var content = this._getContent();
146
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle());
147
+
148
+ let content = this._getContent();
140
149
 
141
150
  if (typeof content === 'function') {
142
- content = content.call(this.element);
151
+ content = content.call(this._element);
143
152
  }
144
153
 
145
- this.setElementContent($tip.find(SELECTOR_CONTENT), content);
146
- $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);
147
156
  } // Private
148
- ;
149
157
 
150
- _proto._getContent = function _getContent() {
151
- return this.element.getAttribute('data-content') || this.config.content;
152
- };
153
158
 
154
- _proto._cleanTipClass = function _cleanTipClass() {
155
- var $tip = $__default["default"](this.getTipElement());
156
- 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);
157
170
 
158
171
  if (tabClass !== null && tabClass.length > 0) {
159
- $tip.removeClass(tabClass.join(''));
172
+ tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
160
173
  }
161
174
  } // Static
162
- ;
163
175
 
164
- Popover._jQueryInterface = function _jQueryInterface(config) {
176
+
177
+ static jQueryInterface(config) {
165
178
  return this.each(function () {
166
- var data = $__default["default"](this).data(DATA_KEY);
179
+ let data = Data__default['default'].get(this, DATA_KEY);
167
180
 
168
- var _config = typeof config === 'object' ? config : null;
181
+ const _config = typeof config === 'object' ? config : null;
169
182
 
170
183
  if (!data && /dispose|hide/.test(config)) {
171
184
  return;
@@ -173,72 +186,30 @@
173
186
 
174
187
  if (!data) {
175
188
  data = new Popover(this, _config);
176
- $__default["default"](this).data(DATA_KEY, data);
189
+ Data__default['default'].set(this, DATA_KEY, data);
177
190
  }
178
191
 
179
192
  if (typeof config === 'string') {
180
193
  if (typeof data[config] === 'undefined') {
181
- throw new TypeError("No method named \"" + config + "\"");
194
+ throw new TypeError(`No method named "${config}"`);
182
195
  }
183
196
 
184
197
  data[config]();
185
198
  }
186
199
  });
187
- };
188
-
189
- _createClass(Popover, null, [{
190
- key: "VERSION",
191
- get: // Getters
192
- function get() {
193
- return VERSION;
194
- }
195
- }, {
196
- key: "Default",
197
- get: function get() {
198
- return Default;
199
- }
200
- }, {
201
- key: "NAME",
202
- get: function get() {
203
- return NAME;
204
- }
205
- }, {
206
- key: "DATA_KEY",
207
- get: function get() {
208
- return DATA_KEY;
209
- }
210
- }, {
211
- key: "Event",
212
- get: function get() {
213
- return Event;
214
- }
215
- }, {
216
- key: "EVENT_KEY",
217
- get: function get() {
218
- return EVENT_KEY;
219
- }
220
- }, {
221
- key: "DefaultType",
222
- get: function get() {
223
- return DefaultType;
224
- }
225
- }]);
200
+ }
226
201
 
227
- return Popover;
228
- }(Tooltip__default["default"]);
202
+ }
229
203
  /**
204
+ * ------------------------------------------------------------------------
230
205
  * jQuery
206
+ * ------------------------------------------------------------------------
207
+ * add .Popover to jQuery only if jQuery is present
231
208
  */
232
209
 
233
210
 
234
- $__default["default"].fn[NAME] = Popover._jQueryInterface;
235
- $__default["default"].fn[NAME].Constructor = Popover;
236
-
237
- $__default["default"].fn[NAME].noConflict = function () {
238
- $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
239
- return Popover._jQueryInterface;
240
- };
211
+ defineJQueryPlugin(NAME, Popover);
241
212
 
242
213
  return Popover;
243
214
 
244
- }));
215
+ })));