bootstrap 4.6.0 → 4.6.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +27 -35
- data/assets/javascripts/bootstrap/button.js +27 -35
- data/assets/javascripts/bootstrap/carousel.js +81 -93
- data/assets/javascripts/bootstrap/collapse.js +63 -71
- data/assets/javascripts/bootstrap/dropdown.js +66 -77
- data/assets/javascripts/bootstrap/modal.js +114 -122
- data/assets/javascripts/bootstrap/popover.js +36 -32
- data/assets/javascripts/bootstrap/scrollspy.js +41 -49
- data/assets/javascripts/bootstrap/tab.js +50 -52
- data/assets/javascripts/bootstrap/toast.js +37 -43
- data/assets/javascripts/bootstrap/tooltip.js +106 -111
- data/assets/javascripts/bootstrap/util.js +15 -18
- data/assets/javascripts/bootstrap-sprockets.js +7 -7
- data/assets/javascripts/bootstrap.js +787 -862
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/stylesheets/_bootstrap-grid.scss +1 -1
- data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
- data/assets/stylesheets/_bootstrap.scss +1 -1
- data/assets/stylesheets/bootstrap/_card.scss +5 -5
- data/assets/stylesheets/bootstrap/_carousel.scss +5 -2
- data/assets/stylesheets/bootstrap/_custom-forms.scss +6 -6
- data/assets/stylesheets/bootstrap/_forms.scss +10 -10
- data/assets/stylesheets/bootstrap/_functions.scss +47 -1
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_input-group.scss +3 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -1
- data/assets/stylesheets/bootstrap/_modal.scss +2 -2
- data/assets/stylesheets/bootstrap/_popover.scss +9 -9
- data/assets/stylesheets/bootstrap/_print.scss +0 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +2 -2
- data/assets/stylesheets/bootstrap/_tooltip.scss +4 -4
- data/assets/stylesheets/bootstrap/_variables.scss +12 -10
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +13 -3
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +11 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +1 -1
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +1 -1
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +126 -102
- data/lib/bootstrap/version.rb +2 -2
- metadata +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap toast.js v4.6.
|
2
|
+
* Bootstrap toast.js v4.6.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2021 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
|
*/
|
@@ -7,7 +7,7 @@
|
|
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'], factory) :
|
9
9
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.jQuery, global.Util));
|
10
|
-
}(this, (function ($, Util) { 'use strict';
|
10
|
+
})(this, (function ($, Util) { 'use strict';
|
11
11
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
13
13
|
|
@@ -49,40 +49,36 @@
|
|
49
49
|
}
|
50
50
|
|
51
51
|
/**
|
52
|
-
* ------------------------------------------------------------------------
|
53
52
|
* Constants
|
54
|
-
* ------------------------------------------------------------------------
|
55
53
|
*/
|
56
54
|
|
57
55
|
var NAME = 'toast';
|
58
|
-
var VERSION = '4.6.
|
56
|
+
var VERSION = '4.6.1';
|
59
57
|
var DATA_KEY = 'bs.toast';
|
60
58
|
var EVENT_KEY = "." + DATA_KEY;
|
61
|
-
var JQUERY_NO_CONFLICT = $__default[
|
59
|
+
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
|
60
|
+
var CLASS_NAME_FADE = 'fade';
|
61
|
+
var CLASS_NAME_HIDE = 'hide';
|
62
|
+
var CLASS_NAME_SHOW = 'show';
|
63
|
+
var CLASS_NAME_SHOWING = 'showing';
|
62
64
|
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
63
65
|
var EVENT_HIDE = "hide" + EVENT_KEY;
|
64
66
|
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
65
67
|
var EVENT_SHOW = "show" + EVENT_KEY;
|
66
68
|
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
67
|
-
var
|
68
|
-
var CLASS_NAME_HIDE = 'hide';
|
69
|
-
var CLASS_NAME_SHOW = 'show';
|
70
|
-
var CLASS_NAME_SHOWING = 'showing';
|
71
|
-
var DefaultType = {
|
72
|
-
animation: 'boolean',
|
73
|
-
autohide: 'boolean',
|
74
|
-
delay: 'number'
|
75
|
-
};
|
69
|
+
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
|
76
70
|
var Default = {
|
77
71
|
animation: true,
|
78
72
|
autohide: true,
|
79
73
|
delay: 500
|
80
74
|
};
|
81
|
-
var
|
75
|
+
var DefaultType = {
|
76
|
+
animation: 'boolean',
|
77
|
+
autohide: 'boolean',
|
78
|
+
delay: 'number'
|
79
|
+
};
|
82
80
|
/**
|
83
|
-
*
|
84
|
-
* Class Definition
|
85
|
-
* ------------------------------------------------------------------------
|
81
|
+
* Class definition
|
86
82
|
*/
|
87
83
|
|
88
84
|
var Toast = /*#__PURE__*/function () {
|
@@ -101,8 +97,8 @@
|
|
101
97
|
_proto.show = function show() {
|
102
98
|
var _this = this;
|
103
99
|
|
104
|
-
var showEvent = $__default[
|
105
|
-
$__default[
|
100
|
+
var showEvent = $__default["default"].Event(EVENT_SHOW);
|
101
|
+
$__default["default"](this._element).trigger(showEvent);
|
106
102
|
|
107
103
|
if (showEvent.isDefaultPrevented()) {
|
108
104
|
return;
|
@@ -119,7 +115,7 @@
|
|
119
115
|
|
120
116
|
_this._element.classList.add(CLASS_NAME_SHOW);
|
121
117
|
|
122
|
-
$__default[
|
118
|
+
$__default["default"](_this._element).trigger(EVENT_SHOWN);
|
123
119
|
|
124
120
|
if (_this._config.autohide) {
|
125
121
|
_this._timeout = setTimeout(function () {
|
@@ -130,13 +126,13 @@
|
|
130
126
|
|
131
127
|
this._element.classList.remove(CLASS_NAME_HIDE);
|
132
128
|
|
133
|
-
Util__default[
|
129
|
+
Util__default["default"].reflow(this._element);
|
134
130
|
|
135
131
|
this._element.classList.add(CLASS_NAME_SHOWING);
|
136
132
|
|
137
133
|
if (this._config.animation) {
|
138
|
-
var transitionDuration = Util__default[
|
139
|
-
$__default[
|
134
|
+
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
|
135
|
+
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
140
136
|
} else {
|
141
137
|
complete();
|
142
138
|
}
|
@@ -147,8 +143,8 @@
|
|
147
143
|
return;
|
148
144
|
}
|
149
145
|
|
150
|
-
var hideEvent = $__default[
|
151
|
-
$__default[
|
146
|
+
var hideEvent = $__default["default"].Event(EVENT_HIDE);
|
147
|
+
$__default["default"](this._element).trigger(hideEvent);
|
152
148
|
|
153
149
|
if (hideEvent.isDefaultPrevented()) {
|
154
150
|
return;
|
@@ -164,23 +160,23 @@
|
|
164
160
|
this._element.classList.remove(CLASS_NAME_SHOW);
|
165
161
|
}
|
166
162
|
|
167
|
-
$__default[
|
168
|
-
$__default[
|
163
|
+
$__default["default"](this._element).off(EVENT_CLICK_DISMISS);
|
164
|
+
$__default["default"].removeData(this._element, DATA_KEY);
|
169
165
|
this._element = null;
|
170
166
|
this._config = null;
|
171
167
|
} // Private
|
172
168
|
;
|
173
169
|
|
174
170
|
_proto._getConfig = function _getConfig(config) {
|
175
|
-
config = _extends({}, Default, $__default[
|
176
|
-
Util__default[
|
171
|
+
config = _extends({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
|
172
|
+
Util__default["default"].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
177
173
|
return config;
|
178
174
|
};
|
179
175
|
|
180
176
|
_proto._setListeners = function _setListeners() {
|
181
177
|
var _this2 = this;
|
182
178
|
|
183
|
-
$__default[
|
179
|
+
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
|
184
180
|
return _this2.hide();
|
185
181
|
});
|
186
182
|
};
|
@@ -191,14 +187,14 @@
|
|
191
187
|
var complete = function complete() {
|
192
188
|
_this3._element.classList.add(CLASS_NAME_HIDE);
|
193
189
|
|
194
|
-
$__default[
|
190
|
+
$__default["default"](_this3._element).trigger(EVENT_HIDDEN);
|
195
191
|
};
|
196
192
|
|
197
193
|
this._element.classList.remove(CLASS_NAME_SHOW);
|
198
194
|
|
199
195
|
if (this._config.animation) {
|
200
|
-
var transitionDuration = Util__default[
|
201
|
-
$__default[
|
196
|
+
var transitionDuration = Util__default["default"].getTransitionDurationFromElement(this._element);
|
197
|
+
$__default["default"](this._element).one(Util__default["default"].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
202
198
|
} else {
|
203
199
|
complete();
|
204
200
|
}
|
@@ -212,7 +208,7 @@
|
|
212
208
|
|
213
209
|
Toast._jQueryInterface = function _jQueryInterface(config) {
|
214
210
|
return this.each(function () {
|
215
|
-
var $element = $__default[
|
211
|
+
var $element = $__default["default"](this);
|
216
212
|
var data = $element.data(DATA_KEY);
|
217
213
|
|
218
214
|
var _config = typeof config === 'object' && config;
|
@@ -252,20 +248,18 @@
|
|
252
248
|
return Toast;
|
253
249
|
}();
|
254
250
|
/**
|
255
|
-
* ------------------------------------------------------------------------
|
256
251
|
* jQuery
|
257
|
-
* ------------------------------------------------------------------------
|
258
252
|
*/
|
259
253
|
|
260
254
|
|
261
|
-
$__default[
|
262
|
-
$__default[
|
255
|
+
$__default["default"].fn[NAME] = Toast._jQueryInterface;
|
256
|
+
$__default["default"].fn[NAME].Constructor = Toast;
|
263
257
|
|
264
|
-
$__default[
|
265
|
-
$__default[
|
258
|
+
$__default["default"].fn[NAME].noConflict = function () {
|
259
|
+
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
|
266
260
|
return Toast._jQueryInterface;
|
267
261
|
};
|
268
262
|
|
269
263
|
return Toast;
|
270
264
|
|
271
|
-
}))
|
265
|
+
}));
|