bootstrap 4.6.1 → 5.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +148 -70
  4. data/assets/javascripts/bootstrap/button.js +71 -151
  5. data/assets/javascripts/bootstrap/carousel.js +314 -206
  6. data/assets/javascripts/bootstrap/collapse.js +306 -150
  7. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  8. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  9. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  10. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  12. data/assets/javascripts/bootstrap/dropdown.js +256 -202
  13. data/assets/javascripts/bootstrap/modal.js +353 -247
  14. data/assets/javascripts/bootstrap/popover.js +83 -91
  15. data/assets/javascripts/bootstrap/scrollspy.js +175 -103
  16. data/assets/javascripts/bootstrap/tab.js +170 -96
  17. data/assets/javascripts/bootstrap/toast.js +180 -107
  18. data/assets/javascripts/bootstrap/tooltip.js +374 -223
  19. data/assets/javascripts/bootstrap-sprockets.js +11 -7
  20. data/assets/javascripts/bootstrap.js +2257 -1548
  21. data/assets/javascripts/bootstrap.min.js +3 -3
  22. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  23. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  24. data/assets/stylesheets/_bootstrap.scss +16 -10
  25. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  26. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  27. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  28. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  29. data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
  30. data/assets/stylesheets/bootstrap/_card.scss +22 -68
  31. data/assets/stylesheets/bootstrap/_carousel.scss +15 -20
  32. data/assets/stylesheets/bootstrap/_close.scss +9 -13
  33. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
  35. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  36. data/assets/stylesheets/bootstrap/_functions.scss +82 -69
  37. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  38. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  39. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
  42. data/assets/stylesheets/bootstrap/_modal.scss +36 -41
  43. data/assets/stylesheets/bootstrap/_nav.scss +7 -4
  44. data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
  45. data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
  46. data/assets/stylesheets/bootstrap/_popover.scss +14 -14
  47. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  48. data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
  49. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  50. data/assets/stylesheets/bootstrap/_spinners.scss +6 -15
  51. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  52. data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +9 -9
  54. data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
  55. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  56. data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
  57. data/assets/stylesheets/bootstrap/_variables.scss +548 -436
  58. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  59. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  65. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  66. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  67. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  68. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  69. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  70. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  71. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  72. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  73. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  74. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  75. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  76. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  78. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  79. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  80. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  81. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  82. data/assets/stylesheets/bootstrap/mixins/_forms.scss +23 -85
  83. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  84. data/assets/stylesheets/bootstrap/mixins/_grid.scss +86 -34
  85. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  86. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  87. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  88. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  89. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  90. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +18 -24
  91. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  93. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  94. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  95. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +214 -130
  96. data/lib/bootstrap/version.rb +2 -2
  97. data/tasks/updater/js.rb +3 -3
  98. metadata +32 -40
  99. data/assets/javascripts/bootstrap/util.js +0 -189
  100. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  101. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  102. data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
  103. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  104. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  105. data/assets/stylesheets/bootstrap/_print.scss +0 -132
  106. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  107. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  108. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  109. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  110. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  111. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  112. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  113. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  114. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  115. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  116. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  117. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  118. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  119. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  120. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  121. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  122. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  123. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  124. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  125. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  126. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  127. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  128. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  129. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  130. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  131. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  132. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  133. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -2,21 +2,21 @@
2
2
 
3
3
  // SCSS RFS mixin
4
4
  //
5
- // Automated responsive font sizes
5
+ // Automated responsive values for font sizes, paddings, margins and much more
6
6
  //
7
- // Licensed under MIT (https://github.com/twbs/rfs/blob/v8.x/LICENSE)
7
+ // Licensed under MIT (https://github.com/twbs/rfs/blob/master/LICENSE)
8
8
 
9
9
  // Configuration
10
10
 
11
- // Base font size
12
- $rfs-base-font-size: 1.25rem !default;
13
- $rfs-font-size-unit: rem !default;
11
+ // Base value
12
+ $rfs-base-value: 1.25rem !default;
13
+ $rfs-unit: rem !default;
14
14
 
