@nuxt/ui 3.1.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/.nuxt/ui/avatar.ts +1 -1
  2. package/.nuxt/ui/button.ts +42 -42
  3. package/.nuxt/ui/card.ts +1 -1
  4. package/.nuxt/ui/carousel.ts +1 -1
  5. package/.nuxt/ui/command-palette.ts +3 -1
  6. package/.nuxt/ui/drawer.ts +1 -1
  7. package/.nuxt/ui/file-upload.ts +290 -0
  8. package/.nuxt/ui/index.ts +3 -0
  9. package/.nuxt/ui/input-menu.ts +24 -10
  10. package/.nuxt/ui/input-tags.ts +310 -0
  11. package/.nuxt/ui/kbd.ts +167 -3
  12. package/.nuxt/ui/modal.ts +1 -1
  13. package/.nuxt/ui/navigation-menu.ts +1 -1
  14. package/.nuxt/ui/select-menu.ts +11 -6
  15. package/.nuxt/ui/select.ts +11 -6
  16. package/.nuxt/ui/table.ts +11 -2
  17. package/.nuxt/ui/tabs.ts +4 -2
  18. package/.nuxt/ui/timeline.ts +321 -0
  19. package/.nuxt/ui/toast.ts +8 -15
  20. package/.nuxt/ui/toaster.ts +1 -1
  21. package/.nuxt/ui/tooltip.ts +1 -1
  22. package/cli/templates.mjs +11 -7
  23. package/dist/module.d.mts +15 -1
  24. package/dist/module.json +1 -1
  25. package/dist/module.mjs +3 -3
  26. package/dist/runtime/components/Accordion.vue.d.ts +1 -1
  27. package/dist/runtime/components/Alert.vue +0 -1
  28. package/dist/runtime/components/Alert.vue.d.ts +2 -2
  29. package/dist/runtime/components/App.vue.d.ts +1 -1
  30. package/dist/runtime/components/Avatar.vue +10 -2
  31. package/dist/runtime/components/Avatar.vue.d.ts +3 -1
  32. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  33. package/dist/runtime/components/Badge.vue.d.ts +1 -1
  34. package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
  35. package/dist/runtime/components/Button.vue +6 -6
  36. package/dist/runtime/components/Button.vue.d.ts +1 -5
  37. package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
  38. package/dist/runtime/components/Calendar.vue +4 -1
  39. package/dist/runtime/components/Calendar.vue.d.ts +1 -1
  40. package/dist/runtime/components/Card.vue.d.ts +1 -1
  41. package/dist/runtime/components/Carousel.vue +19 -16
  42. package/dist/runtime/components/Carousel.vue.d.ts +1 -1
  43. package/dist/runtime/components/Checkbox.vue +1 -1
  44. package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
  45. package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
  46. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  47. package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
  48. package/dist/runtime/components/ColorPicker.vue +1 -2
  49. package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
  50. package/dist/runtime/components/CommandPalette.vue +84 -16
  51. package/dist/runtime/components/CommandPalette.vue.d.ts +38 -9
  52. package/dist/runtime/components/Container.vue.d.ts +1 -1
  53. package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
  54. package/dist/runtime/components/ContextMenuContent.vue.d.ts +5 -21
  55. package/dist/runtime/components/Drawer.vue +4 -4
  56. package/dist/runtime/components/Drawer.vue.d.ts +6 -1
  57. package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
  58. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +12 -25
  59. package/dist/runtime/components/FileUpload.vue +242 -0
  60. package/dist/runtime/components/FileUpload.vue.d.ts +167 -0
  61. package/dist/runtime/components/Form.vue +6 -6
  62. package/dist/runtime/components/Form.vue.d.ts +15 -13
  63. package/dist/runtime/components/FormField.vue +2 -2
  64. package/dist/runtime/components/FormField.vue.d.ts +4 -4
  65. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  66. package/dist/runtime/components/Input.vue +10 -7
  67. package/dist/runtime/components/Input.vue.d.ts +9 -9
  68. package/dist/runtime/components/InputMenu.vue +17 -10
  69. package/dist/runtime/components/InputMenu.vue.d.ts +19 -16
  70. package/dist/runtime/components/InputNumber.vue +3 -2
  71. package/dist/runtime/components/InputNumber.vue.d.ts +5 -5
  72. package/dist/runtime/components/InputTags.vue +161 -0
  73. package/dist/runtime/components/InputTags.vue.d.ts +185 -0
  74. package/dist/runtime/components/Kbd.vue +2 -1
  75. package/dist/runtime/components/Kbd.vue.d.ts +5 -1
  76. package/dist/runtime/components/Link.vue +6 -5
  77. package/dist/runtime/components/Link.vue.d.ts +1 -3
  78. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  79. package/dist/runtime/components/Modal.vue +14 -13
  80. package/dist/runtime/components/Modal.vue.d.ts +16 -6
  81. package/dist/runtime/components/NavigationMenu.vue +19 -17
  82. package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
  83. package/dist/runtime/components/OverlayProvider.vue +2 -2
  84. package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
  85. package/dist/runtime/components/Pagination.vue +1 -1
  86. package/dist/runtime/components/Pagination.vue.d.ts +1 -2
  87. package/dist/runtime/components/PinInput.vue +4 -3
  88. package/dist/runtime/components/PinInput.vue.d.ts +22 -19
  89. package/dist/runtime/components/Popover.vue +2 -1
  90. package/dist/runtime/components/Popover.vue.d.ts +8 -2
  91. package/dist/runtime/components/Progress.vue +2 -1
  92. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  93. package/dist/runtime/components/RadioGroup.vue +3 -3
  94. package/dist/runtime/components/RadioGroup.vue.d.ts +5 -4
  95. package/dist/runtime/components/Select.vue +23 -4
  96. package/dist/runtime/components/Select.vue.d.ts +108 -2
  97. package/dist/runtime/components/SelectMenu.vue +33 -11
  98. package/dist/runtime/components/SelectMenu.vue.d.ts +106 -2
  99. package/dist/runtime/components/Separator.vue.d.ts +1 -1
  100. package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
  101. package/dist/runtime/components/Slideover.vue +14 -13
  102. package/dist/runtime/components/Slideover.vue.d.ts +16 -6
  103. package/dist/runtime/components/Slider.vue.d.ts +5 -5
  104. package/dist/runtime/components/Stepper.vue.d.ts +1 -1
  105. package/dist/runtime/components/Switch.vue.d.ts +1 -1
  106. package/dist/runtime/components/Table.vue +90 -9
  107. package/dist/runtime/components/Table.vue.d.ts +30 -12
  108. package/dist/runtime/components/Tabs.vue +24 -4
  109. package/dist/runtime/components/Tabs.vue.d.ts +12 -4
  110. package/dist/runtime/components/Textarea.vue +10 -7
  111. package/dist/runtime/components/Textarea.vue.d.ts +14 -12
  112. package/dist/runtime/components/Timeline.vue +92 -0
  113. package/dist/runtime/components/Timeline.vue.d.ts +70 -0
  114. package/dist/runtime/components/Toast.vue +16 -9
  115. package/dist/runtime/components/Toast.vue.d.ts +14 -13
  116. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  117. package/dist/runtime/components/Tooltip.vue +2 -1
  118. package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
  119. package/dist/runtime/components/Tree.vue +6 -4
  120. package/dist/runtime/components/Tree.vue.d.ts +2 -2
  121. package/dist/runtime/composables/defineLocale.d.ts +2 -0
  122. package/dist/runtime/composables/defineLocale.js +4 -0
  123. package/dist/runtime/composables/defineShortcuts.js +7 -5
  124. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  125. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  126. package/dist/runtime/composables/useFileUpload.d.ts +19 -0
  127. package/dist/runtime/composables/useFileUpload.js +63 -0
  128. package/dist/runtime/composables/useFormField.d.ts +3 -6
  129. package/dist/runtime/composables/useFormField.js +5 -2
  130. package/dist/runtime/composables/useKbd.d.ts +1 -1
  131. package/dist/runtime/composables/useLocale.js +2 -2
  132. package/dist/runtime/composables/useOverlay.d.ts +30 -2
  133. package/dist/runtime/composables/useOverlay.js +8 -7
  134. package/dist/runtime/composables/usePortal.d.ts +1 -1
  135. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  136. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
  137. package/dist/runtime/inertia/stubs.d.ts +1 -0
  138. package/dist/runtime/inertia/stubs.js +4 -2
  139. package/dist/runtime/locale/ar.js +4 -2
  140. package/dist/runtime/locale/az.js +3 -1
  141. package/dist/runtime/locale/bg.js +3 -1
  142. package/dist/runtime/locale/bn.js +3 -1
  143. package/dist/runtime/locale/ca.js +3 -1
  144. package/dist/runtime/locale/ckb.js +4 -2
  145. package/dist/runtime/locale/cs.js +3 -1
  146. package/dist/runtime/locale/da.js +3 -1
  147. package/dist/runtime/locale/de.js +3 -1
  148. package/dist/runtime/locale/el.js +3 -1
  149. package/dist/runtime/locale/en.js +3 -1
  150. package/dist/runtime/locale/es.js +3 -1
  151. package/dist/runtime/locale/et.js +3 -1
  152. package/dist/runtime/locale/fa_ir.js +3 -1
  153. package/dist/runtime/locale/fi.js +3 -1
  154. package/dist/runtime/locale/fr.js +3 -1
  155. package/dist/runtime/locale/he.js +3 -1
  156. package/dist/runtime/locale/hi.js +4 -2
  157. package/dist/runtime/locale/hu.js +3 -1
  158. package/dist/runtime/locale/hy.js +3 -1
  159. package/dist/runtime/locale/id.js +3 -1
  160. package/dist/runtime/locale/index.d.ts +1 -0
  161. package/dist/runtime/locale/index.js +1 -0
  162. package/dist/runtime/locale/it.js +3 -1
  163. package/dist/runtime/locale/ja.js +3 -1
  164. package/dist/runtime/locale/kk.js +3 -1
  165. package/dist/runtime/locale/km.js +4 -2
  166. package/dist/runtime/locale/ko.js +3 -1
  167. package/dist/runtime/locale/ky.js +3 -1
  168. package/dist/runtime/locale/lb.d.ts +3 -0
  169. package/dist/runtime/locale/lb.js +56 -0
  170. package/dist/runtime/locale/lt.js +3 -1
  171. package/dist/runtime/locale/mn.js +3 -1
  172. package/dist/runtime/locale/ms.js +3 -1
  173. package/dist/runtime/locale/nb_no.js +3 -1
  174. package/dist/runtime/locale/nl.js +3 -1
  175. package/dist/runtime/locale/pl.js +3 -1
  176. package/dist/runtime/locale/pt.js +3 -1
  177. package/dist/runtime/locale/pt_br.js +3 -1
  178. package/dist/runtime/locale/ro.js +3 -1
  179. package/dist/runtime/locale/ru.js +3 -1
  180. package/dist/runtime/locale/sk.js +3 -1
  181. package/dist/runtime/locale/sl.js +3 -1
  182. package/dist/runtime/locale/sv.js +3 -1
  183. package/dist/runtime/locale/th.js +3 -1
  184. package/dist/runtime/locale/tj.js +3 -1
  185. package/dist/runtime/locale/tr.js +3 -1
  186. package/dist/runtime/locale/ug_cn.js +3 -1
  187. package/dist/runtime/locale/uk.js +3 -1
  188. package/dist/runtime/locale/ur.js +3 -1
  189. package/dist/runtime/locale/uz.js +3 -1
  190. package/dist/runtime/locale/vi.js +3 -1
  191. package/dist/runtime/locale/zh_cn.js +3 -1
  192. package/dist/runtime/locale/zh_tw.js +3 -1
  193. package/dist/runtime/types/form.d.ts +11 -10
  194. package/dist/runtime/types/index.d.ts +3 -0
  195. package/dist/runtime/types/index.js +3 -0
  196. package/dist/runtime/types/locale.d.ts +2 -0
  197. package/dist/runtime/types/utils.d.ts +3 -0
  198. package/dist/runtime/utils/index.d.ts +1 -0
  199. package/dist/runtime/utils/index.js +9 -0
  200. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  201. package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
  202. package/dist/runtime/vue/stubs.d.ts +1 -0
  203. package/dist/runtime/vue/stubs.js +3 -1
  204. package/dist/shared/{ui.Bix4DSU4.mjs → ui.BkSj2DmF.mjs} +560 -55
  205. package/dist/unplugin.d.mts +2 -0
  206. package/dist/unplugin.mjs +6 -3
  207. package/dist/vite.mjs +1 -1
  208. package/package.json +37 -38
