bootstrap 4.6.0 → 5.0.0.alpha1

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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +12 -8
  4. data/assets/javascripts/bootstrap.js +1889 -1255
  5. data/assets/javascripts/bootstrap.min.js +3 -3
  6. data/assets/javascripts/bootstrap/alert.js +136 -66
  7. data/assets/javascripts/bootstrap/button.js +59 -147
  8. data/assets/javascripts/bootstrap/carousel.js +276 -180
  9. data/assets/javascripts/bootstrap/collapse.js +284 -136
  10. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  11. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  12. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  13. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +238 -195
  16. data/assets/javascripts/bootstrap/modal.js +321 -223
  17. data/assets/javascripts/bootstrap/popover.js +75 -79
  18. data/assets/javascripts/bootstrap/scrollspy.js +150 -86
  19. data/assets/javascripts/bootstrap/tab.js +154 -82
  20. data/assets/javascripts/bootstrap/toast.js +162 -95
  21. data/assets/javascripts/bootstrap/tooltip.js +337 -191
  22. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  23. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  24. data/assets/stylesheets/_bootstrap.scss +16 -10
  25. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  26. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  27. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  28. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  29. data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
  30. data/assets/stylesheets/bootstrap/_card.scss +22 -68
  31. data/assets/stylesheets/bootstrap/_carousel.scss +13 -15
  32. data/assets/stylesheets/bootstrap/_close.scss +9 -13
  33. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
  35. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  36. data/assets/stylesheets/bootstrap/_functions.scss +82 -23
  37. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  38. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  39. data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
  40. data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
  41. data/assets/stylesheets/bootstrap/_modal.scss +34 -39
  42. data/assets/stylesheets/bootstrap/_nav.scss +7 -4
  43. data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
  44. data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
  45. data/assets/stylesheets/bootstrap/_popover.scss +5 -5
  46. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  47. data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
  48. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  49. data/assets/stylesheets/bootstrap/_spinners.scss +4 -13
  50. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  51. data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
  52. data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
  53. data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
  54. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  55. data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
  56. data/assets/stylesheets/bootstrap/_variables.scss +546 -432
  57. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  58. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  59. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  64. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  65. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  66. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  67. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  68. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  69. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  70. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  71. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  72. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  73. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  74. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  75. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  77. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  78. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  79. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  80. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  81. data/assets/stylesheets/bootstrap/mixins/_forms.scss +22 -74
  82. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  83. data/assets/stylesheets/bootstrap/mixins/_grid.scss +85 -33
  84. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  85. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  86. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  87. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  88. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  89. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +17 -23
  90. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  91. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  92. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  93. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  94. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  95. data/lib/bootstrap/version.rb +2 -2
  96. data/tasks/updater/js.rb +3 -3
  97. metadata +32 -40
  98. data/assets/javascripts/bootstrap/util.js +0 -192
  99. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  100. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  101. data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
  102. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  103. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  104. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  105. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  106. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  107. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  108. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  109. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  110. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  111. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  112. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  113. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  114. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  115. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  116. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  117. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  118. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  119. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  120. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  121. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  122. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  123. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  124. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  125. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  126. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  127. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  128. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  129. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  130. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  131. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  132. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -1,95 +1,159 @@
1
1
  /*!
2
- * Bootstrap tooltip.js v4.6.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap tooltip.js v5.0.0-alpha1 (https://getbootstrap.com/)
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
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
8
- typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
10
- }(this, (function ($, Popper, Util) { 'use strict';
11
-
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
15
- var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
16
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
17
-
18
- function _defineProperties(target, props) {
19
- for (var i = 0; i < props.length; i++) {
20
- var descriptor = props[i];
21
- descriptor.enumerable = descriptor.enumerable || false;
22
- descriptor.configurable = true;
23
- if ("value" in descriptor) descriptor.writable = true;
24
- Object.defineProperty(target, descriptor.key, descriptor);
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selector-engine.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.js', './dom/selector-engine.js'], factory) :
9
+ (global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
10
+ }(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
11
+
12
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
13
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
14
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
15
+ Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
16
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
17
+
18
+ /**
19
+ * --------------------------------------------------------------------------
20
+ * Bootstrap (v5.0.0-alpha1): util/index.js
21
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
+ * --------------------------------------------------------------------------
23
+ */
24
+ var MAX_UID = 1000000;
25
+ var MILLISECONDS_MULTIPLIER = 1000;
26
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
27
+
28
+ var toType = function toType(obj) {
29
+ if (obj === null || obj === undefined) {
30
+ return "" + obj;
25
31
  }
26
- }
27
32
 