15
- @if $rfs-font-size-unit != rem and $rfs-font-size-unit != px {
16
- @error "`#{$rfs-font-size-unit}` is not a valid unit for $rfs-font-size-unit. Use `px` or `rem`.";
15
+ @if $rfs-unit != rem and $rfs-unit != px {
16
+ @error "`#{$rfs-unit}` is not a valid unit for $rfs-unit. Use `px` or `rem`.";
17
17
  }
18
18
 
19
- // Breakpoint at where font-size starts decreasing if screen width is smaller
19
+ // Breakpoint at where values start decreasing if screen width is smaller
20
20
  $rfs-breakpoint: 1200px !default;
21
21
  $rfs-breakpoint-unit: px !default;
22
22
 
@@ -24,16 +24,19 @@ $rfs-breakpoint-unit: px !default;
24
24
  @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
25
25
  }
26
26
 
27
- // Resize font size based on screen height and width
27
+ // Resize values based on screen height and width
28
28
  $rfs-two-dimensional: false !default;
29
29
 
30
30
  // Factor of decrease
31
31
  $rfs-factor: 10 !default;
32
32
 
33
- @if type-of($rfs-factor) != "number" or $rfs-factor <= 1 {
33
+ @if type-of($rfs-factor) != number or $rfs-factor <= 1 {
34
34
  @error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.";
35
35
  }
36
36
 
37
+ // Mode. Possibilities: "min-media-query", "max-media-query"
38
+ $rfs-mode: min-media-query !default;
39
+
37
40
  // Generate enable or disable classes. Possibilities: false, "enable" or "disable"
38
41
  $rfs-class: false !default;
39
42
 
@@ -43,93 +46,70 @@ $rfs-rem-value: 16 !default;
43
46
  // Safari iframe resize bug: https://github.com/twbs/rfs/issues/14
44
47
  $rfs-safari-iframe-resize-bug-fix: false !default;
45
48
 
46
- // Disable RFS by setting $enable-responsive-font-sizes to false
47
- $enable-responsive-font-sizes: true !default;
49
+ // Disable RFS by setting $enable-rfs to false
50
+ $enable-rfs: true !default;
48
51
 
49
- // Cache $rfs-base-font-size unit
50
- $rfs-base-font-size-unit: unit($rfs-base-font-size);
52
+ // Cache $rfs-base-value unit
53
+ $rfs-base-value-unit: unit($rfs-base-value);
51
54
 
52
- @function divide($dividend, $divisor, $precision: 10) {
53
- $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
54
- $dividend: abs($dividend);
55
- $divisor: abs($divisor);
56
- @if $dividend == 0 {
57
- @return 0;
58
- }
59
- @if $divisor == 0 {
60
- @error "Cannot divide by 0";
61
- }
62
- $remainder: $dividend;
63
- $result: 0;
64
- $factor: 10;
65
- @while ($remainder > 0 and $precision >= 0) {
66
- $quotient: 0;
67
- @while ($remainder >= $divisor) {
68
- $remainder: $remainder - $divisor;
69
- $quotient: $quotient + 1;
70
- }
71
- $result: $result * 10 + $quotient;
72
- $factor: $factor * .1;
73
- $remainder: $remainder * 10;
74
- $precision: $precision - 1;
75
- @if ($precision < 0 and $remainder >= $divisor * 5) {
76
- $result: $result + 1;
77
- }
78
- }
79
- $result: $result * $factor * $sign;
80
- $dividend-unit: unit($dividend);
81
- $divisor-unit: unit($divisor);
82
- $unit-map: (
83
- "px": 1px,
84
- "rem": 1rem,
85
- "em": 1em,
86
- "%": 1%
87
- );
88
- @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
89
- $result: $result * map-get($unit-map, $dividend-unit);
90
- }
91
- @return $result;
92
- }
93
-
94
- // Remove px-unit from $rfs-base-font-size for calculations
95
- @if $rfs-base-font-size-unit == "px" {
96
- $rfs-base-font-size: divide($rfs-base-font-size, $rfs-base-font-size * 0 + 1);
55
+ // Remove px-unit from $rfs-base-value for calculations
56
+ @if $rfs-base-value-unit == px {
57
+ $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1);
97
58
  }
