bootstrap 5.2.3 → 5.3.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +21 -32
  4. data/assets/javascripts/bootstrap/base-component.js +21 -38
  5. data/assets/javascripts/bootstrap/button.js +18 -22
  6. data/assets/javascripts/bootstrap/carousel.js +51 -135
  7. data/assets/javascripts/bootstrap/collapse.js +39 -102
  8. data/assets/javascripts/bootstrap/dom/data.js +8 -12
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +18 -66
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -17
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +41 -24
  12. data/assets/javascripts/bootstrap/dropdown.js +73 -145
  13. data/assets/javascripts/bootstrap/modal.js +52 -133
  14. data/assets/javascripts/bootstrap/offcanvas.js +49 -102
  15. data/assets/javascripts/bootstrap/popover.js +22 -29
  16. data/assets/javascripts/bootstrap/scrollspy.js +51 -89
  17. data/assets/javascripts/bootstrap/tab.js +51 -109
  18. data/assets/javascripts/bootstrap/toast.js +30 -73
  19. data/assets/javascripts/bootstrap/tooltip.js +74 -177
  20. data/assets/javascripts/bootstrap/util/backdrop.js +27 -54
  21. data/assets/javascripts/bootstrap/util/component-functions.js +13 -19
  22. data/assets/javascripts/bootstrap/util/config.js +14 -27
  23. data/assets/javascripts/bootstrap/util/focustrap.js +19 -36
  24. data/assets/javascripts/bootstrap/util/index.js +42 -111
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +13 -19
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +23 -50
  27. data/assets/javascripts/bootstrap/util/swipe.js +26 -48
  28. data/assets/javascripts/bootstrap/util/template-factory.js +24 -52
  29. data/assets/javascripts/bootstrap-sprockets.js +1 -1
  30. data/assets/javascripts/bootstrap.js +626 -1406
  31. data/assets/javascripts/bootstrap.min.js +3 -3
  32. data/assets/stylesheets/_bootstrap-grid.scss +1 -3
  33. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  34. data/assets/stylesheets/_bootstrap.scss +1 -0
  35. data/assets/stylesheets/bootstrap/_accordion.scss +9 -0
  36. data/assets/stylesheets/bootstrap/_alert.scss +8 -11
  37. data/assets/stylesheets/bootstrap/_button-group.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_buttons.scss +3 -3
  39. data/assets/stylesheets/bootstrap/_card.scss +5 -0
  40. data/assets/stylesheets/bootstrap/_carousel.scss +20 -2
  41. data/assets/stylesheets/bootstrap/_close.scss +32 -9
  42. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  43. data/assets/stylesheets/bootstrap/_functions.scss +1 -1
  44. data/assets/stylesheets/bootstrap/_grid.scss +6 -0
  45. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  46. data/assets/stylesheets/bootstrap/_list-group.scss +12 -7
  47. data/assets/stylesheets/bootstrap/_maps.scss +120 -0
  48. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  49. data/assets/stylesheets/bootstrap/_nav.scss +40 -3
  50. data/assets/stylesheets/bootstrap/_navbar.scss +13 -3
  51. data/assets/stylesheets/bootstrap/_offcanvas.scss +4 -2
  52. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  53. data/assets/stylesheets/bootstrap/_progress.scss +10 -1
  54. data/assets/stylesheets/bootstrap/_reboot.scss +3 -3
  55. data/assets/stylesheets/bootstrap/_root.scss +125 -10
  56. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  57. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -5
  58. data/assets/stylesheets/bootstrap/_utilities.scss +172 -13
  59. data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
  60. data/assets/stylesheets/bootstrap/_variables.scss +260 -151
  61. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -0
  62. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +21 -3
  63. data/assets/stylesheets/bootstrap/forms/_form-check.scss +24 -11
  64. data/assets/stylesheets/bootstrap/forms/_form-control.scss +23 -3
  65. data/assets/stylesheets/bootstrap/forms/_form-select.scss +11 -2
  66. data/assets/stylesheets/bootstrap/forms/_input-group.scss +1 -1
  67. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +22 -2
  68. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  69. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  70. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -1
  71. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -4
  72. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -25
  73. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  74. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -7
  75. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  76. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +5 -1
  78. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +23 -29
  79. data/bootstrap.gemspec +1 -1
  80. data/lib/bootstrap/version.rb +2 -2
  81. data/tasks/updater/js.rb +1 -1
  82. data/tasks/updater/scss.rb +1 -1
  83. metadata +10 -6