28
- function _createClass(Constructor, protoProps, staticProps) {
29
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
30
- if (staticProps) _defineProperties(Constructor, staticProps);
31
- return Constructor;
32
- }
33
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
34
+ };
35
+ /**
36
+ * --------------------------------------------------------------------------
37
+ * Public Util Api
38
+ * --------------------------------------------------------------------------
39
+ */
33
40
 
34
- function _extends() {
35
- _extends = Object.assign || function (target) {
36
- for (var i = 1; i < arguments.length; i++) {
37
- var source = arguments[i];
38
41
 
39
- for (var key in source) {
40
- if (Object.prototype.hasOwnProperty.call(source, key)) {
41
- target[key] = source[key];
42
- }
43
- }
42
+ var getUID = function getUID(prefix) {
43
+ do {
44
+ prefix += Math.floor(Math.random() * MAX_UID);
45
+ } while (document.getElementById(prefix));
46
+
47
+ return prefix;
48
+ };
49
+
50
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
51
+ if (!element) {
52
+ return 0;
53
+ } // Get transition-duration of the element
54
+
55
+
56
+ var _window$getComputedSt = window.getComputedStyle(element),
57
+ transitionDuration = _window$getComputedSt.transitionDuration,
58
+ transitionDelay = _window$getComputedSt.transitionDelay;
59
+
60
+ var floatTransitionDuration = parseFloat(transitionDuration);
61
+ var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
62
+
63
+ if (!floatTransitionDuration && !floatTransitionDelay) {
64
+ return 0;
65
+ } // If multiple durations are defined, take the first
66
+
67
+
68
+ transitionDuration = transitionDuration.split(',')[0];
69
+ transitionDelay = transitionDelay.split(',')[0];
70
+ return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
71
+ };
72
+
73
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
74
+ element.dispatchEvent(new Event(TRANSITION_END));
75
+ };
76
+
77
+ var isElement = function isElement(obj) {
78
+ return (obj[0] || obj).nodeType;
79
+ };
80
+
81
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
82
+ var called = false;
83
+ var durationPadding = 5;
84
+ var emulatedDuration = duration + durationPadding;
85
+
86
+ function listener() {
87
+ called = true;
88
+ element.removeEventListener(TRANSITION_END, listener);
89
+ }
90
+
91
+ element.addEventListener(TRANSITION_END, listener);
92
+ setTimeout(function () {
93
+ if (!called) {
94
+ triggerTransitionEnd(element);
44
95
  }
96
+ }, emulatedDuration);
97
+ };
45
98
 
46
- return target;
47
- };
99
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
100
+ Object.keys(configTypes).forEach(function (property) {
101
+ var expectedTypes = configTypes[property];
102
+ var value = config[property];
103
+ var valueType = value && isElement(value) ? 'element' : toType(value);
48
104
 
49
- return _extends.apply(this, arguments);
50
- }
105
+ if (!new RegExp(expectedTypes).test(valueType)) {
106
+ throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
107
+ }
108
+ });
109
+ };
110
+
111
+ var findShadowRoot = function findShadowRoot(element) {
112
+ if (!document.documentElement.attachShadow) {
113
+ return null;
114
+ } // Can find the shadow root otherwise it'll return the document
115
+
116
+
117
+ if (typeof element.getRootNode === 'function') {
118
+ var root = element.getRootNode();
119
+ return root instanceof ShadowRoot ? root : null;
120
+ }
121
+
122
+ if (element instanceof ShadowRoot) {
123
+ return element;
124
+ } // when we don't find a shadow root
125
+
126
+
127
+ if (!element.parentNode) {
128
+ return null;
129
+ }
130
+
131
+ return findShadowRoot(element.parentNode);
132
+ };
133
+
134
+ var noop = function noop() {
135
+ return function () {};
136
+ };
137
+
138
+ var getjQuery = function getjQuery() {
139
+ var _window = window,
140
+ jQuery = _window.jQuery;
141
+
142
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
143
+ return jQuery;
144
+ }
145
+
146
+ return null;
147
+ };
51
148
 
