bootstrap 4.0.0 → 4.3.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.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/Rakefile +4 -2
- data/assets/javascripts/bootstrap/alert.js +45 -22
- data/assets/javascripts/bootstrap/button.js +39 -19
- data/assets/javascripts/bootstrap/carousel.js +213 -51
- data/assets/javascripts/bootstrap/collapse.js +105 -52
- data/assets/javascripts/bootstrap/dropdown.js +169 -45
- data/assets/javascripts/bootstrap/modal.js +139 -71
- data/assets/javascripts/bootstrap/popover.js +77 -20
- data/assets/javascripts/bootstrap/scrollspy.js +87 -29
- data/assets/javascripts/bootstrap/tab.js +50 -32
- data/assets/javascripts/bootstrap/toast.js +282 -0
- data/assets/javascripts/bootstrap/tooltip.js +295 -59
- data/assets/javascripts/bootstrap/util.js +78 -45
- data/assets/javascripts/bootstrap-sprockets.js +7 -6
- data/assets/javascripts/bootstrap.js +1537 -996
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +4 -7
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
- data/assets/stylesheets/_bootstrap.scss +5 -3
- data/assets/stylesheets/bootstrap/_alert.scss +1 -1
- data/assets/stylesheets/bootstrap/_badge.scss +8 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
- data/assets/stylesheets/bootstrap/_button-group.scss +16 -19
- data/assets/stylesheets/bootstrap/_buttons.scss +10 -16
- data/assets/stylesheets/bootstrap/_card.scss +53 -34
- data/assets/stylesheets/bootstrap/_carousel.scss +66 -60
- data/assets/stylesheets/bootstrap/_close.scss +15 -8
- data/assets/stylesheets/bootstrap/_code.scss +5 -13
- data/assets/stylesheets/bootstrap/_custom-forms.scss +250 -40
- data/assets/stylesheets/bootstrap/_dropdown.scss +65 -5
- data/assets/stylesheets/bootstrap/_forms.scss +32 -35
- data/assets/stylesheets/bootstrap/_functions.scss +9 -9
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_input-group.scss +45 -11
- data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +39 -5
- data/assets/stylesheets/bootstrap/_mixins.scss +6 -1
- data/assets/stylesheets/bootstrap/_modal.scss +80 -19
- data/assets/stylesheets/bootstrap/_nav.scss +2 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +9 -26
- data/assets/stylesheets/bootstrap/_pagination.scss +2 -6
- data/assets/stylesheets/bootstrap/_popover.scss +47 -59
- data/assets/stylesheets/bootstrap/_print.scss +23 -6
- data/assets/stylesheets/bootstrap/_progress.scss +16 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +51 -50
- data/assets/stylesheets/bootstrap/_spinners.scss +55 -0
- data/assets/stylesheets/bootstrap/_tables.scss +16 -11
- data/assets/stylesheets/bootstrap/_toasts.scss +44 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
- data/assets/stylesheets/bootstrap/_transitions.scss +4 -20
- data/assets/stylesheets/bootstrap/_type.scss +16 -16
- data/assets/stylesheets/bootstrap/_utilities.scss +3 -0
- data/assets/stylesheets/bootstrap/_variables.scss +430 -201
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -2
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +12 -14
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +5 -8
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +68 -13
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
- data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +17 -1
- data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
- 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/_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 +26 -6
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
- data/bootstrap.gemspec +6 -3
- 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 +1 -1
- data/test/test_helper.rb +7 -6
- metadata +19 -12
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
|
@@ -1,26 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Bootstrap util.js v4.3.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)
|
|
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 = global || self, global.Util = factory(global.jQuery));
|
|
10
|
+
}(this, function ($) { 'use strict';
|
|
11
|
+
|
|
12
|
+
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* --------------------------------------------------------------------------
|
|
16
|
+
* Bootstrap (v4.3.1): util.js
|
|
17
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
18
|
+
* --------------------------------------------------------------------------
|
|
19
|
+
*/
|
|
8
20
|
/**
|
|
9
21
|
* ------------------------------------------------------------------------
|
|
10
22
|
* Private TransitionEnd Helpers
|
|
11
23
|
* ------------------------------------------------------------------------
|
|
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
|
-
return {}.toString.call(obj).match(/\s([a-
|
|
31
|
+
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
|
18
32
|
}
|
|
19
33
|
|
|
20
34
|
function getSpecialTransitionEndEvent() {
|
|
21
35
|
return {
|
|
22
|
-
bindType:
|
|
23
|
-
delegateType:
|
|
36
|
+
bindType: TRANSITION_END,
|
|
37
|
+
delegateType: TRANSITION_END,
|
|
24
38
|
handle: function handle(event) {
|
|
25
39
|
if ($(event.target).is(this)) {
|
|
26
40
|
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
|
@@ -31,16 +45,6 @@ var Util = function ($) {
|
|
|
31
45
|
};
|
|
32
46
|
}
|
|
33
47
|
|
|
34
|
-
function transitionEndTest() {
|
|
35
|
-
if (typeof window !== 'undefined' && window.QUnit) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
end: 'transitionend'
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
48
|
function transitionEndEmulator(duration) {
|
|
45
49
|
var _this = this;
|
|
46
50
|
|
|
@@ -57,19 +61,8 @@ var Util = function ($) {
|
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
function setTransitionEndSupport() {
|
|
60
|
-
transition = transitionEndTest();
|
|
61
64
|
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
|
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;
|
|
65
|
+
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
|
73
66
|
}
|
|
74
67
|
/**
|
|
75
68
|
* --------------------------------------------------------------------------
|
|
@@ -92,29 +85,45 @@ var Util = function ($) {
|
|
|
92
85
|
var selector = element.getAttribute('data-target');
|
|
93
86
|
|
|
94
87
|
if (!selector || selector === '#') {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (selector.charAt(0) === '#') {
|
|
100
|
-
selector = escapeId(selector);
|
|
88
|
+
var hrefAttr = element.getAttribute('href');
|
|
89
|
+
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
|
101
90
|
}
|
|
102
91
|
|
|
103
92
|
try {
|
|
104
|
-
|
|
105
|
-
return $selector.length > 0 ? selector : null;
|
|
93
|
+
return document.querySelector(selector) ? selector : null;
|
|
106
94
|
} catch (err) {
|
|
107
95
|
return null;
|
|
108
96
|
}
|
|
109
97
|
},
|
|
98
|
+
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
|
99
|
+
if (!element) {
|
|
100
|
+
return 0;
|
|
101
|
+
} // Get transition-duration of the element
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
var transitionDuration = $(element).css('transition-duration');
|
|
105
|
+
var transitionDelay = $(element).css('transition-delay');
|
|
106
|
+
var floatTransitionDuration = parseFloat(transitionDuration);
|
|
107
|
+
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
|
108
|
+
|
|
109
|
+
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
110
|
+
return 0;
|
|
111
|
+
} // If multiple durations are defined, take the first
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
transitionDuration = transitionDuration.split(',')[0];
|
|
115
|
+
transitionDelay = transitionDelay.split(',')[0];
|
|
116
|
+
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
|
117
|
+
},
|
|
110
118
|
reflow: function reflow(element) {
|
|
111
119
|
return element.offsetHeight;
|
|
112
120
|
},
|
|
113
121
|
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
|
114
|
-
$(element).trigger(
|
|
122
|
+
$(element).trigger(TRANSITION_END);
|
|
115
123
|
},
|
|
124
|
+
// TODO: Remove in v5
|
|
116
125
|
supportsTransitionEnd: function supportsTransitionEnd() {
|
|
117
|
-
return Boolean(
|
|
126
|
+
return Boolean(TRANSITION_END);
|
|
118
127
|
},
|
|
119
128
|
isElement: function isElement(obj) {
|
|
120
129
|
return (obj[0] || obj).nodeType;
|
|
@@ -131,8 +140,32 @@ var Util = function ($) {
|
|
|
131
140
|
}
|
|
132
141
|
}
|
|
133
142
|
}
|
|
143
|
+
},
|
|
144
|
+
findShadowRoot: function findShadowRoot(element) {
|
|
145
|
+
if (!document.documentElement.attachShadow) {
|
|
146
|
+
return null;
|
|
147
|
+
} // Can find the shadow root otherwise it'll return the document
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
if (typeof element.getRootNode === 'function') {
|
|
151
|
+
var root = element.getRootNode();
|
|
152
|
+
return root instanceof ShadowRoot ? root : null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (element instanceof ShadowRoot) {
|
|
156
|
+
return element;
|
|
157
|
+
} // when we don't find a shadow root
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
if (!element.parentNode) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return Util.findShadowRoot(element.parentNode);
|
|
134
165
|
}
|
|
135
166
|
};
|
|
136
167
|
setTransitionEndSupport();
|
|
168
|
+
|
|
137
169
|
return Util;
|
|
138
|
-
|
|
170
|
+
|
|
171
|
+
}));
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
//= require ./bootstrap/util
|
|
2
|
+
//= require ./bootstrap/alert
|
|
3
|
+
//= require ./bootstrap/button
|
|
4
|
+
//= require ./bootstrap/carousel
|
|
5
|
+
//= require ./bootstrap/collapse
|
|
6
|
+
//= require ./bootstrap/dropdown
|
|
2
7
|
//= require ./bootstrap/modal
|
|
3
8
|
//= require ./bootstrap/tooltip
|
|
4
9
|
//= require ./bootstrap/popover
|
|
5
|
-
//= require ./bootstrap/tab
|
|
6
|
-
//= require ./bootstrap/collapse
|
|
7
10
|
//= require ./bootstrap/scrollspy
|
|
8
|
-
//= require ./bootstrap/
|
|
9
|
-
//= require ./bootstrap/
|
|
10
|
-
//= require ./bootstrap/button
|
|
11
|
-
//= require ./bootstrap/alert
|
|
11
|
+
//= require ./bootstrap/tab
|
|
12
|
+
//= require ./bootstrap/toast
|