bootstrap 4.5.2 → 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 (131) 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 +1876 -1220
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +133 -48
  7. data/assets/javascripts/bootstrap/button.js +56 -123
  8. data/assets/javascripts/bootstrap/carousel.js +268 -129
  9. data/assets/javascripts/bootstrap/collapse.js +285 -106
  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 +235 -161
  16. data/assets/javascripts/bootstrap/modal.js +322 -193
  17. data/assets/javascripts/bootstrap/popover.js +72 -41
  18. data/assets/javascripts/bootstrap/scrollspy.js +151 -56
  19. data/assets/javascripts/bootstrap/tab.js +151 -64
  20. data/assets/javascripts/bootstrap/toast.js +163 -65
  21. data/assets/javascripts/bootstrap/tooltip.js +336 -155
  22. data/assets/stylesheets/_bootstrap-grid.scss +51 -15
  23. data/assets/stylesheets/_bootstrap-reboot.scss +4 -1
  24. data/assets/stylesheets/_bootstrap.scss +14 -8
  25. data/assets/stylesheets/bootstrap/_alert.scss +3 -3
  26. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  27. data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -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 +18 -64
  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 +10 -7
  35. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  36. data/assets/stylesheets/bootstrap/_functions.scss +82 -20
  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 +6 -3
  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 +8 -8
  43. data/assets/stylesheets/bootstrap/_navbar.scss +42 -74
  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 +2 -4
  47. data/assets/stylesheets/bootstrap/_reboot.scss +300 -164
  48. data/assets/stylesheets/bootstrap/_root.scss +5 -9
  49. data/assets/stylesheets/bootstrap/_spinners.scss +2 -2
  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 +544 -424
  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/_breakpoints.scss +11 -8
  76. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  77. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  78. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  79. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  80. data/assets/stylesheets/bootstrap/mixins/_forms.scss +22 -67
  81. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  82. data/assets/stylesheets/bootstrap/mixins/_grid.scss +84 -32
  83. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  84. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  85. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  86. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  87. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  88. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +16 -22
  89. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  90. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  91. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  92. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  93. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
  94. data/lib/bootstrap/version.rb +2 -2
  95. data/tasks/updater/js.rb +3 -3
  96. metadata +31 -39
  97. data/assets/javascripts/bootstrap/util.js +0 -192
  98. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  99. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -523
  100. data/assets/stylesheets/bootstrap/_input-group.scss +0 -192
  101. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  102. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  103. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  104. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  105. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  106. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  107. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  108. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  109. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  110. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  111. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  112. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  113. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  114. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  115. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  116. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  117. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  118. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  119. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  120. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  121. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  122. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  123. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  124. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  125. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  126. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  127. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  128. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  129. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  130. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  131. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -1,59 +1,159 @@
1
1
  /*!
2
- * Bootstrap tooltip.js v4.5.2 (https://getbootstrap.com/)
2
+ * Bootstrap tooltip.js v5.0.0-alpha1 (https://getbootstrap.com/)
3
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.js'], 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
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
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;
13
15
  Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
14
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
16
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
15
17
 
16
18
  /**
17
19
  * --------------------------------------------------------------------------
18
- * Bootstrap (v4.5.2): tools/sanitizer.js
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;
31
+ }
32
+
33
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
34
+ };
35
+ /**
36
+ * --------------------------------------------------------------------------
37
+ * Public Util Api
38
+ * --------------------------------------------------------------------------
39
+ */
40
+
41
+
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);
95
+ }
96
+ }, emulatedDuration);
97
+ };
98
+
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);
104
+
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
+ };
148
+
149
+ /**
150
+ * --------------------------------------------------------------------------
151
+ * Bootstrap (v5.0.0-alpha1): util/sanitizer.js
19
152
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
20
153
  * --------------------------------------------------------------------------
21
154
  */
22
155
  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
23
156
  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
24
- var DefaultWhitelist = {
25
- // Global attributes allowed on any supplied element below.
26
- '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
27
- a: ['target', 'href', 'title', 'rel'],
28
- area: [],
29
- b: [],
30
- br: [],
31
- col: [],
32
- code: [],
33
- div: [],
34
- em: [],
35
- hr: [],
36
- h1: [],
37
- h2: [],
38
- h3: [],
39
- h4: [],
40
- h5: [],
41
- h6: [],
42
- i: [],
43
- img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
44
- li: [],
45
- ol: [],
46
- p: [],
47
- pre: [],
48
- s: [],
49
- small: [],
50
- span: [],
51
- sub: [],
52
- sup: [],
53
- strong: [],
54
- u: [],
55
- ul: []
56
- };
57
157
  /**
58
158
  * A pattern that recognizes a commonly useful subset of URLs that are safe.
59
159
  *
@@ -69,7 +169,7 @@
69
169
 
70
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;
71
171
 
72
- function allowedAttribute(attr, allowedAttributeList) {
172
+ var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
73
173
  var attrName = attr.nodeName.toLowerCase();
74
174
 
75
175
  if (allowedAttributeList.indexOf(attrName) !== -1) {
@@ -91,10 +191,45 @@
91
191
  }
92
192
 
93
193
  return false;
94
- }
194
+ };
95
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
+ };
96
229
  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
97
- if (unsafeHtml.length === 0) {
230
+ var _ref;
231
+
232
+ if (!unsafeHtml.length) {
98
233
  return unsafeHtml;
99
234
  }
100
235
 
@@ -105,18 +240,22 @@
105
240
  var domParser = new window.DOMParser();
106
241
  var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
107
242
  var whitelistKeys = Object.keys(whiteList);
108
- var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
243
+
244
+ var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
109
245
 
110
246
  var _loop = function _loop(i, len) {
247
+ var _ref2;
248
+
111
249
  var el = elements[i];
112
250
  var elName = el.nodeName.toLowerCase();
113
251
 
114
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
252
+ if (whitelistKeys.indexOf(elName) === -1) {
115
253
  el.parentNode.removeChild(el);
116
254
  return "continue";
117
255
  }
118
256
 
119
- var attributeList = [].slice.call(el.attributes);
257
+ var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
258
+
120
259
  var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
121
260
  attributeList.forEach(function (attr) {
122
261
  if (!allowedAttribute(attr, whitelistedAttributes)) {
@@ -134,7 +273,11 @@
134
273
  return createdDocument.body.innerHTML;
135
274
  }
136
275
 
137
- 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); }
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; }
138
281
 
139
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); } }
140
283
 
@@ -146,10 +289,9 @@
146
289
  */
147
290
 
148
291
  var NAME = 'tooltip';
149
- var VERSION = '4.5.2';
292
+ var VERSION = '5.0.0-alpha1';
150
293
  var DATA_KEY = 'bs.tooltip';
151
294
  var EVENT_KEY = "." + DATA_KEY;
152
- var JQUERY_NO_CONFLICT = $.fn[NAME];
153
295
  var CLASS_PREFIX = 'bs-tooltip';
154
296
  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
155
297
  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@@ -180,7 +322,7 @@
180
322
  };
181
323
  var Default = {
182
324
  animation: true,
183
- 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>',
184
326
  trigger: 'hover focus',
185
327
  title: '',
186
328
  delay: 0,
@@ -196,9 +338,7 @@
196
338
  whiteList: DefaultWhitelist,
197
339
  popperConfig: null
198
340
  };
