@adnap/krysalicss 0.0.1 → 0.1.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 (217) hide show
  1. package/README.md +23 -5
  2. package/dist/element/badge.css +30 -0
  3. package/dist/element/badge.min.css +1 -1
  4. package/dist/element/box.css +193 -0
  5. package/dist/element/box.min.css +1 -0
  6. package/dist/element/button.css +4 -0
  7. package/dist/element/button.min.css +1 -1
  8. package/dist/element/divider.css +155 -0
  9. package/dist/element/divider.min.css +1 -0
  10. package/dist/element/image.css +434 -0
  11. package/dist/element/image.min.css +1 -0
  12. package/dist/element/range.css +2 -2
  13. package/dist/element/spinner.css +190 -0
  14. package/dist/element/spinner.min.css +1 -0
  15. package/dist/helper/border.css +141 -0
  16. package/dist/helper/border.min.css +1 -0
  17. package/dist/helper/color.css +203 -0
  18. package/dist/helper/color.min.css +1 -0
  19. package/dist/helper/flex.css +277 -0
  20. package/dist/helper/flex.min.css +1 -0
  21. package/dist/helper/font-size.css +137 -0
  22. package/dist/helper/font-size.min.css +1 -0
  23. package/dist/helper/interactions.css +142 -0
  24. package/dist/helper/interactions.min.css +1 -0
  25. package/dist/helper/line-height.css +129 -0
  26. package/dist/helper/line-height.min.css +1 -0
  27. package/dist/helper/object-fit.css +133 -0
  28. package/dist/helper/object-fit.min.css +1 -0
  29. package/dist/helper/overflow.css +165 -0
  30. package/dist/helper/overflow.min.css +1 -0
  31. package/dist/helper/position.css +157 -0
  32. package/dist/helper/position.min.css +1 -0
  33. package/dist/helper/ratio.css +142 -0
  34. package/dist/helper/ratio.min.css +1 -0
  35. package/dist/helper/shadow.css +129 -0
  36. package/dist/helper/shadow.min.css +1 -0
  37. package/dist/helper/sizing.css +177 -0
  38. package/dist/helper/sizing.min.css +1 -0
  39. package/dist/helper/spacing.css +563 -0
  40. package/dist/helper/spacing.min.css +1 -0
  41. package/dist/helper/stack.css +127 -0
  42. package/dist/helper/stack.min.css +1 -0
  43. package/dist/helper/text.css +243 -0
  44. package/dist/helper/text.min.css +1 -0
  45. package/dist/helper/tooltip.css +174 -0
  46. package/dist/helper/tooltip.min.css +1 -0
  47. package/dist/helper/visibility.css +334 -0
  48. package/dist/helper/visibility.min.css +1 -0
  49. package/dist/krysalicss.css +3491 -414
  50. package/dist/krysalicss.css.map +1 -1
  51. package/dist/krysalicss.min.css +1 -1
  52. package/dist/layout/footer.css +155 -0
  53. package/dist/layout/footer.min.css +1 -0
  54. package/dist/layout/hero.css +177 -0
  55. package/dist/layout/hero.min.css +1 -0
  56. package/dist/module/alert.css +30 -0
  57. package/dist/module/alert.min.css +1 -1
  58. package/dist/module/breadcrumb.css +163 -0
  59. package/dist/module/breadcrumb.min.css +1 -0
  60. package/dist/module/buttons.css +158 -0
  61. package/dist/module/buttons.min.css +1 -0
  62. package/dist/module/card.css +89 -0
  63. package/dist/module/card.min.css +1 -1
  64. package/dist/module/dropdown.css +253 -0
  65. package/dist/module/dropdown.min.css +1 -0
  66. package/dist/module/navbar.css +1 -1
  67. package/dist/module/navbar.min.css +1 -1
  68. package/dist/module/pagination.css +301 -0
  69. package/dist/module/pagination.min.css +1 -0
  70. package/dist/module/popover.css +272 -0
  71. package/dist/module/popover.min.css +1 -0
  72. package/dist/module/section.css +138 -0
  73. package/dist/module/section.min.css +1 -0
  74. package/dist/module/toast.css +307 -0
  75. package/dist/module/toast.min.css +1 -0
  76. package/dist/scss-api.json +4672 -0
  77. package/dist/typography/blockquote.css +128 -0
  78. package/dist/typography/blockquote.min.css +1 -0
  79. package/dist/typography/figure.css +132 -0
  80. package/dist/typography/figure.min.css +1 -0
  81. package/dist/typography/lead.css +119 -0
  82. package/dist/typography/lead.min.css +1 -0
  83. package/dist/typography/list.css +125 -0
  84. package/dist/typography/list.min.css +1 -0
  85. package/package.json +8 -2
  86. package/src/base/global/_plugin.scss +2 -0
  87. package/src/base/reset/_plugin.scss +2 -0
  88. package/src/base/reset/_variables.scss +2 -0
  89. package/src/element/_index.scss +4 -0
  90. package/src/element/badge/_plugin.scss +6 -8
  91. package/src/element/badge/_variables.scss +4 -6
  92. package/src/element/box/_index.scss +2 -0
  93. package/src/element/box/_plugin.scss +31 -0
  94. package/src/element/box/_variables.scss +18 -0
  95. package/src/element/button/_plugin.scss +20 -1
  96. package/src/element/checkbox/_plugin.scss +3 -4
  97. package/src/element/checkbox/_variables.scss +2 -5
  98. package/src/element/divider/_index.scss +2 -0
  99. package/src/element/divider/_plugin.scss +69 -0
  100. package/src/element/divider/_variables.scss +16 -0
  101. package/src/element/file/_plugin.scss +2 -0
  102. package/src/element/file/_variables.scss +2 -6
  103. package/src/element/image/_index.scss +2 -0
  104. package/src/element/image/_plugin.scss +106 -0
  105. package/src/element/image/_variables.scss +53 -0
  106. package/src/element/progress/_plugin.scss +9 -28
  107. package/src/element/progress/_variables.scss +2 -8
  108. package/src/element/radio/_plugin.scss +4 -4
  109. package/src/element/radio/_variables.scss +2 -2
  110. package/src/element/range/_plugin.scss +9 -20
  111. package/src/element/range/_variables.scss +7 -1
  112. package/src/element/select/_plugin.scss +3 -4
  113. package/src/element/select/_variables.scss +2 -6
  114. package/src/element/spinner/_index.scss +2 -0
  115. package/src/element/spinner/_plugin.scss +78 -0
  116. package/src/element/spinner/_variables.scss +22 -0
  117. package/src/element/switch/_plugin.scss +6 -10
  118. package/src/element/switch/_variables.scss +2 -10
  119. package/src/element/text-input/_plugin.scss +3 -1
  120. package/src/element/text-input/_variables.scss +5 -5
  121. package/src/element/textarea/_plugin.scss +3 -1
  122. package/src/element/textarea/_variables.scss +2 -2
  123. package/src/helper/_border.scss +43 -0
  124. package/src/helper/_color.scss +29 -0
  125. package/src/helper/{_controls.scss → _controls-internal.scss} +21 -0
  126. package/src/helper/_flex.scss +89 -0
  127. package/src/helper/_font-size.scss +22 -0
  128. package/src/helper/_index.scss +18 -1
  129. package/src/helper/_interactions.scss +41 -0
  130. package/src/helper/_line-height.scss +22 -0
  131. package/src/helper/_object-fit.scss +15 -0
  132. package/src/helper/_overflow.scss +28 -0
  133. package/src/helper/_position.scss +47 -0
  134. package/src/helper/_ratio.scss +35 -0
  135. package/src/helper/_shadow.scss +31 -0
  136. package/src/helper/_sizing.scss +65 -0
  137. package/src/helper/_spacing.scss +95 -0
  138. package/src/helper/_stack.scss +24 -0
  139. package/src/helper/_state.scss +2 -17
  140. package/src/helper/_text.scss +92 -0
  141. package/src/helper/_tooltip.scss +100 -0
  142. package/src/helper/_visibility.scss +80 -0
  143. package/src/layout/_index.scss +2 -0
  144. package/src/layout/container/_plugin.scss +2 -0
  145. package/src/layout/container/_variables.scss +2 -0
  146. package/src/layout/flex/_plugin.scss +2 -1
  147. package/src/layout/flex/_variables.scss +2 -2
  148. package/src/layout/footer/_index.scss +2 -0
  149. package/src/layout/footer/_plugin.scss +24 -0
  150. package/src/layout/footer/_variables.scss +11 -0
  151. package/src/layout/grid/_plugin.scss +2 -0
  152. package/src/layout/grid/_variables.scss +20 -16
  153. package/src/layout/hero/_index.scss +2 -0
  154. package/src/layout/hero/_plugin.scss +54 -0
  155. package/src/layout/hero/_variables.scss +23 -0
  156. package/src/module/_index.scss +7 -0
  157. package/src/module/alert/_plugin.scss +6 -1
  158. package/src/module/alert/_variables.scss +7 -0
  159. package/src/module/breadcrumb/_index.scss +2 -0
  160. package/src/module/breadcrumb/_plugin.scss +73 -0
  161. package/src/module/breadcrumb/_variables.scss +27 -0
  162. package/src/module/buttons/_index.scss +2 -0
  163. package/src/module/buttons/_plugin.scss +67 -0
  164. package/src/module/buttons/_variables.scss +10 -0
  165. package/src/module/card/_plugin.scss +96 -2
  166. package/src/module/card/_variables.scss +39 -0
  167. package/src/module/dropdown/_index.scss +2 -0
  168. package/src/module/dropdown/_plugin.scss +155 -0
  169. package/src/module/dropdown/_variables.scss +50 -0
  170. package/src/module/field/_plugin.scss +2 -0
  171. package/src/module/modal/_plugin.scss +2 -0
  172. package/src/module/navbar/_plugin.scss +4 -1
  173. package/src/module/navbar/_variables.scss +6 -2
  174. package/src/module/pagination/_index.scss +2 -0
  175. package/src/module/pagination/_plugin.scss +276 -0
  176. package/src/module/pagination/_variables.scss +64 -0
  177. package/src/module/popover/_index.scss +2 -0
  178. package/src/module/popover/_plugin.scss +183 -0
  179. package/src/module/popover/_variables.scss +44 -0
  180. package/src/module/section/_index.scss +2 -0
  181. package/src/module/section/_plugin.scss +47 -0
  182. package/src/module/section/_variables.scss +24 -0
  183. package/src/module/tabs/_plugin.scss +3 -1
  184. package/src/module/toast/_index.scss +2 -0
  185. package/src/module/toast/_plugin.scss +184 -0
  186. package/src/module/toast/_variables.scss +56 -0
  187. package/src/typography/_index.scss +4 -0
  188. package/src/typography/base/_plugin.scss +2 -0
  189. package/src/typography/base/_variables.scss +4 -3
  190. package/src/typography/blockquote/_index.scss +2 -0
  191. package/src/typography/blockquote/_plugin.scss +22 -0
  192. package/src/typography/blockquote/_variables.scss +13 -0
  193. package/src/typography/content/_plugin.scss +2 -0
  194. package/src/typography/content/_variables.scss +2 -0
  195. package/src/typography/figure/_index.scss +2 -0
  196. package/src/typography/figure/_plugin.scss +29 -0
  197. package/src/typography/figure/_variables.scss +13 -0
  198. package/src/typography/lead/_index.scss +2 -0
  199. package/src/typography/lead/_plugin.scss +12 -0
  200. package/src/typography/lead/_variables.scss +6 -0
  201. package/src/typography/link/_mixins.scss +2 -0
  202. package/src/typography/link/_plugin.scss +2 -0
  203. package/src/typography/link/_variables.scss +2 -0
  204. package/src/typography/list/_index.scss +2 -0
  205. package/src/typography/list/_plugin.scss +18 -0
  206. package/src/typography/list/_variables.scss +6 -0
  207. package/src/typography/table/_plugin.scss +2 -0
  208. package/src/typography/table/_variables.scss +2 -0
  209. package/src/typography/title/_plugin.scss +2 -0
  210. package/src/typography/title/_variables.scss +2 -0
  211. package/src/variables/_color.scss +20 -12
  212. package/src/variables/_feature.scss +36 -0
  213. package/src/variables/_global.scss +8 -0
  214. package/src/variables/_selector.scss +1 -0
  215. package/dist/tokens/dark.json +0 -85
  216. package/dist/tokens/default.json +0 -85
  217. package/dist/tokens/high-contrast.json +0 -85
@@ -1,11 +1,11 @@
1
1
  @use "../../variables";
2
2
 
3
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/select.mdx
4
+
3
5
  $selector: "select" !default;
4
6
 
5
7
  $padding-y: variables.$size-extra-small !default;
6
8
  $padding-x: variables.$size-small !default;
7
- // Right padding leaves room for the custom caret SVG so long option text
8
- // doesn't overlap the chevron. Skipped for `[multiple]` (no caret).
9
9
  $padding-x-with-caret: 2rem !default;
10
10
 
11
11
  $border-radius: variables.$global-border-radius !default;
@@ -18,9 +18,5 @@ $focus-outline-offset: variables.$global-focus-outline-offset !default;
18
18
  $disabled-opacity: variables.$global-disabled-opacity !default;
19
19
  $border-mix: variables.$global-border-mix !default;
20
20
 
21
- // Inline SVG chevron baked as a data URL so the framework stays asset-free.
22
- // `currentColor` would be ideal but `background-image` URLs can't reference
23
- // `currentColor`; the muted neutral reads acceptably in both themes against
24
- // the input bg. Consumers wanting a theme-reactive caret can override.
25
21
  $caret-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 8" fill="none"><path d="M1 1.5l5 5 5-5" stroke="%23888" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>')
26
22
  !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,78 @@
1
+ @use "sass:list";
2
+ @use "variables" as *;
3
+ @use "../../variables";
4
+
5
+ // Documentation: ../../../docs/src/pages/reference/components/element/spinner.mdx
6
+
7
+ @if variables.$feature-element-spinner {
8
+ #{$selector} {
9
+ @include variables.textColor(
10
+ spinner-fg,
11
+ list.nth($default-combination, 2),
12
+ );
13
+ display: inline-block;
14
+ vertical-align: -0.125em;
15
+ width: $size;
16
+ height: $size;
17
+ border: $border-width solid
18
+ color-mix(in srgb, currentColor #{$track-mix}, transparent);
19
+ border-block-start-color: currentColor;
20
+ border-radius: 50%;
21
+ animation: kc-spinner-rotate $duration linear infinite;
22
+
23
+ &#{$small-selector} {
24
+ width: $small-size;
25
+ height: $small-size;
26
+ }
27
+
28
+ &#{$large-selector} {
29
+ width: $large-size;
30
+ height: $large-size;
31
+ }
32
+
33
+ &#{$grow-selector} {
34
+ background-color: currentColor;
35
+ border: 0;
36
+ animation: kc-spinner-grow $grow-duration linear infinite;
37
+ }
38
+
39
+ @include variables.combinations using ($label, $tuple) {
40
+ @include variables.textColor(#{$label}-bg, list.nth($tuple, 1));
41
+ }
42
+ }
43
+
44
+ @keyframes kc-spinner-rotate {
45
+ to {
46
+ transform: rotate(360deg);
47
+ }
48
+ }
49
+
50
+ @keyframes kc-spinner-grow {
51
+ 0% {
52
+ transform: scale(0);
53
+ opacity: 1;
54
+ }
55
+ 100% {
56
+ transform: scale(1);
57
+ opacity: 0;
58
+ }
59
+ }
60
+
61
+ @media (prefers-reduced-motion: reduce) {
62
+ #{$selector} {
63
+ animation-duration: $reduced-motion-duration;
64
+
65
+ &#{$grow-selector} {
66
+ animation: none;
67
+ opacity: 0.5;
68
+ }
69
+ }
70
+ }
71
+
72
+ @media (forced-colors: active) {
73
+ #{$selector} {
74
+ border-color: CanvasText;
75
+ border-block-start-color: Highlight;
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,22 @@
1
+ @use "../../variables";
2
+
3
+ // Documentation: ../../../docs/src/pages/reference/components/element/spinner.mdx
4
+
5
+ $selector: ".spinner" !default;
6
+ $grow-selector: "#{variables.$selector-prefix-is}grow" !default;
7
+ $small-selector: "#{variables.$selector-prefix-is}small" !default;
8
+ $large-selector: "#{variables.$selector-prefix-is}large" !default;
9
+
10
+ $size: 1.5rem !default;
11
+ $small-size: 1rem !default;
12
+ $large-size: 2.5rem !default;
13
+ $border-width: 0.25em !default;
14
+
15
+ $duration: 0.75s !default;
16
+ $grow-duration: 1s !default;
17
+
18
+ $track-mix: 25% !default;
19
+
20
+ $default-combination: variables.$color-combination-default !default;
21
+
22
+ $reduced-motion-duration: 2s !default;
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
- @use "../../helper/controls" as controls;
3
+ @use "../../helper/controls-internal" as controls;
4
+
5
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/switch.mdx
4
6
 
5
7
  @if variables.$feature-element-switch {
6
8
  #{$selector} {
@@ -27,10 +29,9 @@
27
29
  background-color $transition-duration ease,
28
30
  border-color $transition-duration ease;
29
31
 
30
- // Thumb is a centered pseudo-element. Anchored at inline-start; toggled by a
31
- // translation along the inline axis. `translateX` is physical: RTL flips the
32
- // sign via the `:dir(rtl)` companion below so the thumb travels toward the
33
- // visual end-edge in both directions.
32
+ // `translateX` is physical: RTL flips the sign via the `:dir(rtl)`
33
+ // companion below so the thumb travels toward the visual end-edge in
34
+ // both directions.
34
35
  &::before {
35
36
  content: "";
36
37
  position: absolute;
@@ -79,11 +80,6 @@
79
80
  }
80
81
  }
81
82
 
82
- // Forced-colors: the color-mix track and border collapse to nearly-
83
- // invisible system colours. Force solid ButtonFace track + CanvasText
84
- // border for the off state; checked state maps to Highlight surface.
85
- // Thumb position alone already conveys state, but we keep the colour
86
- // cue in case a renderer flattens the position offset.
87
83
  @media (forced-colors: active) {
88
84
  background-color: ButtonFace;
89
85
  border-color: CanvasText;
@@ -1,11 +1,9 @@
1
1
  @use "../../variables";
2
2
 
3
- // Visually a toggle, semantically still a checkbox: opt-in via `.switch` so
4
- // authors keep using `<input type="checkbox">` plus assistive-tech behaviour.
3
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/switch.mdx
4
+
5
5
  $selector: 'input[type="checkbox"].switch' !default;
6
6
 
7
- // Pill dimensions. Width is 2x height by convention so the thumb has a full
8
- // diameter of travel.
9
7
  $height: 1.25rem !default;
10
8
  $width: 2.25rem !default;
11
9
  $thumb-inset: 2px !default;
@@ -17,12 +15,6 @@ $focus-outline-offset: variables.$global-focus-outline-offset !default;
17
15
 
18
16
  $disabled-opacity: variables.$global-disabled-opacity !default;
19
17
  $border-mix: variables.$global-border-mix !default;
20
- // Track-off tint. 50 % is the smallest single value where the track itself
21
- // reads as a real surface against the page bg in both themes (3.04:1 default,
22
- // 4.53:1 dark) AND the thumb-on-track contrast clears 3:1 (4.85:1 default,
23
- // 3.32:1 dark). The earlier 18 % was effectively invisible against either bg.
24
- // At 50 % the off-state still reads distinctly off: it is darker than a
25
- // disabled (60 % opacity) thumb, not a half-on intermediate.
26
18
  $track-mix: 50% !default;
27
19
 
28
20
  $transition-duration: variables.$global-transition-duration !default;
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
- @use "../../helper/controls" as controls;
3
+ @use "../../helper/controls-internal" as controls;
4
+
5
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/text-input.mdx
4
6
 
5
7
  @if variables.$feature-element-text-input {
6
8
  #{$selector} {
@@ -1,10 +1,10 @@
1
1
  @use "../../variables";
2
2
 
3
- // Covers every text-flavoured native input. Listed individually rather than via
4
- // `input:not([type])` because the latter also matches non-text types (number is
5
- // a text-like control, but checkbox/radio/etc. need different rules and are
6
- // handled by their own plugins). Order is alphabetical for deterministic
7
- // selector list output.
3
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/text-input.mdx
4
+
5
+ // Listed individually rather than via `input:not([type])` because the latter
6
+ // also matches non-text types handled by their own plugins. Order is
7
+ // alphabetical for deterministic selector list output.
8
8
  $selector: 'input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"]'
9
9
  !default;
10
10
 
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
- @use "../../helper/controls" as controls;
3
+ @use "../../helper/controls-internal" as controls;
4
+
5
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/textarea.mdx
4
6
 
5
7
  @if variables.$feature-element-textarea {
6
8
  #{$selector} {
@@ -1,5 +1,7 @@
1
1
  @use "../../variables";
2
2
 
3
+ // Documentation: ../../../docs/src/pages/reference/components/element/forms/textarea.mdx
4
+
3
5
  $selector: "textarea" !default;
4
6
 
5
7
  $padding-y: variables.$size-extra-small !default;
@@ -17,6 +19,4 @@ $border-mix: variables.$global-border-mix !default;
17
19
 
18
20
  $min-height: 4rem !default;
19
21
 
20
- // Vertical-only resize is the safer default: horizontal resize on a fluid
21
- // container can break responsive layouts. Consumers can override to `both`.
22
22
  $resize: vertical !default;
@@ -0,0 +1,43 @@
1
+ @use "../variables";
2
+
3
+ // Documentation: ../../docs/src/pages/reference/components/helper/border.mdx
4
+
5
+ $selector-prefix: variables.$selector-prefix-is !default;
6
+
7
+ $border-radius-token: "border-radius" !default;
8
+ $pill-radius: 999px !default;
9
+
10
+ @if variables.$feature-helper-border {
11
+ #{$selector-prefix}rounded {
12
+ border-radius: var(
13
+ --kc-#{$border-radius-token},
14
+ #{variables.$global-border-radius}
15
+ ) !important;
16
+ }
17
+
18
+ #{$selector-prefix}radiusless {
19
+ border-radius: 0 !important;
20
+ }
21
+
22
+ #{$selector-prefix}circle {
23
+ border-radius: 50% !important;
24
+ }
25
+
26
+ #{$selector-prefix}pill {
27
+ border-radius: $pill-radius !important;
28
+ }
29
+
30
+ // 50 % currentColor mix matches `$border-mix` in form controls.
31
+ #{$selector-prefix}bordered {
32
+ border: 1px solid color-mix(in srgb, currentColor 50%, transparent)
33
+ !important;
34
+ }
35
+
36
+ #{$selector-prefix}borderless {
37
+ border: 0 !important;
38
+ }
39
+
40
+ #{$selector-prefix}shadowless {
41
+ box-shadow: none !important;
42
+ }
43
+ }
@@ -0,0 +1,29 @@
1
+ @use "sass:list";
2
+ @use "../variables";
3
+
4
+ // Documentation: ../../docs/src/pages/reference/components/helper/color.mdx
5
+
6
+ $selector-prefix-text: "#{variables.$selector-prefix-has}text-" !default;
7
+ $selector-prefix-background: "#{variables.$selector-prefix-has}background-"
8
+ !default;
9
+ $inverted-selector: "#{variables.$selector-prefix-is}inverted" !default;
10
+
11
+ @if variables.$feature-helper-color {
12
+ @each $label, $tuple in variables.$color-combinations {
13
+ #{$selector-prefix-text}#{$label} {
14
+ @include variables.textColor("#{$label}-fg", list.nth($tuple, 2));
15
+
16
+ &#{$inverted-selector} {
17
+ @include variables.textColor("#{$label}-bg", list.nth($tuple, 1));
18
+ }
19
+ }
20
+
21
+ #{$selector-prefix-background}#{$label} {
22
+ @include variables.backgroundColor("#{$label}-bg", list.nth($tuple, 1));
23
+
24
+ &#{$inverted-selector} {
25
+ @include variables.backgroundColor("#{$label}-fg", list.nth($tuple, 2));
26
+ }
27
+ }
28
+ }
29
+ }
@@ -80,3 +80,24 @@
80
80
  );
81
81
  }
82
82
  }
83
+
84
+ // Compound `.is-<label>.is-light` emission. Each combination keeps its hue
85
+ // identity but swaps to the soft-tint pair (`--kc-<label>-light-bg/fg`)
86
+ // emitted by `theme/_create.scss`. Used by box / badge / alert / card /
87
+ // toast when the `$feature-light-variants` flag is on. Falls back to the
88
+ // combination's base tuple if the theme doesn't ship the light tokens,
89
+ // which renders identically to `.is-<label>` (graceful degradation).
90
+ @mixin combinations-apply-light($bg-token-prefix: "", $fg-token-prefix: "") {
91
+ @include variables.combinations using ($label, $tuple) {
92
+ &#{variables.$selector-prefix-is}light {
93
+ @include variables.backgroundColor(
94
+ "#{$bg-token-prefix}#{$label}-light-bg",
95
+ list.nth($tuple, 1),
96
+ );
97
+ @include variables.textColor(
98
+ "#{$fg-token-prefix}#{$label}-light-fg",
99
+ list.nth($tuple, 2),
100
+ );
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,89 @@
1
+ @use "sass:map";
2
+ @use "../variables";
3
+
4
+ // Documentation: ../../docs/src/pages/reference/components/helper/flex.mdx
5
+
6
+ $selector-prefix: variables.$selector-prefix-is !default;
7
+
8
+ $gap-selector-prefix: ".gap-" !default;
9
+
10
+ $directions: (row, row-reverse, column, column-reverse) !default;
11
+
12
+ $justify-values: (
13
+ flex-start, flex-end, center, space-between, space-around, space-evenly
14
+ ) !default;
15
+
16
+ $align-values: (stretch, flex-start, flex-end, center, baseline) !default;
17
+
18
+ $align-self-values: (auto, flex-start, flex-end, center, baseline, stretch)
19
+ !default;
20
+
21
+ $align-content-values: (
22
+ flex-start, flex-end, center, space-between, space-around, stretch
23
+ ) !default;
24
+
25
+ $wrap-values: (nowrap, wrap, wrap-reverse) !default;
26
+
27
+ $gap-scale: (
28
+ 0: 0,
29
+ 1: 0.25rem,
30
+ 2: 0.5rem,
31
+ 3: 0.75rem,
32
+ 4: 1rem,
33
+ 5: 1.5rem,
34
+ 6: 3rem,
35
+ ) !default;
36
+
37
+ @if variables.$feature-helper-flex {
38
+ @each $direction in $directions {
39
+ #{$selector-prefix}flex-direction-#{$direction} {
40
+ flex-direction: $direction !important;
41
+ }
42
+ }
43
+
44
+ @each $value in $justify-values {
45
+ #{$selector-prefix}justify-content-#{$value} {
46
+ justify-content: $value !important;
47
+ }
48
+ }
49
+
50
+ @each $value in $align-values {
51
+ #{$selector-prefix}align-items-#{$value} {
52
+ align-items: $value !important;
53
+ }
54
+ }
55
+
56
+ @each $value in $align-self-values {
57
+ #{$selector-prefix}align-self-#{$value} {
58
+ align-self: $value !important;
59
+ }
60
+ }
61
+
62
+ @each $value in $align-content-values {
63
+ #{$selector-prefix}align-content-#{$value} {
64
+ align-content: $value !important;
65
+ }
66
+ }
67
+
68
+ @each $value in $wrap-values {
69
+ #{$selector-prefix}flex-wrap-#{$value} {
70
+ flex-wrap: $value !important;
71
+ }
72
+ }
73
+
74
+ @each $value in (0, 1) {
75
+ #{$selector-prefix}flex-grow-#{$value} {
76
+ flex-grow: $value !important;
77
+ }
78
+
79
+ #{$selector-prefix}flex-shrink-#{$value} {
80
+ flex-shrink: $value !important;
81
+ }
82
+ }
83
+
84
+ @each $key, $value in $gap-scale {
85
+ #{$gap-selector-prefix}#{$key} {
86
+ gap: $value !important;
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,22 @@
1
+ @use "../variables";
2
+
3
+ // Documentation: ../../docs/src/pages/reference/components/helper/font-size.mdx
4
+
5
+ $selector-prefix: "#{variables.$selector-prefix-is}size-" !default;
6
+
7
+ $sizes: (
8
+ 1: 2.5rem,
9
+ 2: 2rem,
10
+ 3: 1.75rem,
11
+ 4: 1.5rem,
12
+ 5: 1.25rem,
13
+ 6: 1rem,
14
+ ) !default;
15
+
16
+ @if variables.$feature-helper-font-size {
17
+ @each $key, $size in $sizes {
18
+ #{$selector-prefix}#{$key} {
19
+ font-size: $size !important;
20
+ }
21
+ }
22
+ }
@@ -1,3 +1,20 @@
1
1
  @forward "breakpoints";
2
- @forward "controls";
2
+ @forward "controls-internal";
3
3
  @forward "state" as state-*;
4
+ @forward "visibility" as visibility-*;
5
+ @forward "spacing" as spacing-*;
6
+ @forward "text" as text-*;
7
+ @forward "color" as color-*;
8
+ @forward "flex" as flex-*;
9
+ @forward "sizing" as sizing-*;
10
+ @forward "position" as position-*;
11
+ @forward "shadow" as shadow-*;
12
+ @forward "border" as border-*;
13
+ @forward "interactions" as interactions-*;
14
+ @forward "ratio" as ratio-*;
15
+ @forward "object-fit" as object-fit-*;
16
+ @forward "overflow" as overflow-*;
17
+ @forward "stack" as stack-*;
18
+ @forward "font-size" as font-size-*;
19
+ @forward "line-height" as line-height-*;
20
+ @forward "tooltip" as tooltip-*;
@@ -0,0 +1,41 @@
1
+ @use "../variables";
2
+
3
+ // Documentation: ../../docs/src/pages/reference/components/helper/interactions.mdx
4
+
5
+ $clickable-selector: "#{variables.$selector-prefix-is}clickable" !default;
6
+ $unselectable-selector: "#{variables.$selector-prefix-is}unselectable" !default;
7
+ $clearfix-selector: "#{variables.$selector-prefix-is}clearfix" !default;
8
+ $pulled-left-selector: "#{variables.$selector-prefix-is}pulled-left" !default;
9
+ $pulled-right-selector: "#{variables.$selector-prefix-is}pulled-right" !default;
10
+ $stretched-link-selector: "#{variables.$selector-prefix-is}stretched-link"
11
+ !default;
12
+
13
+ @if variables.$feature-helper-interactions {
14
+ #{$clickable-selector} {
15
+ cursor: pointer !important;
16
+ }
17
+
18
+ #{$unselectable-selector} {
19
+ user-select: none !important;
20
+ }
21
+
22
+ #{$clearfix-selector}::after {
23
+ display: table;
24
+ clear: both;
25
+ content: "";
26
+ }
27
+
28
+ #{$pulled-left-selector} {
29
+ float: left !important;
30
+ }
31
+
32
+ #{$pulled-right-selector} {
33
+ float: right !important;
34
+ }
35
+
36
+ #{$stretched-link-selector}::after {
37
+ position: absolute;
38
+ inset: 0;
39
+ content: "";
40
+ }
41
+ }
@@ -0,0 +1,22 @@
1
+ @use "../variables";
2
+
3
+ // Documentation: ../../docs/src/pages/reference/components/helper/line-height.mdx
4
+
5
+ // Per-utility prefix knob. Mirrors `_flex.scss` / `_visibility.scss`
6
+ // (selectors come from variables). Default keeps Bootstrap parity.
7
+ $selector-prefix-lh: ".lh-" !default;
8
+
9
+ $values: (
10
+ 1: 1,
11
+ sm: 1.25,
12
+ base: 1.5,
13
+ lg: 2,
14
+ ) !default;
15
+
16
+ @if variables.$feature-helper-line-height {
17
+ @each $key, $value in $values {
18
+ #{$selector-prefix-lh}#{$key} {
19
+ line-height: $value !important;
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,15 @@
1
+ @use "../variables";
2
+
3
+ // Documentation: ../../docs/src/pages/reference/components/helper/object-fit.mdx
4
+
5
+ $selector-prefix: "#{variables.$selector-prefix-has}object-fit-" !default;
6
+
7
+ $values: (contain, cover, fill, scale-down, none) !default;
8
+
9
+ @if variables.$feature-helper-object-fit {
10
+ @each $value in $values {
11
+ #{$selector-prefix}#{$value} {
12
+ object-fit: $value !important;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,28 @@
1
+ @use "../variables";
2
+
3
+ // Documentation: ../../docs/src/pages/reference/components/helper/overflow.mdx
4
+
5
+ $clipped-selector: "#{variables.$selector-prefix-is}clipped" !default;
6
+ $selector-prefix: "#{variables.$selector-prefix-has}overflow-" !default;
7
+
8
+ $values: (auto, hidden, visible, scroll) !default;
9
+
10
+ @if variables.$feature-helper-overflow {
11
+ #{$clipped-selector} {
12
+ overflow: hidden !important;
13
+ }
14
+
15
+ @each $value in $values {
16
+ #{$selector-prefix}#{$value} {
17
+ overflow: $value !important;
18
+ }
19
+
20
+ #{$selector-prefix}x-#{$value} {
21
+ overflow-x: $value !important;
22
+ }
23
+
24
+ #{$selector-prefix}y-#{$value} {
25
+ overflow-y: $value !important;
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,47 @@
1
+ @use "sass:map";
2
+ @use "../variables";
3
+
4
+ // Documentation: ../../docs/src/pages/reference/components/helper/position.mdx
5
+
6
+ $selector-prefix: variables.$selector-prefix-is !default;
7
+
8
+ $positions: (static, relative, absolute, fixed, sticky) !default;
9
+
10
+ $z-indices: (
11
+ dropdown: 1000,
12
+ sticky: 1020,
13
+ fixed: 1030,
14
+ modal: 1055,
15
+ ) !default;
16
+
17
+ @if variables.$feature-helper-position {
18
+ @each $position in $positions {
19
+ #{$selector-prefix}#{$position} {
20
+ position: $position !important;
21
+ }
22
+ }
23
+
24
+ #{$selector-prefix}fixed-top {
25
+ position: fixed !important;
26
+ inset: 0 0 auto !important;
27
+ z-index: map.get($z-indices, fixed) !important;
28
+ }
29
+
30
+ #{$selector-prefix}fixed-bottom {
31
+ position: fixed !important;
32
+ inset: auto 0 0 !important;
33
+ z-index: map.get($z-indices, fixed) !important;
34
+ }
35
+
36
+ #{$selector-prefix}sticky-top {
37
+ position: sticky !important;
38
+ inset-block-start: 0 !important;
39
+ z-index: map.get($z-indices, sticky) !important;
40
+ }
41
+
42
+ #{$selector-prefix}sticky-bottom {
43
+ position: sticky !important;
44
+ inset-block-end: 0 !important;
45
+ z-index: map.get($z-indices, sticky) !important;
46
+ }
47
+ }
@@ -0,0 +1,35 @@
1
+ @use "sass:map";
2
+ @use "../variables";
3
+
4
+ // Documentation: ../../docs/src/pages/reference/components/helper/ratio.mdx
5
+
6
+ $selector: ".ratio" !default;
7
+ $variant-selector-prefix: ".ratio-" !default;
8
+
9
+ $ratios: (
10
+ 1x1: "1 / 1",
11
+ 4x3: "4 / 3",
12
+ 16x9: "16 / 9",
13
+ 21x9: "21 / 9",
14
+ ) !default;
15
+
16
+ @if variables.$feature-helper-ratio {
17
+ #{$selector} {
18
+ position: relative;
19
+ width: 100%;
20
+ aspect-ratio: var(--kc-ratio, 1);
21
+ }
22
+
23
+ #{$selector} > * {
24
+ position: absolute;
25
+ inset: 0;
26
+ width: 100%;
27
+ height: 100%;
28
+ }
29
+
30
+ @each $name, $value in $ratios {
31
+ #{$variant-selector-prefix}#{$name} {
32
+ --kc-ratio: #{$value};
33
+ }
34
+ }
35
+ }