@skewedaspect/sleekspace-ui 0.8.1 → 0.9.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 (177) hide show
  1. package/dist/components/Dropdown/SkDropdown.vue.d.ts +9 -1
  2. package/dist/components/Dropdown/types.d.ts +2 -1
  3. package/dist/components/NavBar/SkNavBar.vue.d.ts +9 -1
  4. package/dist/components/NavBar/context.d.ts +2 -0
  5. package/dist/components/NavBar/types.d.ts +5 -1
  6. package/dist/components/Page/SkPage.vue.d.ts +9 -0
  7. package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +105 -4
  8. package/dist/composables/useCustomColors.d.ts +18 -56
  9. package/{src → dist}/global.d.ts +6 -2
  10. package/dist/sleekspace-ui.css +4253 -1251
  11. package/dist/sleekspace-ui.es.js +204 -109
  12. package/dist/sleekspace-ui.umd.js +204 -109
  13. package/dist/static/classes.d.ts +18 -0
  14. package/dist/static/components/alert.d.ts +12 -0
  15. package/dist/static/components/avatar.d.ts +9 -0
  16. package/dist/static/components/breadcrumbs.d.ts +6 -0
  17. package/dist/static/components/button.d.ts +13 -0
  18. package/dist/static/components/card.d.ts +5 -0
  19. package/dist/static/components/checkbox.d.ts +10 -0
  20. package/dist/static/components/colorPicker.d.ts +8 -0
  21. package/dist/static/components/divider.d.ts +8 -0
  22. package/dist/static/components/dropdown.d.ts +8 -0
  23. package/dist/static/components/field.d.ts +15 -0
  24. package/dist/static/components/group.d.ts +5 -0
  25. package/dist/static/components/input.d.ts +14 -0
  26. package/dist/static/components/navBar.d.ts +16 -0
  27. package/dist/static/components/numberInput.d.ts +15 -0
  28. package/dist/static/components/page.d.ts +9 -0
  29. package/dist/static/components/pagination.d.ts +5 -0
  30. package/dist/static/components/panel.d.ts +11 -0
  31. package/dist/static/components/progress.d.ts +9 -0
  32. package/dist/static/components/radio.d.ts +11 -0
  33. package/dist/static/components/select.d.ts +10 -0
  34. package/dist/static/components/sidebar.d.ts +9 -0
  35. package/dist/static/components/skeleton.d.ts +11 -0
  36. package/dist/static/components/slider.d.ts +12 -0
  37. package/dist/static/components/spinner.d.ts +12 -0
  38. package/dist/static/components/switchInput.d.ts +10 -0
  39. package/dist/static/components/table.d.ts +12 -0
  40. package/dist/static/components/tag.d.ts +8 -0
  41. package/dist/static/components/tagsInput.d.ts +7 -0
  42. package/dist/static/components/textarea.d.ts +12 -0
  43. package/dist/static/components/toolbar.d.ts +12 -0
  44. package/dist/static/components/tooltip.d.ts +7 -0
  45. package/dist/static/escape.d.ts +2 -0
  46. package/dist/static/index.cjs.js +1 -0
  47. package/dist/static/index.d.ts +68 -0
  48. package/dist/static/index.es.js +732 -0
  49. package/dist/static/render.d.ts +12 -0
  50. package/dist/static/specs.d.ts +2 -0
  51. package/dist/static/types.d.ts +43 -0
  52. package/dist/tokens.css +322 -0
  53. package/dist/types/index.d.ts +36 -0
  54. package/docs/guides/installation.md +8 -2
  55. package/docs/guides/pure-css/_meta.yaml +8 -0
  56. package/docs/guides/pure-css/class-api.md +1070 -0
  57. package/docs/guides/pure-css/custom-elements.md +574 -0
  58. package/docs/guides/pure-css/index.md +86 -0
  59. package/docs/guides/pure-css/limitations.md +152 -0
  60. package/docs/guides/pure-css/static-helpers.md +1203 -0
  61. package/llms-full.txt +3736 -261
  62. package/package.json +16 -5
  63. package/src/components/Card/SkCard.vue +1 -0
  64. package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +4 -1
  65. package/src/components/Dropdown/SkDropdown.vue +20 -3
  66. package/src/components/Dropdown/SkDropdownRadioGroup.vue +4 -1
  67. package/src/components/Dropdown/types.ts +2 -1
  68. package/src/components/NavBar/SkNavBar.vue +14 -4
  69. package/src/components/NavBar/context.ts +4 -2
  70. package/src/components/NavBar/types.ts +6 -1
  71. package/src/components/Page/SkPage.vue +11 -0
  72. package/src/components/Panel/SkPanel.vue +2 -1
  73. package/src/components/ScrollArea/SkScrollArea.vue +78 -5
  74. package/src/components/TreeView/SkTreeView.vue +7 -2
  75. package/src/composables/useCustomColors.ts +86 -77
  76. package/src/composables/usePortalContext.test.ts +0 -2
  77. package/src/shims.d.ts +10 -0
  78. package/src/static/__tests__/parity.test.ts +717 -0
  79. package/src/static/__tests__/parityHarness.test.ts +98 -0
  80. package/src/static/__tests__/parityHarness.ts +260 -0
  81. package/src/static/classes.test.ts +82 -0
  82. package/src/static/classes.ts +111 -0
  83. package/src/static/components/__tests__/helpers.test.ts +837 -0
  84. package/src/static/components/alert.ts +117 -0
  85. package/src/static/components/avatar.ts +86 -0
  86. package/src/static/components/breadcrumbs.ts +28 -0
  87. package/src/static/components/button.ts +75 -0
  88. package/src/static/components/card.ts +27 -0
  89. package/src/static/components/checkbox.ts +48 -0
  90. package/src/static/components/colorPicker.ts +45 -0
  91. package/src/static/components/divider.ts +39 -0
  92. package/src/static/components/dropdown.ts +36 -0
  93. package/src/static/components/field.ts +86 -0
  94. package/src/static/components/group.ts +27 -0
  95. package/src/static/components/input.ts +55 -0
  96. package/src/static/components/navBar.ts +94 -0
  97. package/src/static/components/numberInput.ts +64 -0
  98. package/src/static/components/page.ts +31 -0
  99. package/src/static/components/pagination.ts +27 -0
  100. package/src/static/components/panel.ts +33 -0
  101. package/src/static/components/progress.ts +31 -0
  102. package/src/static/components/radio.ts +53 -0
  103. package/src/static/components/select.ts +51 -0
  104. package/src/static/components/sidebar.ts +85 -0
  105. package/src/static/components/skeleton.ts +66 -0
  106. package/src/static/components/slider.ts +50 -0
  107. package/src/static/components/spinner.ts +94 -0
  108. package/src/static/components/switchInput.ts +49 -0
  109. package/src/static/components/table.ts +88 -0
  110. package/src/static/components/tag.ts +76 -0
  111. package/src/static/components/tagsInput.ts +35 -0
  112. package/src/static/components/textarea.ts +53 -0
  113. package/src/static/components/toolbar.ts +74 -0
  114. package/src/static/components/tooltip.ts +29 -0
  115. package/src/static/escape.test.ts +53 -0
  116. package/src/static/escape.ts +28 -0
  117. package/src/static/generated/defaults.ts +378 -0
  118. package/src/static/generated/propTypes.ts +425 -0
  119. package/src/static/index.ts +116 -0
  120. package/src/static/render.test.ts +83 -0
  121. package/src/static/render.ts +76 -0
  122. package/src/static/specs.test.ts +58 -0
  123. package/src/static/specs.ts +230 -0
  124. package/src/static/types.ts +176 -0
  125. package/src/styles/__tests__/testHelpers.ts +97 -0
  126. package/src/styles/base/_custom-elements.scss +51 -0
  127. package/src/styles/base/_index.scss +4 -0
  128. package/src/styles/components/__tests__/componentSelectors.test.ts +2575 -0
  129. package/src/styles/components/_alert.scss +82 -39
  130. package/src/styles/components/_avatar.scss +102 -47
  131. package/src/styles/components/_breadcrumbs.scss +39 -37
  132. package/src/styles/components/_button.scss +58 -5
  133. package/src/styles/components/_card.scss +64 -2
  134. package/src/styles/components/_checkbox.scss +35 -5
  135. package/src/styles/components/_color-picker.scss +48 -13
  136. package/src/styles/components/_divider.scss +86 -52
  137. package/src/styles/components/_dropdown.scss +214 -0
  138. package/src/styles/components/_field.scss +76 -23
  139. package/src/styles/components/_group.scss +190 -79
  140. package/src/styles/components/_index.scss +1 -0
  141. package/src/styles/components/_input.scss +81 -5
  142. package/src/styles/components/_menu.scss +1 -1
  143. package/src/styles/components/_navbar.scss +76 -45
  144. package/src/styles/components/_number-input.scss +88 -83
  145. package/src/styles/components/_page.scss +82 -23
  146. package/src/styles/components/_pagination.scss +240 -212
  147. package/src/styles/components/_panel.scss +268 -122
  148. package/src/styles/components/_progress.scss +120 -70
  149. package/src/styles/components/_radio.scss +35 -5
  150. package/src/styles/components/_scroll-area.scss +50 -22
  151. package/src/styles/components/_select.scss +40 -9
  152. package/src/styles/components/_sidebar.scss +59 -34
  153. package/src/styles/components/_skeleton.scss +111 -65
  154. package/src/styles/components/_slider.scss +34 -10
  155. package/src/styles/components/_spinner.scss +107 -56
  156. package/src/styles/components/_switch.scss +36 -5
  157. package/src/styles/components/_table.scss +150 -166
  158. package/src/styles/components/_tag.scss +244 -154
  159. package/src/styles/components/_tags-input.scss +46 -12
  160. package/src/styles/components/_textarea.scss +36 -5
  161. package/src/styles/components/_toolbar.scss +85 -31
  162. package/src/styles/components/_tooltip.scss +172 -3
  163. package/src/styles/mixins/_cut-border.scss +18 -4
  164. package/src/styles/mixins/_dual-selector.scss +192 -0
  165. package/src/styles/mixins/_index.scss +1 -0
  166. package/src/styles/mixins/dualSelector.test.ts +151 -0
  167. package/src/styles/themes/_colorful.scss +25 -0
  168. package/src/styles/themes/_greyscale.scss +25 -0
  169. package/src/styles/themes/_shade-scale.scss +39 -0
  170. package/src/styles/tokens/_semantic-color-kinds.scss +66 -0
  171. package/src/{types.ts → types/index.ts} +19 -11
  172. package/web-types.json +970 -137
  173. package/dist/composables/useCustomColors.test.d.ts +0 -1
  174. package/dist/composables/useFocusTrap.test.d.ts +0 -1
  175. package/dist/composables/usePortalContext.test.d.ts +0 -1
  176. package/dist/styles/mixins/fluidSize.test.d.ts +0 -1
  177. package/dist/types.d.ts +0 -29
