bootstrap 5.0.0.alpha3 → 5.0.0.beta1

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +8 -8
  4. data/assets/javascripts/bootstrap.js +597 -595
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +67 -31
  7. data/assets/javascripts/bootstrap/button.js +63 -24
  8. data/assets/javascripts/bootstrap/carousel.js +121 -74
  9. data/assets/javascripts/bootstrap/collapse.js +101 -54
  10. data/assets/javascripts/bootstrap/dom/data.js +2 -2
  11. data/assets/javascripts/bootstrap/dom/event-handler.js +12 -10
  12. data/assets/javascripts/bootstrap/dom/manipulator.js +12 -11
  13. data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -2
  14. data/assets/javascripts/bootstrap/dropdown.js +142 -99
  15. data/assets/javascripts/bootstrap/modal.js +153 -109
  16. data/assets/javascripts/bootstrap/popover.js +11 -19
  17. data/assets/javascripts/bootstrap/scrollspy.js +82 -36
  18. data/assets/javascripts/bootstrap/tab.js +67 -28
  19. data/assets/javascripts/bootstrap/toast.js +90 -42
  20. data/assets/javascripts/bootstrap/tooltip.js +227 -148
  21. data/assets/stylesheets/_bootstrap-grid.scss +7 -7
  22. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  23. data/assets/stylesheets/_bootstrap.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_alert.scss +3 -3
  25. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_button-group.scss +5 -5
  27. data/assets/stylesheets/bootstrap/_card.scss +3 -3
  28. data/assets/stylesheets/bootstrap/_carousel.scss +23 -12
  29. data/assets/stylesheets/bootstrap/_dropdown.scss +22 -23
  30. data/assets/stylesheets/bootstrap/_functions.scss +1 -2
  31. data/assets/stylesheets/bootstrap/_list-group.scss +6 -6
  32. data/assets/stylesheets/bootstrap/_navbar.scss +1 -1
  33. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_popover.scss +17 -14
  35. data/assets/stylesheets/bootstrap/_reboot.scss +19 -3
  36. data/assets/stylesheets/bootstrap/_spinners.scss +1 -1
  37. data/assets/stylesheets/bootstrap/_tables.scss +0 -1
  38. data/assets/stylesheets/bootstrap/_toasts.scss +14 -12
  39. data/assets/stylesheets/bootstrap/_tooltip.scss +12 -12
  40. data/assets/stylesheets/bootstrap/_utilities.scss +39 -24
  41. data/assets/stylesheets/bootstrap/_variables.scss +22 -20
  42. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  43. data/assets/stylesheets/bootstrap/forms/_form-check.scss +5 -5
  44. data/assets/stylesheets/bootstrap/forms/_input-group.scss +3 -3
  45. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +6 -6
  46. data/assets/stylesheets/bootstrap/mixins/_caret.scss +6 -6
  47. data/assets/stylesheets/bootstrap/mixins/_container.scss +2 -4
  48. data/assets/stylesheets/bootstrap/mixins/_forms.scss +1 -1
  49. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +3 -3
  50. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +19 -0
  51. data/lib/bootstrap/version.rb +2 -2
  52. data/tasks/updater/js.rb +6 -4
  53. metadata +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Grid v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap Grid v5.0.0-beta1 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 The Bootstrap Authors
4
4
  * Copyright 2011-2020 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -42,23 +42,23 @@ $utilities: map-get-multiple(
42
42
  "bootstrap/margin-x",
43
43
  "bootstrap/margin-y",
44
44
  "bootstrap/margin-top",
45
- "bootstrap/margin-right",
45
+ "bootstrap/margin-end",
46
46
  "bootstrap/margin-bottom",
47
- "bootstrap/margin-left",
47
+ "bootstrap/margin-start",
48
48
  "bootstrap/negative-margin",
49
49
  "bootstrap/negative-margin-x",
50
50
  "bootstrap/negative-margin-y",
51
51
  "bootstrap/negative-margin-top",
52
- "bootstrap/negative-margin-right",
52
+ "bootstrap/negative-margin-end",
53
53
  "bootstrap/negative-margin-bottom",
54
- "bootstrap/negative-margin-left",
54
+ "bootstrap/negative-margin-start",
55
55
  "bootstrap/padding",
56
56
  "bootstrap/padding-x",
57
57
  "bootstrap/padding-y",
58
58
  "bootstrap/padding-top",
59
- "bootstrap/padding-right",
59
+ "bootstrap/padding-end",
60
60
  "bootstrap/padding-bottom",
61
- "bootstrap/padding-left",
61
+ "bootstrap/padding-start",
62
62
  )