@@ -22,6 +22,20 @@ $utilities: map-merge(
22
22
  )
23
23
  ),
24
24
  // scss-docs-end utils-float
25
+ // Object Fit utilities
26
+ // scss-docs-start utils-object-fit
27
+ "object-fit": (
28
+ responsive: true,
29
+ property: object-fit,
30
+ values: (
31
+ contain: contain,
32
+ cover: cover,
33
+ fill: fill,
34
+ scale: scale-down,
35
+ none: none,
36
+ )
37
+ ),
38
+ // scss-docs-end utils-object-fit
25
39
  // Opacity utilities
26
40
  // scss-docs-start utils-opacity
27
41
  "opacity": (
@@ -40,6 +54,14 @@ $utilities: map-merge(
40
54
  property: overflow,
41
55
  values: auto hidden visible scroll,
42
56
  ),
57
+ "overflow-x": (
58
+ property: overflow-x,
59
+ values: auto hidden visible scroll,
60
+ ),
61
+ "overflow-y": (
62
+ property: overflow-y,
63
+ values: auto hidden visible scroll,
64
+ ),
43
65
  // scss-docs-end utils-overflow
44
66
  // scss-docs-start utils-display
45
67
  "display": (
@@ -47,7 +69,7 @@ $utilities: map-merge(
47
69
  print: true,
48
70
  property: display,
49
71
  class: d,
50
- values: inline inline-block block grid table table-row table-cell flex inline-flex none
72
+ values: inline inline-block block grid inline-grid table table-row table-cell flex inline-flex none
51
73
  ),
52
74
  // scss-docs-end utils-display
53
75
  // scss-docs-start utils-shadow
@@ -62,6 +84,14 @@ $utilities: map-merge(
62
84
  )
63
85
  ),
64
86
  // scss-docs-end utils-shadow
87
+ // scss-docs-start utils-focus-ring
88
+ "focus-ring": (
89
+ css-var: true,
90
+ css-variable-name: focus-ring-color,
91
+ class: focus-ring,
92
+ values: map-loop($theme-colors-rgb, rgba-css-var, "$key", "focus-ring")
93
+ ),
94
+ // scss-docs-end utils-focus-ring
65
95
  // scss-docs-start utils-position
66
96
  "position": (
67
97
  property: position,
@@ -141,9 +171,13 @@ $utilities: map-merge(
141
171
  ),
142
172
  values: $utilities-border-colors
143
173
  ),
174
+ "subtle-border-color": (
175
+ property: border-color,
176
+ class: border,
177
+ values: $utilities-border-subtle
178
+ ),
144
179
  "border-width": (
145
- css-var: true,
146
- css-variable-name: border-width,
180
+ property: border-width,
147
181
  class: border,
148
182
  values: $border-widths
149
183
  ),
@@ -450,6 +484,18 @@ $utilities: map-merge(
450
484
  class: gap,
451
485
  values: $spacers
452
486
  ),
487
+ "row-gap": (
488
+ responsive: true,
489
+ property: row-gap,
490
+ class: row-gap,
491
+ values: $spacers
492
+ ),
493
+ "column-gap": (
494
+ responsive: true,
495
+ property: column-gap,
496
+ class: column-gap,
497
+ values: $spacers
498
+ ),
453
499
  // scss-docs-end utils-spacing
454
500
  // Text
455
501
  // scss-docs-start utils-text
@@ -473,11 +519,12 @@ $utilities: map-merge(
473
519
  property: font-weight,
474
520
  class: fw,
475
521
  values: (
476
- light: $font-weight-light,
477
522
  lighter: $font-weight-lighter,
523
+ light: $font-weight-light,
478
524
  normal: $font-weight-normal,
479
- bold: $font-weight-bold,
525
+ medium: $font-weight-medium,
480
526
  semibold: $font-weight-semibold,
527
+ bold: $font-weight-bold,
481
528
  bolder: $font-weight-bolder
482
529
  )
483
530
  ),
@@ -535,9 +582,12 @@ $utilities: map-merge(
535
582
  values: map-merge(
536
583
  $utilities-text-colors,
537
584
  (
538
- "muted": $text-muted,
585
+ "muted": var(--#{$prefix}secondary-color), // deprecated
539
586
  "black-50": rgba($black, .5), // deprecated
540
587
  "white-50": rgba($white, .5), // deprecated
588
+ "body-secondary": var(--#{$prefix}secondary-color),
589
+ "body-tertiary": var(--#{$prefix}tertiary-color),
590
+ "body-emphasis": var(--#{$prefix}emphasis-color),
541
591
  "reset": inherit,
542
592
  )
543
593
  )
@@ -552,7 +602,62 @@ $utilities: map-merge(
552
602
  100: 1
553
603
  )
554
604
  ),
605
+ "text-color": (
606
+ property: color,
607
+ class: text,
608
+ values: $utilities-text-emphasis-colors
609
+ ),
555
610
  // scss-docs-end utils-color
611
+ // scss-docs-start utils-links
612
+ "link-opacity": (
613
+ css-var: true,
614
+ class: link-opacity,
615
+ state: hover,
616
+ values: (
617
+ 10: .1,
618
+ 25: .25,
619
+ 50: .5,
620
+ 75: .75,
621
+ 100: 1
622
+ )
623
+ ),
624
+ "link-offset": (
625
+ property: text-underline-offset,
626
+ class: link-offset,
627
+ state: hover,
628
+ values: (
629
+ 1: .125em,
630
+ 2: .25em,
631
+ 3: .375em,
632
+ )
633
+ ),
634
+ "link-underline": (
635
+ property: text-decoration-color,
636
+ class: link-underline,
637
+ local-vars: (
638
+ "link-underline-opacity": 1
639
+ ),
640
+ values: map-merge(
641
+ $utilities-links-underline,
642
+ (
643
+ null: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-underline-opacity, 1)),
644
+ )
645
+ )
646
+ ),
647
+ "link-underline-opacity": (
648
+ css-var: true,
649
+ class: link-underline-opacity,
650
+ state: hover,
651
+ values: (
652
+ 0: 0,
653
+ 10: .1,
654
+ 25: .25,
655
+ 50: .5,
656
+ 75: .75,
657
+ 100: 1
658
+ ),
659
+ ),
660
+ // scss-docs-end utils-links
556
661
  // scss-docs-start utils-bg-color
557
662
  "background-color": (
558
663
  property: background-color,
@@ -563,7 +668,9 @@ $utilities: map-merge(
563
668
  values: map-merge(
564
669
  $utilities-bg-colors,
565
670
  (
566
- "transparent": transparent
671
+ "transparent": transparent,
672
+ "body-secondary": rgba(var(--#{$prefix}secondary-bg-rgb), var(--#{$prefix}bg-opacity)),
673
+ "body-tertiary": rgba(var(--#{$prefix}tertiary-bg-rgb), var(--#{$prefix}bg-opacity)),
567
674
  )
568
675
  )
569
676
  ),
@@ -578,6 +685,11 @@ $utilities: map-merge(
578
685
  100: 1
579
686
  )
580
687
  ),
688
+ "subtle-background-color": (
689
+ property: background-color,
690
+ class: bg,
691
+ values: $utilities-bg-subtle
692
+ ),
581
693
  // scss-docs-end utils-bg-color
582
694
  "gradient": (
583
695
  property: background-image,
@@ -606,7 +718,7 @@ $utilities: map-merge(
606
718
  2: var(--#{$prefix}border-radius),
607
719
  3: var(--#{$prefix}border-radius-lg),
608
720
  4: var(--#{$prefix}border-radius-xl),
609
- 5: var(--#{$prefix}border-radius-2xl),
721
+ 5: var(--#{$prefix}border-radius-xxl),
610
722
  circle: 50%,
611
723
  pill: var(--#{$prefix}border-radius-pill)
612
724
  )
@@ -614,22 +726,62 @@ $utilities: map-merge(
614
726
  "rounded-top": (
615
727
  property: border-top-left-radius border-top-right-radius,
616
728
  class: rounded-top,
617
- values: (null: var(--#{$prefix}border-radius))
729
+ values: (
730
+ null: var(--#{$prefix}border-radius),
731
+ 0: 0,
732
+ 1: var(--#{$prefix}border-radius-sm),
733
+ 2: var(--#{$prefix}border-radius),
734
+ 3: var(--#{$prefix}border-radius-lg),
735
+ 4: var(--#{$prefix}border-radius-xl),
736
+ 5: var(--#{$prefix}border-radius-xxl),
737
+ circle: 50%,
738
+ pill: var(--#{$prefix}border-radius-pill)
739
+ )
618
740
  ),
619
741
  "rounded-end": (
620
742
  property: border-top-right-radius border-bottom-right-radius,
621
743
  class: rounded-end,
622
- values: (null: var(--#{$prefix}border-radius))
744
+ values: (
745
+ null: var(--#{$prefix}border-radius),
746
+ 0: 0,
747
+ 1: var(--#{$prefix}border-radius-sm),
748
+ 2: var(--#{$prefix}border-radius),
749
+ 3: var(--#{$prefix}border-radius-lg),
750
+ 4: var(--#{$prefix}border-radius-xl),
751
+ 5: var(--#{$prefix}border-radius-xxl),
752
+ circle: 50%,
753
+ pill: var(--#{$prefix}border-radius-pill)
754
+ )
623
755
  ),
624
756
  "rounded-bottom": (
625
757
  property: border-bottom-right-radius border-bottom-left-radius,
626
758
  class: rounded-bottom,
627
- values: (null: var(--#{$prefix}border-radius))
759
+ values: (
760
+ null: var(--#{$prefix}border-radius),
761
+ 0: 0,
762
+ 1: var(--#{$prefix}border-radius-sm),
763
+ 2: var(--#{$prefix}border-radius),
764
+ 3: var(--#{$prefix}border-radius-lg),
765
+ 4: var(--#{$prefix}border-radius-xl),
766
+ 5: var(--#{$prefix}border-radius-xxl),
767
+ circle: 50%,
768
+ pill: var(--#{$prefix}border-radius-pill)
769
+ )
628
770
  ),
629
771
  "rounded-start": (
630
772
  property: border-bottom-left-radius border-top-left-radius,
631
773
  class: rounded-start,
632
- values: (null: var(--#{$prefix}border-radius))
774
+ values: (
775
+ null: var(--#{$prefix}border-radius),
776
+ 0: 0,
777
+ 1: var(--#{$prefix}border-radius-sm),
778
+ 2: var(--#{$prefix}border-radius),
779
+ 3: var(--#{$prefix}border-radius-lg),
780
+ 4: var(--#{$prefix}border-radius-xl),
781
+ 5: var(--#{$prefix}border-radius-xxl),
782
+ circle: 50%,
783
+ pill: var(--#{$prefix}border-radius-pill)
784
+ )
633
785
  ),
634
786
  // scss-docs-end utils-border-radius
635
787
  // scss-docs-start utils-visibility
@@ -640,8 +792,15 @@ $utilities: map-merge(
640
792
  visible: visible,
641
793
  invisible: hidden,
642
794
  )
643
- )
795
+ ),
644
796
  // scss-docs-end utils-visibility
797
+ // scss-docs-start utils-zindex
798
+ "z-index": (
799
+ property: z-index,
800
+ class: z,
801
+ values: $zindex-levels,
802
+ )
803
+ // scss-docs-end utils-zindex
645
804
  ),
646
805
  $utilities
647
806
  );
@@ -0,0 +1,85 @@
1
+ // Dark color mode variables
2
+ //
3
+ // Custom variables for the `[data-bs-theme="dark"]` theme. Use this as a starting point for your own custom color modes by creating a new theme-specific file like `_variables-dark.scss` and adding the variables you need.
4
+
5
+ //
6
+ // Global colors
7
+ //
8
+
9
+ // scss-docs-start sass-dark-mode-vars
10
+ // scss-docs-start theme-text-dark-variables
11
+ $primary-text-emphasis-dark: tint-color($primary, 40%) !default;
12
+ $secondary-text-emphasis-dark: tint-color($secondary, 40%) !default;
13
+ $success-text-emphasis-dark: tint-color($success, 40%) !default;
14
+ $info-text-emphasis-dark: tint-color($info, 40%) !default;
15
+ $warning-text-emphasis-dark: tint-color($warning, 40%) !default;
16
+ $danger-text-emphasis-dark: tint-color($danger, 40%) !default;
17
+ $light-text-emphasis-dark: $gray-100 !default;
18
+ $dark-text-emphasis-dark: $gray-300 !default;
19
+ // scss-docs-end theme-text-dark-variables
20
+
21
+ // scss-docs-start theme-bg-subtle-dark-variables
22
+ $primary-bg-subtle-dark: shade-color($primary, 80%) !default;
23
+ $secondary-bg-subtle-dark: shade-color($secondary, 80%) !default;
24
+ $success-bg-subtle-dark: shade-color($success, 80%) !default;
25
+ $info-bg-subtle-dark: shade-color($info, 80%) !default;
26
+ $warning-bg-subtle-dark: shade-color($warning, 80%) !default;
27
+ $danger-bg-subtle-dark: shade-color($danger, 80%) !default;
28
+ $light-bg-subtle-dark: $gray-800 !default;
29
+ $dark-bg-subtle-dark: mix($gray-800, $black) !default;
30
+ // scss-docs-end theme-bg-subtle-dark-variables
31
+
32
+ // scss-docs-start theme-border-subtle-dark-variables
33
+ $primary-border-subtle-dark: shade-color($primary, 40%) !default;
34
+ $secondary-border-subtle-dark: shade-color($secondary, 40%) !default;
35
+ $success-border-subtle-dark: shade-color($success, 40%) !default;
36
+ $info-border-subtle-dark: shade-color($info, 40%) !default;
37
+ $warning-border-subtle-dark: shade-color($warning, 40%) !default;
38
+ $danger-border-subtle-dark: shade-color($danger, 40%) !default;
39
+ $light-border-subtle-dark: $gray-700 !default;
40
+ $dark-border-subtle-dark: $gray-800 !default;
41
+ // scss-docs-end theme-border-subtle-dark-variables
42
+
43
+ $body-color-dark: $gray-500 !default;
44
+ $body-bg-dark: $gray-900 !default;
45
+ $body-secondary-color-dark: rgba($body-color-dark, .75) !default;
46
+ $body-secondary-bg-dark: $gray-800 !default;
47
+ $body-tertiary-color-dark: rgba($body-color-dark, .5) !default;
48
+ $body-tertiary-bg-dark: mix($gray-800, $gray-900, 50%) !default;
49
+ $body-emphasis-color-dark: $white !default;
50
+ $border-color-dark: $gray-700 !default;
51
+ $border-color-translucent-dark: rgba($white, .15) !default;
52
+ $headings-color-dark: null !default;
53
+ $link-color-dark: tint-color($primary, 40%) !default;
54
+ $link-hover-color-dark: shift-color($link-color-dark, -$link-shade-percentage) !default;
55
+ $code-color-dark: tint-color($code-color, 40%) !default;
56
+
57
+
58
+ //
59
+ // Forms
60
+ //
61
+
62
+ $form-select-indicator-color-dark: $body-color-dark !default;
63
+ $form-select-indicator-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-select-indicator-color-dark}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>") !default;
64
+
65
+ $form-switch-color-dark: rgba($white, .25) !default;
66
+ $form-switch-bg-image-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color-dark}'/></svg>") !default;
67
+
68
+ // scss-docs-start form-validation-colors-dark
69
+ $form-valid-color-dark: $green-300 !default;
70
+ $form-valid-border-color-dark: $green-300 !default;
71
+ $form-invalid-color-dark: $red-300 !default;
72
+ $form-invalid-border-color-dark: $red-300 !default;
73
+ // scss-docs-end form-validation-colors-dark
74
+
75
+
76
+ //
77
+ // Accordion
78
+ //
79
+
80
+ $accordion-icon-color-dark: $primary-text-emphasis-dark !default;
81
+ $accordion-icon-active-color-dark: $primary-text-emphasis-dark !default;
82
+
83
+ $accordion-button-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color-dark}'><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;
84
+ $accordion-button-active-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color-dark}'><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;
85
+ // scss-docs-end sass-dark-mode-vars