52
149
  /**
53
150
  * --------------------------------------------------------------------------
54
- * Bootstrap (v4.6.0): tools/sanitizer.js
151
+ * Bootstrap (v5.0.0-alpha1): util/sanitizer.js
55
152
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
56
153
  * --------------------------------------------------------------------------
57
154
  */
58
155
  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
59
156
  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
60
- var DefaultWhitelist = {
61
- // Global attributes allowed on any supplied element below.
62
- '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
63
- a: ['target', 'href', 'title', 'rel'],
64
- area: [],
65
- b: [],
66
- br: [],
67
- col: [],
68
- code: [],
69
- div: [],
70
- em: [],
71
- hr: [],
72
- h1: [],
73
- h2: [],
74
- h3: [],
75
- h4: [],
76
- h5: [],
77
- h6: [],
78
- i: [],
79
- img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
80
- li: [],
81
- ol: [],
82
- p: [],
83
- pre: [],
84
- s: [],
85
- small: [],
86
- span: [],
87
- sub: [],
88
- sup: [],
89
- strong: [],
90
- u: [],
91
- ul: []
92
- };
93
157
  /**
94
158
  * A pattern that recognizes a commonly useful subset of URLs that are safe.
95
159
  *
@@ -105,7 +169,7 @@
105
169
 
106
170
  var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
107
171
 
108
- function allowedAttribute(attr, allowedAttributeList) {
172
+ var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
109
173
  var attrName = attr.nodeName.toLowerCase();
110
174
 
111
175
  if (allowedAttributeList.indexOf(attrName) !== -1) {
@@ -127,10 +191,45 @@
127
191
  }
128
192
 
129
193
  return false;
130
- }
194
+ };
131
195
 
196
+ var DefaultWhitelist = {
197
+ // Global attributes allowed on any supplied element below.
198
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
199
+ a: ['target', 'href', 'title', 'rel'],
200
+ area: [],
201
+ b: [],
202
+ br: [],
203
+ col: [],
204
+ code: [],
205
+ div: [],
206
+ em: [],
207
+ hr: [],
208
+ h1: [],
209
+ h2: [],
210
+ h3: [],
211
+ h4: [],
212
+ h5: [],
213
+ h6: [],
214
+ i: [],
215
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
216
+ li: [],
217
+ ol: [],
218
+ p: [],
219
+ pre: [],
220
+ s: [],
221
+ small: [],
222
+ span: [],
223
+ sub: [],
224
+ sup: [],
225
+ strong: [],
226
+ u: [],
227
+ ul: []
228
+ };
132
229
  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
133
- if (unsafeHtml.length === 0) {
230
+ var _ref;
231
+
232
+ if (!unsafeHtml.length) {
134
233
  return unsafeHtml;
135
234
  }
136
235
 
@@ -141,18 +240,22 @@
141
240
  var domParser = new window.DOMParser();
142
241
  var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
143
242
  var whitelistKeys = Object.keys(whiteList);
144
- var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
243
+
244
+ var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
145
245
 
146
246
  var _loop = function _loop(i, len) {
247
+ var _ref2;
248
+
147
249
  var el = elements[i];
148
250
  var elName = el.nodeName.toLowerCase();
149
251
 
150
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
252
+ if (whitelistKeys.indexOf(elName) === -1) {
151
253
  el.parentNode.removeChild(el);
152
254
  return "continue";
153
255
  }
154
256
 
155
- var attributeList = [].slice.call(el.attributes);
257
+ var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
258
+
156
259
  var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
157
260
  attributeList.forEach(function (attr) {
158
261
  if (!allowedAttribute(attr, whitelistedAttributes)) {
@@ -170,6 +273,15 @@
170
273
  return createdDocument.body.innerHTML;
171
274
  }
172
275
 
276
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
277
+
278
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
279
+
280
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
281
+
282
+ 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); } }
283
+
284
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
173
285
  /**
174
286
  * ------------------------------------------------------------------------
175
287
  * Constants
@@ -177,10 +289,9 @@
177
289
  */
178
290
 
179
291
  var NAME = 'tooltip';
180
- var VERSION = '4.6.0';
292
+ var VERSION = '5.0.0-alpha1';
181
293
  var DATA_KEY = 'bs.tooltip';
182
294
  var EVENT_KEY = "." + DATA_KEY;
183
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
184
295
  var CLASS_PREFIX = 'bs-tooltip';
185
296
  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
