bootstrap 4.3.1 → 4.5.0

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.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -1
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +1 -1
  5. data/assets/javascripts/bootstrap/alert.js +26 -35
  6. data/assets/javascripts/bootstrap/button.js +93 -52
  7. data/assets/javascripts/bootstrap/carousel.js +122 -120
  8. data/assets/javascripts/bootstrap/collapse.js +75 -71
  9. data/assets/javascripts/bootstrap/dropdown.js +143 -140
  10. data/assets/javascripts/bootstrap/modal.js +165 -134
  11. data/assets/javascripts/bootstrap/popover.js +47 -39
  12. data/assets/javascripts/bootstrap/scrollspy.js +71 -71
  13. data/assets/javascripts/bootstrap/tab.js +51 -60
  14. data/assets/javascripts/bootstrap/toast.js +84 -72
  15. data/assets/javascripts/bootstrap/tooltip.js +141 -131
  16. data/assets/javascripts/bootstrap/util.js +28 -7
  17. data/assets/javascripts/bootstrap-sprockets.js +6 -6
  18. data/assets/javascripts/bootstrap.js +811 -826
  19. data/assets/javascripts/bootstrap.min.js +3 -3
  20. data/assets/stylesheets/_bootstrap-grid.scss +3 -3
  21. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  22. data/assets/stylesheets/_bootstrap.scss +3 -3
  23. data/assets/stylesheets/bootstrap/_badge.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
  25. data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_buttons.scss +13 -8
  27. data/assets/stylesheets/bootstrap/_card.scss +28 -35
  28. data/assets/stylesheets/bootstrap/_carousel.scss +6 -6
  29. data/assets/stylesheets/bootstrap/_close.scss +2 -3
  30. data/assets/stylesheets/bootstrap/_code.scss +1 -1
  31. data/assets/stylesheets/bootstrap/_custom-forms.scss +24 -9
  32. data/assets/stylesheets/bootstrap/_dropdown.scss +5 -4
  33. data/assets/stylesheets/bootstrap/_forms.scss +26 -9
  34. data/assets/stylesheets/bootstrap/_functions.scss +60 -5
  35. data/assets/stylesheets/bootstrap/_grid.scss +33 -8
  36. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  37. data/assets/stylesheets/bootstrap/_input-group.scss +1 -2
  38. data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
  39. data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
  40. data/assets/stylesheets/bootstrap/_modal.scss +28 -16
  41. data/assets/stylesheets/bootstrap/_nav.scss +4 -3
  42. data/assets/stylesheets/bootstrap/_navbar.scss +45 -15
  43. data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
  44. data/assets/stylesheets/bootstrap/_popover.scss +8 -9
  45. data/assets/stylesheets/bootstrap/_print.scss +2 -2
  46. data/assets/stylesheets/bootstrap/_progress.scss +6 -2
  47. data/assets/stylesheets/bootstrap/_reboot.scss +24 -27
  48. data/assets/stylesheets/bootstrap/_root.scss +1 -0
  49. data/assets/stylesheets/bootstrap/_spinners.scss +1 -0
  50. data/assets/stylesheets/bootstrap/_tables.scss +3 -3
  51. data/assets/stylesheets/bootstrap/_type.scss +2 -2
  52. data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
  53. data/assets/stylesheets/bootstrap/_variables.scss +46 -22
  54. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  55. data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
  56. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  58. data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
  59. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
  60. data/assets/stylesheets/bootstrap/mixins/_forms.scss +34 -49
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +30 -15
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -0
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
  64. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
  65. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  66. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  67. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
  68. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
  70. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
  72. data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
  73. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  74. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  75. data/assets/stylesheets/bootstrap/utilities/_text.scss +3 -4
  76. data/bootstrap.gemspec +1 -1
  77. data/lib/bootstrap/version.rb +2 -2
  78. data/tasks/updater/network.rb +2 -2
  79. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  80. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  81. data/test/gemfiles/rails_6_0.gemfile +7 -0
  82. data/test/support/dummy_rails_integration.rb +3 -1
  83. data/test/test_helper.rb +18 -13
  84. metadata +11 -5
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * Bootstrap toast.js v4.3.1 (https://getbootstrap.com/)
3
- * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap toast.js v4.5.0 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
8
8
  typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
9
9
  (global = global || self, global.Toast = factory(global.jQuery, global.Util));
10
- }(this, function ($, Util) { 'use strict';
10
+ }(this, (function ($, Util) { 'use strict';
11
11
 
12
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
- Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
12
+ $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
13
+ Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
14
14
 
15
15
  function _defineProperties(target, props) {
16
16
  for (var i = 0; i < props.length; i++) {
@@ -43,20 +43,35 @@
43
43
  return obj;
44
44
  }
45
45
 
46
- function _objectSpread(target) {
46
+ function ownKeys(object, enumerableOnly) {
47
+ var keys = Object.keys(object);
48
+
49
+ if (Object.getOwnPropertySymbols) {
50
+ var symbols = Object.getOwnPropertySymbols(object);
51
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
52
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
53
+ });
54
+ keys.push.apply(keys, symbols);
55
+ }
56
+
57
+ return keys;
58
+ }
59
+
60
+ function _objectSpread2(target) {
47
61
  for (var i = 1; i < arguments.length; i++) {
48
62
  var source = arguments[i] != null ? arguments[i] : {};
49
- var ownKeys = Object.keys(source);
50
63
 
51
- if (typeof Object.getOwnPropertySymbols === 'function') {
52
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
53
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
54
- }));
64
+ if (i % 2) {
65
+ ownKeys(Object(source), true).forEach(function (key) {
66
+ _defineProperty(target, key, source[key]);
67
+ });
68
+ } else if (Object.getOwnPropertyDescriptors) {
69
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
70
+ } else {
71
+ ownKeys(Object(source)).forEach(function (key) {
72
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
73
+ });
55
74
  }
56
-
57
- ownKeys.forEach(function (key) {
58
- _defineProperty(target, key, source[key]);
59
- });
60
75
  }
61
76
 
62
77
  return target;
@@ -69,23 +84,19 @@
69
84
  */
70
85
 
71
86
  var NAME = 'toast';
72
- var VERSION = '4.3.1';
87
+ var VERSION = '4.5.0';
73
88
  var DATA_KEY = 'bs.toast';
74
89
  var EVENT_KEY = "." + DATA_KEY;
75
90
  var JQUERY_NO_CONFLICT = $.fn[NAME];
76
- var Event = {
77
- CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
78
- HIDE: "hide" + EVENT_KEY,
79
- HIDDEN: "hidden" + EVENT_KEY,
80
- SHOW: "show" + EVENT_KEY,
81
- SHOWN: "shown" + EVENT_KEY
82
- };
83
- var ClassName = {
84
- FADE: 'fade',
85
- HIDE: 'hide',
86
- SHOW: 'show',
87
- SHOWING: 'showing'
88
- };
91
+ var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
92
+ var EVENT_HIDE = "hide" + EVENT_KEY;
93
+ var EVENT_HIDDEN = "hidden" + EVENT_KEY;
94
+ var EVENT_SHOW = "show" + EVENT_KEY;
95
+ var EVENT_SHOWN = "shown" + EVENT_KEY;
96
+ var CLASS_NAME_FADE = 'fade';
97
+ var CLASS_NAME_HIDE = 'hide';
98
+ var CLASS_NAME_SHOW = 'show';
99
+ var CLASS_NAME_SHOWING = 'showing';
89
100
  var DefaultType = {
90
101
  animation: 'boolean',
91
102
  autohide: 'boolean',
@@ -96,19 +107,14 @@
96
107
  autohide: true,
97
108
  delay: 500
98
109
  };
99
- var Selector = {
100
- DATA_DISMISS: '[data-dismiss="toast"]'
101
- /**
102
- * ------------------------------------------------------------------------
103
- * Class Definition
104
- * ------------------------------------------------------------------------
105
- */
106
-
107
- };
110
+ var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
111
+ /**
112
+ * ------------------------------------------------------------------------
113
+ * Class Definition
114
+ * ------------------------------------------------------------------------
115
+ */
108
116
 
109
- var Toast =
110
- /*#__PURE__*/
111
- function () {
117
+ var Toast = /*#__PURE__*/function () {
112
118
  function Toast(element, config) {
113
119
  this._element = element;
114
120
  this._config = this._getConfig(config);
@@ -124,27 +130,36 @@
124
130
  _proto.show = function show() {
125
131
  var _this = this;
126
132
 
127
- $(this._element).trigger(Event.SHOW);
133
+ var showEvent = $.Event(EVENT_SHOW);
134
+ $(this._element).trigger(showEvent);
135
+
136
+ if (showEvent.isDefaultPrevented()) {
137
+ return;
138
+ }
128
139
 
129
140
  if (this._config.animation) {
130
- this._element.classList.add(ClassName.FADE);
141
+ this._element.classList.add(CLASS_NAME_FADE);
131
142
  }
132
143
 
133
144
  var complete = function complete() {
134
- _this._element.classList.remove(ClassName.SHOWING);
145
+ _this._element.classList.remove(CLASS_NAME_SHOWING);
135
146
 
136
- _this._element.classList.add(ClassName.SHOW);
147
+ _this._element.classList.add(CLASS_NAME_SHOW);
137
148
 
138
- $(_this._element).trigger(Event.SHOWN);
149
+ $(_this._element).trigger(EVENT_SHOWN);
139
150
 
140
151
  if (_this._config.autohide) {
141
- _this.hide();
152
+ _this._timeout = setTimeout(function () {
153
+ _this.hide();
154
+ }, _this._config.delay);
142
155
  }
143
156
  };
144
157
 
145
- this._element.classList.remove(ClassName.HIDE);
158
+ this._element.classList.remove(CLASS_NAME_HIDE);
159
+
160
+ Util.reflow(this._element);
146
161
 
147
- this._element.classList.add(ClassName.SHOWING);
162
+ this._element.classList.add(CLASS_NAME_SHOWING);
148
163
 
149
164
  if (this._config.animation) {
150
165
  var transitionDuration = Util.getTransitionDurationFromElement(this._element);
@@ -154,33 +169,30 @@
154
169
  }
155
170
  };
156
171
 
157
- _proto.hide = function hide(withoutTimeout) {
158
- var _this2 = this;
159
-
160
- if (!this._element.classList.contains(ClassName.SHOW)) {
172
+ _proto.hide = function hide() {
173
+ if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
161
174
  return;
162
175
  }
163
176
 
164
- $(this._element).trigger(Event.HIDE);
177
+ var hideEvent = $.Event(EVENT_HIDE);
178
+ $(this._element).trigger(hideEvent);
165
179
 
166
- if (withoutTimeout) {
167
- this._close();
168
- } else {
169
- this._timeout = setTimeout(function () {
170
- _this2._close();
171
- }, this._config.delay);
180
+ if (hideEvent.isDefaultPrevented()) {
181
+ return;
172
182
  }
183
+
184
+ this._close();
173
185
  };
174
186
 
175
187
  _proto.dispose = function dispose() {
176
188
  clearTimeout(this._timeout);
177
189
  this._timeout = null;
178
190
 
179
- if (this._element.classList.contains(ClassName.SHOW)) {
180
- this._element.classList.remove(ClassName.SHOW);
191
+ if (this._element.classList.contains(CLASS_NAME_SHOW)) {
192
+ this._element.classList.remove(CLASS_NAME_SHOW);
181
193
  }
182
194
 
183
- $(this._element).off(Event.CLICK_DISMISS);
195
+ $(this._element).off(EVENT_CLICK_DISMISS);
184
196
  $.removeData(this._element, DATA_KEY);
185
197
  this._element = null;
186
198
  this._config = null;
@@ -188,29 +200,29 @@
188
200
  ;
189
201
 
190
202
  _proto._getConfig = function _getConfig(config) {
191
- config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
203
+ config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default), $(this._element).data()), typeof config === 'object' && config ? config : {});
192
204
  Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
193
205
  return config;
194
206
  };
195
207
 
196
208
  _proto._setListeners = function _setListeners() {
197
- var _this3 = this;
209
+ var _this2 = this;
198
210
 
199
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
200
- return _this3.hide(true);
211
+ $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
212
+ return _this2.hide();
201
213
  });
202
214
  };
203
215
 
204
216
  _proto._close = function _close() {
205
- var _this4 = this;
217
+ var _this3 = this;
206
218
 
207
219
  var complete = function complete() {
208
- _this4._element.classList.add(ClassName.HIDE);
220
+ _this3._element.classList.add(CLASS_NAME_HIDE);
209
221
 
210
- $(_this4._element).trigger(Event.HIDDEN);
222
+ $(_this3._element).trigger(EVENT_HIDDEN);
211
223
  };
212
224
 
213
- this._element.classList.remove(ClassName.SHOW);
225
+ this._element.classList.remove(CLASS_NAME_SHOW);
214
226
 
215
227
  if (this._config.animation) {
216
228
  var transitionDuration = Util.getTransitionDurationFromElement(this._element);
@@ -279,4 +291,4 @@
279
291
 
280
292
  return Toast;
281
293
 
282
- }));
294
+ })));