@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
@@ -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
  // Panel Design Tokens
9
10
  //----------------------------------------------------------------------------------------------------------------------
10
11
 
11
- .sk-panel
12
+ .sk-panel,
13
+ sk-panel
12
14
  {
13
15
  //------------------------------------------------------------------------------------------------------------------
14
16
  // Dimension Tokens
@@ -91,38 +93,12 @@
91
93
  --sk-panel-glow: inset 0 0 var(--sk-panel-glow-size) oklch(from var(--sk-panel-color-base) l c h / var(--sk-panel-glow-opacity));
92
94
  }
93
95
 
94
- //----------------------------------------------------------------------------------------------------------------------
95
- // Kind Mixin
96
- //----------------------------------------------------------------------------------------------------------------------
97
-
98
- @mixin panel-kind($kind)
99
- {
100
- &.sk-#{ "" + $kind }
101
- {
102
- // Override base color tokens for this kind
103
- --sk-panel-color-base: var(--sk-#{ $kind }-base);
104
- --sk-panel-fg: var(--sk-#{ $kind }-text);
105
-
106
- // Set generic kind color for list markers and other cross-component features
107
- --sk-kind-color: var(--sk-#{ $kind }-base);
108
-
109
- // Set dynamic border color
110
- --sk-panel-border-color: var(--sk-panel-border-base);
111
-
112
- // Use calculated background and foreground
113
- background-color: var(--sk-panel-bg);
114
- color: var(--sk-panel-fg);
115
-
116
- // Apply inner glow (works in both modern and fallback browsers)
117
- box-shadow: var(--sk-panel-glow);
118
- }
119
- }
120
-
121
96
  //----------------------------------------------------------------------------------------------------------------------
122
97
  // Base Panel Styles
123
98
  //----------------------------------------------------------------------------------------------------------------------
124
99
 
125
- .sk-panel
100
+ .sk-panel,
101
+ sk-panel
126
102
  {
127
103
  // Base structure
128
104
  display: block;
@@ -146,15 +122,6 @@
146
122
  color: var(--sk-kind-color, var(--sk-panel-color-base));
147
123
  }
148
124
 
149
- //------------------------------------------------------------------------------------------------------------------
150
- // Corner toggle classes
151
- //------------------------------------------------------------------------------------------------------------------
152
-
153
- &.sk-cut-top-left { --sk-panel-cut-tl: var(--sk-panel-cut-size); }
154
- &.sk-cut-top-right { --sk-panel-cut-tr: var(--sk-panel-cut-size); }
155
- &.sk-cut-bottom-right { --sk-panel-cut-br: var(--sk-panel-cut-size); }
156
- &.sk-cut-bottom-left { --sk-panel-cut-bl: var(--sk-panel-cut-size); }
157
-
158
125
  //------------------------------------------------------------------------------------------------------------------
159
126
  // Beveled corners (modern path)
160
127
  //------------------------------------------------------------------------------------------------------------------
@@ -228,7 +195,7 @@
228
195
  }
229
196
 
230
197
  //------------------------------------------------------------------------------------------------------------------
231
- // Corner decoration line
198
+ // Corner decoration line (base element)
232
199
  //------------------------------------------------------------------------------------------------------------------
233
200
 
234
201
  &::after
@@ -243,84 +210,6 @@
243
210
  pointer-events: none;
244
211
  }
245
212
 
246
- // Bottom-right decoration (default)
247
- &.sk-decoration-bottom-right::after
248
- {
249
- right: var(--sk-panel-decoration-offset);
250
- bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
251
- transform: rotate(135deg);
252
- }
253
-
254
- // Top-left decoration (same diagonal as bottom-right)
255
- &.sk-decoration-top-left::after
256
- {
257
- left: var(--sk-panel-decoration-offset);
258
- top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
259
- transform: rotate(135deg);
260
- }
261
-
262
- // Top-right decoration
263
- &.sk-decoration-top-right::after
264
- {
265
- right: var(--sk-panel-decoration-offset);
266
- top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
267
- transform: rotate(45deg);
268
- }
269
-
270
- // Bottom-left decoration
271
- &.sk-decoration-bottom-left::after
272
- {
273
- left: var(--sk-panel-decoration-offset);
274
- bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
275
- transform: rotate(45deg);
276
- }
277
-
278
- //------------------------------------------------------------------------------------------------------------------
279
- // Size variants (only affects cut size, not padding or dimensions)
280
- //------------------------------------------------------------------------------------------------------------------
281
-
282
- &.sk-xs
283
- {
284
- --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 0.5 / var(--sk-panel-radius-factor));
285
- }
286
-
287
- &.sk-sm
288
- {
289
- --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 0.75 / var(--sk-panel-radius-factor));
290
- }
291
-
292
- &.sk-md
293
- {
294
- --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.0 / var(--sk-panel-radius-factor));
295
- }
296
-
297
- &.sk-lg
298
- {
299
- --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.5 / var(--sk-panel-radius-factor));
300
- }
301
-
302
- &.sk-xl
303
- {
304
- --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 2.0 / var(--sk-panel-radius-factor));
305
- }
306
-
307
- //------------------------------------------------------------------------------------------------------------------
308
- // No Border variant
309
- //------------------------------------------------------------------------------------------------------------------
310
-
311
- &.sk-no-border
312
- {
313
- // Remove border and glow but keep the bevel shape
314
- --sk-panel-border-width: 0;
315
- box-shadow: none;
316
-
317
- // Remove the decoration as well
318
- &::after
319
- {
320
- display: none;
321
- }
322
- }
323
-
324
213
  //------------------------------------------------------------------------------------------------------------------
