@coreui/coreui 5.1.2 → 5.3.0

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 (298) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +4 -4
  3. package/dist/css/coreui-grid.css +462 -235
  4. package/dist/css/coreui-grid.css.map +1 -1
  5. package/dist/css/coreui-grid.min.css +3 -3
  6. package/dist/css/coreui-grid.min.css.map +1 -1
  7. package/dist/css/coreui-grid.rtl.css +235 -235
  8. package/dist/css/coreui-grid.rtl.css.map +1 -1
  9. package/dist/css/coreui-grid.rtl.min.css +3 -3
  10. package/dist/css/coreui-grid.rtl.min.css.map +1 -1
  11. package/dist/css/coreui-reboot.css +56 -49
  12. package/dist/css/coreui-reboot.css.map +1 -1
  13. package/dist/css/coreui-reboot.min.css +3 -3
  14. package/dist/css/coreui-reboot.min.css.map +1 -1
  15. package/dist/css/coreui-reboot.rtl.css +54 -49
  16. package/dist/css/coreui-reboot.rtl.css.map +1 -1
  17. package/dist/css/coreui-reboot.rtl.min.css +3 -3
  18. package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
  19. package/dist/css/coreui-utilities.css +531 -371
  20. package/dist/css/coreui-utilities.css.map +1 -1
  21. package/dist/css/coreui-utilities.min.css +3 -3
  22. package/dist/css/coreui-utilities.min.css.map +1 -1
  23. package/dist/css/coreui-utilities.rtl.css +353 -353
  24. package/dist/css/coreui-utilities.rtl.css.map +1 -1
  25. package/dist/css/coreui-utilities.rtl.min.css +3 -3
  26. package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
  27. package/dist/css/coreui.css +1554 -1199
  28. package/dist/css/coreui.css.map +1 -1
  29. package/dist/css/coreui.min.css +3 -3
  30. package/dist/css/coreui.min.css.map +1 -1
  31. package/dist/css/coreui.rtl.css +1212 -1180
  32. package/dist/css/coreui.rtl.css.map +1 -1
  33. package/dist/css/coreui.rtl.min.css +3 -3
  34. package/dist/css/coreui.rtl.min.css.map +1 -1
  35. package/dist/css/themes/bootstrap/bootstrap.css +6027 -5264
  36. package/dist/css/themes/bootstrap/bootstrap.css.map +1 -1
  37. package/dist/css/themes/bootstrap/bootstrap.min.css +3 -7
  38. package/dist/css/themes/bootstrap/bootstrap.min.css.map +1 -1
  39. package/dist/css/themes/bootstrap/bootstrap.rtl.css +5651 -5388
  40. package/dist/css/themes/bootstrap/bootstrap.rtl.css.map +1 -1
  41. package/dist/css/themes/bootstrap/bootstrap.rtl.min.css +3 -7
  42. package/dist/css/themes/bootstrap/bootstrap.rtl.min.css.map +1 -1
  43. package/dist/js/bootstrap.bundle.js +37 -40
  44. package/dist/js/bootstrap.bundle.js.map +1 -1
  45. package/dist/js/bootstrap.bundle.min.js +3 -3
  46. package/dist/js/bootstrap.bundle.min.js.map +1 -1
  47. package/dist/js/bootstrap.esm.js +53 -54
  48. package/dist/js/bootstrap.esm.js.map +1 -1
  49. package/dist/js/bootstrap.esm.min.js +3 -3
  50. package/dist/js/bootstrap.esm.min.js.map +1 -1
  51. package/dist/js/bootstrap.js +53 -54
  52. package/dist/js/bootstrap.js.map +1 -1
  53. package/dist/js/bootstrap.min.js +3 -3
  54. package/dist/js/bootstrap.min.js.map +1 -1
  55. package/dist/js/coreui.bundle.js +4 -7
  56. package/dist/js/coreui.bundle.js.map +1 -1
  57. package/dist/js/coreui.bundle.min.js +3 -3
  58. package/dist/js/coreui.bundle.min.js.map +1 -1
  59. package/dist/js/coreui.esm.js +4 -5
  60. package/dist/js/coreui.esm.js.map +1 -1
  61. package/dist/js/coreui.esm.min.js +3 -3
  62. package/dist/js/coreui.esm.min.js.map +1 -1
  63. package/dist/js/coreui.js +4 -5
  64. package/dist/js/coreui.js.map +1 -1
  65. package/dist/js/coreui.min.js +3 -3
  66. package/dist/js/coreui.min.js.map +1 -1
  67. package/js/dist/alert.js +2 -2
  68. package/js/dist/alert.js.map +1 -1
  69. package/js/dist/base-component.js +3 -3
  70. package/js/dist/base-component.js.map +1 -1
  71. package/js/dist/button.js +2 -2
  72. package/js/dist/button.js.map +1 -1
  73. package/js/dist/carousel.js +2 -2
  74. package/js/dist/carousel.js.map +1 -1
  75. package/js/dist/collapse.js +2 -2
  76. package/js/dist/collapse.js.map +1 -1
  77. package/js/dist/dom/data.js +2 -2
  78. package/js/dist/dom/data.js.map +1 -1
  79. package/js/dist/dom/event-handler.js +2 -2
  80. package/js/dist/dom/event-handler.js.map +1 -1
  81. package/js/dist/dom/manipulator.js +2 -2
  82. package/js/dist/dom/manipulator.js.map +1 -1
  83. package/js/dist/dom/selector-engine.js +2 -2
  84. package/js/dist/dom/selector-engine.js.map +1 -1
  85. package/js/dist/dropdown.js +2 -2
  86. package/js/dist/dropdown.js.map +1 -1
  87. package/js/dist/modal.js +2 -2
  88. package/js/dist/modal.js.map +1 -1
  89. package/js/dist/navigation.js +3 -3
  90. package/js/dist/navigation.js.map +1 -1
  91. package/js/dist/offcanvas.js +2 -2
  92. package/js/dist/offcanvas.js.map +1 -1
  93. package/js/dist/popover.js +2 -2
  94. package/js/dist/popover.js.map +1 -1
  95. package/js/dist/scrollspy.js +2 -2
  96. package/js/dist/scrollspy.js.map +1 -1
  97. package/js/dist/sidebar.js +2 -2
  98. package/js/dist/sidebar.js.map +1 -1
  99. package/js/dist/tab.js +2 -2
  100. package/js/dist/tab.js.map +1 -1
  101. package/js/dist/toast.js +2 -2
  102. package/js/dist/toast.js.map +1 -1
  103. package/js/dist/tooltip.js +2 -2
  104. package/js/dist/tooltip.js.map +1 -1
  105. package/js/dist/util/backdrop.js +2 -2
  106. package/js/dist/util/backdrop.js.map +1 -1
  107. package/js/dist/util/component-functions.js +2 -2
  108. package/js/dist/util/component-functions.js.map +1 -1
  109. package/js/dist/util/config.js +2 -2
  110. package/js/dist/util/config.js.map +1 -1
  111. package/js/dist/util/focustrap.js +2 -2
  112. package/js/dist/util/focustrap.js.map +1 -1
  113. package/js/dist/util/index.js +2 -2
  114. package/js/dist/util/index.js.map +1 -1
  115. package/js/dist/util/sanitizer.js +2 -3
  116. package/js/dist/util/sanitizer.js.map +1 -1
  117. package/js/dist/util/scrollbar.js +2 -2
  118. package/js/dist/util/scrollbar.js.map +1 -1
  119. package/js/dist/util/swipe.js +2 -2
  120. package/js/dist/util/swipe.js.map +1 -1
  121. package/js/dist/util/template-factory.js +2 -2
  122. package/js/dist/util/template-factory.js.map +1 -1
  123. package/js/src/base-component.js +1 -1
  124. package/js/src/navigation.js +1 -1
  125. package/js/src/util/sanitizer.js +0 -1
  126. package/package.json +31 -34
  127. package/scss/_accordion.import.scss +1 -0
  128. package/scss/_accordion.scss +10 -2
  129. package/scss/_alert.import.scss +1 -0
  130. package/scss/_alert.scss +7 -3
  131. package/scss/_avatar.import.scss +1 -0
  132. package/scss/_avatar.scss +13 -8
  133. package/scss/_badge.import.scss +1 -0
  134. package/scss/_badge.scss +4 -0
  135. package/scss/_banner.scss +7 -0
  136. package/scss/_breadcrumb.import.scss +1 -0
  137. package/scss/_breadcrumb.scss +9 -3
  138. package/scss/_button-group.import.scss +1 -0
  139. package/scss/_button-group.scss +7 -3
  140. package/scss/_buttons.import.scss +1 -0
  141. package/scss/_buttons.scss +49 -18
  142. package/scss/_callout.import.scss +1 -0
  143. package/scss/_callout.scss +5 -2
  144. package/scss/_card.import.scss +1 -0
  145. package/scss/_card.scss +9 -5
  146. package/scss/_carousel.import.scss +1 -0
  147. package/scss/_carousel.scss +9 -3
  148. package/scss/_close.import.scss +1 -0
  149. package/scss/_close.scss +6 -1
  150. package/scss/_containers.import.scss +1 -0
  151. package/scss/_containers.scss +4 -0
  152. package/scss/_dropdown.import.scss +1 -0
  153. package/scss/_dropdown.scss +30 -21
  154. package/scss/_footer.import.scss +1 -0
  155. package/scss/_footer.scss +2 -0
  156. package/scss/_forms.import.scss +9 -0
  157. package/scss/_forms.scss +9 -9
  158. package/scss/_functions.import.scss +1 -0
  159. package/scss/_functions.scss +11 -366
  160. package/scss/_grid.import.scss +1 -0
  161. package/scss/_grid.scss +23 -1
  162. package/scss/_header.import.scss +1 -0
  163. package/scss/_header.scss +9 -2
  164. package/scss/_helpers.import.scss +1 -0
  165. package/scss/_helpers.scss +12 -12
  166. package/scss/_icon.import.scss +1 -0
  167. package/scss/_icon.scss +3 -0
  168. package/scss/_images.import.scss +1 -0
  169. package/scss/_images.scss +6 -0
  170. package/scss/_list-group.import.scss +1 -0
  171. package/scss/_list-group.scss +11 -6
  172. package/scss/_maps.import.scss +1 -0
  173. package/scss/_maps.scss +14 -7
  174. package/scss/_mixins.import.scss +1 -0
  175. package/scss/_mixins.scss +29 -29
  176. package/scss/_modal.import.scss +1 -0
  177. package/scss/_modal.scss +12 -3
  178. package/scss/_nav.import.scss +1 -0
  179. package/scss/_nav.scss +8 -2
  180. package/scss/_navbar.import.scss +1 -0
  181. package/scss/_navbar.scss +17 -5
  182. package/scss/_offcanvas.import.scss +1 -0
  183. package/scss/_offcanvas.scss +14 -7
  184. package/scss/_pagination.import.scss +1 -0
  185. package/scss/_pagination.scss +9 -1
  186. package/scss/_placeholders.import.scss +1 -0
  187. package/scss/_placeholders.scss +2 -0
  188. package/scss/_popover.import.scss +1 -0
  189. package/scss/_popover.scss +6 -0
  190. package/scss/_progress.import.scss +1 -0
  191. package/scss/_progress.scss +7 -0
  192. package/scss/_reboot.import.scss +1 -0
  193. package/scss/_reboot.scss +11 -7
  194. package/scss/_root.import.scss +1 -0
  195. package/scss/_root.scss +14 -5
  196. package/scss/_sidebar.import.scss +3 -0
  197. package/scss/_sidebar.scss +3 -3
  198. package/scss/_spinners.import.scss +1 -0
  199. package/scss/_spinners.scss +2 -0
  200. package/scss/_tables.import.scss +1 -0
  201. package/scss/_tables.scss +6 -1
  202. package/scss/_toasts.import.scss +1 -0
  203. package/scss/_toasts.scss +5 -2
  204. package/scss/_tooltip.import.scss +1 -0
  205. package/scss/_tooltip.scss +6 -0
  206. package/scss/_transitions.import.scss +1 -0
  207. package/scss/_transitions.scss +3 -0
  208. package/scss/_type.import.scss +1 -0
  209. package/scss/_type.scss +6 -1
  210. package/scss/_utilities.import.scss +1 -0
  211. package/scss/_utilities.scss +50 -63
  212. package/scss/_variables-dark.import.scss +1 -0
  213. package/scss/_variables-dark.scss +17 -36
  214. package/scss/_variables.import.scss +1 -0
  215. package/scss/_variables.scss +39 -35
  216. package/scss/coreui-grid.rtl.scss +4 -4
  217. package/scss/coreui-grid.scss +12 -21
  218. package/scss/coreui-reboot.rtl.scss +4 -4
  219. package/scss/coreui-reboot.scss +8 -9
  220. package/scss/coreui-utilities.rtl.scss +4 -4
  221. package/scss/coreui-utilities.scss +8 -11
  222. package/scss/coreui.rtl.scss +4 -4
  223. package/scss/coreui.scss +44 -47
  224. package/scss/forms/_floating-labels.import.scss +1 -0
  225. package/scss/forms/_floating-labels.scss +5 -1
  226. package/scss/forms/_form-check.import.scss +1 -0
  227. package/scss/forms/_form-check.scss +24 -20
  228. package/scss/forms/_form-control.import.scss +1 -0
  229. package/scss/forms/_form-control.scss +9 -1
  230. package/scss/forms/_form-range.import.scss +1 -0
  231. package/scss/forms/_form-range.scss +7 -0
  232. package/scss/forms/_form-select.import.scss +1 -0
  233. package/scss/forms/_form-select.scss +18 -5
  234. package/scss/forms/_form-text.import.scss +1 -0
  235. package/scss/forms/_form-text.scss +3 -0
  236. package/scss/forms/_input-group.import.scss +1 -0
  237. package/scss/forms/_input-group.scss +10 -4
  238. package/scss/forms/_labels.import.scss +1 -0
  239. package/scss/forms/_labels.scss +4 -0
  240. package/scss/forms/_validation.import.scss +1 -0
  241. package/scss/forms/_validation.scss +3 -0
  242. package/scss/functions/_assert-ascending.scss +19 -0
  243. package/scss/functions/_assert-starts-at-zero.scss +14 -0
  244. package/scss/functions/_color-contrast-variables.scss +24 -0
  245. package/scss/functions/_color-contrast.scss +27 -0
  246. package/scss/functions/_color.scss +18 -0
  247. package/scss/functions/_contrast-ratio.scss +35 -0
  248. package/scss/functions/_escape-svg.scss +22 -0
  249. package/scss/functions/_maps.scss +57 -0
  250. package/scss/functions/_math.scss +87 -0
  251. package/scss/functions/_rgba-css-var.scss +9 -0
  252. package/scss/functions/_str-replace.scss +19 -0
  253. package/scss/functions/_to-rgb.scss +5 -0
  254. package/scss/helpers/_clearfix.scss +2 -0
  255. package/scss/helpers/_color-bg.scss +9 -3
  256. package/scss/helpers/_colored-links.scss +13 -9
  257. package/scss/helpers/_focus-ring.scss +2 -0
  258. package/scss/helpers/_icon-link.scss +3 -0
  259. package/scss/helpers/_position.scss +5 -1
  260. package/scss/helpers/_ratio.scss +3 -1
  261. package/scss/helpers/_stretched-link.scss +2 -0
  262. package/scss/helpers/_text-truncation.scss +2 -0
  263. package/scss/helpers/_visually-hidden.scss +2 -0
  264. package/scss/helpers/_vr.scss +2 -0
  265. package/scss/mixins/_alert.scss +3 -0
  266. package/scss/mixins/_avatar.scss +3 -0
  267. package/scss/mixins/_backdrop.scss +2 -0
  268. package/scss/mixins/_border-radius.scss +15 -11
  269. package/scss/mixins/_box-shadow.scss +5 -2
  270. package/scss/mixins/_breakpoints.scss +82 -5
  271. package/scss/mixins/_buttons.scss +54 -50
  272. package/scss/mixins/_caret.scss +5 -3
  273. package/scss/mixins/_color-mode.scss +3 -1
  274. package/scss/mixins/_container.scss +2 -0
  275. package/scss/mixins/_deprecate.scss +2 -0
  276. package/scss/mixins/_forms.scss +12 -5
  277. package/scss/mixins/_gradients.scss +2 -0
  278. package/scss/mixins/_grid.scss +77 -8
  279. package/scss/mixins/_list-group.scss +6 -3
  280. package/scss/mixins/_lists.scss +1 -1
  281. package/scss/mixins/_ltr-rtl.scss +48 -17
  282. package/scss/mixins/_pagination.scss +3 -0
  283. package/scss/mixins/_reset-text.scss +2 -1
  284. package/scss/mixins/_table-variants.scss +10 -4
  285. package/scss/mixins/_transition.scss +7 -4
  286. package/scss/mixins/_utilities.import.scss +1 -0
  287. package/scss/mixins/_utilities.scss +30 -17
  288. package/scss/sidebar/_sidebar-narrow.scss +24 -45
  289. package/scss/sidebar/_sidebar-nav.scss +11 -6
  290. package/scss/sidebar/_sidebar.scss +80 -106
  291. package/scss/themes/bootstrap/bootstrap.rtl.scss +4 -24
  292. package/scss/themes/bootstrap/bootstrap.scss +120 -16
  293. package/scss/utilities/_api.import.scss +1 -0
  294. package/scss/utilities/_api.scss +14 -6
  295. package/scss/vendor/_rfs.scss +33 -27
  296. package/scss/mixins/_banner.scss +0 -7
  297. package/scss/themes/bootstrap/_variables.scss +0 -2
  298. package/scss/themes/bootstrap/mixins/_banner.scss +0 -7