98
- @else if $rfs-base-font-size-unit == "rem" {
99
- $rfs-base-font-size: divide($rfs-base-font-size, divide($rfs-base-font-size * 0 + 1, $rfs-rem-value));
59
+ @else if $rfs-base-value-unit == rem {
60
+ $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1 / $rfs-rem-value);
100
61
  }
101
62
 
102
63
  // Cache $rfs-breakpoint unit to prevent multiple calls
103
64
  $rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
104
65
 
105
66
  // Remove unit from $rfs-breakpoint for calculations
106
- @if $rfs-breakpoint-unit-cache == "px" {
107
- $rfs-breakpoint: divide($rfs-breakpoint, $rfs-breakpoint * 0 + 1);
67
+ @if $rfs-breakpoint-unit-cache == px {
68
+ $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
108
69
  }
109
- @else if $rfs-breakpoint-unit-cache == "rem" or $rfs-breakpoint-unit-cache == "em" {
110
- $rfs-breakpoint: divide($rfs-breakpoint, divide($rfs-breakpoint * 0 + 1, $rfs-rem-value));
70
+ @else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
71
+ $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
111
72
  }
112
73
 
113
- // Internal mixin that adds disable classes to the selector if needed.
114
- @mixin _rfs-disable-class {
115
- @if $rfs-class == "disable" {
116
- // Adding an extra class increases specificity, which prevents the media query to override the font size
117
- &,
118
- .disable-responsive-font-size &,
119
- &.disable-responsive-font-size {
120
- @content;
74
+ // Calculate the media query value
75
+ $rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit});
76
+ $rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
77
+ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
78
+
79
+ // Internal mixin used to determine which media query needs to be used
80
+ @mixin _rfs-media-query {
81
+ @if $rfs-two-dimensional {
82
+ @if $rfs-mode == max-media-query {
83
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}), (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
84
+ @content;
85
+ }
86
+ }
87
+ @else {
88
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) and (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
89
+ @content;
90
+ }
121
91
  }
122
92
  }
123
93
  @else {
124
- @content;
94
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
95
+ @content;
96
+ }
125
97
  }
126
98
  }
127
99
 