@@ -1,4 +1,5 @@
1
- @use '@/styles/mixins' as *;
1
+ @use '../mixins' as *;
2
+ @use '../theme/variables' as *;
2
3
 
3
4
  //----------------------------------------------------------------------------------------------------------------------
4
5
  // Checkbox Component Styles
@@ -68,28 +69,41 @@
68
69
  transition-duration: var(--sk-transition-duration-base);
69
70
 
70
71
  // Size variants
71
- &.sk-sm
72
+
73
+ // Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
74
+ &:where(:not([class*="sk-size-"]))
75
+ {
76
+ width: 1.25rem;
77
+ height: 1.25rem;
78
+ --sk-checkbox-cut: 0.25rem;
79
+ }
80
+
81
+ &.sk-sm,
82
+ &.sk-size-sm
72
83
  {
73
84
  width: 1rem;
74
85
  height: 1rem;
75
86
  --sk-checkbox-cut: 0.2rem;
76
87
  }
77
88
 
78
- &.sk-md
89
+ &.sk-md,
90
+ &.sk-size-md
79
91
  {
80
92
  width: 1.25rem;
81
93
  height: 1.25rem;
82
94
  --sk-checkbox-cut: 0.25rem;
83
95
  }
84
96
 
85
- &.sk-lg
97
+ &.sk-lg,
98
+ &.sk-size-lg
86
99
  {
87
100
  width: 1.5rem;
88
101
  height: 1.5rem;
89
102
  --sk-checkbox-cut: 0.3rem;
90
103
  }
