@nuxt/ui 3.0.0-alpha.5 → 3.0.0-alpha.7

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 (49) hide show
  1. package/README.md +4 -2
  2. package/dist/module.d.mts +19 -5
  3. package/dist/module.d.ts +19 -5
  4. package/dist/module.json +2 -1
  5. package/dist/module.mjs +514 -338
  6. package/dist/runtime/components/Accordion.vue +13 -5
  7. package/dist/runtime/components/Alert.vue +2 -2
  8. package/dist/runtime/components/Breadcrumb.vue +16 -8
  9. package/dist/runtime/components/Button.vue +4 -2
  10. package/dist/runtime/components/Carousel.vue +306 -0
  11. package/dist/runtime/components/Checkbox.vue +3 -6
  12. package/dist/runtime/components/CommandPalette.vue +27 -18
  13. package/dist/runtime/components/ContextMenu.vue +33 -9
  14. package/dist/runtime/components/ContextMenuContent.vue +36 -8
  15. package/dist/runtime/components/DropdownMenu.vue +33 -9
  16. package/dist/runtime/components/DropdownMenuContent.vue +38 -8
  17. package/dist/runtime/components/Form.vue +6 -2
  18. package/dist/runtime/components/Input.vue +6 -4
  19. package/dist/runtime/components/InputMenu.vue +40 -24
  20. package/dist/runtime/components/LinkBase.vue +4 -2
  21. package/dist/runtime/components/Modal.vue +2 -2
  22. package/dist/runtime/components/NavigationMenu.vue +80 -43
  23. package/dist/runtime/components/Pagination.vue +2 -2
  24. package/dist/runtime/components/RadioGroup.vue +22 -3
  25. package/dist/runtime/components/Select.vue +22 -10
  26. package/dist/runtime/components/SelectMenu.vue +43 -31
  27. package/dist/runtime/components/Slideover.vue +2 -2
  28. package/dist/runtime/components/Table.vue +232 -0
  29. package/dist/runtime/components/Tabs.vue +15 -7
  30. package/dist/runtime/components/Toast.vue +2 -2
  31. package/dist/runtime/components/Toaster.vue +1 -1
  32. package/dist/runtime/composables/defineShortcuts.js +1 -1
  33. package/dist/runtime/composables/useComponentIcons.d.ts +3 -0
  34. package/dist/runtime/composables/useModal.d.ts +1 -1
  35. package/dist/runtime/composables/useSlideover.d.ts +1 -1
  36. package/dist/runtime/index.css +1 -1
  37. package/dist/runtime/keyframes.css +1 -0
  38. package/dist/runtime/plugins/colors.js +11 -7
  39. package/dist/runtime/types/form.d.ts +3 -1
  40. package/dist/runtime/types/index.d.ts +2 -0
  41. package/dist/runtime/types/index.js +2 -0
  42. package/dist/runtime/utils/form.d.ts +7 -1
  43. package/dist/runtime/utils/form.js +25 -1
  44. package/dist/runtime/utils/index.d.ts +1 -0
  45. package/dist/runtime/utils/index.js +3 -0
  46. package/dist/runtime/utils/link.d.ts +1 -1
  47. package/package.json +30 -14
  48. package/dist/runtime/types/component.d.ts +0 -17
  49. package/dist/runtime/types/component.js +0 -0
package/dist/module.mjs CHANGED
@@ -1,19 +1,20 @@
1
1
  import { defuFn, defu } from 'defu';