186
297
  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@@ -197,7 +308,6 @@
197
308
  container: '(string|element|boolean)',
198
309
  fallbackPlacement: '(string|array)',
199
310
  boundary: '(string|element)',
200
- customClass: '(string|function)',
201
311
  sanitize: 'boolean',
202
312
  sanitizeFn: '(null|function)',
203
313
  whiteList: 'object',
@@ -212,7 +322,7 @@
212
322
  };
213
323
  var Default = {
214
324
  animation: true,
215
- template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
325
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
216
326
  trigger: 'hover focus',
217
327
  title: '',
218
328
  delay: 0,
@@ -223,15 +333,12 @@
223
333
  container: false,
224
334
  fallbackPlacement: 'flip',
225
335
  boundary: 'scrollParent',
226
- customClass: '',
227
336
  sanitize: true,
228
337
  sanitizeFn: null,
229
338
  whiteList: DefaultWhitelist,
230
339
  popperConfig: null
231
340
  };
232
- var HOVER_STATE_SHOW = 'show';
233
- var HOVER_STATE_OUT = 'out';
234
- var Event = {
341
+ var Event$1 = {
235
342
  HIDE: "hide" + EVENT_KEY,
236
343
  HIDDEN: "hidden" + EVENT_KEY,
237
344
  SHOW: "show" + EVENT_KEY,
@@ -244,9 +351,11 @@
244
351
  MOUSELEAVE: "mouseleave" + EVENT_KEY
245
352
  };
246
353
  var CLASS_NAME_FADE = 'fade';
354
+ var CLASS_NAME_MODAL = 'modal';
247
355
  var CLASS_NAME_SHOW = 'show';
356
+ var HOVER_STATE_SHOW = 'show';
357
+ var HOVER_STATE_OUT = 'out';
248
358
  var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
249
- var SELECTOR_ARROW = '.arrow';
250
359
  var TRIGGER_HOVER = 'hover';
251
360
  var TRIGGER_FOCUS = 'focus';
252
361
  var TRIGGER_CLICK = 'click';
@@ -259,8 +368,8 @@
259
368
 
260
369
  var Tooltip = /*#__PURE__*/function () {
261
370
  function Tooltip(element, config) {
262
- if (typeof Popper__default['default'] === 'undefined') {
263
- throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
371
+ if (typeof Popper === 'undefined') {
372
+ throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
264
373
  } // private
265
374
 
266
375
 
@@ -275,6 +384,8 @@
275
384
  this.tip = null;
276
385
 
277
386
  this._setListeners();
387
+
388
+ Data.setData(element, this.constructor.DATA_KEY, this);
278
389
  } // Getters
279
390
 
280
391
 
@@ -300,11 +411,11 @@
300
411
 
301
412
  if (event) {
302
413
  var dataKey = this.constructor.DATA_KEY;
303
- var context = $__default['default'](event.currentTarget).data(dataKey);
414
+ var context = Data.getData(event.target, dataKey);
304
415
 
305
416
  if (!context) {
306
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
307
- $__default['default'](event.currentTarget).data(dataKey, context);
417
+ context = new this.constructor(event.target, this._getDelegateConfig());
418
+ Data.setData(event.target, dataKey, context);
308
419
  }
309
420
 
310
421
  context._activeTrigger.click = !context._activeTrigger.click;
@@ -315,7 +426,7 @@
315
426
  context._leave(null, context);
316
427
  }
317
428
  } else {
318
- if ($__default['default'](this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
429
+ if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
319
430
  this._leave(null, this);
320
431
 
321
432
  return;
@@ -327,12 +438,12 @@
327
438
 
328
439
  _proto.dispose = function dispose() {
329
440
  clearTimeout(this._timeout);
330
- $__default['default'].removeData(this.element, this.constructor.DATA_KEY);
331
- $__default['default'](this.element).off(this.constructor.EVENT_KEY);
332
- $__default['default'](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
441
+ Data.removeData(this.element, this.constructor.DATA_KEY);
442
+ EventHandler.off(this.element, this.constructor.EVENT_KEY);
443
+ EventHandler.off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
333
444
 
334
445
  if (this.tip) {
335
- $__default['default'](this.tip).remove();
446
+ this.tip.parentNode.removeChild(this.tip);
336
447
  }
337
448
 
338
449
  this._isEnabled = null;
@@ -353,55 +464,56 @@
353
464
  _proto.show = function show() {
354
465
  var _this = this;
355
466
 
356
- if ($__default['default'](this.element).css('display') === 'none') {
467
+ if (this.element.style.display === 'none') {
357
468
  throw new Error('Please use show on visible elements');
358
469
  }
359
470
 
360
- var showEvent = $__default['default'].Event(this.constructor.Event.SHOW);
361
-
362
471
  if (this.isWithContent() && this._isEnabled) {
363
- $__default['default'](this.element).trigger(showEvent);
364
- var shadowRoot = Util__default['default'].findShadowRoot(this.element);
365
- var isInTheDom = $__default['default'].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
472
+ var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
473
+ var shadowRoot = findShadowRoot(this.element);
474
+ var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
366
475
 
367
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
476
+ if (showEvent.defaultPrevented || !isInTheDom) {
368
477
  return;
369
478
  }
370
479
 
371
480
  var tip = this.getTipElement();
372
- var tipId = Util__default['default'].getUID(this.constructor.NAME);
481
+ var tipId = getUID(this.constructor.NAME);
373
482
  tip.setAttribute('id', tipId);
374
483
  this.element.setAttribute('aria-describedby', tipId);
375
484
  this.setContent();
376
485
 
377
486
  if (this.config.animation) {
378
- $__default['default'](tip).addClass(CLASS_NAME_FADE);
487
+ tip.classList.add(CLASS_NAME_FADE);
379
488
  }
380
489
 
381
490
  var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
382
491
 
383
492
  var attachment = this._getAttachment(placement);
384
493
 
385
- this.addAttachmentClass(attachment);
494
+ this._addAttachmentClass(attachment);
386
495
 
387
496
  var container = this._getContainer();
388
497
 
389
- $__default['default'](tip).data(this.constructor.DATA_KEY, this);
498
+ Data.setData(tip, this.constructor.DATA_KEY, this);
390
499
 
391
- if (!$__default['default'].contains(this.element.ownerDocument.documentElement, this.tip)) {
392
- $__default['default'](tip).appendTo(container);
500
+ if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
501
+ container.appendChild(tip);
393
502
  }
394
503
 
395
- $__default['default'](this.element).trigger(this.constructor.Event.INSERTED);
396
- this._popper = new Popper__default['default'](this.element, tip, this._getPopperConfig(attachment));
397
- $__default['default'](tip).addClass(CLASS_NAME_SHOW);
398
- $__default['default'](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
504
+ EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
505
+ this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
506
+ tip.classList.add(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
399
507
  // empty mouseover listeners to the body's immediate children;
400
508
  // only needed because of broken event delegation on iOS
401
509
  // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
402
510
 
403
511
  if ('ontouchstart' in document.documentElement) {
404
- $__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
512
+ var _ref;
513
+
514
+ (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
515
+ EventHandler.on(element, 'mouseover', noop());
516
+ });
405
517
  }
406
518
 
407
519
  var complete = function complete() {
@@ -411,27 +523,27 @@
411
523
 
412
524
  var prevHoverState = _this._hoverState;
413
525
  _this._hoverState = null;
414
- $__default['default'](_this.element).trigger(_this.constructor.Event.SHOWN);
526
+ EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
415
527
 
416
528
  if (prevHoverState === HOVER_STATE_OUT) {
417
529
  _this._leave(null, _this);
418
530
  }
419
531
  };
420
532
 
421
- if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)) {
422
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this.tip);
423
- $__default['default'](this.tip).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
533
+ if (this.tip.classList.contains(CLASS_NAME_FADE)) {
534
+ var transitionDuration = getTransitionDurationFromElement(this.tip);
535
+ EventHandler.one(this.tip, TRANSITION_END, complete);
536
+ emulateTransitionEnd(this.tip, transitionDuration);
424
537
  } else {
425
538
  complete();
426
539
  }
427
540
  }
428
541
  };
429
542
 
430
- _proto.hide = function hide(callback) {
543
+ _proto.hide = function hide() {
431
544
  var _this2 = this;
432
545
 
433
546
  var tip = this.getTipElement();
434
- var hideEvent = $__default['default'].Event(this.constructor.Event.HIDE);
435
547
 
436
548
  var complete = function complete() {
437
549
  if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
@@ -442,37 +554,36 @@
442
554
 
443
555
  _this2.element.removeAttribute('aria-describedby');
444
556
 
445
- $__default['default'](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
557
+ EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
446
558
 
447
- if (_this2._popper !== null) {
448
- _this2._popper.destroy();
449
- }
450
-
451
- if (callback) {
452
- callback();
453
- }
559
+ _this2._popper.destroy();
454
560
  };
455
561
 
456
- $__default['default'](this.element).trigger(hideEvent);
562
+ var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
457
563
 
458
- if (hideEvent.isDefaultPrevented()) {
564
+ if (hideEvent.defaultPrevented) {
459
565
  return;
460
566
  }
461
567
 
462
- $__default['default'](tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
568
+ tip.classList.remove(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
463
569
  // empty mouseover listeners we added for iOS support
464
570
 
465
571
  if ('ontouchstart' in document.documentElement) {
466
- $__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
572
+ var _ref2;
573
+
574
+ (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
575
+ return EventHandler.off(element, 'mouseover', noop);
576
+ });
467
577
  }
468
578
 
469
579
  this._activeTrigger[TRIGGER_CLICK] = false;
470
580
  this._activeTrigger[TRIGGER_FOCUS] = false;
471
581
  this._activeTrigger[TRIGGER_HOVER] = false;
472
582
 
473
- if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)) {
474
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(tip);
475
- $__default['default'](tip).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
583
+ if (this.tip.classList.contains(CLASS_NAME_FADE)) {
584
+ var transitionDuration = getTransitionDurationFromElement(tip);
585
+ EventHandler.one(tip, TRANSITION_END, complete);
586
+ emulateTransitionEnd(tip, transitionDuration);
476
587
  } else {
477
588
  complete();
478
589
  }
@@ -491,30 +602,41 @@
491
602
  return Boolean(this.getTitle());
492
603
  };
493
604
 
494
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
495
- $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
496
- };
497
-
498
605
  _proto.getTipElement = function getTipElement() {
499
- this.tip = this.tip || $__default['default'](this.config.template)[0];
606
+ if (this.tip) {
607
+ return this.tip;
608
+ }
609
+
610
+ var element = document.createElement('div');
611
+ element.innerHTML = this.config.template;
612
+ this.tip = element.children[0];
500
613
  return this.tip;
501
614
  };
502
615
 
503
616
  _proto.setContent = function setContent() {
504
617
  var tip = this.getTipElement();
505
- this.setElementContent($__default['default'](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
506
- $__default['default'](tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
618
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
619
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
507
620
  };
508
621
 
509
- _proto.setElementContent = function setElementContent($element, content) {
510
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
511
- // Content is a DOM node or a jQuery
622
+ _proto.setElementContent = function setElementContent(element, content) {
623
+ if (element === null) {
624
+ return;
625
+ }
626
+
627
+ if (typeof content === 'object' && isElement(content)) {
628
+ if (content.jquery) {
629
+ content = content[0];
630
+ } // content is a DOM node or a jQuery
631
+
632
+
512
633
  if (this.config.html) {
513
- if (!$__default['default'](content).parent().is($element)) {
514
- $element.empty().append(content);
634
+ if (content.parentNode !== element) {
635
+ element.innerHTML = '';
636
+ element.appendChild(content);
515
637
  }
516
638
  } else {
517
- $element.text($__default['default'](content).text());
639
+ element.textContent = content.textContent;
518
640
  }
519
641
 
520
642
  return;
@@ -525,9 +647,9 @@
525
647
  content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
526
648
  }
527
649
 
528
- $element.html(content);
650
+ element.innerHTML = content;
529
651
  } else {
530
- $element.text(content);
652
+ element.textContent = content;
531
653
  }
532
654
  };
533
655
 
@@ -553,7 +675,7 @@
553
675
  behavior: this.config.fallbackPlacement
554
676
  },
555
677
  arrow: {
556
- element: SELECTOR_ARROW
678
+ element: "." + this.constructor.NAME + "-arrow"
557
679
  },
558
680
  preventOverflow: {
559
681
  boundariesElement: this.config.boundary
@@ -568,7 +690,11 @@
568
690
  return _this3._handlePopperPlacementChange(data);
569
691
  }
570
692
  };
571
- return _extends({}, defaultBsConfig, this.config.popperConfig);
693
+ return _objectSpread(_objectSpread({}, defaultBsConfig), this.config.popperConfig);
694
+ };
695
+
696
+ _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
697
+ this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
572
698
  };
573
699
 
574
700
  _proto._getOffset = function _getOffset() {
@@ -578,7 +704,7 @@
578
704
 
579
705
  if (typeof this.config.offset === 'function') {
580
706
  offset.fn = function (data) {
581
- data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
707
+ data.offsets = _objectSpread(_objectSpread({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
582
708
  return data;
583
709
  };
584
710
  } else {
@@ -593,11 +719,11 @@
593
719
  return document.body;
594
720
  }
595
721
 
596
- if (Util__default['default'].isElement(this.config.container)) {
597
- return $__default['default'](this.config.container);
722
+ if (isElement(this.config.container)) {
723
+ return this.config.container;
598
724
  }
599
725
 
600
- return $__default['default'](document).find(this.config.container);
726
+ return SelectorEngine.findOne(this.config.container);
601
727
  };
602
728
 
603
729
  _proto._getAttachment = function _getAttachment(placement) {
@@ -610,15 +736,16 @@
610
736
  var triggers = this.config.trigger.split(' ');
611
737
  triggers.forEach(function (trigger) {
612
738
  if (trigger === 'click') {
613
- $__default['default'](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
739
+ EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
614
740
  return _this5.toggle(event);
615
741
  });
616
742
  } else if (trigger !== TRIGGER_MANUAL) {
617
743
  var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
618
744
  var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
619
- $__default['default'](_this5.element).on(eventIn, _this5.config.selector, function (event) {
745
+ EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
620
746
  return _this5._enter(event);
621
- }).on(eventOut, _this5.config.selector, function (event) {
747
+ });
748
+ EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
622
749
  return _this5._leave(event);
623
750
  });
624
751
  }
@@ -630,10 +757,10 @@
630
757
  }
631
758
  };
632
759
 
633
- $__default['default'](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
760
+ EventHandler.on(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
634
761
 
635
762
  if (this.config.selector) {
636
- this.config = _extends({}, this.config, {
763
+ this.config = _objectSpread(_objectSpread({}, this.config), {}, {
637
764
  trigger: 'manual',
638
765
  selector: ''
639
766
  });
@@ -653,18 +780,18 @@
653
780
 
654
781
  _proto._enter = function _enter(event, context) {
655
782
  var dataKey = this.constructor.DATA_KEY;
656
- context = context || $__default['default'](event.currentTarget).data(dataKey);
783
+ context = context || Data.getData(event.target, dataKey);
657
784
 
658
785
  if (!context) {
659
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
660
- $__default['default'](event.currentTarget).data(dataKey, context);
786
+ context = new this.constructor(event.target, this._getDelegateConfig());
787
+ Data.setData(event.target, dataKey, context);
661
788
  }
662
789
 
663
790
  if (event) {
664
791
  context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
665
792
  }
666
793
 
667
- if ($__default['default'](context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
794
+ if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
668
795
  context._hoverState = HOVER_STATE_SHOW;
669
796
  return;
670
797
  }
@@ -686,11 +813,11 @@
686
813
 
687
814
  _proto._leave = function _leave(event, context) {
688
815
  var dataKey = this.constructor.DATA_KEY;
689
- context = context || $__default['default'](event.currentTarget).data(dataKey);
816
+ context = context || Data.getData(event.target, dataKey);
690
817
 
691
818
  if (!context) {
692
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
693
- $__default['default'](event.currentTarget).data(dataKey, context);
819
+ context = new this.constructor(event.target, this._getDelegateConfig());
820
+ Data.setData(event.target, dataKey, context);
694
821
  }
695
822
 
696
823
  if (event) {
@@ -727,13 +854,18 @@
727
854
  };
728
855
 
729
856
  _proto._getConfig = function _getConfig(config) {
730
- var dataAttributes = $__default['default'](this.element).data();
857
+ var dataAttributes = Manipulator.getDataAttributes(this.element);
731
858
  Object.keys(dataAttributes).forEach(function (dataAttr) {
732
859
  if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
733
860
  delete dataAttributes[dataAttr];
734
861
  }
735
862
  });
736
- config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
863
+
864
+ if (config && typeof config.container === 'object' && config.container.jquery) {
865
+ config.container = config.container[0];
866
+ }
867
+
868
+ config = _objectSpread(_objectSpread(_objectSpread({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
737
869
 
738
870
  if (typeof config.delay === 'number') {
739
871
  config.delay = {
@@ -750,7 +882,7 @@
750
882
  config.content = config.content.toString();
751
883
  }
752
884
 
753
- Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
885
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
754
886
 
755
887
  if (config.sanitize) {
756
888
  config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@@ -774,20 +906,25 @@
774
906
  };
775
907
 
776
908
  _proto._cleanTipClass = function _cleanTipClass() {
777
- var $tip = $__default['default'](this.getTipElement());
778
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
909
+ var tip = this.getTipElement();
910
+ var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
779
911
 
780
- if (tabClass !== null && tabClass.length) {
781
- $tip.removeClass(tabClass.join(''));
912
+ if (tabClass !== null && tabClass.length > 0) {
913
+ tabClass.map(function (token) {
914
+ return token.trim();
915
+ }).forEach(function (tClass) {
916
+ return tip.classList.remove(tClass);
917
+ });
782
918
  }
783
919
  };
784
920
 
785
921
  _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
786
- this.tip = popperData.instance.popper;
922
+ var popperInstance = popperData.instance;
923
+ this.tip = popperInstance.popper;
787
924
 
788
925
  this._cleanTipClass();
789
926
 
790
- this.addAttachmentClass(this._getAttachment(popperData.placement));
927
+ this._addAttachmentClass(this._getAttachment(popperData.placement));
791
928
  };
792
929
 
793
930
  _proto._fixTransition = function _fixTransition() {
@@ -798,7 +935,7 @@
798
935
  return;
799
936
  }
800
937
 
801
- $__default['default'](tip).removeClass(CLASS_NAME_FADE);
938
+ tip.classList.remove(CLASS_NAME_FADE);
802
939
  this.config.animation = false;
803
940
  this.hide();
804
941
  this.show();
@@ -806,10 +943,9 @@
806
943
  } // Static
807
944
  ;
808
945
 
809
- Tooltip._jQueryInterface = function _jQueryInterface(config) {
946
+ Tooltip.jQueryInterface = function jQueryInterface(config) {
810
947
  return this.each(function () {
811
- var $element = $__default['default'](this);
812
- var data = $element.data(DATA_KEY);
948
+ var data = Data.getData(this, DATA_KEY);
813
949
 
814
950
  var _config = typeof config === 'object' && config;
815
951
 
@@ -819,7 +955,6 @@
819
955
 
820
956
  if (!data) {
821
957
  data = new Tooltip(this, _config);
822
- $element.data(DATA_KEY, data);
823
958
  }
824
959
 
825
960
  if (typeof config === 'string') {
@@ -832,6 +967,10 @@
832
967
  });
833
968
  };
834
969
 
970
+ Tooltip.getInstance = function getInstance(element) {
971
+ return Data.getData(element, DATA_KEY);
972
+ };
973
+
835
974
  _createClass(Tooltip, null, [{
836
975
  key: "VERSION",
837
976
  get: function get() {
@@ -855,7 +994,7 @@
855
994
  }, {
856
995
  key: "Event",
857
996
  get: function get() {
858
- return Event;
997
+ return Event$1;
859
998
  }
860
999
  }, {
861
1000
  key: "EVENT_KEY",
@@ -871,20 +1010,27 @@
871
1010
 
872
1011
  return Tooltip;
873
1012
  }();
1013
+
1014
+ var $ = getjQuery();
874
1015
  /**
875
1016
  * ------------------------------------------------------------------------
876
1017
  * jQuery
877
1018
  * ------------------------------------------------------------------------
1019
+ * add .tooltip to jQuery only if jQuery is present
878
1020
  */
879
1021
 
1022
+ /* istanbul ignore if */
880
1023
 
881
- $__default['default'].fn[NAME] = Tooltip._jQueryInterface;
882
- $__default['default'].fn[NAME].Constructor = Tooltip;
1024
+ if ($) {
1025
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
1026
+ $.fn[NAME] = Tooltip.jQueryInterface;
1027
+ $.fn[NAME].Constructor = Tooltip;
883
1028
 
884
- $__default['default'].fn[NAME].noConflict = function () {
885
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
886
- return Tooltip._jQueryInterface;
887
- };
1029
+ $.fn[NAME].noConflict = function () {
1030
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
1031
+ return Tooltip.jQueryInterface;
1032
+ };
1033
+ }
888
1034
 
889
1035
  return Tooltip;
890
1036