bootstrap 5.0.0.beta2 → 5.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +1 -0
  4. data/assets/javascripts/bootstrap.js +2051 -2009
  5. data/assets/javascripts/bootstrap.min.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +75 -118
  7. data/assets/javascripts/bootstrap/base-component.js +23 -37
  8. data/assets/javascripts/bootstrap/button.js +39 -78
  9. data/assets/javascripts/bootstrap/carousel.js +284 -364
  10. data/assets/javascripts/bootstrap/collapse.js +178 -247
  11. data/assets/javascripts/bootstrap/dom/data.js +34 -47
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +71 -77
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +23 -21
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +20 -28
  15. data/assets/javascripts/bootstrap/dropdown.js +195 -265
  16. data/assets/javascripts/bootstrap/modal.js +256 -344
  17. data/assets/javascripts/bootstrap/offcanvas.js +508 -0
  18. data/assets/javascripts/bootstrap/popover.js +88 -157
  19. data/assets/javascripts/bootstrap/scrollspy.js +134 -212
  20. data/assets/javascripts/bootstrap/tab.js +108 -142
  21. data/assets/javascripts/bootstrap/toast.js +113 -183
  22. data/assets/javascripts/bootstrap/tooltip.js +297 -392
  23. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  24. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  25. data/assets/stylesheets/_bootstrap.scss +2 -1
  26. data/assets/stylesheets/bootstrap/_accordion.scss +22 -32
  27. data/assets/stylesheets/bootstrap/_buttons.scss +2 -0
  28. data/assets/stylesheets/bootstrap/_card.scss +1 -1
  29. data/assets/stylesheets/bootstrap/_dropdown.scss +3 -6
  30. data/assets/stylesheets/bootstrap/_list-group.scss +11 -0
  31. data/assets/stylesheets/bootstrap/_modal.scss +2 -0
  32. data/assets/stylesheets/bootstrap/_nav.scss +7 -0
  33. data/assets/stylesheets/bootstrap/_navbar.scss +2 -0
  34. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  35. data/assets/stylesheets/bootstrap/_progress.scss +3 -0
  36. data/assets/stylesheets/bootstrap/_reboot.scss +7 -21
  37. data/assets/stylesheets/bootstrap/_spinners.scss +4 -0
  38. data/assets/stylesheets/bootstrap/_transitions.scss +2 -0
  39. data/assets/stylesheets/bootstrap/_utilities.scss +65 -37
  40. data/assets/stylesheets/bootstrap/_variables.scss +138 -30
  41. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  42. data/assets/stylesheets/bootstrap/forms/_form-control.scss +0 -4
  43. data/assets/stylesheets/bootstrap/mixins/_alert.scss +2 -0
  44. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +2 -0
  45. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +6 -1
  46. data/assets/stylesheets/bootstrap/mixins/_caret.scss +2 -0
  47. data/assets/stylesheets/bootstrap/mixins/_forms.scss +11 -1
  48. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  49. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -0
  50. data/bootstrap.gemspec +1 -1
  51. data/lib/bootstrap/version.rb +2 -2
  52. data/tasks/updater/js.rb +1 -1
  53. data/tasks/updater/network.rb +7 -1
  54. metadata +6 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap Utilities v5.0.0-beta2 (https://getbootstrap.com/)
2
+ * Bootstrap Utilities v5.0.0-beta3 (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)
@@ -73,7 +73,6 @@
73
73
  }
74
74
 
75
75
  // File input buttons theming
76
- // stylelint-disable-next-line selector-pseudo-element-no-unknown
77
76
  &::file-selector-button {
78
77
  padding: $input-padding-y $input-padding-x;
79
78
  margin: (-$input-padding-y) (-$input-padding-x);
@@ -89,7 +88,6 @@
89
88
  @include transition($btn-transition);
90
89
  }
91
90
 
92
- // stylelint-disable-next-line selector-pseudo-element-no-unknown
93
91
  &:hover:not(:disabled):not([readonly])::file-selector-button {
94
92
  background-color: $form-file-button-hover-bg;
95
93
  }
@@ -150,7 +148,6 @@
150
148
  @include font-size($input-font-size-sm);
151
149
  @include border-radius($input-border-radius-sm);
152
150
 
153
- // stylelint-disable-next-line selector-pseudo-element-no-unknown
154
151
  &::file-selector-button {
155
152
  padding: $input-padding-y-sm $input-padding-x-sm;
156
153
  margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
@@ -170,7 +167,6 @@
170
167
  @include font-size($input-font-size-lg);
171
168
  @include border-radius($input-border-radius-lg);
172
169
 
173
- // stylelint-disable-next-line selector-pseudo-element-no-unknown
174
170
  &::file-selector-button {
175
171
  padding: $input-padding-y-lg $input-padding-x-lg;
176
172
  margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
@@ -1,3 +1,4 @@
1
+ // scss-docs-start alert-variant-mixin
1
2
  @mixin alert-variant($background, $border, $color) {
2
3
  color: $color;
3
4
  @include gradient-bg($background);
@@ -7,3 +8,4 @@
7
8
  color: shade-color($color, 20%);
8
9
  }
9
10
  }
11
+ // scss-docs-end alert-variant-mixin
@@ -14,6 +14,7 @@
14
14
  @return $return;
15
15
  }
16
16
 
17
+ // scss-docs-start border-radius-mixins
17
18
  @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
18
19
  @if $enable-rounded {
19
20
  border-radius: valid-radius($radius);
@@ -74,3 +75,4 @@
74
75
  border-bottom-left-radius: valid-radius($radius);
75
76
  }
76
77
  }
78
+ // scss-docs-end border-radius-mixins
@@ -3,6 +3,7 @@
3
3
  // Easily pump out default styles, as well as :hover, :focus, :active,
4
4
  // and disabled options for all buttons
5
5
 
6
+ // scss-docs-start btn-variant-mixin
6
7
  @mixin button-variant(
7
8
  $background,
8
9
  $border,
@@ -71,7 +72,9 @@
71
72
  border-color: $disabled-border;
72
73
  }
73
74
  }
75
+ // scss-docs-end btn-variant-mixin
74
76
 
77
+ // scss-docs-start btn-outline-variant-mixin
75
78
  @mixin button-outline-variant(
76
79
  $color,
77
80
  $color-hover: color-contrast($color),
@@ -118,11 +121,13 @@
118
121
  background-color: transparent;
119
122
  }
120
123
  }
124
+ // scss-docs-end btn-outline-variant-mixin
121
125
 
122
- // Button sizes
126
+ // scss-docs-start btn-size-mixin
123
127
  @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
124
128
  padding: $padding-y $padding-x;
125
129
  @include font-size($font-size);
126
130
  // Manually declare to provide an override to the browser default
127
131
  @include border-radius($border-radius, 0);
128
132
  }
133
+ // scss-docs-end btn-size-mixin
@@ -1,3 +1,4 @@
1
+ // scss-docs-start caret-mixins
1
2
  @mixin caret-down {
2
3
  border-top: $caret-width solid;
3
4
  border-right: $caret-width solid transparent;
@@ -60,3 +61,4 @@
60
61
  }
61
62
  }
62
63
  }
64
+ // scss-docs-end caret-mixins
@@ -1,5 +1,7 @@
1
1
  // This mixin uses an `if()` technique to be compatible with Dart Sass
2
2
  // See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
3
+
4
+ // scss-docs-start form-validation-mixins
3
5
  @mixin form-validation-state-selector($state) {
4
6
  @if ($state == "valid" or $state == "invalid") {
5
7
  .was-validated #{if(&, "&", "")}:#{$state},
@@ -19,7 +21,7 @@
19
21
  $icon,
20
22
  $tooltip-color: color-contrast($color),
21
23
  $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
22
- $focus-box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity)
24
+ $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity)
23
25
  ) {
24
26
  .#{$state}-feedback {
25
27
  display: none;
@@ -121,4 +123,12 @@
121
123
  margin-left: .5em;
122
124
  }
