bootstrap 5.0.0.alpha3 → 5.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
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 Utilities v5.0.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap Utilities 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)
@@ -5,12 +5,12 @@
5
5
  .form-check {
6
6
  display: block;
7
7
  min-height: $form-check-min-height;
8
- padding-left: $form-check-padding-left;
8
+ padding-left: $form-check-padding-start;
9
9
  margin-bottom: $form-check-margin-bottom;
10
10
 
11
11
  .form-check-input {
12
12
  float: left;
13
- margin-left: $form-check-padding-left * -1;
13
+ margin-left: $form-check-padding-start * -1;
14
14
  }
15
15
  }
16
16
 
@@ -105,11 +105,11 @@
105
105
  //
106
106
 
107
107
  .form-switch {
108
- padding-left: $form-switch-padding-left;
108
+ padding-left: $form-switch-padding-start;
109
109
 
110
110
  .form-check-input {
111
111
  width: $form-switch-width;
112
- margin-left: $form-switch-padding-left * -1;
112
+ margin-left: $form-switch-padding-start * -1;
113
113
  background-image: escape-svg($form-switch-bg-image);
114
114
  background-position: left center;
115
115
  @include border-radius($form-switch-border-radius);
@@ -132,7 +132,7 @@
132
132
 
133
133
  .form-check-inline {
134
134
  display: inline-block;
135
- margin-right: $form-check-inline-margin-right;
135
+ margin-right: $form-check-inline-margin-end;
136
136
  }
137
137
 
138
138
  .btn-check {
@@ -98,14 +98,14 @@
98
98
  &:not(.has-validation) {
99
99
  > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
100
100
  > .dropdown-toggle:nth-last-child(n + 3) {
101
- @include border-right-radius(0);
101
+ @include border-end-radius(0);
102
102
  }
103
103
  }
104
104
 
105
105
  &.has-validation {
106
106
  > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu),
107
107
  > .dropdown-toggle:nth-last-child(n + 4) {
108
- @include border-right-radius(0);
108
+ @include border-end-radius(0);
109
109
  }
110
110
  }
111
111
 
@@ -116,6 +116,6 @@
116
116
 
117
117
  > :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
118
118
  margin-left: -$input-border-width;
119
- @include border-left-radius(0);
119
+ @include border-start-radius(0);
120
120
  }
121
121
  }
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- @mixin border-right-radius($radius: $border-radius) {
33
+ @mixin border-end-radius($radius: $border-radius) {
34
34
  @if $enable-rounded {
35
35
  border-top-right-radius: valid-radius($radius);
36
36
  border-bottom-right-radius: valid-radius($radius);
@@ -44,32 +44,32 @@
44
44
  }
45
45
  }
46
46
 
47
- @mixin border-left-radius($radius: $border-radius) {
47
+ @mixin border-start-radius($radius: $border-radius) {
48
48
  @if $enable-rounded {
49
49
  border-top-left-radius: valid-radius($radius);
50
50
  border-bottom-left-radius: valid-radius($radius);
51
51
  }
52
52
  }
53
53
 
54
- @mixin border-top-left-radius($radius: $border-radius) {
54
+ @mixin border-top-start-radius($radius: $border-radius) {
55
55
  @if $enable-rounded {
56
56
  border-top-left-radius: valid-radius($radius);
57
57
  }
58
58
  }
59
59
 
60
- @mixin border-top-right-radius($radius: $border-radius) {
60
+ @mixin border-top-end-radius($radius: $border-radius) {
61
61
  @if $enable-rounded {
62
62
  border-top-right-radius: valid-radius($radius);
63
63
  }
64
64
  }
65
65
 
66
- @mixin border-bottom-right-radius($radius: $border-radius) {
66
+ @mixin border-bottom-end-radius($radius: $border-radius) {
67
67
  @if $enable-rounded {
68
68
  border-bottom-right-radius: valid-radius($radius);
69
69
  }
70
70
  }
71
71
 
72
- @mixin border-bottom-left-radius($radius: $border-radius) {
72
+ @mixin border-bottom-start-radius($radius: $border-radius) {
73
73
  @if $enable-rounded {
74
74
  border-bottom-left-radius: valid-radius($radius);
75
75
  }
@@ -12,14 +12,14 @@
12
12
  border-left: $caret-width solid transparent;
13
13
  }
14
14
 
15
- @mixin caret-right {
15
+ @mixin caret-end {
16
16
  border-top: $caret-width solid transparent;
17
17
  border-right: 0;
18
18
  border-bottom: $caret-width solid transparent;
19
19
  border-left: $caret-width solid;
20
20
  }
21
21
 
22
- @mixin caret-left {
22
+ @mixin caret-start {
23
23
  border-top: $caret-width solid transparent;
24
24
  border-right: $caret-width solid;
25
25
  border-bottom: $caret-width solid transparent;
@@ -36,12 +36,12 @@
36
36
  @include caret-down();
37
37
  } @else if $direction == up {
38
38
  @include caret-up();
39
- } @else if $direction == right {
40
- @include caret-right();
39
+ } @else if $direction == end {
40
+ @include caret-end();
41
41
  }
42
42
  }
43
43
 
44
- @if $direction == left {
44
+ @if $direction == start {
45
45
  &::after {
46
46
  display: none;
47
47
  }
@@ -51,7 +51,7 @@
51
51
  margin-right: $caret-spacing;
52
52
  vertical-align: $caret-vertical-align;
53
53
  content: "";
54
- @include caret-left();
54
+ @include caret-start();
55
55
  }
56
56
  }
57
57
 
@@ -1,11 +1,9 @@
1
1
  // Container mixins
2
2
 
3
3
  @mixin make-container($gutter: $container-padding-x) {
4
- --bs-gutter-x: #{$gutter};
5
-
6
4
  width: 100%;
7
- padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list
8
- padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-disallowed-list
5
+ padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});
6
+ padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});
9
7
  margin-right: auto;
10
8
  margin-left: auto;
11
9
  }
@@ -79,7 +79,7 @@
79
79
  border-color: $color;
80
80
 
81
81
  @if $enable-validation-icons {
82
- padding-right: $form-select-feedback-icon-padding-right;
82
+ padding-right: $form-select-feedback-icon-padding-end;
83
83
  background-image: escape-svg($form-select-indicator), escape-svg($icon);
84
84
  background-position: $form-select-bg-position, $form-select-feedback-icon-position;
85
85
  background-size: $form-select-bg-size, $form-select-feedback-icon-size;
@@ -7,16 +7,16 @@
7
7
  }
8
8
 
9
9
  .page-item {
10
- @if $pagination-margin-left == (-$pagination-border-width) {
10
+ @if $pagination-margin-start == (-$pagination-border-width) {
11
11
  &:first-child {
12
12
  .page-link {
13
- @include border-left-radius($border-radius);
13
+ @include border-start-radius($border-radius);
14
14
  }
15
15
  }
16
16
 
17
17
  &:last-child {
18
18
  .page-link {
19
- @include border-right-radius($border-radius);
19
+ @include border-end-radius($border-radius);
20
20
  }
21
21
  }
22
22
  } @else {
@@ -20,6 +20,9 @@
20
20
  $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
21
21
  $property-class: if($property-class == null, "", $property-class);
22
22
 
23
+ // State params to generate pseudo-classes
24
+ $state: if(map-has-key($utility, state), map-get($utility, state), ());
25
+
23
26
  $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
24
27
 
25
28
  // Don't prefix if value key is null (eg. with shadow class)
@@ -38,12 +41,28 @@
38
41
  }
39
42
  }
40
43
 
44
+ $is-rtl: map-get($utility, rtl);
45
+
41
46
  @if $value != null {
47
+ @if $is-rtl == false {
48
+ /* rtl:begin:remove */
49
+ }
42
50
  .#{$property-class + $infix + $property-class-modifier} {
43
51
  @each $property in $properties {
44
52
  #{$property}: $value if($enable-important-utilities, !important, null);
45
53
  }
46
54
  }
55
+
56
+ @each $pseudo in $state {
57
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
58
+ @each $property in $properties {
59
+ #{$property}: $value if($enable-important-utilities, !important, null);
60
+ }
61
+ }
62
+ }
63
+ @if $is-rtl == false {
64
+ /* rtl:end:remove */
65
+ }
47
66
  }
48
67
  }
49
68
  }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootstrap
4
- VERSION = '5.0.0.alpha3'
5
- BOOTSTRAP_SHA = '384eccbfaf3f234944f8d60ac70dd7966814c994'
4
+ VERSION = '5.0.0.beta1'
5
+ BOOTSTRAP_SHA = '63f3d939eaceeb84dcc77a7392953bcc8c5bc0a3'
6
6
  end
@@ -2,6 +2,8 @@ require 'tsort'
2
2
 
3
3
  class Updater
4
4
  module Js
5
+ INLINED_SRCS = %w[base-component.js util/index.js util/sanitizer.js].freeze
6
+
5
7
  def update_javascript_assets
6
8
  log_status 'Updating javascripts...'
7
9
  save_to = @save_to[:js]
@@ -29,13 +31,13 @@ class Updater
29
31
 
30
32
  def bootstrap_js_files
31
33
  @bootstrap_js_files ||= begin
32
- src_files = get_paths_by_type('js/src', /\.js$/) - %w[util/index.js util/sanitizer.js]
34
+ src_files = get_paths_by_type('js/src', /\.js$/) - INLINED_SRCS
35
+ puts "src_files: #{src_files.inspect}"
33
36
  imports = Deps.new
34
37
  # Get the imports from the ES6 files to order requires correctly.
35
38
  read_files('js/src', src_files).each do |name, content|
36
- imports.add name,
37
- *content.scan(%r{import [a-zA-Z]* from '\./([\w/-]+)})
38
- .flatten(1).map { |f| "#{f}.js" }.uniq
39
+ file_imports = content.scan(%r{import *(?:[a-zA-Z]*|\{[a-zA-Z ,]*\}) *from '\./([\w/-]+)}).flatten(1).map { |f| "#{f}.js" }.uniq
40
+ imports.add name, *(file_imports - INLINED_SRCS)
39
41
  end
40
42
  imports.tsort
41
43
  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: 5.0.0.alpha3
4
+ version: 5.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twitter, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-15 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: popper_js