@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
@@ -0,0 +1,50 @@
1
+ @use "../../variables";
2
+
3
+ // Documentation: ../../../docs/src/pages/reference/components/module/dropdown.mdx
4
+
5
+ $selector: ".dropdown" !default;
6
+ $toggle-selector: ".dropdown__toggle" !default;
7
+ $trigger-selector: ".dropdown__trigger" !default;
8
+ $menu-selector: ".dropdown__menu" !default;
9
+
10
+ $hoverable-modifier: "#{variables.$selector-prefix-is}hoverable" !default;
11
+
12
+ $right-modifier: "#{variables.$selector-prefix-is}right" !default;
13
+
14
+ $up-modifier: "#{variables.$selector-prefix-is}up" !default;
15
+
16
+ $active-modifier: "#{variables.$selector-prefix-is}active" !default;
17
+
18
+ $arrow: true !default;
19
+
20
+ $arrow-size: 0.3em !default;
21
+
22
+ $arrow-gap: 0.5em !default;
23
+
24
+ $gap: variables.$size-extra-small !default;
25
+ $padding: variables.$size-extra-small !default;
26
+ $item-padding-y: variables.$size-extra-small !default;
27
+ $item-padding-x: variables.$size-small !default;
28
+ $border-radius: variables.$global-border-radius !default;
29
+
30
+ $focus-outline-width: variables.$global-focus-outline-width !default;
31
+ $focus-outline-style: variables.$global-focus-outline-style !default;
32
+ $focus-outline-offset: variables.$global-focus-outline-offset !default;
33
+
34
+ // Subtle on-hover backdrop tint inside the panel. `currentColor` is
35
+ // theme-reactive (it follows the panel fg) and the low alpha keeps the
36
+ // affordance unobtrusive against any combination surface.
37
+ $hover-bg: color-mix(in srgb, currentColor 8%, transparent) !default;
38
+
39
+ $min-width: 12rem !default;
40
+
41
+ $offset: 2px !default;
42
+
43
+ $z-index: 10 !default;
44
+
45
+ $default-combination: variables.$color-combination-default !default;
46
+
47
+ // Subtle-border tint for the panel edge. Tracks `$global-subtle-border-mix`.
48
+ $border-mix: variables.$global-subtle-border-mix !default;
49
+
50
+ $controls: variables.$global-controls !default;
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
3
 