325
214
  // Scrollable Panel Support
326
215
  //------------------------------------------------------------------------------------------------------------------
@@ -378,14 +267,271 @@
378
267
  );
379
268
  }
380
269
  }
270
+ }
381
271
 
382
- //------------------------------------------------------------------------------------------------------------------
383
- // Kind variants
384
- //------------------------------------------------------------------------------------------------------------------
272
+ //----------------------------------------------------------------------------------------------------------------------
273
+ // Kind Variants
274
+ //----------------------------------------------------------------------------------------------------------------------
385
275
 
386
- @each $kind in $kinds
276
+ @each $kind in $kinds
277
+ {
278
+ @include kind-variant('panel', $kind)
387
279
  {
388
- @include panel-kind($kind);
280
+ // Override base color tokens for this kind
281
+ --sk-panel-color-base: var(--sk-#{ $kind }-base);
282
+ --sk-panel-fg: var(--sk-#{ $kind }-text);
283
+
284
+ // Set generic kind color for list markers and other cross-component features
285
+ --sk-kind-color: var(--sk-#{ $kind }-base);
286
+
287
+ // Set dynamic border color
288
+ --sk-panel-border-color: var(--sk-panel-border-base);
289
+
290
+ // Use calculated background and foreground
291
+ background-color: var(--sk-panel-bg);
292
+ color: var(--sk-panel-fg);
293
+
294
+ // Apply inner glow (works in both modern and fallback browsers)
295
+ box-shadow: var(--sk-panel-glow);
296
+ }
297
+ }
298
+
299
+ //----------------------------------------------------------------------------------------------------------------------
300
+ // Size Variants
301
+ //----------------------------------------------------------------------------------------------------------------------
302
+ // Each size emits three selectors via size-variant: .sk-panel.sk-<size>, .sk-panel.sk-size-<size>,
303
+ // and sk-panel[size="<size>"]. The sk-size-* prefixed form is what defaults-when-absent keys on.
304
+
305
+ $_panel-size-factors: (
306
+ xs: 0.5,
307
+ sm: 0.75,
308
+ md: 1.0,
309
+ lg: 1.5,
310
+ xl: 2.0,
311
+ );
312
+
313
+ @each $size, $factor in $_panel-size-factors
314
+ {
315
+ @include size-variant('panel', $size)
316
+ {
317
+ --sk-panel-cut-size: calc(var(--sk-panel-min-height) * #{ $factor } / var(--sk-panel-radius-factor));
318
+ }
319
+ }
320
+
321
+ //----------------------------------------------------------------------------------------------------------------------
322
+ // Corner Cut Modifiers
323
+ //----------------------------------------------------------------------------------------------------------------------
324
+
325
+ @include list-modifier('panel', 'cut', 'top-left', 'corners')
326
+ {
327
+ --sk-panel-cut-tl: var(--sk-panel-cut-size);
328
+ }
329
+
330
+ @include list-modifier('panel', 'cut', 'top-right', 'corners')
331
+ {
332
+ --sk-panel-cut-tr: var(--sk-panel-cut-size);
333
+ }
334
+
335
+ @include list-modifier('panel', 'cut', 'bottom-right', 'corners')
336
+ {
337
+ --sk-panel-cut-br: var(--sk-panel-cut-size);
338
+ }
339
+
340
+ @include list-modifier('panel', 'cut', 'bottom-left', 'corners')
341
+ {
342
+ --sk-panel-cut-bl: var(--sk-panel-cut-size);
343
+ }
344
+
345
+ //----------------------------------------------------------------------------------------------------------------------
346
+ // Decoration Corner Modifiers
347
+ //----------------------------------------------------------------------------------------------------------------------
348
+
349
+ @include single-choice-modifier('panel', 'decoration', 'bottom-right', 'decoration-corner')
350
+ {
351
+ &::after
352
+ {
353
+ right: var(--sk-panel-decoration-offset);
354
+ bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
355
+ transform: rotate(135deg);
356
+ }
357
+ }
358
+
359
+ @include single-choice-modifier('panel', 'decoration', 'top-left', 'decoration-corner')
360
+ {
361
+ &::after
362
+ {
363
+ left: var(--sk-panel-decoration-offset);
364
+ top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
365
+ transform: rotate(135deg);
366
+ }
367
+ }
368
+
369
+ @include single-choice-modifier('panel', 'decoration', 'top-right', 'decoration-corner')
370
+ {
371
+ &::after
372
+ {
373
+ right: var(--sk-panel-decoration-offset);
374
+ top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
375
+ transform: rotate(45deg);
376
+ }
377
+ }
378
+
379
+ @include single-choice-modifier('panel', 'decoration', 'bottom-left', 'decoration-corner')
380
+ {
381
+ &::after
382
+ {
383
+ left: var(--sk-panel-decoration-offset);
384
+ bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
385
+ transform: rotate(45deg);
386
+ }
387
+ }
388
+
389
+ //----------------------------------------------------------------------------------------------------------------------
390
+ // No Border Modifier
391
+ //----------------------------------------------------------------------------------------------------------------------
392
+
393
+ @include bool-modifier('panel', 'no-border')
394
+ {
395
+ // Remove border and glow but keep the bevel shape
396
+ --sk-panel-border-width: 0;
397
+ box-shadow: none;
398
+
399
+ // Remove the decoration as well
400
+ &::after
401
+ {
402
+ display: none;
403
+ }
404
+ }
405
+
406
+ //----------------------------------------------------------------------------------------------------------------------
407
+ // No Decoration Modifier
408
+ //----------------------------------------------------------------------------------------------------------------------
409
+
410
+ @include bool-modifier('panel', 'no-decoration')
411
+ {
412
+ &::after
413
+ {
414
+ display: none;
415
+ }
416
+ }
417
+
418
+ // Per-corner fallback: hide decoration automatically when the targeted corner isn't cut.
419
+ // This is the pure-CSS equivalent of the `decorationCorner not in corners` check in SkPanel.vue.
420
+
421
+ .sk-panel.sk-decoration-bottom-right:not(.sk-cut-bottom-right)::after,
422
+ sk-panel[decoration-corner="bottom-right"]:not([corners~="bottom-right"])::after
423
+ {
424
+ display: none;
425
+ }
426
+
427
+ .sk-panel.sk-decoration-top-left:not(.sk-cut-top-left)::after,
428
+ sk-panel[decoration-corner="top-left"]:not([corners~="top-left"])::after
429
+ {
430
+ display: none;
431
+ }
432
+
433
+ .sk-panel.sk-decoration-top-right:not(.sk-cut-top-right)::after,
434
+ sk-panel[decoration-corner="top-right"]:not([corners~="top-right"])::after
435
+ {
436
+ display: none;
437
+ }
438
+
439
+ .sk-panel.sk-decoration-bottom-left:not(.sk-cut-bottom-left)::after,
440
+ sk-panel[decoration-corner="bottom-left"]:not([corners~="bottom-left"])::after
441
+ {
442
+ display: none;
443
+ }
444
+
445
+ //----------------------------------------------------------------------------------------------------------------------
446
+ // Defaults When Absent
447
+ //----------------------------------------------------------------------------------------------------------------------
448
+
449
+ // Default size: md — fires when no sk-size-* class is present (zero specificity via :where).
450
+ // Note: Vue emits sk-md (bare), which also matches .sk-panel.sk-md (higher specificity) — so
451
+ // explicit size rules always win. This default only affects bare `.sk-panel` with no size class.
452
+ // Default cut size = md factor (1.0). Keep in sync with $_panel-size-factors's md entry.
453
+ @include defaults-when-absent('panel', 'sk-size-')
454
+ {
455
+ --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.0 / var(--sk-panel-radius-factor));
456
+ }
457
+
458
+ // Default kind: neutral — can't use [class*="sk-"] because every Sleekspace class starts with
459
+ // "sk-". Instead we build an explicit :not() chain for all kinds from $kinds, wrapped in
460
+ // :where() for zero specificity so any explicit kind class wins.
461
+ $_panel-kind-not: '';
462
+ @each $kind in $kinds
463
+ {
464
+ $_panel-kind-not: $_panel-kind-not + ':not(.sk-' + $kind + ')';
465
+ }
466
+
467
+ .sk-panel:where(#{ $_panel-kind-not })
468
+ {
469
+ --sk-panel-color-base: var(--sk-neutral-base);
470
+ --sk-panel-fg: var(--sk-neutral-text);
471
+ --sk-kind-color: var(--sk-neutral-base);
472
+ --sk-panel-border-color: var(--sk-panel-border-base);
473
+ background-color: var(--sk-panel-bg);
474
+ color: var(--sk-panel-fg);
475
+ box-shadow: var(--sk-panel-glow);
476
+ }
477
+
478
+ // Default cut: bottom-right — fires when no sk-cut-* class is present.
479
+ @include defaults-when-absent('panel', 'sk-cut-')
480
+ {
481
+ --sk-panel-cut-br: var(--sk-panel-cut-size);
482
+ }
483
+
484
+ // Default decoration corner = bottom-right. Keep in sync with the bottom-right
485
+ // single-choice-modifier block above.
486
+ @include defaults-when-absent('panel', 'sk-decoration-')
487
+ {
488
+ &::after
489
+ {
490
+ right: var(--sk-panel-decoration-offset);
491
+ bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
492
+ transform: rotate(135deg);
493
+ }
494
+ }
495
+
496
+ //----------------------------------------------------------------------------------------------------------------------
497
+ // Custom-Element API Defaults (attribute-absence path)
498
+ //----------------------------------------------------------------------------------------------------------------------
499
+ // Parallel defaults for <sk-panel> (no class API). Zero-specificity via :where() so any
500
+ // explicit attribute value wins. These mirror the class-API defaults above, but key on
501
+ // the absence of the HTML attribute rather than the absence of a class prefix.
502
+
503
+ // Default kind: neutral — fires when <sk-panel> has no kind attribute.
504
+ @include defaults-when-no-attr('panel', 'kind')
505
+ {
506
+ --sk-panel-color-base: var(--sk-neutral-base);
507
+ --sk-panel-fg: var(--sk-neutral-text);
508
+ --sk-kind-color: var(--sk-neutral-base);
509
+ --sk-panel-border-color: var(--sk-panel-border-base);
510
+ background-color: var(--sk-panel-bg);
511
+ color: var(--sk-panel-fg);
512
+ box-shadow: var(--sk-panel-glow);
513
+ }
514
+
515
+ // Default size: md — fires when <sk-panel> has no size attribute.
516
+ @include defaults-when-no-attr('panel', 'size')
517
+ {
518
+ --sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.0 / var(--sk-panel-radius-factor));
519
+ }
520
+
521
+ // Default cut: bottom-right — fires when <sk-panel> has no corners attribute.
522
+ @include defaults-when-no-attr('panel', 'corners')
523
+ {
524
+ --sk-panel-cut-br: var(--sk-panel-cut-size);
525
+ }
526
+
527
+ // Default decoration corner: bottom-right — fires when <sk-panel> has no decoration-corner attribute.
528
+ @include defaults-when-no-attr('panel', 'decoration-corner')
529
+ {
530
+ &::after
531
+ {
532
+ right: var(--sk-panel-decoration-offset);
533
+ bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
534
+ transform: rotate(135deg);
389
535
  }
390
536
  }
391
537