128
- // Internal mixin that adds enable classes to the selector if needed.
129
- @mixin _rfs-enable-class {
130
- @if $rfs-class == "enable" {
131
- .enable-responsive-font-size &,
132
- &.enable-responsive-font-size {
100
+ // Internal mixin that adds disable classes to the selector if needed.
101
+ @mixin _rfs-rule {
102
+ @if $rfs-class == disable and $rfs-mode == max-media-query {
103
+ // Adding an extra class increases specificity, which prevents the media query to override the property
104
+ &,
105
+ .disable-rfs &,
106
+ &.disable-rfs {
107
+ @content;
108
+ }
109
+ }
110
+ @else if $rfs-class == enable and $rfs-mode == min-media-query {
111
+ .enable-rfs &,
112
+ &.enable-rfs {
133
113
  @content;
134
114
  }
135
115
  }
@@ -138,91 +118,195 @@ $rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
138
118
  }
139
119
  }
140
120
 
141
- // Internal mixin used to determine which media query needs to be used
142
- @mixin _rfs-media-query($mq-value) {
143
- @if $rfs-two-dimensional {
144
- @media (max-width: #{$mq-value}), (max-height: #{$mq-value}) {
121
+ // Internal mixin that adds enable classes to the selector if needed.
122
+ @mixin _rfs-media-query-rule {
123
+
124
+ @if $rfs-class == enable {
125
+ @if $rfs-mode == min-media-query {
145
126
  @content;
146
127
  }
128
+
129
+ @include _rfs-media-query {
130
+ .enable-rfs &,
131
+ &.enable-rfs {
132
+ @content;
133
+ }
134
+ }
147
135
  }
148
136
  @else {
149
- @media (max-width: #{$mq-value}) {
137
+ @if $rfs-class == disable and $rfs-mode == min-media-query {
138
+ .disable-rfs &,
139
+ &.disable-rfs {
140
+ @content;
141
+ }
142
+ }
143
+ @include _rfs-media-query {
150
144
  @content;
151
145
  }
152
146
  }
153
147
  }
154
148
 
155
- // Responsive font size mixin
156
- @mixin rfs($fs, $important: false) {
157
- // Cache $fs unit
158
- $fs-unit: if(type-of($fs) == "number", unit($fs), false);
149
+ // Helper function to get the formatted non-responsive value
150
+ @function rfs-value($values) {
151
+ // Convert to list
152
+ $values: if(type-of($values) != list, ($values,), $values);
159
153
 
160
- // Add !important suffix if needed
161
- $rfs-suffix: if($important, " !important", "");
154
+ $val: '';
162
155
 
163
- // If $fs isn't a number (like inherit) or $fs has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
164
- @if not $fs-unit or $fs-unit != "" and $fs-unit != "px" and $fs-unit != "rem" or $fs == 0 {
165
- font-size: #{$fs}#{$rfs-suffix};
166
- }
167
- @else {
168
- // Remove unit from $fs for calculations
169
- @if $fs-unit == "px" {
170
- $fs: divide($fs, $fs * 0 + 1);
156
+ // Loop over each value and calculate value
157
+ @each $value in $values {
158
+ @if $value == 0 {
159
+ $val: $val + ' 0';
171
160
  }
172
- @else if $fs-unit == "rem" {
173
- $fs: divide($fs, divide($fs * 0 + 1, $rfs-rem-value));
161
+ @else {
162
+ // Cache $value unit
163
+ $unit: if(type-of($value) == "number", unit($value), false);
164
+
165
+ @if $unit == px {
166
+ // Convert to rem if needed
167
+ $val: $val + ' ' + if($rfs-unit == rem, #{$value / ($value * 0 + $rfs-rem-value)}rem, $value);
168
+ }
169
+ @else if $unit == rem {
170
+ // Convert to px if needed
171
+ $val: $val + ' ' + if($rfs-unit == px, #{$value / ($value * 0 + 1) * $rfs-rem-value}px, $value);
172
+ }
173
+ @else {
174
+ // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
175
+ $val: $val + ' ' + $value;
176
+ }
174
177
  }
178
+ }
179
+
180
+ // Remove first space
181
+ @return unquote(str-slice($val, 2));
182
+ }
175
183
 
176
- // Set default font size
177
- $rfs-static: if($rfs-font-size-unit == rem, #{divide($fs, $rfs-rem-value)}rem, #{$fs}px);
184
+ // Helper function to get the responsive value calculated by RFS
185
+ @function rfs-fluid-value($values) {
186
+ // Convert to list
187
+ $values: if(type-of($values) != list, ($values,), $values);
178
188
 
179
- // Only add the media query if the font size is bigger than the minimum font size
180
- @if $fs <= $rfs-base-font-size or not $enable-responsive-font-sizes {
181
- font-size: #{$rfs-static}#{$rfs-suffix};
189
+ $val: '';
190
+
191
+ // Loop over each value and calculate value
192
+ @each $value in $values {
193
+ @if $value == 0 {
194
+ $val: $val + ' 0';
182
195
  }
196
+
183
197
  @else {
184
- // Calculate the minimum font size for $fs
185
- $fs-min: $rfs-base-font-size + divide($fs - $rfs-base-font-size, $rfs-factor);
198
+ // Cache $value unit
199
+ $unit: if(type-of($value) == "number", unit($value), false);
186
200
 
187
- // Calculate difference between $fs and the minimum font size
188
- $fs-diff: $fs - $fs-min;
201
+ // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
202
+ @if not $unit or $unit != px and $unit != rem {
203
+ $val: $val + ' ' + $value;
204
+ }
189
205
 
190
- // Base font-size formatting
191
- $min-width: if($rfs-font-size-unit == rem, #{divide($fs-min, $rfs-rem-value)}rem, #{$fs-min}px);
206
+ @else {
207
+ // Remove unit from $value for calculations
208
+ $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
192
209
 
193
- // Use `vmin` if two-dimensional is enabled
194
- $variable-unit: if($rfs-two-dimensional, vmin, vw);
210
+ // Only add the media query if the value is greater than the minimum value
211
+ @if abs($value) <= $rfs-base-value or not $enable-rfs {
212
+ $val: $val + ' ' + if($rfs-unit == rem, #{$value / $rfs-rem-value}rem, #{$value}px);
213
+ }
214
+ @else {
215
+ // Calculate the minimum value
216
+ $value-min: $rfs-base-value + (abs($value) - $rfs-base-value) / $rfs-factor;
195
217
 
196
- // Calculate the variable width between 0 and $rfs-breakpoint
197
- $variable-width: #{divide($fs-diff * 100, $rfs-breakpoint)}#{$variable-unit};
218
+ // Calculate difference between $value and the minimum value
219
+ $value-diff: abs($value) - $value-min;
198
220
 
199
- // Set the calculated font-size
200
- $rfs-fluid: calc(#{$min-width} + #{$variable-width}) #{$rfs-suffix};
221
+ // Base value formatting
222
+ $min-width: if($rfs-unit == rem, #{$value-min / $rfs-rem-value}rem, #{$value-min}px);
201
223
 
202
- // Breakpoint formatting
203
- $mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{divide($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit});
224
+ // Use negative value if needed
225
+ $min-width: if($value < 0, -$min-width, $min-width);
204
226
 
205
- @include _rfs-disable-class {
206
- font-size: #{$rfs-static}#{$rfs-suffix};
207
- }
227
+ // Use `vmin` if two-dimensional is enabled
228
+ $variable-unit: if($rfs-two-dimensional, vmin, vw);
208
229
 
209
- @include _rfs-media-query($mq-value) {
210
- @include _rfs-enable-class {
211
- font-size: $rfs-fluid;
230
+ // Calculate the variable width between 0 and $rfs-breakpoint
231
+ $variable-width: #{$value-diff * 100 / $rfs-breakpoint}#{$variable-unit};
232
+
233
+ // Return the calculated value
234
+ $val: $val + ' calc(' + $min-width + if($value < 0, ' - ', ' + ') + $variable-width + ')';
212
235
  }
236
+ }
237
+ }
238
+ }
239
+
240
+ // Remove first space
241
+ @return unquote(str-slice($val, 2));
242
+ }
243
+
244
+ // RFS mixin
245
+ @mixin rfs($values, $property: font-size) {
246
+ @if $values != null {
247
+ $val: rfs-value($values);
248
+ $fluidVal: rfs-fluid-value($values);
249
+
250
+ // Do not print the media query if responsive & non-responsive values are the same
251
+ @if $val == $fluidVal {
252
+ #{$property}: $val;
253
+ }
254
+ @else {
255
+ @include _rfs-rule {
256
+ #{$property}: if($rfs-mode == max-media-query, $val, $fluidVal);
213
257
 
214
258
  // Include safari iframe resize fix if needed
215
259
  min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);
216
260
  }
261
+
262
+ @include _rfs-media-query-rule {
263
+ #{$property}: if($rfs-mode == max-media-query, $fluidVal, $val);
264
+ }
217
265
  }
218
266
  }
219
267
  }
220
268
 
221
- // The font-size & responsive-font-size mixins use RFS to rescale the font size
222
- @mixin font-size($fs, $important: false) {
223
- @include rfs($fs, $important);
269
+ // Shorthand helper mixins
270
+ @mixin font-size($value) {
271
+ @include rfs($value);
272
+ }
273
+
274
+ @mixin padding($value) {
275
+ @include rfs($value, padding);
276
+ }
277
+
278
+ @mixin padding-top($value) {
279
+ @include rfs($value, padding-top);
280
+ }
281
+
282
+ @mixin padding-right($value) {
283
+ @include rfs($value, padding-right);
284
+ }
285
+
286
+ @mixin padding-bottom($value) {
287
+ @include rfs($value, padding-bottom);
288
+ }
289
+
290
+ @mixin padding-left($value) {
291
+ @include rfs($value, padding-left);
292
+ }
293
+
294
+ @mixin margin($value) {
295
+ @include rfs($value, margin);
296
+ }
297
+
298
+ @mixin margin-top($value) {
299
+ @include rfs($value, margin-top);
300
+ }
301
+
302
+ @mixin margin-right($value) {
303
+ @include rfs($value, margin-right);
304
+ }
305
+
306
+ @mixin margin-bottom($value) {
307
+ @include rfs($value, margin-bottom);
224
308
  }
225
309
 
226
- @mixin responsive-font-size($fs, $important: false) {
227
- @include rfs($fs, $important);
310
+ @mixin margin-left($value) {
311
+ @include rfs($value, margin-left);
228
312
  }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootstrap
4
- VERSION = '4.6.1'
5
- BOOTSTRAP_SHA = '043a03c95a2ad6738f85b65e53b9dbdfb03b8d10'
4
+ VERSION = '5.0.0.alpha1'
5
+ BOOTSTRAP_SHA = 'a1708ec2a38d331c4c9eacac08ce9c9839649476'
6
6
  end
data/tasks/updater/js.rb CHANGED
@@ -29,13 +29,13 @@ class Updater
29
29
 
30
30
  def bootstrap_js_files
31
31
  @bootstrap_js_files ||= begin
32
- src_files = get_paths_by_type('js/src', /\.js$/) - %w[index.js tools/sanitizer.js]
32
+ src_files = get_paths_by_type('js/src', /\.js$/) - %w[util/index.js util/sanitizer.js]
33
33
  imports = Deps.new
34
34
  # Get the imports from the ES6 files to order requires correctly.
35
35
  read_files('js/src', src_files).each do |name, content|
36
36
  imports.add name,
37
- *content.scan(%r{import [a-zA-Z]* from '\./(\w+)})
38
- .flatten(1).map { |f| "#{f}.js" }
37
+ *content.scan(%r{import [a-zA-Z]* from '\./([\w/-]+)})
38
+ .flatten(1).map { |f| "#{f}.js" }.uniq
39
39
  end
40
40
  imports.tsort
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.1
4
+ version: 5.0.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twitter, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-05 00:00:00.000000000 Z
11
+ date: 2020-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: popper_js
@@ -247,6 +247,11 @@ files:
247
247
  - assets/javascripts/bootstrap/button.js
248
248
  - assets/javascripts/bootstrap/carousel.js
249
249
  - assets/javascripts/bootstrap/collapse.js
250
+ - assets/javascripts/bootstrap/dom/data.js
251
+ - assets/javascripts/bootstrap/dom/event-handler.js
252
+ - assets/javascripts/bootstrap/dom/manipulator.js
253
+ - assets/javascripts/bootstrap/dom/polyfill.js
254
+ - assets/javascripts/bootstrap/dom/selector-engine.js
250
255
  - assets/javascripts/bootstrap/dropdown.js
251
256
  - assets/javascripts/bootstrap/modal.js
252
257
  - assets/javascripts/bootstrap/popover.js
@@ -254,7 +259,6 @@ files:
254
259
  - assets/javascripts/bootstrap/tab.js
255
260
  - assets/javascripts/bootstrap/toast.js
256
261
  - assets/javascripts/bootstrap/tooltip.js
257
- - assets/javascripts/bootstrap/util.js
258
262
  - assets/stylesheets/_bootstrap-grid.scss
259
263
  - assets/stylesheets/_bootstrap-reboot.scss
260
264
  - assets/stylesheets/_bootstrap.scss
@@ -266,24 +270,20 @@ files:
266
270
  - assets/stylesheets/bootstrap/_card.scss
267
271
  - assets/stylesheets/bootstrap/_carousel.scss
268
272
  - assets/stylesheets/bootstrap/_close.scss
269
- - assets/stylesheets/bootstrap/_code.scss
270
- - assets/stylesheets/bootstrap/_custom-forms.scss
273
+ - assets/stylesheets/bootstrap/_containers.scss
271
274
  - assets/stylesheets/bootstrap/_dropdown.scss
272
275
  - assets/stylesheets/bootstrap/_forms.scss
273
276
  - assets/stylesheets/bootstrap/_functions.scss
274
277
  - assets/stylesheets/bootstrap/_grid.scss
278
+ - assets/stylesheets/bootstrap/_helpers.scss
275
279
  - assets/stylesheets/bootstrap/_images.scss
276
- - assets/stylesheets/bootstrap/_input-group.scss
277
- - assets/stylesheets/bootstrap/_jumbotron.scss
278
280
  - assets/stylesheets/bootstrap/_list-group.scss
279
- - assets/stylesheets/bootstrap/_media.scss
280
281
  - assets/stylesheets/bootstrap/_mixins.scss
281
282
  - assets/stylesheets/bootstrap/_modal.scss
282
283
  - assets/stylesheets/bootstrap/_nav.scss
283
284
  - assets/stylesheets/bootstrap/_navbar.scss
284
285
  - assets/stylesheets/bootstrap/_pagination.scss
285
286
  - assets/stylesheets/bootstrap/_popover.scss
286
- - assets/stylesheets/bootstrap/_print.scss
287
287
  - assets/stylesheets/bootstrap/_progress.scss
288
288
  - assets/stylesheets/bootstrap/_reboot.scss
289
289
  - assets/stylesheets/bootstrap/_root.scss
@@ -295,55 +295,47 @@ files:
295
295
  - assets/stylesheets/bootstrap/_type.scss
296
296
  - assets/stylesheets/bootstrap/_utilities.scss
297
297
  - assets/stylesheets/bootstrap/_variables.scss
298
+ - assets/stylesheets/bootstrap/bootstrap-utilities.scss
299
+ - assets/stylesheets/bootstrap/forms/_form-check.scss
300
+ - assets/stylesheets/bootstrap/forms/_form-control.scss
301
+ - assets/stylesheets/bootstrap/forms/_form-file.scss
302
+ - assets/stylesheets/bootstrap/forms/_form-range.scss
303
+ - assets/stylesheets/bootstrap/forms/_form-select.scss
304
+ - assets/stylesheets/bootstrap/forms/_form-text.scss
305
+ - assets/stylesheets/bootstrap/forms/_input-group.scss
306
+ - assets/stylesheets/bootstrap/forms/_labels.scss
307
+ - assets/stylesheets/bootstrap/forms/_validation.scss
308
+ - assets/stylesheets/bootstrap/helpers/_clearfix.scss
309
+ - assets/stylesheets/bootstrap/helpers/_colored-links.scss
310
+ - assets/stylesheets/bootstrap/helpers/_embed.scss
311
+ - assets/stylesheets/bootstrap/helpers/_position.scss
312
+ - assets/stylesheets/bootstrap/helpers/_screenreaders.scss
313
+ - assets/stylesheets/bootstrap/helpers/_stretched-link.scss
314
+ - assets/stylesheets/bootstrap/helpers/_text-truncation.scss
298
315
  - assets/stylesheets/bootstrap/mixins/_alert.scss
299
- - assets/stylesheets/bootstrap/mixins/_background-variant.scss
300
- - assets/stylesheets/bootstrap/mixins/_badge.scss
301
316
  - assets/stylesheets/bootstrap/mixins/_border-radius.scss
302
317
  - assets/stylesheets/bootstrap/mixins/_box-shadow.scss
303
318
  - assets/stylesheets/bootstrap/mixins/_breakpoints.scss
304
319
  - assets/stylesheets/bootstrap/mixins/_buttons.scss
305
320
  - assets/stylesheets/bootstrap/mixins/_caret.scss
306
321
  - assets/stylesheets/bootstrap/mixins/_clearfix.scss
322
+ - assets/stylesheets/bootstrap/mixins/_container.scss
307
323
  - assets/stylesheets/bootstrap/mixins/_deprecate.scss
308
- - assets/stylesheets/bootstrap/mixins/_float.scss
309
324
  - assets/stylesheets/bootstrap/mixins/_forms.scss
310
325
  - assets/stylesheets/bootstrap/mixins/_gradients.scss
311
- - assets/stylesheets/bootstrap/mixins/_grid-framework.scss
312
326
  - assets/stylesheets/bootstrap/mixins/_grid.scss
313
- - assets/stylesheets/bootstrap/mixins/_hover.scss
314
327
  - assets/stylesheets/bootstrap/mixins/_image.scss
315
328
  - assets/stylesheets/bootstrap/mixins/_list-group.scss
316
329
  - assets/stylesheets/bootstrap/mixins/_lists.scss
317
- - assets/stylesheets/bootstrap/mixins/_nav-divider.scss
318
330
  - assets/stylesheets/bootstrap/mixins/_pagination.scss
319
331
  - assets/stylesheets/bootstrap/mixins/_reset-text.scss
320
332
  - assets/stylesheets/bootstrap/mixins/_resize.scss
321
333
  - assets/stylesheets/bootstrap/mixins/_screen-reader.scss
322
- - assets/stylesheets/bootstrap/mixins/_size.scss
323
- - assets/stylesheets/bootstrap/mixins/_table-row.scss
324
- - assets/stylesheets/bootstrap/mixins/_text-emphasis.scss
325
- - assets/stylesheets/bootstrap/mixins/_text-hide.scss
334
+ - assets/stylesheets/bootstrap/mixins/_table-variants.scss
326
335
  - assets/stylesheets/bootstrap/mixins/_text-truncate.scss
327
336
  - assets/stylesheets/bootstrap/mixins/_transition.scss
328
- - assets/stylesheets/bootstrap/mixins/_visibility.scss
329
- - assets/stylesheets/bootstrap/utilities/_align.scss
330
- - assets/stylesheets/bootstrap/utilities/_background.scss
331
- - assets/stylesheets/bootstrap/utilities/_borders.scss
332
- - assets/stylesheets/bootstrap/utilities/_clearfix.scss
333
- - assets/stylesheets/bootstrap/utilities/_display.scss
334
- - assets/stylesheets/bootstrap/utilities/_embed.scss
335
- - assets/stylesheets/bootstrap/utilities/_flex.scss
336
- - assets/stylesheets/bootstrap/utilities/_float.scss
337
- - assets/stylesheets/bootstrap/utilities/_interactions.scss
338
- - assets/stylesheets/bootstrap/utilities/_overflow.scss
339
- - assets/stylesheets/bootstrap/utilities/_position.scss
340
- - assets/stylesheets/bootstrap/utilities/_screenreaders.scss
341
- - assets/stylesheets/bootstrap/utilities/_shadows.scss
342
- - assets/stylesheets/bootstrap/utilities/_sizing.scss
343
- - assets/stylesheets/bootstrap/utilities/_spacing.scss
344
- - assets/stylesheets/bootstrap/utilities/_stretched-link.scss
345
- - assets/stylesheets/bootstrap/utilities/_text.scss
346
- - assets/stylesheets/bootstrap/utilities/_visibility.scss
337
+ - assets/stylesheets/bootstrap/mixins/_utilities.scss
338
+ - assets/stylesheets/bootstrap/utilities/_api.scss
347
339
  - assets/stylesheets/bootstrap/vendor/_rfs.scss
348
340
  - bootstrap.gemspec
349
341
  - lib/bootstrap.rb
@@ -408,9 +400,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
408
400
  version: 2.3.3
409
401
  required_rubygems_version: !ruby/object:Gem::Requirement
410
402
  requirements:
411
- - - ">="
403
+ - - ">"
412
404
  - !ruby/object:Gem::Version
413
- version: '0'
405
+ version: 1.3.1
414
406
  requirements: []
415
407
  rubygems_version: 3.1.2
416
408
  signing_key: