bootstrap 4.4.1 → 4.6.2.1

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +11 -1
  3. data/CHANGELOG.md +4 -0
  4. data/README.md +7 -1
  5. data/Rakefile +16 -4
  6. data/assets/javascripts/bootstrap/alert.js +42 -53
  7. data/assets/javascripts/bootstrap/button.js +76 -81
  8. data/assets/javascripts/bootstrap/carousel.js +161 -199
  9. data/assets/javascripts/bootstrap/collapse.js +97 -142
  10. data/assets/javascripts/bootstrap/dropdown.js +130 -186
  11. data/assets/javascripts/bootstrap/modal.js +191 -213
  12. data/assets/javascripts/bootstrap/popover.js +62 -92
  13. data/assets/javascripts/bootstrap/scrollspy.js +81 -132
  14. data/assets/javascripts/bootstrap/tab.js +78 -83
  15. data/assets/javascripts/bootstrap/toast.js +83 -118
  16. data/assets/javascripts/bootstrap/tooltip.js +158 -198
  17. data/assets/javascripts/bootstrap/util.js +27 -26
  18. data/assets/javascripts/bootstrap-sprockets.js +7 -7
  19. data/assets/javascripts/bootstrap.js +1037 -1202
  20. data/assets/javascripts/bootstrap.min.js +4 -4
  21. data/assets/stylesheets/_bootstrap-grid.scss +5 -4
  22. data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
  23. data/assets/stylesheets/_bootstrap.scss +4 -4
  24. data/assets/stylesheets/bootstrap/_alert.scss +1 -0
  25. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_buttons.scss +10 -7
  27. data/assets/stylesheets/bootstrap/_card.scss +30 -22
  28. data/assets/stylesheets/bootstrap/_carousel.scss +6 -3
  29. data/assets/stylesheets/bootstrap/_close.scss +0 -1
  30. data/assets/stylesheets/bootstrap/_custom-forms.scss +23 -18
  31. data/assets/stylesheets/bootstrap/_dropdown.scss +4 -3
  32. data/assets/stylesheets/bootstrap/_forms.scss +19 -10
  33. data/assets/stylesheets/bootstrap/_functions.scss +62 -6
  34. data/assets/stylesheets/bootstrap/_grid.scss +10 -6
  35. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  36. data/assets/stylesheets/bootstrap/_input-group.scss +24 -4
  37. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -1
  38. data/assets/stylesheets/bootstrap/_list-group.scss +10 -14
  39. data/assets/stylesheets/bootstrap/_modal.scss +4 -3
  40. data/assets/stylesheets/bootstrap/_nav.scss +9 -4
  41. data/assets/stylesheets/bootstrap/_navbar.scss +10 -2
  42. data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
  43. data/assets/stylesheets/bootstrap/_popover.scss +9 -9
  44. data/assets/stylesheets/bootstrap/_print.scss +0 -9
  45. data/assets/stylesheets/bootstrap/_progress.scss +2 -1
  46. data/assets/stylesheets/bootstrap/_reboot.scss +27 -25
  47. data/assets/stylesheets/bootstrap/_root.scss +0 -1
  48. data/assets/stylesheets/bootstrap/_spinners.scss +18 -8
  49. data/assets/stylesheets/bootstrap/_toasts.scss +4 -2
  50. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -4
  51. data/assets/stylesheets/bootstrap/_transitions.scss +6 -0
  52. data/assets/stylesheets/bootstrap/_type.scss +1 -1
  53. data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
  54. data/assets/stylesheets/bootstrap/_variables.scss +34 -28
  55. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
  56. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +27 -14
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +6 -6
  58. data/assets/stylesheets/bootstrap/mixins/_forms.scss +23 -5
  59. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +26 -17
  60. data/assets/stylesheets/bootstrap/mixins/_grid.scss +17 -17
  61. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
  62. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  63. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +2 -2
  64. data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
  65. data/assets/stylesheets/bootstrap/utilities/_background.scss +1 -1
  66. data/assets/stylesheets/bootstrap/utilities/_borders.scss +1 -1
  67. data/assets/stylesheets/bootstrap/utilities/_embed.scss +1 -1
  68. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  69. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +1 -1
  70. data/assets/stylesheets/bootstrap/utilities/_text.scss +2 -2
  71. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +126 -102
  72. data/bootstrap.gemspec +1 -3
  73. data/lib/bootstrap/engine.rb +17 -1
  74. data/lib/bootstrap/version.rb +2 -2
  75. data/tasks/updater/js.rb +18 -6
  76. data/tasks/updater/network.rb +8 -2
  77. data/test/gemfiles/rails_6_0.gemfile +7 -0
  78. data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
  79. data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
  80. metadata +12 -19