@@ -0,0 +1,57 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+ @use "sass:meta";
4
+ @use "color" as *;
5
+ @use "rgba-css-var" as *;
6
+ @use "to-rgb" as *;
7
+ @use "../variables" as *;
8
+
9
+ // stylelint-disable scss/dollar-variable-pattern
10
+ @function map-loop($map, $func, $args...) {
11
+ $_map: ();
12
+
13
+ @each $key, $value in $map {
14
+ // allow to pass the $key and $value of the map as an function argument
15
+ $_args: ();
16
+ @each $arg in $args {
17
+ $_args: list.append($_args, if($arg == "$prefix", $prefix, if($arg == "$key", $key, if($arg == "$value", $value, $arg))));
18
+ }
19
+
20
+ $_map: map.merge($_map, ($key: meta.call(meta.get-function($func), $_args...)));
21
+ }
22
+ @return $_map;
23
+ }
24
+ // stylelint-enable scss/dollar-variable-pattern
25
+
26
+ // Internal Bootstrap function to turn maps into its negative variant.
27
+ // It prefixes the keys with `n` and makes the value negative.
28
+ @function negativify-map($map) {
29
+ $result: ();
30
+ @each $key, $value in $map {
31
+ @if $key != 0 {
32
+ $result: map.merge($result, ("n" + $key: (-$value)));
33
+ }
34
+ }
35
+ @return $result;
36
+ }
37
+
38
+ // Get multiple keys from a sass map
39
+ @function map-get-multiple($map, $values) {
40
+ $result: ();
41
+ @each $key, $value in $map {
42
+ @if (list.index($values, $key) != null) {
43
+ $result: map.merge($result, ($key: $value));
44
+ }
45
+ }
46
+ @return $result;
47
+ }
48
+
49
+ // Merge multiple maps
50
+ @function map-merge-multiple($maps...) {
51
+ $merged-maps: ();
52
+
53
+ @each $map in $maps {
54
+ $merged-maps: map.merge($merged-maps, $map);
55
+ }
56
+ @return $merged-maps;
57
+ }
@@ -0,0 +1,87 @@
1
+ @use "sass:map";
2
+ @use "sass:math";
3
+ @use "sass:meta";
4
+ @use "sass:string";
5
+
6
+ // Return valid calc
7
+ @function add($value1, $value2, $return-calc: true) {
8
+ @if $value1 == null {
9
+ @return $value2;
10
+ }
11
+
12
+ @if $value2 == null {
13
+ @return $value1;
14
+ }
15
+
16
+ @if meta.type-of($value1) == number and meta.type-of($value2) == number and math.compatible($value1, $value2) {
17
+ @return $value1 + $value2;
18
+ }
19
+
20
+ @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + string.unquote(" + ") + $value2);
21
+ }
22
+
23
+ @function subtract($value1, $value2, $return-calc: true) {
24
+ @if $value1 == null and $value2 == null {
25
+ @return null;
26
+ }
27
+
28
+ @if $value1 == null {
29
+ @return -$value2;
30
+ }
31
+
32
+ @if $value2 == null {
33
+ @return $value1;
34
+ }
35
+
36
+ @if meta.type-of($value1) == number and meta.type-of($value2) == number and math.compatible($value1, $value2) {
37
+ @return $value1 - $value2;
38
+ }
39
+
40
+ @if meta.type-of($value2) != number {
41
+ $value2: string.unquote("(") + $value2 + string.unquote(")");
42
+ }
43
+
44
+ @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + string.unquote(" - ") + $value2);
45
+ }
46
+
47
+ @function divide($dividend, $divisor, $precision: 10) {
48
+ $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
49
+ $dividend: abs($dividend);
50
+ $divisor: abs($divisor);
51
+ @if $dividend == 0 {
52
+ @return 0;
53
+ }
54
+ @if $divisor == 0 {
55
+ @error "Cannot divide by 0";
56
+ }
57
+ $remainder: $dividend;
58
+ $result: 0;
59
+ $factor: 10;
60
+ @while ($remainder > 0 and $precision >= 0) {
61
+ $quotient: 0;
62
+ @while ($remainder >= $divisor) {
63
+ $remainder: $remainder - $divisor;
64
+ $quotient: $quotient + 1;
65
+ }
66
+ $result: $result * 10 + $quotient;
67
+ $factor: $factor * .1;
68
+ $remainder: $remainder * 10;
69
+ $precision: $precision - 1;
70
+ @if ($precision < 0 and $remainder >= $divisor * 5) {
71
+ $result: $result + 1;
72
+ }
73
+ }
74
+ $result: $result * $factor * $sign;
75
+ $dividend-unit: math.unit($dividend);
76
+ $divisor-unit: math.unit($divisor);
77
+ $unit-map: (
78
+ "px": 1px,
79
+ "rem": 1rem,
80
+ "em": 1em,
81
+ "%": 1%
82
+ );
83
+ @if ($dividend-unit != $divisor-unit and map.has-key($unit-map, $dividend-unit)) {
84
+ $result: $result * map.get($unit-map, $dividend-unit);
85
+ }
86
+ @return $result;
87
+ }
@@ -0,0 +1,9 @@
1
+ @function rgba-css-var($prefix, $identifier, $target) {
2
+ @if $identifier == "body" and $target == "bg" {
3
+ @return rgba(var(--#{$prefix}#{$identifier}-bg-rgb), var(--#{$prefix}#{$target}-opacity));
4
+ } @if $identifier == "body" and $target == "text" {
5
+ @return rgba(var(--#{$prefix}#{$identifier}-color-rgb), var(--#{$prefix}#{$target}-opacity));
6
+ } @else {
7
+ @return rgba(var(--#{$prefix}#{$identifier}-rgb), var(--#{$prefix}#{$target}-opacity));
8
+ }
9
+ }
@@ -0,0 +1,19 @@
1
+ @use "sass:string";
2
+
3
+ // Replace `$search` with `$replace` in `$string`
4
+ // Used on our SVG icon backgrounds for custom forms.
5
+ //
6
+ // @author Kitty Giraudel
7
+ // @param {String} $string - Initial string
8
+ // @param {String} $search - Substring to replace
9
+ // @param {String} $replace ('') - New value
10
+ // @return {String} - Updated string
11
+ @function str-replace($string, $search, $replace: "") {
12
+ $index: string.index($string, $search);
13
+
14
+ @if $index {
15
+ @return string.slice($string, 1, $index - 1) + $replace + str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
16
+ }
17
+
18
+ @return $string;
19
+ }
@@ -0,0 +1,5 @@
1
+ @use "sass:color";
2
+
3
+ @function to-rgb($value) {
4
+ @return color.channel($value, "red", $space: rgb), color.channel($value, "green", $space: rgb), color.channel($value, "blue", $space: rgb);
5
+ }
@@ -1,3 +1,5 @@
1
+ @use "../mixins/clearfix" as *;
2
+
1
3
  .clearfix {
2
4
  @include clearfix();
3
5
  }
@@ -1,8 +1,14 @@
1
- // All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
1
+ @use "../functions/color" as *;
2
+ @use "../functions/color-contrast" as *;
3
+ @use "../functions/to-rgb" as *;
4
+ @use "../mixins/color-mode" as *;
5
+ @use "../variables" as *;
6
+ @use "../variables-dark" as *;
7
+
2
8
  @each $color, $value in $theme-colors {
3
9
  .text-bg-#{$color} {
4
10
  color: color-contrast($value) if($enable-important-utilities, !important, null);
5
- background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
11
+ background-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
6
12
  }
7
13
  }
8
14
 
@@ -12,7 +18,7 @@
12
18
  $color-rgb: to-rgb($value);
13
19
  .text-bg-#{$color} {
14
20
  color: color-contrast($value) if($enable-important-utilities, !important, null);
15
- background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
21
+ background-color: rgba($color-rgb, var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
16
22
  }
17
23
  }
18
24
  }
@@ -1,15 +1,19 @@
1
- // All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
1
+ @use "../functions/color" as *;
2
+ @use "../functions/color-contrast" as *;
3
+ @use "../functions/to-rgb" as *;
4
+ @use "../variables" as *;
5
+
2
6
  @each $color, $value in $theme-colors {
3
7
  .link-#{$color} {
4
- color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
5
- text-decoration-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
8
+ color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
9
+ text-decoration-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
6
10
 
7
11
  @if $link-shade-percentage != 0 {
8
12
  &:hover,
9
13
  &:focus {
10
14
  $hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
11
- color: RGBA(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
12
- text-decoration-color: RGBA(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
15
+ color: rgba(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
16
+ text-decoration-color: rgba(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
13
17
  }
14
18
  }
15
19
  }
@@ -17,14 +21,14 @@
17
21
 
18
22
  // One-off special link helper as a bridge until v6
19
23
  .link-body-emphasis {
20
- color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
21
- text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
24
+ color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
25
+ text-decoration-color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
22
26
 
23
27
  @if $link-shade-percentage != 0 {
24
28
  &:hover,
25
29
  &:focus {
26
- color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if($enable-important-utilities, !important, null);
27
- text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if($enable-important-utilities, !important, null);
30
+ color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if($enable-important-utilities, !important, null);
31
+ text-decoration-color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if($enable-important-utilities, !important, null);
28
32
  }
29
33
  }
30
34
  }
@@ -1,3 +1,5 @@
1
+ @use "../variables" as *;
2
+
1
3
  .focus-ring:focus {
2
4
  outline: 0;
3
5
  // By default, there is no `--cui-focus-ring-x`, `--cui-focus-ring-y`, or `--cui-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
@@ -1,3 +1,6 @@
1
+ @use "../mixins/transition" as *;
2
+ @use "../variables" as *;
3
+
1
4
  .icon-link {
2
5
  display: inline-flex;
3
6
  gap: $icon-link-gap;
@@ -1,3 +1,7 @@
1
+ @use "sass:map";
2
+ @use "../mixins/breakpoints" as *;
3
+ @use "../variables" as *;
4
+
1
5
  // Shorthand
2
6
 
3
7
  .fixed-top {
@@ -17,7 +21,7 @@
17
21
  }
18
22
 
19
23
  // Responsive sticky top and bottom
20
- @each $breakpoint in map-keys($grid-breakpoints) {
24
+ @each $breakpoint in map.keys($grid-breakpoints) {
21
25
  @include media-breakpoint-up($breakpoint) {
22
26
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
23
27
 
@@ -1,3 +1,5 @@
1
+ @use "../variables" as *;
2
+
1
3
  // Credit: Nicolas Gallagher and SUIT CSS.
2
4
 
3
5
  .ratio {
@@ -12,8 +14,8 @@
12
14
 
13
15
  > * {
14
16
  position: absolute;
17
+ inset-inline-start: 0;
15
18
  top: 0;
16
- @include ltr-rtl("left", 0);
17
19
  width: 100%;
18
20
  height: 100%;
19
21
  }
@@ -1,3 +1,5 @@
1
+ @use "../variables" as *;
2
+
1
3
  //
2
4
  // Stretched link
3
5
  //
@@ -1,3 +1,5 @@
1
+ @use "../mixins/text-truncate" as *;
2
+
1
3
  //
2
4
  // Text truncation
3
5
  //
@@ -1,3 +1,5 @@
1
+ @use "../mixins/visually-hidden" as *;
2
+
1
3
  //
2
4
  // Visually hidden
3
5
  //
@@ -1,3 +1,5 @@
1
+ @use "../variables" as *;
2
+
1
3
  .vr {
2
4
  display: inline-block;
3
5
  align-self: stretch;
@@ -1,3 +1,6 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins/deprecate" as *;
3
+
1
4
  @include deprecate("`alert-variant()`", "v4.3.0", "v6.0.0");
2
5
 
3
6
  // scss-docs-start alert-variant-mixin
@@ -1,3 +1,6 @@
1
+ @use "../variables" as *;
2
+ @use "../mixins/deprecate" as *;
3
+
1
4
  @include deprecate("`avatar()`", "v5.1.0", "v6.0.0");
2
5
 
3
6
  @mixin avatar($width) {
@@ -1,3 +1,5 @@
1
+ @use "../variables" as *;
2
+
1
3
  // Shared between modals and offcanvases
2
4
  @mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
3
5
  position: fixed;
@@ -1,14 +1,18 @@
1
1
  // stylelint-disable property-disallowed-list
2
+ @use "sass:list";
3
+ @use "sass:meta";
4
+ @use "../variables" as *;
5
+
2
6
  // Single side border-radius
3
7
 
4
8
  // Helper function to replace negative values with 0
5
9
  @function valid-radius($radius) {
6
10
  $return: ();
7
11
  @each $value in $radius {
8
- @if type-of($value) == number {
9
- $return: append($return, max($value, 0));
12
+ @if meta.type-of($value) == number {
13
+ $return: list.append($return, max($value, 0));
10
14
  } @else {
11
- $return: append($return, $value);
15
+ $return: list.append($return, $value);
12
16
  }
13
17
  }
14
18
  @return $return;
@@ -33,8 +37,8 @@
33
37
 
34
38
  @mixin border-end-radius($radius: $border-radius) {
35
39
  @if $enable-rounded {
36
- @include ltr-rtl("border-top-right-radius", valid-radius($radius));
37
- @include ltr-rtl("border-bottom-right-radius", valid-radius($radius));
40
+ border-start-end-radius: valid-radius($radius);
41
+ border-end-end-radius: valid-radius($radius);
38
42
  }
39
43
  }
40
44
 
@@ -47,32 +51,32 @@
47
51
 
48
52
  @mixin border-start-radius($radius: $border-radius) {
49
53
  @if $enable-rounded {
50
- @include ltr-rtl("border-top-left-radius", valid-radius($radius));
51
- @include ltr-rtl("border-bottom-left-radius", valid-radius($radius));
54
+ border-start-start-radius: valid-radius($radius);
55
+ border-end-start-radius: valid-radius($radius);
52
56
  }
53
57
  }
54
58
 
55
59
  @mixin border-top-start-radius($radius: $border-radius) {
56
60
  @if $enable-rounded {
57
- border-top-left-radius: valid-radius($radius);
61
+ border-start-start-radius: valid-radius($radius);
58
62
  }
59
63
  }
60
64
 
61
65
  @mixin border-top-end-radius($radius: $border-radius) {
62
66
  @if $enable-rounded {
63
- @include ltr-rtl("border-top-right-radius", valid-radius($radius));
67
+ border-start-end-radius: valid-radius($radius);
64
68
  }
65
69
  }
66
70
 
67
71
  @mixin border-bottom-end-radius($radius: $border-radius) {
68
72
  @if $enable-rounded {
69
- @include ltr-rtl("border-bottom-right-radius", valid-radius($radius));
73
+ border-end-end-radius: valid-radius($radius);
70
74
  }
71
75
  }
72
76
 
73
77
  @mixin border-bottom-start-radius($radius: $border-radius) {
74
78
  @if $enable-rounded {
75
- @include ltr-rtl("border-bottom-left-radius", valid-radius($radius));
79
+ border-end-start-radius: valid-radius($radius);
76
80
  }
77
81
  }
78
82
  // scss-docs-end border-radius-mixins
@@ -1,12 +1,15 @@
1
+ @use "sass:list";
2
+ @use "../variables" as *;
3
+
1
4
  @mixin box-shadow($shadow...) {
2
5
  @if $enable-shadows {
3
6
  $result: ();
4
7
 
5
8
  @each $value in $shadow {
6
9
  @if $value != null {
7
- $result: append($result, $value, "comma");
10
+ $result: list.append($result, $value, "comma");
8
11
  }
9
- @if $value == none and length($shadow) > 1 {
12
+ @if $value == none and list.length($shadow) > 1 {
10
13
  @warn "The keyword 'none' must be used as a single argument.";
11
14
  }
12
15
  }
@@ -1,3 +1,7 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+ @use "../variables" as *;
4
+
1
5
  // Breakpoint viewport sizes and media queries.
2
6
  //
3
7
  // Breakpoints are defined as a map of (name: minimum width), order from small to large:
@@ -14,12 +18,12 @@
14
18
  // md
15
19
  // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))
16
20
  // md
17
- @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
18
- $n: index($breakpoint-names, $name);
21
+ @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map.keys($breakpoints)) {
22
+ $n: list.index($breakpoint-names, $name);
19
23
  @if not $n {
20
24
  @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
21
25
  }
22
- @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
26
+ @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
23
27
  }
24
28
 
25
29
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -27,7 +31,7 @@
27
31
  // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
28
32
  // 576px
29
33
  @function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
30
- $min: map-get($breakpoints, $name);
34
+ $min: map.get($breakpoints, $name);
31
35
  @return if($min != 0, $min, null);
32
36
  }
33
37
 
@@ -41,7 +45,7 @@
41
45
  // >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
42
46
  // 767.98px
43
47
  @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
44
- $max: map-get($breakpoints, $name);
48
+ $max: map.get($breakpoints, $name);
45
49
  @return if($max and $max > 0, $max - .02, null);
46
50
  }
47
51
 
@@ -125,3 +129,76 @@
125
129
  }
126
130
  }
127
131
  }
132
+
133
+ //
134
+ // Container query mixins
135
+ //
136
+
137
+ // Container query for applying styles when the container’s inline size is at least the breakpoint’s minimum width.
138
+ @mixin container-breakpoint-up($name, $breakpoints: $cq-grid-breakpoints) {
139
+ $min: breakpoint-min($name, $breakpoints);
140
+ @if $min {
141
+ @container (min-width: #{$min}) {
142
+ @content;
143
+ }
144
+ } @else {
145
+ @content;
146
+ }
147
+ }
148
+
149
+ // Container query for applying styles when the container’s inline size is at most the breakpoint’s maximum width.
150
+ @mixin container-breakpoint-down($name, $breakpoints: $cq-grid-breakpoints) {
151
+ $max: breakpoint-max($name, $breakpoints);
152
+ @if $max {
153
+ @container (max-width: #{$max}) {
154
+ @content;
155
+ }
156
+ } @else {
157
+ @content;
158
+ }
159
+ }
160
+
161
+ // Container query for applying styles between two breakpoints.
162
+ @mixin container-breakpoint-between($lower, $upper, $breakpoints: $cq-grid-breakpoints) {
163
+ $min: breakpoint-min($lower, $breakpoints);
164
+ $max: breakpoint-max($upper, $breakpoints);
165
+
166
+ @if $min != null and $max != null {
167
+ @container (min-width: #{$min}) and (max-width: #{$max}) {
168
+ @content;
169
+ }
170
+ } @else if $max == null {
171
+ // When the upper breakpoint is the last one.
172
+ @include container-breakpoint-up($lower, $breakpoints) {
173
+ @content;
174
+ }
175
+ } @else if $min == null {
176
+ // When the lower breakpoint is the smallest.
177
+ @include container-breakpoint-down($upper, $breakpoints) {
178
+ @content;
179
+ }
180
+ }
181
+ }
182
+
183
+ // Container query for applying styles only within a single breakpoint range.
184
+ @mixin container-breakpoint-only($name, $breakpoints: $cq-grid-breakpoints) {
185
+ $min: breakpoint-min($name, $breakpoints);
186
+ $next: breakpoint-next($name, $breakpoints);
187
+ $max: breakpoint-max($next, $breakpoints);
188
+
189
+ @if $min != null and $max != null {
190
+ @container (min-width: #{$min}) and (max-width: #{$max}) {
191
+ @content;
192
+ }
193
+ } @else if $max == null {
194
+ // Last breakpoint – no maximum query.
195
+ @include container-breakpoint-up($name, $breakpoints) {
196
+ @content;
197
+ }
198
+ } @else if $min == null {
199
+ // First breakpoint – no minimum query.
200
+ @include container-breakpoint-down($next, $breakpoints) {
201
+ @content;
202
+ }
203
+ }
204
+ }