63
63
  );
64
64
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Reboot v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 The Bootstrap Authors
4
4
  * Copyright 2011-2020 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap v5.0.0-beta1 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2020 The Bootstrap Authors
4
4
  * Copyright 2011-2020 Twitter, Inc.
5
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -44,9 +44,9 @@
44
44
  // Generate contextual modifier classes for colorizing the alert.
45
45
 
46
46
  @each $state, $value in $theme-colors {
47
- $background: scale-color($value, $alert-bg-scale);
48
- $border: scale-color($value, $alert-border-scale);
49
- $color: scale-color($value, $alert-color-scale);
47
+ $background: shift-color($value, $alert-bg-scale);
48
+ $border: shift-color($value, $alert-border-scale);
49
+ $color: shift-color($value, $alert-color-scale);
50
50
  @if (contrast-ratio($background, $color) < $min-contrast-ratio) {
51
51
  $color: mix($value, color-contrast($background), abs($alert-color-scale));
52
52
  }
@@ -18,7 +18,7 @@
18
18
  float: left; // Suppress inline spacings and underlining of the separator
19
19
  padding-right: $breadcrumb-item-padding-x;
20
20
  color: $breadcrumb-divider-color;
21
- content: escape-svg($breadcrumb-divider);
21
+ content: var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$variable-prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
22
22
  }
23
23
  }
24
24
 
@@ -43,7 +43,7 @@
43
43
  // Reset rounded corners
44
44
  > .btn:not(:last-child):not(.dropdown-toggle),
45
45
  > .btn-group:not(:last-child) > .btn {
46
- @include border-right-radius(0);
46
+ @include border-end-radius(0);
47
47
  }
48
48
 
49
49
  // The left radius should be 0 if the button is:
@@ -53,7 +53,7 @@
53
53
  > .btn:nth-child(n + 3),
54
54
  > :not(.btn-check) + .btn,
55
55
  > .btn-group:not(:first-child) > .btn {
56
- @include border-left-radius(0);
56
+ @include border-start-radius(0);
57
57
  }
58
58
  }
59
59
 
@@ -75,11 +75,11 @@
75
75
 
76
76
  &::after,
77
77
  .dropup &::after,
78
- .dropright &::after {
78
+ .dropend &::after {
79
79
  margin-left: 0;
80
80
  }
81
81
 
82
- .dropleft &::before {
82
+ .dropstart &::before {
83
83
  margin-right: 0;
84
84
  }
85
85
  }
@@ -132,7 +132,7 @@
132
132
  @include border-bottom-radius(0);
133
133
  }
134
134
 
135
- > .btn:not(:first-child),
135
+ > .btn ~ .btn,
136
136
  > .btn-group:not(:first-child) > .btn {
137
137
  @include border-top-radius(0);
138
138
  }
@@ -69,7 +69,7 @@
69
69
  }
70
70
 
71
71
  + .card-link {
72
- margin-left: $card-spacer-x;
72
+ margin-left: $card-spacer-x #{"/* rtl:ignore */"};
73
73
  }
74
74
  }
75
75
 
@@ -181,7 +181,7 @@
181
181
  // Handle rounded corners
182
182
  @if $enable-rounded {
183
183
  &:not(:last-child) {
184
- @include border-right-radius(0);
184
+ @include border-end-radius(0);
185
185
 
186
186
  .card-img-top,
187
187
  .card-header {
@@ -196,7 +196,7 @@
196
196
  }
197
197
 
198
198
  &:not(:first-child) {
199
- @include border-left-radius(0);
199
+ @include border-start-radius(0);
200
200
 
201
201
  .card-img-top,
202
202
  .card-header {
@@ -3,12 +3,12 @@
3
3
  // 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
4
4
  // even when their scroll action started on a carousel, but for compatibility (with Firefox)
5
5
  // we're preventing all actions instead
6
- // 2. The .carousel-item-left and .carousel-item-right is used to indicate where
6
+ // 2. The .carousel-item-start and .carousel-item-end is used to indicate where
7
7
  // the active slide is heading.
8
8
  // 3. .active.carousel-item is the current slide.
9
- // 4. .active.carousel-item-left and .active.carousel-item-right is the current
9
+ // 4. .active.carousel-item-start and .active.carousel-item-end is the current
10
10
  // slide in its in-transition state. Only one of these occurs at a time.
11
- // 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
11
+ // 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
12
12
  // is the upcoming slide in transition.
13
13
 
14
14
  .carousel {
@@ -42,16 +42,19 @@
42
42
  display: block;
43
43
  }
44
44
 
45
- .carousel-item-next:not(.carousel-item-left),
46
- .active.carousel-item-right {
45
+ /* rtl:begin:ignore */
46
+ .carousel-item-next:not(.carousel-item-start),
47
+ .active.carousel-item-end {
47
48
  transform: translateX(100%);
48
49
  }
49
50
 
50
- .carousel-item-prev:not(.carousel-item-right),
51
- .active.carousel-item-left {
51
+ .carousel-item-prev:not(.carousel-item-end),
52
+ .active.carousel-item-start {
52
53
  transform: translateX(-100%);
53
54
  }
54
55
 
56
+ /* rtl:end:ignore */
57
+
55
58
 
56
59
  //
57
60
  // Alternate transitions
@@ -65,14 +68,14 @@
65
68
  }
66
69
 
67
70
  .carousel-item.active,
68
- .carousel-item-next.carousel-item-left,
69
- .carousel-item-prev.carousel-item-right {
71
+ .carousel-item-next.carousel-item-start,
72
+ .carousel-item-prev.carousel-item-end {
70
73
  z-index: 1;
71
74
  opacity: 1;
72
75
  }
73
76
 
74
- .active.carousel-item-left,
75
- .active.carousel-item-right {
77
+ .active.carousel-item-start,
78
+ .active.carousel-item-end {
76
79
  z-index: 0;
77
80
  opacity: 0;
78
81
  @include transition(opacity 0s $carousel-transition-duration);
@@ -128,6 +131,15 @@
128
131
  background-position: 50%;
129
132
  background-size: 100% 100%;
130
133
  }
134
+
135
+ /* rtl:options: {
136
+ "autoRename": true,
137
+ "stringMap":[ {
138
+ "name" : "prev-next",
139
+ "search" : "prev",
140
+ "replace" : "next"
141
+ } ]
142
+ } */
131
143
  .carousel-control-prev-icon {
132
144
  background-image: escape-svg($carousel-control-prev-icon-bg);
133
145
  }
@@ -135,7 +147,6 @@
135
147
  background-image: escape-svg($carousel-control-next-icon-bg);
136
148
  }
137
149
 
138
-
139
150
  // Optional indicator pips
140
151
  //
141
152
  // Add an ordered list with the following class and add a list item for each
@@ -1,8 +1,8 @@
1
1
  // The dropdown wrapper (`<div>`)
2
2
  .dropup,
3
- .dropright,
3
+ .dropend,
4
4
  .dropdown,
5
- .dropleft {
5
+ .dropstart {
6
6
  position: relative;
7
7
  }
8
8
 
@@ -32,21 +32,31 @@
32
32
  border: $dropdown-border-width solid $dropdown-border-color;
33
33
  @include border-radius($dropdown-border-radius);
34
34
  @include box-shadow($dropdown-box-shadow);
35
+
36
+ // Reset positioning when positioned with Popper
37
+ &[style] {
38
+ right: auto !important; // stylelint-disable-line declaration-no-important
39
+ }
35
40
  }
36
41
 
37
42
  // scss-docs-start responsive-breakpoints
43
+ // We deliberately hardcode the `bs-` prefix because we check
44
+ // this custom property in JS to determine Popper's positioning
45
+
38
46
  @each $breakpoint in map-keys($grid-breakpoints) {
39
47
  @include media-breakpoint-up($breakpoint) {
40
48
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
41
49
 
42
- .dropdown-menu#{$infix}-left {
43
- right: auto;
44
- left: 0;
50
+ .dropdown-menu#{$infix}-start {
51
+ --bs-position: start;
52
+ right: auto #{"/* rtl:ignore */"};
53
+ left: 0 #{"/* rtl:ignore */"};
45
54
  }
46
55
 
47
- .dropdown-menu#{$infix}-right {
48
- right: 0;
49
- left: auto;
56
+ .dropdown-menu#{$infix}-end {
57
+ --bs-position: end;
58
+ right: 0 #{"/* rtl:ignore */"};
59
+ left: auto #{"/* rtl:ignore */"};
50
60
  }
51
61
  }
52
62
  }
@@ -67,7 +77,7 @@
67
77
  }
68
78
  }
69
79
 
70
- .dropright {
80
+ .dropend {
71
81
  .dropdown-menu {
72
82
  top: 0;
73
83
  right: auto;
@@ -77,14 +87,14 @@
77
87
  }
78
88
 
79
89
  .dropdown-toggle {
80
- @include caret(right);
90
+ @include caret(end);
81
91
  &::after {
82
92
  vertical-align: 0;
83
93
  }
84
94
  }
85
95
  }
86
96
 
87
- .dropleft {
97
+ .dropstart {
88
98
  .dropdown-menu {
89
99
  top: 0;
90
100
  right: 100%;
@@ -94,24 +104,13 @@
94
104
  }
95
105
 
96
106
  .dropdown-toggle {
97
- @include caret(left);
107
+ @include caret(start);
98
108
  &::before {
99
109
  vertical-align: 0;
100
110
  }
101
111
  }
102
112
  }
103
113
 
104
- // When enabled Popper.js, reset basic dropdown position
105
- // stylelint-disable-next-line no-duplicate-selectors
106
- .dropdown-menu {
107
- &[x-placement^="top"],
108
- &[x-placement^="right"],
109
- &[x-placement^="bottom"],
110
- &[x-placement^="left"] {
111
- right: auto;
112
- bottom: auto;
113
- }
114
- }
115
114
 
116
115
  // Dividers (basically an `<hr>`) within the dropdown
117
116
  .dropdown-divider {
@@ -161,9 +161,8 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
161
161
  @return mix(black, $color, $weight);
162
162
  }
163
163
 
164
- // Scale a color:
165
164
  // Shade the color if the weight is positive, else tint it
166
- @function scale-color($color, $weight) {
165
+ @function shift-color($color, $weight) {
167
166
  @return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
168
167
  }
169
168
  // scss-docs-end color-functions
@@ -99,13 +99,13 @@
99
99
 
100
100
  > .list-group-item {
101
101
  &:first-child {
102
- @include border-bottom-left-radius($list-group-border-radius);
103
- @include border-top-right-radius(0);
102
+ @include border-bottom-start-radius($list-group-border-radius);
103
+ @include border-top-end-radius(0);
104
104
  }
105
105
 
106
106
  &:last-child {
107
- @include border-top-right-radius($list-group-border-radius);
108
- @include border-bottom-left-radius(0);
107
+ @include border-top-end-radius($list-group-border-radius);
108
+ @include border-bottom-start-radius(0);
109
109
  }
110
110
 
111
111
  &.active {
@@ -152,8 +152,8 @@
152
152
  // Organizationally, this must come after the `:hover` states.
153
153
 
154
154
  @each $state, $value in $theme-colors {
155
- $background: scale-color($value, $list-group-item-bg-scale);
156
- $color: scale-color($value, $list-group-item-color-scale);
155
+ $background: shift-color($value, $list-group-item-bg-scale);
156
+ $color: shift-color($value, $list-group-item-color-scale);
157
157
  @if (contrast-ratio($background, $color) < $min-contrast-ratio) {
158
158
  $color: mix($value, color-contrast($background), abs($alert-color-scale));
159
159
  }
@@ -56,7 +56,7 @@
56
56
  .navbar-brand {
57
57
  padding-top: $navbar-brand-padding-y;
58
58
  padding-bottom: $navbar-brand-padding-y;
59
- margin-right: $navbar-brand-margin-right;
59
+ margin-right: $navbar-brand-margin-end;
60
60
  @include font-size($navbar-brand-font-size);
61
61
  text-decoration: if($link-decoration == none, null, none);
62
62
  white-space: nowrap;
@@ -31,7 +31,7 @@
31
31
 
32
32
  .page-item {
33
33
  &:not(:first-child) .page-link {
34
- margin-left: $pagination-margin-left;
34
+ margin-left: $pagination-margin-start;
35
35
  }
36
36
 
37
37
  &.active .page-link {
@@ -1,7 +1,7 @@
1
1
  .popover {
2
2
  position: absolute;
3
3
  top: 0;
4
- left: 0;
4
+ left: 0 #{"/* rtl:ignore */"};
5
5
  z-index: $zindex-popover;
6
6
  display: block;
7
7
  max-width: $popover-max-width;
@@ -36,7 +36,8 @@
36
36
  }
37
37
 
38
38
  .bs-popover-top {
39
- margin-bottom: $popover-arrow-height;
39
+ // Overrule margin set by popper.js
40
+ margin-bottom: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
40
41
 
41
42
  > .popover-arrow {
42
43
  bottom: subtract(-$popover-arrow-height, $popover-border-width);
@@ -55,8 +56,9 @@
55
56
  }
56
57
  }
57
58
 
58
- .bs-popover-right {
59
- margin-left: $popover-arrow-height;
59
+ .bs-popover-end {
60
+ // Overrule margin set by popper.js
61
+ margin-left: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
60
62
 
61
63
  > .popover-arrow {
62
64
  left: subtract(-$popover-arrow-height, $popover-border-width);
@@ -79,7 +81,8 @@
79
81
  }
80
82
 
81
83
  .bs-popover-bottom {
82
- margin-top: $popover-arrow-height;
84
+ // Overrule margin set by popper.js
85
+ margin-top: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
83
86
 
84
87
  > .popover-arrow {
85
88
  top: subtract(-$popover-arrow-height, $popover-border-width);
@@ -110,8 +113,9 @@
110
113
  }
111
114
  }
112
115
 
113
- .bs-popover-left {
114
- margin-right: $popover-arrow-height;
116
+ .bs-popover-start {
117
+ // Overrule margin set by popper.js
118
+ margin-right: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
115
119
 
116
120
  > .popover-arrow {
117
121
  right: subtract(-$popover-arrow-height, $popover-border-width);
@@ -134,21 +138,20 @@
134
138
  }
135
139
 
136
140
  .bs-popover-auto {
137
- &[x-placement^="top"] {
141
+ &[data-popper-placement^="top"] {
138
142
  @extend .bs-popover-top;
139
143
  }
140
- &[x-placement^="right"] {
141
- @extend .bs-popover-right;
144
+ &[data-popper-placement^="right"] {
145
+ @extend .bs-popover-end;
142
146
  }
143
- &[x-placement^="bottom"] {
147
+ &[data-popper-placement^="bottom"] {
144
148
  @extend .bs-popover-bottom;
145
149
  }
146
- &[x-placement^="left"] {
147
- @extend .bs-popover-left;
150
+ &[data-popper-placement^="left"] {
151
+ @extend .bs-popover-start;
148
152
  }
149
153
  }
150
154
 
151
-
152
155
  // Offset the popover to account for the popover arrow
153
156
  .popover-header {
154
157
  padding: $popover-header-padding-y $popover-header-padding-x;