bootstrap 5.2.3 → 5.3.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +21 -32
  4. data/assets/javascripts/bootstrap/base-component.js +21 -38
  5. data/assets/javascripts/bootstrap/button.js +18 -22
  6. data/assets/javascripts/bootstrap/carousel.js +51 -135
  7. data/assets/javascripts/bootstrap/collapse.js +39 -102
  8. data/assets/javascripts/bootstrap/dom/data.js +8 -12
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +18 -66
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -17
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +41 -24
  12. data/assets/javascripts/bootstrap/dropdown.js +73 -145
  13. data/assets/javascripts/bootstrap/modal.js +52 -133
  14. data/assets/javascripts/bootstrap/offcanvas.js +49 -102
  15. data/assets/javascripts/bootstrap/popover.js +22 -29
  16. data/assets/javascripts/bootstrap/scrollspy.js +51 -89
  17. data/assets/javascripts/bootstrap/tab.js +51 -109
  18. data/assets/javascripts/bootstrap/toast.js +30 -73
  19. data/assets/javascripts/bootstrap/tooltip.js +74 -177
  20. data/assets/javascripts/bootstrap/util/backdrop.js +27 -54
  21. data/assets/javascripts/bootstrap/util/component-functions.js +13 -19
  22. data/assets/javascripts/bootstrap/util/config.js +14 -27
  23. data/assets/javascripts/bootstrap/util/focustrap.js +19 -36
  24. data/assets/javascripts/bootstrap/util/index.js +42 -111
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +13 -19
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +23 -50
  27. data/assets/javascripts/bootstrap/util/swipe.js +26 -48
  28. data/assets/javascripts/bootstrap/util/template-factory.js +24 -52
  29. data/assets/javascripts/bootstrap-sprockets.js +1 -1
  30. data/assets/javascripts/bootstrap.js +626 -1406
  31. data/assets/javascripts/bootstrap.min.js +3 -3
  32. data/assets/stylesheets/_bootstrap-grid.scss +1 -3
  33. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  34. data/assets/stylesheets/_bootstrap.scss +1 -0
  35. data/assets/stylesheets/bootstrap/_accordion.scss +9 -0
  36. data/assets/stylesheets/bootstrap/_alert.scss +8 -11
  37. data/assets/stylesheets/bootstrap/_button-group.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_buttons.scss +3 -3
  39. data/assets/stylesheets/bootstrap/_card.scss +5 -0
  40. data/assets/stylesheets/bootstrap/_carousel.scss +20 -2
  41. data/assets/stylesheets/bootstrap/_close.scss +32 -9
  42. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  43. data/assets/stylesheets/bootstrap/_functions.scss +1 -1
  44. data/assets/stylesheets/bootstrap/_grid.scss +6 -0
  45. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  46. data/assets/stylesheets/bootstrap/_list-group.scss +12 -7
  47. data/assets/stylesheets/bootstrap/_maps.scss +120 -0
  48. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  49. data/assets/stylesheets/bootstrap/_nav.scss +40 -3
  50. data/assets/stylesheets/bootstrap/_navbar.scss +13 -3
  51. data/assets/stylesheets/bootstrap/_offcanvas.scss +4 -2
  52. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  53. data/assets/stylesheets/bootstrap/_progress.scss +10 -1
  54. data/assets/stylesheets/bootstrap/_reboot.scss +3 -3
  55. data/assets/stylesheets/bootstrap/_root.scss +125 -10
  56. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  57. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -5
  58. data/assets/stylesheets/bootstrap/_utilities.scss +172 -13
  59. data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
  60. data/assets/stylesheets/bootstrap/_variables.scss +260 -151
  61. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -0
  62. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +21 -3
  63. data/assets/stylesheets/bootstrap/forms/_form-check.scss +24 -11
  64. data/assets/stylesheets/bootstrap/forms/_form-control.scss +23 -3
  65. data/assets/stylesheets/bootstrap/forms/_form-select.scss +11 -2
  66. data/assets/stylesheets/bootstrap/forms/_input-group.scss +1 -1
  67. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +22 -2
  68. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  69. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  70. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -1
  71. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -4
  72. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -25
  73. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  74. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -7
  75. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  76. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +5 -1
  78. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +23 -29
  79. data/bootstrap.gemspec +1 -1
  80. data/lib/bootstrap/version.rb +2 -2
  81. data/tasks/updater/js.rb +1 -1
  82. data/tasks/updater/scss.rb +1 -1
  83. metadata +10 -6
@@ -1,4 +1,4 @@
1
- // stylelint-disable property-blacklist, scss/dollar-variable-default
1
+ // stylelint-disable scss/dimension-no-non-numeric-values
2
2
 
3
3
  // SCSS RFS mixin
4
4
  //
@@ -154,8 +154,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
154
154
  &.enable-rfs {
155
155
  @content;
156
156
  }