123
125
  }
126
+
127
+ .input-group .form-control,
128
+ .input-group .form-select {
129
+ @include form-validation-state-selector($state) {
130
+ z-index: 3;
131
+ }
132
+ }
124
133
  }
134
+ // scss-docs-end form-validation-mixins
@@ -1,5 +1,6 @@
1
1
  // List Groups
2
2
 
3
+ // scss-docs-start list-group-mixin
3
4
  @mixin list-group-item-variant($state, $background, $color) {
4
5
  .list-group-item-#{$state} {
5
6
  color: $color;
@@ -20,3 +21,4 @@
20
21
  }
21
22
  }
22
23
  }
24
+ // scss-docs-end list-group-mixin
@@ -1,5 +1,6 @@
1
1
  // Pagination
2
2
 
3
+ // scss-docs-start pagination-mixin
3
4
  @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
4
5
  .page-link {
5
6
  padding: $padding-y $padding-x;
@@ -27,3 +28,4 @@
27
28
  }
28
29
  }
29
30
  }
31
+ // scss-docs-end pagination-mixin
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.8.6', '< 3'
17
+ s.add_runtime_dependency 'popper_js', '>= 2.9.1', '< 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.beta2'
5
- BOOTSTRAP_SHA = 'e50c11b8c6434b6d68ea5897771e4d35fe12f5c3'
4
+ VERSION = '5.0.0.beta3'
5
+ BOOTSTRAP_SHA = '220139a89ffc3864bbb6e1b35471667318eadc1f'
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].freeze
5
+ INLINED_SRCS = %w[util/index.js util/sanitizer.js util/scrollbar.js].freeze
6
6
 
7
7
  def update_javascript_assets
8
8
  log_status 'Updating javascripts...'
@@ -25,7 +25,13 @@ class Updater
25
25
  log_http_get_files files, path_url, false
26
26
  files.map do |name|
27
27
  Thread.start {
28
- contents[name] = URI.open("#{path_url}/#{name}").read
28
+ begin
29
+ url = "#{path_url}/#{name}"
30
+ contents[name] = URI.open(url).read
31
+ rescue Exception => e
32
+ log "Error downloading #{url}: #{e}"
33
+ exit 1
34
+ end
29
35
  WRITE_FILES_MUTEX.synchronize { write_cached_files path, name => contents[name] }
30
36
  }
31
37
  end.each(&:join)
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.beta2
4
+ version: 5.0.0.beta3
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-02-26 00:00:00.000000000 Z
11
+ date: 2021-04-25 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.8.6
19
+ version: 2.9.1
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.8.6
29
+ version: 2.9.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3'
@@ -228,6 +228,7 @@ files:
228
228
  - assets/javascripts/bootstrap/dom/selector-engine.js
229
229
  - assets/javascripts/bootstrap/dropdown.js
230
230
  - assets/javascripts/bootstrap/modal.js
231
+ - assets/javascripts/bootstrap/offcanvas.js
231
232
  - assets/javascripts/bootstrap/popover.js
232
233
  - assets/javascripts/bootstrap/scrollspy.js
233
234
  - assets/javascripts/bootstrap/tab.js
@@ -257,6 +258,7 @@ files:
257
258
  - assets/stylesheets/bootstrap/_modal.scss
258
259
  - assets/stylesheets/bootstrap/_nav.scss
259
260
  - assets/stylesheets/bootstrap/_navbar.scss
261
+ - assets/stylesheets/bootstrap/_offcanvas.scss
260
262
  - assets/stylesheets/bootstrap/_pagination.scss
261
263
  - assets/stylesheets/bootstrap/_popover.scss
262
264
  - assets/stylesheets/bootstrap/_progress.scss