@@ -1,17 +1,19 @@
1
1
  /*!
2
- * Bootstrap tooltip.js v4.4.1 (https://getbootstrap.com/)
3
- * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap tooltip.js v4.6.2 (https://getbootstrap.com/)
3
+ * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
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';
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
11
 
12
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
- Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
14
- Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
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);
15
17
 
16
18
  function _defineProperties(target, props) {
17
19
  for (var i = 0; i < props.length; i++) {
@@ -26,62 +28,33 @@
26
28
  function _createClass(Constructor, protoProps, staticProps) {
27
29
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28
30
  if (staticProps) _defineProperties(Constructor, staticProps);
31
+ Object.defineProperty(Constructor, "prototype", {
32
+ writable: false
33
+ });
29
34
  return Constructor;
30
35
  }
31
36
 
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;
42
- }
43
-
44
- return obj;
45
- }
46
-
47
- function ownKeys(object, enumerableOnly) {
48
- var keys = Object.keys(object);
37
+ function _extends() {
38
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
39
+ for (var i = 1; i < arguments.length; i++) {
40
+ var source = arguments[i];
49
41
 
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);
56
- }
57
-
58
- return keys;
59
- }
60
-
61
- function _objectSpread2(target) {
62
- for (var i = 1; i < arguments.length; i++) {
63
- var source = arguments[i] != null ? arguments[i] : {};
64
-
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
- });
42
+ for (var key in source) {
43
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
44
+ target[key] = source[key];
45
+ }
46
+ }
75
47
  }
76
- }
77
48
 
78
- return target;
49
+ return target;
50
+ };
51
+ return _extends.apply(this, arguments);
79
52
  }
80
53
 
81
54
  /**
82
55
  * --------------------------------------------------------------------------
83
- * Bootstrap (v4.4.1): tools/sanitizer.js
84
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
56
+ * Bootstrap (v4.6.2): tools/sanitizer.js
57
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
85
58
  * --------------------------------------------------------------------------
86
59
  */
87
60
  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
@@ -105,7 +78,7 @@
105
78
  h5: [],
106
79
  h6: [],
107
80
  i: [],
108
- img: ['src', 'alt', 'title', 'width', 'height'],
81
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
109
82
  li: [],
110
83
  ol: [],
111
84
  p: [],
@@ -122,24 +95,24 @@
122
95
  /**
123
96
  * A pattern that recognizes a commonly useful subset of URLs that are safe.
124
97
  *
125
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
98
+ * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
126
99
  */
127
100
 
128
- var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
101
+ var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
129
102
  /**
130
103
  * A pattern that matches safe data URLs. Only matches image, video and audio types.
131
104
  *
132
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
105
+ * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
133
106
  */
134
107
 
135
- var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
108
+ 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
109
 
137
110
  function allowedAttribute(attr, allowedAttributeList) {
138
111
  var attrName = attr.nodeName.toLowerCase();
139
112
 
140
113
  if (allowedAttributeList.indexOf(attrName) !== -1) {
141
114
  if (uriAttrs.indexOf(attrName) !== -1) {
142
- return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
115
+ return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
143
116
  }
144
117
 
145
118
  return true;
@@ -149,8 +122,8 @@
149
122
  return attrRegex instanceof RegExp;
150
123
  }); // Check if a regular expression validates the attribute.
151
124
 