157
- }
158
- @else {
157
+ } @else {
159
158
  @content;
160
159
  }
161
160
  }
@@ -168,7 +167,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
168
167
  @content;
169
168
  }
170
169
 
171
- @include _rfs-media-query {
170
+ @include _rfs-media-query () {
172
171
  .enable-rfs &,
173
172
  &.enable-rfs {
174
173
  @content;
@@ -182,7 +181,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
182
181
  @content;
183
182
  }
184
183
  }
185
- @include _rfs-media-query {
184
+ @include _rfs-media-query () {
186
185
  @content;
187
186
  }
188
187
  }
@@ -193,12 +192,12 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
193
192
  // Convert to list
194
193
  $values: if(type-of($values) != list, ($values,), $values);
195
194
 
196
- $val: '';
195
+ $val: "";
197
196
 
198
197
  // Loop over each value and calculate value
199
198
  @each $value in $values {
200
199
  @if $value == 0 {
201
- $val: $val + ' 0';
200
+ $val: $val + " 0";
202
201
  }
203
202
  @else {
204
203
  // Cache $value unit
@@ -206,15 +205,14 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
206
205
 
207
206
  @if $unit == px {
208
207
  // Convert to rem if needed
209
- $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $value * 0 + $rfs-rem-value)}rem, $value);
208
+ $val: $val + " " + if($rfs-unit == rem, #{divide($value, $value * 0 + $rfs-rem-value)}rem, $value);
210
209
  }
211
210
  @else if $unit == rem {
212
211
  // Convert to px if needed
213
- $val: $val + ' ' + if($rfs-unit == px, #{divide($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
214
- }
215
- @else {
212
+ $val: $val + " " + if($rfs-unit == px, #{divide($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
213
+ } @else {
216
214
  // 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
217
- $val: $val + ' ' + $value;
215
+ $val: $val + " " + $value;
218
216
  }
219
217
  }
220
218
  }
@@ -228,30 +226,26 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
228
226
  // Convert to list
229
227
  $values: if(type-of($values) != list, ($values,), $values);
230
228
 
231
- $val: '';
229
+ $val: "";
232
230
 
233
231
  // Loop over each value and calculate value
234
232
  @each $value in $values {
235
233
  @if $value == 0 {
236
- $val: $val + ' 0';
237
- }
238
-
239
- @else {
234
+ $val: $val + " 0";
235
+ } @else {
240
236
  // Cache $value unit
241
237
  $unit: if(type-of($value) == "number", unit($value), false);
242
238
 
243
239
  // 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
244
240
  @if not $unit or $unit != px and $unit != rem {
245
- $val: $val + ' ' + $value;
246
- }
247
-
248
- @else {
241
+ $val: $val + " " + $value;
242
+ } @else {
249
243
  // Remove unit from $value for calculations
250
244
  $value: divide($value, $value * 0 + if($unit == px, 1, divide(1, $rfs-rem-value)));
251
245
 
252
246
  // Only add the media query if the value is greater than the minimum value
253
247
  @if abs($value) <= $rfs-base-value or not $enable-rfs {
254
- $val: $val + ' ' + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px);
248
+ $val: $val + " " + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px);
255
249
  }
256
250
  @else {
257
251
  // Calculate the minimum value
@@ -273,7 +267,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
273
267
  $variable-width: #{divide($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
274
268
 
275
269
  // Return the calculated value
276
- $val: $val + ' calc(' + $min-width + if($value < 0, ' - ', ' + ') + $variable-width + ')';
270
+ $val: $val + " calc(" + $min-width + if($value < 0, " - ", " + ") + $variable-width + ")";
277
271
  }
278
272
  }
279
273
  }