91
104
 
92
- &.sk-xl
105
+ &.sk-xl,
106
+ &.sk-size-xl
93
107
  {
94
108
  width: 1.75rem;
95
109
  height: 1.75rem;
@@ -238,3 +252,19 @@
238
252
  }
239
253
 
240
254
  //----------------------------------------------------------------------------------------------------------------------
255
+ // Defaults-when-absent: kind — neutral when no explicit kind class is present.
256
+ //----------------------------------------------------------------------------------------------------------------------
257
+
258
+ $_checkbox-kind-not: '';
259
+ @each $kind in $kinds
260
+ {
261
+ $_checkbox-kind-not: $_checkbox-kind-not + ':not(.sk-' + $kind + ')';
262
+ }
263
+
264
+ .sk-checkbox:where(#{ $_checkbox-kind-not })
265
+ {
266
+ --sk-checkbox-color-base: var(--sk-neutral-base);
267
+ --sk-checkbox-fg: var(--sk-neutral-text);
268
+ }
269
+
270
+ //----------------------------------------------------------------------------------------------------------------------
@@ -1,4 +1,5 @@
1
- @use '@/styles/mixins/cut-border' as *;
1
+ @use '../mixins/cut-border' as *;
2
+ @use '../theme/variables' as *;
2
3
 
3
4
  //----------------------------------------------------------------------------------------------------------------------
4
5
  // ColorPicker Component Styles
@@ -16,23 +17,33 @@
16
17
  display: inline-flex;
17
18
  width: 100%;
18
19
 
20
+ // Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
21
+ &:where(:not([class*="sk-size-"]))
22
+ {
23
+ --sk-color-picker-cut: 0.5rem;
24
+ }
25
+
19
26
  // Size variants
20
- &.sk-sm
27
+ &.sk-sm,
28
+ &.sk-size-sm
21
29
  {
22
30
  --sk-color-picker-cut: 0.4rem;
23
31
  }
24
32
 
25
- &.sk-md
33
+ &.sk-md,
34
+ &.sk-size-md
26
35
  {
27
36
  --sk-color-picker-cut: 0.5rem;
28
37
  }
29
38
 
30
- &.sk-lg
39
+ &.sk-lg,
40
+ &.sk-size-lg
31
41
  {
32
42
  --sk-color-picker-cut: 0.6rem;
33
43
  }
34
44
 
35
- &.sk-xl
45
+ &.sk-xl,
46
+ &.sk-size-xl
36
47
  {
37
48
  --sk-color-picker-cut: 0.7rem;
38
49
  }
@@ -195,28 +206,32 @@
195
206
  );
196
207
 
197
208
  // Size variants
198
- .sk-color-picker.sk-sm &
209
+ .sk-color-picker.sk-sm &,
210
+ .sk-color-picker.sk-size-sm &
199
211
  {
200
212
  width: 1.25rem;
201
213
  height: 1.25rem;
202
214
  margin-left: var(--sk-space-sm);
203
215
  }
204
216
 
205
- .sk-color-picker.sk-md &
217
+ .sk-color-picker.sk-md &,
218
+ .sk-color-picker.sk-size-md &
206
219
  {
207
220
  width: 1.5rem;
208
221
  height: 1.5rem;
209
222
  margin-left: var(--sk-space-md);
210
223
  }
211
224
 
212
- .sk-color-picker.sk-lg &
225
+ .sk-color-picker.sk-lg &,
226
+ .sk-color-picker.sk-size-lg &
213
227
  {
214
228
  width: 1.75rem;
215
229
  height: 1.75rem;
216
230
  margin-left: var(--sk-space-md);
217
231
  }
218
232
 
219
- .sk-color-picker.sk-xl &
233
+ .sk-color-picker.sk-xl &,
234
+ .sk-color-picker.sk-size-xl &
220
235
  {
221
236
  width: 2rem;
222
237
  height: 2rem;
@@ -242,28 +257,32 @@
242
257
  white-space: nowrap;
243
258
 
244
259
  // Size variants
245
- .sk-color-picker.sk-sm &
260
+ .sk-color-picker.sk-sm &,
261
+ .sk-color-picker.sk-size-sm &
246
262
  {
247
263
  height: 2rem;
248
264
  padding: 0 var(--sk-space-xs);
249
265
  font-size: 0.8125rem;
250
266
  }
251
267
 
252
- .sk-color-picker.sk-md &
268
+ .sk-color-picker.sk-md &,
269
+ .sk-color-picker.sk-size-md &
253
270
  {
254
271
  height: 2.5rem;
255
272
  padding: 0 var(--sk-space-sm);
256
273
  font-size: 0.875rem;
257
274
  }
258
275
 
259
- .sk-color-picker.sk-lg &
276
+ .sk-color-picker.sk-lg &,
277
+ .sk-color-picker.sk-size-lg &
260
278
  {
261
279
  height: 3rem;
262
280
  padding: 0 var(--sk-space-sm);
263
281
  font-size: 1rem;
264
282
  }
265
283
 
266
- .sk-color-picker.sk-xl &
284
+ .sk-color-picker.sk-xl &,
285
+ .sk-color-picker.sk-size-xl &
267
286
  {
268
287
  height: 3.5rem;
269
288
  padding: 0 var(--sk-space-sm);
@@ -553,3 +572,19 @@
553
572
  }
554
573
 
555
574
  //----------------------------------------------------------------------------------------------------------------------
575
+ // Defaults-when-absent: kind — neutral when no explicit kind class is present.
576
+ //----------------------------------------------------------------------------------------------------------------------
577
+
578
+ $_color-picker-kind-not: '';
579
+ @each $kind in $kinds
580
+ {
581
+ $_color-picker-kind-not: $_color-picker-kind-not + ':not(.sk-' + $kind + ')';
582
+ }
583
+
584
+ .sk-color-picker:where(#{ $_color-picker-kind-not })
585
+ {
586
+ --sk-color-picker-color-base: var(--sk-neutral-base);
587
+ --sk-color-picker-fg: var(--sk-neutral-text);
588
+ }
589
+
590
+ //----------------------------------------------------------------------------------------------------------------------
@@ -3,12 +3,14 @@
3
3
  //----------------------------------------------------------------------------------------------------------------------
4
4
 
5
5
  @use '../theme/variables' as *;
6
+ @use '../mixins/dual-selector' as *;
6
7
 
7
8
  //----------------------------------------------------------------------------------------------------------------------
8
9
  // Divider Design Tokens
9
10
  //----------------------------------------------------------------------------------------------------------------------
10
11
 
11
- .sk-divider
12
+ .sk-divider,
13
+ sk-divider
12
14
  {
13
15
  //------------------------------------------------------------------------------------------------------------------
14
16
  // Dimension Tokens
@@ -34,26 +36,12 @@
34
36
  --sk-divider-border-color: var(--sk-divider-color);
35
37
  }
36
38
 
37
- //----------------------------------------------------------------------------------------------------------------------
38
- // Kind Mixin
39
- //----------------------------------------------------------------------------------------------------------------------
40
-
41
- @mixin divider-kind($kind)
42
- {
43
- &.sk-#{ "" + $kind }
44
- {
45
- --sk-divider-color: var(--sk-#{ $kind }-base);
46
-
47
- // Set generic kind color for list markers and other cross-component features
48
- --sk-kind-color: var(--sk-#{ $kind }-base);
49
- }
50
- }
51
-
52
39
  //----------------------------------------------------------------------------------------------------------------------
53
40
  // Base Divider Styles
54
41
  //----------------------------------------------------------------------------------------------------------------------
55
42
 
56
- .sk-divider
43
+ .sk-divider,
44
+ sk-divider
57
45
  {
58
46
  // Reset default hr styles
59
47
  border: none;
@@ -71,51 +59,97 @@
71
59
  {
72
60
  color: var(--sk-kind-color, var(--sk-divider-color));
73
61
  }
62
+ }
74
63
 
75
- //------------------------------------------------------------------------------------------------------------------
76
- // Orientation: Horizontal (default)
77
- //------------------------------------------------------------------------------------------------------------------
64
+ //----------------------------------------------------------------------------------------------------------------------
65
+ // Kind Variants
66
+ //----------------------------------------------------------------------------------------------------------------------
78
67
 
79
- &.sk-horizontal
68
+ @each $kind in $kinds
69
+ {
70
+ @include kind-variant('divider', $kind)
80
71
  {
81
- width: 100%;
82
- height: 0;
83
- border-top-width: var(--sk-divider-border-width);
84
- margin-top: var(--sk-divider-spacing-vertical);
85
- margin-bottom: var(--sk-divider-spacing-vertical);
72
+ --sk-divider-color: var(--sk-#{ $kind }-base);
73
+
74
+ // Set generic kind color for list markers and other cross-component features
75
+ --sk-kind-color: var(--sk-#{ $kind }-base);
86
76
  }
77
+ }
87
78
 
88
- //------------------------------------------------------------------------------------------------------------------
89
- // Orientation: Vertical
90
- //------------------------------------------------------------------------------------------------------------------
79
+ //----------------------------------------------------------------------------------------------------------------------
80
+ // Orientation Modifiers
81
+ //----------------------------------------------------------------------------------------------------------------------
91
82
 
92
- &.sk-vertical
93
- {
94
- width: 0;
95
- height: auto;
96
- align-self: stretch;
97
- border-left-width: var(--sk-divider-border-width);
98
- margin-left: var(--sk-divider-spacing-horizontal);
99
- margin-right: var(--sk-divider-spacing-horizontal);
100
- }
83
+ @include single-choice-modifier('divider', 'orientation', 'horizontal')
84
+ {
85
+ width: 100%;
86
+ height: 0;
87
+ border-top-width: var(--sk-divider-border-width);
88
+ margin-top: var(--sk-divider-spacing-vertical);
89
+ margin-bottom: var(--sk-divider-spacing-vertical);
90
+ }
101
91
 
102
- //------------------------------------------------------------------------------------------------------------------
103
- // Variant: Subtle
104
- //------------------------------------------------------------------------------------------------------------------
92
+ @include single-choice-modifier('divider', 'orientation', 'vertical')
93
+ {
94
+ width: 0;
95
+ height: auto;
96
+ align-self: stretch;
97
+ border-left-width: var(--sk-divider-border-width);
98
+ margin-left: var(--sk-divider-spacing-horizontal);
99
+ margin-right: var(--sk-divider-spacing-horizontal);
100
+ }
105
101
 
106
- &.sk-subtle
107
- {
108
- opacity: var(--sk-opacity-subtle);
109
- }
102
+ //----------------------------------------------------------------------------------------------------------------------
103
+ // Subtle Modifier
104
+ //----------------------------------------------------------------------------------------------------------------------
110
105
 
111
- //------------------------------------------------------------------------------------------------------------------
112
- // Kind variants
113
- //------------------------------------------------------------------------------------------------------------------
106
+ @include bool-modifier('divider', 'subtle')
107
+ {
108
+ opacity: var(--sk-opacity-subtle);
109
+ }
114
110
 
115
- @each $kind in $kinds
116
- {
117
- @include divider-kind($kind);
118
- }
111
+ //----------------------------------------------------------------------------------------------------------------------
112
+ // Defaults When Absent
113
+ //----------------------------------------------------------------------------------------------------------------------
114
+
115
+ // Default orientation: horizontal — fires when no sk-orientation-* class is present.
116
+ @include defaults-when-absent('divider', 'sk-orientation-')
117
+ {
118
+ width: 100%;
119
+ height: 0;
120
+ border-top-width: var(--sk-divider-border-width);
121
+ margin-top: var(--sk-divider-spacing-vertical);
122
+ margin-bottom: var(--sk-divider-spacing-vertical);
123
+ }
124
+
125
+ // Default kind: neutral — explicit :not() chain for zero-specificity default.
126
+ $_divider-kind-not: '';
127
+ @each $kind in $kinds
128
+ {
129
+ $_divider-kind-not: $_divider-kind-not + ':not(.sk-' + $kind + ')';
130
+ }
131
+
132
+ .sk-divider:where(#{ $_divider-kind-not })
133
+ {
134
+ --sk-divider-color: var(--sk-neutral-base);
135
+ --sk-kind-color: var(--sk-neutral-base);
136
+ }
137
+
138
+ // Default kind for custom-element API — fires when <sk-divider> has no kind attribute.
139
+ @include defaults-when-no-attr('divider', 'kind')
140
+ {
141
+ --sk-divider-color: var(--sk-neutral-base);
142
+ --sk-kind-color: var(--sk-neutral-base);
143
+ }
144
+
145
+ // Default orientation for custom-element API — fires when <sk-divider> has no orientation attribute.
146
+ @include defaults-when-no-attr('divider', 'orientation')
147
+ {
148
+ width: 100%;
149
+ height: 0;
150
+ border-top-width: var(--sk-divider-border-width);
151
+ margin-top: var(--sk-divider-spacing-vertical);
152
+ margin-bottom: var(--sk-divider-spacing-vertical);
119
153
  }
120
154
 
121
155
  //----------------------------------------------------------------------------------------------------------------------
@@ -0,0 +1,214 @@
1
+ //----------------------------------------------------------------------------------------------------------------------
2
+ // Dropdown Component Styles
3
+ //
4
+ // Pure-CSS disclosure dropdown built on <details>/<summary>.
5
+ //
6
+ // Usage:
7
+ // <details class="sk-dropdown sk-primary">
8
+ // <summary>Actions</summary>
9
+ // <a href="#">Item 1</a>
10
+ // <a href="#">Item 2</a>
11
+ // </details>
12
+ //
13
+ // Limitations:
14
+ // - No focus trap; keyboard navigation is whatever <details> provides natively.
15
+ // - No keyboard menu role (not aria-menu). Use a real menu component for that.
16
+ // - Panel is in normal document flow — it pushes siblings down (no portal overlay).
17
+ // - No animation beyond what the browser provides for <details>.
18
+ //----------------------------------------------------------------------------------------------------------------------
19
+
20
+ @use '../mixins/cut-border' as *;
21
+ @use '../theme/variables' as *;
22
+
23
+ //----------------------------------------------------------------------------------------------------------------------
24
+ // Dropdown Root (<details>)
25
+ //----------------------------------------------------------------------------------------------------------------------
26
+
27
+ .sk-dropdown
28
+ {
29
+ // Color tokens — kind sets these
30
+ --sk-dropdown-color-base: var(--sk-neutral-base);
31
+ --sk-dropdown-fg: var(--sk-neutral-text);
32
+
33
+ // Size token
34
+ --sk-dropdown-cut: 0.5rem;
35
+
36
+ position: relative;
37
+ display: inline-block;
38
+
39
+ // Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
40
+ &:where(:not([class*="sk-size-"]))
41
+ {
42
+ --sk-dropdown-cut: 0.5rem;
43
+ }
44
+
45
+ // Size variants
46
+ &.sk-sm,
47
+ &.sk-size-sm
48
+ {
49
+ --sk-dropdown-cut: 0.4rem;
50
+ }
51
+
52
+ &.sk-md,
53
+ &.sk-size-md
54
+ {
55
+ --sk-dropdown-cut: 0.5rem;
56
+ }
57
+
58
+ &.sk-lg,
59
+ &.sk-size-lg
60
+ {
61
+ --sk-dropdown-cut: 0.625rem;
62
+ }
63
+ }
64
+
65
+ //----------------------------------------------------------------------------------------------------------------------
66
+ // Summary Trigger
67
+ //----------------------------------------------------------------------------------------------------------------------
68
+
69
+ .sk-dropdown > summary
70
+ {
71
+ display: flex;
72
+ align-items: center;
73
+ gap: var(--sk-space-xs);
74
+ padding: var(--sk-space-xs) var(--sk-space-md);
75
+ cursor: pointer;
76
+ user-select: none;
77
+ list-style: none;
78
+
79
+ @include cut-border(
80
+ $cut: var(--sk-dropdown-cut),
81
+ $border-width: var(--sk-border-width-thin),
82
+ $border-color: var(--sk-dropdown-color-base),
83
+ $corners: (top-right)
84
+ );
85
+
86
+ background: color-mix(
87
+ in oklch,
88
+ color-mix(in oklch, var(--sk-dropdown-color-base) 75%, transparent 25%),
89
+ #000 65%
90
+ );
91
+ color: var(--sk-dropdown-fg);
92
+
93
+ transition-property: background, border-color;
94
+ transition-duration: var(--sk-transition-duration-base);
95
+
96
+ // Hide native disclosure triangle in webkit/blink
97
+ &::-webkit-details-marker
98
+ {
99
+ display: none;
100
+ }
101
+
102
+ &:hover
103
+ {
104
+ border-color: color-mix(in oklch, var(--sk-dropdown-color-base), white 20%);
105
+ background: color-mix(
106
+ in oklch,
107
+ color-mix(in oklch, var(--sk-dropdown-color-base) 75%, transparent 25%),
108
+ #000 50%
109
+ );
110
+ transition-duration: var(--sk-transition-duration-fast);
111
+ }
112
+
113
+ &:focus-visible
114
+ {
115
+ outline: 2px solid var(--sk-focus-ring-color);
116
+ outline-offset: 2px;
117
+ }
118
+ }
119
+
120
+ //----------------------------------------------------------------------------------------------------------------------
121
+ // Open State
122
+ //----------------------------------------------------------------------------------------------------------------------
123
+
124
+ .sk-dropdown[open] > summary
125
+ {
126
+ border-color: color-mix(in oklch, var(--sk-dropdown-color-base), white 30%);
127
+ background: color-mix(
128
+ in oklch,
129
+ color-mix(in oklch, var(--sk-dropdown-color-base) 75%, transparent 25%),
130
+ #000 40%
131
+ );
132
+ }
133
+
134
+ //----------------------------------------------------------------------------------------------------------------------
135
+ // Panel (non-summary children)
136
+ //----------------------------------------------------------------------------------------------------------------------
137
+
138
+ .sk-dropdown > :not(summary)
139
+ {
140
+ display: block;
141
+ padding: var(--sk-space-xs) var(--sk-space-md);
142
+ color: var(--sk-dropdown-fg);
143
+ font-size: 0.875rem;
144
+ cursor: pointer;
145
+ user-select: none;
146
+ text-decoration: none;
147
+
148
+ @include cut-border(
149
+ $cut: var(--sk-dropdown-cut),
150
+ $border-width: var(--sk-border-width-thin),
151
+ $border-color: transparent,
152
+ $corners: (top-left bottom-right)
153
+ );
154
+
155
+ background: color-mix(
156
+ in oklch,
157
+ color-mix(in oklch, var(--sk-dropdown-color-base) 95%, transparent 5%),
158
+ #000 50%
159
+ );
160
+
161
+ transition-property: background, color;
162
+ transition-duration: var(--sk-transition-duration-base);
163
+
164
+ &:hover
165
+ {
166
+ background: color-mix(
167
+ in oklch,
168
+ color-mix(in oklch, var(--sk-dropdown-color-base), black 30%),
169
+ transparent 10%
170
+ );
171
+ color: var(--sk-dropdown-fg);
172
+ transition-duration: var(--sk-transition-duration-fast);
173
+ }
174
+
175
+ &:focus-visible
176
+ {
177
+ outline: 2px solid var(--sk-focus-ring-color);
178
+ outline-offset: -2px;
179
+ }
180
+ }
181
+
182
+ //----------------------------------------------------------------------------------------------------------------------
183
+ // Kind Variants
184
+ //----------------------------------------------------------------------------------------------------------------------
185
+
186
+ .sk-dropdown
187
+ {
188
+ @each $kind in $semantic-kinds
189
+ {
190
+ &.sk-#{ '' + $kind }
191
+ {
192
+ --sk-dropdown-color-base: var(--sk-#{ $kind }-base);
193
+ --sk-dropdown-fg: var(--sk-#{ $kind }-text);
194
+ }
195
+ }
196
+ }
197
+
198
+ //----------------------------------------------------------------------------------------------------------------------
199
+ // Defaults-when-absent: kind — neutral when no explicit kind class is present.
200
+ //----------------------------------------------------------------------------------------------------------------------
201
+
202
+ $_dropdown-kind-not: '';
203
+ @each $kind in $semantic-kinds
204
+ {
205
+ $_dropdown-kind-not: $_dropdown-kind-not + ':not(.sk-' + $kind + ')';
206
+ }
207
+
208
+ .sk-dropdown:where(#{ $_dropdown-kind-not })
209
+ {
210
+ --sk-dropdown-color-base: var(--sk-neutral-base);
211
+ --sk-dropdown-fg: var(--sk-neutral-text);
212
+ }
213
+
214
+ //----------------------------------------------------------------------------------------------------------------------