bootstrap 4.1.3 → 4.2.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/.travis.yml +1 -1
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/assets/javascripts/bootstrap-sprockets.js +6 -5
- data/assets/javascripts/bootstrap.js +3290 -2985
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/javascripts/bootstrap/alert.js +127 -132
- data/assets/javascripts/bootstrap/button.js +119 -124
- data/assets/javascripts/bootstrap/carousel.js +492 -393
- data/assets/javascripts/bootstrap/collapse.js +276 -279
- data/assets/javascripts/bootstrap/dropdown.js +413 -374
- data/assets/javascripts/bootstrap/modal.js +455 -445
- data/assets/javascripts/bootstrap/popover.js +155 -160
- data/assets/javascripts/bootstrap/scrollspy.js +246 -250
- data/assets/javascripts/bootstrap/tab.js +180 -192
- data/assets/javascripts/bootstrap/toast.js +277 -0
- data/assets/javascripts/bootstrap/tooltip.js +533 -522
- data/assets/javascripts/bootstrap/util.js +140 -116
- data/assets/stylesheets/_bootstrap-grid.scss +2 -5
- data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
- data/assets/stylesheets/_bootstrap.scss +3 -1
- data/assets/stylesheets/bootstrap/_alert.scss +1 -1
- data/assets/stylesheets/bootstrap/_badge.scss +6 -0
- data/assets/stylesheets/bootstrap/_button-group.scss +9 -18
- data/assets/stylesheets/bootstrap/_buttons.scss +7 -10
- data/assets/stylesheets/bootstrap/_card.scss +30 -21
- data/assets/stylesheets/bootstrap/_carousel.scss +36 -74
- data/assets/stylesheets/bootstrap/_close.scss +15 -6
- data/assets/stylesheets/bootstrap/_custom-forms.scss +103 -29
- data/assets/stylesheets/bootstrap/_dropdown.scss +30 -5
- data/assets/stylesheets/bootstrap/_forms.scss +12 -11
- data/assets/stylesheets/bootstrap/_functions.scss +4 -4
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_input-group.scss +24 -4
- data/assets/stylesheets/bootstrap/_list-group.scss +6 -0
- data/assets/stylesheets/bootstrap/_modal.scss +16 -10
- data/assets/stylesheets/bootstrap/_nav.scss +2 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +4 -4
- data/assets/stylesheets/bootstrap/_popover.scss +1 -1
- data/assets/stylesheets/bootstrap/_reboot.scss +14 -35
- data/assets/stylesheets/bootstrap/_spinners.scss +53 -0
- data/assets/stylesheets/bootstrap/_tables.scss +2 -2
- data/assets/stylesheets/bootstrap/_toasts.scss +43 -0
- data/assets/stylesheets/bootstrap/_type.scss +2 -2
- data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
- data/assets/stylesheets/bootstrap/_variables.scss +220 -81
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -2
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +9 -7
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +0 -4
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +61 -10
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +5 -2
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +4 -0
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
- data/assets/stylesheets/bootstrap/utilities/_text.scss +13 -4
- data/bootstrap.gemspec +6 -3
- data/lib/bootstrap.rb +10 -7
- data/lib/bootstrap/engine.rb +3 -0
- data/lib/bootstrap/version.rb +4 -2
- metadata +15 -11
@@ -1,3 +1,8 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap util.js v4.2.1 (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5
|
+
*/
|
1
6
|
(function (global, factory) {
|
2
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
3
8
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
@@ -8,135 +13,154 @@
|
|
8
13
|
|
9
14
|
/**
|
10
15
|
* --------------------------------------------------------------------------
|
11
|
-
* Bootstrap (v4.1
|
16
|
+
* Bootstrap (v4.2.1): util.js
|
12
17
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
13
18
|
* --------------------------------------------------------------------------
|
14
19
|
*/
|
20
|
+
/**
|
21
|
+
* ------------------------------------------------------------------------
|
22
|
+
* Private TransitionEnd Helpers
|
23
|
+
* ------------------------------------------------------------------------
|
24
|
+
*/
|
15
25
|
|
16
|
-
var
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
var TRANSITION_END = 'transitionend';
|
27
|
+
var MAX_UID = 1000000;
|
28
|
+
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
29
|
+
|
30
|
+
function toType(obj) {
|
31
|
+
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
32
|
+
}
|
33
|
+
|
34
|
+
function getSpecialTransitionEndEvent() {
|
35
|
+
return {
|
36
|
+
bindType: TRANSITION_END,
|
37
|
+
delegateType: TRANSITION_END,
|
38
|
+
handle: function handle(event) {
|
39
|
+
if ($(event.target).is(this)) {
|
40
|
+
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
41
|
+
}
|
29
42
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
43
|
+
return undefined; // eslint-disable-line no-undefined
|
44
|
+
}
|
45
|
+
};
|
46
|
+
}
|
47
|
+
|
48
|
+
function transitionEndEmulator(duration) {
|
49
|
+
var _this = this;
|
50
|
+
|
51
|
+
var called = false;
|
52
|
+
$(this).one(Util.TRANSITION_END, function () {
|
53
|
+
called = true;
|
54
|
+
});
|
55
|
+
setTimeout(function () {
|
56
|
+
if (!called) {
|
57
|
+
Util.triggerTransitionEnd(_this);
|
58
|
+
}
|
59
|
+
}, duration);
|
60
|
+
return this;
|
61
|
+
}
|
62
|
+
|
63
|
+
function setTransitionEndSupport() {
|
64
|
+
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
65
|
+
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
* --------------------------------------------------------------------------
|
69
|
+
* Public Util Api
|
70
|
+
* --------------------------------------------------------------------------
|
71
|
+
*/
|
38
72
|
|
39
|
-
return undefined; // eslint-disable-line no-undefined
|
40
|
-
}
|
41
|
-
};
|
42
|
-
}
|
43
73
|
|
44
|
-
|
45
|
-
|
74
|
+
var Util = {
|
75
|
+
TRANSITION_END: 'bsTransitionEnd',
|
76
|
+
getUID: function getUID(prefix) {
|
77
|
+
do {
|
78
|
+
// eslint-disable-next-line no-bitwise
|
79
|
+
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
80
|
+
} while (document.getElementById(prefix));
|
46
81
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
setTimeout(function () {
|
52
|
-
if (!called) {
|
53
|
-
Util.triggerTransitionEnd(_this);
|
54
|
-
}
|
55
|
-
}, duration);
|
56
|
-
return this;
|
57
|
-
}
|
82
|
+
return prefix;
|
83
|
+
},
|
84
|
+
getSelectorFromElement: function getSelectorFromElement(element) {
|
85
|
+
var selector = element.getAttribute('data-target');
|
58
86
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
/**
|
64
|
-
* --------------------------------------------------------------------------
|
65
|
-
* Public Util Api
|
66
|
-
* --------------------------------------------------------------------------
|
67
|
-
*/
|
68
|
-
|
69
|
-
|
70
|
-
var Util = {
|
71
|
-
TRANSITION_END: 'bsTransitionEnd',
|
72
|
-
getUID: function getUID(prefix) {
|
73
|
-
do {
|
74
|
-
// eslint-disable-next-line no-bitwise
|
75
|
-
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
76
|
-
} while (document.getElementById(prefix));
|
77
|
-
|
78
|
-
return prefix;
|
79
|
-
},
|
80
|
-
getSelectorFromElement: function getSelectorFromElement(element) {
|
81
|
-
var selector = element.getAttribute('data-target');
|
82
|
-
|
83
|
-
if (!selector || selector === '#') {
|
84
|
-
selector = element.getAttribute('href') || '';
|
85
|
-
}
|
87
|
+
if (!selector || selector === '#') {
|
88
|
+
var hrefAttr = element.getAttribute('href');
|
89
|
+
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
90
|
+
}
|
86
91
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
}
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
132
|
-
}
|
92
|
+
return selector && document.querySelector(selector) ? selector : null;
|
93
|
+
},
|
94
|
+
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
95
|
+
if (!element) {
|
96
|
+
return 0;
|
97
|
+
} // Get transition-duration of the element
|
98
|
+
|
99
|
+
|
100
|
+
var transitionDuration = $(element).css('transition-duration');
|
101
|
+
var transitionDelay = $(element).css('transition-delay');
|
102
|
+
var floatTransitionDuration = parseFloat(transitionDuration);
|
103
|
+
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
104
|
+
|
105
|
+
if (!floatTransitionDuration && !floatTransitionDelay) {
|
106
|
+
return 0;
|
107
|
+
} // If multiple durations are defined, take the first
|
108
|
+
|
109
|
+
|
110
|
+
transitionDuration = transitionDuration.split(',')[0];
|
111
|
+
transitionDelay = transitionDelay.split(',')[0];
|
112
|
+
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
113
|
+
},
|
114
|
+
reflow: function reflow(element) {
|
115
|
+
return element.offsetHeight;
|
116
|
+
},
|
117
|
+
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
118
|
+
$(element).trigger(TRANSITION_END);
|
119
|
+
},
|
120
|
+
// TODO: Remove in v5
|
121
|
+
supportsTransitionEnd: function supportsTransitionEnd() {
|
122
|
+
return Boolean(TRANSITION_END);
|
123
|
+
},
|
124
|
+
isElement: function isElement(obj) {
|
125
|
+
return (obj[0] || obj).nodeType;
|
126
|
+
},
|
127
|
+
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
128
|
+
for (var property in configTypes) {
|
129
|
+
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
130
|
+
var expectedTypes = configTypes[property];
|
131
|
+
var value = config[property];
|
132
|
+
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
|
133
|
+
|
134
|
+
if (!new RegExp(expectedTypes).test(valueType)) {
|
135
|
+
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
133
136
|
}
|
134
137
|
}
|
135
138
|
}
|
136
|
-
}
|
137
|
-
|
138
|
-
|
139
|
-
|
139
|
+
},
|
140
|
+
findShadowRoot: function findShadowRoot(element) {
|
141
|
+
if (!document.documentElement.attachShadow) {
|
142
|
+
return null;
|
143
|
+
} // Can find the shadow root otherwise it'll return the document
|
144
|
+
|
145
|
+
|
146
|
+
if (typeof element.getRootNode === 'function') {
|
147
|
+
var root = element.getRootNode();
|
148
|
+
return root instanceof ShadowRoot ? root : null;
|
149
|
+
}
|
150
|
+
|
151
|
+
if (element instanceof ShadowRoot) {
|
152
|
+
return element;
|
153
|
+
} // when we don't find a shadow root
|
154
|
+
|
155
|
+
|
156
|
+
if (!element.parentNode) {
|
157
|
+
return null;
|
158
|
+
}
|
159
|
+
|
160
|
+
return Util.findShadowRoot(element.parentNode);
|
161
|
+
}
|
162
|
+
};
|
163
|
+
setTransitionEndSupport();
|
140
164
|
|
141
165
|
return Util;
|
142
166
|
|
@@ -1,14 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap Grid v4.1
|
2
|
+
* Bootstrap Grid v4.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2018 The Bootstrap Authors
|
4
4
|
* Copyright 2011-2018 Twitter, Inc.
|
5
5
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
6
6
|
*/
|
7
7
|
|
8
|
-
@at-root {
|
9
|
-
@-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix
|
10
|
-
}
|
11
|
-
|
12
8
|
html {
|
13
9
|
box-sizing: border-box;
|
14
10
|
-ms-overflow-style: scrollbar;
|
@@ -30,3 +26,4 @@ html {
|
|
30
26
|
@import "bootstrap/grid";
|
31
27
|
@import "bootstrap/utilities/display";
|
32
28
|
@import "bootstrap/utilities/flex";
|
29
|
+
@import "bootstrap/utilities/spacing";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap Reboot v4.1
|
2
|
+
* Bootstrap Reboot v4.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2018 The Bootstrap Authors
|
4
4
|
* Copyright 2011-2018 Twitter, Inc.
|
5
5
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap v4.1
|
2
|
+
* Bootstrap v4.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2018 The Bootstrap Authors
|
4
4
|
* Copyright 2011-2018 Twitter, Inc.
|
5
5
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
@@ -34,9 +34,11 @@
|
|
34
34
|
@import "bootstrap/media";
|
35
35
|
@import "bootstrap/list-group";
|
36
36
|
@import "bootstrap/close";
|
37
|
+
@import "bootstrap/toasts";
|
37
38
|
@import "bootstrap/modal";
|
38
39
|
@import "bootstrap/tooltip";
|
39
40
|
@import "bootstrap/popover";
|
40
41
|
@import "bootstrap/carousel";
|
42
|
+
@import "bootstrap/spinners";
|
41
43
|
@import "bootstrap/utilities";
|
42
44
|
@import "bootstrap/print";
|
@@ -27,7 +27,7 @@
|
|
27
27
|
// Expand the right padding and account for the close button's positioning.
|
28
28
|
|
29
29
|
.alert-dismissible {
|
30
|
-
padding-right:
|
30
|
+
padding-right: $close-font-size + $alert-padding-x * 2;
|
31
31
|
|
32
32
|
// Adjust close link position
|
33
33
|
.close {
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
> .btn {
|
11
11
|
position: relative;
|
12
|
-
flex:
|
12
|
+
flex: 1 1 auto;
|
13
13
|
|
14
14
|
// Bring the hover, focused, and "active" buttons to the front to overlay
|
15
15
|
// the borders properly
|
@@ -22,14 +22,6 @@
|
|
22
22
|
z-index: 1;
|
23
23
|
}
|
24
24
|
}
|
25
|
-
|
26
|
-
// Prevent double borders when buttons are next to each other
|
27
|
-
.btn + .btn,
|
28
|
-
.btn + .btn-group,
|
29
|
-
.btn-group + .btn,
|
30
|
-
.btn-group + .btn-group {
|
31
|
-
margin-left: -$btn-border-width;
|
32
|
-
}
|
33
25
|
}
|
34
26
|
|
35
27
|
// Optional: Group multiple button groups together for a toolbar
|
@@ -44,8 +36,10 @@
|
|
44
36
|
}
|
45
37
|
|
46
38
|
.btn-group {
|
47
|
-
|
48
|
-
|
39
|
+
// Prevent double borders when buttons are next to each other
|
40
|
+
> .btn:not(:first-child),
|
41
|
+
> .btn-group:not(:first-child) {
|
42
|
+
margin-left: -$btn-border-width;
|
49
43
|
}
|
50
44
|
|
51
45
|
// Reset rounded corners
|
@@ -119,17 +113,14 @@
|
|
119
113
|
align-items: flex-start;
|
120
114
|
justify-content: center;
|
121
115
|
|
122
|
-
.btn,
|
123
|
-
.btn-group {
|
116
|
+
> .btn,
|
117
|
+
> .btn-group {
|
124
118
|
width: 100%;
|
125
119
|
}
|
126
120
|
|
127
|
-
> .btn
|
128
|
-
> .btn
|
129
|
-
> .btn-group + .btn,
|
130
|
-
> .btn-group + .btn-group {
|
121
|
+
> .btn:not(:first-child),
|
122
|
+
> .btn-group:not(:first-child) {
|
131
123
|
margin-top: -$btn-border-width;
|
132
|
-
margin-left: 0;
|
133
124
|
}
|
134
125
|
|
135
126
|
// Reset rounded corners
|
@@ -7,16 +7,17 @@
|
|
7
7
|
.btn {
|
8
8
|
display: inline-block;
|
9
9
|
font-weight: $btn-font-weight;
|
10
|
+
color: $body-color;
|
10
11
|
text-align: center;
|
11
|
-
white-space: nowrap;
|
12
12
|
vertical-align: middle;
|
13
13
|
user-select: none;
|
14
|
+
background-color: transparent;
|
14
15
|
border: $btn-border-width solid transparent;
|
15
|
-
@include button-size($btn-padding-y, $btn-padding-x, $font-size
|
16
|
+
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
|
16
17
|
@include transition($btn-transition);
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
@include hover {
|
20
|
+
color: $body-color;
|
20
21
|
text-decoration: none;
|
21
22
|
}
|
22
23
|
|
@@ -80,19 +81,15 @@ fieldset:disabled a.btn {
|
|
80
81
|
.btn-link {
|
81
82
|
font-weight: $font-weight-normal;
|
82
83
|
color: $link-color;
|
83
|
-
background-color: transparent;
|
84
84
|
|
85
85
|
@include hover {
|
86
86
|
color: $link-hover-color;
|
87
87
|
text-decoration: $link-hover-decoration;
|
88
|
-
background-color: transparent;
|
89
|
-
border-color: transparent;
|
90
88
|
}
|
91
89
|
|
92
90
|
&:focus,
|
93
91
|
&.focus {
|
94
92
|
text-decoration: $link-hover-decoration;
|
95
|
-
border-color: transparent;
|
96
93
|
box-shadow: none;
|
97
94
|
}
|
98
95
|
|
@@ -111,11 +108,11 @@ fieldset:disabled a.btn {
|
|
111
108
|
//
|
112
109
|
|
113
110
|
.btn-lg {
|
114
|
-
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
111
|
+
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
115
112
|
}
|
116
113
|
|
117
114
|
.btn-sm {
|
118
|
-
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
|
115
|
+
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
|
119
116
|
}
|
120
117
|
|
121
118
|
|