bootstrap 4.0.0.beta3 → 4.6.2
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.
- checksums.yaml +5 -5
- data/.travis.yml +15 -1
- data/CHANGELOG.md +2 -2
- data/README.md +2 -2
- data/Rakefile +4 -2
- data/assets/javascripts/bootstrap/alert.js +79 -68
- data/assets/javascripts/bootstrap/button.js +140 -78
- data/assets/javascripts/bootstrap/carousel.js +294 -158
- data/assets/javascripts/bootstrap/collapse.js +157 -133
- data/assets/javascripts/bootstrap/dropdown.js +257 -167
- data/assets/javascripts/bootstrap/modal.js +285 -204
- data/assets/javascripts/bootstrap/popover.js +101 -60
- data/assets/javascripts/bootstrap/scrollspy.js +127 -106
- data/assets/javascripts/bootstrap/tab.js +113 -101
- data/assets/javascripts/bootstrap/toast.js +267 -0
- data/assets/javascripts/bootstrap/tooltip.js +406 -188
- data/assets/javascripts/bootstrap/util.js +106 -55
- data/assets/javascripts/bootstrap-sprockets.js +1 -0
- data/assets/javascripts/bootstrap.js +1946 -1482
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +7 -12
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
- data/assets/stylesheets/_bootstrap.scss +6 -4
- data/assets/stylesheets/bootstrap/_alert.scss +3 -2
- data/assets/stylesheets/bootstrap/_badge.scss +8 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +10 -6
- data/assets/stylesheets/bootstrap/_button-group.scss +17 -20
- data/assets/stylesheets/bootstrap/_buttons.scss +23 -28
- data/assets/stylesheets/bootstrap/_card.scss +77 -61
- data/assets/stylesheets/bootstrap/_carousel.scss +72 -63
- data/assets/stylesheets/bootstrap/_close.scss +15 -9
- data/assets/stylesheets/bootstrap/_code.scss +6 -14
- data/assets/stylesheets/bootstrap/_custom-forms.scss +287 -43
- data/assets/stylesheets/bootstrap/_dropdown.scss +70 -9
- data/assets/stylesheets/bootstrap/_forms.scss +56 -42
- data/assets/stylesheets/bootstrap/_functions.scss +117 -13
- data/assets/stylesheets/bootstrap/_grid.scss +32 -11
- data/assets/stylesheets/bootstrap/_images.scss +4 -4
- data/assets/stylesheets/bootstrap/_input-group.scss +80 -25
- data/assets/stylesheets/bootstrap/_jumbotron.scss +2 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +63 -24
- data/assets/stylesheets/bootstrap/_mixins.scss +9 -4
- data/assets/stylesheets/bootstrap/_modal.scss +96 -24
- data/assets/stylesheets/bootstrap/_nav.scss +14 -7
- data/assets/stylesheets/bootstrap/_navbar.scss +66 -45
- data/assets/stylesheets/bootstrap/_pagination.scss +10 -8
- data/assets/stylesheets/bootstrap/_popover.scss +56 -69
- data/assets/stylesheets/bootstrap/_print.scss +41 -19
- data/assets/stylesheets/bootstrap/_progress.scss +20 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +88 -109
- data/assets/stylesheets/bootstrap/_spinners.scss +65 -0
- data/assets/stylesheets/bootstrap/_tables.scss +19 -14
- data/assets/stylesheets/bootstrap/_toasts.scss +46 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +6 -6
- data/assets/stylesheets/bootstrap/_transitions.scss +10 -20
- data/assets/stylesheets/bootstrap/_type.scss +19 -19
- data/assets/stylesheets/bootstrap/_utilities.scss +4 -0
- data/assets/stylesheets/bootstrap/_variables.scss +492 -215
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +8 -3
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -9
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +35 -26
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +13 -16
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +6 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +102 -40
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +36 -25
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +34 -17
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +27 -51
- data/assets/stylesheets/bootstrap/mixins/_image.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -13
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -6
- data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +11 -2
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +20 -3
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +23 -2
- data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -36
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +28 -8
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +228 -0
- data/bootstrap.gemspec +7 -4
- data/lib/bootstrap/engine.rb +3 -0
- data/lib/bootstrap/version.rb +4 -2
- data/lib/bootstrap.rb +10 -7
- data/tasks/updater/js.rb +18 -6
- data/tasks/updater/network.rb +8 -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 +21 -15
- metadata +29 -16
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
|
@@ -1,51 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Bootstrap util.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
|
+
*/
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery));
|
|
10
|
+
})(this, (function ($) { 'use strict';
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* --------------------------------------------------------------------------
|
|
18
|
+
* Bootstrap (v4.6.2): util.js
|
|
19
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
20
|
+
* --------------------------------------------------------------------------
|
|
21
|
+
*/
|
|
8
22
|
/**
|
|
9
|
-
* ------------------------------------------------------------------------
|
|
10
23
|
* Private TransitionEnd Helpers
|
|
11
|
-
* ------------------------------------------------------------------------
|
|
12
24
|
*/
|
|
13
|
-
|
|
14
|
-
var
|
|
25
|
+
|
|
26
|
+
var TRANSITION_END = 'transitionend';
|
|
27
|
+
var MAX_UID = 1000000;
|
|
28
|
+
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
|
15
29
|
|
|
16
30
|
function toType(obj) {
|
|
17
|
-
|
|
31
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
32
|
+
return "" + obj;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
|
18
36
|
}
|
|
19
37
|
|
|
20
38
|
function getSpecialTransitionEndEvent() {
|
|
21
39
|
return {
|
|
22
|
-
bindType:
|
|
23
|
-
delegateType:
|
|
40
|
+
bindType: TRANSITION_END,
|
|
41
|
+
delegateType: TRANSITION_END,
|
|
24
42
|
handle: function handle(event) {
|
|
25
|
-
if ($(event.target).is(this)) {
|
|
43
|
+
if ($__default["default"](event.target).is(this)) {
|
|
26
44
|
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
|
27
45
|
}
|
|
28
46
|
|
|
29
|
-
return undefined;
|
|
47
|
+
return undefined;
|
|
30
48
|
}
|
|
31
49
|
};
|
|
32
50
|
}
|
|
33
51
|
|
|
34
|
-
function transitionEndTest() {
|
|
35
|
-
if (window.QUnit) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
end: 'transitionend'
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
52
|
function transitionEndEmulator(duration) {
|
|
45
53
|
var _this = this;
|
|
46
54
|
|
|
47
55
|
var called = false;
|
|
48
|
-
$(this).one(Util.TRANSITION_END, function () {
|
|
56
|
+
$__default["default"](this).one(Util.TRANSITION_END, function () {
|
|
49
57
|
called = true;
|
|
50
58
|
});
|
|
51
59
|
setTimeout(function () {
|
|
@@ -57,24 +65,11 @@ var Util = function ($) {
|
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
function setTransitionEndSupport() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (Util.supportsTransitionEnd()) {
|
|
64
|
-
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function escapeId(selector) {
|
|
69
|
-
// we escape IDs in case of special selectors (selector = '#myId:something')
|
|
70
|
-
// $.escapeSelector does not exist in jQuery < 3
|
|
71
|
-
selector = typeof $.escapeSelector === 'function' ? $.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
|
|
72
|
-
return selector;
|
|
68
|
+
$__default["default"].fn.emulateTransitionEnd = transitionEndEmulator;
|
|
69
|
+
$__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
|
73
70
|
}
|
|
74
71
|
/**
|
|
75
|
-
*
|
|
76
|
-
* Public Util Api
|
|
77
|
-
* --------------------------------------------------------------------------
|
|
72
|
+
* Public Util API
|
|
78
73
|
*/
|
|
79
74
|
|
|
80
75
|
|
|
@@ -92,29 +87,44 @@ var Util = function ($) {
|
|
|
92
87
|
var selector = element.getAttribute('data-target');
|
|
93
88
|
|
|
94
89
|
if (!selector || selector === '#') {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (selector.charAt(0) === '#') {
|
|
100
|
-
selector = escapeId(selector);
|
|
90
|
+
var hrefAttr = element.getAttribute('href');
|
|
91
|
+
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
try {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} catch (error) {
|
|
95
|
+
return document.querySelector(selector) ? selector : null;
|
|
96
|
+
} catch (_) {
|
|
107
97
|
return null;
|
|
108
98
|
}
|
|
109
99
|
},
|
|
100
|
+
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
|
101
|
+
if (!element) {
|
|
102
|
+
return 0;
|
|
103
|
+
} // Get transition-duration of the element
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
var transitionDuration = $__default["default"](element).css('transition-duration');
|
|
107
|
+
var transitionDelay = $__default["default"](element).css('transition-delay');
|
|
108
|
+
var floatTransitionDuration = parseFloat(transitionDuration);
|
|
109
|
+
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
|
110
|
+
|
|
111
|
+
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
112
|
+
return 0;
|
|
113
|
+
} // If multiple durations are defined, take the first
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
transitionDuration = transitionDuration.split(',')[0];
|
|
117
|
+
transitionDelay = transitionDelay.split(',')[0];
|
|
118
|
+
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
|
119
|
+
},
|
|
110
120
|
reflow: function reflow(element) {
|
|
111
121
|
return element.offsetHeight;
|
|
112
122
|
},
|
|
113
123
|
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
|
114
|
-
$(element).trigger(
|
|
124
|
+
$__default["default"](element).trigger(TRANSITION_END);
|
|
115
125
|
},
|
|
116
126
|
supportsTransitionEnd: function supportsTransitionEnd() {
|
|
117
|
-
return Boolean(
|
|
127
|
+
return Boolean(TRANSITION_END);
|
|
118
128
|
},
|
|
119
129
|
isElement: function isElement(obj) {
|
|
120
130
|
return (obj[0] || obj).nodeType;
|
|
@@ -131,8 +141,49 @@ var Util = function ($) {
|
|
|
131
141
|
}
|
|
132
142
|
}
|
|
133
143
|
}
|
|
144
|
+
},
|
|
145
|
+
findShadowRoot: function findShadowRoot(element) {
|
|
146
|
+
if (!document.documentElement.attachShadow) {
|
|
147
|
+
return null;
|
|
148
|
+
} // Can find the shadow root otherwise it'll return the document
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
if (typeof element.getRootNode === 'function') {
|
|
152
|
+
var root = element.getRootNode();
|
|
153
|
+
return root instanceof ShadowRoot ? root : null;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (element instanceof ShadowRoot) {
|
|
157
|
+
return element;
|
|
158
|
+
} // when we don't find a shadow root
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
if (!element.parentNode) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return Util.findShadowRoot(element.parentNode);
|
|
166
|
+
},
|
|
167
|
+
jQueryDetection: function jQueryDetection() {
|
|
168
|
+
if (typeof $__default["default"] === 'undefined') {
|
|
169
|
+
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
var version = $__default["default"].fn.jquery.split(' ')[0].split('.');
|
|
173
|
+
var minMajor = 1;
|
|
174
|
+
var ltMajor = 2;
|
|
175
|
+
var minMinor = 9;
|
|
176
|
+
var minPatch = 1;
|
|
177
|
+
var maxMajor = 4;
|
|
178
|
+
|
|
179
|
+
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
|
180
|
+
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
|
181
|
+
}
|
|
134
182
|
}
|
|
135
183
|
};
|
|
184
|
+
Util.jQueryDetection();
|
|
136
185
|
setTransitionEndSupport();
|
|
186
|
+
|
|
137
187
|
return Util;
|
|
138
|
-
|
|
188
|
+
|
|
189
|
+
}));
|