bootstrap 5.1.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +18 -153
- data/assets/javascripts/bootstrap/base-component.js +44 -127
- data/assets/javascripts/bootstrap/button.js +16 -80
- data/assets/javascripts/bootstrap/carousel.js +225 -497
- data/assets/javascripts/bootstrap/collapse.js +79 -262
- data/assets/javascripts/bootstrap/dom/data.js +6 -8
- data/assets/javascripts/bootstrap/dom/event-handler.js +95 -133
- data/assets/javascripts/bootstrap/dom/manipulator.js +25 -29
- data/assets/javascripts/bootstrap/dom/selector-engine.js +17 -59
- data/assets/javascripts/bootstrap/dropdown.js +124 -342
- data/assets/javascripts/bootstrap/modal.js +122 -767
- data/assets/javascripts/bootstrap/offcanvas.js +102 -671
- data/assets/javascripts/bootstrap/popover.js +42 -124
- data/assets/javascripts/bootstrap/scrollspy.js +186 -269
- data/assets/javascripts/bootstrap/tab.js +222 -221
- data/assets/javascripts/bootstrap/toast.js +41 -227
- data/assets/javascripts/bootstrap/tooltip.js +283 -629
- data/assets/javascripts/bootstrap/util/backdrop.js +165 -0
- data/assets/javascripts/bootstrap/util/component-functions.js +46 -0
- data/assets/javascripts/bootstrap/util/config.js +79 -0
- data/assets/javascripts/bootstrap/util/focustrap.js +129 -0
- data/assets/javascripts/bootstrap/util/index.js +350 -0
- data/assets/javascripts/bootstrap/util/sanitizer.js +122 -0
- data/assets/javascripts/bootstrap/util/scrollbar.js +138 -0
- data/assets/javascripts/bootstrap/util/swipe.js +155 -0
- data/assets/javascripts/bootstrap/util/template-factory.js +177 -0
- data/assets/javascripts/bootstrap-global-this-define.js +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +16 -7
- data/assets/javascripts/bootstrap.js +2094 -1891
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +3 -6
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -7
- data/assets/stylesheets/_bootstrap.scss +4 -6
- data/assets/stylesheets/bootstrap/_accordion.scss +52 -24
- data/assets/stylesheets/bootstrap/_alert.scss +18 -4
- data/assets/stylesheets/bootstrap/_badge.scss +14 -5
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -10
- data/assets/stylesheets/bootstrap/_button-group.scss +3 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +97 -22
- data/assets/stylesheets/bootstrap/_card.scss +55 -37
- data/assets/stylesheets/bootstrap/_close.scss +1 -1
- data/assets/stylesheets/bootstrap/_containers.scss +1 -1
- data/assets/stylesheets/bootstrap/_dropdown.scss +83 -75
- data/assets/stylesheets/bootstrap/_functions.scss +7 -7
- data/assets/stylesheets/bootstrap/_grid.scss +3 -3
- data/assets/stylesheets/bootstrap/_helpers.scss +1 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +44 -27
- data/assets/stylesheets/bootstrap/_maps.scss +54 -0
- data/assets/stylesheets/bootstrap/_modal.scss +71 -43
- data/assets/stylesheets/bootstrap/_nav.scss +53 -20
- data/assets/stylesheets/bootstrap/_navbar.scss +91 -150
- data/assets/stylesheets/bootstrap/_offcanvas.scss +119 -59
- data/assets/stylesheets/bootstrap/_pagination.scss +66 -21
- data/assets/stylesheets/bootstrap/_placeholders.scss +1 -1
- data/assets/stylesheets/bootstrap/_popover.scss +90 -52
- data/assets/stylesheets/bootstrap/_progress.scss +20 -9
- data/assets/stylesheets/bootstrap/_reboot.scss +25 -40
- data/assets/stylesheets/bootstrap/_root.scss +40 -21
- data/assets/stylesheets/bootstrap/_spinners.scss +38 -22
- data/assets/stylesheets/bootstrap/_tables.scss +38 -25
- data/assets/stylesheets/bootstrap/_toasts.scss +35 -16
- data/assets/stylesheets/bootstrap/_tooltip.scss +61 -56
- data/assets/stylesheets/bootstrap/_type.scss +2 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +43 -26
- data/assets/stylesheets/bootstrap/_variables.scss +118 -124
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +3 -6
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +14 -3
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +28 -5
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +12 -37
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +2 -1
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +15 -7
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +10 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +2 -2
- data/assets/stylesheets/bootstrap/helpers/_position.scss +7 -1
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +2 -2
- data/assets/stylesheets/bootstrap/helpers/_vr.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +7 -3
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +32 -95
- data/assets/stylesheets/bootstrap/mixins/_container.scss +4 -2
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +13 -12
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +4 -25
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +12 -9
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +12 -4
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +1 -1
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +9 -4
- metadata +16 -4
@@ -2,30 +2,9 @@
|
|
2
2
|
|
3
3
|
// scss-docs-start pagination-mixin
|
4
4
|
@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}
|
9
|
-
|
10
|
-
.page-item {
|
11
|
-
@if $pagination-margin-start == (-$pagination-border-width) {
|
12
|
-
&:first-child {
|
13
|
-
.page-link {
|
14
|
-
@include border-start-radius($border-radius);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
&:last-child {
|
19
|
-
.page-link {
|
20
|
-
@include border-end-radius($border-radius);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
} @else {
|
24
|
-
//Add border-radius to all pageLinks in case they have left margin
|
25
|
-
.page-link {
|
26
|
-
@include border-radius($border-radius);
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
5
|
+
--#{$prefix}pagination-padding-x: #{$padding-x};
|
6
|
+
--#{$prefix}pagination-padding-y: #{$padding-y};
|
7
|
+
@include rfs($font-size, --#{$prefix}pagination-font-size);
|
8
|
+
--#{$prefix}pagination-border-radius: #{$border-radius};
|
30
9
|
}
|
31
10
|
// scss-docs-end pagination-mixin
|
@@ -5,17 +5,20 @@
|
|
5
5
|
$hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
|
6
6
|
$striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
|
7
7
|
$active-bg: mix($color, $background, percentage($table-active-bg-factor));
|
8
|
+
$border-color: mix($color, $background, percentage($table-border-factor));
|
8
9
|
|
9
|
-
--#{$
|
10
|
-
--#{$
|
11
|
-
--#{$
|
12
|
-
--#{$
|
13
|
-
--#{$
|
14
|
-
--#{$
|
15
|
-
--#{$
|
10
|
+
--#{$prefix}table-color: #{$color};
|
11
|
+
--#{$prefix}table-bg: #{$background};
|
12
|
+
--#{$prefix}table-border-color: #{$border-color};
|
13
|
+
--#{$prefix}table-striped-bg: #{$striped-bg};
|
14
|
+
--#{$prefix}table-striped-color: #{color-contrast($striped-bg)};
|
15
|
+
--#{$prefix}table-active-bg: #{$active-bg};
|
16
|
+
--#{$prefix}table-active-color: #{color-contrast($active-bg)};
|
17
|
+
--#{$prefix}table-hover-bg: #{$hover-bg};
|
18
|
+
--#{$prefix}table-hover-color: #{color-contrast($hover-bg)};
|
16
19
|
|
17
|
-
color: $color;
|
18
|
-
border-color:
|
20
|
+
color: var(--#{$prefix}table-color);
|
21
|
+
border-color: var(--#{$prefix}table-border-color);
|
19
22
|
}
|
20
23
|
}
|
21
24
|
// scss-docs-end table-variant
|
@@ -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
|
+
// Use custom CSS variable name if present, otherwise default to `class`
|
24
|
+
$css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));
|
25
|
+
|
23
26
|
// State params to generate pseudo-classes
|
24
27
|
$state: if(map-has-key($utility, state), map-get($utility, state), ());
|
25
28
|
|
@@ -52,20 +55,20 @@
|
|
52
55
|
|
53
56
|
@if $is-css-var {
|
54
57
|
.#{$property-class + $infix + $property-class-modifier} {
|
55
|
-
--#{$
|
58
|
+
--#{$prefix}#{$css-variable-name}: #{$value};
|
56
59
|
}
|
57
60
|
|
58
61
|
@each $pseudo in $state {
|
59
62
|
.#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
|
60
|
-
--#{$
|
63
|
+
--#{$prefix}#{$css-variable-name}: #{$value};
|
61
64
|
}
|
62
65
|
}
|
63
66
|
} @else {
|
64
67
|
.#{$property-class + $infix + $property-class-modifier} {
|
65
68
|
@each $property in $properties {
|
66
69
|
@if $is-local-vars {
|
67
|
-
@each $local-var, $
|
68
|
-
--#{$
|
70
|
+
@each $local-var, $variable in $is-local-vars {
|
71
|
+
--#{$prefix}#{$local-var}: #{$variable};
|
69
72
|
}
|
70
73
|
}
|
71
74
|
#{$property}: $value if($enable-important-utilities, !important, null);
|
@@ -75,6 +78,11 @@
|
|
75
78
|
@each $pseudo in $state {
|
76
79
|
.#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
|
77
80
|
@each $property in $properties {
|
81
|
+
@if $is-local-vars {
|
82
|
+
@each $local-var, $variable in $is-local-vars {
|
83
|
+
--#{$prefix}#{$local-var}: #{$variable};
|
84
|
+
}
|
85
|
+
}
|
78
86
|
#{$property}: $value if($enable-important-utilities, !important, null);
|
79
87
|
}
|
80
88
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
// Hide content visually while keeping it accessible to assistive technologies
|
4
4
|
//
|
5
5
|
// See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
|
6
|
-
// See: https://
|
6
|
+
// See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
|
7
7
|
|
8
8
|
@mixin visually-hidden() {
|
9
9
|
position: absolute !important;
|
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.
|
17
|
+
s.add_runtime_dependency 'popper_js', '>= 2.11.5', '< 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'
|
data/lib/bootstrap/version.rb
CHANGED
data/tasks/updater/js.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
require 'pathname'
|
1
2
|
require 'tsort'
|
2
3
|
|
3
4
|
class Updater
|
4
5
|
module Js
|
5
|
-
INLINED_SRCS = %w[
|
6
|
+
INLINED_SRCS = %w[].freeze
|
6
7
|
|
7
8
|
def update_javascript_assets
|
8
9
|
log_status 'Updating javascripts...'
|
@@ -49,7 +50,9 @@ class Updater
|
|
49
50
|
imports = Deps.new
|
50
51
|
# Get the imports from the ES6 files to order requires correctly.
|
51
52
|
read_files('js/src', src_files).each do |name, content|
|
52
|
-
file_imports = content.scan(%r{import *(?:[a-zA-Z]*|\{[a-zA-Z ,]*\}) *from '
|
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
|
55
|
+
end.uniq
|
53
56
|
imports.add name, *(file_imports - INLINED_SRCS)
|
54
57
|
end
|
55
58
|
imports.tsort
|
@@ -68,13 +71,15 @@ class Updater
|
|
68
71
|
end
|
69
72
|
|
70
73
|
def add(from, *tos)
|
71
|
-
(@imports[from] ||= [])
|
74
|
+
imports = (@imports[from] ||= [])
|
75
|
+
imports.push(*tos)
|
76
|
+
imports.sort!
|
72
77
|
end
|
73
78
|
|
74
79
|
def tsort_each_child(node, &block)
|
75
80
|
node_imports = @imports[node]
|
76
81
|
if node_imports.nil?
|
77
|
-
raise "No imports found for #{node.inspect}"
|
82
|
+
raise "No imports found for #{node.inspect}\nImports:\n#{@imports.inspect}"
|
78
83
|
end
|
79
84
|
node_imports.each(&block)
|
80
85
|
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.
|
4
|
+
version: 5.2.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:
|
11
|
+
date: 2022-07-20 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.
|
19
|
+
version: 2.11.5
|
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.
|
29
|
+
version: 2.11.5
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '3'
|
@@ -234,6 +234,15 @@ files:
|
|
234
234
|
- assets/javascripts/bootstrap/tab.js
|
235
235
|
- assets/javascripts/bootstrap/toast.js
|
236
236
|
- assets/javascripts/bootstrap/tooltip.js
|
237
|
+
- assets/javascripts/bootstrap/util/backdrop.js
|
238
|
+
- assets/javascripts/bootstrap/util/component-functions.js
|
239
|
+
- assets/javascripts/bootstrap/util/config.js
|
240
|
+
- assets/javascripts/bootstrap/util/focustrap.js
|
241
|
+
- assets/javascripts/bootstrap/util/index.js
|
242
|
+
- assets/javascripts/bootstrap/util/sanitizer.js
|
243
|
+
- assets/javascripts/bootstrap/util/scrollbar.js
|
244
|
+
- assets/javascripts/bootstrap/util/swipe.js
|
245
|
+
- assets/javascripts/bootstrap/util/template-factory.js
|
237
246
|
- assets/stylesheets/_bootstrap-grid.scss
|
238
247
|
- assets/stylesheets/_bootstrap-reboot.scss
|
239
248
|
- assets/stylesheets/_bootstrap.scss
|
@@ -254,6 +263,7 @@ files:
|
|
254
263
|
- assets/stylesheets/bootstrap/_helpers.scss
|
255
264
|
- assets/stylesheets/bootstrap/_images.scss
|
256
265
|
- assets/stylesheets/bootstrap/_list-group.scss
|
266
|
+
- assets/stylesheets/bootstrap/_maps.scss
|
257
267
|
- assets/stylesheets/bootstrap/_mixins.scss
|
258
268
|
- assets/stylesheets/bootstrap/_modal.scss
|
259
269
|
- assets/stylesheets/bootstrap/_nav.scss
|
@@ -284,6 +294,7 @@ files:
|
|
284
294
|
- assets/stylesheets/bootstrap/forms/_labels.scss
|
285
295
|
- assets/stylesheets/bootstrap/forms/_validation.scss
|
286
296
|
- assets/stylesheets/bootstrap/helpers/_clearfix.scss
|
297
|
+
- assets/stylesheets/bootstrap/helpers/_color-bg.scss
|
287
298
|
- assets/stylesheets/bootstrap/helpers/_colored-links.scss
|
288
299
|
- assets/stylesheets/bootstrap/helpers/_position.scss
|
289
300
|
- assets/stylesheets/bootstrap/helpers/_ratio.scss
|
@@ -294,6 +305,7 @@ files:
|
|
294
305
|
- assets/stylesheets/bootstrap/helpers/_vr.scss
|
295
306
|
- assets/stylesheets/bootstrap/mixins/_alert.scss
|
296
307
|
- assets/stylesheets/bootstrap/mixins/_backdrop.scss
|
308
|
+
- assets/stylesheets/bootstrap/mixins/_banner.scss
|
297
309
|
- assets/stylesheets/bootstrap/mixins/_border-radius.scss
|
298
310
|
- assets/stylesheets/bootstrap/mixins/_box-shadow.scss
|
299
311
|
- assets/stylesheets/bootstrap/mixins/_breakpoints.scss
|