2
- import { addTemplate, addTypeTemplate, defineNuxtModule, createResolver, addVitePlugin, hasNuxtModule, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
+ import { addTemplate, addTypeTemplate, defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
3
  import 'node:url';
4
4
  import { kebabCase } from 'scule';
5
+ import { pick } from '../dist/runtime/utils/index.js';
5
6
 
6
7
  const accordion = {
7
8
  slots: {
8
9
  root: "w-full",
9
- item: "border-b border-gray-200 dark:border-gray-800 last:border-b-0",
10
+ item: "border-b border-[var(--ui-border)] last:border-b-0",
10
11
  header: "flex",
11
- trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-primary-500 dark:focus-visible:outline-primary-400 min-w-0",
12
+ trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-[var(--ui-primary)] min-w-0",
12
13
  content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
13
14
  body: "text-sm pb-3.5",
14
15
  leadingIcon: "shrink-0 size-5",
15
16
  trailingIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200",
16
- label: "truncate"
17
+ label: "text-left break-words"
17
18
  },
18
19
  variants: {
19
20
  disabled: {
@@ -26,7 +27,7 @@ const accordion = {
26
27
 
27
28
  const alert = (options) => ({
28
29
  slots: {
29
- root: "relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",
30
+ root: "relative overflow-hidden w-full rounded-[calc(var(--ui-radius)*2)] p-4 flex gap-2.5",
30
31
  wrapper: "min-w-0 flex-1 flex flex-col gap-1",
31
32
  title: "text-sm font-medium",
32
33
  description: "text-sm opacity-90",
@@ -39,7 +40,7 @@ const alert = (options) => ({
39
40
  variants: {
40
41
  color: {
41
42
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
42
- gray: ""
43
+ neutral: ""
43
44
  },
44
45
  variant: {
45
46
  solid: "",
@@ -62,63 +63,63 @@ const alert = (options) => ({
62
63
  color,
63
64
  variant: "solid",
64
65
  class: {
65
- root: `bg-${color}-500 dark:bg-${color}-400 text-white dark:text-gray-900`
66
+ root: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
66
67
  }
67
68
  })), ...(options.theme.colors || []).map((color) => ({
68
69
  color,
69
70
  variant: "outline",
70
71
  class: {
71
- root: `text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/25 dark:ring-${color}-400/25`
72
+ root: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
72
73
  }
73
74
  })), ...(options.theme.colors || []).map((color) => ({
74
75
  color,
75
76
  variant: "soft",
76
77
  class: {
77
- root: `bg-${color}-500/10 dark:bg-${color}-400/10 text-${color}-500 dark:text-${color}-400`
78
+ root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
78
79
  }
79
80
  })), ...(options.theme.colors || []).map((color) => ({
80
81
  color,
81
82
  variant: "subtle",
82
83
  class: {
83
- root: `bg-${color}-500/10 dark:bg-${color}-400/10 text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/25 dark:ring-${color}-400/25`
84
+ root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
84
85
  }
85
86
  })), {
86
- color: "gray",
87
+ color: "neutral",
87
88
  variant: "solid",
88
89
  class: {
89
- root: "text-white dark:text-gray-900 bg-gray-900 dark:bg-white"
90
+ root: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
90
91
  }
91
92
  }, {
92
- color: "gray",
93
+ color: "neutral",
93
94
  variant: "outline",
94
95
  class: {
95
- root: "text-gray-900 dark:text-white bg-white dark:bg-gray-900 ring ring-inset ring-gray-200 dark:ring-gray-800"
96
+ root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border)]"
96
97
  }
97
98
  }, {
98
- color: "gray",
99
+ color: "neutral",
99
100
  variant: "soft",
100
101
  class: {
101
- root: "text-gray-900 dark:text-white bg-gray-50 dark:bg-gray-800/50"
102
+ root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50"
102
103
  }
103
104
  }, {
104
- color: "gray",
105
+ color: "neutral",
105
106
  variant: "subtle",
106
107
  class: {
107
- root: "text-gray-900 dark:text-white bg-gray-50 dark:bg-gray-800/50 ring ring-inset ring-gray-300 dark:ring-gray-700"
108
+ root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 ring ring-inset ring-[var(--ui-border-accented)]"
108
109
  }
109
110
  }],
110
111
  defaultVariants: {
111
112
  color: "primary",
112
- variant: "outline"
113
+ variant: "solid"
113
114
  }
114
115
  });
115
116
 
116
117
  const avatar = {
117
118
  slots: {
118
- root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-gray-100 dark:bg-gray-800",
119
+ root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
119
120
  image: "h-full w-full rounded-[inherit] object-cover",
120
- fallback: "font-medium leading-none text-gray-500 dark:text-gray-400 truncate",
121
- icon: "text-gray-500 dark:text-gray-400 shrink-0"
121
+ fallback: "font-medium leading-none text-[var(--ui-text-muted)] truncate",
122
+ icon: "text-[var(--ui-text-muted)] shrink-0"
122
123
  },
123
124
  variants: {
124
125
  size: {
@@ -159,18 +160,18 @@ const avatar = {
159
160
  const avatarGroup = {
160
161
  slots: {
161
162
  root: "inline-flex flex-row-reverse justify-end",
162
- base: "relative rounded-full ring-white dark:ring-gray-900 first:me-0"
163
+ base: "relative rounded-full ring-[var(--ui-bg)] first:me-0"
163
164
  },
164
165
  variants: {
165
166
  size: {
166
167
  "3xs": {
167
- base: "ring-1 -me-0.5"
168
+ base: "ring -me-0.5"
168
169
  },
169
170
  "2xs": {
170
- base: "ring-1 -me-0.5"
171
+ base: "ring -me-0.5"
171
172
  },
172
173
  "xs": {
173
- base: "ring-1 -me-0.5"
174
+ base: "ring -me-0.5"
174
175
  },
175
176
  "sm": {
176
177
  base: "ring-2 -me-1.5"
@@ -182,13 +183,13 @@ const avatarGroup = {
182
183
  base: "ring-2 -me-1.5"
183
184
  },
184
185
  "xl": {
185
- base: "ring-2.5 -me-2"
186
+ base: "ring-3 -me-2"
186
187
  },
187
188
  "2xl": {
188
- base: "ring-2.5 -me-2"
189
+ base: "ring-3 -me-2"
189
190
  },
190
191
  "3xl": {
191
- base: "ring-2.5 -me-2"
192
+ base: "ring-3 -me-2"
192
193
  }
193
194
  }
194
195
  },
@@ -198,11 +199,11 @@ const avatarGroup = {
198
199
  };
199
200
 
200
201
  const badge = (options) => ({
201
- base: "rounded-md font-medium inline-flex items-center",
202
+ base: "rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center",
202
203
  variants: {
203
204
  color: {
204
205
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
205
- gray: ""
206
+ neutral: ""
206
207
  },
207
208
  variant: {
208
209
  solid: "",
@@ -219,35 +220,35 @@ const badge = (options) => ({
219
220
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
220
221
  color,
221
222
  variant: "solid",
222
- class: `bg-${color}-500 dark:bg-${color}-400 text-white dark:text-gray-900`
223
+ class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
223
224
  })), ...(options.theme.colors || []).map((color) => ({
224
225
  color,
225
226
  variant: "outline",
226
- class: `text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/50 dark:ring-${color}-400/50`
227
+ class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/50`
227
228
  })), ...(options.theme.colors || []).map((color) => ({
228
229
  color,
229
230
  variant: "soft",
230
- class: `bg-${color}-500/10 dark:bg-${color}-400/10 text-${color}-500 dark:text-${color}-400`
231
+ class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
231
232
  })), ...(options.theme.colors || []).map((color) => ({
232
233
  color,
233
234
  variant: "subtle",
234
- class: `bg-${color}-500/10 dark:bg-${color}-400/10 text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/25 dark:ring-${color}-400/25`
235
+ class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
235
236
  })), {
236
- color: "gray",
237
+ color: "neutral",
237
238
  variant: "solid",
238
- class: "text-white dark:text-gray-900 bg-gray-900 dark:bg-white"
239
+ class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
239
240
  }, {
240
- color: "gray",
241
+ color: "neutral",
241
242
  variant: "outline",
242
- class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-900"
243
+ class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)]"
243
244
  }, {
244
- color: "gray",
245
+ color: "neutral",
245
246
  variant: "soft",
246
- class: "text-gray-700 dark:text-gray-200 bg-gray-100 dark:bg-gray-800"
247
+ class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
247
248
  }, {
248
- color: "gray",
249
+ color: "neutral",
249
250
  variant: "subtle",
250
- class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-100 dark:bg-gray-800"
251
+ class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
251
252
  }],
252
253
  defaultVariants: {
253
254
  color: "primary",
@@ -261,21 +262,21 @@ const breadcrumb = (options) => ({
261
262
  root: "relative min-w-0",
262
263
  list: "flex items-center gap-1.5",
263
264
  item: "flex min-w-0",
264
- link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-primary-500 dark:focus-visible:outline-primary-400",
265
+ link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-[var(--ui-primary)]",
265
266
  linkLeadingIcon: "shrink-0 size-5",
266
267
  linkLeadingAvatar: "shrink-0",
267
268
  linkLeadingAvatarSize: "2xs",
268
269
  linkLabel: "truncate",
269
270
  separator: "flex",
270
- separatorIcon: "shrink-0 size-5 text-gray-500 dark:text-gray-400"
271
+ separatorIcon: "shrink-0 size-5 text-[var(--ui-text-muted)]"
271
272
  },
272
273
  variants: {
273
274
  active: {
274
275
  true: {
275
- link: "text-primary-500 dark:text-primary-400 font-semibold"
276
+ link: "text-[var(--ui-primary)] font-semibold"
276
277
  },
277
278
  false: {
278
- link: "text-gray-500 dark:text-gray-400 font-medium"
279
+ link: "text-[var(--ui-text-muted)] font-medium"
279
280
  }
280
281
  },
281
282
  disabled: {
@@ -292,7 +293,7 @@ const breadcrumb = (options) => ({
292
293
  active: false,
293
294
  to: true,
294
295
  class: {
295
- link: ["hover:text-gray-700 dark:hover:text-gray-200", options.theme.transitions && "transition-colors"]
296
+ link: ["hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
296
297
  }
297
298
  }]
298
299
  });
@@ -334,17 +335,18 @@ const buttonGroup = {
334
335
 
335
336
  const button = (options) => ({
336
337
  slots: {
337
- base: ["rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75", options.theme.transitions && "transition-colors"],
338
+ base: ["rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75", options.theme.transitions && "transition-colors"],
338
339
  label: "truncate",
339
340
  leadingIcon: "shrink-0",
340
341
  leadingAvatar: "shrink-0",
342
+ leadingAvatarSize: "",
341
343
  trailingIcon: "shrink-0"
342
344
  },
343
345
  variants: {
344
346
  ...buttonGroupVariant,
345
347
  color: {
346
348
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
347
- gray: ""
349
+ neutral: ""
348
350
  },
349
351
  variant: {
350
352
  solid: "",
@@ -358,32 +360,38 @@ const button = (options) => ({
358
360
  xs: {
359
361
  base: "px-2 py-1 text-xs gap-1",
360
362
  leadingIcon: "size-4",
363
+ leadingAvatarSize: "3xs",
361
364
  trailingIcon: "size-4"
362
365
  },
363
366
  sm: {
364
367
  base: "px-2.5 py-1.5 text-xs gap-1.5",
365
368
  leadingIcon: "size-4",
369
+ leadingAvatarSize: "3xs",
366
370
  trailingIcon: "size-4"
367
371
  },
368
372
  md: {
369
373
  base: "px-2.5 py-1.5 text-sm gap-1.5",
370
374
  leadingIcon: "size-5",
375
+ leadingAvatarSize: "2xs",
371
376
  trailingIcon: "size-5"
372
377
  },
373
378
  lg: {
374
379
  base: "px-3 py-2 text-sm gap-2",
375
380
  leadingIcon: "size-5",
381
+ leadingAvatarSize: "2xs",
376
382
  trailingIcon: "size-5"
377
383
  },
378
384
  xl: {
379
385
  base: "px-3 py-2 text-base gap-2",
380
386
  leadingIcon: "size-6",
387
+ leadingAvatarSize: "xs",
381
388
  trailingIcon: "size-6"
382
389
  }
383
390
  },
384
391
  block: {
385
392
  true: {
386
- base: "w-full",
393
+ base: "w-full justify-center",
394
+ leadingAvatarSize: "xs",
387
395
  trailingIcon: "ms-auto"
388
396
  }
389
397
  },
@@ -403,51 +411,51 @@ const button = (options) => ({
403
411
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
404
412
  color,
405
413
  variant: "solid",
406
- class: `text-white dark:text-gray-900 bg-${color}-500 hover:bg-${color}-600 disabled:bg-${color}-500 aria-disabled:bg-${color}-500 dark:bg-${color}-400 dark:hover:bg-${color}-500 dark:disabled:bg-${color}-400 dark:aria-disabled:bg-${color}-400 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`
414
+ class: `text-[var(--ui-bg)] bg-[var(--ui-${color})] hover:bg-[var(--ui-${color})]/75 disabled:bg-[var(--ui-${color})] aria-disabled:bg-[var(--ui-${color})] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
407
415
  })), ...(options.theme.colors || []).map((color) => ({
408
416
  color,
409
417
  variant: "outline",
410
- class: `ring ring-inset ring-${color}-500/50 dark:ring-${color}-400/50 text-${color}-500 dark:text-${color}-400 hover:bg-${color}-500/10 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-${color}-400/10 dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
418
+ class: `ring ring-inset ring-[var(--ui-${color})]/50 text-[var(--ui-${color})] hover:bg-[var(--ui-${color})]/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-[var(--ui-${color})]`
411
419
  })), ...(options.theme.colors || []).map((color) => ({
412
420
  color,
413
421
  variant: "soft",
414
- class: `text-${color}-500 dark:text-${color}-400 bg-${color}-500/10 hover:bg-${color}-500/15 focus-visible:bg-${color}-500/15 disabled:bg-${color}-500/10 aria-disabled:bg-${color}-500/10 dark:bg-${color}-400/10 dark:hover:bg-${color}-400/15 dark:focus-visible:bg-${color}-400/15 dark:disabled:bg-${color}-400/10 dark:aria-disabled:bg-${color}-400/10`
422
+ class: `text-[var(--ui-${color})] bg-[var(--ui-${color})]/10 hover:bg-[var(--ui-${color})]/15 focus-visible:bg-[var(--ui-${color})]/15 disabled:bg-[var(--ui-${color})]/10 aria-disabled:bg-[var(--ui-${color})]/10`
415
423
  })), ...(options.theme.colors || []).map((color) => ({
416
424
  color,
417
425
  variant: "subtle",
418
- class: `text-${color}-500 dark:text-${color}-400 ring ring-inset ring-${color}-500/25 dark:ring-${color}-400/25 bg-${color}-500/10 hover:bg-${color}-500/15 disabled:bg-${color}-500/10 aria-disabled:bg-${color}-500/10 dark:bg-${color}-400/10 dark:hover:bg-${color}-400/15 dark:disabled:bg-${color}-400/10 dark:aria-disabled:bg-${color}-400/10 focus-visible:ring-2 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
426
+ class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25 bg-[var(--ui-${color})]/10 hover:bg-[var(--ui-${color})]/15 disabled:bg-[var(--ui-${color})]/10 aria-disabled:bg-[var(--ui-${color})]/10 focus-visible:ring-2 focus-visible:ring-[var(--ui-${color})]`
419
427
  })), ...(options.theme.colors || []).map((color) => ({
420
428
  color,
421
429
  variant: "ghost",
422
- class: `text-${color}-500 dark:text-${color}-400 hover:bg-${color}-500/10 focus-visible:bg-${color}-500/10 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-${color}-400/10 dark:focus-visible:bg-${color}-400/10 dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
430
+ class: `text-[var(--ui-${color})] hover:bg-[var(--ui-${color})]/10 focus-visible:bg-[var(--ui-${color})]/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
423
431
  })), ...(options.theme.colors || []).map((color) => ({
424
432
  color,
425
433
  variant: "link",
426
- class: `text-${color}-500 hover:text-${color}-600 disabled:text-${color}-500 aria-disabled:text-${color}-500 dark:text-${color}-400 dark:hover:text-${color}-500 dark:disabled:text-${color}-400 dark:aria-disabled:text-${color}-400 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
434
+ class: `text-[var(--ui-${color})] hover:text-[var(--ui-${color})]/75 disabled:text-[var(--ui-${color})] aria-disabled:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
427
435
  })), {
428
- color: "gray",
436
+ color: "neutral",
429
437
  variant: "solid",
430
- class: "text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-700 disabled:bg-gray-900 aria-disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-200 dark:disabled:bg-white dark:aria-disabled:bg-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900 dark:focus-visible:outline-white"
438
+ class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/80 disabled:bg-[var(--ui-bg-inverted)] aria-disabled:bg-[var(--ui-bg-inverted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
431
439
  }, {
432
- color: "gray",
440
+ color: "neutral",
433
441
  variant: "outline",
434
- class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-white hover:bg-gray-100 disabled:bg-white aria-disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800 dark:disabled:bg-gray-900 dark:aria-disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
442
+ class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)] hover:bg-[var(--ui-bg-elevated)] disabled:bg-[var(--ui-bg)] aria-disabled:bg-[var(--ui-bg)] focus-visible:ring-2 focus-visible:ring-[var(--ui-border-inverted)]"
435
443
  }, {
436
- color: "gray",
444
+ color: "neutral",
437
445
  variant: "soft",
438
- class: "text-gray-700 dark:text-gray-200 bg-gray-100 hover:bg-gray-200 focus-visible:bg-gray-200 disabled:bg-gray-100 aria-disabled:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:focus-visible:bg-gray-700/50 dark:disabled:bg-gray-800 dark:aria-disabled:bg-gray-800"
446
+ class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)] hover:bg-[var(--ui-bg-accented)]/75 focus-visible:bg-[var(--ui-bg-accented)]/75 disabled:bg-[var(--ui-bg-elevated)] aria-disabled:bg-[var(--ui-bg-elevated)]"
439
447
  }, {
440
- color: "gray",
448
+ color: "neutral",
441
449
  variant: "subtle",
442
- class: "ring ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-100 hover:bg-gray-200 disabled:bg-gray-100 aria-disabled:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 dark:aria-disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
450
+ class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)] hover:bg-[var(--ui-bg-accented)]/75 disabled:bg-[var(--ui-bg-elevated)] aria-disabled:bg-[var(--ui-bg-elevated)] focus-visible:ring-2 focus-visible:ring-[var(--ui-border-inverted)]"
443
451
  }, {
444
- color: "gray",
452
+ color: "neutral",
445
453
  variant: "ghost",
446
- class: "text-gray-700 dark:text-gray-200 hover:bg-gray-100 focus-visible:bg-gray-100 disabled:bg-transparent aria-disabled:bg-transparent dark:hover:bg-gray-800 dark:focus-visible:bg-gray-800 dark:hover:disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
454
+ class: "text-[var(--ui-text)] hover:bg-[var(--ui-bg-elevated)] focus-visible:bg-[var(--ui-bg-elevated)] hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
447
455
  }, {
448
- color: "gray",
456
+ color: "neutral",
449
457
  variant: "link",
450
- class: "text-gray-500 hover:text-gray-700 disabled:text-gray-500 aria-disabled:text-gray-500 dark:text-gray-400 dark:hover:text-gray-200 dark:disabled:text-gray-400 dark:aria-disabled:text-gray-400 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-white"
458
+ class: "text-[var(--ui-text-muted)] hover:text-[var(--ui-text)] disabled:text-[var(--ui-text-muted)] aria-disabled:text-[var(--ui-text-muted)] focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-[var(--ui-border-inverted)]"
451
459
  }, {
452
460
  size: "xs",
453
461
  square: true,
@@ -491,27 +499,66 @@ const button = (options) => ({
491
499
 
492
500
  const card = {
493
501
  slots: {
494
- root: "bg-white dark:bg-gray-900 ring ring-gray-200 dark:ring-gray-800 divide-y divide-gray-200 dark:divide-gray-800 rounded-lg shadow",
502
+ root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow",
495
503
  header: "p-4 sm:px-6",
496
504
  body: "p-4 sm:p-6",
497
505
  footer: "p-4 sm:px-6"
498
506
  }
499
507
  };
500
508
 
509
+ const carousel = (options) => ({
510
+ slots: {
511
+ root: "relative focus:outline-none",
512
+ viewport: "overflow-hidden",
513
+ container: "flex items-start",
514
+ item: "min-w-0 shrink-0 basis-full",
515
+ controls: "",
516
+ arrows: "",
517
+ prev: "absolute rounded-full",
518
+ next: "absolute rounded-full",
519
+ dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
520
+ dot: ["cursor-pointer size-3 bg-[var(--ui-border-accented)] rounded-full", options.theme.transitions && "transition"]
521
+ },
522
+ variants: {
523
+ orientation: {
524
+ vertical: {
525
+ container: "flex-col -mt-4",
526
+ item: "pt-4",
527
+ prev: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
528
+ next: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90"
529
+ },
530
+ horizontal: {
531
+ container: "flex-row -ml-4",
532
+ item: "pl-4",
533
+ prev: "-left-12 top-1/2 -translate-y-1/2",
534
+ next: "-right-12 top-1/2 -translate-y-1/2"
535
+ }
536
+ },
537
+ active: {
538
+ true: {
539
+ dot: "bg-[var(--ui-border-inverted)]"
540
+ }
541
+ }
542
+ },
543
+ defaultVariants: {
544
+ orientation: "horizontal"
545
+ }
546
+ });
547
+
501
548
  const checkbox = (options) => ({
502
549
  slots: {
503
550
  root: "relative flex items-start",
504
- base: "shrink-0 flex items-center justify-center rounded text-white dark:text-gray-900 ring ring-inset ring-gray-300 dark:ring-gray-700 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
551
+ base: "shrink-0 flex items-center justify-center rounded-[var(--ui-radius)] text-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)] focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
505
552
  container: "flex items-center",
506
553
  wrapper: "ms-2",
507
554
  icon: "shrink-0 size-full",
508
- label: "block font-medium text-gray-700 dark:text-gray-200",
509
- description: "text-gray-500 dark:text-gray-400"
555
+ label: "block font-medium text-[var(--ui-text)]",
556
+ description: "text-[var(--ui-text-muted)]"
510
557
  },
511
558
  variants: {
512
559
  color: {
513
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`])),
514
- gray: "focus-visible:outline-gray-900 dark:focus-visible:outline-white"
560
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-[var(--ui-${color})]`])),
561
+ neutral: "focus-visible:outline-[var(--ui-border-inverted)]"
515
562
  },
516
563
  size: {
517
564
  xs: {
@@ -542,7 +589,7 @@ const checkbox = (options) => ({
542
589
  },
543
590
  required: {
544
591
  true: {
545
- label: "after:content-['*'] after:ms-0.5 after:text-error-500 dark:after:text-error-400"
592
+ label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
546
593
  }
547
594
  },
548
595
  disabled: {
@@ -559,11 +606,11 @@ const checkbox = (options) => ({
559
606
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
560
607
  color,
561
608
  checked: true,
562
- class: `ring-2 ring-${color}-500 dark:ring-${color}-400 bg-${color}-500 dark:bg-${color}-400`
609
+ class: `ring-2 ring-[var(--ui-${color})] bg-[var(--ui-${color})]`
563
610
  })), {
564
- color: "gray",
611
+ color: "neutral",
565
612
  checked: true,
566
- class: "ring-2 ring-gray-900 dark:ring-white bg-gray-900 dark:bg-white"
613
+ class: "ring-2 ring-[var(--ui-border-inverted)] bg-[var(--ui-bg-inverted)]"
567
614
  }],
568
615
  defaultVariants: {
569
616
  size: "md",
@@ -574,12 +621,12 @@ const checkbox = (options) => ({
574
621
  const chip = (options) => ({
575
622
  slots: {
576
623
  root: "relative inline-flex items-center justify-center shrink-0",
577
- base: "rounded-full ring ring-white dark:ring-gray-900 flex items-center justify-center text-white dark:text-gray-900 font-medium whitespace-nowrap"
624
+ base: "rounded-full ring ring-[var(--ui-bg)] flex items-center justify-center text-[var(--ui-bg)] font-medium whitespace-nowrap"
578
625
  },
579
626
  variants: {
580
627
  color: {
581
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-${color}-500 dark:bg-${color}-400`])),
582
- gray: "bg-gray-500 dark:bg-gray-400"
628
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[var(--ui-${color})]`])),
629
+ neutral: "bg-[var(--ui-text-muted)]"
583
630
  },
584
631
  size: {
585
632
  "3xs": "h-[4px] min-w-[4px] text-[4px]",
@@ -631,36 +678,43 @@ const chip = (options) => ({
631
678
 
632
679
  const collapsible = {
633
680
  slots: {
634
- root: "flex flex-col gap-2",
681
+ root: "",
635
682
  content: "data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"
636
683
  }
637
684
  };
638
685
 
639
686
  const commandPalette = (options) => ({
640
687
  slots: {
641
- root: "flex flex-col min-h-0 min-w-0 divide-y divide-gray-200 dark:divide-gray-800",
688
+ root: "flex flex-col min-h-0 min-w-0 divide-y divide-[var(--ui-border)]",
642
689
  input: "[&>input]:h-12",
643
690
  close: "",
644
691
  content: "relative overflow-hidden",
645
- viewport: "divide-y divide-gray-200 dark:divide-gray-800 scroll-py-1",
692
+ viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
646
693
  group: "p-1 isolate",
647
- empty: "py-6 text-center text-sm",
648
- label: "px-2 py-1.5 text-xs font-semibold text-gray-900 dark:text-white",
649
- item: ["group relative w-full flex items-center gap-2 px-2 py-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.theme.transitions && "transition-colors before:transition-colors"],
650
- itemLeadingIcon: ["shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.theme.transitions && "transition-colors"],
694
+ empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]",
695
+ label: "px-2 py-1.5 text-xs font-semibold text-[var(--ui-text-highlighted)]",
696
+ item: ["group relative w-full flex items-center gap-2 px-2 py-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
697
+ itemLeadingIcon: ["shrink-0 size-5 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
651
698
  itemLeadingAvatar: "shrink-0",
652
699
  itemLeadingAvatarSize: "2xs",
653
700
  itemLeadingChip: "shrink-0 size-5",
654
701
  itemLeadingChipSize: "md",
655
702
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
656
703
  itemTrailingIcon: "shrink-0 size-5",
657
- itemTrailingHighlightedIcon: "shrink-0 size-5 text-gray-400 dark:text-gray-500 hidden group-data-highlighted:inline-flex",
704
+ itemTrailingHighlightedIcon: "shrink-0 size-5 text-[var(--ui-text-dimmed)] hidden group-data-highlighted:inline-flex",
658
705
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
659
706
  itemTrailingKbdsSize: "md",
660
707
  itemLabel: "truncate space-x-1",
661
- itemLabelBase: "text-gray-900 dark:text-white [&>mark]:bg-primary-500 dark:[&>mark]:bg-primary-400 [&>mark]:text-white dark:[&>mark]:text-gray-900",
662
- itemLabelPrefix: "text-gray-700 dark:text-gray-200",
663
- itemLabelSuffix: "text-gray-400 dark:text-gray-500 [&>mark]:bg-primary-500 dark:[&>mark]:bg-primary-400 [&>mark]:text-white dark:[&>mark]:text-gray-900"
708
+ itemLabelBase: "text-[var(--ui-text-highlighted)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]",
709
+ itemLabelPrefix: "text-[var(--ui-text)]",
710
+ itemLabelSuffix: "text-[var(--ui-text-dimmed)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]"
711
+ },
712
+ variants: {
713
+ loading: {
714
+ true: {
715
+ itemLeadingIcon: "animate-spin"
716
+ }
717
+ }
664
718
  }
665
719
  });
666
720
 
@@ -670,11 +724,11 @@ const container = {
670
724
 
671
725
  const contextMenu = (options) => ({
672
726
  slots: {
673
- content: "min-w-32 bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 divide-y divide-gray-200 dark:divide-gray-800 overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
727
+ content: "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
674
728
  group: "p-1 isolate",
675
- label: "w-full flex items-center font-semibold text-gray-900 dark:text-white",
676
- separator: "-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800",
677
- item: "group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",
729
+ label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
730
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
731
+ item: "group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
678
732
  itemLeadingIcon: "shrink-0",
679
733
  itemLeadingAvatar: "shrink-0",
680
734
  itemLeadingAvatarSize: "",
@@ -683,17 +737,22 @@ const contextMenu = (options) => ({
683
737
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
684
738
  itemTrailingKbdsSize: "",
685
739
  itemLabel: "truncate",
686
- itemLabelExternalIcon: "size-3 align-top text-gray-400 dark:text-gray-500"
740
+ itemLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]"
687
741
  },
688
742
  variants: {
689
743
  active: {
690
744
  true: {
691
- item: "text-gray-900 dark:text-white before:bg-gray-100 dark:before:bg-gray-800",
692
- itemLeadingIcon: "text-gray-700 dark:text-gray-200"
745
+ item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
746
+ itemLeadingIcon: "text-[var(--ui-text)]"
693
747
  },
694
748
  false: {
695
- item: ["text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.theme.transitions && "transition-colors before:transition-colors"],
696
- itemLeadingIcon: ["text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme.transitions && "transition-colors"]
749
+ item: ["text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
750
+ itemLeadingIcon: ["text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
751
+ }
752
+ },
753
+ loading: {
754
+ true: {
755
+ itemLeadingIcon: "animate-spin"
697
756
  }
698
757
  },
699
758
  size: {
@@ -751,20 +810,20 @@ const contextMenu = (options) => ({
751
810
 
752
811
  const drawer = {
753
812
  slots: {
754
- overlay: "fixed inset-0 z-50 bg-gray-200/75 dark:bg-gray-800/75",
755
- content: "fixed z-50 bg-white dark:bg-gray-900 ring ring-gray-200 dark:ring-gray-800 flex focus:outline-none",
756
- handle: "shrink-0 rounded-full bg-gray-200 dark:bg-gray-700",
813
+ overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
814
+ content: "fixed bg-[var(--ui-bg)] ring ring-[var(--ui-border)] flex focus:outline-none",
815
+ handle: "shrink-0 rounded-full bg-[var(--ui-bg-accented)]",
757
816
  container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
758
817
  header: "",
759
- title: "text-gray-900 dark:text-white font-semibold",
760
- description: "mt-1 text-gray-500 dark:text-gray-400 text-sm",
818
+ title: "text-[var(--ui-text-highlighted)] font-semibold",
819
+ description: "mt-1 text-[var(--ui-text-muted)] text-sm",
761
820
  body: "flex-1",
762
821
  footer: "flex flex-col gap-1.5"
763
822
  },
764
823
  variants: {
765
824
  direction: {
766
825
  top: {
767
- content: "top-0 mb-24 flex-col-reverse rounded-b-lg",
826
+ content: "top-0 mb-24 flex-col-reverse rounded-b-[calc(var(--ui-radius)*2)]",
768
827
  handle: "mb-4"
769
828
  },
770
829
  right: {
@@ -772,7 +831,7 @@ const drawer = {
772
831
  handle: "ml-4"
773
832
  },
774
833
  bottom: {
775
- content: "bottom-0 mt-24 flex-col rounded-t-lg",
834
+ content: "bottom-0 mt-24 flex-col rounded-t-[calc(var(--ui-radius)*2)]",
776
835
  handle: "mt-4"
777
836
  },
778
837
  left: {
@@ -790,7 +849,7 @@ const drawer = {
790
849
  }, {
791
850
  direction: ["right", "left"],
792
851
  class: {
793
- content: "inset-y-4 w-auto max-w-[calc(100%-2rem)] rounded-lg after:hidden",
852
+ content: "inset-y-4 w-auto max-w-[calc(100%-2rem)] rounded-[calc(var(--ui-radius)*2)] after:hidden",
794
853
  handle: "h-12 w-1.5 mt-auto mb-auto"
795
854
  }
796
855
  }]
@@ -798,12 +857,12 @@ const drawer = {
798
857
 
799
858
  const dropdownMenu = (options) => ({
800
859
  slots: {
801
- content: "min-w-32 bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 divide-y divide-gray-200 dark:divide-gray-800 overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
802
- arrow: "fill-gray-200 dark:fill-gray-800",
860
+ content: "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
861
+ arrow: "fill-[var(--ui-border)]",
803
862
  group: "p-1 isolate",
804
- label: "w-full flex items-center font-semibold text-gray-900 dark:text-white",
805
- separator: "-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800",
806
- item: "group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",
863
+ label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
864
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
865
+ item: "group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
807
866
  itemLeadingIcon: "shrink-0",
808
867
  itemLeadingAvatar: "shrink-0",
809
868
  itemLeadingAvatarSize: "",
@@ -812,17 +871,22 @@ const dropdownMenu = (options) => ({
812
871
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
813
872
  itemTrailingKbdsSize: "",
814
873
  itemLabel: "truncate",
815
- itemLabelExternalIcon: "size-3 align-top text-gray-400 dark:text-gray-500"
874
+ itemLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]"
816
875
  },
817
876
  variants: {
818
877
  active: {
819
878
  true: {
820
- item: "text-gray-900 dark:text-white before:bg-gray-100 dark:before:bg-gray-800",
821
- itemLeadingIcon: "text-gray-700 dark:text-gray-200"
879
+ item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
880
+ itemLeadingIcon: "text-[var(--ui-text)]"
822
881
  },
823
882
  false: {
824
- item: ["text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.theme.transitions && "transition-colors before:transition-colors"],
825
- itemLeadingIcon: ["text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme.transitions && "transition-colors"]
883
+ item: ["text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
884
+ itemLeadingIcon: ["text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
885
+ }
886
+ },
887
+ loading: {
888
+ true: {
889
+ itemLeadingIcon: "animate-spin"
826
890
  }
827
891
  },
828
892
  size: {
@@ -887,12 +951,12 @@ const formField = {
887
951
  root: "",
888
952
  wrapper: "",
889
953
  labelWrapper: "flex content-center items-center justify-between",
890
- label: "block font-medium text-gray-700 dark:text-gray-200",
954
+ label: "block font-medium text-[var(--ui-text)]",
891
955
  container: "mt-1 relative",
892
- description: "text-gray-500 dark:text-gray-400",
893
- error: "mt-2 text-error-500 dark:text-error-400",
894
- hint: "text-gray-500 dark:text-gray-400",
895
- help: "mt-2 text-gray-500 dark:text-gray-400"
956
+ description: "text-[var(--ui-text-muted)]",
957
+ error: "mt-2 text-[var(--ui-error)]",
958
+ hint: "text-[var(--ui-text-muted)]",
959
+ help: "mt-2 text-[var(--ui-text-muted)]"
896
960
  },
897
961
  variants: {
898
962
  size: {
@@ -904,7 +968,7 @@ const formField = {
904
968
  },
905
969
  required: {
906
970
  true: {
907
- label: `after:content-['*'] after:ms-0.5 after:text-error-500 dark:after:text-error-400`
971
+ label: `after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]`
908
972
  }
909
973
  }
910
974
  },
@@ -916,12 +980,13 @@ const formField = {
916
980
  const input = (options) => ({
917
981
  slots: {
918
982
  root: "relative inline-flex items-center",
919
- base: ["w-full rounded-md border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
983
+ base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
920
984
  leading: "absolute inset-y-0 start-0 flex items-center",
921
- leadingIcon: "shrink-0 text-gray-400 dark:text-gray-500",
985
+ leadingIcon: "shrink-0 text-[var(--ui-text-dimmed)]",
922
986
  leadingAvatar: "shrink-0",
987
+ leadingAvatarSize: "",
923
988
  trailing: "absolute inset-y-0 end-0 flex items-center",
924
- trailingIcon: "shrink-0 text-gray-400 dark:text-gray-500"
989
+ trailingIcon: "shrink-0 text-[var(--ui-text-dimmed)]"
925
990
  },
926
991
  variants: {
927
992
  ...buttonGroupVariantWithRoot,
@@ -931,6 +996,7 @@ const input = (options) => ({
931
996
  leading: "pl-2",
932
997
  trailing: "pr-2",
933
998
  leadingIcon: "size-4",
999
+ leadingAvatarSize: "3xs",
934
1000
  trailingIcon: "size-4"
935
1001
  },
936
1002
  sm: {
@@ -938,6 +1004,7 @@ const input = (options) => ({
938
1004
  leading: "pl-2.5",
939
1005
  trailing: "pr-2.5",
940
1006
  leadingIcon: "size-4",
1007
+ leadingAvatarSize: "3xs",
941
1008
  trailingIcon: "size-4"
942
1009
  },
943
1010
  md: {
@@ -945,6 +1012,7 @@ const input = (options) => ({
945
1012
  leading: "pl-2.5",
946
1013
  trailing: "pr-2.5",
947
1014
  leadingIcon: "size-5",
1015
+ leadingAvatarSize: "2xs",
948
1016
  trailingIcon: "size-5"
949
1017
  },
950
1018
  lg: {
@@ -952,6 +1020,7 @@ const input = (options) => ({
952
1020
  leading: "pl-3",
953
1021
  trailing: "pr-3",
954
1022
  leadingIcon: "size-5",
1023
+ leadingAvatarSize: "2xs",
955
1024
  trailingIcon: "size-5"
956
1025
  },
957
1026
  xl: {
@@ -959,19 +1028,20 @@ const input = (options) => ({
959
1028
  leading: "pl-3",
960
1029
  trailing: "pr-3",
961
1030
  leadingIcon: "size-6",
1031
+ leadingAvatarSize: "xs",
962
1032
  trailingIcon: "size-6"
963
1033
  }
964
1034
  },
965
1035
  variant: {
966
- outline: "text-gray-900 dark:text-white bg-white dark:bg-gray-900 ring ring-inset ring-gray-300 dark:ring-gray-700",
967
- soft: "text-gray-900 dark:text-white bg-gray-50 hover:bg-gray-100 focus:bg-gray-100 disabled:bg-gray-50 dark:bg-gray-800/50 dark:hover:bg-gray-800 dark:focus:bg-gray-800 dark:disabled:bg-gray-800/50",
968
- subtle: "text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-800 ring ring-inset ring-gray-300 dark:ring-gray-700",
969
- ghost: "text-gray-900 dark:text-white hover:bg-gray-100 focus:bg-gray-100 disabled:bg-transparent dark:hover:bg-gray-800 dark:focus:bg-gray-800 dark:disabled:bg-transparent",
970
- none: "text-gray-900 dark:text-white"
1036
+ outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1037
+ soft: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-[var(--ui-bg-elevated)]/50",
1038
+ subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1039
+ ghost: "text-[var(--ui-text-highlighted)] hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
1040
+ none: "text-[var(--ui-text-highlighted)]"
971
1041
  },
972
1042
  color: {
973
1043
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
974
- gray: ""
1044
+ neutral: ""
975
1045
  },
976
1046
  leading: {
977
1047
  true: ""
@@ -986,25 +1056,25 @@ const input = (options) => ({
986
1056
  true: ""
987
1057
  },
988
1058
  type: {
989
- file: "file:mr-1.5 file:font-medium file:text-gray-500 dark:file:text-gray-400 file:outline-none"
1059
+ file: "file:mr-1.5 file:font-medium file:text-[var(--ui-text-muted)] file:outline-none"
990
1060
  }
991
1061
  },
992
1062
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
993
1063
  color,
994
1064
  variant: ["outline", "subtle"],
995
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
1065
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
996
1066
  })), ...(options.theme.colors || []).map((color) => ({
997
1067
  color,
998
1068
  highlight: true,
999
- class: `ring ring-inset ring-${color}-500 dark:ring-${color}-400`
1069
+ class: `ring ring-inset ring-[var(--ui-${color})]`
1000
1070
  })), {
1001
- color: "gray",
1071
+ color: "neutral",
1002
1072
  variant: ["outline", "subtle"],
1003
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-900 dark:focus-visible:ring-white"
1073
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1004
1074
  }, {
1005
- color: "gray",
1075
+ color: "neutral",
1006
1076
  highlight: true,
1007
- class: "ring ring-inset ring-gray-900 dark:ring-white"
1077
+ class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1008
1078
  }, {
1009
1079
  leading: true,
1010
1080
  size: "xs",
@@ -1069,17 +1139,17 @@ const input = (options) => ({
1069
1139
  const inputMenu = (options) => {
1070
1140
  return defuFn({
1071
1141
  slots: {
1072
- base: () => ["rounded-md", options.theme.transitions && "transition-colors"],
1142
+ base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
1073
1143
  trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
1074
- arrow: "fill-gray-200 dark:fill-gray-800",
1075
- content: "max-h-60 w-[--radix-popper-anchor-width] bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1076
- viewport: "divide-y divide-gray-200 dark:divide-gray-800 scroll-py-1",
1144
+ arrow: "fill-[var(--ui-border)]",
1145
+ content: "max-h-60 w-[var(--radix-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1146
+ viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
1077
1147
  group: "p-1 isolate",
1078
- empty: "py-2 text-center text-sm text-gray-500 dark:text-gray-400",
1079
- label: "font-semibold text-gray-900 dark:text-white",
1080
- separator: "-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800",
1081
- item: ["group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.theme.transitions && "transition-colors before:transition-colors"],
1082
- itemLeadingIcon: ["shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.theme.transitions && "transition-colors"],
1148
+ empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
1149
+ label: "font-semibold text-[var(--ui-text-highlighted)]",
1150
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1151
+ item: ["group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
1152
+ itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
1083
1153
  itemLeadingAvatar: "shrink-0",
1084
1154
  itemLeadingAvatarSize: "",
1085
1155
  itemLeadingChip: "shrink-0",
@@ -1087,20 +1157,21 @@ const inputMenu = (options) => {
1087
1157
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
1088
1158
  itemTrailingIcon: "shrink-0",
1089
1159
  itemLabel: "truncate",
1090
- tagsItem: "px-1.5 py-0.5 rounded font-medium inline-flex items-center gap-0.5 ring ring-inset ring-gray-300 dark:ring-gray-700 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 data-disabled:cursor-not-allowed data-disabled:opacity-75",
1160
+ tagsItem: "px-1.5 py-0.5 rounded-[var(--ui-radius)] font-medium inline-flex items-center gap-0.5 ring ring-inset ring-[var(--ui-border-accented)] bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] data-disabled:cursor-not-allowed data-disabled:opacity-75",
1091
1161
  tagsItemText: "truncate",
1092
- tagsItemDelete: ["inline-flex items-center rounded-sm text-gray-400 dark:text-gray-500 hover:text-gray-700 hover:bg-gray-200 dark:hover:text-gray-200 dark:hover:bg-gray-700/50 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
1162
+ tagsItemDelete: ["inline-flex items-center rounded-[calc(var(--ui-radius)/2)] text-[var(--ui-text-dimmed)] hover:text-[var(--ui-text)] hover:bg-[var(--ui-bg-accented)]/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
1093
1163
  tagsItemDeleteIcon: "",
1094
- tagsInput: "border-0 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1164
+ tagsInput: ""
1095
1165
  },
1096
1166
  variants: {
1097
1167
  multiple: {
1098
1168
  true: {
1099
1169
  root: "flex-wrap",
1100
- base: ""
1170
+ base: "",
1171
+ tagsInput: "border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1101
1172
  },
1102
1173
  false: {
1103
- base: "w-full rounded-md border-0 focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1174
+ base: "w-full border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1104
1175
  }
1105
1176
  },
1106
1177
  size: {
@@ -1165,23 +1236,23 @@ const inputMenu = (options) => {
1165
1236
  color,
1166
1237
  multiple: true,
1167
1238
  variant: ["outline", "subtle"],
1168
- class: `has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-${color}-500 dark:has-[:focus-visible]:ring-${color}-400`
1239
+ class: `has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--${color})]`
1169
1240
  })), {
1170
- color: "gray",
1241
+ color: "neutral",
1171
1242
  multiple: true,
1172
1243
  variant: ["outline", "subtle"],
1173
- class: "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-gray-500 dark:has-[:focus-visible]:ring-white"
1244
+ class: "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--ui-border-inverted)]"
1174
1245
  }]
1175
1246
  }, input(options));
1176
1247
  };
1177
1248
 
1178
1249
  const kbd = {
1179
- base: "inline-flex items-center justify-center px-1 rounded font-medium font-sans",
1250
+ base: "inline-flex items-center justify-center px-1 rounded-[var(--ui-radius)] font-medium font-sans",
1180
1251
  variants: {
1181
1252
  variant: {
1182
- solid: "bg-gray-900 dark:bg-white text-white dark:text-gray-900",
1183
- outline: "bg-white dark:bg-gray-900 text-gray-900 dark:text-white ring ring-inset ring-gray-300 dark:ring-gray-700",
1184
- subtle: "bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 ring ring-inset ring-gray-300 dark:ring-gray-700"
1253
+ solid: "bg-[var(--ui-bg-inverted)] text-[var(--ui-bg)]",
1254
+ outline: "bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] ring ring-inset ring-[var(--ui-border-accented)]",
1255
+ subtle: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] ring ring-inset ring-[var(--ui-border-accented)]"
1185
1256
  },
1186
1257
  size: {
1187
1258
  sm: "h-4 min-w-[16px] text-[10px]",
@@ -1196,11 +1267,11 @@ const kbd = {
1196
1267
  };
1197
1268
 
1198
1269
  const link = (options) => ({
1199
- base: "focus-visible:outline-primary-500 dark:focus-visible:outline-primary-400",
1270
+ base: "focus-visible:outline-[var(--ui-primary)]",
1200
1271
  variants: {
1201
1272
  active: {
1202
- true: "text-primary-500 dark:text-primary-400",
1203
- false: ["text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200", options.theme.transitions && "transition-colors"]
1273
+ true: "text-[var(--ui-primary)]",
1274
+ false: ["text-[var(--ui-text-muted)] hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1204
1275
  },
1205
1276
  disabled: {
1206
1277
  true: "cursor-not-allowed opacity-75"
@@ -1210,13 +1281,13 @@ const link = (options) => ({
1210
1281
 
1211
1282
  const modal = {
1212
1283
  slots: {
1213
- overlay: "fixed inset-0 z-50 bg-gray-200/75 dark:bg-gray-800/75",
1214
- content: "fixed z-50 w-full h-dvh bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-800 flex flex-col focus:outline-none",
1284
+ overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
1285
+ content: "fixed w-full h-dvh bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] flex flex-col focus:outline-none",
1215
1286
  header: "px-4 py-5 sm:px-6",
1216
1287
  body: "flex-1 p-4 sm:p-6",
1217
1288
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
1218
- title: "text-gray-900 dark:text-white font-semibold",
1219
- description: "mt-1 text-gray-500 dark:text-gray-400 text-sm",
1289
+ title: "text-[var(--ui-text-highlighted)] font-semibold",
1290
+ description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1220
1291
  close: "absolute top-4 right-4"
1221
1292
  },
1222
1293
  variants: {
@@ -1231,7 +1302,7 @@ const modal = {
1231
1302
  content: "inset-0"
1232
1303
  },
1233
1304
  false: {
1234
- content: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] sm:max-w-lg sm:h-auto sm:my-8 sm:rounded-lg sm:shadow-lg sm:ring ring-gray-200 dark:ring-gray-800"
1305
+ content: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] sm:max-w-lg sm:h-auto sm:my-8 sm:rounded-[calc(var(--ui-radius)*2)] sm:shadow-lg sm:ring ring-[var(--ui-border)]"
1235
1306
  }
1236
1307
  }
1237
1308
  }
@@ -1242,7 +1313,7 @@ const navigationMenu = (options) => ({
1242
1313
  root: "relative flex gap-1.5",
1243
1314
  list: "isolate min-w-0",
1244
1315
  item: "min-w-0",
1245
- link: "group relative w-full flex items-center gap-1.5 font-medium text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
1316
+ link: "group relative w-full flex items-center gap-1.5 font-medium text-sm before:absolute before:z-[-1] before:rounded-[calc(var(--ui-radius)*1.5)] focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
1246
1317
  linkLeadingIcon: "shrink-0 size-5",
1247
1318
  linkLeadingAvatar: "shrink-0",
1248
1319
  linkLeadingAvatarSize: "2xs",
@@ -1251,37 +1322,37 @@ const navigationMenu = (options) => ({
1251
1322
  linkTrailingBadgeSize: "sm",
1252
1323
  linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
1253
1324
  linkLabel: "truncate",
1254
- linkLabelExternalIcon: "size-3 align-top text-gray-400 dark:text-gray-500",
1255
- childList: "grid grid-cols-2 gap-2 p-2",
1325
+ linkLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]",
1326
+ childList: "",
1256
1327
  childItem: "",
1257
- childLink: "group size-full px-3 py-2 rounded-md flex items-start gap-2 text-left",
1328
+ childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-left",
1258
1329
  childLinkWrapper: "flex flex-col items-start",
1259
1330
  childLinkIcon: "size-5 shrink-0",
1260
1331
  childLinkLabel: "font-semibold text-sm relative inline-flex",
1261
- childLinkLabelExternalIcon: "size-3 align-top text-gray-400 dark:text-gray-500",
1262
- childLinkDescription: "text-sm text-gray-500 dark:text-gray-400",
1263
- separator: "px-2 h-px bg-gray-200 dark:bg-gray-800",
1332
+ childLinkLabelExternalIcon: "size-3 align-top text-[var(--ui-text-dimmed)]",
1333
+ childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
1334
+ separator: "px-2 h-px bg-[var(--ui-border)]",
1264
1335
  viewportWrapper: "absolute top-full inset-x-0 flex w-full",
1265
1336
  // FIXME: add `sm:w-[var(--radix-navigation-menu-viewport-width)]` / `transition-[width,height]` / `origin-[top_center]` once position is based on trigger
1266
- viewport: "relative overflow-hidden bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 h-[--radix-navigation-menu-viewport-height] w-full data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1337
+ viewport: "relative overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] h-[var(--radix-navigation-menu-viewport-height)] w-full data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1267
1338
  content: "absolute top-0 left-0 w-full data-[motion=from-start]:animate-[enter-from-left_200ms_ease] data-[motion=from-end]:animate-[enter-from-right_200ms_ease] data-[motion=to-start]:animate-[exit-to-left_200ms_ease] data-[motion=to-end]:animate-[exit-to-right_200ms_ease]",
1268
1339
  indicator: "data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] bottom-0 z-[1] flex h-2.5 items-end justify-center overflow-hidden transition-transform duration-200 ease-out",
1269
- arrow: "relative top-[50%] size-2.5 rotate-45 border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 z-[1] rounded-sm"
1340
+ arrow: "relative top-[50%] size-2.5 rotate-45 border border-[var(--ui-border)] bg-[var(--ui-bg)] z-[1] rounded-[calc(var(--ui-radius)/2)]"
1270
1341
  },
1271
1342
  variants: {
1272
1343
  color: {
1273
1344
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1274
- link: `focus-visible:before:ring-${color}-500 dark:focus-visible:before:ring-${color}-400`,
1275
- childLink: `focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`
1345
+ link: `focus-visible:before:ring-[var(--ui-${color})]`,
1346
+ childLink: `focus-visible:outline-[var(--ui-${color})]`
1276
1347
  }])),
1277
- gray: {
1278
- link: "focus-visible:before:ring-gray-900 dark:focus-visible:before:ring-white",
1279
- childLink: "focus-visible:outline-gray-900 dark:focus-visible:outline-white"
1348
+ neutral: {
1349
+ link: "focus-visible:before:ring-[var(--ui-border-inverted)]",
1350
+ childLink: "focus-visible:outline-[var(--ui-border-inverted)]"
1280
1351
  }
1281
1352
  },
1282
1353
  highlightColor: {
1283
1354
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1284
- gray: ""
1355
+ neutral: ""
1285
1356
  },
1286
1357
  variant: {
1287
1358
  pill: "",
@@ -1292,23 +1363,26 @@ const navigationMenu = (options) => ({
1292
1363
  root: "w-full items-center justify-between",
1293
1364
  list: "flex items-center",
1294
1365
  item: "py-2",
1295
- link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0"
1366
+ link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
1367
+ childList: "grid grid-cols-2 gap-2 p-2"
1296
1368
  },
1297
1369
  vertical: {
1298
1370
  root: "flex-col",
1299
- link: "px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
1371
+ link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
1372
+ childList: "ml-5 border-l border-[var(--ui-border)]",
1373
+ childItem: "pl-1.5 -ml-px"
1300
1374
  }
1301
1375
  },
1302
1376
  active: {
1303
1377
  true: {
1304
- childLink: "bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",
1305
- childLinkIcon: "text-gray-700 dark:text-gray-200"
1378
+ childLink: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text-highlighted)]",
1379
+ childLinkIcon: "text-[var(--ui-text)]"
1306
1380
  },
1307
1381
  false: {
1308
- link: "text-gray-500 dark:text-gray-400",
1309
- linkLeadingIcon: "text-gray-400 dark:text-gray-500",
1310
- childLink: ["hover:bg-gray-50 dark:hover:bg-gray-800/50 text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white", options.theme.transitions && "transition-colors"],
1311
- childLinkIcon: ["text-gray-400 dark:text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-200", options.theme.transitions && "transition-colors"]
1382
+ link: "text-[var(--ui-text-muted)]",
1383
+ linkLeadingIcon: "text-[var(--ui-text-dimmed)]",
1384
+ childLink: ["hover:bg-[var(--ui-bg-elevated)]/50 text-[var(--ui-text)] hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1385
+ childLinkIcon: ["text-[var(--ui-text-dimmed)] group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1312
1386
  }
1313
1387
  },
1314
1388
  disabled: {
@@ -1339,76 +1413,93 @@ const navigationMenu = (options) => ({
1339
1413
  active: false,
1340
1414
  variant: "pill",
1341
1415
  class: {
1342
- link: ["hover:text-gray-900 dark:hover:text-white hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50 data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50", options.theme.transitions && "transition-colors before:transition-colors"],
1343
- linkLeadingIcon: ["group-hover:text-gray-700 dark:group-hover:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme.transitions && "transition-colors"]
1416
+ link: ["hover:text-[var(--ui-text-highlighted)] hover:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors before:transition-colors"],
1417
+ linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1418
+ }
1419
+ }, {
1420
+ disabled: false,
1421
+ variant: "pill",
1422
+ highlight: true,
1423
+ orientation: "horizontal",
1424
+ class: {
1425
+ link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1426
+ }
1427
+ }, {
1428
+ disabled: false,
1429
+ variant: "pill",
1430
+ highlight: false,
1431
+ active: false,
1432
+ orientation: "horizontal",
1433
+ class: {
1434
+ link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1344
1435
  }
1345
1436
  }, ...(options.theme.colors || []).map((color) => ({
1346
1437
  color,
1347
1438
  variant: "pill",
1348
1439
  active: true,
1349
1440
  class: {
1350
- link: `text-${color}-500 dark:text-${color}-400`,
1351
- linkLeadingIcon: `text-${color}-500 dark:text-${color}-400`
1441
+ link: `text-[var(--ui-${color})]`,
1442
+ linkLeadingIcon: `text-[var(--ui-${color})]`
1352
1443
  }
1353
1444
  })), {
1354
- color: "gray",
1445
+ color: "neutral",
1355
1446
  variant: "pill",
1356
1447
  active: true,
1357
1448
  class: {
1358
- link: "text-gray-900 dark:text-white",
1359
- linkLeadingIcon: "text-gray-900 dark:text-white"
1449
+ link: "text-[var(--ui-text-highlighted)]",
1450
+ linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
1360
1451
  }
1361
1452
  }, {
1362
1453
  variant: "pill",
1363
1454
  active: true,
1364
1455
  highlight: false,
1365
1456
  class: {
1366
- link: "before:bg-gray-100 dark:before:bg-gray-800"
1457
+ link: "before:bg-[var(--ui-bg-elevated)]"
1367
1458
  }
1368
1459
  }, {
1369
1460
  variant: "pill",
1370
1461
  active: true,
1371
1462
  highlight: true,
1372
1463
  class: {
1373
- link: ["hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50", options.theme.transitions && "before:transition-colors"]
1464
+ link: ["hover:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "before:transition-colors"]
1374
1465
  }
1375
1466
  }, {
1376
1467
  disabled: false,
1377
1468
  active: false,
1378
1469
  variant: "link",
1379
1470
  class: {
1380
- link: ["hover:text-gray-900 dark:hover:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white", options.theme.transitions && "transition-colors"],
1381
- linkLeadingIcon: ["group-hover:text-gray-700 dark:group-hover:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200", options.theme.transitions && "transition-colors"]
1471
+ link: ["hover:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1472
+ linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1382
1473
  }
1383
1474
  }, ...(options.theme.colors || []).map((color) => ({
1384
1475
  color,
1385
1476
  variant: "link",
1386
1477
  active: true,
1387
1478
  class: {
1388
- link: `text-${color}-500 dark:text-${color}-400`,
1389
- linkLeadingIcon: `text-${color}-500 dark:text-${color}-400`
1479
+ link: `text-[var(--ui-${color})]`,
1480
+ linkLeadingIcon: `text-[var(--ui-${color})]`
1390
1481
  }
1391
1482
  })), {
1392
- color: "gray",
1483
+ color: "neutral",
1393
1484
  variant: "link",
1394
1485
  active: true,
1395
1486
  class: {
1396
- link: "text-gray-900 dark:text-white",
1397
- linkLeadingIcon: "text-gray-900 dark:text-white"
1487
+ link: "text-[var(--ui-text-highlighted)]",
1488
+ linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
1398
1489
  }
1399
1490
  }, ...(options.theme.colors || []).map((highlightColor) => ({
1400
1491
  highlightColor,
1401
1492
  highlight: true,
1402
1493
  active: true,
1403
1494
  class: {
1404
- link: `after:bg-${highlightColor}-500 dark:after:bg-${highlightColor}-400`
1495
+ link: `after:bg-[var(--ui-${highlightColor})]`
1405
1496
  }
1406
1497
  })), {
1407
- highlightColor: "gray",
1498
+ highlightColor: "neutral",
1408
1499
  highlight: true,
1409
1500
  active: true,
1410
1501
  class: {
1411
- link: "after:bg-gray-900 dark:after:bg-white"
1502
+ link: "after:bg-[var(--ui-bg-inverted)]"
1412
1503
  }
1413
1504
  }],
1414
1505
  defaultVariants: {
@@ -1429,17 +1520,17 @@ const pagination = {
1429
1520
 
1430
1521
  const popover = {
1431
1522
  slots: {
1432
- content: "bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1433
- arrow: "fill-gray-200 dark:fill-gray-800"
1523
+ content: "bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none",
1524
+ arrow: "fill-[var(--ui-border)]"
1434
1525
  }
1435
1526
  };
1436
1527
 
1437
1528
  const progress = (options) => ({
1438
1529
  slots: {
1439
1530
  root: "gap-2",
1440
- base: "relative overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700",
1531
+ base: "relative overflow-hidden rounded-full bg-[var(--ui-bg-accented)]",
1441
1532
  indicator: "rounded-full size-full transition-transform duration-200 ease-out",
1442
- status: "flex justify-end text-gray-400 dark:text-gray-500 transition-[width] duration-200",
1533
+ status: "flex justify-end text-[var(--ui-text-dimmed)] transition-[width] duration-200",
1443
1534
  steps: "grid items-end",
1444
1535
  step: "truncate text-end row-start-1 col-start-1 transition-opacity"
1445
1536
  },
@@ -1452,12 +1543,12 @@ const progress = (options) => ({
1452
1543
  },
1453
1544
  color: {
1454
1545
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1455
- indicator: `bg-${color}-500 dark:bg-${color}-400`,
1456
- steps: `text-${color}-500 dark:text-${color}-400`
1546
+ indicator: `bg-[var(--ui-${color})]`,
1547
+ steps: `text-[var(--ui-${color})]`
1457
1548
  }])),
1458
- gray: {
1459
- indicator: "bg-gray-900 dark:bg-white",
1460
- steps: "text-white dark:text-gray-900"
1549
+ neutral: {
1550
+ indicator: "bg-[var(--ui-bg-inverted)]",
1551
+ steps: "text-[var(--ui-bg)]"
1461
1552
  }
1462
1553
  },
1463
1554
  size: {
@@ -1495,7 +1586,7 @@ const progress = (options) => ({
1495
1586
  step: "opacity-100"
1496
1587
  },
1497
1588
  first: {
1498
- step: "opacity-100 text-gray-500 dark:text-gray-400"
1589
+ step: "opacity-100 text-[var(--ui-text-muted)]"
1499
1590
  },
1500
1591
  other: {
1501
1592
  step: "opacity-0"
@@ -1652,24 +1743,24 @@ const radioGroup = (options) => ({
1652
1743
  slots: {
1653
1744
  root: "relative",
1654
1745
  fieldset: "flex",
1655
- legend: "mb-1 block font-medium text-gray-700 dark:text-gray-200",
1746
+ legend: "mb-1 block font-medium text-[var(--ui-text)]",
1656
1747
  item: "flex items-start",
1657
- base: "rounded-full ring ring-inset ring-gray-300 dark:ring-gray-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-offset-white dark:focus-visible:outline-offset-gray-900",
1658
- indicator: "flex items-center justify-center size-full rounded-full after:bg-white dark:after:bg-gray-900 after:rounded-full",
1748
+ base: "rounded-full ring ring-inset ring-[var(--ui-border-accented)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-offset-[var(--ui-bg)]",
1749
+ indicator: "flex items-center justify-center size-full rounded-full after:bg-[var(--ui-bg)] after:rounded-full",
1659
1750
  container: "flex items-center",
1660
1751
  wrapper: "ms-2",
1661
- label: "block font-medium text-gray-700 dark:text-gray-200",
1662
- description: "text-gray-500 dark:text-gray-400"
1752
+ label: "block font-medium text-[var(--ui-text)]",
1753
+ description: "text-[var(--ui-text-muted)]"
1663
1754
  },
1664
1755
  variants: {
1665
1756
  color: {
1666
1757
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1667
- base: `focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`,
1668
- indicator: `bg-${color}-500 dark:bg-${color}-400`
1758
+ base: `focus-visible:outline-[var(--ui-${color})]`,
1759
+ indicator: `bg-[var(--ui-${color})]`
1669
1760
  }])),
1670
- gray: {
1671
- base: "focus-visible:outline-gray-900 dark:focus-visible:outline-white",
1672
- indicator: "bg-gray-900 dark:bg-white"
1761
+ neutral: {
1762
+ base: "focus-visible:outline-[var(--ui-border-inverted)]",
1763
+ indicator: "bg-[var(--ui-bg-inverted)]"
1673
1764
  }
1674
1765
  },
1675
1766
  orientation: {
@@ -1731,7 +1822,7 @@ const radioGroup = (options) => ({
1731
1822
  },
1732
1823
  required: {
1733
1824
  true: {
1734
- legend: "after:content-['*'] after:ms-0.5 after:text-error-500 dark:after:text-error-400"
1825
+ legend: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
1735
1826
  }
1736
1827
  }
1737
1828
  },
@@ -1745,17 +1836,17 @@ const select = (options) => {
1745
1836
  return defuFn({
1746
1837
  slots: {
1747
1838
  root: () => void 0,
1748
- base: () => ["relative group rounded-md inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
1749
- value: "truncate group-data-placeholder:text-current/50",
1750
- arrow: "fill-gray-200 dark:fill-gray-800",
1751
- content: "max-h-60 w-[--radix-popper-anchor-width] bg-white dark:bg-gray-900 shadow-lg rounded-md ring ring-gray-200 dark:ring-gray-800 overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1752
- viewport: "divide-y divide-gray-200 dark:divide-gray-800 scroll-py-1",
1839
+ base: () => ["relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
1840
+ value: "truncate group-data-placeholder:text-[var(--ui-text-dimmed)]",
1841
+ arrow: "fill-[var(--ui-border)]",
1842
+ content: "max-h-60 w-[var(--radix-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1843
+ viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
1753
1844
  group: "p-1 isolate",
1754
- empty: "py-2 text-center text-sm text-gray-500 dark:text-gray-400",
1755
- label: "font-semibold text-gray-900 dark:text-white",
1756
- separator: "-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800",
1757
- item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50", options.theme.transitions && "transition-colors before:transition-colors"],
1758
- itemLeadingIcon: ["shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200", options.theme.transitions && "transition-colors"],
1845
+ empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
1846
+ label: "font-semibold text-[var(--ui-text-highlighted)]",
1847
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1848
+ item: ["group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75 text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
1849
+ itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
1759
1850
  itemLeadingAvatar: "shrink-0",
1760
1851
  itemLeadingAvatarSize: "",
1761
1852
  itemLeadingChip: "shrink-0",
@@ -1821,8 +1912,8 @@ const selectMenu = (options) => {
1821
1912
  return defu({
1822
1913
  slots: {
1823
1914
  value: "truncate",
1824
- placeholder: "truncate text-current/50",
1825
- input: "placeholder-gray-400 dark:placeholder-gray-500 border-0 border-b border-gray-200 dark:border-gray-800 focus:outline-none"
1915
+ placeholder: "truncate text-[var(--ui-text-dimmed)]",
1916
+ input: "placeholder:text-[var(--ui-text-dimmed)] border-0 border-b border-[var(--ui-border)] focus:outline-none"
1826
1917
  },
1827
1918
  variants: {
1828
1919
  size: {
@@ -1850,7 +1941,7 @@ const separator = (options) => ({
1850
1941
  slots: {
1851
1942
  root: "flex items-center align-center text-center",
1852
1943
  border: "",
1853
- container: "font-medium text-gray-700 dark:text-gray-200 flex",
1944
+ container: "font-medium text-[var(--ui-text)] flex",
1854
1945
  icon: "shrink-0 size-5",
1855
1946
  avatar: "shrink-0",
1856
1947
  avatarSize: "2xs",
@@ -1858,8 +1949,8 @@ const separator = (options) => ({
1858
1949
  },
1859
1950
  variants: {
1860
1951
  color: {
1861
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-${color}-500 dark:border-${color}-400` }])),
1862
- gray: { border: "border-gray-200 dark:border-gray-800" }
1952
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[var(--ui-${color})]` }])),
1953
+ neutral: { border: "border-[var(--ui-border)]" }
1863
1954
  },
1864
1955
  orientation: {
1865
1956
  horizontal: {
@@ -1934,37 +2025,37 @@ const separator = (options) => ({
1934
2025
  class: { border: "border-s-[5px]" }
1935
2026
  }],
1936
2027
  defaultVariants: {
1937
- color: "gray",
2028
+ color: "neutral",
1938
2029
  size: "xs",
1939
2030
  type: "solid"
1940
2031
  }
1941
2032
  });
1942
2033
 
1943
2034
  const skeleton = {
1944
- base: "animate-pulse rounded-md bg-gray-100 dark:bg-gray-800"
2035
+ base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-[var(--ui-bg-elevated)]"
1945
2036
  };
1946
2037
 
1947
2038
  const slideover = {
1948
2039
  slots: {
1949
- overlay: "fixed inset-0 z-50 bg-gray-200/75 dark:bg-gray-800/75",
1950
- content: "fixed z-50 bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-800 sm:ring ring-gray-200 dark:ring-gray-800 sm:shadow-lg flex flex-col focus:outline-none",
2040
+ overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
2041
+ content: "fixed bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] sm:ring ring-[var(--ui-border)] sm:shadow-lg flex flex-col focus:outline-none",
1951
2042
  header: "px-4 py-5 sm:px-6",
1952
2043
  body: "flex-1 overflow-y-auto p-4 sm:p-6",
1953
2044
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
1954
- title: "text-gray-900 dark:text-white font-semibold",
1955
- description: "mt-1 text-gray-500 dark:text-gray-400 text-sm",
2045
+ title: "text-[var(--ui-text-highlighted)] font-semibold",
2046
+ description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1956
2047
  close: "absolute top-4 right-4"
1957
2048
  },
1958
2049
  variants: {
1959
2050
  side: {
1960
2051
  top: {
1961
- content: "inset-x-0 top-0"
2052
+ content: "inset-x-0 top-0 max-h-full"
1962
2053
  },
1963
2054
  right: {
1964
2055
  content: "right-0 inset-y-0 w-full max-w-md"
1965
2056
  },
1966
2057
  bottom: {
1967
- content: "inset-x-0 bottom-0"
2058
+ content: "inset-x-0 bottom-0 max-h-full"
1968
2059
  },
1969
2060
  left: {
1970
2061
  content: "left-0 inset-y-0 w-full max-w-md"
@@ -2006,19 +2097,19 @@ const slideover = {
2006
2097
  const slider = (options) => ({
2007
2098
  slots: {
2008
2099
  root: "relative flex items-center select-none touch-none",
2009
- track: "relative bg-gray-200 dark:bg-gray-700 overflow-hidden rounded-full grow",
2100
+ track: "relative bg-[var(--ui-bg-accented)] overflow-hidden rounded-full grow",
2010
2101
  range: "absolute rounded-full",
2011
- thumb: "rounded-full bg-white dark:bg-gray-900 ring-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2"
2102
+ thumb: "rounded-full bg-[var(--ui-bg)] ring-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2"
2012
2103
  },
2013
2104
  variants: {
2014
2105
  color: {
2015
2106
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2016
- range: `bg-${color}-500 dark:bg-${color}-400`,
2017
- thumb: `ring-${color}-500 dark:ring-${color}-400 focus-visible:outline-${color}-500/50 dark:focus-visible:outline-${color}-400/50`
2107
+ range: `bg-[var(--ui-${color})]`,
2108
+ thumb: `ring-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]`
2018
2109
  }])),
2019
- gray: {
2020
- range: "bg-gray-900 dark:bg-white",
2021
- thumb: "ring-gray-900 dark:ring-white focus-visible:outline-gray-900/50 dark:focus-visible:outline-white/50"
2110
+ neutral: {
2111
+ range: "bg-[var(--ui-bg-inverted)]",
2112
+ thumb: "ring-[var(--ui-border-inverted)] focus-visible:outline-[var(--ui-border-inverted)]/50"
2022
2113
  }
2023
2114
  },
2024
2115
  size: {
@@ -2124,23 +2215,23 @@ const slider = (options) => ({
2124
2215
  const _switch = (options) => ({
2125
2216
  slots: {
2126
2217
  root: "relative flex items-start",
2127
- base: ["inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-gray-900 data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700", options.theme.transitions && "transition-colors duration-200"],
2218
+ base: ["inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--ui-bg)] data-[state=unchecked]:bg-[var(--ui-bg-accented)]", options.theme.transitions && "transition-colors duration-200"],
2128
2219
  container: "flex items-center",
2129
- thumb: "group pointer-events-none block rounded-full bg-white dark:bg-gray-900 shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 flex items-center justify-center",
2130
- icon: ["absolute shrink-0 group-data-[state=unchecked]:text-gray-400 dark:group-data-[state=unchecked]:text-gray-500 opacity-0 size-10/12", options.theme.transitions && "transition-[color,opacity] duration-200"],
2220
+ thumb: "group pointer-events-none block rounded-full bg-[var(--ui-bg)] shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 flex items-center justify-center",
2221
+ icon: ["absolute shrink-0 group-data-[state=unchecked]:text-[var(--ui-text-dimmed)] opacity-0 size-10/12", options.theme.transitions && "transition-[color,opacity] duration-200"],
2131
2222
  wrapper: "ms-2",
2132
- label: "block font-medium text-gray-700 dark:text-gray-200",
2133
- description: "text-gray-500 dark:text-gray-400"
2223
+ label: "block font-medium text-[var(--ui-text)]",
2224
+ description: "text-[var(--ui-text-muted)]"
2134
2225
  },
2135
2226
  variants: {
2136
2227
  color: {
2137
2228
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2138
- base: `data-[state=checked]:bg-${color}-500 dark:data-[state=checked]:bg-${color}-400 focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`,
2139
- icon: `group-data-[state=checked]:text-${color}-500 dark:group-data-[state=checked]:text-${color}-400`
2229
+ base: `data-[state=checked]:bg-[var(--ui-${color})] focus-visible:ring-[var(--ui-${color})]`,
2230
+ icon: `group-data-[state=checked]:text-[var(--ui-${color})]`
2140
2231
  }])),
2141
- gray: {
2142
- base: "data-[state=checked]:bg-gray-900 dark:data-[state=checked]:bg-white focus-visible:ring-gray-900 dark:focus-visible:ring-white",
2143
- icon: "group-data-[state=checked]:text-gray-900 dark:group-data-[state=checked]:text-white"
2232
+ neutral: {
2233
+ base: "data-[state=checked]:bg-[var(--ui-bg-inverted)] focus-visible:ring-[var(--ui-border-inverted)]",
2234
+ icon: "group-data-[state=checked]:text-[var(--ui-text-highlighted)]"
2144
2235
  }
2145
2236
  },
2146
2237
  size: {
@@ -2192,7 +2283,7 @@ const _switch = (options) => ({
2192
2283
  },
2193
2284
  required: {
2194
2285
  true: {
2195
- label: "after:content-['*'] after:ms-0.5 after:text-error-500 dark:after:text-error-400"
2286
+ label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2196
2287
  }
2197
2288
  },
2198
2289
  disabled: {
@@ -2209,12 +2300,94 @@ const _switch = (options) => ({
2209
2300
  }
2210
2301
  });
2211
2302
 
2303
+ const table = (options) => ({
2304
+ slots: {
2305
+ root: "relative overflow-auto",
2306
+ base: "min-w-full overflow-clip",
2307
+ thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-[var(--ui-border-accented)]",
2308
+ tbody: "divide-y divide-[var(--ui-border)]",
2309
+ tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
2310
+ th: "px-4 py-3.5 text-sm text-[var(--ui-text-highlighted)] text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pr-0",
2311
+ td: "p-4 text-sm text-[var(--ui-text-muted)] whitespace-nowrap [&:has([role=checkbox])]:pr-0",
2312
+ empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]"
2313
+ },
2314
+ variants: {
2315
+ pinned: {
2316
+ true: {
2317
+ th: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2318
+ td: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
2319
+ }
2320
+ },
2321
+ sticky: {
2322
+ true: {
2323
+ thead: "sticky top-0 inset-x-0 bg-[var(--ui-bg)]/75 z-[1] backdrop-blur"
2324
+ }
2325
+ },
2326
+ loading: {
2327
+ true: {
2328
+ thead: "after:absolute after:bottom-0 after:inset-x-0 after:h-px"
2329
+ }
2330
+ },
2331
+ loadingAnimation: {
2332
+ "carousel": "",
2333
+ "carousel-inverse": "",
2334
+ "swing": "",
2335
+ "elastic": ""
2336
+ },
2337
+ loadingColor: {
2338
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
2339
+ neutral: ""
2340
+ }
2341
+ },
2342
+ compoundVariants: [...(options.theme.colors || []).map((loadingColor) => ({
2343
+ loading: true,
2344
+ loadingColor,
2345
+ class: {
2346
+ thead: `after:bg-[var(--ui-${loadingColor})]`
2347
+ }
2348
+ })), {
2349
+ loading: true,
2350
+ loadingColor: "neutral",
2351
+ class: {
2352
+ thead: "after:bg-[var(--ui-bg-inverted)]"
2353
+ }
2354
+ }, {
2355
+ loading: true,
2356
+ loadingAnimation: "carousel",
2357
+ class: {
2358
+ thead: "after:animate-[carousel_2s_ease-in-out_infinite]"
2359
+ }
2360
+ }, {
2361
+ loading: true,
2362
+ loadingAnimation: "carousel-inverse",
2363
+ class: {
2364
+ thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite]"
2365
+ }
2366
+ }, {
2367
+ loading: true,
2368
+ loadingAnimation: "swing",
2369
+ class: {
2370
+ thead: "after:animate-[swing_2s_ease-in-out_infinite]"
2371
+ }
2372
+ }, {
2373
+ loading: true,
2374
+ loadingAnimation: "elastic",
2375
+ class: {
2376
+ thead: "after:animate-[elastic_2s_ease-in-out_infinite]"
2377
+ }
2378
+ }],
2379
+ defaultVariants: {
2380
+ loadingColor: "primary",
2381
+ loadingAnimation: "carousel"
2382
+ }
2383
+ });
2384
+
2212
2385
  const tabs = (options) => ({
2213
2386
  slots: {
2214
2387
  root: "flex items-center gap-2",
2215
2388
  list: "relative flex p-1 group",
2216
2389
  indicator: "absolute transition-[translate,width] duration-200",
2217
- trigger: ["relative inline-flex items-center shrink-0 data-[state=inactive]:text-gray-500 dark:data-[state=inactive]:text-gray-400 hover:data-[state=inactive]:text-gray-700 dark:hover:data-[state=inactive]:text-gray-200 font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none", options.theme.transitions && "transition-colors"],
2390
+ trigger: ["relative inline-flex items-center shrink-0 data-[state=inactive]:text-[var(--ui-text-muted)] hover:data-[state=inactive]:text-[var(--ui-text)] font-medium rounded-[calc(var(--ui-radius)*1.5)] disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none", options.theme.transitions && "transition-colors"],
2218
2391
  content: "focus:outline-none w-full",
2219
2392
  leadingIcon: "shrink-0",
2220
2393
  leadingAvatar: "shrink-0",
@@ -2224,16 +2397,16 @@ const tabs = (options) => ({
2224
2397
  variants: {
2225
2398
  color: {
2226
2399
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
2227
- gray: ""
2400
+ neutral: ""
2228
2401
  },
2229
2402
  variant: {
2230
2403
  pill: {
2231
- list: "bg-gray-100 dark:bg-gray-800 rounded-lg",
2404
+ list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
2232
2405
  trigger: "flex-1",
2233
- indicator: "rounded-md shadow-sm"
2406
+ indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-sm"
2234
2407
  },
2235
2408
  link: {
2236
- list: "border-gray-200 dark:border-gray-800",
2409
+ list: "border-[var(--ui-border)]",
2237
2410
  indicator: "rounded-full"
2238
2411
  }
2239
2412
  },
@@ -2241,12 +2414,12 @@ const tabs = (options) => ({
2241
2414
  horizontal: {
2242
2415
  root: "flex-col",
2243
2416
  list: "w-full",
2244
- indicator: "left-0 w-[--radix-tabs-indicator-size] translate-x-[--radix-tabs-indicator-position]",
2417
+ indicator: "left-0 w-[var(--radix-tabs-indicator-size)] translate-x-[var(--radix-tabs-indicator-position)]",
2245
2418
  trigger: "justify-center"
2246
2419
  },
2247
2420
  vertical: {
2248
2421
  list: "flex-col",
2249
- indicator: "top-0 h-[--radix-tabs-indicator-size] translate-y-[--radix-tabs-indicator-position]"
2422
+ indicator: "top-0 h-[var(--radix-tabs-indicator-size)] translate-y-[var(--radix-tabs-indicator-position)]"
2250
2423
  }
2251
2424
  },
2252
2425
  size: {
@@ -2308,29 +2481,29 @@ const tabs = (options) => ({
2308
2481
  color,
2309
2482
  variant: "pill",
2310
2483
  class: {
2311
- indicator: `bg-${color}-500 dark:bg-${color}-400`,
2312
- trigger: `data-[state=active]:text-white dark:data-[state=active]:text-gray-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-${color}-500 dark:focus-visible:outline-${color}-400`
2484
+ indicator: `bg-[var(--ui-${color})]`,
2485
+ trigger: `data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
2313
2486
  }
2314
2487
  })), {
2315
- color: "gray",
2488
+ color: "neutral",
2316
2489
  variant: "pill",
2317
2490
  class: {
2318
- indicator: "bg-gray-900 dark:bg-white",
2319
- trigger: "data-[state=active]:text-white dark:data-[state=active]:text-gray-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900 dark:focus-visible:outline-white"
2491
+ indicator: "bg-[var(--ui-bg-inverted)]",
2492
+ trigger: "data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
2320
2493
  }
2321
2494
  }, ...(options.theme.colors || []).map((color) => ({
2322
2495
  color,
2323
2496
  variant: "link",
2324
2497
  class: {
2325
- indicator: `bg-${color}-500 dark:bg-${color}-400`,
2326
- trigger: `data-[state=active]:text-${color}-500 dark:data-[state=active]:text-${color}-400 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`
2498
+ indicator: `bg-[var(--ui-${color})]`,
2499
+ trigger: `data-[state=active]:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
2327
2500
  }
2328
2501
  })), {
2329
- color: "gray",
2502
+ color: "neutral",
2330
2503
  variant: "link",
2331
2504
  class: {
2332
- indicator: "bg-gray-900 dark:bg-white",
2333
- trigger: "data-[state=active]:text-gray-900 dark:data-[state=active]:text-white focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-900 dark:focus-visible:ring-white"
2505
+ indicator: "bg-[var(--ui-bg-inverted)]",
2506
+ trigger: "data-[state=active]:text-[var(--ui-text-highlighted)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
2334
2507
  }
2335
2508
  }],
2336
2509
  defaultVariants: {
@@ -2346,10 +2519,10 @@ const textarea = (options) => {
2346
2519
 
2347
2520
  const toast = (options) => ({
2348
2521
  slots: {
2349
- root: "relative group overflow-hidden bg-white dark:bg-gray-900 shadow-lg rounded-lg ring ring-gray-200 dark:ring-gray-800 p-4 flex gap-2.5 focus:outline-none",
2522
+ root: "relative group overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*2)] ring ring-[var(--ui-border)] p-4 flex gap-2.5 focus:outline-none",
2350
2523
  wrapper: "w-0 flex-1 flex flex-col gap-1",
2351
- title: "text-sm font-medium text-gray-900 dark:text-white",
2352
- description: "text-sm text-gray-500 dark:text-gray-400",
2524
+ title: "text-sm font-medium text-[var(--ui-text-highlighted)]",
2525
+ description: "text-sm text-[var(--ui-text-muted)]",
2353
2526
  icon: "shrink-0 size-5",
2354
2527
  avatar: "shrink-0",
2355
2528
  avatarSize: "2xl",
@@ -2360,14 +2533,14 @@ const toast = (options) => ({
2360
2533
  variants: {
2361
2534
  color: {
2362
2535
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2363
- root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}-500 dark:focus-visible:ring-${color}-400`,
2364
- icon: `text-${color}-500 dark:text-${color}-400`,
2365
- progress: `bg-${color}-500 dark:bg-${color}-400`
2536
+ root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`,
2537
+ icon: `text-[var(--ui-${color})]`,
2538
+ progress: `bg-[var(--ui-${color})]`
2366
2539
  }])),
2367
- gray: {
2368
- root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-900 dark:focus-visible:ring-white",
2369
- icon: "text-gray-900 dark:text-white",
2370
- progress: "bg-gray-900 dark:bg-white"
2540
+ neutral: {
2541
+ root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]",
2542
+ icon: "text-[var(--ui-text-highlighted)]",
2543
+ progress: "bg-[var(--ui-bg-inverted)]"
2371
2544
  }
2372
2545
  },
2373
2546
  multiline: {
@@ -2388,8 +2561,8 @@ const toast = (options) => ({
2388
2561
 
2389
2562
  const toaster = {
2390
2563
  slots: {
2391
- viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[--height] focus:outline-none",
2392
- base: "absolute inset-x-0 z-[--index] transform-[--transform] data-[expanded=false]:data-[front=false]:h-[--front-height] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
2564
+ viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
2565
+ base: "absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
2393
2566
  },
2394
2567
  variants: {
2395
2568
  position: {
@@ -2433,10 +2606,10 @@ const toaster = {
2433
2606
  }
2434
2607
  }, {
2435
2608
  swipeDirection: ["left", "right"],
2436
- class: "data-[swipe=move]:translate-x-[--radix-toast-swipe-move-x] data-[swipe=end]:translate-x-[--radix-toast-swipe-end-x] data-[swipe=cancel]:translate-x-0"
2609
+ class: "data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=cancel]:translate-x-0"
2437
2610
  }, {
2438
2611
  swipeDirection: ["up", "down"],
2439
- class: "data-[swipe=move]:translate-y-[--radix-toast-swipe-move-y] data-[swipe=end]:translate-y-[--radix-toast-swipe-end-y] data-[swipe=cancel]:translate-y-0"
2612
+ class: "data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=end]:translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=cancel]:translate-y-0"
2440
2613
  }],
2441
2614
  defaultVariants: {
2442
2615
  position: "bottom-right"
@@ -2445,8 +2618,8 @@ const toaster = {
2445
2618
 
2446
2619
  const tooltip = {
2447
2620
  slots: {
2448
- content: "flex items-center gap-1 bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow rounded ring ring-gray-200 dark:ring-gray-800 h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
2449
- arrow: "fill-gray-200 dark:fill-gray-800",
2621
+ content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
2622
+ arrow: "fill-[var(--ui-border)]",
2450
2623
  text: "truncate",
2451
2624
  kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:mr-0.5`,
2452
2625
  kbdsSize: "sm"
@@ -2464,6 +2637,7 @@ const theme = {
2464
2637
  button: button,
2465
2638
  buttonGroup: buttonGroup,
2466
2639
  card: card,
2640
+ carousel: carousel,
2467
2641
  checkbox: checkbox,
2468
2642
  chip: chip,
2469
2643
  collapsible: collapsible,
@@ -2491,6 +2665,7 @@ const theme = {
2491
2665
  slideover: slideover,
2492
2666
  slider: slider,
2493
2667
  switch: _switch,
2668
+ table: table,
2494
2669
  tabs: tabs,
2495
2670
  textarea: textarea,
2496
2671
  toast: toast,
@@ -2528,15 +2703,17 @@ function addTemplates(options, nuxt) {
2528
2703
  filename: "types/ui.d.ts",
2529
2704
  getContents: () => `import * as ui from '#build/ui'
2530
2705
  import type { DeepPartial } from '#ui/types/utils'
2706
+ import colors from 'tailwindcss/colors'
2531
2707
 
2532
- const colors = ${JSON.stringify(options.theme?.colors || [])} as const;
2533
2708
  const icons = ${JSON.stringify(nuxt.options.appConfig.ui.icons)};
2534
2709
 
2710
+ type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
2711
+ type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor>
2712
+
2535
2713
  type AppConfigUI = {
2536
2714
  colors?: {
2537
- primary?: Exclude<typeof colors[number], 'error' | 'primary'>
2538
- error?: Exclude<typeof colors[number], 'primary' | 'error'>
2539
- gray?: 'slate' | 'cool' | 'zinc' | 'neutral' | 'stone'
2715
+ ${options.theme?.colors?.map((color) => `${color}?: Color`).join("\n ")}
2716
+ neutral?: NeutralColor
2540
2717
  }
2541
2718
  icons?: Partial<typeof icons>
2542
2719
  } & DeepPartial<typeof ui, string>
@@ -2558,6 +2735,8 @@ const icons = {
2558
2735
  chevronDown: "i-heroicons-chevron-down-20-solid",
2559
2736
  chevronLeft: "i-heroicons-chevron-left-20-solid",
2560
2737
  chevronRight: "i-heroicons-chevron-right-20-solid",
2738
+ arrowLeft: "i-heroicons-arrow-left-20-solid",
2739
+ arrowRight: "i-heroicons-arrow-right-20-solid",
2561
2740
  check: "i-heroicons-check-20-solid",
2562
2741
  close: "i-heroicons-x-mark-20-solid",
2563
2742
  ellipsis: "i-heroicons-ellipsis-horizontal-20-solid",
@@ -2573,11 +2752,13 @@ const module = defineNuxtModule({
2573
2752
  configKey: "ui",
2574
2753
  compatibility: {
2575
2754
  nuxt: ">=3.13.1"
2576
- }
2755
+ },
2756
+ docs: "https://ui3.nuxt.dev/getting-started/installation"
2577
2757
  },
2578
2758
  defaults: {
2579
2759
  prefix: "U",
2580
2760
  fonts: true,
2761
+ colorMode: true,
2581
2762
  theme: {
2582
2763
  colors: void 0,
2583
2764
  transitions: true
@@ -2586,15 +2767,19 @@ const module = defineNuxtModule({
2586
2767
  async setup(options, nuxt) {
2587
2768
  const { resolve } = createResolver(import.meta.url);
2588
2769
  options.theme = options.theme || {};
2589
- options.theme.colors = options.theme.colors?.length ? [.../* @__PURE__ */ new Set(["primary", "error", ...options.theme.colors])] : ["primary", "error", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"];
2770
+ options.theme.colors = options.theme.colors?.length ? [.../* @__PURE__ */ new Set(["primary", ...options.theme.colors])] : ["primary", "secondary", "success", "info", "warning", "error"];
2590
2771
  nuxt.options.ui = options;
2591
2772
  nuxt.options.alias["#ui"] = resolve("./runtime");
2592
2773
  nuxt.options.appConfig.ui = defu(nuxt.options.appConfig.ui || {}, {
2593
- colors: {
2774
+ colors: pick({
2594
2775
  primary: "green",
2776
+ secondary: "blue",
2777
+ success: "green",
2778
+ info: "blue",
2779
+ warning: "yellow",
2595
2780
  error: "red",
2596
- gray: "slate"
2597
- },
2781
+ neutral: "slate"
2782
+ }, [...options.theme?.colors || [], "neutral"]),
2598
2783
  icons
2599
2784
  });
2600
2785
  nuxt.options.app.rootAttrs = nuxt.options.app.rootAttrs || {};
@@ -2605,32 +2790,23 @@ const module = defineNuxtModule({
2605
2790
  } else {
2606
2791
  nuxt.options.postcss.plugins["@tailwindcss/postcss"] = {};
2607
2792
  }
2608
- if (options.fonts) {
2609
- if (!hasNuxtModule("@nuxt/fonts")) {
2610
- await installModule("@nuxt/fonts", { experimental: { processCSSVariables: true } });
2793
+ async function registerModule(name, options2) {
2794
+ if (!hasNuxtModule(name)) {
2795
+ await installModule(name, options2);
2611
2796
  } else {
2612
- nuxt.options.fonts = defu(nuxt.options.fonts, { experimental: { processCSSVariables: true } });
2797
+ nuxt.options[name] = defu(nuxt.options[name], options2);
2613
2798
  }
2614
2799
  }
2615
- if (!hasNuxtModule("@nuxt/icon")) {
2616
- await installModule("@nuxt/icon", { cssLayer: "components" });
2617
- } else {
2618
- nuxt.options.icon = defu(nuxt.options.icon, { cssLayer: "components" });
2800
+ await registerModule("@nuxt/icon", { cssLayer: "components" });
2801
+ if (options.fonts) {
2802
+ await registerModule("@nuxt/fonts", { experimental: { processCSSVariables: true } });
2619
2803
  }
2620
- if (!hasNuxtModule("@nuxtjs/color-mode")) {
2621
- await installModule("@nuxtjs/color-mode", { classSuffix: "" });
2622
- } else {
2623
- nuxt.options.colorMode = defu(nuxt.options.colorMode, { classSuffix: "" });
2804
+ if (options.colorMode) {
2805
+ await registerModule("@nuxtjs/color-mode", { classSuffix: "", disableTransition: true });
2624
2806
  }
2625
- addPlugin({
2626
- src: resolve("./runtime/plugins/colors")
2627
- });
2628
- addPlugin({
2629
- src: resolve("./runtime/plugins/modal")
2630
- });
2631
- addPlugin({
2632
- src: resolve("./runtime/plugins/slideover")
2633
- });
2807
+ addPlugin({ src: resolve("./runtime/plugins/colors") });
2808
+ addPlugin({ src: resolve("./runtime/plugins/modal") });
2809
+ addPlugin({ src: resolve("./runtime/plugins/slideover") });
2634
2810
  addComponentsDir({
2635
2811
  path: resolve("./runtime/components"),
2636
2812
  prefix: options.prefix,