@@ -19,12 +19,14 @@ const icons = {
19
19
  close: "i-lucide-x",
20
20
  ellipsis: "i-lucide-ellipsis",
21
21
  external: "i-lucide-arrow-up-right",
22
+ file: "i-lucide-file",
22
23
  folder: "i-lucide-folder",
23
24
  folderOpen: "i-lucide-folder-open",
24
25
  loading: "i-lucide-loader-circle",
25
26
  minus: "i-lucide-minus",
26
27
  plus: "i-lucide-plus",
27
- search: "i-lucide-search"
28
+ search: "i-lucide-search",
29
+ upload: "i-lucide-upload"
28
30
  };
29
31
 
30
32
  const getDefaultUiConfig = (colors) => ({
@@ -169,7 +171,7 @@ const alert = (options) => ({
169
171
 
170
172
  const avatar = {
171
173
  slots: {
172
- root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-elevated",
174
+ root: "inline-flex items-center justify-center shrink-0 select-none rounded-full align-middle bg-elevated",
173
175
  image: "h-full w-full rounded-[inherit] object-cover",
174
176
  fallback: "font-medium leading-none text-muted truncate",
175
177
  icon: "text-muted shrink-0"
@@ -529,51 +531,51 @@ const button = (options) => ({
529
531
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
530
532
  color,
531
533
  variant: "solid",
532
- class: `text-inverted bg-${color} hover:bg-${color}/75 disabled:bg-${color} aria-disabled:bg-${color} focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-${color}`
534
+ class: `text-inverted bg-${color} hover:bg-${color}/75 active:bg-${color}/75 disabled:bg-${color} aria-disabled:bg-${color} focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-${color}`
533
535
  })), ...(options.theme.colors || []).map((color) => ({
534
536
  color,
535
537
  variant: "outline",
536
- class: `ring ring-inset ring-${color}/50 text-${color} hover:bg-${color}/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-${color}`
538
+ class: `ring ring-inset ring-${color}/50 text-${color} hover:bg-${color}/10 active:bg-${color}/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-${color}`
537
539
  })), ...(options.theme.colors || []).map((color) => ({
538
540
  color,
539
541
  variant: "soft",
540
- class: `text-${color} bg-${color}/10 hover:bg-${color}/15 focus:outline-none focus-visible:bg-${color}/15 disabled:bg-${color}/10 aria-disabled:bg-${color}/10`
542
+ class: `text-${color} bg-${color}/10 hover:bg-${color}/15 active:bg-${color}/15 focus:outline-none focus-visible:bg-${color}/15 disabled:bg-${color}/10 aria-disabled:bg-${color}/10`
541
543
  })), ...(options.theme.colors || []).map((color) => ({
542
544
  color,
543
545
  variant: "subtle",
544
- class: `text-${color} ring ring-inset ring-${color}/25 bg-${color}/10 hover:bg-${color}/15 disabled:bg-${color}/10 aria-disabled:bg-${color}/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-${color}`
546
+ class: `text-${color} ring ring-inset ring-${color}/25 bg-${color}/10 hover:bg-${color}/15 active:bg-${color}/15 disabled:bg-${color}/10 aria-disabled:bg-${color}/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-${color}`
545
547
  })), ...(options.theme.colors || []).map((color) => ({
546
548
  color,
547
549
  variant: "ghost",
548
- class: `text-${color} hover:bg-${color}/10 focus:outline-none focus-visible:bg-${color}/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
550
+ class: `text-${color} hover:bg-${color}/10 active:bg-${color}/10 focus:outline-none focus-visible:bg-${color}/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
549
551
  })), ...(options.theme.colors || []).map((color) => ({
550
552
  color,
551
553
  variant: "link",
552
- class: `text-${color} hover:text-${color}/75 disabled:text-${color} aria-disabled:text-${color} focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}`
554
+ class: `text-${color} hover:text-${color}/75 active:text-${color}/75 disabled:text-${color} aria-disabled:text-${color} focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}`
553
555
  })), {
554
556
  color: "neutral",
555
557
  variant: "solid",
556
- class: "text-inverted bg-inverted hover:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"
558
+ class: "text-inverted bg-inverted hover:bg-inverted/90 active:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted"
557
559
  }, {
558
560
  color: "neutral",
559
561
  variant: "outline",
560
- class: "ring ring-inset ring-accented text-default bg-default hover:bg-elevated disabled:bg-default aria-disabled:bg-default focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted"
562
+ class: "ring ring-inset ring-accented text-default bg-default hover:bg-elevated active:bg-elevated disabled:bg-default aria-disabled:bg-default focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted"
561
563
  }, {
562
564
  color: "neutral",
563
565
  variant: "soft",
564
- class: "text-default bg-elevated hover:bg-accented/75 focus:outline-none focus-visible:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated"
566
+ class: "text-default bg-elevated hover:bg-accented/75 active:bg-accented/75 focus:outline-none focus-visible:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated"
565
567
  }, {
566
568
  color: "neutral",
567
569
  variant: "subtle",
568
- class: "ring ring-inset ring-accented text-default bg-elevated hover:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted"
570
+ class: "ring ring-inset ring-accented text-default bg-elevated hover:bg-accented/75 active:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted"
569
571
  }, {
570
572
  color: "neutral",
571
573
  variant: "ghost",
572
- class: "text-default hover:bg-elevated focus:outline-none focus-visible:bg-elevated hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
574
+ class: "text-default hover:bg-elevated active:bg-elevated focus:outline-none focus-visible:bg-elevated hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
573
575
  }, {
574
576
  color: "neutral",
575
577
  variant: "link",
576
- class: "text-muted hover:text-default disabled:text-muted aria-disabled:text-muted focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted"
578
+ class: "text-muted hover:text-default active:text-default disabled:text-muted aria-disabled:text-muted focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted"
577
579
  }, {
578
580
  size: "xs",
579
581
  square: true,
@@ -680,7 +682,7 @@ const calendar = (options) => ({
680
682
 
681
683
  const card = {
682
684
  slots: {
683
- root: "rounded-lg",
685
+ root: "rounded-lg overflow-hidden",
684
686
  header: "p-4 sm:px-6",
685
687
  body: "p-4 sm:p-6",
686
688
  footer: "p-4 sm:px-6"
@@ -736,7 +738,7 @@ const carousel = (options) => ({
736
738
  },
737
739
  active: {
738
740
  true: {
739
- dot: "bg-inverted"
741
+ dot: "data-[state=active]:bg-inverted"
740
742
  }
741
743
  }
742
744
  }
@@ -1081,7 +1083,9 @@ const commandPalette = (options) => ({
1081
1083
  root: "flex flex-col min-h-0 min-w-0 divide-y divide-default",
1082
1084
  input: "[&>input]:h-12",
1083
1085
  close: "",
1086
+ back: "p-0",
1084
1087
  content: "relative overflow-hidden flex flex-col",
1088
+ footer: "p-1",
1085
1089
  viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
1086
1090
  group: "p-1 isolate",
1087
1091
  empty: "py-6 text-center text-sm text-muted",
@@ -1097,7 +1101,7 @@ const commandPalette = (options) => ({
1097
1101
  itemTrailingHighlightedIcon: "shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex",
1098
1102
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
1099
1103
  itemTrailingKbdsSize: "md",
1100
- itemLabel: "truncate space-x-1 rtl:space-x-reverse text-dimmed",
1104
+ itemLabel: "truncate space-x-1 text-dimmed",
1101
1105
  itemLabelBase: "text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary",
1102
1106
  itemLabelPrefix: "text-default",
1103
1107
  itemLabelSuffix: "text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary"
@@ -1264,7 +1268,7 @@ const drawer = (options) => ({
1264
1268
  },
1265
1269
  inset: {
1266
1270
  true: {
1267
- content: "rounded-lg after:hidden"
1271
+ content: "rounded-lg after:hidden overflow-hidden"
1268
1272
  }
1269
1273
  }
1270
1274
  },
@@ -1438,6 +1442,198 @@ const dropdownMenu = (options) => ({
1438
1442
  }
1439
1443
  });
1440
1444
 
1445
+ const fileUpload = (options) => ({
1446
+ slots: {
1447
+ root: "relative flex flex-col",
1448
+ base: ["w-full flex-1 bg-default border border-default flex flex-col gap-2 items-stretch justify-center rounded-lg focus-visible:outline-2", options.theme.transitions && "transition-[background]"],
1449
+ wrapper: "flex flex-col items-center justify-center text-center",
1450
+ icon: "shrink-0",
1451
+ avatar: "shrink-0",
1452
+ label: "font-medium text-default mt-2",
1453
+ description: "text-muted mt-1",
1454
+ actions: "flex flex-wrap gap-1.5 shrink-0 mt-4",
1455
+ files: "",
1456
+ file: "relative",
1457
+ fileLeadingAvatar: "shrink-0",
1458
+ fileWrapper: "flex flex-col min-w-0",
1459
+ fileName: "text-default truncate",
1460
+ fileSize: "text-muted truncate",
1461
+ fileTrailingButton: ""
1462
+ },
1463
+ variants: {
1464
+ color: {
1465
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1466
+ neutral: ""
1467
+ },
1468
+ variant: {
1469
+ area: {
1470
+ wrapper: "px-4 py-3",
1471
+ base: "p-4"
1472
+ },
1473
+ button: {}
1474
+ },
1475
+ size: {
1476
+ xs: {
1477
+ base: "text-xs",
1478
+ icon: "size-4",
1479
+ file: "text-xs px-2 py-1 gap-1",
1480
+ fileWrapper: "flex-row gap-1"
1481
+ },
1482
+ sm: {
1483
+ base: "text-xs",
1484
+ icon: "size-4",
1485
+ file: "text-xs px-2.5 py-1.5 gap-1.5",
1486
+ fileWrapper: "flex-row gap-1"
1487
+ },
1488
+ md: {
1489
+ base: "text-sm",
1490
+ icon: "size-5",
1491
+ file: "text-xs px-2.5 py-1.5 gap-1.5"
1492
+ },
1493
+ lg: {
1494
+ base: "text-sm",
1495
+ icon: "size-5",
1496
+ file: "text-sm px-3 py-2 gap-2",
1497
+ fileSize: "text-xs"
1498
+ },
1499
+ xl: {
1500
+ base: "text-base",
1501
+ icon: "size-6",
1502
+ file: "text-sm px-3 py-2 gap-2"
1503
+ }
1504
+ },
1505
+ layout: {
1506
+ list: {
1507
+ root: "gap-2 items-start",
1508
+ files: "flex flex-col w-full gap-2",
1509
+ file: "min-w-0 flex items-center border border-default rounded-md w-full",
1510
+ fileTrailingButton: "ms-auto"
1511
+ },
1512
+ grid: {
1513
+ fileWrapper: "hidden",
1514
+ fileLeadingAvatar: "size-full rounded-lg",
1515
+ fileTrailingButton: "absolute -top-1.5 -end-1.5 p-0 rounded-full border-2 border-bg"
1516
+ }
1517
+ },
1518
+ position: {
1519
+ inside: "",
1520
+ outside: ""
1521
+ },
1522
+ dropzone: {
1523
+ true: "border-dashed data-[dragging=true]:bg-elevated/25"
1524
+ },
1525
+ interactive: {
1526
+ true: ""
1527
+ },
1528
+ highlight: {
1529
+ true: ""
1530
+ },
1531
+ multiple: {
1532
+ true: ""
1533
+ },
1534
+ disabled: {
1535
+ true: "cursor-not-allowed opacity-75"
1536
+ }
1537
+ },
1538
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1539
+ color,
1540
+ class: `focus-visible:outline-${color}`
1541
+ })), ...(options.theme.colors || []).map((color) => ({
1542
+ color,
1543
+ highlight: true,
1544
+ class: `border-${color}`
1545
+ })), {
1546
+ color: "neutral",
1547
+ class: "focus-visible:outline-inverted"
1548
+ }, {
1549
+ color: "neutral",
1550
+ highlight: true,
1551
+ class: "border-inverted"
1552
+ }, {
1553
+ size: "xs",
1554
+ layout: "list",
1555
+ class: {
1556
+ fileTrailingButton: "-me-1"
1557
+ }
1558
+ }, {
1559
+ size: "sm",
1560
+ layout: "list",
1561
+ class: {
1562
+ fileTrailingButton: "-me-1.5"
1563
+ }
1564
+ }, {
1565
+ size: "md",
1566
+ layout: "list",
1567
+ class: {
1568
+ fileTrailingButton: "-me-1.5"
1569
+ }
1570
+ }, {
1571
+ size: "lg",
1572
+ layout: "list",
1573
+ class: {
1574
+ fileTrailingButton: "-me-2"
1575
+ }
1576
+ }, {
1577
+ size: "xl",
1578
+ layout: "list",
1579
+ class: {
1580
+ fileTrailingButton: "-me-2"
1581
+ }
1582
+ }, {
1583
+ variant: "button",
1584
+ size: "xs",
1585
+ class: {
1586
+ base: "p-1"
1587
+ }
1588
+ }, {
1589
+ variant: "button",
1590
+ size: "sm",
1591
+ class: {
1592
+ base: "p-1.5"
1593
+ }
1594
+ }, {
1595
+ variant: "button",
1596
+ size: "md",
1597
+ class: {
1598
+ base: "p-1.5"
1599
+ }
1600
+ }, {
1601
+ variant: "button",
1602
+ size: "lg",
1603
+ class: {
1604
+ base: "p-2"
1605
+ }
1606
+ }, {
1607
+ variant: "button",
1608
+ size: "xl",
1609
+ class: {
1610
+ base: "p-2"
1611
+ }
1612
+ }, {
1613
+ layout: "grid",
1614
+ multiple: true,
1615
+ class: {
1616
+ files: "grid grid-cols-2 md:grid-cols-3 gap-4 w-full",
1617
+ file: "p-0 aspect-square"
1618
+ }
1619
+ }, {
1620
+ layout: "grid",
1621
+ multiple: false,
1622
+ class: {
1623
+ file: "absolute inset-0 p-0"
1624
+ }
1625
+ }, {
1626
+ interactive: true,
1627
+ disabled: false,
1628
+ class: "hover:bg-elevated/25"
1629
+ }],
1630
+ defaultVariants: {
1631
+ color: "primary",
1632
+ variant: "area",
1633
+ size: "md"
1634
+ }
1635
+ });
1636
+
1441
1637
  const form = {
1442
1638
  base: ""
1443
1639
  };
@@ -1641,7 +1837,7 @@ const inputMenu = (options) => {
1641
1837
  content: "max-h-60 w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col",
1642
1838
  viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
1643
1839
  group: "p-1 isolate",
1644
- empty: "py-2 text-center text-sm text-muted",
1840
+ empty: "text-center text-muted",
1645
1841
  label: "font-semibold text-highlighted",
1646
1842
  separator: "-mx-1 my-1 h-px bg-border",
1647
1843
  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-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50", options.theme.transitions && "transition-colors before:transition-colors"],
@@ -1656,14 +1852,13 @@ const inputMenu = (options) => {
1656
1852
  tagsItem: "px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75",
1657
1853
  tagsItemText: "truncate",
1658
1854
  tagsItemDelete: ["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
1659
- tagsItemDeleteIcon: "",
1660
- tagsInput: ""
1855
+ tagsItemDeleteIcon: "shrink-0",
1856
+ tagsInput: "flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1661
1857
  },
1662
1858
  variants: {
1663
1859
  multiple: {
1664
1860
  true: {
1665
- root: "flex-wrap",
1666
- tagsInput: "border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1861
+ root: "flex-wrap"
1667
1862
  },
1668
1863
  false: {
1669
1864
  base: "w-full border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
@@ -1679,7 +1874,8 @@ const inputMenu = (options) => {
1679
1874
  itemLeadingChipSize: "sm",
1680
1875
  itemTrailingIcon: "size-4",
1681
1876
  tagsItem: "text-[10px]/3",
1682
- tagsItemDeleteIcon: "size-3"
1877
+ tagsItemDeleteIcon: "size-3",
1878
+ empty: "p-1 text-xs"
1683
1879
  },
1684
1880
  sm: {
1685
1881
  label: "p-1.5 text-[10px]/3 gap-1.5",
@@ -1690,7 +1886,8 @@ const inputMenu = (options) => {
1690
1886
  itemLeadingChipSize: "sm",
1691
1887
  itemTrailingIcon: "size-4",
1692
1888
  tagsItem: "text-[10px]/3",
1693
- tagsItemDeleteIcon: "size-3"
1889
+ tagsItemDeleteIcon: "size-3",
1890
+ empty: "p-1.5 text-xs"
1694
1891
  },
1695
1892
  md: {
1696
1893
  label: "p-1.5 text-xs gap-1.5",
@@ -1701,7 +1898,8 @@ const inputMenu = (options) => {
1701
1898
  itemLeadingChipSize: "md",
1702
1899
  itemTrailingIcon: "size-5",
1703
1900
  tagsItem: "text-xs",
1704
- tagsItemDeleteIcon: "size-3.5"
1901
+ tagsItemDeleteIcon: "size-3.5",
1902
+ empty: "p-1.5 text-sm"
1705
1903
  },
1706
1904
  lg: {
1707
1905
  label: "p-2 text-xs gap-2",
@@ -1712,7 +1910,8 @@ const inputMenu = (options) => {
1712
1910
  itemLeadingChipSize: "md",
1713
1911
  itemTrailingIcon: "size-5",
1714
1912
  tagsItem: "text-xs",
1715
- tagsItemDeleteIcon: "size-3.5"
1913
+ tagsItemDeleteIcon: "size-3.5",
1914
+ empty: "p-2 text-sm"
1716
1915
  },
1717
1916
  xl: {
1718
1917
  label: "p-2 text-sm gap-2",
@@ -1723,11 +1922,20 @@ const inputMenu = (options) => {
1723
1922
  itemLeadingChipSize: "lg",
1724
1923
  itemTrailingIcon: "size-6",
1725
1924
  tagsItem: "text-sm",
1726
- tagsItemDeleteIcon: "size-4"
1925
+ tagsItemDeleteIcon: "size-4",
1926
+ empty: "p-2 text-base"
1727
1927
  }
1728
1928
  }
1729
1929
  },
1730
- compoundVariants: [...(options.theme.colors || []).map((color) => ({
1930
+ compoundVariants: [{
1931
+ variant: "soft",
1932
+ multiple: true,
1933
+ class: "has-focus:bg-elevated"
1934
+ }, {
1935
+ variant: "ghost",
1936
+ multiple: true,
1937
+ class: "has-focus:bg-elevated"
1938
+ }, ...(options.theme.colors || []).map((color) => ({
1731
1939
  color,
1732
1940
  multiple: true,
1733
1941
  variant: ["outline", "subtle"],
@@ -1852,13 +2060,66 @@ const inputNumber = (options) => {
1852
2060
  };
1853
2061
  };
1854
2062
 
1855
- const kbd = {
2063
+ const inputTags = (options) => {
2064
+ return defuFn({
2065
+ slots: {
2066
+ root: (prev) => [prev, "flex-wrap"],
2067
+ base: () => ["rounded-md", options.theme.transitions && "transition-colors"],
2068
+ item: 'px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75 wrap-anywhere data-[state="active"]:bg-accented',
2069
+ itemText: "",
2070
+ itemDelete: ["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
2071
+ itemDeleteIcon: "shrink-0",
2072
+ input: "flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
2073
+ },
2074
+ variants: {
2075
+ size: {
2076
+ xs: {
2077
+ item: "text-[10px]/3",
2078
+ itemDeleteIcon: "size-3"
2079
+ },
2080
+ sm: {
2081
+ item: "text-[10px]/3",
2082
+ itemDeleteIcon: "size-3"
2083
+ },
2084
+ md: {
2085
+ item: "text-xs",
2086
+ itemDeleteIcon: "size-3.5"
2087
+ },
2088
+ lg: {
2089
+ item: "text-xs",
2090
+ itemDeleteIcon: "size-3.5"
2091
+ },
2092
+ xl: {
2093
+ item: "text-sm",
2094
+ itemDeleteIcon: "size-4"
2095
+ }
2096
+ },
2097
+ variant: (prev) => Object.fromEntries(
2098
+ Object.entries(prev).map(([key, value]) => [key, replaceFocus(value)])
2099
+ )
2100
+ },
2101
+ compoundVariants: (prev) => prev.map((item) => ({
2102
+ ...item,
2103
+ class: typeof item.class === "string" ? replaceFocus(item.class) : item.class
2104
+ }))
2105
+ }, input(options));
2106
+ };
2107
+ function replaceFocus(str) {
2108
+ return str.replace(/focus:/g, "has-focus:").replace(/focus-visible:/g, "has-focus-visible:");
2109
+ }
2110
+
2111
+ const kbd = (options) => ({
1856
2112
  base: "inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans",
1857
2113
  variants: {
2114
+ color: {
2115
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
2116
+ neutral: ""
2117
+ },
1858
2118
  variant: {
1859
- solid: "bg-inverted text-inverted",
1860
- outline: "bg-default text-highlighted ring ring-inset ring-accented",
1861
- subtle: "bg-elevated text-default ring ring-inset ring-accented"
2119
+ solid: "",
2120
+ outline: "",
2121
+ soft: "",
2122
+ subtle: ""
1862
2123
  },
1863
2124
  size: {
1864
2125
  sm: "h-4 min-w-[16px] text-[10px]",
@@ -1866,11 +2127,45 @@ const kbd = {
1866
2127
  lg: "h-6 min-w-[24px] text-[12px]"
1867
2128
  }
1868
2129
  },
2130
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
2131
+ color,
2132
+ variant: "solid",
2133
+ class: `text-inverted bg-${color}`
2134
+ })), ...(options.theme.colors || []).map((color) => ({
2135
+ color,
2136
+ variant: "outline",
2137
+ class: `ring ring-inset ring-${color}/50 text-${color}`
2138
+ })), ...(options.theme.colors || []).map((color) => ({
2139
+ color,
2140
+ variant: "soft",
2141
+ class: `text-${color} bg-${color}/10`
2142
+ })), ...(options.theme.colors || []).map((color) => ({
2143
+ color,
2144
+ variant: "subtle",
2145
+ class: `text-${color} ring ring-inset ring-${color}/25 bg-${color}/10`
2146
+ })), {
2147
+ color: "neutral",
2148
+ variant: "solid",
2149
+ class: "text-inverted bg-inverted"
2150
+ }, {
2151
+ color: "neutral",
2152
+ variant: "outline",
2153
+ class: "ring ring-inset ring-accented text-default bg-default"
2154
+ }, {
2155
+ color: "neutral",
2156
+ variant: "soft",
2157
+ class: "text-default bg-elevated"
2158
+ }, {
2159
+ color: "neutral",
2160
+ variant: "subtle",
2161
+ class: "ring ring-inset ring-accented text-default bg-elevated"
2162
+ }],
1869
2163
  defaultVariants: {
1870
2164
  variant: "outline",
2165
+ color: "neutral",
1871
2166
  size: "md"
1872
2167
  }
1873
- };
2168
+ });
1874
2169
 
1875
2170
  const link = (options) => ({
1876
2171
  base: "focus-visible:outline-primary",
@@ -1914,7 +2209,7 @@ const modal = {
1914
2209
  content: "inset-0"
1915
2210
  },
1916
2211
  false: {
1917
- content: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-2rem)] max-w-lg max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] rounded-lg shadow-lg ring ring-default"
2212
+ content: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-2rem)] max-w-lg max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] rounded-lg shadow-lg ring ring-default overflow-hidden"
1918
2213
  }
1919
2214
  }
1920
2215
  }
@@ -1980,7 +2275,7 @@ const navigationMenu = (options) => ({
1980
2275
  childList: "grid p-2",
1981
2276
  childLink: "px-3 py-2 gap-2 before:inset-x-px before:inset-y-0",
1982
2277
  childLinkLabel: "font-medium",
1983
- content: "absolute top-0 left-0 w-full"
2278
+ content: "absolute top-0 left-0 w-full max-h-[70vh] overflow-y-auto"
1984
2279
  },
1985
2280
  vertical: {
1986
2281
  root: "flex-col",
@@ -2674,7 +2969,7 @@ const select = (options) => {
2674
2969
  content: "max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
2675
2970
  viewport: "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
2676
2971
  group: "p-1 isolate",
2677
- empty: "py-2 text-center text-sm text-muted",
2972
+ empty: "text-center text-muted",
2678
2973
  label: "font-semibold text-highlighted",
2679
2974
  separator: "-mx-1 my-1 h-px bg-border",
2680
2975
  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-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50", options.theme.transitions && "transition-colors before:transition-colors"],
@@ -2697,7 +2992,8 @@ const select = (options) => {
2697
2992
  itemLeadingAvatarSize: "3xs",
2698
2993
  itemLeadingChip: "size-4",
2699
2994
  itemLeadingChipSize: "sm",
2700
- itemTrailingIcon: "size-4"
2995
+ itemTrailingIcon: "size-4",
2996
+ empty: "p-1 text-xs"
2701
2997
  },
2702
2998
  sm: {
2703
2999
  label: "p-1.5 text-[10px]/3 gap-1.5",
@@ -2706,7 +3002,8 @@ const select = (options) => {
2706
3002
  itemLeadingAvatarSize: "3xs",
2707
3003
  itemLeadingChip: "size-4",
2708
3004
  itemLeadingChipSize: "sm",
2709
- itemTrailingIcon: "size-4"
3005
+ itemTrailingIcon: "size-4",
3006
+ empty: "p-1.5 text-xs"
2710
3007
  },
2711
3008
  md: {
2712
3009
  label: "p-1.5 text-xs gap-1.5",
@@ -2715,7 +3012,8 @@ const select = (options) => {
2715
3012
  itemLeadingAvatarSize: "2xs",
2716
3013
  itemLeadingChip: "size-5",
2717
3014
  itemLeadingChipSize: "md",
2718
- itemTrailingIcon: "size-5"
3015
+ itemTrailingIcon: "size-5",
3016
+ empty: "p-1.5 text-sm"
2719
3017
  },
2720
3018
  lg: {
2721
3019
  label: "p-2 text-xs gap-2",
@@ -2724,7 +3022,8 @@ const select = (options) => {
2724
3022
  itemLeadingAvatarSize: "2xs",
2725
3023
  itemLeadingChip: "size-5",
2726
3024
  itemLeadingChipSize: "md",
2727
- itemTrailingIcon: "size-5"
3025
+ itemTrailingIcon: "size-5",
3026
+ empty: "p-2 text-sm"
2728
3027
  },
2729
3028
  xl: {
2730
3029
  label: "p-2 text-sm gap-2",
@@ -2733,7 +3032,8 @@ const select = (options) => {
2733
3032
  itemLeadingAvatarSize: "xs",
2734
3033
  itemLeadingChip: "size-6",
2735
3034
  itemLeadingChipSize: "lg",
2736
- itemTrailingIcon: "size-6"
3035
+ itemTrailingIcon: "size-6",
3036
+ empty: "p-2 text-base"
2737
3037
  }
2738
3038
  }
2739
3039
  }
@@ -3243,11 +3543,13 @@ const table = (options) => ({
3243
3543
  root: "relative overflow-auto",
3244
3544
  base: "min-w-full overflow-clip",
3245
3545
  caption: "sr-only",
3246
- thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
3546
+ thead: "relative",
3247
3547
  tbody: "divide-y divide-default [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary",
3548
+ tfoot: "relative",
3248
3549
  tr: "data-[selected=true]:bg-elevated/50",
3249
3550
  th: "px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
3250
3551
  td: "p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0",
3552
+ separator: "absolute z-[1] left-0 w-full h-px bg-(--ui-border-accented)",
3251
3553
  empty: "py-6 text-center text-sm text-muted",
3252
3554
  loading: "py-6 text-center"
3253
3555
  },
@@ -3260,12 +3562,19 @@ const table = (options) => ({
3260
3562
  },
3261
3563
  sticky: {
3262
3564
  true: {
3565
+ thead: "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur",
3566
+ tfoot: "sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
3567
+ },
3568
+ header: {
3263
3569
  thead: "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
3570
+ },
3571
+ footer: {
3572
+ tfoot: "sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
3264
3573
  }
3265
3574
  },
3266
3575
  loading: {
3267
3576
  true: {
3268
- thead: "after:absolute after:bottom-0 after:inset-x-0 after:h-px"
3577
+ thead: "after:absolute after:z-[1] after:h-px"
3269
3578
  }
3270
3579
  },
3271
3580
  loadingAnimation: {
@@ -3328,11 +3637,13 @@ const tabs = (options) => ({
3328
3637
  list: "relative flex p-1 group",
3329
3638
  indicator: "absolute transition-[translate,width] duration-200",
3330
3639
  trigger: ["group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
3331
- content: "focus:outline-none w-full",
3332
3640
  leadingIcon: "shrink-0",
3333
3641
  leadingAvatar: "shrink-0",
3334
3642
  leadingAvatarSize: "",
3335
- label: "truncate"
3643
+ label: "truncate",
3644
+ trailingBadge: "shrink-0",
3645
+ trailingBadgeSize: "sm",
3646
+ content: "focus:outline-none w-full"
3336
3647
  },
3337
3648
  variants: {
3338
3649
  color: {
@@ -3492,6 +3803,193 @@ const textarea = (options) => {
3492
3803
  }, input(options));
3493
3804
  };
3494
3805
 
3806
+ const timeline = (options) => ({
3807
+ slots: {
3808
+ root: "flex gap-1.5",
3809
+ item: "group relative flex flex-1 gap-3",
3810
+ container: "relative flex items-center gap-1.5",
3811
+ indicator: "group-data-[state=completed]:text-inverted group-data-[state=active]:text-inverted text-muted",
3812
+ separator: "flex-1 rounded-full bg-elevated",
3813
+ wrapper: "w-full",
3814
+ date: "text-dimmed text-xs/5",
3815
+ title: "font-medium text-highlighted text-sm",
3816
+ description: "text-muted text-wrap text-sm"
3817
+ },
3818
+ variants: {
3819
+ orientation: {
3820
+ horizontal: {
3821
+ root: "flex-row w-full",
3822
+ item: "flex-col",
3823
+ separator: "h-0.5"
3824
+ },
3825
+ vertical: {
3826
+ root: "flex-col",
3827
+ container: "flex-col",
3828
+ separator: "w-0.5"
3829
+ }
3830
+ },
3831
+ color: {
3832
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
3833
+ indicator: `group-data-[state=completed]:bg-${color} group-data-[state=active]:bg-${color}`
3834
+ }])),
3835
+ neutral: {
3836
+ indicator: "group-data-[state=completed]:bg-inverted group-data-[state=active]:bg-inverted"
3837
+ }
3838
+ },
3839
+ size: {
3840
+ "3xs": "",
3841
+ "2xs": "",
3842
+ "xs": "",
3843
+ "sm": "",
3844
+ "md": "",
3845
+ "lg": "",
3846
+ "xl": "",
3847
+ "2xl": "",
3848
+ "3xl": ""
3849
+ },
3850
+ reverse: {
3851
+ true: ""
3852
+ }
3853
+ },
3854
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
3855
+ color,
3856
+ reverse: false,
3857
+ class: {
3858
+ separator: `group-data-[state=completed]:bg-${color}`
3859
+ }
3860
+ })), ...(options.theme.colors || []).map((color) => ({
3861
+ color,
3862
+ reverse: true,
3863
+ class: {
3864
+ separator: `group-data-[state=active]:bg-${color} group-data-[state=completed]:bg-${color}`
3865
+ }
3866
+ })), {
3867
+ color: "neutral",
3868
+ reverse: false,
3869
+ class: {
3870
+ separator: "group-data-[state=completed]:bg-inverted"
3871
+ }
3872
+ }, {
3873
+ color: "neutral",
3874
+ reverse: true,
3875
+ class: {
3876
+ separator: "group-data-[state=active]:bg-inverted group-data-[state=completed]:bg-inverted"
3877
+ }
3878
+ }, {
3879
+ orientation: "horizontal",
3880
+ size: "3xs",
3881
+ class: {
3882
+ wrapper: "pe-4.5"
3883
+ }
3884
+ }, {
3885
+ orientation: "horizontal",
3886
+ size: "2xs",
3887
+ class: {
3888
+ wrapper: "pe-5"
3889
+ }
3890
+ }, {
3891
+ orientation: "horizontal",
3892
+ size: "xs",
3893
+ class: {
3894
+ wrapper: "pe-5.5"
3895
+ }
3896
+ }, {
3897
+ orientation: "horizontal",
3898
+ size: "sm",
3899
+ class: {
3900
+ wrapper: "pe-6"
3901
+ }
3902
+ }, {
3903
+ orientation: "horizontal",
3904
+ size: "md",
3905
+ class: {
3906
+ wrapper: "pe-6.5"
3907
+ }
3908
+ }, {
3909
+ orientation: "horizontal",
3910
+ size: "lg",
3911
+ class: {
3912
+ wrapper: "pe-7"
3913
+ }
3914
+ }, {
3915
+ orientation: "horizontal",
3916
+ size: "xl",
3917
+ class: {
3918
+ wrapper: "pe-7.5"
3919
+ }
3920
+ }, {
3921
+ orientation: "horizontal",
3922
+ size: "2xl",
3923
+ class: {
3924
+ wrapper: "pe-8"
3925
+ }
3926
+ }, {
3927
+ orientation: "horizontal",
3928
+ size: "3xl",
3929
+ class: {
3930
+ wrapper: "pe-8.5"
3931
+ }
3932
+ }, {
3933
+ orientation: "vertical",
3934
+ size: "3xs",
3935
+ class: {
3936
+ wrapper: "-mt-0.5 pb-4.5"
3937
+ }
3938
+ }, {
3939
+ orientation: "vertical",
3940
+ size: "2xs",
3941
+ class: {
3942
+ wrapper: "pb-5"
3943
+ }
3944
+ }, {
3945
+ orientation: "vertical",
3946
+ size: "xs",
3947
+ class: {
3948
+ wrapper: "mt-0.5 pb-5.5"
3949
+ }
3950
+ }, {
3951
+ orientation: "vertical",
3952
+ size: "sm",
3953
+ class: {
3954
+ wrapper: "mt-1 pb-6"
3955
+ }
3956
+ }, {
3957
+ orientation: "vertical",
3958
+ size: "md",
3959
+ class: {
3960
+ wrapper: "mt-1.5 pb-6.5"
3961
+ }
3962
+ }, {
3963
+ orientation: "vertical",
3964
+ size: "lg",
3965
+ class: {
3966
+ wrapper: "mt-2 pb-7"
3967
+ }
3968
+ }, {
3969
+ orientation: "vertical",
3970
+ size: "xl",
3971
+ class: {
3972
+ wrapper: "mt-2.5 pb-7.5"
3973
+ }
3974
+ }, {
3975
+ orientation: "vertical",
3976
+ size: "2xl",
3977
+ class: {
3978
+ wrapper: "mt-3 pb-8"
3979
+ }
3980
+ }, {
3981
+ orientation: "vertical",
3982
+ size: "3xl",
3983
+ class: {
3984
+ wrapper: "mt-3.5 pb-8.5"
3985
+ }
3986
+ }],
3987
+ defaultVariants: {
3988
+ size: "md",
3989
+ color: "primary"
3990
+ }
3991
+ });
3992
+
3495
3993
  const toast = (options) => ({
3496
3994
  slots: {
3497
3995
  root: "relative group overflow-hidden bg-default shadow-lg rounded-lg ring ring-default p-4 flex gap-2.5 focus:outline-none",
@@ -3502,20 +4000,18 @@ const toast = (options) => ({
3502
4000
  avatar: "shrink-0",
3503
4001
  avatarSize: "2xl",
3504
4002
  actions: "flex gap-1.5 shrink-0",
3505
- progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
4003
+ progress: "absolute inset-x-0 bottom-0",
3506
4004
  close: "p-0"
3507
4005
  },
3508
4006
  variants: {
3509
4007
  color: {
3510
4008
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
3511
4009
  root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-${color}`,
3512
- icon: `text-${color}`,
3513
- progress: `bg-${color}`
4010
+ icon: `text-${color}`
3514
4011
  }])),
3515
4012
  neutral: {
3516
4013
  root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted",
3517
- icon: "text-highlighted",
3518
- progress: "bg-inverted"
4014
+ icon: "text-highlighted"
3519
4015
  }
3520
4016
  },
3521
4017
  orientation: {
@@ -3542,7 +4038,7 @@ const toast = (options) => ({
3542
4038
  const toaster = {
3543
4039
  slots: {
3544
4040
  viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
3545
- base: "pointer-events-auto 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"
4041
+ base: "pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:*:opacity-0 data-[front=false]:*:transition-opacity data-[front=false]:*:duration-100 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"
3546
4042
  },
3547
4043
  variants: {
3548
4044
  position: {
@@ -3601,7 +4097,7 @@ const tooltip = {
3601
4097
  content: "flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 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] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",
3602
4098
  arrow: "fill-default",
3603
4099
  text: "truncate",
3604
- kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
4100
+ kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 not-first-of-type:before:content-['\xB7'] not-first-of-type:before:me-0.5`,
3605
4101
  kbdsSize: "sm"
3606
4102
  }
3607
4103
  };
@@ -3710,11 +4206,13 @@ const theme = {
3710
4206
  contextMenu: contextMenu,
3711
4207
  drawer: drawer,
3712
4208
  dropdownMenu: dropdownMenu,
4209
+ fileUpload: fileUpload,
3713
4210
  form: form,
3714
4211
  formField: formField,
3715
4212
  input: input,
3716
4213
  inputMenu: inputMenu,
3717
4214
  inputNumber: inputNumber,
4215
+ inputTags: inputTags,
3718
4216
  kbd: kbd,
3719
4217
  link: link,
3720
4218
  modal: modal,
@@ -3735,6 +4233,7 @@ const theme = {
3735
4233
  table: table,
3736
4234
  tabs: tabs,
3737
4235
  textarea: textarea,
4236
+ timeline: timeline,
3738
4237
  toast: toast,
3739
4238
  toaster: toaster,
3740
4239
  tooltip: tooltip,
@@ -3750,6 +4249,12 @@ function getTemplates(options, uiConfig) {
3750
4249
  getContents: async () => {
3751
4250
  const template = theme[component];
3752
4251
  const result = typeof template === "function" ? template(options) : template;
4252
+ if (result?.defaultVariants?.color && options.theme?.defaultVariants?.color) {
4253
+ result.defaultVariants.color = options.theme.defaultVariants.color;
4254
+ }
4255
+ if (result?.defaultVariants?.size && options.theme?.defaultVariants?.size) {
4256
+ result.defaultVariants.size = options.theme.defaultVariants.size;
4257
+ }
3753
4258
  const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
3754
4259
  const keys = Object.keys(values);
3755
4260
  return keys.some((key) => key !== "true" && key !== "false");
@@ -3859,13 +4364,13 @@ import colors from 'tailwindcss/colors'
3859
4364
 
3860
4365
  const icons = ${JSON.stringify(uiConfig.icons)};
3861
4366
 
3862
- type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | (string & {})
4367
+ type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
3863
4368
  type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
3864
4369
 
3865
4370
  type AppConfigUI = {
3866
4371
  colors?: {
3867
4372
  ${options.theme?.colors?.map((color) => `'${color}'?: Color`).join("\n ")}
3868
- neutral?: NeutralColor
4373
+ neutral?: NeutralColor | (string & {})
3869
4374
  }
3870
4375
  icons?: Partial<typeof icons>
3871
4376
  tv?: typeof defaultConfig