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.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/CHANGELOG.md +2 -14
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +26 -35
- data/assets/javascripts/bootstrap/button.js +93 -52
- data/assets/javascripts/bootstrap/carousel.js +122 -120
- data/assets/javascripts/bootstrap/collapse.js +75 -71
- data/assets/javascripts/bootstrap/dropdown.js +143 -140
- data/assets/javascripts/bootstrap/modal.js +165 -134
- data/assets/javascripts/bootstrap/popover.js +47 -39
- data/assets/javascripts/bootstrap/scrollspy.js +71 -71
- data/assets/javascripts/bootstrap/tab.js +51 -60
- data/assets/javascripts/bootstrap/toast.js +84 -72
- data/assets/javascripts/bootstrap/tooltip.js +141 -131
- data/assets/javascripts/bootstrap/util.js +28 -7
- data/assets/javascripts/bootstrap-sprockets.js +6 -6
- data/assets/javascripts/bootstrap.js +811 -826
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +3 -3
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
- data/assets/stylesheets/_bootstrap.scss +3 -3
- data/assets/stylesheets/bootstrap/_badge.scss +1 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
- data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +13 -8
- data/assets/stylesheets/bootstrap/_card.scss +28 -35
- data/assets/stylesheets/bootstrap/_carousel.scss +6 -6
- data/assets/stylesheets/bootstrap/_close.scss +2 -3
- data/assets/stylesheets/bootstrap/_code.scss +1 -1
- data/assets/stylesheets/bootstrap/_custom-forms.scss +24 -9
- data/assets/stylesheets/bootstrap/_dropdown.scss +5 -4
- data/assets/stylesheets/bootstrap/_forms.scss +26 -9
- data/assets/stylesheets/bootstrap/_functions.scss +60 -5
- data/assets/stylesheets/bootstrap/_grid.scss +33 -8
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_input-group.scss +1 -2
- data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
- data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
- data/assets/stylesheets/bootstrap/_modal.scss +28 -16
- data/assets/stylesheets/bootstrap/_nav.scss +4 -3
- data/assets/stylesheets/bootstrap/_navbar.scss +45 -15
- data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
- data/assets/stylesheets/bootstrap/_popover.scss +8 -9
- data/assets/stylesheets/bootstrap/_print.scss +2 -2
- data/assets/stylesheets/bootstrap/_progress.scss +6 -2
- data/assets/stylesheets/bootstrap/_reboot.scss +24 -27
- data/assets/stylesheets/bootstrap/_root.scss +1 -0
- data/assets/stylesheets/bootstrap/_spinners.scss +1 -0
- data/assets/stylesheets/bootstrap/_tables.scss +3 -3
- data/assets/stylesheets/bootstrap/_type.scss +2 -2
- data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
- data/assets/stylesheets/bootstrap/_variables.scss +46 -22
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +34 -49
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +30 -15
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +3 -4
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/network.rb +2 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +11 -5
@@ -1,16 +1,16 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap toast.js v4.
|
3
|
-
* Copyright 2011-
|
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
|
-
$ = $ &&
|
13
|
-
Util = 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
|
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 (
|
52
|
-
ownKeys
|
53
|
-
|
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.
|
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
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
var
|
84
|
-
|
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
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
-
|
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(
|
141
|
+
this._element.classList.add(CLASS_NAME_FADE);
|
131
142
|
}
|
132
143
|
|
133
144
|
var complete = function complete() {
|
134
|
-
_this._element.classList.remove(
|
145
|
+
_this._element.classList.remove(CLASS_NAME_SHOWING);
|
135
146
|
|
136
|
-
_this._element.classList.add(
|
147
|
+
_this._element.classList.add(CLASS_NAME_SHOW);
|
137
148
|
|
138
|
-
$(_this._element).trigger(
|
149
|
+
$(_this._element).trigger(EVENT_SHOWN);
|
139
150
|
|
140
151
|
if (_this._config.autohide) {
|
141
|
-
_this.
|
152
|
+
_this._timeout = setTimeout(function () {
|
153
|
+
_this.hide();
|
154
|
+
}, _this._config.delay);
|
142
155
|
}
|
143
156
|
};
|
144
157
|
|
145
|
-
this._element.classList.remove(
|
158
|
+
this._element.classList.remove(CLASS_NAME_HIDE);
|
159
|
+
|
160
|
+
Util.reflow(this._element);
|
146
161
|
|
147
|
-
this._element.classList.add(
|
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(
|
158
|
-
|
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
|
-
|
177
|
+
var hideEvent = $.Event(EVENT_HIDE);
|
178
|
+
$(this._element).trigger(hideEvent);
|
165
179
|
|
166
|
-
if (
|
167
|
-
|
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(
|
180
|
-
this._element.classList.remove(
|
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(
|
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 =
|
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
|
209
|
+
var _this2 = this;
|
198
210
|
|
199
|
-
$(this._element).on(
|
200
|
-
return
|
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
|
217
|
+
var _this3 = this;
|
206
218
|
|
207
219
|
var complete = function complete() {
|
208
|
-
|
220
|
+
_this3._element.classList.add(CLASS_NAME_HIDE);
|
209
221
|
|
210
|
-
$(
|
222
|
+
$(_this3._element).trigger(EVENT_HIDDEN);
|
211
223
|
};
|
212
224
|
|
213
|
-
this._element.classList.remove(
|
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
|
+
})));
|