@@ -287,22 +281,22 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
287
281
  @mixin rfs($values, $property: font-size) {
288
282
  @if $values != null {
289
283
  $val: rfs-value($values);
290
- $fluidVal: rfs-fluid-value($values);
284
+ $fluid-val: rfs-fluid-value($values);
291
285
 
292
286
  // Do not print the media query if responsive & non-responsive values are the same
293
- @if $val == $fluidVal {
287
+ @if $val == $fluid-val {
294
288
  #{$property}: $val;
295
289
  }
296
290
  @else {
297
- @include _rfs-rule {
298
- #{$property}: if($rfs-mode == max-media-query, $val, $fluidVal);
291
+ @include _rfs-rule () {
292
+ #{$property}: if($rfs-mode == max-media-query, $val, $fluid-val);
299
293
 
300
294
  // Include safari iframe resize fix if needed
301
295
  min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);
302
296
  }
303
297
 
304
- @include _rfs-media-query-rule {
305
- #{$property}: if($rfs-mode == max-media-query, $fluidVal, $val);
298
+ @include _rfs-media-query-rule () {
299
+ #{$property}: if($rfs-mode == max-media-query, $fluid-val, $val);
306
300
  }
307
301
  }
308
302
  }
data/bootstrap.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  # SassC requires Ruby 2.3.3. Also specify here to make it obvious.
15
15
  s.required_ruby_version = '>= 2.3.3'
16
16
 
17
- s.add_runtime_dependency 'popper_js', '>= 2.11.6', '< 3'
17
+ s.add_runtime_dependency 'popper_js', '>= 2.11.7', '< 3'
18
18
 
19
19
  s.add_runtime_dependency 'sassc-rails', '>= 2.0.0'
20
20
  s.add_runtime_dependency 'autoprefixer-rails', '>= 9.1.0'
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootstrap
4
- VERSION = '5.2.3'
5
- BOOTSTRAP_SHA = 'cb021439c683d9805e2864c58095b92d405e9b11'
4
+ VERSION = '5.3.0.alpha3'
5
+ BOOTSTRAP_SHA = 'ac576614a5515e429f27e756fad81d5aa05e95a6'
6
6
  end
data/tasks/updater/js.rb CHANGED
@@ -51,7 +51,7 @@ class Updater
51
51
  # Get the imports from the ES6 files to order requires correctly.
52
52
  read_files('js/src', src_files).each do |name, content|
53
53
  file_imports = content.scan(%r{import *(?:[a-zA-Z]*|\{[a-zA-Z ,]*\}) *from '([\w/.-]+)}).flatten(1).map do |f|
54
- Pathname.new(name).dirname.join("#{f}.js").cleanpath.to_s
54
+ Pathname.new(name).dirname.join(f).cleanpath.to_s
55
55
  end.uniq
56
56
  imports.add name, *(file_imports - INLINED_SRCS)
57
57
  end
@@ -4,7 +4,7 @@ class Updater
4
4
  log_status 'Updating scss...'
5
5
  save_to = @save_to[:scss]
6
6
  contents = {}
7
- bootstrap_scss_files = get_paths_by_type('scss', /\.scss$/)
7
+ bootstrap_scss_files = get_paths_by_type('scss', /\.scss$/).reject { |p| p.start_with?('tests/') }
8
8
  read_files('scss', bootstrap_scss_files).each do |name, file|
9
9
  contents[name] = file
10
10
  save_file("#{save_to}/#{name}", file)
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: 5.2.3
4
+ version: 5.3.0.alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twitter, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-25 00:00:00.000000000 Z
11
+ date: 2023-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: popper_js
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.11.6
19
+ version: 2.11.7
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '3'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 2.11.6
29
+ version: 2.11.7
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3'
@@ -282,6 +282,7 @@ files:
282
282
  - assets/stylesheets/bootstrap/_transitions.scss
283
283
  - assets/stylesheets/bootstrap/_type.scss
284
284
  - assets/stylesheets/bootstrap/_utilities.scss
285
+ - assets/stylesheets/bootstrap/_variables-dark.scss
285
286
  - assets/stylesheets/bootstrap/_variables.scss
286
287
  - assets/stylesheets/bootstrap/bootstrap-utilities.scss
287
288
  - assets/stylesheets/bootstrap/forms/_floating-labels.scss
@@ -296,6 +297,8 @@ files:
296
297
  - assets/stylesheets/bootstrap/helpers/_clearfix.scss
297
298
  - assets/stylesheets/bootstrap/helpers/_color-bg.scss
298
299
  - assets/stylesheets/bootstrap/helpers/_colored-links.scss
300
+ - assets/stylesheets/bootstrap/helpers/_focus-ring.scss
301
+ - assets/stylesheets/bootstrap/helpers/_icon-link.scss
299
302
  - assets/stylesheets/bootstrap/helpers/_position.scss
300
303
  - assets/stylesheets/bootstrap/helpers/_ratio.scss
301
304
  - assets/stylesheets/bootstrap/helpers/_stacks.scss
@@ -312,6 +315,7 @@ files:
312
315
  - assets/stylesheets/bootstrap/mixins/_buttons.scss
313
316
  - assets/stylesheets/bootstrap/mixins/_caret.scss
314
317
  - assets/stylesheets/bootstrap/mixins/_clearfix.scss
318
+ - assets/stylesheets/bootstrap/mixins/_color-mode.scss
315
319
  - assets/stylesheets/bootstrap/mixins/_color-scheme.scss
316
320
  - assets/stylesheets/bootstrap/mixins/_container.scss
317
321
  - assets/stylesheets/bootstrap/mixins/_deprecate.scss
@@ -397,9 +401,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
397
401
  version: 2.3.3
398
402
  required_rubygems_version: !ruby/object:Gem::Requirement
399
403
  requirements:
400
- - - ">="
404
+ - - ">"
401
405
  - !ruby/object:Gem::Version
402
- version: '0'
406
+ version: 1.3.1
403
407
  requirements: []
404
408
  rubygems_version: 3.1.2
405
409
  signing_key: