bootstrap 5.0.0.beta3 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/assets/javascripts/bootstrap-sprockets.js +1 -1
  4. data/assets/javascripts/bootstrap.js +509 -459
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +4 -4
  7. data/assets/javascripts/bootstrap/base-component.js +9 -7
  8. data/assets/javascripts/bootstrap/button.js +3 -3
  9. data/assets/javascripts/bootstrap/carousel.js +11 -12
  10. data/assets/javascripts/bootstrap/collapse.js +5 -5
  11. data/assets/javascripts/bootstrap/dom/data.js +2 -2
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +32 -14
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +2 -2
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -2
  15. data/assets/javascripts/bootstrap/dropdown.js +109 -94
  16. data/assets/javascripts/bootstrap/modal.js +262 -177
  17. data/assets/javascripts/bootstrap/offcanvas.js +219 -56
  18. data/assets/javascripts/bootstrap/popover.js +3 -3
  19. data/assets/javascripts/bootstrap/scrollspy.js +18 -22
  20. data/assets/javascripts/bootstrap/tab.js +21 -8
  21. data/assets/javascripts/bootstrap/toast.js +4 -5
  22. data/assets/javascripts/bootstrap/tooltip.js +7 -9
  23. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  24. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  25. data/assets/stylesheets/_bootstrap.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_accordion.scss +4 -2
  27. data/assets/stylesheets/bootstrap/_dropdown.scss +7 -13
  28. data/assets/stylesheets/bootstrap/_list-group.scss +1 -1
  29. data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
  30. data/assets/stylesheets/bootstrap/_modal.scss +0 -9
  31. data/assets/stylesheets/bootstrap/_offcanvas.scss +11 -11
  32. data/assets/stylesheets/bootstrap/_spinners.scss +2 -2
  33. data/assets/stylesheets/bootstrap/_variables.scss +7 -7
  34. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  35. data/assets/stylesheets/bootstrap/forms/_form-control.scss +5 -5
  36. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  37. data/assets/stylesheets/bootstrap/mixins/_forms.scss +7 -4
  38. data/assets/stylesheets/bootstrap/mixins/_grid.scss +8 -3
  39. data/bootstrap.gemspec +1 -1
  40. data/lib/bootstrap/version.rb +2 -2
  41. data/tasks/updater/js.rb +1 -1
  42. metadata +7 -6
@@ -16,6 +16,7 @@
16
16
 
17
17
  .offcanvas-header {
18
18
  display: flex;
19
+ align-items: center;
19
20
  justify-content: space-between;
20
21
  padding: $offcanvas-padding-y $offcanvas-padding-x;
21
22
 
@@ -52,6 +53,16 @@
52
53
  transform: translateX(100%);
53
54
  }
54
55
 
56
+ .offcanvas-top {
57
+ top: 0;
58
+ right: 0;
59
+ left: 0;
60
+ height: $offcanvas-vertical-height;
61
+ max-height: 100%;
62
+ border-bottom: $offcanvas-border-width solid $offcanvas-border-color;
63
+ transform: translateY(-100%);
64
+ }
65
+
55
66
  .offcanvas-bottom {
56
67
  right: 0;
57
68
  left: 0;
@@ -64,14 +75,3 @@
64
75
  .offcanvas.show {
65
76
  transform: none;
66
77
  }
67
-
68
- .offcanvas-backdrop::before {
69
- position: fixed;
70
- top: 0;
71
- left: 0;
72
- z-index: $zindex-offcanvas - 1;
73
- width: 100vw;
74
- height: 100vh;
75
- content: "";
76
- background-color: $offcanvas-body-backdrop-color;
77
- }
@@ -12,7 +12,7 @@
12
12
  display: inline-block;
13
13
  width: $spinner-width;
14
14
  height: $spinner-height;
15
- vertical-align: text-bottom;
15
+ vertical-align: $spinner-vertical-align;
16
16
  border: $spinner-border-width solid currentColor;
17
17
  border-right-color: transparent;
18
18
  // stylelint-disable-next-line property-disallowed-list
@@ -46,7 +46,7 @@
46
46
  display: inline-block;
47
47
  width: $spinner-width;
48
48
  height: $spinner-height;
49
- vertical-align: text-bottom;
49
+ vertical-align: $spinner-vertical-align;
50
50
  background-color: currentColor;
51
51
  // stylelint-disable-next-line property-disallowed-list
52
52
  border-radius: 50%;
@@ -738,7 +738,7 @@ $form-check-transition: null !default;
738
738
  $form-check-input-active-filter: brightness(90%) !default;
739
739
 
740
740
  $form-check-input-bg: $input-bg !default;
741
- $form-check-input-border: 1px solid rgba(0, 0, 0, .25) !default;
741
+ $form-check-input-border: 1px solid rgba($black, .25) !default;
742
742
  $form-check-input-border-radius: .25em !default;
743
743
  $form-check-radio-border-radius: 50% !default;
744
744
  $form-check-input-focus-border: $input-focus-border-color !default;
@@ -902,8 +902,8 @@ $form-validation-states: (
902
902
  $zindex-dropdown: 1000 !default;
903
903
  $zindex-sticky: 1020 !default;
904
904
  $zindex-fixed: 1030 !default;
905
- $zindex-offcanvas: 1040 !default;
906
- $zindex-modal-backdrop: 1050 !default;
905
+ $zindex-modal-backdrop: 1040 !default;
906
+ $zindex-offcanvas: 1050 !default;
907
907
  $zindex-modal: 1060 !default;
908
908
  $zindex-popover: 1070 !default;
909
909
  $zindex-tooltip: 1080 !default;
@@ -917,8 +917,8 @@ $nav-link-padding-y: .5rem !default;
917
917
  $nav-link-padding-x: 1rem !default;
918
918
  $nav-link-font-size: null !default;
919
919
  $nav-link-font-weight: null !default;
920
- $nav-link-color: null !default;
921
- $nav-link-hover-color: null !default;
920
+ $nav-link-color: $link-color !default;
921
+ $nav-link-hover-color: $link-hover-color !default;
922
922
  $nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;
923
923
  $nav-link-disabled-color: $gray-600 !default;
924
924
 
@@ -1125,7 +1125,7 @@ $accordion-icon-width: 1.25rem !default;
1125
1125
  $accordion-icon-color: $accordion-color !default;
1126
1126
  $accordion-icon-active-color: $accordion-button-active-color !default;
1127
1127
  $accordion-icon-transition: transform .2s ease-in-out !default;
1128
- $accordion-icon-transform: rotate(180deg) !default;
1128
+ $accordion-icon-transform: rotate(-180deg) !default;
1129
1129
 
1130
1130
  $accordion-button-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") !default;
1131
1131
  $accordion-button-active-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") !default;
@@ -1406,6 +1406,7 @@ $carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;
1406
1406
  // scss-docs-start spinner-variables
1407
1407
  $spinner-width: 2rem !default;
1408
1408
  $spinner-height: $spinner-width !default;
1409
+ $spinner-vertical-align: -.125em !default;
1409
1410
  $spinner-border-width: .25em !default;
1410
1411
  $spinner-animation-speed: .75s !default;
1411
1412
 
@@ -1446,7 +1447,6 @@ $offcanvas-border-width: $modal-content-border-width !default;
1446
1447
  $offcanvas-title-line-height: $modal-title-line-height !default;
1447
1448
  $offcanvas-bg-color: $modal-content-bg !default;
1448
1449
  $offcanvas-color: $modal-content-color !default;
1449
- $offcanvas-body-backdrop-color: rgba($modal-backdrop-bg, $modal-backdrop-opacity) !default;
1450
1450
  $offcanvas-box-shadow: $modal-content-box-shadow-xs !default;
1451
1451
  // scss-docs-end offcanvas-variables
1452
1452
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Utilities v5.0.0-beta3 (https://getbootstrap.com/)
2
+ * Bootstrap Utilities v5.0.0 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors
4
4
  * Copyright 2011-2021 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -25,7 +25,7 @@
25
25
  &[type="file"] {
26
26
  overflow: hidden; // prevent pseudo element button overlap
27
27
 
28
- &:not(:disabled):not([readonly]) {
28
+ &:not(:disabled):not(:read-only) {
29
29
  cursor: pointer;
30
30
  }
31
31
  }
@@ -65,7 +65,7 @@
65
65
  // disabled if the fieldset is disabled. Due to implementation difficulty, we
66
66
  // don't honor that edge case; we style them as disabled anyway.
67
67
  &:disabled,
68
- &[readonly] {
68
+ &:read-only {
69
69
  background-color: $input-disabled-bg;
70
70
  border-color: $input-disabled-border-color;
71
71
  // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
@@ -88,7 +88,7 @@
88
88
  @include transition($btn-transition);
89
89
  }
90
90
 
91
- &:hover:not(:disabled):not([readonly])::file-selector-button {
91
+ &:hover:not(:disabled):not(:read-only)::file-selector-button {
92
92
  background-color: $form-file-button-hover-bg;
93
93
  }
94
94
 
@@ -107,7 +107,7 @@
107
107
  @include transition($btn-transition);
108
108
  }
109
109
 
110
- &:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
110
+ &:hover:not(:disabled):not(:read-only)::-webkit-file-upload-button {
111
111
  background-color: $form-file-button-hover-bg;
112
112
  }
113
113
  }
@@ -203,7 +203,7 @@ textarea {
203
203
  height: auto; // Override fixed browser height
204
204
  padding: $input-padding-y;
205
205
 
206
- &:not(:disabled):not([readonly]) {
206
+ &:not(:disabled):not(:read-only) {
207
207
  cursor: pointer;
208
208
  }
209
209
 
@@ -0,0 +1,7 @@
1
+ // scss-docs-start mixin-color-scheme
2
+ @mixin color-scheme($name) {
3
+ @media (prefers-color-scheme: #{$name}) {
4
+ @content;
5
+ }
6
+ }
7
+ // scss-docs-end mixin-color-scheme
@@ -88,10 +88,13 @@
88
88
  border-color: $color;
89
89
 
90
90
  @if $enable-validation-icons {
91
- padding-right: $form-select-feedback-icon-padding-end;
92
- background-image: escape-svg($form-select-indicator), escape-svg($icon);
93
- background-position: $form-select-bg-position, $form-select-feedback-icon-position;
94
- background-size: $form-select-bg-size, $form-select-feedback-icon-size;
91
+ &:not([multiple]):not([size]),
92
+ &:not([multiple])[size="1"] {
93
+ padding-right: $form-select-feedback-icon-padding-end;
94
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
95
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
96
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
97
+ }
95
98
  }
96
99
 
97
100
  &:focus {
@@ -26,9 +26,14 @@
26
26
  margin-top: var(--#{$variable-prefix}gutter-y);
27
27
  }
28
28
 
29
- @mixin make-col($size, $columns: $grid-columns) {
30
- flex: 0 0 auto;
31
- width: percentage($size / $columns);
29
+ @mixin make-col($size: false, $columns: $grid-columns) {
30
+ @if $size {
31
+ flex: 0 0 auto;
32
+ width: percentage($size / $columns);
33
+ } @else {
34
+ flex: 1 1 0;
35
+ max-width: 100%;
36
+ }
32
37
  }
33
38
 
34
39
  @mixin make-col-auto() {
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.9.1', '< 3'
17
+ s.add_runtime_dependency 'popper_js', '>= 2.9.2', '< 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.0.0.beta3'
5
- BOOTSTRAP_SHA = '220139a89ffc3864bbb6e1b35471667318eadc1f'
4
+ VERSION = '5.0.0'
5
+ BOOTSTRAP_SHA = 'bf0936748602c8109fd916c64b4560799fa1c3f8'
6
6
  end
data/tasks/updater/js.rb CHANGED
@@ -2,7 +2,7 @@ require 'tsort'
2
2
 
3
3
  class Updater
4
4
  module Js
5
- INLINED_SRCS = %w[util/index.js util/sanitizer.js util/scrollbar.js].freeze
5
+ INLINED_SRCS = %w[util/index.js util/backdrop.js util/sanitizer.js util/scrollbar.js].freeze
6
6
 
7
7
  def update_javascript_assets
8
8
  log_status 'Updating javascripts...'
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.0.0.beta3
4
+ version: 5.0.0
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-04-25 00:00:00.000000000 Z
11
+ date: 2021-05-06 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.9.1
19
+ version: 2.9.2
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.9.1
29
+ version: 2.9.2
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3'
@@ -296,6 +296,7 @@ files:
296
296
  - assets/stylesheets/bootstrap/mixins/_buttons.scss
297
297
  - assets/stylesheets/bootstrap/mixins/_caret.scss
298
298
  - assets/stylesheets/bootstrap/mixins/_clearfix.scss
299
+ - assets/stylesheets/bootstrap/mixins/_color-scheme.scss
299
300
  - assets/stylesheets/bootstrap/mixins/_container.scss
300
301
  - assets/stylesheets/bootstrap/mixins/_deprecate.scss
301
302
  - assets/stylesheets/bootstrap/mixins/_forms.scss
@@ -378,9 +379,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
378
379
  version: 2.3.3
379
380
  required_rubygems_version: !ruby/object:Gem::Requirement
380
381
  requirements:
381
- - - ">"
382
+ - - ">="
382
383
  - !ruby/object:Gem::Version
383
- version: 1.3.1
384
+ version: '0'
384
385
  requirements: []
385
386
  rubygems_version: 3.1.2
386
387
  signing_key: