@skewedaspect/sleekspace-ui 0.8.1 → 0.9.1

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 (191) 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/NumberInput/SkNumberInput.vue.d.ts +8 -0
  7. package/dist/components/Page/SkPage.vue.d.ts +9 -0
  8. package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +105 -4
  9. package/dist/composables/useCustomColors.d.ts +18 -56
  10. package/{src → dist}/global.d.ts +6 -2
  11. package/dist/sleekspace-ui.css +4257 -1253
  12. package/dist/sleekspace-ui.es.js +300 -170
  13. package/dist/sleekspace-ui.umd.js +299 -169
  14. package/dist/static/classes.d.ts +18 -0
  15. package/dist/static/components/alert.d.ts +12 -0
  16. package/dist/static/components/avatar.d.ts +9 -0
  17. package/dist/static/components/breadcrumbs.d.ts +6 -0
  18. package/dist/static/components/button.d.ts +13 -0
  19. package/dist/static/components/card.d.ts +5 -0
  20. package/dist/static/components/checkbox.d.ts +10 -0
  21. package/dist/static/components/colorPicker.d.ts +8 -0
  22. package/dist/static/components/divider.d.ts +8 -0
  23. package/dist/static/components/dropdown.d.ts +8 -0
  24. package/dist/static/components/field.d.ts +15 -0
  25. package/dist/static/components/group.d.ts +5 -0
  26. package/dist/static/components/input.d.ts +14 -0
  27. package/dist/static/components/navBar.d.ts +16 -0
  28. package/dist/static/components/numberInput.d.ts +15 -0
  29. package/dist/static/components/page.d.ts +9 -0
  30. package/dist/static/components/pagination.d.ts +5 -0
  31. package/dist/static/components/panel.d.ts +11 -0
  32. package/dist/static/components/progress.d.ts +9 -0
  33. package/dist/static/components/radio.d.ts +11 -0
  34. package/dist/static/components/select.d.ts +10 -0
  35. package/dist/static/components/sidebar.d.ts +9 -0
  36. package/dist/static/components/skeleton.d.ts +11 -0
  37. package/dist/static/components/slider.d.ts +12 -0
  38. package/dist/static/components/spinner.d.ts +12 -0
  39. package/dist/static/components/switchInput.d.ts +10 -0
  40. package/dist/static/components/table.d.ts +12 -0
  41. package/dist/static/components/tag.d.ts +8 -0
  42. package/dist/static/components/tagsInput.d.ts +7 -0
  43. package/dist/static/components/textarea.d.ts +12 -0
  44. package/dist/static/components/toolbar.d.ts +12 -0
  45. package/dist/static/components/tooltip.d.ts +7 -0
  46. package/dist/static/escape.d.ts +2 -0
  47. package/dist/static/index.cjs.js +1 -0
  48. package/dist/static/index.d.ts +68 -0
  49. package/dist/static/index.es.js +732 -0
  50. package/dist/static/render.d.ts +12 -0
  51. package/dist/static/specs.d.ts +2 -0
  52. package/dist/static/types.d.ts +43 -0
  53. package/dist/tokens.css +322 -0
  54. package/dist/types/index.d.ts +36 -0
  55. package/dist/utils/slots.d.ts +6 -0
  56. package/docs/guides/installation.md +8 -2
  57. package/docs/guides/pure-css/_meta.yaml +8 -0
  58. package/docs/guides/pure-css/class-api.md +1070 -0
  59. package/docs/guides/pure-css/custom-elements.md +574 -0
  60. package/docs/guides/pure-css/index.md +86 -0
  61. package/docs/guides/pure-css/limitations.md +152 -0
  62. package/docs/guides/pure-css/static-helpers.md +1203 -0
  63. package/llms-full.txt +3739 -261
  64. package/package.json +19 -5
  65. package/src/components/Alert/SkAlert.vue +4 -2
  66. package/src/components/Breadcrumbs/SkBreadcrumbs.vue +6 -12
  67. package/src/components/Button/SkButton.vue +8 -5
  68. package/src/components/Card/SkCard.vue +13 -5
  69. package/src/components/Checkbox/SkCheckbox.vue +9 -2
  70. package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +4 -1
  71. package/src/components/Dropdown/SkDropdown.vue +20 -3
  72. package/src/components/Dropdown/SkDropdownRadioGroup.vue +4 -1
  73. package/src/components/Dropdown/types.ts +2 -1
  74. package/src/components/Modal/SkModal.vue +11 -4
  75. package/src/components/NavBar/SkNavBar.vue +19 -8
  76. package/src/components/NavBar/context.ts +4 -2
  77. package/src/components/NavBar/types.ts +6 -1
  78. package/src/components/NumberInput/SkNumberInput.vue +10 -1
  79. package/src/components/Page/SkPage.vue +29 -15
  80. package/src/components/Panel/SkPanel.vue +2 -1
  81. package/src/components/Popover/SkPopover.vue +11 -4
  82. package/src/components/Radio/SkRadio.vue +9 -2
  83. package/src/components/ScrollArea/SkScrollArea.vue +78 -5
  84. package/src/components/Switch/SkSwitch.vue +14 -13
  85. package/src/components/Tabs/SkTab.vue +7 -2
  86. package/src/components/TreeView/SkTreeItem.vue +10 -2
  87. package/src/components/TreeView/SkTreeView.vue +7 -2
  88. package/src/composables/useCustomColors.ts +86 -77
  89. package/src/composables/usePortalContext.test.ts +0 -2
  90. package/src/shims.d.ts +10 -0
  91. package/src/static/__tests__/parity.test.ts +717 -0
  92. package/src/static/__tests__/parityHarness.test.ts +98 -0
  93. package/src/static/__tests__/parityHarness.ts +260 -0
  94. package/src/static/classes.test.ts +82 -0
  95. package/src/static/classes.ts +111 -0
  96. package/src/static/components/__tests__/helpers.test.ts +837 -0
  97. package/src/static/components/alert.ts +117 -0
  98. package/src/static/components/avatar.ts +86 -0
  99. package/src/static/components/breadcrumbs.ts +28 -0
  100. package/src/static/components/button.ts +75 -0
  101. package/src/static/components/card.ts +27 -0
  102. package/src/static/components/checkbox.ts +48 -0
  103. package/src/static/components/colorPicker.ts +45 -0
  104. package/src/static/components/divider.ts +39 -0
  105. package/src/static/components/dropdown.ts +36 -0
  106. package/src/static/components/field.ts +86 -0
  107. package/src/static/components/group.ts +27 -0
  108. package/src/static/components/input.ts +55 -0
  109. package/src/static/components/navBar.ts +94 -0
  110. package/src/static/components/numberInput.ts +64 -0
  111. package/src/static/components/page.ts +31 -0
  112. package/src/static/components/pagination.ts +27 -0
  113. package/src/static/components/panel.ts +33 -0
  114. package/src/static/components/progress.ts +31 -0
  115. package/src/static/components/radio.ts +53 -0
  116. package/src/static/components/select.ts +51 -0
  117. package/src/static/components/sidebar.ts +85 -0
  118. package/src/static/components/skeleton.ts +66 -0
  119. package/src/static/components/slider.ts +50 -0
  120. package/src/static/components/spinner.ts +94 -0
  121. package/src/static/components/switchInput.ts +49 -0
  122. package/src/static/components/table.ts +88 -0
  123. package/src/static/components/tag.ts +76 -0
  124. package/src/static/components/tagsInput.ts +35 -0
  125. package/src/static/components/textarea.ts +53 -0
  126. package/src/static/components/toolbar.ts +74 -0
  127. package/src/static/components/tooltip.ts +29 -0
  128. package/src/static/escape.test.ts +53 -0
  129. package/src/static/escape.ts +28 -0
  130. package/src/static/generated/defaults.ts +379 -0
  131. package/src/static/generated/propTypes.ts +426 -0
  132. package/src/static/index.ts +116 -0
  133. package/src/static/render.test.ts +83 -0
  134. package/src/static/render.ts +76 -0
  135. package/src/static/specs.test.ts +58 -0
  136. package/src/static/specs.ts +230 -0
  137. package/src/static/types.ts +176 -0
  138. package/src/styles/__tests__/testHelpers.ts +97 -0
  139. package/src/styles/base/_custom-elements.scss +51 -0
  140. package/src/styles/base/_index.scss +4 -0
  141. package/src/styles/components/__tests__/componentSelectors.test.ts +2575 -0
  142. package/src/styles/components/_alert.scss +82 -39
  143. package/src/styles/components/_avatar.scss +102 -47
  144. package/src/styles/components/_breadcrumbs.scss +39 -37
  145. package/src/styles/components/_button.scss +58 -5
  146. package/src/styles/components/_card.scss +64 -2
  147. package/src/styles/components/_checkbox.scss +35 -5
  148. package/src/styles/components/_color-picker.scss +48 -13
  149. package/src/styles/components/_divider.scss +86 -52
  150. package/src/styles/components/_dropdown.scss +214 -0
  151. package/src/styles/components/_field.scss +76 -23
  152. package/src/styles/components/_group.scss +190 -79
  153. package/src/styles/components/_index.scss +1 -0
  154. package/src/styles/components/_input.scss +81 -5
  155. package/src/styles/components/_menu.scss +1 -1
  156. package/src/styles/components/_navbar.scss +76 -45
  157. package/src/styles/components/_number-input.scss +98 -85
  158. package/src/styles/components/_page.scss +82 -23
  159. package/src/styles/components/_pagination.scss +240 -212
  160. package/src/styles/components/_panel.scss +268 -122
  161. package/src/styles/components/_progress.scss +120 -70
  162. package/src/styles/components/_radio.scss +35 -5
  163. package/src/styles/components/_scroll-area.scss +50 -22
  164. package/src/styles/components/_select.scss +40 -9
  165. package/src/styles/components/_sidebar.scss +59 -34
  166. package/src/styles/components/_skeleton.scss +111 -65
  167. package/src/styles/components/_slider.scss +34 -10
  168. package/src/styles/components/_spinner.scss +107 -56
  169. package/src/styles/components/_switch.scss +36 -5
  170. package/src/styles/components/_table.scss +150 -166
  171. package/src/styles/components/_tag.scss +244 -154
  172. package/src/styles/components/_tags-input.scss +46 -12
  173. package/src/styles/components/_textarea.scss +36 -5
  174. package/src/styles/components/_toolbar.scss +85 -31
  175. package/src/styles/components/_tooltip.scss +172 -3
  176. package/src/styles/mixins/_cut-border.scss +18 -4
  177. package/src/styles/mixins/_dual-selector.scss +192 -0
  178. package/src/styles/mixins/_index.scss +1 -0
  179. package/src/styles/mixins/dualSelector.test.ts +151 -0
  180. package/src/styles/themes/_colorful.scss +25 -0
  181. package/src/styles/themes/_greyscale.scss +25 -0
  182. package/src/styles/themes/_shade-scale.scss +39 -0
  183. package/src/styles/tokens/_semantic-color-kinds.scss +66 -0
  184. package/src/{types.ts → types/index.ts} +19 -11
  185. package/src/utils/slots.ts +75 -0
  186. package/web-types.json +980 -137
  187. package/dist/composables/useCustomColors.test.d.ts +0 -1
  188. package/dist/composables/useFocusTrap.test.d.ts +0 -1
  189. package/dist/composables/usePortalContext.test.d.ts +0 -1
  190. package/dist/styles/mixins/fluidSize.test.d.ts +0 -1
  191. package/dist/types.d.ts +0 -29
@@ -0,0 +1,426 @@
1
+ // Auto-generated — do not edit. Run `npm run generate:static-types` to regenerate.
2
+ // Type references use bare names extracted from each component's Vue file — the types
3
+ // themselves live in the per-component types.ts files. This file is for documentation
4
+ // and drift detection, not direct import. ts-nocheck suppresses unknown-name errors.
5
+ // @ts-nocheck
6
+
7
+ import type { ComponentCustomColors } from '../../types';
8
+
9
+ export interface SkAccordionStaticProps extends ComponentCustomColors
10
+ {
11
+ type ? : SkAccordionType;
12
+ modelValue ? : string | string[];
13
+ collapsible ? : boolean;
14
+ kind ? : SkAccordionKind;
15
+ disabled ? : boolean;
16
+ }
17
+
18
+ export interface SkAlertStaticProps extends ComponentCustomColors
19
+ {
20
+ kind ? : SkAlertKind;
21
+ subtle ? : boolean;
22
+ showIcon ? : boolean;
23
+ }
24
+
25
+ export interface SkAvatarStaticProps extends ComponentCustomColors
26
+ {
27
+ src ? : string;
28
+ alt ? : string;
29
+ initials ? : string;
30
+ kind ? : ComponentKind;
31
+ size ? : SkAvatarSize;
32
+ baseColor ? : string;
33
+ textColor ? : string;
34
+ }
35
+
36
+ export interface SkBreadcrumbsStaticProps extends ComponentCustomColors
37
+ {
38
+ kind ? : SkBreadcrumbsProps['kind'];
39
+ separator ? : string;
40
+ }
41
+
42
+ export interface SkButtonStaticProps extends ComponentCustomColors
43
+ {
44
+ type ? : SkButtonType;
45
+ kind ? : SkButtonKind;
46
+ variant ? : SkButtonVariant;
47
+ size ? : SkButtonSize;
48
+ disabled ? : boolean;
49
+ loading ? : boolean;
50
+ pressed ? : boolean;
51
+ dense ? : boolean;
52
+ href ? : string;
53
+ to ? : string | Record<string, any>;
54
+ }
55
+
56
+ export interface SkCardStaticProps extends ComponentCustomColors
57
+ {
58
+ kind ? : SkCardKind;
59
+ size ? : SkPanelSize;
60
+ showDecoration ? : boolean;
61
+ noDecoration ? : boolean;
62
+ noBorder ? : boolean;
63
+ title ? : string;
64
+ headerColor ? : string;
65
+ scrollable ? : boolean;
66
+ corners ? : SkPanelCorner[];
67
+ decorationCorner ? : SkPanelCorner;
68
+ }
69
+
70
+ export interface SkCheckboxStaticProps extends ComponentCustomColors
71
+ {
72
+ kind ? : SkCheckboxKind;
73
+ size ? : SkCheckboxSize;
74
+ disabled ? : boolean;
75
+ required ? : boolean;
76
+ name ? : string;
77
+ label ? : string;
78
+ }
79
+
80
+ export interface SkCollapsibleStaticProps extends ComponentCustomColors
81
+ {
82
+ open ? : boolean;
83
+ defaultOpen ? : boolean;
84
+ disabled ? : boolean;
85
+ kind ? : SkCollapsibleKind;
86
+ triggerText ? : string;
87
+ }
88
+
89
+ export interface SkColorPickerStaticProps extends ComponentCustomColors
90
+ {
91
+ kind ? : SkColorPickerKind;
92
+ size ? : SkColorPickerSize;
93
+ format ? : SkColorPickerFormat;
94
+ showAlpha ? : boolean;
95
+ disabled ? : boolean;
96
+ placeholder ? : string;
97
+ defaultValue ? : string;
98
+ }
99
+
100
+ export interface SkContextMenuStaticProps extends ComponentCustomColors
101
+ {
102
+ kind ? : SkContextMenuKind;
103
+ }
104
+
105
+ export interface SkDividerStaticProps extends ComponentCustomColors
106
+ {
107
+ orientation ? : SkDividerOrientation;
108
+ kind ? : ComponentKind;
109
+ variant ? : SkDividerVariant;
110
+ size ? : ComponentSize;
111
+ }
112
+
113
+ export interface SkDropdownStaticProps extends ComponentCustomColors
114
+ {
115
+ kind ? : SkDropdownKind;
116
+ triggerText ? : string;
117
+ side ? : SkDropdownSide;
118
+ align ? : SkDropdownAlign;
119
+ sideOffset ? : number;
120
+ size ? : SkDropdownSize;
121
+ }
122
+
123
+ export interface SkFieldStaticProps extends ComponentCustomColors
124
+ {
125
+ label ? : string;
126
+ description ? : string;
127
+ error ? : string;
128
+ required ? : boolean;
129
+ labelPosition ? : SkFieldLabelPosition;
130
+ id ? : string;
131
+ state ? : boolean | null;
132
+ validKind ? : string;
133
+ invalidKind ? : string;
134
+ }
135
+
136
+ export interface SkGroupStaticProps extends ComponentCustomColors
137
+ {
138
+ orientation ? : SkGroupOrientation;
139
+ }
140
+
141
+ export interface SkInputStaticProps extends ComponentCustomColors
142
+ {
143
+ type ? : SkInputType;
144
+ kind ? : SkInputKind;
145
+ size ? : SkInputSize;
146
+ placeholder ? : string;
147
+ disabled ? : boolean;
148
+ readonly ? : boolean;
149
+ required ? : boolean;
150
+ name ? : string;
151
+ autocomplete ? : string;
152
+ }
153
+
154
+ export interface SkListboxStaticProps extends ComponentCustomColors
155
+ {
156
+ kind ? : SkListboxKind;
157
+ size ? : SkListboxSize;
158
+ placeholder ? : string;
159
+ disabled ? : boolean;
160
+ }
161
+
162
+ export interface SkModalStaticProps extends ComponentCustomColors
163
+ {
164
+ kind ? : ComponentKind;
165
+ size ? : ComponentSize;
166
+ title ? : string;
167
+ triggerText ? : string;
168
+ open ? : boolean;
169
+ closeOnEscape ? : boolean;
170
+ closeOnOverlay ? : boolean;
171
+ noCloseOnEscape ? : boolean;
172
+ noCloseOnOverlay ? : boolean;
173
+ }
174
+
175
+ export interface SkNavBarStaticProps extends ComponentCustomColors
176
+ {
177
+ kind ? : SkNavBarKind;
178
+ sticky ? : boolean;
179
+ size ? : SkNavBarSize;
180
+ }
181
+
182
+ export interface SkNumberInputStaticProps extends ComponentCustomColors
183
+ {
184
+ kind ? : SkNumberInputKind;
185
+ size ? : SkNumberInputSize;
186
+ placeholder ? : string;
187
+ disabled ? : boolean;
188
+ readonly ? : boolean;
189
+ required ? : boolean;
190
+ name ? : string;
191
+ min ? : number;
192
+ max ? : number;
193
+ step ? : number;
194
+ showSteppers ? : boolean;
195
+ }
196
+
197
+ export interface SkPageStaticProps extends ComponentCustomColors
198
+ {
199
+ fixedHeader ? : boolean;
200
+ fixedFooter ? : boolean;
201
+ sidebarWidth ? : string;
202
+ asideWidth ? : string;
203
+ sidebarMode ? : SkPagePanelMode;
204
+ asideMode ? : SkPagePanelMode;
205
+ sidebarBreakpoint ? : string;
206
+ asideBreakpoint ? : string;
207
+ sidebarOpen ? : boolean;
208
+ asideOpen ? : boolean;
209
+ theme ? : SkThemeName;
210
+ flush ? : boolean;
211
+ noBounce ? : boolean;
212
+ }
213
+
214
+ export interface SkPaginationStaticProps extends ComponentCustomColors
215
+ {
216
+ modelValue ? : number;
217
+ siblingCount ? : number;
218
+ showFirstLast ? : boolean;
219
+ showPrevNext ? : boolean;
220
+ kind ? : SkPaginationProps['kind'];
221
+ size ? : SkPaginationProps['size'];
222
+ variant ? : SkPaginationProps['variant'];
223
+ disabled ? : boolean;
224
+ total : number;
225
+ }
226
+
227
+ export interface SkPanelStaticProps extends ComponentCustomColors
228
+ {
229
+ kind ? : SkPanelKind;
230
+ size ? : SkPanelSize;
231
+ showDecoration ? : boolean;
232
+ noBorder ? : boolean;
233
+ corners ? : SkPanelCorner[];
234
+ decorationCorner ? : SkPanelCorner;
235
+ }
236
+
237
+ export interface SkPopoverStaticProps extends ComponentCustomColors
238
+ {
239
+ kind ? : ComponentKind;
240
+ side ? : SkPopoverSide;
241
+ align ? : SkPopoverAlign;
242
+ sideOffset ? : number;
243
+ showArrow ? : boolean;
244
+ title ? : string;
245
+ closable ? : boolean;
246
+ open ? : boolean;
247
+ }
248
+
249
+ export interface SkProgressStaticProps extends ComponentCustomColors
250
+ {
251
+ value ? : number | null;
252
+ max ? : number;
253
+ kind ? : ComponentKind;
254
+ size ? : SkProgressSize;
255
+ showValue ? : boolean;
256
+ valuePosition ? : SkProgressValuePosition;
257
+ baseColor ? : string;
258
+ trackColor ? : string;
259
+ }
260
+
261
+ export interface SkRadioStaticProps extends ComponentCustomColors
262
+ {
263
+ label ? : string;
264
+ disabled ? : boolean;
265
+ kind ? : SkRadioKind;
266
+ size ? : SkRadioSize;
267
+ value : string | number;
268
+ }
269
+
270
+ export interface SkScrollAreaStaticProps extends ComponentCustomColors
271
+ {
272
+ type ? : SkScrollAreaType;
273
+ orientation ? : SkScrollAreaOrientation;
274
+ kind ? : SkScrollAreaKind;
275
+ baseColor ? : string;
276
+ textColor ? : string;
277
+ fade ? : boolean;
278
+ }
279
+
280
+ export interface SkSelectStaticProps extends ComponentCustomColors
281
+ {
282
+ kind ? : SkSelectKind;
283
+ size ? : SkSelectSize;
284
+ placeholder ? : string;
285
+ disabled ? : boolean;
286
+ }
287
+
288
+ export interface SkSidebarStaticProps extends ComponentCustomColors
289
+ {
290
+ kind ? : SkSidebarKind;
291
+ width ? : string;
292
+ side ? : SkSidebarSide;
293
+ dense ? : boolean;
294
+ }
295
+
296
+ export interface SkSkeletonStaticProps extends ComponentCustomColors
297
+ {
298
+ variant ? : SkSkeletonVariant;
299
+ width ? : string;
300
+ height ? : string;
301
+ animation ? : SkSkeletonAnimation;
302
+ corners ? : SkSkeletonCorner[];
303
+ bevel ? : string;
304
+ }
305
+
306
+ export interface SkSliderStaticProps extends ComponentCustomColors
307
+ {
308
+ min ? : number;
309
+ max ? : number;
310
+ step ? : number;
311
+ kind ? : ComponentKind;
312
+ size ? : SkSliderSize;
313
+ orientation ? : SkSliderOrientation;
314
+ disabled ? : boolean;
315
+ name ? : string;
316
+ minStepsBetweenThumbs ? : number;
317
+ baseColor ? : string;
318
+ thumbColor ? : string;
319
+ modelValue : number | number[];
320
+ }
321
+
322
+ export interface SkSpinnerStaticProps extends ComponentCustomColors
323
+ {
324
+ kind ? : ComponentKind;
325
+ size ? : SkSpinnerSize;
326
+ variant ? : SkSpinnerVariant;
327
+ color ? : string;
328
+ }
329
+
330
+ export interface SkSplitterStaticProps extends ComponentCustomColors
331
+ {
332
+ direction ? : SkSplitterDirection;
333
+ kind ? : SkSplitterKind;
334
+ baseColor ? : string;
335
+ textColor ? : string;
336
+ }
337
+
338
+ export interface SkSwitchStaticProps extends ComponentCustomColors
339
+ {
340
+ label ? : string;
341
+ labelOn ? : string;
342
+ labelOff ? : string;
343
+ kind ? : SkSwitchKind;
344
+ thumbKind ? : SkSwitchKind;
345
+ size ? : SkSwitchSize;
346
+ disabled ? : boolean;
347
+ disableLabelAnimation ? : boolean;
348
+ name ? : string;
349
+ value ? : string;
350
+ required ? : boolean;
351
+ modelValue : boolean;
352
+ }
353
+
354
+ export interface SkTableStaticProps extends ComponentCustomColors
355
+ {
356
+ kind ? : SkTableKind;
357
+ variant ? : SkTableVariant;
358
+ striped ? : boolean;
359
+ hoverable ? : boolean;
360
+ bordered ? : boolean;
361
+ innerBorders ? : boolean;
362
+ darkBackground ? : boolean;
363
+ subtle ? : boolean;
364
+ }
365
+
366
+ export interface SkTabsStaticProps extends ComponentCustomColors
367
+ {
368
+ orientation ? : SkTabsOrientation;
369
+ placement ? : SkTabsPlacement;
370
+ kind ? : ComponentKind;
371
+ flush ? : boolean;
372
+ modelValue : string | number;
373
+ }
374
+
375
+ export interface SkTagStaticProps extends ComponentCustomColors
376
+ {
377
+ kind ? : ComponentKind;
378
+ variant ? : SkTagVariant;
379
+ size ? : SkTagSize;
380
+ removable ? : boolean;
381
+ }
382
+
383
+ export interface SkTagsInputStaticProps extends ComponentCustomColors
384
+ {
385
+ kind ? : SkTagsInputKind;
386
+ size ? : SkTagsInputSize;
387
+ placeholder ? : string;
388
+ disabled ? : boolean;
389
+ max ? : number;
390
+ addOnPaste ? : boolean;
391
+ tagKind ? : string;
392
+ tagVariant ? : 'solid' | 'outline' | 'ghost';
393
+ }
394
+
395
+ export interface SkTextareaStaticProps extends ComponentCustomColors
396
+ {
397
+ kind ? : SkTextareaKind;
398
+ size ? : SkTextareaSize;
399
+ placeholder ? : string;
400
+ disabled ? : boolean;
401
+ readonly ? : boolean;
402
+ required ? : boolean;
403
+ name ? : string;
404
+ rows ? : number;
405
+ autocomplete ? : string;
406
+ }
407
+
408
+ export interface SkToolbarStaticProps extends ComponentCustomColors
409
+ {
410
+ kind ? : SkToolbarKind;
411
+ orientation ? : SkToolbarOrientation;
412
+ corners ? : SkToolbarCorner[];
413
+ baseColor ? : string;
414
+ textColor ? : string;
415
+ }
416
+
417
+ export interface SkTooltipStaticProps extends ComponentCustomColors
418
+ {
419
+ kind ? : ComponentKind;
420
+ variant ? : 'solid' | 'outline';
421
+ side ? : SkTooltipSide;
422
+ align ? : 'start' | 'center' | 'end';
423
+ sideOffset ? : number;
424
+ delayDuration ? : number;
425
+ showArrow ? : boolean;
426
+ }
@@ -0,0 +1,116 @@
1
+ //----------------------------------------------------------------------------------------------------------------------
2
+ // Static Helpers — Public API
3
+ //
4
+ // Re-exports all static helper functions and their prop types, plus core utilities. Consumers
5
+ // import from `@skewedaspect/sleekspace-ui/static` to access the full helper surface without
6
+ // pulling in Vue or any other runtime dependency.
7
+ //----------------------------------------------------------------------------------------------------------------------
8
+
9
+ // Utilities
10
+ export { text, escapeAttr } from './escape';
11
+ export { composeClasses } from './classes';
12
+ export type { ClassSpec, ListFlagSpec, SingleChoiceFlagSpec } from './classes';
13
+ export { render } from './render';
14
+ export type { RenderSpec } from './render';
15
+
16
+ // Shared types
17
+ export type * from './types';
18
+
19
+ // Components — containers
20
+ export { panel } from './components/panel';
21
+ export type { PanelStaticProps } from './components/panel';
22
+
23
+ export { card } from './components/card';
24
+ export type { CardStaticProps } from './components/card';
25
+
26
+ export { alert } from './components/alert';
27
+ export type { AlertStaticProps } from './components/alert';
28
+
29
+ export { divider } from './components/divider';
30
+ export type { DividerStaticProps } from './components/divider';
31
+
32
+ export { page } from './components/page';
33
+ export type { PageStaticProps } from './components/page';
34
+
35
+ export { group } from './components/group';
36
+ export type { GroupStaticProps } from './components/group';
37
+
38
+ export { skeleton } from './components/skeleton';
39
+ export type { SkeletonStaticProps } from './components/skeleton';
40
+
41
+ export { progress } from './components/progress';
42
+ export type { ProgressStaticProps } from './components/progress';
43
+
44
+ export { spinner } from './components/spinner';
45
+ export type { SpinnerStaticProps } from './components/spinner';
46
+
47
+ export { navBar } from './components/navBar';
48
+ export type { NavBarStaticProps } from './components/navBar';
49
+
50
+ export { toolbar } from './components/toolbar';
51
+ export type { ToolbarStaticProps } from './components/toolbar';
52
+
53
+ export { sidebar } from './components/sidebar';
54
+ export type { SidebarStaticProps } from './components/sidebar';
55
+
56
+ export { breadcrumbs } from './components/breadcrumbs';
57
+ export type { BreadcrumbsStaticProps } from './components/breadcrumbs';
58
+
59
+ export { pagination } from './components/pagination';
60
+ export type { PaginationStaticProps } from './components/pagination';
61
+
62
+ export { tag } from './components/tag';
63
+ export type { TagStaticProps } from './components/tag';
64
+
65
+ export { avatar } from './components/avatar';
66
+ export type { AvatarStaticProps } from './components/avatar';
67
+
68
+ export { field } from './components/field';
69
+ export type { FieldStaticProps } from './components/field';
70
+
71
+ export { table } from './components/table';
72
+ export type { TableStaticProps } from './components/table';
73
+
74
+ export { tooltip } from './components/tooltip';
75
+ export type { TooltipStaticProps } from './components/tooltip';
76
+
77
+ // Form controls (class-only)
78
+ export { button } from './components/button';
79
+ export type { ButtonStaticProps } from './components/button';
80
+
81
+ export { input } from './components/input';
82
+ export type { InputStaticProps } from './components/input';
83
+
84
+ export { textarea } from './components/textarea';
85
+ export type { TextareaStaticProps } from './components/textarea';
86
+
87
+ export { select } from './components/select';
88
+ export type { SelectStaticProps } from './components/select';
89
+
90
+ export { slider } from './components/slider';
91
+ export type { SliderStaticProps } from './components/slider';
92
+
93
+ export { colorPicker } from './components/colorPicker';
94
+ export type { ColorPickerStaticProps } from './components/colorPicker';
95
+
96
+ // Compound form controls
97
+ export { checkbox } from './components/checkbox';
98
+ export type { CheckboxStaticProps } from './components/checkbox';
99
+
100
+ export { radio } from './components/radio';
101
+ export type { RadioStaticProps } from './components/radio';
102
+
103
+ export { switchInput } from './components/switchInput';
104
+ export type { SwitchStaticProps } from './components/switchInput';
105
+
106
+ export { numberInput } from './components/numberInput';
107
+ export type { NumberInputStaticProps } from './components/numberInput';
108
+
109
+ export { tagsInput } from './components/tagsInput';
110
+ export type { TagsInputStaticProps } from './components/tagsInput';
111
+
112
+ // Dropdown
113
+ export { dropdown } from './components/dropdown';
114
+ export type { DropdownStaticProps } from './components/dropdown';
115
+
116
+ //----------------------------------------------------------------------------------------------------------------------
@@ -0,0 +1,83 @@
1
+ //----------------------------------------------------------------------------------------------------------------------
2
+ // Render Core Tests
3
+ //----------------------------------------------------------------------------------------------------------------------
4
+
5
+ import { describe, expect, it } from 'vitest';
6
+
7
+ import { type RenderSpec, render } from './render';
8
+
9
+ //----------------------------------------------------------------------------------------------------------------------
10
+
11
+ const PANEL_SPEC : RenderSpec
12
+ = {
13
+ tag: 'div',
14
+ classSpec:
15
+ {
16
+ base: 'sk-panel',
17
+ kind: true,
18
+ size: true,
19
+ },
20
+ customColorVars: { base: '--sk-panel-color-base', text: '--sk-panel-fg' },
21
+ };
22
+
23
+ describe('render', () =>
24
+ {
25
+ it('emits a bare tag with base class when no props', () =>
26
+ {
27
+ expect(render(PANEL_SPEC, {}, '')).toBe('<div class="sk-panel"></div>');
28
+ });
29
+
30
+ it('appends children verbatim', () =>
31
+ {
32
+ expect(render(PANEL_SPEC, {}, 'Hello')).toBe('<div class="sk-panel">Hello</div>');
33
+ });
34
+
35
+ it('embeds nested HTML children', () =>
36
+ {
37
+ expect(render(PANEL_SPEC, {}, '<span>inner</span>'))
38
+ .toBe('<div class="sk-panel"><span>inner</span></div>');
39
+ });
40
+
41
+ it('includes classes from prop modifiers', () =>
42
+ {
43
+ expect(render(PANEL_SPEC, { kind: 'primary', size: 'lg' }, 'x'))
44
+ .toBe('<div class="sk-panel sk-primary sk-lg sk-size-lg">x</div>');
45
+ });
46
+
47
+ it('emits custom color inline style from baseColor / textColor', () =>
48
+ {
49
+ expect(render(PANEL_SPEC, { baseColor: '#f00', textColor: '#fff' }, 'x'))
50
+ .toBe('<div class="sk-panel" style="--sk-panel-color-base: #f00; --sk-panel-fg: #fff;">x</div>');
51
+ });
52
+
53
+ it('uses tag="button" when spec overrides', () =>
54
+ {
55
+ const spec : RenderSpec = { tag: 'button', classSpec: { base: 'sk-button' } };
56
+ expect(render(spec, {}, 'Save')).toBe('<button class="sk-button" type="button">Save</button>');
57
+ });
58
+
59
+ it('omits type="button" for non-button tags', () =>
60
+ {
61
+ expect(render(PANEL_SPEC, {}, 'x')).not.toMatch(/type="button"/);
62
+ });
63
+
64
+ it('respects `extraAttrs` from the spec', () =>
65
+ {
66
+ const spec : RenderSpec = { tag: 'div', classSpec: { base: 'sk-alert' }, extraAttrs: { role: 'alert' } };
67
+ expect(render(spec, {}, 'warning')).toBe('<div class="sk-alert" role="alert">warning</div>');
68
+ });
69
+
70
+ it('escapes attribute values containing dangerous characters', () =>
71
+ {
72
+ expect(render(PANEL_SPEC, { baseColor: '"><script>' }, 'x'))
73
+ .toContain('style="--sk-panel-color-base: &quot;&gt;&lt;script&gt;;"');
74
+ });
75
+
76
+ it('renders void/self-closing elements without children when spec.void is true', () =>
77
+ {
78
+ const spec : RenderSpec = { tag: 'input', classSpec: { base: 'sk-input' }, void: true };
79
+ expect(render(spec, {}, '')).toBe('<input class="sk-input" />');
80
+ });
81
+ });
82
+
83
+ //----------------------------------------------------------------------------------------------------------------------
@@ -0,0 +1,76 @@
1
+ //----------------------------------------------------------------------------------------------------------------------
2
+ // Render Core
3
+ //
4
+ // Generic renderer used by every component helper. Takes a `RenderSpec` (element tag, class
5
+ // composition spec, optional extras) and a props object, and emits an HTML string.
6
+ //
7
+ // The output is the class-API form: <tag class="sk-component modifier-classes"> ... </tag>.
8
+ // Custom-element output is NOT emitted here — helpers always produce class-API HTML.
9
+ //----------------------------------------------------------------------------------------------------------------------
10
+
11
+ import { type ClassSpec, composeClasses } from './classes';
12
+ import { escapeAttr } from './escape';
13
+
14
+ //----------------------------------------------------------------------------------------------------------------------
15
+
16
+ export interface RenderSpec
17
+ {
18
+ tag : string; // HTML tag to render (e.g. "div", "button", "input")
19
+ classSpec : ClassSpec; // how props map to class modifiers
20
+ extraAttrs ?: Record<string, string>; // attributes always set (e.g. role="alert")
21
+ void ?: boolean; // self-closing with no children (e.g. <input />)
22
+ // Per-component custom-color CSS variable names. If omitted, no inline style is emitted
23
+ // for custom colors. Matches the Vue component's `useCustomColors` output.
24
+ customColorVars ?: { base ?: string; text ?: string };
25
+ }
26
+
27
+ //----------------------------------------------------------------------------------------------------------------------
28
+
29
+ export function render(spec : RenderSpec, props : Record<string, unknown>, children : string) : string
30
+ {
31
+ const classes = composeClasses(spec.classSpec, props);
32
+ const attrs : string[] = [ `class="${ escapeAttr(classes) }"` ];
33
+
34
+ if(spec.tag === 'button')
35
+ {
36
+ attrs.push(`type="button"`);
37
+ }
38
+
39
+ if(spec.extraAttrs)
40
+ {
41
+ for(const [ name, value ] of Object.entries(spec.extraAttrs))
42
+ {
43
+ attrs.push(`${ name }="${ escapeAttr(value) }"`);
44
+ }
45
+ }
46
+
47
+ const styleParts : string[] = [];
48
+ if(spec.customColorVars)
49
+ {
50
+ const { base, text: textVar } = spec.customColorVars;
51
+ if(base && typeof props.baseColor === 'string')
52
+ {
53
+ styleParts.push(`${ base }: ${ escapeAttr(props.baseColor) };`);
54
+ }
55
+ if(textVar && typeof props.textColor === 'string')
56
+ {
57
+ styleParts.push(`${ textVar }: ${ escapeAttr(props.textColor) };`);
58
+ }
59
+ }
60
+
61
+ if(styleParts.length > 0)
62
+ {
63
+ attrs.push(`style="${ styleParts.join(' ') }"`);
64
+ }
65
+
66
+ const attrString = attrs.join(' ');
67
+
68
+ if(spec.void)
69
+ {
70
+ return `<${ spec.tag } ${ attrString } />`;
71
+ }
72
+
73
+ return `<${ spec.tag } ${ attrString }>${ children }</${ spec.tag }>`;
74
+ }
75
+
76
+ //----------------------------------------------------------------------------------------------------------------------