bootstrap 4.5.0 → 5.0.0.alpha3

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