199
- var HOVER_STATE_SHOW = 'show';
200
- var HOVER_STATE_OUT = 'out';
201
- var Event = {
341
+ var Event$1 = {
202
342
  HIDE: "hide" + EVENT_KEY,
203
343
  HIDDEN: "hidden" + EVENT_KEY,
204
344
  SHOW: "show" + EVENT_KEY,
@@ -211,9 +351,11 @@
211
351
  MOUSELEAVE: "mouseleave" + EVENT_KEY
212
352
  };
213
353
  var CLASS_NAME_FADE = 'fade';
354
+ var CLASS_NAME_MODAL = 'modal';
214
355
  var CLASS_NAME_SHOW = 'show';
356
+ var HOVER_STATE_SHOW = 'show';
357
+ var HOVER_STATE_OUT = 'out';
215
358
  var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
216
- var SELECTOR_ARROW = '.arrow';
217
359
  var TRIGGER_HOVER = 'hover';
218
360
  var TRIGGER_FOCUS = 'focus';
219
361
  var TRIGGER_CLICK = 'click';
@@ -227,7 +369,7 @@
227
369
  var Tooltip = /*#__PURE__*/function () {
228
370
  function Tooltip(element, config) {
229
371
  if (typeof Popper === 'undefined') {
230
- throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
372
+ throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
231
373
  } // private
232
374
 
233
375
 
@@ -242,6 +384,8 @@
242
384
  this.tip = null;
243
385
 
244
386
  this._setListeners();
387
+
388
+ Data.setData(element, this.constructor.DATA_KEY, this);
245
389
  } // Getters
246
390
 
247
391
 
@@ -267,11 +411,11 @@
267
411
 
268
412
  if (event) {
269
413
  var dataKey = this.constructor.DATA_KEY;
270
- var context = $(event.currentTarget).data(dataKey);
414
+ var context = Data.getData(event.target, dataKey);
271
415
 
272
416
  if (!context) {
273
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
274
- $(event.currentTarget).data(dataKey, context);
417
+ context = new this.constructor(event.target, this._getDelegateConfig());
418
+ Data.setData(event.target, dataKey, context);
275
419
  }
276
420
 
277
421
  context._activeTrigger.click = !context._activeTrigger.click;
@@ -282,7 +426,7 @@
282
426
  context._leave(null, context);
283
427
  }
284
428
  } else {
285
- if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
429
+ if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
286
430
  this._leave(null, this);
287
431
 
288
432
  return;
@@ -294,12 +438,12 @@
294
438
 
295
439
  _proto.dispose = function dispose() {
296
440
  clearTimeout(this._timeout);
297
- $.removeData(this.element, this.constructor.DATA_KEY);
298
- $(this.element).off(this.constructor.EVENT_KEY);
299
- $(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);
300
444
 
301
445
  if (this.tip) {
302
- $(this.tip).remove();
446
+ this.tip.parentNode.removeChild(this.tip);
303
447
  }
304
448
 
305
449
  this._isEnabled = null;
@@ -320,54 +464,56 @@
320
464
  _proto.show = function show() {
321
465
  var _this = this;
322
466
 
323
- if ($(this.element).css('display') === 'none') {
467
+ if (this.element.style.display === 'none') {
324
468
  throw new Error('Please use show on visible elements');
325
469
  }
326
470
 
327
- var showEvent = $.Event(this.constructor.Event.SHOW);
328
-
329
471
  if (this.isWithContent() && this._isEnabled) {
330
- $(this.element).trigger(showEvent);
331
- var shadowRoot = Util.findShadowRoot(this.element);
332
- var isInTheDom = $.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);
333
475
 
334
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
476
+ if (showEvent.defaultPrevented || !isInTheDom) {
335
477
  return;
336
478
  }
337
479
 
338
480
  var tip = this.getTipElement();
339
- var tipId = Util.getUID(this.constructor.NAME);
481
+ var tipId = getUID(this.constructor.NAME);
340
482
  tip.setAttribute('id', tipId);
341
483
  this.element.setAttribute('aria-describedby', tipId);
342
484
  this.setContent();
343
485
 
344
486
  if (this.config.animation) {
345
- $(tip).addClass(CLASS_NAME_FADE);
487
+ tip.classList.add(CLASS_NAME_FADE);
346
488
  }
347
489
 
348
490
  var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
349
491
 
350
492
  var attachment = this._getAttachment(placement);
351
493
 
352
- this.addAttachmentClass(attachment);
494
+ this._addAttachmentClass(attachment);
353
495
 
354
496
  var container = this._getContainer();
355
497
 
356
- $(tip).data(this.constructor.DATA_KEY, this);
498
+ Data.setData(tip, this.constructor.DATA_KEY, this);
357
499
 
358
- if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
359
- $(tip).appendTo(container);
500
+ if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
501
+ container.appendChild(tip);
360
502
  }
361
503
 
362
- $(this.element).trigger(this.constructor.Event.INSERTED);
504
+ EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
363
505
  this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
364
- $(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
506
+ tip.classList.add(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
365
507
  // empty mouseover listeners to the body's immediate children;
366
508
  // only needed because of broken event delegation on iOS
367
509
  // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
368
510
 
369
511
  if ('ontouchstart' in document.documentElement) {
370
- $(document.body).children().on('mouseover', null, $.noop);
512
+ var _ref;
513
+
514
+ (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
515
+ EventHandler.on(element, 'mouseover', noop());
516
+ });
371
517
  }
372
518
 
373
519
  var complete = function complete() {
@@ -377,27 +523,27 @@
377
523
 
378
524
  var prevHoverState = _this._hoverState;
379
525
  _this._hoverState = null;
380
- $(_this.element).trigger(_this.constructor.Event.SHOWN);
526
+ EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
381
527
 
382
528
  if (prevHoverState === HOVER_STATE_OUT) {
383
529
  _this._leave(null, _this);
384
530
  }
385
531
  };
386
532
 
387
- if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
388
- var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
389
- $(this.tip).one(Util.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);
390
537
  } else {
391
538
  complete();
392
539
  }
393
540
  }
394
541
  };
395
542
 
396
- _proto.hide = function hide(callback) {
543
+ _proto.hide = function hide() {
397
544
  var _this2 = this;
398
545
 
399
546
  var tip = this.getTipElement();
400
- var hideEvent = $.Event(this.constructor.Event.HIDE);
401
547
 
402
548
  var complete = function complete() {
403
549
  if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
@@ -408,37 +554,36 @@
408
554
 
409
555
  _this2.element.removeAttribute('aria-describedby');
410
556
 
411
- $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
557
+ EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
412
558
 
413
- if (_this2._popper !== null) {
414
- _this2._popper.destroy();
415
- }
416
-
417
- if (callback) {
418
- callback();
419
- }
559
+ _this2._popper.destroy();
420
560
  };
421
561
 
422
- $(this.element).trigger(hideEvent);
562
+ var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
423
563
 
424
- if (hideEvent.isDefaultPrevented()) {
564
+ if (hideEvent.defaultPrevented) {
425
565
  return;
426
566
  }
427
567
 
428
- $(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
429
569
  // empty mouseover listeners we added for iOS support
430
570
 
431
571
  if ('ontouchstart' in document.documentElement) {
432
- $(document.body).children().off('mouseover', null, $.noop);
572
+ var _ref2;
573
+
574
+ (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
575
+ return EventHandler.off(element, 'mouseover', noop);
576
+ });
433
577
  }
434
578
 
435
579
  this._activeTrigger[TRIGGER_CLICK] = false;
436
580
  this._activeTrigger[TRIGGER_FOCUS] = false;
437
581
  this._activeTrigger[TRIGGER_HOVER] = false;
438
582
 
439
- if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
440
- var transitionDuration = Util.getTransitionDurationFromElement(tip);
441
- $(tip).one(Util.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);
442
587
  } else {
443
588
  complete();
444
589
  }
@@ -457,30 +602,41 @@
457
602
  return Boolean(this.getTitle());
458
603
  };
459
604
 
460
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
461
- $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
462
- };
463
-
464
605
  _proto.getTipElement = function getTipElement() {
465
- this.tip = this.tip || $(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];
466
613
  return this.tip;
467
614
  };
468
615
 
469
616
  _proto.setContent = function setContent() {
470
617
  var tip = this.getTipElement();
471
- this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
472
- $(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);
473
620
  };
474
621
 
475
- _proto.setElementContent = function setElementContent($element, content) {
476
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
477
- // 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
+
478
633
  if (this.config.html) {
479
- if (!$(content).parent().is($element)) {
480
- $element.empty().append(content);
634
+ if (content.parentNode !== element) {
635
+ element.innerHTML = '';
636
+ element.appendChild(content);
481
637
  }
482
638
  } else {
483
- $element.text($(content).text());
639
+ element.textContent = content.textContent;
484
640
  }
485
641
 
486
642
  return;
@@ -491,9 +647,9 @@
491
647
  content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
492
648
  }
493
649
 
494
- $element.html(content);
650
+ element.innerHTML = content;
495
651
  } else {
496
- $element.text(content);
652
+ element.textContent = content;
497
653
  }
498
654
  };
499
655
 
@@ -519,7 +675,7 @@
519
675
  behavior: this.config.fallbackPlacement
520
676
  },