152
- for (var i = 0, l = regExp.length; i < l; i++) {
153
- if (attrName.match(regExp[i])) {
125
+ for (var i = 0, len = regExp.length; i < len; i++) {
126
+ if (regExp[i].test(attrName)) {
154
127
  return true;
155
128
  }
156
129
  }
@@ -181,7 +154,8 @@
181
154
  return "continue";
182
155
  }
183
156
 
184
- var attributeList = [].slice.call(el.attributes);
157
+ var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread
158
+
185
159
  var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
186
160
  attributeList.forEach(function (attr) {
187
161
  if (!allowedAttribute(attr, whitelistedAttributes)) {
@@ -200,37 +174,27 @@
200
174
  }
201
175
 
202
176
  /**
203
- * ------------------------------------------------------------------------
204
177
  * Constants
205
- * ------------------------------------------------------------------------
206
178
  */
207
179
 
208
180
  var NAME = 'tooltip';
209
- var VERSION = '4.4.1';
181
+ var VERSION = '4.6.2';
210
182
  var DATA_KEY = 'bs.tooltip';
211
183
  var EVENT_KEY = "." + DATA_KEY;
212
- var JQUERY_NO_CONFLICT = $.fn[NAME];
184
+ var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
213
185
  var CLASS_PREFIX = 'bs-tooltip';
214
186
  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
215
187
  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
216
- var DefaultType = {
217
- animation: 'boolean',
218
- template: 'string',
219
- title: '(string|element|function)',
220
- trigger: 'string',
221
- delay: '(number|object)',
222
- html: 'boolean',
223
- selector: '(string|boolean)',
224
- placement: '(string|function)',
225
- offset: '(number|string|function)',
226
- container: '(string|element|boolean)',
227
- fallbackPlacement: '(string|array)',
228
- boundary: '(string|element)',
229
- sanitize: 'boolean',
230
- sanitizeFn: '(null|function)',
231
- whiteList: 'object',
232
- popperConfig: '(null|object)'
233
- };
188
+ var CLASS_NAME_FADE = 'fade';
189
+ var CLASS_NAME_SHOW = 'show';
190
+ var HOVER_STATE_SHOW = 'show';
191
+ var HOVER_STATE_OUT = 'out';
192
+ var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
193
+ var SELECTOR_ARROW = '.arrow';
194
+ var TRIGGER_HOVER = 'hover';
195
+ var TRIGGER_FOCUS = 'focus';
196
+ var TRIGGER_CLICK = 'click';
197
+ var TRIGGER_MANUAL = 'manual';
234
198
  var AttachmentMap = {
235
199
  AUTO: 'auto',
236
200
  TOP: 'top',
@@ -251,14 +215,30 @@
251
215
  container: false,
252
216
  fallbackPlacement: 'flip',
253
217
  boundary: 'scrollParent',
218
+ customClass: '',
254
219
  sanitize: true,
255
220
  sanitizeFn: null,
256
221
  whiteList: DefaultWhitelist,
257
222
  popperConfig: null
258
223
  };
259
- var HoverState = {
260
- SHOW: 'show',
261
- OUT: 'out'
224
+ var DefaultType = {
225
+ animation: 'boolean',
226
+ template: 'string',
227
+ title: '(string|element|function)',
228
+ trigger: 'string',
229
+ delay: '(number|object)',
230
+ html: 'boolean',
231
+ selector: '(string|boolean)',
232
+ placement: '(string|function)',
233
+ offset: '(number|string|function)',
234
+ container: '(string|element|boolean)',
235
+ fallbackPlacement: '(string|array)',
236
+ boundary: '(string|element)',
237
+ customClass: '(string|function)',
238
+ sanitize: 'boolean',
239
+ sanitizeFn: '(null|function)',
240
+ whiteList: 'object',
241
+ popperConfig: '(null|object)'
262
242
  };
263
243
  var Event = {
264
244
  HIDE: "hide" + EVENT_KEY,
@@ -272,34 +252,15 @@
272
252
  MOUSEENTER: "mouseenter" + EVENT_KEY,
273
253
  MOUSELEAVE: "mouseleave" + EVENT_KEY
274
254
  };
275
- var ClassName = {
276
- FADE: 'fade',
277
- SHOW: 'show'
278
- };
279
- var Selector = {
280
- TOOLTIP: '.tooltip',
281
- TOOLTIP_INNER: '.tooltip-inner',
282
- ARROW: '.arrow'
283
- };
284
- var Trigger = {
285
- HOVER: 'hover',
286
- FOCUS: 'focus',
287
- CLICK: 'click',
288
- MANUAL: 'manual'
289
- };
290
255
  /**
291
- * ------------------------------------------------------------------------
292
- * Class Definition
293
- * ------------------------------------------------------------------------
256
+ * Class definition
294
257
  */
295
258
 
296
- var Tooltip =
297
- /*#__PURE__*/
298
- function () {
259
+ var Tooltip = /*#__PURE__*/function () {
299
260
  function Tooltip(element, config) {
300
- if (typeof Popper === 'undefined') {
301
- throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
302
- } // private
261
+ if (typeof Popper__default["default"] === 'undefined') {
262
+ throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
263
+ } // Private
303
264
 
304
265
 
305
266
  this._isEnabled = true;
@@ -338,11 +299,11 @@
338
299
 
339
300
  if (event) {
340
301
  var dataKey = this.constructor.DATA_KEY;
341
- var context = $(event.currentTarget).data(dataKey);
302
+ var context = $__default["default"](event.currentTarget).data(dataKey);
342
303
 
343
304
  if (!context) {
344
305
  context = new this.constructor(event.currentTarget, this._getDelegateConfig());
345
- $(event.currentTarget).data(dataKey, context);
306
+ $__default["default"](event.currentTarget).data(dataKey, context);
346
307
  }
347
308
 
348
309
  context._activeTrigger.click = !context._activeTrigger.click;
@@ -353,7 +314,7 @@
353
314
  context._leave(null, context);
354
315
  }
355
316
  } else {
356
- if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
317
+ if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
357
318
  this._leave(null, this);
358
319
 
359
320
  return;
@@ -365,12 +326,12 @@
365
326
 
366
327
  _proto.dispose = function dispose() {
367
328
  clearTimeout(this._timeout);
368
- $.removeData(this.element, this.constructor.DATA_KEY);
369
- $(this.element).off(this.constructor.EVENT_KEY);
370
- $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
329
+ $__default["default"].removeData(this.element, this.constructor.DATA_KEY);
330
+ $__default["default"](this.element).off(this.constructor.EVENT_KEY);
331
+ $__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
371
332
 
372
333
  if (this.tip) {
373
- $(this.tip).remove();
334
+ $__default["default"](this.tip).remove();
374
335
  }
375
336
 
376
337
  this._isEnabled = null;
@@ -391,29 +352,29 @@
391
352
  _proto.show = function show() {
392
353
  var _this = this;
393
354
 
394
- if ($(this.element).css('display') === 'none') {
355
+ if ($__default["default"](this.element).css('display') === 'none') {
395
356
  throw new Error('Please use show on visible elements');
396
357
  }
397
358
 
398
- var showEvent = $.Event(this.constructor.Event.SHOW);
359
+ var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
399
360
 
400
361
  if (this.isWithContent() && this._isEnabled) {
401
- $(this.element).trigger(showEvent);
402
- var shadowRoot = Util.findShadowRoot(this.element);
403
- var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
362
+ $__default["default"](this.element).trigger(showEvent);
363
+ var shadowRoot = Util__default["default"].findShadowRoot(this.element);
364
+ var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
404
365
 
405
366
  if (showEvent.isDefaultPrevented() || !isInTheDom) {
406
367
  return;
407
368
  }
408
369
 
409
370
  var tip = this.getTipElement();
410
- var tipId = Util.getUID(this.constructor.NAME);
371
+ var tipId = Util__default["default"].getUID(this.constructor.NAME);
411
372
  tip.setAttribute('id', tipId);
412
373
  this.element.setAttribute('aria-describedby', tipId);
413
374
  this.setContent();
414
375
 
415
376
  if (this.config.animation) {
416
- $(tip).addClass(ClassName.FADE);
377
+ $__default["default"](tip).addClass(CLASS_NAME_FADE);
417
378
  }
418
379
 
419
380
  var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@@ -424,21 +385,22 @@
424
385
 
425
386
  var container = this._getContainer();
426
387
 
427
- $(tip).data(this.constructor.DATA_KEY, this);
388
+ $__default["default"](tip).data(this.constructor.DATA_KEY, this);
428
389
 
429
- if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
430
- $(tip).appendTo(container);
390
+ if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
391
+ $__default["default"](tip).appendTo(container);
431
392
  }
432
393
 
433
- $(this.element).trigger(this.constructor.Event.INSERTED);
434
- this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
435
- $(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
394
+ $__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
395
+ this._popper = new Popper__default["default"](this.element, tip, this._getPopperConfig(attachment));
396
+ $__default["default"](tip).addClass(CLASS_NAME_SHOW);
397
+ $__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
436
398
  // empty mouseover listeners to the body's immediate children;
437
399
  // only needed because of broken event delegation on iOS
438
400
  // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
439
401
 
440
402
  if ('ontouchstart' in document.documentElement) {
441
- $(document.body).children().on('mouseover', null, $.noop);
403
+ $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
442
404
  }
443
405
 
444
406
  var complete = function complete() {
@@ -448,16 +410,16 @@
448
410
 
449
411
  var prevHoverState = _this._hoverState;
450
412
  _this._hoverState = null;
451
- $(_this.element).trigger(_this.constructor.Event.SHOWN);
413
+ $__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
452
414
 
453
- if (prevHoverState === HoverState.OUT) {
415
+ if (prevHoverState === HOVER_STATE_OUT) {
454
416
  _this._leave(null, _this);
455
417
  }
456
418
  };
457
419
 
458
- if ($(this.tip).hasClass(ClassName.FADE)) {
459
- var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
460
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
420
+ if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE)) {
421
+ var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this.tip);
422
+ $__default["default"](this.tip).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
461
423
  } else {
462
424
  complete();
463
425
  }
@@ -468,10 +430,10 @@
468
430
  var _this2 = this;
469
431
 
470
432
  var tip = this.getTipElement();
471
- var hideEvent = $.Event(this.constructor.Event.HIDE);
433
+ var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
472
434
 
473
435
  var complete = function complete() {
474
- if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
436
+ if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
475
437
  tip.parentNode.removeChild(tip);
476
438
  }
477
439
 
@@ -479,7 +441,7 @@
479
441
 
480
442
  _this2.element.removeAttribute('aria-describedby');
481
443
 
482
- $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
444
+ $__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
483
445
 
484
446
  if (_this2._popper !== null) {
485
447
  _this2._popper.destroy();
@@ -490,26 +452,26 @@
490
452
  }
491
453
  };
492
454
 
493
- $(this.element).trigger(hideEvent);
455
+ $__default["default"](this.element).trigger(hideEvent);
494
456
 
495
457
  if (hideEvent.isDefaultPrevented()) {
496
458
  return;
497
459
  }
498
460
 
499
- $(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
461
+ $__default["default"](tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
500
462
  // empty mouseover listeners we added for iOS support
501
463
 
502
464
  if ('ontouchstart' in document.documentElement) {
503
- $(document.body).children().off('mouseover', null, $.noop);
465
+ $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
504
466
  }
505
467
 
506
- this._activeTrigger[Trigger.CLICK] = false;
507
- this._activeTrigger[Trigger.FOCUS] = false;
508
- this._activeTrigger[Trigger.HOVER] = false;
468
+ this._activeTrigger[TRIGGER_CLICK] = false;
469
+ this._activeTrigger[TRIGGER_FOCUS] = false;
470
+ this._activeTrigger[TRIGGER_HOVER] = false;
509
471
 
510
- if ($(this.tip).hasClass(ClassName.FADE)) {
511
- var transitionDuration = Util.getTransitionDurationFromElement(tip);
512
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
472
+ if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE)) {
473
+ var transitionDuration = Util__default["default"].getTransitionDurationFromElement(tip);
474
+ $__default["default"](tip).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
513
475
  } else {
514
476
  complete();
515
477
  }
@@ -529,29 +491,29 @@
529
491
  };
530
492
 
531
493
  _proto.addAttachmentClass = function addAttachmentClass(attachment) {
532
- $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
494
+ $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
533
495
  };
534
496
 
535
497
  _proto.getTipElement = function getTipElement() {
536
- this.tip = this.tip || $(this.config.template)[0];
498
+ this.tip = this.tip || $__default["default"](this.config.template)[0];
537
499
  return this.tip;
538
500
  };
539
501
 
540
502
  _proto.setContent = function setContent() {
541
503
  var tip = this.getTipElement();
542
- this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
543
- $(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
504
+ this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
505
+ $__default["default"](tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
544
506
  };
545
507
 
546
508
  _proto.setElementContent = function setElementContent($element, content) {
547
509
  if (typeof content === 'object' && (content.nodeType || content.jquery)) {
548
510
  // Content is a DOM node or a jQuery
549
511
  if (this.config.html) {
550
- if (!$(content).parent().is($element)) {
512
+ if (!$__default["default"](content).parent().is($element)) {
551
513
  $element.empty().append(content);
552
514
  }
553
515
  } else {
554
- $element.text($(content).text());
516
+ $element.text($__default["default"](content).text());
555
517
  }
556
518
 
557
519
  return;
@@ -590,7 +552,7 @@
590
552
  behavior: this.config.fallbackPlacement
591
553
  },
592
554
  arrow: {
593
- element: Selector.ARROW
555
+ element: SELECTOR_ARROW
594
556
  },
595
557
  preventOverflow: {
596
558
  boundariesElement: this.config.boundary
@@ -605,7 +567,7 @@
605
567
  return _this3._handlePopperPlacementChange(data);
606
568
  }
607
569
  };
608
- return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig);
570
+ return _extends({}, defaultBsConfig, this.config.popperConfig);
609
571
  };
610
572
 
611
573
  _proto._getOffset = function _getOffset() {
@@ -615,7 +577,7 @@
615
577
 
616
578
  if (typeof this.config.offset === 'function') {
617
579
  offset.fn = function (data) {
618
- data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});
580
+ data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
619
581
  return data;
620
582
  };
621
583
  } else {
@@ -630,11 +592,11 @@
630
592
  return document.body;
631
593
  }
632
594
 
633
- if (Util.isElement(this.config.container)) {
634
- return $(this.config.container);
595
+ if (Util__default["default"].isElement(this.config.container)) {
596
+ return $__default["default"](this.config.container);
635
597
  }
636
598
 
637
- return $(document).find(this.config.container);
599
+ return $__default["default"](document).find(this.config.container);
638
600
  };
639
601
 
640
602
  _proto._getAttachment = function _getAttachment(placement) {
@@ -647,13 +609,13 @@
647
609
  var triggers = this.config.trigger.split(' ');
648
610
  triggers.forEach(function (trigger) {
649
611
  if (trigger === 'click') {
650
- $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
612
+ $__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
651
613
  return _this5.toggle(event);
652
614
  });
653
- } else if (trigger !== Trigger.MANUAL) {
654
- var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
655
- var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
656
- $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
615
+ } else if (trigger !== TRIGGER_MANUAL) {
616
+ var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
617
+ var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
618
+ $__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
657
619
  return _this5._enter(event);
658
620
  }).on(eventOut, _this5.config.selector, function (event) {
659
621
  return _this5._leave(event);
@@ -667,10 +629,10 @@
667
629
  }
668
630
  };
669
631
 
670
- $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
632
+ $__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
671
633
 
672
634
  if (this.config.selector) {
673
- this.config = _objectSpread2({}, this.config, {
635
+ this.config = _extends({}, this.config, {
674
636
  trigger: 'manual',
675
637
  selector: ''
676
638
  });
@@ -690,24 +652,24 @@
690
652
 
691
653
  _proto._enter = function _enter(event, context) {
692
654
  var dataKey = this.constructor.DATA_KEY;
693
- context = context || $(event.currentTarget).data(dataKey);
655
+ context = context || $__default["default"](event.currentTarget).data(dataKey);
694
656
 
695
657
  if (!context) {
696
658
  context = new this.constructor(event.currentTarget, this._getDelegateConfig());
697
- $(event.currentTarget).data(dataKey, context);
659
+ $__default["default"](event.currentTarget).data(dataKey, context);
698
660
  }
699
661
 
700
662
  if (event) {
701
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
663
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
702
664
  }
703
665
 
704
- if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
705
- context._hoverState = HoverState.SHOW;
666
+ if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
667
+ context._hoverState = HOVER_STATE_SHOW;
706
668
  return;
707
669
  }
708
670
 
709
671
  clearTimeout(context._timeout);
710
- context._hoverState = HoverState.SHOW;
672
+ context._hoverState = HOVER_STATE_SHOW;
711
673
 
712
674
  if (!context.config.delay || !context.config.delay.show) {
713
675
  context.show();
@@ -715,7 +677,7 @@
715
677
  }
716
678
 
717
679
  context._timeout = setTimeout(function () {
718
- if (context._hoverState === HoverState.SHOW) {
680
+ if (context._hoverState === HOVER_STATE_SHOW) {
719
681
  context.show();
720
682
  }
721
683
  }, context.config.delay.show);
@@ -723,15 +685,15 @@
723
685
 
724
686
  _proto._leave = function _leave(event, context) {
725
687
  var dataKey = this.constructor.DATA_KEY;
726
- context = context || $(event.currentTarget).data(dataKey);
688
+ context = context || $__default["default"](event.currentTarget).data(dataKey);
727
689
 
728
690
  if (!context) {
729
691
  context = new this.constructor(event.currentTarget, this._getDelegateConfig());
730
- $(event.currentTarget).data(dataKey, context);
692
+ $__default["default"](event.currentTarget).data(dataKey, context);
731
693
  }
732
694
 
733
695
  if (event) {
734
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
696
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
735
697
  }
736
698
 
737
699
  if (context._isWithActiveTrigger()) {
@@ -739,7 +701,7 @@
739
701
  }
740
702
 
741
703
  clearTimeout(context._timeout);
742
- context._hoverState = HoverState.OUT;
704
+ context._hoverState = HOVER_STATE_OUT;
743
705
 
744
706
  if (!context.config.delay || !context.config.delay.hide) {
745
707
  context.hide();
@@ -747,7 +709,7 @@
747
709
  }
748
710
 
749
711
  context._timeout = setTimeout(function () {
750
- if (context._hoverState === HoverState.OUT) {
712
+ if (context._hoverState === HOVER_STATE_OUT) {
751
713
  context.hide();
752
714
  }
753
715
  }, context.config.delay.hide);
@@ -764,13 +726,13 @@
764
726
  };
765
727
 
766
728
  _proto._getConfig = function _getConfig(config) {
767
- var dataAttributes = $(this.element).data();
729
+ var dataAttributes = $__default["default"](this.element).data();
768
730
  Object.keys(dataAttributes).forEach(function (dataAttr) {
769
731
  if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
770
732
  delete dataAttributes[dataAttr];
771
733
  }
772
734
  });
773
- config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});
735
+ config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
774
736
 
775
737
  if (typeof config.delay === 'number') {
776
738
  config.delay = {
@@ -787,7 +749,7 @@
787
749
  config.content = config.content.toString();
788
750
  }
789
751
 
790
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
752
+ Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
791
753
 
792
754
  if (config.sanitize) {
793
755
  config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@@ -811,7 +773,7 @@
811
773
  };
812
774
 
813
775
  _proto._cleanTipClass = function _cleanTipClass() {
814
- var $tip = $(this.getTipElement());
776
+ var $tip = $__default["default"](this.getTipElement());
815
777
  var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
816
778
 
817
779
  if (tabClass !== null && tabClass.length) {
@@ -820,8 +782,7 @@
820
782
  };
821
783
 
822
784
  _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
823
- var popperInstance = popperData.instance;
824
- this.tip = popperInstance.popper;
785
+ this.tip = popperData.instance.popper;
825
786
 
826
787
  this._cleanTipClass();
827
788
 
@@ -836,7 +797,7 @@
836
797
  return;
837
798
  }
838
799
 
839
- $(tip).removeClass(ClassName.FADE);
800
+ $__default["default"](tip).removeClass(CLASS_NAME_FADE);
840
801
  this.config.animation = false;
841
802
  this.hide();
842
803
  this.show();
@@ -846,7 +807,8 @@
846
807
 
847
808
  Tooltip._jQueryInterface = function _jQueryInterface(config) {
848
809
  return this.each(function () {
849
- var data = $(this).data(DATA_KEY);
810
+ var $element = $__default["default"](this);
811
+ var data = $element.data(DATA_KEY);
850
812
 
851
813
  var _config = typeof config === 'object' && config;
852
814
 
@@ -856,7 +818,7 @@
856
818
 
857
819
  if (!data) {
858
820
  data = new Tooltip(this, _config);
859
- $(this).data(DATA_KEY, data);
821
+ $element.data(DATA_KEY, data);
860
822
  }
861
823
 
862
824
  if (typeof config === 'string') {
@@ -909,20 +871,18 @@
909
871
  return Tooltip;
910
872
  }();
911
873
  /**
912
- * ------------------------------------------------------------------------
913
874
  * jQuery
914
- * ------------------------------------------------------------------------
915
875
  */
916
876
 
917
877
 
918
- $.fn[NAME] = Tooltip._jQueryInterface;
919
- $.fn[NAME].Constructor = Tooltip;
878
+ $__default["default"].fn[NAME] = Tooltip._jQueryInterface;
879
+ $__default["default"].fn[NAME].Constructor = Tooltip;
920
880
 
921
- $.fn[NAME].noConflict = function () {
922
- $.fn[NAME] = JQUERY_NO_CONFLICT;
881
+ $__default["default"].fn[NAME].noConflict = function () {
882
+ $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
923
883
  return Tooltip._jQueryInterface;
924
884
  };
925
885
 
926
886
  return Tooltip;
927
887
 
928
- })));
888
+ }));