4
+ // Documentation: ../../../docs/src/pages/reference/components/module/field.mdx
5
+
4
6
  @if variables.$feature-module-field {
5
7
  #{$selector} {
6
8
  display: flex;
@@ -2,6 +2,8 @@
2
2
  @use "variables" as *;
3
3
  @use "../../variables";
4
4
 
5
+ // Documentation: ../../../docs/src/pages/reference/components/module/modal.mdx
6
+
5
7
  @mixin _backdrop-styles {
6
8
  @include variables.backgroundColor(modal-backdrop, $backdrop-color);
7
9
  @if $backdrop-blur != 0 {
@@ -3,6 +3,8 @@
3
3
  @use "../../variables";
4
4
  @use "../../helper/breakpoints" as breakpoints;
5
5
 
6
+ // Documentation: ../../../docs/src/pages/reference/components/module/navbar.mdx
7
+
6
8
  @if variables.$feature-module-navbar {
7
9
  #{$selector} {
8
10
  // Track (--kc-bg, --kc-fg) by default so the navbar follows the active
@@ -121,7 +123,8 @@
121
123
  navbar-dropdown-fg,
122
124
  var(--kc-fg, #{list.nth($default-combination, 2)}),
123
125
  );
124
- border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
126
+ border: 1px solid
127
+ color-mix(in srgb, currentColor #{$border-mix}, transparent);
125
128
  box-shadow: 0 4px 12px
126
129
  color-mix(in srgb, currentColor 18%, transparent);
127
130
  z-index: 10;
@@ -8,12 +8,12 @@ $link-selector: ".navbar__link" !default;
8
8
  $dropdown-selector: ".navbar__dropdown" !default;
9
9
  $toggle-selector: ".navbar__toggle" !default;
10
10
  $dropdown-toggle-selector: ".navbar__dropdown-toggle" !default;
11
- $hoverable-modifier: ".hoverable" !default;
11
+ $hoverable-modifier: "#{variables.$selector-prefix-is}hoverable" !default;
12
12
 
13
13
  // Modifier on `$item-selector` that opts the row into a focus-within
14
14
  // dropdown. Without it, items render inline only: adding the dropdown
15
15
  // styles unconditionally would force every link into an over-tall row.
16
- $has-dropdown-modifier: ".has-dropdown" !default;
16
+ $has-dropdown-modifier: "#{variables.$selector-prefix-has}dropdown" !default;
17
17
 
18
18
  // Below this device, the menu collapses behind a `<details>` toggle.
19
19
  // Above, it renders inline horizontally.
@@ -42,6 +42,10 @@ $dropdown-padding: variables.$size-extra-small !default;
42
42
 
43
43
  $default-combination: variables.$color-combination-default !default;
44
44
 
45
+ // Subtle-border tint for the dropdown panel edge. Tracks the
46
+ // framework-wide `$global-subtle-border-mix`.
47
+ $border-mix: variables.$global-subtle-border-mix !default;
48
+
45
49
  // Reveal mechanism for the dropdown panel. Defaults to the framework-wide
46
50
  // `$global-controls`, but can be retuned per-component (e.g. ship the
47
51
  // navbar with JS hooks only while the rest of the framework keeps the CSS
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,276 @@
1
+ @use "sass:list";
2
+ @use "variables" as *;
3
+ @use "../../variables";
4
+ @use "../../helper/controls-internal" as controls;
5
+
6
+ // Documentation: ../../../docs/src/pages/reference/components/module/pagination.mdx
7
+
8
+ @if variables.$feature-module-pagination {
9
+ #{$selector} {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: center;
13
+ gap: $gap;
14
+ font-size: inherit;
15
+ line-height: 1;
16
+
17
+ // Selector doubled on `#{$selector}` so the list reset survives
18
+ // host typography rules with class+element specificity — e.g.
19
+ // `.content ol:not(:last-child) { margin-block-end: 1em }` from the
20
+ // framework's own `typography/content` slice, or any docs / prose
21
+ // reset that ships `<ol>`/`<li>` block margins. Without the double-
22
+ // class chain the host rule wins on specificity and the numbered
23
+ // tiles render visibly lower than the prev/next slots.
24
+ &#{$selector} #{$list-selector},
25
+ &#{$selector} > ol,
26
+ &#{$selector} > ul {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ align-items: stretch;
30
+ gap: $gap;
31
+ // Logical longhands so host typography styles that target
32
+ // `margin-block-end` on `<ol>` / `<ul>` can't bleed in.
33
+ margin-block: 0;
34
+ margin-inline: 0;
35
+ padding: 0;
36
+ list-style: none;
37
+ line-height: 1;
38
+ }
39
+
40
+ &#{$selector} #{$list-selector} > li,
41
+ &#{$selector} > ol > li,
42
+ &#{$selector} > ul > li {
43
+ display: flex;
44
+ align-items: stretch;
45
+ // Defensive: host stylesheets that put `margin-bottom` on every
46
+ // `<li>` would otherwise push the list's intrinsic height taller
47
+ // than the prev/next slots and visibly drop the numbered tiles
48
+ // relative to them.
49
+ margin-block: 0;
50
+ margin-inline: 0;
51
+ }
52
+
53
+ // Shared box. `display: inline-grid` + `place-items: center` is the
54
+ // most bulletproof centering pattern — no flex baseline edge cases,
55
+ // no inline-baseline shift, no asymmetric padding interaction.
56
+ // `height: $min-width` (not min-height) locks every cell to the
57
+ // exact same height regardless of content; the row stays a clean
58
+ // grid of identical-height pills.
59
+ #{$link-selector},
60
+ #{$previous-selector},
61
+ #{$next-selector},
62
+ #{$ellipsis-selector} {
63
+ box-sizing: border-box;
64
+ display: inline-grid;
65
+ grid-auto-flow: column;
66
+ place-items: center;
67
+ gap: $chevron-gap;
68
+ min-width: $min-width;
69
+ height: $min-width;
70
+ padding: 0 $padding-x;
71
+ border-radius: $border-radius;
72
+ line-height: 1;
73
+ font-variant-numeric: tabular-nums;
74
+ text-align: center;
75
+ vertical-align: middle;
76
+ white-space: nowrap;
77
+ }
78
+
79
+ #{$link-selector} {
80
+ border: 1px solid
81
+ color-mix(
82
+ in srgb,
83
+ var(--kc-fg, currentColor) #{$border-mix},
84
+ transparent
85
+ );
86
+ background: transparent;
87
+ color: inherit;
88
+ text-decoration: none;
89
+ cursor: pointer;
90
+ user-select: none;
91
+
92
+ &:hover {
93
+ background: color-mix(
94
+ in srgb,
95
+ currentColor #{$hover-mix},
96
+ transparent
97
+ );
98
+ }
99
+
100
+ &:focus-visible {
101
+ @include controls.focus-ring();
102
+ }
103
+ }
104
+
105
+ #{$previous-selector},
106
+ #{$next-selector} {
107
+ padding-inline-start: $nav-padding-x;
108
+ padding-inline-end: $nav-padding-x;
109
+ background: transparent;
110
+ color: inherit;
111
+ text-decoration: none;
112
+ cursor: pointer;
113
+ user-select: none;
114
+
115
+ @if $nav-ghost {
116
+ border: 1px solid transparent;
117
+ } @else {
118
+ border: 1px solid
119
+ color-mix(
120
+ in srgb,
121
+ var(--kc-fg, currentColor) #{$border-mix},
122
+ transparent
123
+ );
124
+ }
125
+
126
+ &:hover {
127
+ background: color-mix(
128
+ in srgb,
129
+ currentColor #{$hover-mix},
130
+ transparent
131
+ );
132
+ }
133
+
134
+ &:focus-visible {
135
+ @include controls.focus-ring();
136
+ }
137
+ }
138
+
139
+ @if $chevrons {
140
+ // Grid `gap` on the parent handles chevron <-> label spacing, so
141
+ // the pseudo only needs its shape + rotation.
142
+ #{$previous-selector}::before,
143
+ #{$next-selector}::after {
144
+ content: "";
145
+ width: $chevron-size;
146
+ height: $chevron-size;
147
+ border-block-start: $chevron-thickness solid currentColor;
148
+ border-inline-end: $chevron-thickness solid currentColor;
149
+ }
150
+
151
+ #{$previous-selector}::before {
152
+ transform: rotate(-135deg);
153
+ }
154
+
155
+ #{$next-selector}::after {
156
+ transform: rotate(45deg);
157
+ }
158
+ }
159
+
160
+ #{$link-selector}[aria-current="page"],
161
+ #{$link-selector}#{$current-selector} {
162
+ @include variables.backgroundColor(
163
+ pagination-current-bg,
164
+ list.nth($current-combination, 1),
165
+ );
166
+ @include variables.textColor(
167
+ pagination-current-fg,
168
+ list.nth($current-combination, 2),
169
+ );
170
+ border-color: transparent;
171
+ font-weight: 600;
172
+ &:hover {
173
+ background: var(
174
+ --kc-pagination-current-bg,
175
+ #{list.nth($current-combination, 1)}
176
+ );
177
+ }
178
+ }
179
+
180
+ #{$link-selector}[disabled],
181
+ #{$link-selector}[aria-disabled="true"],
182
+ #{$link-selector}#{$disabled-selector},
183
+ #{$previous-selector}[disabled],
184
+ #{$previous-selector}[aria-disabled="true"],
185
+ #{$previous-selector}#{$disabled-selector},
186
+ #{$next-selector}[disabled],
187
+ #{$next-selector}[aria-disabled="true"],
188
+ #{$next-selector}#{$disabled-selector} {
189
+ @include controls.disabledControl();
190
+ &:hover {
191
+ background: transparent;
192
+ }
193
+ }
194
+
195
+ #{$ellipsis-selector} {
196
+ border: 1px solid
197
+ color-mix(
198
+ in srgb,
199
+ var(--kc-fg, currentColor) #{$ellipsis-border-mix},
200
+ transparent
201
+ );
202
+ color: color-mix(
203
+ in srgb,
204
+ var(--kc-fg, currentColor) #{$ellipsis-fg-mix},
205
+ transparent
206
+ );
207
+ user-select: none;
208
+ }
209
+
210
+ &#{$rounded-selector} {
211
+ #{$link-selector},
212
+ #{$previous-selector},
213
+ #{$next-selector},
214
+ #{$ellipsis-selector} {
215
+ border-radius: variables.$global-max-border-radius;
216
+ }
217
+ }
218
+
219
+ // Alignment runs on the outer flex container so prev/next slots
220
+ // (which sit outside the list in the markup) align with the numbered
221
+ // links.
222
+ &#{$centered-selector} {
223
+ justify-content: center;
224
+ }
225
+
226
+ &#{$right-selector} {
227
+ justify-content: flex-end;
228
+ }
229
+
230
+ &#{$small-selector} {
231
+ font-size: $small-font-size;
232
+
233
+ #{$link-selector},
234
+ #{$previous-selector},
235
+ #{$next-selector},
236
+ #{$ellipsis-selector} {
237
+ min-width: $small-min-width;
238
+ min-height: $small-min-width;
239
+ }
240
+ }
241
+
242
+ &#{$large-selector} {
243
+ font-size: $large-font-size;
244
+
245
+ #{$link-selector},
246
+ #{$previous-selector},
247
+ #{$next-selector},
248
+ #{$ellipsis-selector} {
249
+ min-width: $large-min-width;
250
+ min-height: $large-min-width;
251
+ }
252
+ }
253
+ }
254
+
255
+ @media (forced-colors: active) {
256
+ #{$selector} {
257
+ #{$link-selector},
258
+ #{$previous-selector},
259
+ #{$next-selector},
260
+ #{$ellipsis-selector} {
261
+ border-color: CanvasText;
262
+ }
263
+
264
+ #{$ellipsis-selector} {
265
+ color: CanvasText;
266
+ }
267
+
268
+ #{$link-selector}[aria-current="page"],
269
+ #{$link-selector}#{$current-selector} {
270
+ background: Highlight;
271
+ color: HighlightText;
272
+ border-color: Highlight;
273
+ }
274
+ }
275
+ }
276
+ }
@@ -0,0 +1,64 @@
1
+ @use "sass:map";
2
+ @use "../../variables";
3
+
4
+ // Documentation: ../../../docs/src/pages/reference/components/module/pagination.mdx
5
+
6
+ // Resolve the current-link surface tuple from the canonical combinations
7
+ // map. Falls back to the default combination when the consumer's map omits
8
+ // `primary`. Computed at module load, not on every selector emission.
9
+ @function _resolve-current-combination() {
10
+ $primary: map.get(variables.$color-combinations, primary);
11
+ @if $primary != null {
12
+ @return $primary;
13
+ }
14
+ @return variables.$color-combination-default;
15
+ }
16
+
17
+ $selector: ".pagination" !default;
18
+ $list-selector: ".pagination__list" !default;
19
+ $link-selector: ".pagination__link" !default;
20
+ $previous-selector: ".pagination__previous" !default;
21
+ $next-selector: ".pagination__next" !default;
22
+ $ellipsis-selector: ".pagination__ellipsis" !default;
23
+
24
+ $current-selector: "#{variables.$selector-prefix-is}current" !default;
25
+ $disabled-selector: "#{variables.$selector-prefix-is}disabled" !default;
26
+ $rounded-selector: "#{variables.$selector-prefix-is}rounded" !default;
27
+ $centered-selector: "#{variables.$selector-prefix-is}centered" !default;
28
+ $right-selector: "#{variables.$selector-prefix-is}right" !default;
29
+ $small-selector: "#{variables.$selector-prefix-is}small" !default;
30
+ $large-selector: "#{variables.$selector-prefix-is}large" !default;
31
+
32
+ $gap: variables.$size-extra-small !default;
33
+
34
+ // Tracks `$global-min-touch-target` (2.75rem / 44px) so each tile clears
35
+ // WCAG 2.5.5 AAA on its own without relying on the inter-tile `$gap`
36
+ // satisfying the 2.5.5 spacing exception. Consumers building dense pager
37
+ // strips can override to `2.5rem` (still AA) or `0` to opt out entirely.
38
+ $min-width: variables.$global-min-touch-target !default;
39
+ $padding-y: variables.$size-extra-small !default;
40
+ $padding-x: variables.$size-extra-small !default;
41
+ $border-radius: variables.$global-border-radius !default;
42
+
43
+ $border-mix: 35% !default;
44
+
45
+ $ellipsis-border-mix: 15% !default;
46
+ $ellipsis-fg-mix: 50% !default;
47
+
48
+ $current-combination: _resolve-current-combination() !default;
49
+
50
+ $hover-mix: 8% !default;
51
+
52
+ $nav-ghost: false !default;
53
+
54
+ $nav-padding-x: variables.$size-normal !default;
55
+
56
+ $chevrons: true !default;
57
+ $chevron-size: 0.5em !default;
58
+ $chevron-thickness: 0.125em !default;
59
+ $chevron-gap: variables.$size-extra-small !default;
60
+
61
+ $small-min-width: 2rem !default;
62
+ $small-font-size: variables.$size-small !default;
63
+ $large-min-width: 3rem !default;
64
+ $large-font-size: variables.$size-medium !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,183 @@
1
+ @use "sass:list";
2
+ @use "variables" as *;
3
+ @use "../../variables";
4
+ @use "../../helper/controls-internal" as controls;
5
+
6
+ // Documentation: ../../../docs/src/pages/reference/components/module/popover.mdx
7
+
8
+ @if variables.$feature-module-popover {
9
+ #{$selector} {
10
+ position: relative;
11
+ display: inline-block;
12
+
13
+ #{$panel-selector} {
14
+ @include variables.backgroundColor(
15
+ popover-bg,
16
+ list.nth($default-combination, 1),
17
+ );
18
+ @include variables.textColor(
19
+ popover-fg,
20
+ list.nth($default-combination, 2),
21
+ );
22
+ position: absolute;
23
+ visibility: hidden;
24
+ opacity: 0;
25
+ z-index: $z-index;
26
+ min-width: $min-width;
27
+ max-width: $max-width;
28
+ border: 1px solid
29
+ color-mix(in srgb, currentColor #{$border-mix}, transparent);
30
+ border-radius: $border-radius;
31
+ box-shadow: $shadow;
32
+ inset-block-end: 100%;
33
+ inset-inline-start: 50%;
34
+ transform: translate(-50%, -#{$offset});
35
+ transition:
36
+ opacity $transition-duration ease,
37
+ visibility $transition-duration ease;
38
+
39
+ @media (prefers-reduced-motion: reduce) {
40
+ transition: none;
41
+ }
42
+
43
+ #{$header-selector} {
44
+ padding: $padding-y $padding-x;
45
+ border-block-end: 1px solid
46
+ color-mix(in srgb, currentColor #{$border-mix}, transparent);
47
+ font-weight: 600;
48
+ }
49
+
50
+ #{$body-selector} {
51
+ padding: $padding-y $padding-x;
52
+ }
53
+
54
+ @if $arrow {
55
+ // CSS arrow trick: a 0×0 box with $arrow-size borders on all
56
+ // four sides forms four right triangles meeting at the centre.
57
+ // Colouring exactly one side reveals one triangle pointing
58
+ // AWAY from that side. Every modifier below sets
59
+ // `border-color: transparent` first then colours one side so
60
+ // no leftover colour from the base bleeds into the arrow
61
+ // (e.g. `.is-right` showing a stray top triangle, or
62
+ // `.is-bottom` collapsing to width 0).
63
+ &::before {
64
+ content: "";
65
+ position: absolute;
66
+ width: 0;
67
+ height: 0;
68
+ border: $arrow-size solid transparent;
69
+ inset-block-start: 100%;
70
+ inset-inline-start: 50%;
71
+ transform: translateX(-50%);
72
+ border-block-start-color: currentColor;
73
+ }
74
+ }
75
+ }
76
+
77
+ &:hover #{$panel-selector},
78
+ &:focus-within #{$panel-selector} {
79
+ visibility: visible;
80
+ opacity: 1;
81
+ }
82
+
83
+ @if variables.has-controls("js", $controls) {
84
+ &#{$active-modifier} #{$panel-selector},
85
+ &[data-open="true"] #{$panel-selector} {
86
+ visibility: visible;
87
+ opacity: 1;
88
+ }
89
+ }
90
+
91
+ &#{$top-modifier} #{$panel-selector} {
92
+ inset-block-start: auto;
93
+ inset-block-end: 100%;
94
+ inset-inline-start: 50%;
95
+ inset-inline-end: auto;
96
+ transform: translate(-50%, -#{$offset});
97
+ }
98
+
99
+ &#{$bottom-modifier} #{$panel-selector} {
100
+ inset-block-start: 100%;
101
+ inset-block-end: auto;
102
+ inset-inline-start: 50%;
103
+ inset-inline-end: auto;
104
+ transform: translate(-50%, #{$offset});
105
+ }
106
+
107
+ &#{$left-modifier} #{$panel-selector} {
108
+ inset-block-start: 50%;
109
+ inset-block-end: auto;
110
+ inset-inline-start: auto;
111
+ inset-inline-end: 100%;
112
+ transform: translate(-#{$offset}, -50%);
113
+ }
114
+
115
+ &#{$right-modifier} #{$panel-selector} {
116
+ inset-block-start: 50%;
117
+ inset-block-end: auto;
118
+ inset-inline-start: 100%;
119
+ inset-inline-end: auto;
120
+ transform: translate(#{$offset}, -50%);
121
+ }
122
+
123
+ @if $arrow {
124
+ &#{$top-modifier} #{$panel-selector}::before {
125
+ inset-block-start: 100%;
126
+ inset-block-end: auto;
127
+ inset-inline-start: 50%;
128
+ inset-inline-end: auto;
129
+ transform: translateX(-50%);
130
+ border-color: transparent;
131
+ border-block-start-color: currentColor;
132
+ }
133
+
134
+ &#{$bottom-modifier} #{$panel-selector}::before {
135
+ inset-block-start: auto;
136
+ inset-block-end: 100%;
137
+ inset-inline-start: 50%;
138
+ inset-inline-end: auto;
139
+ transform: translateX(-50%);
140
+ border-color: transparent;
141
+ border-block-end-color: currentColor;
142
+ }
143
+
144
+ &#{$left-modifier} #{$panel-selector}::before {
145
+ inset-block-start: 50%;
146
+ inset-block-end: auto;
147
+ inset-inline-start: 100%;
148
+ inset-inline-end: auto;
149
+ transform: translateY(-50%);
150
+ border-color: transparent;
151
+ border-inline-start-color: currentColor;
152
+ }
153
+
154
+ &#{$right-modifier} #{$panel-selector}::before {
155
+ inset-block-start: 50%;
156
+ inset-block-end: auto;
157
+ inset-inline-start: auto;
158
+ inset-inline-end: 100%;
159
+ transform: translateY(-50%);
160
+ border-color: transparent;
161
+ border-inline-end-color: currentColor;
162
+ }
163
+ }
164
+
165
+ // Nested links pair with the surface fg (same rationale as
166
+ // alert/card): the page-level `--kc-link` is calibrated against the
167
+ // page bg, not the popover surface bg.
168
+ @include controls.nestedLinks;
169
+
170
+ @include variables.combinations using ($label, $tuple) {
171
+ #{$panel-selector} {
172
+ @include variables.backgroundColor(#{$label}-bg, list.nth($tuple, 1));
173
+ @include variables.textColor(#{$label}-fg, list.nth($tuple, 2));
174
+ }
175
+ }
176
+
177
+ @media (forced-colors: active) {
178
+ #{$panel-selector} {
179
+ border: 1px solid CanvasText;
180
+ }
181
+ }
182
+ }
183
+ }
@@ -0,0 +1,44 @@
1
+ @use "../../variables";
2
+
3
+ // Documentation: ../../../docs/src/pages/reference/components/module/popover.mdx
4
+
5
+ $selector: ".popover" !default;
6
+ $trigger-selector: ".popover__trigger" !default;
7
+ $panel-selector: ".popover__panel" !default;
8
+ $header-selector: ".popover__header" !default;
9
+ $body-selector: ".popover__body" !default;
10
+
11
+ $active-modifier: "#{variables.$selector-prefix-is}active" !default;
12
+ $top-modifier: "#{variables.$selector-prefix-is}top" !default;
13
+ $bottom-modifier: "#{variables.$selector-prefix-is}bottom" !default;
14
+ $left-modifier: "#{variables.$selector-prefix-is}left" !default;
15
+ $right-modifier: "#{variables.$selector-prefix-is}right" !default;
16
+
17
+ $min-width: 12rem !default;
18
+ $max-width: 20rem !default;
19
+
20
+ $padding-y: variables.$size-extra-small !default;
21
+ $padding-x: variables.$size-small !default;
22
+
23
+ $offset: variables.$size-extra-small !default;
24
+
25
+ $border-radius: variables.$global-border-radius !default;
26
+
27
+ $z-index: 1070 !default;
28
+
29
+ $arrow: true !default;
30
+
31
+ $arrow-size: 6px !default;
32
+
33
+ $shadow: 0 6px 20px rgb(0 0 0 / 0.15) !default;
34
+
35
+ $transition-duration: variables.$global-transition-duration !default;
36
+
37
+ $controls: variables.$global-controls !default;
38
+
39
+ $default-combination: variables.$color-combination-default !default;
40
+
41
+ // Subtle-border tint for the panel edge and header divider. Tracks the
42
+ // framework-wide `$global-subtle-border-mix` so a consumer retuning the
43
+ // global decorative-border value pulls the popover along.
44
+ $border-mix: variables.$global-subtle-border-mix !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";