521
677
  arrow: {
522
- element: SELECTOR_ARROW
678
+ element: "." + this.constructor.NAME + "-arrow"
523
679
  },
524
680
  preventOverflow: {
525
681
  boundariesElement: this.config.boundary
@@ -534,7 +690,11 @@
534
690
  return _this3._handlePopperPlacementChange(data);
535
691
  }
536
692
  };
537
- 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);
538
698
  };
539
699
 
540
700
  _proto._getOffset = function _getOffset() {
@@ -544,7 +704,7 @@
544
704
 
545
705
  if (typeof this.config.offset === 'function') {
546
706
  offset.fn = function (data) {
547
- 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) || {});
548
708
  return data;
549
709
  };
550
710
  } else {
@@ -559,11 +719,11 @@
559
719
  return document.body;
560
720
  }
561
721
 
562
- if (Util.isElement(this.config.container)) {
563
- return $(this.config.container);
722
+ if (isElement(this.config.container)) {
723
+ return this.config.container;
564
724
  }
565
725
 
566
- return $(document).find(this.config.container);
726
+ return SelectorEngine.findOne(this.config.container);
567
727
  };
568
728
 
569
729
  _proto._getAttachment = function _getAttachment(placement) {
@@ -576,15 +736,16 @@
576
736
  var triggers = this.config.trigger.split(' ');
577
737
  triggers.forEach(function (trigger) {
578
738
  if (trigger === 'click') {
579
- $(_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) {
580
740
  return _this5.toggle(event);
581
741
  });
582
742
  } else if (trigger !== TRIGGER_MANUAL) {
583
743
  var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
584
744
  var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
585
- $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
745
+ EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
586
746
  return _this5._enter(event);
587
- }).on(eventOut, _this5.config.selector, function (event) {
747
+ });
748
+ EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
588
749
  return _this5._leave(event);
589
750
  });
590
751
  }
@@ -596,10 +757,10 @@
596
757
  }
597
758
  };
598
759
 
599
- $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
760
+ EventHandler.on(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
600
761
 
601
762
  if (this.config.selector) {
602
- this.config = _extends({}, this.config, {
763
+ this.config = _objectSpread(_objectSpread({}, this.config), {}, {
603
764
  trigger: 'manual',
604
765
  selector: ''
605
766
  });
@@ -619,18 +780,18 @@
619
780
 
620
781
  _proto._enter = function _enter(event, context) {
621
782
  var dataKey = this.constructor.DATA_KEY;
622
- context = context || $(event.currentTarget).data(dataKey);
783
+ context = context || Data.getData(event.target, dataKey);
623
784
 
624
785
  if (!context) {
625
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
626
- $(event.currentTarget).data(dataKey, context);
786
+ context = new this.constructor(event.target, this._getDelegateConfig());
787
+ Data.setData(event.target, dataKey, context);
627
788
  }
628
789
 
629
790
  if (event) {
630
791
  context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
631
792
  }
632
793
 
633
- if ($(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) {
634
795
  context._hoverState = HOVER_STATE_SHOW;
635
796
  return;
636
797
  }
@@ -652,11 +813,11 @@
652
813
 
653
814
  _proto._leave = function _leave(event, context) {
654
815
  var dataKey = this.constructor.DATA_KEY;
655
- context = context || $(event.currentTarget).data(dataKey);
816
+ context = context || Data.getData(event.target, dataKey);
656
817
 
657
818
  if (!context) {
658
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
659
- $(event.currentTarget).data(dataKey, context);
819
+ context = new this.constructor(event.target, this._getDelegateConfig());
820
+ Data.setData(event.target, dataKey, context);
660
821
  }
661
822
 
662
823
  if (event) {
@@ -693,13 +854,18 @@
693
854
  };
694
855
 
695
856
  _proto._getConfig = function _getConfig(config) {
696
- var dataAttributes = $(this.element).data();
857
+ var dataAttributes = Manipulator.getDataAttributes(this.element);
697
858
  Object.keys(dataAttributes).forEach(function (dataAttr) {
698
859
  if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
699
860
  delete dataAttributes[dataAttr];
700
861
  }
701
862
  });
702
- 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 : {});
703
869
 
704
870
  if (typeof config.delay === 'number') {
705
871
  config.delay = {
@@ -716,7 +882,7 @@
716
882
  config.content = config.content.toString();
717
883
  }
718
884
 
719
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
885
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
720
886
 
721
887
  if (config.sanitize) {
722
888
  config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@@ -740,20 +906,25 @@
740
906
  };
741
907
 
742
908
  _proto._cleanTipClass = function _cleanTipClass() {
743
- var $tip = $(this.getTipElement());
744
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
909
+ var tip = this.getTipElement();
910
+ var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
745
911
 
746
- if (tabClass !== null && tabClass.length) {
747
- $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
+ });
748
918
  }
749
919
  };
750
920
 
751
921
  _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
752
- this.tip = popperData.instance.popper;
922
+ var popperInstance = popperData.instance;
923
+ this.tip = popperInstance.popper;
753
924
 
754
925
  this._cleanTipClass();
755
926
 
756
- this.addAttachmentClass(this._getAttachment(popperData.placement));
927
+ this._addAttachmentClass(this._getAttachment(popperData.placement));
757
928
  };
758
929
 
759
930
  _proto._fixTransition = function _fixTransition() {
@@ -764,7 +935,7 @@
764
935
  return;
765
936
  }
766
937
 
767
- $(tip).removeClass(CLASS_NAME_FADE);
938
+ tip.classList.remove(CLASS_NAME_FADE);
768
939
  this.config.animation = false;
769
940
  this.hide();
770
941
  this.show();
@@ -772,9 +943,9 @@
772
943
  } // Static
773
944
  ;
774
945
 
775
- Tooltip._jQueryInterface = function _jQueryInterface(config) {
946
+ Tooltip.jQueryInterface = function jQueryInterface(config) {
776
947
  return this.each(function () {
777
- var data = $(this).data(DATA_KEY);
948
+ var data = Data.getData(this, DATA_KEY);
778
949
 
779
950
  var _config = typeof config === 'object' && config;
780
951
 
@@ -784,7 +955,6 @@
784
955
 
785
956
  if (!data) {
786
957
  data = new Tooltip(this, _config);
787
- $(this).data(DATA_KEY, data);
788
958
  }
789
959
 
790
960
  if (typeof config === 'string') {
@@ -797,6 +967,10 @@
797
967
  });
798
968
  };
799
969
 
970
+ Tooltip.getInstance = function getInstance(element) {
971
+ return Data.getData(element, DATA_KEY);
972
+ };
973
+
800
974
  _createClass(Tooltip, null, [{
801
975
  key: "VERSION",
802
976
  get: function get() {
@@ -820,7 +994,7 @@
820
994
  }, {
821
995
  key: "Event",
822
996
  get: function get() {
823
- return Event;
997
+ return Event$1;
824
998
  }
825
999
  }, {
826
1000
  key: "EVENT_KEY",
@@ -836,20 +1010,27 @@
836
1010
 
837
1011
  return Tooltip;
838
1012
  }();
1013
+
1014
+ var $ = getjQuery();
839
1015
  /**
840
1016
  * ------------------------------------------------------------------------
841
1017
  * jQuery
842
1018
  * ------------------------------------------------------------------------
1019
+ * add .tooltip to jQuery only if jQuery is present
843
1020
  */
844
1021
 
1022
+ /* istanbul ignore if */
845
1023
 
846
- $.fn[NAME] = Tooltip._jQueryInterface;
847
- $.fn[NAME].Constructor = Tooltip;
1024
+ if ($) {
1025
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
1026
+ $.fn[NAME] = Tooltip.jQueryInterface;
1027
+ $.fn[NAME].Constructor = Tooltip;
848
1028
 
849
- $.fn[NAME].noConflict = function () {
850
- $.fn[NAME] = JQUERY_NO_CONFLICT;
851
- return Tooltip._jQueryInterface;
852
- };
1029
+ $.fn[NAME].noConflict = function () {
1030
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
1031
+ return Tooltip.jQueryInterface;
1032
+ };
1033
+ }
853
1034
 
854
1035
  return Tooltip;
855
1036