@nuxt/ui 3.0.0-alpha.9 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/.nuxt/ui/accordion.ts +2 -2
  2. package/.nuxt/ui/alert.ts +122 -95
  3. package/.nuxt/ui/avatar-group.ts +14 -2
  4. package/.nuxt/ui/avatar.ts +16 -4
  5. package/.nuxt/ui/badge.ts +139 -93
  6. package/.nuxt/ui/breadcrumb.ts +5 -5
  7. package/.nuxt/ui/button-group.ts +13 -0
  8. package/.nuxt/ui/button.ts +167 -136
  9. package/.nuxt/ui/calendar.ts +103 -0
  10. package/.nuxt/ui/card.ts +27 -1
  11. package/.nuxt/ui/carousel.ts +7 -5
  12. package/.nuxt/ui/checkbox.ts +45 -27
  13. package/.nuxt/ui/chip.ts +44 -15
  14. package/.nuxt/ui/color-picker.ts +47 -0
  15. package/.nuxt/ui/command-palette.ts +28 -18
  16. package/.nuxt/ui/container.ts +1 -1
  17. package/.nuxt/ui/context-menu.ts +64 -46
  18. package/.nuxt/ui/drawer.ts +83 -15
  19. package/.nuxt/ui/dropdown-menu.ts +65 -47
  20. package/.nuxt/ui/form-field.ts +15 -7
  21. package/.nuxt/ui/index.ts +5 -1
  22. package/.nuxt/ui/input-menu.ts +150 -116
  23. package/.nuxt/ui/input-number.ts +102 -71
  24. package/.nuxt/ui/input.ts +111 -76
  25. package/.nuxt/ui/kbd.ts +18 -6
  26. package/.nuxt/ui/link.ts +3 -3
  27. package/.nuxt/ui/modal.ts +8 -7
  28. package/.nuxt/ui/navigation-menu.ts +244 -131
  29. package/.nuxt/ui/pin-input.ts +77 -51
  30. package/.nuxt/ui/popover.ts +2 -2
  31. package/.nuxt/ui/progress.ts +111 -72
  32. package/.nuxt/ui/radio-group.ts +45 -22
  33. package/.nuxt/ui/select-menu.ts +122 -86
  34. package/.nuxt/ui/select.ts +120 -84
  35. package/.nuxt/ui/separator.ts +60 -31
  36. package/.nuxt/ui/skeleton.ts +1 -1
  37. package/.nuxt/ui/slideover.ts +17 -9
  38. package/.nuxt/ui/slider.ts +61 -38
  39. package/.nuxt/ui/stepper.ts +202 -0
  40. package/.nuxt/ui/switch.ts +40 -22
  41. package/.nuxt/ui/table.ts +48 -31
  42. package/.nuxt/ui/tabs.ts +100 -72
  43. package/.nuxt/ui/textarea.ts +111 -76
  44. package/.nuxt/ui/toast.ts +53 -33
  45. package/.nuxt/ui/toaster.ts +31 -15
  46. package/.nuxt/ui/tooltip.ts +2 -2
  47. package/.nuxt/ui/tree.ts +154 -0
  48. package/.nuxt/ui.css +92 -0
  49. package/README.md +19 -8
  50. package/cli/commands/make/component.mjs +12 -0
  51. package/cli/package.json +2 -2
  52. package/cli/templates.mjs +27 -22
  53. package/dist/module.cjs +9 -171
  54. package/dist/module.d.cts +5 -15
  55. package/dist/module.d.mts +5 -15
  56. package/dist/module.d.ts +5 -15
  57. package/dist/module.json +2 -2
  58. package/dist/module.mjs +12 -168
  59. package/dist/runtime/components/Accordion.vue +8 -39
  60. package/dist/runtime/components/Alert.vue +22 -21
  61. package/dist/runtime/components/App.vue +9 -15
  62. package/dist/runtime/components/Avatar.vue +33 -21
  63. package/dist/runtime/components/AvatarGroup.vue +5 -7
  64. package/dist/runtime/components/Badge.vue +10 -8
  65. package/dist/runtime/components/Breadcrumb.vue +5 -31
  66. package/dist/runtime/components/Button.vue +5 -8
  67. package/dist/runtime/components/ButtonGroup.vue +5 -7
  68. package/dist/runtime/components/Calendar.vue +194 -0
  69. package/dist/runtime/components/Card.vue +10 -9
  70. package/dist/runtime/components/Carousel.vue +15 -10
  71. package/dist/runtime/components/Checkbox.vue +32 -38
  72. package/dist/runtime/components/Chip.vue +6 -8
  73. package/dist/runtime/components/Collapsible.vue +10 -11
  74. package/dist/runtime/components/ColorPicker.vue +297 -0
  75. package/dist/runtime/components/CommandPalette.vue +111 -97
  76. package/dist/runtime/components/Container.vue +4 -7
  77. package/dist/runtime/components/ContextMenu.vue +16 -69
  78. package/dist/runtime/components/ContextMenuContent.vue +12 -10
  79. package/dist/runtime/components/Drawer.vue +23 -12
  80. package/dist/runtime/components/DropdownMenu.vue +18 -59
  81. package/dist/runtime/components/DropdownMenuContent.vue +12 -10
  82. package/dist/runtime/components/Form.vue +65 -34
  83. package/dist/runtime/components/FormField.vue +22 -13
  84. package/dist/runtime/components/Icon.vue +1 -1
  85. package/dist/runtime/components/Input.vue +15 -7
  86. package/dist/runtime/components/InputMenu.vue +95 -104
  87. package/dist/runtime/components/InputNumber.vue +14 -9
  88. package/dist/runtime/components/Kbd.vue +5 -6
  89. package/dist/runtime/components/Link.vue +5 -8
  90. package/dist/runtime/components/LinkBase.vue +1 -1
  91. package/dist/runtime/components/Modal.vue +51 -38
  92. package/dist/runtime/components/NavigationMenu.vue +129 -114
  93. package/dist/runtime/components/OverlayProvider.vue +28 -0
  94. package/dist/runtime/components/Pagination.vue +6 -9
  95. package/dist/runtime/components/PinInput.vue +10 -11
  96. package/dist/runtime/components/Popover.vue +16 -18
  97. package/dist/runtime/components/Progress.vue +28 -12
  98. package/dist/runtime/components/RadioGroup.vue +9 -12
  99. package/dist/runtime/components/Select.vue +60 -34
  100. package/dist/runtime/components/SelectMenu.vue +160 -165
  101. package/dist/runtime/components/Separator.vue +6 -5
  102. package/dist/runtime/components/Skeleton.vue +4 -7
  103. package/dist/runtime/components/Slideover.vue +51 -37
  104. package/dist/runtime/components/Slider.vue +8 -7
  105. package/dist/runtime/components/Stepper.vue +170 -0
  106. package/dist/runtime/components/Switch.vue +19 -23
  107. package/dist/runtime/components/Table.vue +146 -31
  108. package/dist/runtime/components/Tabs.vue +12 -31
  109. package/dist/runtime/components/Textarea.vue +17 -8
  110. package/dist/runtime/components/Toast.vue +36 -25
  111. package/dist/runtime/components/Toaster.vue +10 -11
  112. package/dist/runtime/components/Tooltip.vue +9 -12
  113. package/dist/runtime/components/Tree.vue +196 -0
  114. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  115. package/dist/runtime/composables/defineShortcuts.js +2 -2
  116. package/dist/runtime/composables/useFormField.d.ts +7 -3
  117. package/dist/runtime/composables/useFormField.js +18 -8
  118. package/dist/runtime/composables/useLocale.js +1 -1
  119. package/dist/runtime/composables/useOverlay.d.ts +30 -0
  120. package/dist/runtime/composables/useOverlay.js +70 -0
  121. package/dist/runtime/composables/useToast.d.ts +4 -3
  122. package/dist/runtime/composables/useToast.js +20 -6
  123. package/dist/runtime/index.css +1 -1
  124. package/dist/runtime/keyframes.css +1 -1
  125. package/dist/runtime/locale/ar.js +9 -1
  126. package/dist/runtime/locale/az.js +54 -0
  127. package/dist/runtime/locale/bn.js +54 -0
  128. package/dist/runtime/locale/cs.js +9 -1
  129. package/dist/runtime/locale/da.d.ts +2 -0
  130. package/dist/runtime/locale/da.js +54 -0
  131. package/dist/runtime/locale/de.js +11 -3
  132. package/dist/runtime/locale/el.d.ts +2 -0
  133. package/dist/runtime/locale/el.js +54 -0
  134. package/dist/runtime/locale/en.js +9 -1
  135. package/dist/runtime/locale/es.js +9 -1
  136. package/dist/runtime/locale/et.d.ts +2 -0
  137. package/dist/runtime/locale/et.js +54 -0
  138. package/dist/runtime/locale/fa_ir.js +9 -1
  139. package/dist/runtime/locale/fi.d.ts +2 -0
  140. package/dist/runtime/locale/fi.js +54 -0
  141. package/dist/runtime/locale/fr.js +9 -1
  142. package/dist/runtime/locale/he.d.ts +2 -0
  143. package/dist/runtime/locale/he.js +53 -0
  144. package/dist/runtime/locale/hi.d.ts +2 -0
  145. package/dist/runtime/locale/hi.js +54 -0
  146. package/dist/runtime/locale/hu.d.ts +2 -0
  147. package/dist/runtime/locale/hu.js +54 -0
  148. package/dist/runtime/locale/id.d.ts +2 -0
  149. package/dist/runtime/locale/id.js +54 -0
  150. package/dist/runtime/locale/index.d.ts +25 -3
  151. package/dist/runtime/locale/index.js +25 -3
  152. package/dist/runtime/locale/it.js +9 -1
  153. package/dist/runtime/locale/ja.d.ts +2 -0
  154. package/dist/runtime/locale/ja.js +54 -0
  155. package/dist/runtime/locale/km.d.ts +2 -0
  156. package/dist/runtime/locale/km.js +54 -0
  157. package/dist/runtime/locale/ko.d.ts +2 -0
  158. package/dist/runtime/locale/ko.js +54 -0
  159. package/dist/runtime/locale/nb_no.d.ts +2 -0
  160. package/dist/runtime/locale/nb_no.js +54 -0
  161. package/dist/runtime/locale/nl.d.ts +2 -0
  162. package/dist/runtime/locale/nl.js +54 -0
  163. package/dist/runtime/locale/pl.js +9 -1
  164. package/dist/runtime/locale/pt.d.ts +2 -0
  165. package/dist/runtime/locale/pt.js +54 -0
  166. package/dist/runtime/locale/pt_br.d.ts +2 -0
  167. package/dist/runtime/locale/pt_br.js +54 -0
  168. package/dist/runtime/locale/ru.js +9 -1
  169. package/dist/runtime/locale/sk.d.ts +2 -0
  170. package/dist/runtime/locale/sk.js +54 -0
  171. package/dist/runtime/locale/sv.d.ts +2 -0
  172. package/dist/runtime/locale/sv.js +54 -0
  173. package/dist/runtime/locale/th.d.ts +2 -0
  174. package/dist/runtime/locale/th.js +54 -0
  175. package/dist/runtime/locale/tr.d.ts +2 -0
  176. package/dist/runtime/locale/tr.js +54 -0
  177. package/dist/runtime/locale/uk.d.ts +2 -0
  178. package/dist/runtime/locale/uk.js +54 -0
  179. package/dist/runtime/locale/vi.d.ts +2 -0
  180. package/dist/runtime/locale/vi.js +54 -0
  181. package/dist/runtime/locale/zh_cn.d.ts +2 -0
  182. package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +10 -2
  183. package/dist/runtime/locale/zh_tw.d.ts +2 -0
  184. package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +16 -8
  185. package/dist/runtime/plugins/colors.js +8 -5
  186. package/dist/runtime/types/form.d.ts +24 -15
  187. package/dist/runtime/types/form.js +2 -2
  188. package/dist/runtime/types/index.d.ts +5 -0
  189. package/dist/runtime/types/index.js +5 -0
  190. package/dist/runtime/types/locale.d.ts +8 -0
  191. package/dist/runtime/types/utils.d.ts +7 -3
  192. package/dist/runtime/utils/form.d.ts +4 -4
  193. package/dist/runtime/utils/form.js +6 -8
  194. package/dist/runtime/utils/index.d.ts +1 -1
  195. package/dist/runtime/utils/index.js +15 -2
  196. package/dist/runtime/utils/tv.d.ts +1 -0
  197. package/dist/runtime/utils/tv.js +4 -0
  198. package/dist/runtime/vue/components/Icon.vue +2 -2
  199. package/dist/runtime/vue/components/Link.vue +87 -23
  200. package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
  201. package/dist/runtime/vue/composables/useAppConfig.js +2 -0
  202. package/dist/runtime/vue/plugins/head.d.ts +1 -1
  203. package/dist/runtime/vue/plugins/head.js +3 -3
  204. package/dist/runtime/vue/stubs.d.ts +19 -0
  205. package/dist/runtime/vue/stubs.js +37 -0
  206. package/dist/shared/{ui.d52SSCwA.mjs → ui.DSPu6Y8j.mjs} +905 -401
  207. package/dist/shared/{ui.BPnAe4QS.cjs → ui.DfK2RX6G.cjs} +908 -401
  208. package/dist/unplugin.cjs +62 -26
  209. package/dist/unplugin.d.cts +13 -1
  210. package/dist/unplugin.d.mts +13 -1
  211. package/dist/unplugin.d.ts +13 -1
  212. package/dist/unplugin.mjs +61 -25
  213. package/dist/vite.cjs +3 -2
  214. package/dist/vite.d.cts +2 -0
  215. package/dist/vite.d.mts +2 -0
  216. package/dist/vite.d.ts +2 -0
  217. package/dist/vite.mjs +3 -2
  218. package/package.json +103 -67
  219. package/dist/chunks/component-meta.cjs +0 -77249
  220. package/dist/chunks/component-meta.mjs +0 -77247
  221. package/dist/client/devtools/200.html +0 -1
  222. package/dist/client/devtools/404.html +0 -1
  223. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
  224. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
  225. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
  226. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
  227. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
  228. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
  229. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
  230. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
  231. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
  232. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
  233. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
  234. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
  235. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
  236. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
  237. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
  238. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
  239. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
  240. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
  241. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
  242. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
  243. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
  244. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
  245. package/dist/client/devtools/_nuxt/BDC8ywlR.js +0 -1
  246. package/dist/client/devtools/_nuxt/BT004Uxp.js +0 -53
  247. package/dist/client/devtools/_nuxt/C1H2Soz3.js +0 -1
  248. package/dist/client/devtools/_nuxt/builds/latest.json +0 -1
  249. package/dist/client/devtools/_nuxt/builds/meta/f98c13ea-d751-4b37-8ce3-94e99708745f.json +0 -1
  250. package/dist/client/devtools/_nuxt/entry.Bx6WJjrx.css +0 -1
  251. package/dist/client/devtools/_nuxt/error-404.Cq4qshcf.css +0 -1
  252. package/dist/client/devtools/_nuxt/error-500.ax1aM34m.css +0 -1
  253. package/dist/client/devtools/favicon.svg +0 -1
  254. package/dist/client/devtools/index.html +0 -1
  255. package/dist/devtools/runtime/DevtoolsRenderer.vue +0 -53
  256. package/dist/devtools/runtime/examples/AvatarGroupExample.vue +0 -7
  257. package/dist/devtools/runtime/examples/ButtonGroupExample.vue +0 -8
  258. package/dist/devtools/runtime/examples/CardExample.vue +0 -13
  259. package/dist/devtools/runtime/examples/CarouselExample.vue +0 -13
  260. package/dist/devtools/runtime/examples/ChipExample.vue +0 -5
  261. package/dist/devtools/runtime/examples/CollapsibleExample.vue +0 -8
  262. package/dist/devtools/runtime/examples/CommandPaletteExample.vue +0 -29
  263. package/dist/devtools/runtime/examples/ContainerExample.vue +0 -5
  264. package/dist/devtools/runtime/examples/ContextMenuExample.vue +0 -5
  265. package/dist/devtools/runtime/examples/DrawerExample.vue +0 -8
  266. package/dist/devtools/runtime/examples/DropdownMenuExample.vue +0 -5
  267. package/dist/devtools/runtime/examples/FormExample.vue +0 -30
  268. package/dist/devtools/runtime/examples/FormFieldExample.vue +0 -5
  269. package/dist/devtools/runtime/examples/LinkExample.vue +0 -5
  270. package/dist/devtools/runtime/examples/ModalExample.vue +0 -8
  271. package/dist/devtools/runtime/examples/PopoverExample.vue +0 -8
  272. package/dist/devtools/runtime/examples/SkeletonExample.vue +0 -3
  273. package/dist/devtools/runtime/examples/SlideoverExample.vue +0 -8
  274. package/dist/devtools/runtime/examples/ToasterExample.vue +0 -11
  275. package/dist/devtools/runtime/examples/TooltipExample.vue +0 -5
  276. package/dist/runtime/components/ModalProvider.vue +0 -12
  277. package/dist/runtime/components/SlideoverProvider.vue +0 -12
  278. package/dist/runtime/composables/extendDevtoolsMeta.d.ts +0 -7
  279. package/dist/runtime/composables/extendDevtoolsMeta.js +0 -2
  280. package/dist/runtime/composables/useModal.d.ts +0 -17
  281. package/dist/runtime/composables/useModal.js +0 -46
  282. package/dist/runtime/composables/useSlideover.d.ts +0 -17
  283. package/dist/runtime/composables/useSlideover.js +0 -46
  284. package/dist/runtime/plugins/modal.d.ts +0 -2
  285. package/dist/runtime/plugins/modal.js +0 -10
  286. package/dist/runtime/plugins/slideover.d.ts +0 -2
  287. package/dist/runtime/plugins/slideover.js +0 -10
  288. /package/dist/runtime/locale/{zh_hans.d.ts → az.d.ts} +0 -0
  289. /package/dist/runtime/locale/{zh_hant.d.ts → bn.d.ts} +0 -0
@@ -3,6 +3,7 @@ import 'node:url';
3
3
  import { kebabCase } from 'scule';
4
4
  import { addTypeTemplate, addTemplate } from '@nuxt/kit';
5
5
  import { defuFn, defu } from 'defu';
6
+ import colors from 'tailwindcss/colors';
6
7
 
7
8
  const icons = {
8
9
  arrowLeft: "i-lucide-arrow-left",
@@ -13,14 +14,16 @@ const icons = {
13
14
  chevronDown: "i-lucide-chevron-down",
14
15
  chevronLeft: "i-lucide-chevron-left",
15
16
  chevronRight: "i-lucide-chevron-right",
17
+ chevronUp: "i-lucide-chevron-up",
16
18
  close: "i-lucide-x",
17
19
  ellipsis: "i-lucide-ellipsis",
18
20
  external: "i-lucide-arrow-up-right",
19
- loading: "i-lucide-refresh-ccw",
21
+ folder: "i-lucide-folder",
22
+ folderOpen: "i-lucide-folder-open",
23
+ loading: "i-lucide-refresh-cw",
20
24
  minus: "i-lucide-minus",
21
25
  plus: "i-lucide-plus",
22
- search: "i-lucide-search",
23
- chevronUp: "i-lucide-chevron-up"
26
+ search: "i-lucide-search"
24
27
  };
25
28
 
26
29
  const getDefaultUiConfig = (colors) => ({
@@ -40,11 +43,8 @@ const defaultOptions = {
40
43
  fonts: true,
41
44
  colorMode: true,
42
45
  theme: {
43
- colors: void 0,
46
+ colors: undefined,
44
47
  transitions: true
45
- },
46
- devtools: {
47
- enabled: true
48
48
  }
49
49
  };
50
50
  const resolveColors = (colors) => {
@@ -54,9 +54,9 @@ const resolveColors = (colors) => {
54
54
  const accordion = {
55
55
  slots: {
56
56
  root: "w-full",
57
- item: "border-b border-[var(--ui-border)] last:border-b-0",
57
+ item: "border-b border-(--ui-border) last:border-b-0",
58
58
  header: "flex",
59
- 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",
59
+ trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-(--ui-primary) min-w-0",
60
60
  content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
61
61
  body: "text-sm pb-3.5",
62
62
  leadingIcon: "shrink-0 size-5",
@@ -75,14 +75,14 @@ const accordion = {
75
75
  const alert = (options) => ({
76
76
  slots: {
77
77
  root: "relative overflow-hidden w-full rounded-[calc(var(--ui-radius)*2)] p-4 flex gap-2.5",
78
- wrapper: "min-w-0 flex-1 flex flex-col gap-1",
78
+ wrapper: "min-w-0 flex-1 flex flex-col",
79
79
  title: "text-sm font-medium",
80
80
  description: "text-sm opacity-90",
81
81
  icon: "shrink-0 size-5",
82
82
  avatar: "shrink-0",
83
83
  avatarSize: "2xl",
84
- actions: "flex gap-1.5 shrink-0",
85
- close: "p-0.5"
84
+ actions: "flex flex-wrap gap-1.5 shrink-0",
85
+ close: "p-0"
86
86
  },
87
87
  variants: {
88
88
  color: {
@@ -95,14 +95,19 @@ const alert = (options) => ({
95
95
  soft: "",
96
96
  subtle: ""
97
97
  },
98
- multiline: {
99
- true: {
100
- root: "items-start",
101
- actions: "items-start mt-1"
102
- },
103
- false: {
98
+ orientation: {
99
+ horizontal: {
104
100
  root: "items-center",
105
101
  actions: "items-center"
102
+ },
103
+ vertical: {
104
+ root: "items-start",
105
+ actions: "items-start mt-2.5"
106
+ }
107
+ },
108
+ title: {
109
+ true: {
110
+ description: "mt-1"
106
111
  }
107
112
  }
108
113
  },
@@ -110,49 +115,49 @@ const alert = (options) => ({
110
115
  color,
111
116
  variant: "solid",
112
117
  class: {
113
- root: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
118
+ root: `bg-(--ui-${color}) text-(--ui-bg)`
114
119
  }
115
120
  })), ...(options.theme.colors || []).map((color) => ({
116
121
  color,
117
122
  variant: "outline",
118
123
  class: {
119
- root: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
124
+ root: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
120
125
  }
121
126
  })), ...(options.theme.colors || []).map((color) => ({
122
127
  color,
123
128
  variant: "soft",
124
129
  class: {
125
- root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
130
+ root: `bg-(--ui-${color})/10 text-(--ui-${color})`
126
131
  }
127
132
  })), ...(options.theme.colors || []).map((color) => ({
128
133
  color,
129
134
  variant: "subtle",
130
135
  class: {
131
- root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
136
+ root: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
132
137
  }
133
138
  })), {
134
139
  color: "neutral",
135
140
  variant: "solid",
136
141
  class: {
137
- root: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
142
+ root: "text-(--ui-bg) bg-(--ui-bg-inverted)"
138
143
  }
139
144
  }, {
140
145
  color: "neutral",
141
146
  variant: "outline",
142
147
  class: {
143
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border)]"
148
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border)"
144
149
  }
145
150
  }, {
146
151
  color: "neutral",
147
152
  variant: "soft",
148
153
  class: {
149
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50"
154
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50"
150
155
  }
151
156
  }, {
152
157
  color: "neutral",
153
158
  variant: "subtle",
154
159
  class: {
155
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 ring ring-inset ring-[var(--ui-border-accented)]"
160
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 ring ring-inset ring-(--ui-border-accented)"
156
161
  }
157
162
  }],
158
163
  defaultVariants: {
@@ -163,10 +168,10 @@ const alert = (options) => ({
163
168
 
164
169
  const avatar = {
165
170
  slots: {
166
- root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
171
+ root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated)",
167
172
  image: "h-full w-full rounded-[inherit] object-cover",
168
- fallback: "font-medium leading-none text-[var(--ui-text-muted)] truncate",
169
- icon: "text-[var(--ui-text-muted)] shrink-0"
173
+ fallback: "font-medium leading-none text-(--ui-text-muted) truncate",
174
+ icon: "text-(--ui-text-muted) shrink-0"
170
175
  },
171
176
  variants: {
172
177
  size: {
@@ -207,7 +212,7 @@ const avatar = {
207
212
  const avatarGroup = {
208
213
  slots: {
209
214
  root: "inline-flex flex-row-reverse justify-end",
210
- base: "relative rounded-full ring-[var(--ui-bg)] first:me-0"
215
+ base: "relative rounded-full ring-(--ui-bg) first:me-0"
211
216
  },
212
217
  variants: {
213
218
  size: {
@@ -245,9 +250,44 @@ const avatarGroup = {
245
250
  }
246
251
  };
247
252
 
253
+ const buttonGroupVariant = {
254
+ buttonGroup: {
255
+ horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
256
+ vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
257
+ }
258
+ };
259
+ const buttonGroupVariantWithRoot = {
260
+ buttonGroup: {
261
+ horizontal: {
262
+ root: "group",
263
+ base: "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
264
+ },
265
+ vertical: {
266
+ root: "group",
267
+ base: "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
268
+ }
269
+ }
270
+ };
271
+ const buttonGroup = {
272
+ base: "relative",
273
+ variants: {
274
+ size: {
275
+ xs: "",
276
+ sm: "",
277
+ md: "",
278
+ lg: "",
279
+ xl: ""
280
+ },
281
+ orientation: {
282
+ horizontal: "inline-flex -space-x-px",
283
+ vertical: "flex flex-col -space-y-px"
284
+ }
285
+ }
286
+ };
287
+
248
288
  const badge = (options) => ({
249
289
  slots: {
250
- base: "rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center",
290
+ base: "font-medium inline-flex items-center",
251
291
  label: "truncate",
252
292
  leadingIcon: "shrink-0",
253
293
  leadingAvatar: "shrink-0",
@@ -255,6 +295,7 @@ const badge = (options) => ({
255
295
  trailingIcon: "shrink-0"
256
296
  },
257
297
  variants: {
298
+ ...buttonGroupVariant,
258
299
  color: {
259
300
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
260
301
  neutral: ""
@@ -266,58 +307,70 @@ const badge = (options) => ({
266
307
  subtle: ""
267
308
  },
268
309
  size: {
310
+ xs: {
311
+ base: "text-[8px]/3 px-1 py-0.5 gap-1 rounded-[calc(var(--ui-radius))]",
312
+ leadingIcon: "size-3",
313
+ leadingAvatarSize: "3xs",
314
+ trailingIcon: "size-3"
315
+ },
269
316
  sm: {
270
- base: "text-xs px-1.5 py-0.5 gap-1",
271
- leadingIcon: "size-4",
317
+ base: "text-[10px]/3 px-1.5 py-1 gap-1 rounded-[calc(var(--ui-radius))]",
318
+ leadingIcon: "size-3",
272
319
  leadingAvatarSize: "3xs",
273
- trailingIcon: "size-4"
320
+ trailingIcon: "size-3"
274
321
  },
275
322
  md: {
276
- base: "text-xs px-2 py-1 gap-1",
323
+ base: "text-xs px-2 py-1 gap-1 rounded-[calc(var(--ui-radius)*1.5)]",
277
324
  leadingIcon: "size-4",
278
325
  leadingAvatarSize: "3xs",
279
326
  trailingIcon: "size-4"
280
327
  },
281
328
  lg: {
282
- base: "text-sm px-2 py-1 gap-1.5",
329
+ base: "text-sm px-2 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
283
330
  leadingIcon: "size-5",
284
331
  leadingAvatarSize: "2xs",
285
332
  trailingIcon: "size-5"
333
+ },
334
+ xl: {
335
+ base: "text-base px-2.5 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
336
+ leadingIcon: "size-6",
337
+ leadingAvatarSize: "2xs",
338
+ trailingIcon: "size-6"
286
339
  }
287
340
  }
288
341
  },
289
342
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
290
343
  color,
291
344
  variant: "solid",
292
- class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
345
+ class: `bg-(--ui-${color}) text-(--ui-bg)`
293
346
  })), ...(options.theme.colors || []).map((color) => ({
294
347
  color,
295
348
  variant: "outline",
296
- class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/50`
349
+ class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/50`
297
350
  })), ...(options.theme.colors || []).map((color) => ({
298
351
  color,
299
352
  variant: "soft",
300
- class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
353
+ class: `bg-(--ui-${color})/10 text-(--ui-${color})`
301
354
  })), ...(options.theme.colors || []).map((color) => ({
302
355
  color,
303
356
  variant: "subtle",
304
- class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
357
+ class: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
305
358
  })), {
306
359
  color: "neutral",
307
360
  variant: "solid",
308
- class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
361
+ class: "text-(--ui-bg) bg-(--ui-bg-inverted)"
309
362
  }, {
310
363
  color: "neutral",
311
364
  variant: "outline",
312
- class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)]"
365
+ class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg)"
313
366
  }, {
314
367
  color: "neutral",
315
368
  variant: "soft",
316
- class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
369
+ class: "text-(--ui-text) bg-(--ui-bg-elevated)"
317
370
  }, {
318
371
  color: "neutral",
319
372
  variant: "subtle",
320
- class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
373
+ class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated)"
321
374
  }],
322
375
  defaultVariants: {
323
376
  color: "primary",
@@ -331,21 +384,21 @@ const breadcrumb = (options) => ({
331
384
  root: "relative min-w-0",
332
385
  list: "flex items-center gap-1.5",
333
386
  item: "flex min-w-0",
334
- link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-[var(--ui-primary)]",
387
+ link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-(--ui-primary)",
335
388
  linkLeadingIcon: "shrink-0 size-5",
336
389
  linkLeadingAvatar: "shrink-0",
337
390
  linkLeadingAvatarSize: "2xs",
338
391
  linkLabel: "truncate",
339
392
  separator: "flex",
340
- separatorIcon: "shrink-0 size-5 text-[var(--ui-text-muted)]"
393
+ separatorIcon: "shrink-0 size-5 text-(--ui-text-muted)"
341
394
  },
342
395
  variants: {
343
396
  active: {
344
397
  true: {
345
- link: "text-[var(--ui-primary)] font-semibold"
398
+ link: "text-(--ui-primary) font-semibold"
346
399
  },
347
400
  false: {
348
- link: "text-[var(--ui-text-muted)] font-medium"
401
+ link: "text-(--ui-text-muted) font-medium"
349
402
  }
350
403
  },
351
404
  disabled: {
@@ -362,49 +415,14 @@ const breadcrumb = (options) => ({
362
415
  active: false,
363
416
  to: true,
364
417
  class: {
365
- link: ["hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
418
+ link: ["hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
366
419
  }
367
420
  }]
368
421
  });
369
422
 
370
- const buttonGroupVariant = {
371
- buttonGroup: {
372
- horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
373
- vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
374
- }
375
- };
376
- const buttonGroupVariantWithRoot = {
377
- buttonGroup: {
378
- horizontal: {
379
- root: "group",
380
- base: "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
381
- },
382
- vertical: {
383
- root: "group",
384
- base: "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
385
- }
386
- }
387
- };
388
- const buttonGroup = {
389
- base: "relative",
390
- variants: {
391
- size: {
392
- xs: "",
393
- sm: "",
394
- md: "",
395
- lg: "",
396
- xl: ""
397
- },
398
- orientation: {
399
- horizontal: "inline-flex -space-x-px",
400
- vertical: "flex flex-col -space-y-px"
401
- }
402
- }
403
- };
404
-
405
423
  const button = (options) => ({
406
424
  slots: {
407
- 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"],
425
+ base: ["rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center focus:outline-hidden disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75", options.theme.transitions && "transition-colors"],
408
426
  label: "truncate",
409
427
  leadingIcon: "shrink-0",
410
428
  leadingAvatar: "shrink-0",
@@ -460,7 +478,6 @@ const button = (options) => ({
460
478
  block: {
461
479
  true: {
462
480
  base: "w-full justify-center",
463
- leadingAvatarSize: "xs",
464
481
  trailingIcon: "ms-auto"
465
482
  }
466
483
  },
@@ -480,51 +497,51 @@ const button = (options) => ({
480
497
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
481
498
  color,
482
499
  variant: "solid",
483
- 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})]`
500
+ class: `text-(--ui-bg) bg-(--ui-${color}) hover:bg-(--ui-${color})/75 disabled:bg-(--ui-${color}) aria-disabled:bg-(--ui-${color}) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-${color})`
484
501
  })), ...(options.theme.colors || []).map((color) => ({
485
502
  color,
486
503
  variant: "outline",
487
- 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})]`
504
+ class: `ring ring-inset ring-(--ui-${color})/50 text-(--ui-${color}) hover:bg-(--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-(--ui-${color})`
488
505
  })), ...(options.theme.colors || []).map((color) => ({
489
506
  color,
490
507
  variant: "soft",
491
- 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`
508
+ class: `text-(--ui-${color}) bg-(--ui-${color})/10 hover:bg-(--ui-${color})/15 focus-visible:bg-(--ui-${color})/15 disabled:bg-(--ui-${color})/10 aria-disabled:bg-(--ui-${color})/10`
492
509
  })), ...(options.theme.colors || []).map((color) => ({
493
510
  color,
494
511
  variant: "subtle",
495
- 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})]`
512
+ class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25 bg-(--ui-${color})/10 hover:bg-(--ui-${color})/15 disabled:bg-(--ui-${color})/10 aria-disabled:bg-(--ui-${color})/10 focus-visible:ring-2 focus-visible:ring-(--ui-${color})`
496
513
  })), ...(options.theme.colors || []).map((color) => ({
497
514
  color,
498
515
  variant: "ghost",
499
- 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`
516
+ class: `text-(--ui-${color}) hover:bg-(--ui-${color})/10 focus-visible:bg-(--ui-${color})/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent`
500
517
  })), ...(options.theme.colors || []).map((color) => ({
501
518
  color,
502
519
  variant: "link",
503
- 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})]`
520
+ class: `text-(--ui-${color}) hover:text-(--ui-${color})/75 disabled:text-(--ui-${color}) aria-disabled:text-(--ui-${color}) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
504
521
  })), {
505
522
  color: "neutral",
506
523
  variant: "solid",
507
- class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/90 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)]"
524
+ class: "text-(--ui-bg) bg-(--ui-bg-inverted) hover:bg-(--ui-bg-inverted)/90 disabled:bg-(--ui-bg-inverted) aria-disabled:bg-(--ui-bg-inverted) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-border-inverted)"
508
525
  }, {
509
526
  color: "neutral",
510
527
  variant: "outline",
511
- 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)]"
528
+ class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg) hover:bg-(--ui-bg-elevated) disabled:bg-(--ui-bg) aria-disabled:bg-(--ui-bg) focus-visible:ring-2 focus-visible:ring-(--ui-border-inverted)"
512
529
  }, {
513
530
  color: "neutral",
514
531
  variant: "soft",
515
- 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)]"
532
+ class: "text-(--ui-text) bg-(--ui-bg-elevated) hover:bg-(--ui-bg-accented)/75 focus-visible:bg-(--ui-bg-accented)/75 disabled:bg-(--ui-bg-elevated) aria-disabled:bg-(--ui-bg-elevated)"
516
533
  }, {
517
534
  color: "neutral",
518
535
  variant: "subtle",
519
- 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)]"
536
+ class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated) hover:bg-(--ui-bg-accented)/75 disabled:bg-(--ui-bg-elevated) aria-disabled:bg-(--ui-bg-elevated) focus-visible:ring-2 focus-visible:ring-(--ui-border-inverted)"
520
537
  }, {
521
538
  color: "neutral",
522
539
  variant: "ghost",
523
- 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"
540
+ class: "text-(--ui-text) hover:bg-(--ui-bg-elevated) focus-visible:bg-(--ui-bg-elevated) hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent"
524
541
  }, {
525
542
  color: "neutral",
526
543
  variant: "link",
527
- 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)]"
544
+ class: "text-(--ui-text-muted) hover:text-(--ui-text) disabled:text-(--ui-text-muted) aria-disabled:text-(--ui-text-muted) focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-(--ui-border-inverted)"
528
545
  }, {
529
546
  size: "xs",
530
547
  square: true,
@@ -566,12 +583,94 @@ const button = (options) => ({
566
583
  }
567
584
  });
568
585
 
586
+ const calendar = (options) => ({
587
+ slots: {
588
+ root: "",
589
+ header: "flex items-center justify-between",
590
+ body: "flex flex-col space-y-4 pt-4 sm:flex-row sm:space-x-4 sm:space-y-0",
591
+ heading: "text-center font-medium truncate mx-auto",
592
+ grid: "w-full border-collapse select-none space-y-1 focus:outline-none",
593
+ gridRow: "grid grid-cols-7",
594
+ gridWeekDaysRow: "mb-1 grid w-full grid-cols-7",
595
+ gridBody: "grid",
596
+ headCell: "rounded-[calc(var(--ui-radius)*1.5)]",
597
+ cell: "relative text-center",
598
+ cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-(--ui-text-muted) data-unavailable:line-through data-unavailable:text-(--ui-text-muted) data-unavailable:pointer-events-none data-[selected]:text-(--ui-bg) data-today:font-semibold", options.theme.transitions && "transition"]
599
+ },
600
+ variants: {
601
+ color: {
602
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
603
+ headCell: `text-(--ui-${color})`,
604
+ cellTrigger: `focus-visible:ring-(--ui-${color}) data-[selected]:bg-(--ui-${color}) data-today:not-data-[selected]:text-(--ui-${color}) data-[highlighted]:bg-(--ui-${color})/20 hover:not-data-[selected]:bg-(--ui-${color})/20`
605
+ }])),
606
+ neutral: {
607
+ headCell: "text-(--ui-bg-inverted)",
608
+ cellTrigger: "focus-visible:ring-(--ui-border-inverted) data-[selected]:bg-(--ui-bg-inverted) data-today:not-data-[selected]:text-(--ui-bg-inverted) data-[highlighted]:bg-(--ui-bg-inverted)/20 hover:not-data-[selected]:bg-(--ui-bg-inverted)/10"
609
+ }
610
+ },
611
+ size: {
612
+ xs: {
613
+ heading: "text-xs",
614
+ cell: "text-xs",
615
+ headCell: "text-[10px]",
616
+ cellTrigger: "size-7",
617
+ body: "space-y-2 pt-2"
618
+ },
619
+ sm: {
620
+ heading: "text-xs",
621
+ headCell: "text-xs",
622
+ cell: "text-xs",
623
+ cellTrigger: "size-7"
624
+ },
625
+ md: {
626
+ heading: "text-sm",
627
+ headCell: "text-xs",
628
+ cell: "text-sm",
629
+ cellTrigger: "size-8"
630
+ },
631
+ lg: {
632
+ heading: "text-md",
633
+ headCell: "text-md",
634
+ cellTrigger: "size-9 text-md"
635
+ },
636
+ xl: {
637
+ heading: "text-lg",
638
+ headCell: "text-lg",
639
+ cellTrigger: "size-10 text-lg"
640
+ }
641
+ }
642
+ },
643
+ defaultVariants: {
644
+ size: "md",
645
+ color: "primary"
646
+ }
647
+ });
648
+
569
649
  const card = {
570
650
  slots: {
571
- root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow-sm",
651
+ root: "rounded-[calc(var(--ui-radius)*2)]",
572
652
  header: "p-4 sm:px-6",
573
653
  body: "p-4 sm:p-6",
574
654
  footer: "p-4 sm:px-6"
655
+ },
656
+ variants: {
657
+ variant: {
658
+ solid: {
659
+ root: "bg-(--ui-bg-inverted) text-(--ui-bg)"
660
+ },
661
+ outline: {
662
+ root: "bg-(--ui-bg) ring ring-(--ui-border) divide-y divide-(--ui-border)"
663
+ },
664
+ soft: {
665
+ root: "bg-(--ui-bg-elevated)/50 divide-y divide-(--ui-border)"
666
+ },
667
+ subtle: {
668
+ root: "bg-(--ui-bg-elevated)/50 ring ring-(--ui-border) divide-y divide-(--ui-border)"
669
+ }
670
+ }
671
+ },
672
+ defaultVariants: {
673
+ variant: "outline"
575
674
  }
576
675
  };
577
676
 
@@ -586,7 +685,7 @@ const carousel = (options) => ({
586
685
  prev: "absolute rounded-full",
587
686
  next: "absolute rounded-full",
588
687
  dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
589
- dot: ["cursor-pointer size-3 bg-[var(--ui-border-accented)] rounded-full", options.theme.transitions && "transition"]
688
+ dot: ["cursor-pointer size-3 bg-(--ui-border-accented) rounded-full", options.theme.transitions && "transition"]
590
689
  },
591
690
  variants: {
592
691
  orientation: {
@@ -605,29 +704,26 @@ const carousel = (options) => ({
605
704
  },
606
705
  active: {
607
706
  true: {
608
- dot: "bg-[var(--ui-border-inverted)]"
707
+ dot: "bg-(--ui-border-inverted)"
609
708
  }
610
709
  }
611
- },
612
- defaultVariants: {
613
- orientation: "horizontal"
614
710
  }
615
711
  });
616
712
 
617
713
  const checkbox = (options) => ({
618
714
  slots: {
619
715
  root: "relative flex items-start",
620
- 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",
716
+ base: "shrink-0 flex items-center justify-center rounded-(--ui-radius) text-(--ui-bg) ring ring-inset ring-(--ui-border-accented) focus-visible:outline-2 focus-visible:outline-offset-2",
621
717
  container: "flex items-center",
622
718
  wrapper: "ms-2",
623
719
  icon: "shrink-0 size-full",
624
- label: "block font-medium text-[var(--ui-text)]",
625
- description: "text-[var(--ui-text-muted)]"
720
+ label: "block font-medium text-(--ui-text)",
721
+ description: "text-(--ui-text-muted)"
626
722
  },
627
723
  variants: {
628
724
  color: {
629
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-[var(--ui-${color})]`])),
630
- neutral: "focus-visible:outline-[var(--ui-border-inverted)]"
725
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-(--ui-${color})`])),
726
+ neutral: "focus-visible:outline-(--ui-border-inverted)"
631
727
  },
632
728
  size: {
633
729
  xs: {
@@ -658,7 +754,7 @@ const checkbox = (options) => ({
658
754
  },
659
755
  required: {
660
756
  true: {
661
- label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
757
+ label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
662
758
  }
663
759
  },
664
760
  disabled: {
@@ -675,11 +771,11 @@ const checkbox = (options) => ({
675
771
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
676
772
  color,
677
773
  checked: true,
678
- class: `ring-2 ring-[var(--ui-${color})] bg-[var(--ui-${color})]`
774
+ class: `ring-2 ring-(--ui-${color}) bg-(--ui-${color})`
679
775
  })), {
680
776
  color: "neutral",
681
777
  checked: true,
682
- class: "ring-2 ring-[var(--ui-border-inverted)] bg-[var(--ui-bg-inverted)]"
778
+ class: "ring-2 ring-(--ui-border-inverted) bg-(--ui-bg-inverted)"
683
779
  }],
684
780
  defaultVariants: {
685
781
  size: "md",
@@ -690,12 +786,12 @@ const checkbox = (options) => ({
690
786
  const chip = (options) => ({
691
787
  slots: {
692
788
  root: "relative inline-flex items-center justify-center shrink-0",
693
- base: "rounded-full ring ring-[var(--ui-bg)] flex items-center justify-center text-[var(--ui-bg)] font-medium whitespace-nowrap"
789
+ base: "rounded-full ring ring-(--ui-bg) flex items-center justify-center text-(--ui-bg) font-medium whitespace-nowrap"
694
790
  },
695
791
  variants: {
696
792
  color: {
697
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[var(--ui-${color})]`])),
698
- neutral: "bg-[var(--ui-text-muted)]"
793
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-(--ui-${color})`])),
794
+ neutral: "bg-(--ui-text-muted)"
699
795
  },
700
796
  size: {
701
797
  "3xs": "h-[4px] min-w-[4px] text-[4px]",
@@ -752,33 +848,83 @@ const collapsible = {
752
848
  }
753
849
  };
754
850
 
851
+ const colorPicker = {
852
+ slots: {
853
+ root: "data-[disabled]:opacity-75",
854
+ picker: "flex gap-4",
855
+ selector: "rounded-[calc(var(--ui-radius)*1.5)]",
856
+ selectorBackground: "w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]",
857
+ selectorThumb: "-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",
858
+ track: "w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]",
859
+ trackThumb: "absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed"
860
+ },
861
+ variants: {
862
+ size: {
863
+ xs: {
864
+ selector: "w-38 h-38",
865
+ track: "h-38"
866
+ },
867
+ sm: {
868
+ selector: "w-40 h-40",
869
+ track: "h-40"
870
+ },
871
+ md: {
872
+ selector: "w-42 h-42",
873
+ track: "h-42"
874
+ },
875
+ lg: {
876
+ selector: "w-44 h-44",
877
+ track: "h-44"
878
+ },
879
+ xl: {
880
+ selector: "w-46 h-46",
881
+ track: "h-46"
882
+ }
883
+ }
884
+ },
885
+ compoundVariants: [],
886
+ defaultVariants: {
887
+ size: "md"
888
+ }
889
+ };
890
+
755
891
  const commandPalette = (options) => ({
756
892
  slots: {
757
- root: "flex flex-col min-h-0 min-w-0 divide-y divide-[var(--ui-border)]",
893
+ root: "flex flex-col min-h-0 min-w-0 divide-y divide-(--ui-border)",
758
894
  input: "[&>input]:h-12",
759
895
  close: "",
760
- content: "relative overflow-hidden",
761
- viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
896
+ content: "relative overflow-hidden flex flex-col",
897
+ viewport: "relative divide-y divide-(--ui-border) scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
762
898
  group: "p-1 isolate",
763
- empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]",
764
- label: "px-2 py-1.5 text-xs font-semibold text-[var(--ui-text-highlighted)]",
765
- 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"],
766
- itemLeadingIcon: ["shrink-0 size-5 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
899
+ empty: "py-6 text-center text-sm text-(--ui-text-muted)",
900
+ label: "px-2 py-1.5 text-xs font-semibold text-(--ui-text-highlighted)",
901
+ 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",
902
+ itemLeadingIcon: "shrink-0 size-5",
767
903
  itemLeadingAvatar: "shrink-0",
768
904
  itemLeadingAvatarSize: "2xs",
769
905
  itemLeadingChip: "shrink-0 size-5",
770
906
  itemLeadingChipSize: "md",
771
907
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
772
908
  itemTrailingIcon: "shrink-0 size-5",
773
- itemTrailingHighlightedIcon: "shrink-0 size-5 text-[var(--ui-text-dimmed)] hidden group-data-highlighted:inline-flex",
909
+ itemTrailingHighlightedIcon: "shrink-0 size-5 text-(--ui-text-dimmed) hidden group-data-highlighted:inline-flex",
774
910
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
775
911
  itemTrailingKbdsSize: "md",
776
- itemLabel: "truncate space-x-1 rtl:space-x-reverse",
777
- itemLabelBase: "text-[var(--ui-text-highlighted)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]",
778
- itemLabelPrefix: "text-[var(--ui-text)]",
779
- itemLabelSuffix: "text-[var(--ui-text-dimmed)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]"
912
+ itemLabel: "truncate space-x-1 rtl:space-x-reverse text-(--ui-text-dimmed)",
913
+ itemLabelBase: "text-(--ui-text-highlighted) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)",
914
+ itemLabelPrefix: "text-(--ui-text)",
915
+ itemLabelSuffix: "text-(--ui-text-dimmed) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)"
780
916
  },
781
917
  variants: {
918
+ active: {
919
+ true: {
920
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
921
+ itemLeadingIcon: "text-(--ui-text)"
922
+ },
923
+ false: {
924
+ item: ["text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
925
+ itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"]
926
+ }
927
+ },
782
928
  loading: {
783
929
  true: {
784
930
  itemLeadingIcon: "animate-spin"
@@ -788,25 +934,25 @@ const commandPalette = (options) => ({
788
934
  });
789
935
 
790
936
  const container = {
791
- base: "max-w-[var(--ui-container)] mx-auto px-4 sm:px-6 lg:px-8"
937
+ base: "max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"
792
938
  };
793
939
 
794
940
  const contextMenu = (options) => ({
795
941
  slots: {
796
- 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]",
942
+ content: "min-w-32 bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) divide-y divide-(--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]",
797
943
  group: "p-1 isolate",
798
- label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
799
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
944
+ label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
945
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
800
946
  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",
801
947
  itemLeadingIcon: "shrink-0",
802
948
  itemLeadingAvatar: "shrink-0",
803
949
  itemLeadingAvatarSize: "",
804
- itemTrailing: "ms-auto inline-flex",
950
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
805
951
  itemTrailingIcon: "shrink-0",
806
952
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
807
953
  itemTrailingKbdsSize: "",
808
954
  itemLabel: "truncate",
809
- itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
955
+ itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
810
956
  },
811
957
  variants: {
812
958
  color: {
@@ -815,12 +961,12 @@ const contextMenu = (options) => ({
815
961
  },
816
962
  active: {
817
963
  true: {
818
- item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
819
- itemLeadingIcon: "text-[var(--ui-text)]"
964
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
965
+ itemLeadingIcon: "text-(--ui-text)"
820
966
  },
821
967
  false: {
822
- 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"],
823
- 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"]
968
+ item: ["text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-[state=open]:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50 data-[state=open]:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
969
+ itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
824
970
  }
825
971
  },
826
972
  loading: {
@@ -880,15 +1026,15 @@ const contextMenu = (options) => ({
880
1026
  color,
881
1027
  active: false,
882
1028
  class: {
883
- item: `text-[var(--ui-${color})] data-highlighted:text-[var(--ui-${color})] data-highlighted:before:bg-[var(--ui-${color})]/10 data-[state=open]:before:bg-[var(--ui-${color})]/10`,
884
- itemLeadingIcon: `text-[var(--ui-${color})]/75 group-data-highlighted:text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
1029
+ item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
1030
+ itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
885
1031
  }
886
1032
  })), ...(options.theme.colors || []).map((color) => ({
887
1033
  color,
888
1034
  active: true,
889
1035
  class: {
890
- item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
891
- itemLeadingIcon: `text-[var(--ui-${color})]`
1036
+ item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
1037
+ itemLeadingIcon: `text-(--ui-${color})`
892
1038
  }
893
1039
  }))],
894
1040
  defaultVariants: {
@@ -898,68 +1044,121 @@ const contextMenu = (options) => ({
898
1044
 
899
1045
  const drawer = {
900
1046
  slots: {
901
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
902
- content: "fixed bg-[var(--ui-bg)] ring ring-[var(--ui-border)] flex focus:outline-none",
903
- handle: "shrink-0 rounded-full bg-[var(--ui-bg-accented)]",
1047
+ overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
1048
+ content: "fixed bg-(--ui-bg) ring ring-(--ui-border) flex focus:outline-none",
1049
+ handle: "shrink-0 rounded-full bg-(--ui-bg-accented)",
904
1050
  container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
905
1051
  header: "",
906
- title: "text-[var(--ui-text-highlighted)] font-semibold",
907
- description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1052
+ title: "text-(--ui-text-highlighted) font-semibold",
1053
+ description: "mt-1 text-(--ui-text-muted) text-sm",
908
1054
  body: "flex-1",
909
1055
  footer: "flex flex-col gap-1.5"
910
1056
  },
911
1057
  variants: {
912
1058
  direction: {
913
1059
  top: {
914
- content: "top-0 mb-24 flex-col-reverse rounded-b-[calc(var(--ui-radius)*2)]",
1060
+ content: "mb-24 flex-col-reverse",
915
1061
  handle: "mb-4"
916
1062
  },
917
1063
  right: {
918
- content: "right-4 flex-row",
1064
+ content: "flex-row",
919
1065
  handle: "ml-4"
920
1066
  },
921
1067
  bottom: {
922
- content: "bottom-0 mt-24 flex-col rounded-t-[calc(var(--ui-radius)*2)]",
1068
+ content: "mt-24 flex-col",
923
1069
  handle: "mt-4"
924
1070
  },
925
1071
  left: {
926
- content: "left-4 flex-row-reverse",
1072
+ content: "flex-row-reverse",
927
1073
  handle: "mr-4"
928
1074
  }
1075
+ },
1076
+ inset: {
1077
+ true: {
1078
+ content: "rounded-[calc(var(--ui-radius)*2)] after:hidden"
1079
+ }
929
1080
  }
930
1081
  },
931
1082
  compoundVariants: [{
932
1083
  direction: ["top", "bottom"],
933
1084
  class: {
934
- content: "inset-x-0 h-auto max-h-[96%]",
1085
+ content: "h-auto max-h-[96%]",
935
1086
  handle: "w-12 h-1.5 mx-auto"
936
1087
  }
937
1088
  }, {
938
1089
  direction: ["right", "left"],
939
1090
  class: {
940
- content: "inset-y-4 w-auto max-w-[calc(100%-2rem)] rounded-[calc(var(--ui-radius)*2)] after:hidden",
1091
+ content: "w-auto max-w-[calc(100%-2rem)]",
941
1092
  handle: "h-12 w-1.5 mt-auto mb-auto"
942
1093
  }
1094
+ }, {
1095
+ direction: "top",
1096
+ inset: true,
1097
+ class: {
1098
+ content: "inset-x-4 top-4"
1099
+ }
1100
+ }, {
1101
+ direction: "top",
1102
+ inset: false,
1103
+ class: {
1104
+ content: "inset-x-0 top-0 rounded-b-[calc(var(--ui-radius)*2)]"
1105
+ }
1106
+ }, {
1107
+ direction: "bottom",
1108
+ inset: true,
1109
+ class: {
1110
+ content: "inset-x-4 bottom-4"
1111
+ }
1112
+ }, {
1113
+ direction: "bottom",
1114
+ inset: false,
1115
+ class: {
1116
+ content: "inset-x-0 bottom-0 rounded-t-[calc(var(--ui-radius)*2)]"
1117
+ }
1118
+ }, {
1119
+ direction: "left",
1120
+ inset: true,
1121
+ class: {
1122
+ content: "inset-y-4 left-4"
1123
+ }
1124
+ }, {
1125
+ direction: "left",
1126
+ inset: false,
1127
+ class: {
1128
+ content: "inset-y-0 left-0 rounded-r-[calc(var(--ui-radius)*2)]"
1129
+ }
1130
+ }, {
1131
+ direction: "right",
1132
+ inset: true,
1133
+ class: {
1134
+ content: "inset-y-4 right-4"
1135
+ }
1136
+ }, {
1137
+ direction: "right",
1138
+ inset: false,
1139
+ class: {
1140
+ content: "inset-y-0 right-0 rounded-l-[calc(var(--ui-radius)*2)]"
1141
+ }
943
1142
  }]
944
1143
  };
945
1144
 
946
1145
  const dropdownMenu = (options) => ({
947
1146
  slots: {
948
- 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]",
949
- arrow: "fill-[var(--ui-border)]",
1147
+ content: "min-w-32 bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) divide-y divide-(--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]",
1148
+ arrow: "fill-(--ui-border)",
950
1149
  group: "p-1 isolate",
951
- label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
952
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1150
+ label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
1151
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
953
1152
  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",
954
1153
  itemLeadingIcon: "shrink-0",
955
1154
  itemLeadingAvatar: "shrink-0",
956
1155
  itemLeadingAvatarSize: "",
957
- itemTrailing: "ms-auto inline-flex",
1156
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
958
1157
  itemTrailingIcon: "shrink-0",
959
1158
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
960
1159
  itemTrailingKbdsSize: "",
961
1160
  itemLabel: "truncate",
962
- itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
1161
+ itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
963
1162
  },
964
1163
  variants: {
965
1164
  color: {
@@ -968,12 +1167,12 @@ const dropdownMenu = (options) => ({
968
1167
  },
969
1168
  active: {
970
1169
  true: {
971
- item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
972
- itemLeadingIcon: "text-[var(--ui-text)]"
1170
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
1171
+ itemLeadingIcon: "text-(--ui-text)"
973
1172
  },
974
1173
  false: {
975
- 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"],
976
- 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"]
1174
+ item: ["text-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-[state=open]:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50 data-[state=open]:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
1175
+ itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
977
1176
  }
978
1177
  },
979
1178
  loading: {
@@ -1033,15 +1232,15 @@ const dropdownMenu = (options) => ({
1033
1232
  color,
1034
1233
  active: false,
1035
1234
  class: {
1036
- item: `text-[var(--ui-${color})] data-highlighted:text-[var(--ui-${color})] data-highlighted:before:bg-[var(--ui-${color})]/10 data-[state=open]:before:bg-[var(--ui-${color})]/10`,
1037
- itemLeadingIcon: `text-[var(--ui-${color})]/75 group-data-highlighted:text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
1235
+ item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
1236
+ itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1038
1237
  }
1039
1238
  })), ...(options.theme.colors || []).map((color) => ({
1040
1239
  color,
1041
1240
  active: true,
1042
1241
  class: {
1043
- item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
1044
- itemLeadingIcon: `text-[var(--ui-${color})]`
1242
+ item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
1243
+ itemLeadingIcon: `text-(--ui-${color})`
1045
1244
  }
1046
1245
  }))],
1047
1246
  defaultVariants: {
@@ -1058,12 +1257,12 @@ const formField = {
1058
1257
  root: "",
1059
1258
  wrapper: "",
1060
1259
  labelWrapper: "flex content-center items-center justify-between",
1061
- label: "block font-medium text-[var(--ui-text)]",
1260
+ label: "block font-medium text-(--ui-text)",
1062
1261
  container: "mt-1 relative",
1063
- description: "text-[var(--ui-text-muted)]",
1064
- error: "mt-2 text-[var(--ui-error)]",
1065
- hint: "text-[var(--ui-text-muted)]",
1066
- help: "mt-2 text-[var(--ui-text-muted)]"
1262
+ description: "text-(--ui-text-muted)",
1263
+ error: "mt-2 text-(--ui-error)",
1264
+ hint: "text-(--ui-text-muted)",
1265
+ help: "mt-2 text-(--ui-text-muted)"
1067
1266
  },
1068
1267
  variants: {
1069
1268
  size: {
@@ -1075,7 +1274,7 @@ const formField = {
1075
1274
  },
1076
1275
  required: {
1077
1276
  true: {
1078
- label: `after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]`
1277
+ label: `after:content-['*'] after:ms-0.5 after:text-(--ui-error)`
1079
1278
  }
1080
1279
  }
1081
1280
  },
@@ -1087,13 +1286,13 @@ const formField = {
1087
1286
  const input = (options) => ({
1088
1287
  slots: {
1089
1288
  root: "relative inline-flex items-center",
1090
- 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"],
1289
+ base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
1091
1290
  leading: "absolute inset-y-0 start-0 flex items-center",
1092
- leadingIcon: "shrink-0 text-[var(--ui-text-dimmed)]",
1291
+ leadingIcon: "shrink-0 text-(--ui-text-dimmed)",
1093
1292
  leadingAvatar: "shrink-0",
1094
1293
  leadingAvatarSize: "",
1095
1294
  trailing: "absolute inset-y-0 end-0 flex items-center",
1096
- trailingIcon: "shrink-0 text-[var(--ui-text-dimmed)]"
1295
+ trailingIcon: "shrink-0 text-(--ui-text-dimmed)"
1097
1296
  },
1098
1297
  variants: {
1099
1298
  ...buttonGroupVariantWithRoot,
@@ -1140,11 +1339,11 @@ const input = (options) => ({
1140
1339
  }
1141
1340
  },
1142
1341
  variant: {
1143
- outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1144
- 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",
1145
- subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1146
- ghost: "text-[var(--ui-text-highlighted)] bg-transparent hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
1147
- none: "text-[var(--ui-text-highlighted)] bg-transparent"
1342
+ outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
1343
+ soft: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-(--ui-bg-elevated)/50",
1344
+ subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
1345
+ ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
1346
+ none: "text-(--ui-text-highlighted) bg-transparent"
1148
1347
  },
1149
1348
  color: {
1150
1349
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
@@ -1163,25 +1362,25 @@ const input = (options) => ({
1163
1362
  true: ""
1164
1363
  },
1165
1364
  type: {
1166
- file: "file:me-1.5 file:font-medium file:text-[var(--ui-text-muted)] file:outline-none"
1365
+ file: "file:me-1.5 file:font-medium file:text-(--ui-text-muted) file:outline-none"
1167
1366
  }
1168
1367
  },
1169
1368
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1170
1369
  color,
1171
1370
  variant: ["outline", "subtle"],
1172
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1371
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1173
1372
  })), ...(options.theme.colors || []).map((color) => ({
1174
1373
  color,
1175
1374
  highlight: true,
1176
- class: `ring ring-inset ring-[var(--ui-${color})]`
1375
+ class: `ring ring-inset ring-(--ui-${color})`
1177
1376
  })), {
1178
1377
  color: "neutral",
1179
1378
  variant: ["outline", "subtle"],
1180
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1379
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1181
1380
  }, {
1182
1381
  color: "neutral",
1183
1382
  highlight: true,
1184
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1383
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1185
1384
  }, {
1186
1385
  leading: true,
1187
1386
  size: "xs",
@@ -1248,15 +1447,15 @@ const inputMenu = (options) => {
1248
1447
  slots: {
1249
1448
  base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
1250
1449
  trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
1251
- arrow: "fill-[var(--ui-border)]",
1252
- 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]",
1253
- viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
1450
+ arrow: "fill-(--ui-border)",
1451
+ content: "max-h-60 w-(--reka-popper-anchor-width) bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
1452
+ viewport: "divide-y divide-(--ui-border) scroll-py-1",
1254
1453
  group: "p-1 isolate",
1255
- empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
1256
- label: "font-semibold text-[var(--ui-text-highlighted)]",
1257
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1258
- 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"],
1259
- itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
1454
+ empty: "py-2 text-center text-sm text-(--ui-text-muted)",
1455
+ label: "font-semibold text-(--ui-text-highlighted)",
1456
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
1457
+ 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-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
1458
+ itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
1260
1459
  itemLeadingAvatar: "shrink-0",
1261
1460
  itemLeadingAvatarSize: "",
1262
1461
  itemLeadingChip: "shrink-0",
@@ -1264,9 +1463,9 @@ const inputMenu = (options) => {
1264
1463
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
1265
1464
  itemTrailingIcon: "shrink-0",
1266
1465
  itemLabel: "truncate",
1267
- 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",
1466
+ tagsItem: "px-1.5 py-0.5 rounded-(--ui-radius) font-medium inline-flex items-center gap-0.5 ring ring-inset ring-(--ui-border-accented) bg-(--ui-bg-elevated) text-(--ui-text) data-disabled:cursor-not-allowed data-disabled:opacity-75",
1268
1467
  tagsItemText: "truncate",
1269
- 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"],
1468
+ tagsItemDelete: ["inline-flex items-center rounded-[calc(var(--ui-radius)/2)] text-(--ui-text-dimmed) hover:text-(--ui-text) hover:bg-(--ui-bg-accented)/75 disabled:pointer-events-none", options.theme.transitions && "transition-colors"],
1270
1469
  tagsItemDeleteIcon: "",
1271
1470
  tagsInput: ""
1272
1471
  },
@@ -1274,11 +1473,10 @@ const inputMenu = (options) => {
1274
1473
  multiple: {
1275
1474
  true: {
1276
1475
  root: "flex-wrap",
1277
- base: "",
1278
- tagsInput: "border-0 bg-transparent placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1476
+ tagsInput: "border-0 bg-transparent placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1279
1477
  },
1280
1478
  false: {
1281
- base: "w-full border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1479
+ base: "w-full border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1282
1480
  }
1283
1481
  },
1284
1482
  size: {
@@ -1343,12 +1541,12 @@ const inputMenu = (options) => {
1343
1541
  color,
1344
1542
  multiple: true,
1345
1543
  variant: ["outline", "subtle"],
1346
- class: `has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--${color})]`
1544
+ class: `has-focus-visible:ring-2 has-focus-visible:ring-(--ui-${color})`
1347
1545
  })), {
1348
1546
  color: "neutral",
1349
1547
  multiple: true,
1350
1548
  variant: ["outline", "subtle"],
1351
- class: "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--ui-border-inverted)]"
1549
+ class: "has-focus-visible:ring-2 has-focus-visible:ring-(--ui-border-inverted)"
1352
1550
  }]
1353
1551
  }, input(options));
1354
1552
  };
@@ -1358,7 +1556,7 @@ const inputNumber = (options) => {
1358
1556
  return {
1359
1557
  slots: {
1360
1558
  root: "relative inline-flex items-center",
1361
- 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"],
1559
+ base: ["w-full rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
1362
1560
  increment: "absolute flex items-center",
1363
1561
  decrement: "absolute flex items-center"
1364
1562
  },
@@ -1401,19 +1599,19 @@ const inputNumber = (options) => {
1401
1599
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1402
1600
  color,
1403
1601
  variant: ["outline", "subtle"],
1404
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1602
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1405
1603
  })), ...(options.theme.colors || []).map((color) => ({
1406
1604
  color,
1407
1605
  highlight: true,
1408
- class: `ring ring-inset ring-[var(--ui-${color})]`
1606
+ class: `ring ring-inset ring-(--ui-${color})`
1409
1607
  })), {
1410
1608
  color: "neutral",
1411
1609
  variant: ["outline", "subtle"],
1412
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1610
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1413
1611
  }, {
1414
1612
  color: "neutral",
1415
1613
  highlight: true,
1416
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1614
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1417
1615
  }, {
1418
1616
  orientation: "horizontal",
1419
1617
  size: "xs",
@@ -1464,12 +1662,12 @@ const inputNumber = (options) => {
1464
1662
  };
1465
1663
 
1466
1664
  const kbd = {
1467
- base: "inline-flex items-center justify-center px-1 rounded-[var(--ui-radius)] font-medium font-sans",
1665
+ base: "inline-flex items-center justify-center px-1 rounded-(--ui-radius) font-medium font-sans",
1468
1666
  variants: {
1469
1667
  variant: {
1470
- solid: "bg-[var(--ui-bg-inverted)] text-[var(--ui-bg)]",
1471
- outline: "bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] ring ring-inset ring-[var(--ui-border-accented)]",
1472
- subtle: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] ring ring-inset ring-[var(--ui-border-accented)]"
1668
+ solid: "bg-(--ui-bg-inverted) text-(--ui-bg)",
1669
+ outline: "bg-(--ui-bg) text-(--ui-text-highlighted) ring ring-inset ring-(--ui-border-accented)",
1670
+ subtle: "bg-(--ui-bg-elevated) text-(--ui-text) ring ring-inset ring-(--ui-border-accented)"
1473
1671
  },
1474
1672
  size: {
1475
1673
  sm: "h-4 min-w-[16px] text-[10px]",
@@ -1484,11 +1682,11 @@ const kbd = {
1484
1682
  };
1485
1683
 
1486
1684
  const link = (options) => ({
1487
- base: "focus-visible:outline-[var(--ui-primary)]",
1685
+ base: "focus-visible:outline-(--ui-primary)",
1488
1686
  variants: {
1489
1687
  active: {
1490
- true: "text-[var(--ui-primary)]",
1491
- false: ["text-[var(--ui-text-muted)] hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1688
+ true: "text-(--ui-primary)",
1689
+ false: ["text-(--ui-text-muted) hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1492
1690
  },
1493
1691
  disabled: {
1494
1692
  true: "cursor-not-allowed opacity-75"
@@ -1498,13 +1696,14 @@ const link = (options) => ({
1498
1696
 
1499
1697
  const modal = {
1500
1698
  slots: {
1501
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
1502
- content: "fixed w-full h-dvh bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] flex flex-col focus:outline-none",
1503
- header: "px-4 py-5 sm:px-6",
1504
- body: "flex-1 p-4 sm:p-6",
1699
+ overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
1700
+ content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) flex flex-col focus:outline-none",
1701
+ header: "flex items-center gap-1.5 p-4 sm:px-6 min-h-16",
1702
+ wrapper: "",
1703
+ body: "flex-1 overflow-y-auto p-4 sm:p-6",
1505
1704
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
1506
- title: "text-[var(--ui-text-highlighted)] font-semibold",
1507
- description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1705
+ title: "text-(--ui-text-highlighted) font-semibold",
1706
+ description: "mt-1 text-(--ui-text-muted) text-sm",
1508
1707
  close: "absolute top-4 end-4"
1509
1708
  },
1510
1709
  variants: {
@@ -1519,7 +1718,7 @@ const modal = {
1519
1718
  content: "inset-0"
1520
1719
  },
1521
1720
  false: {
1522
- 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)]"
1721
+ 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-[calc(var(--ui-radius)*2)] shadow-lg ring ring-(--ui-border)"
1523
1722
  }
1524
1723
  }
1525
1724
  }
@@ -1529,41 +1728,42 @@ const navigationMenu = (options) => ({
1529
1728
  slots: {
1530
1729
  root: "relative flex gap-1.5 [&>div]:min-w-0",
1531
1730
  list: "isolate min-w-0",
1731
+ label: "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-(--ui-text-highlighted) px-2.5 py-1.5",
1532
1732
  item: "min-w-0",
1533
1733
  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",
1534
1734
  linkLeadingIcon: "shrink-0 size-5",
1535
1735
  linkLeadingAvatar: "shrink-0",
1536
1736
  linkLeadingAvatarSize: "2xs",
1537
- linkTrailing: "ms-auto inline-flex",
1538
- linkTrailingBadge: "shrink-0 rounded-[calc(var(--ui-radius)]",
1737
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
1738
+ linkTrailingBadge: "shrink-0",
1539
1739
  linkTrailingBadgeSize: "sm",
1540
1740
  linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
1541
1741
  linkLabel: "truncate",
1542
- linkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1742
+ linkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
1543
1743
  childList: "",
1544
1744
  childItem: "",
1545
1745
  childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-start",
1546
1746
  childLinkWrapper: "flex flex-col items-start",
1547
1747
  childLinkIcon: "size-5 shrink-0",
1548
1748
  childLinkLabel: "font-semibold text-sm relative inline-flex",
1549
- childLinkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1550
- childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
1551
- separator: "px-2 h-px bg-[var(--ui-border)]",
1552
- viewportWrapper: "absolute top-full left-0 flex w-full justify-center",
1553
- 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 transition-[width,height] origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1554
- 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]",
1555
- 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",
1556
- 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)]"
1749
+ childLinkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
1750
+ childLinkDescription: "text-sm text-(--ui-text-muted)",
1751
+ separator: "px-2 h-px bg-(--ui-border)",
1752
+ viewportWrapper: "absolute top-full left-0 flex w-full",
1753
+ viewport: "relative overflow-hidden bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) h-(--reka-navigation-menu-viewport-height) w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
1754
+ content: "absolute top-0 left-0 w-full",
1755
+ indicator: "absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[1] w-(--reka-navigation-menu-indicator-size) translate-x-(--reka-navigation-menu-indicator-position) flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",
1756
+ arrow: "relative top-[50%] size-2.5 rotate-45 border border-(--ui-border) bg-(--ui-bg) z-[1] rounded-[calc(var(--ui-radius)/2)]"
1557
1757
  },
1558
1758
  variants: {
1559
1759
  color: {
1560
1760
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1561
- link: `focus-visible:before:ring-[var(--ui-${color})]`,
1562
- childLink: `focus-visible:outline-[var(--ui-${color})]`
1761
+ link: `focus-visible:before:ring-(--ui-${color})`,
1762
+ childLink: `focus-visible:outline-(--ui-${color})`
1563
1763
  }])),
1564
1764
  neutral: {
1565
- link: "focus-visible:before:ring-[var(--ui-border-inverted)]",
1566
- childLink: "focus-visible:outline-[var(--ui-border-inverted)]"
1765
+ link: "focus-visible:before:ring-(--ui-border-inverted)",
1766
+ childLink: "focus-visible:outline-(--ui-border-inverted)"
1567
1767
  }
1568
1768
  },
1569
1769
  highlightColor: {
@@ -1576,29 +1776,38 @@ const navigationMenu = (options) => ({
1576
1776
  },
1577
1777
  orientation: {
1578
1778
  horizontal: {
1579
- root: "w-full items-center justify-between",
1779
+ root: "items-center justify-between",
1580
1780
  list: "flex items-center",
1581
1781
  item: "py-2",
1582
1782
  link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
1583
- childList: "grid grid-cols-2 gap-2 p-2"
1783
+ childList: "grid p-2"
1584
1784
  },
1585
1785
  vertical: {
1586
1786
  root: "flex-col",
1587
- link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
1588
- childList: "ms-5 border-s border-[var(--ui-border)]",
1589
- childItem: "ps-1.5 -ms-px"
1787
+ link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
1788
+ }
1789
+ },
1790
+ contentOrientation: {
1791
+ horizontal: {
1792
+ viewport: "",
1793
+ viewportWrapper: "justify-center",
1794
+ content: "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]"
1795
+ },
1796
+ vertical: {
1797
+ viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
1798
+ content: ""
1590
1799
  }
1591
1800
  },
1592
1801
  active: {
1593
1802
  true: {
1594
- childLink: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text-highlighted)]",
1595
- childLinkIcon: "text-[var(--ui-text)]"
1803
+ childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
1804
+ childLinkIcon: "text-(--ui-text)"
1596
1805
  },
1597
1806
  false: {
1598
- link: "text-[var(--ui-text-muted)]",
1599
- linkLeadingIcon: "text-[var(--ui-text-dimmed)]",
1600
- childLink: ["hover:bg-[var(--ui-bg-elevated)]/50 text-[var(--ui-text)] hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1601
- childLinkIcon: ["text-[var(--ui-text-dimmed)] group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1807
+ link: "text-(--ui-text-muted)",
1808
+ linkLeadingIcon: "text-(--ui-text-dimmed)",
1809
+ childLink: ["hover:bg-(--ui-bg-elevated)/50 text-(--ui-text) hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
1810
+ childLinkIcon: ["text-(--ui-text-dimmed) group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1602
1811
  }
1603
1812
  },
1604
1813
  disabled: {
@@ -1608,29 +1817,56 @@ const navigationMenu = (options) => ({
1608
1817
  },
1609
1818
  highlight: {
1610
1819
  true: ""
1820
+ },
1821
+ level: {
1822
+ true: ""
1823
+ },
1824
+ collapsed: {
1825
+ true: ""
1611
1826
  }
1612
1827
  },
1613
1828
  compoundVariants: [{
1614
- highlight: true,
1615
1829
  orientation: "horizontal",
1830
+ contentOrientation: "horizontal",
1831
+ class: {
1832
+ childList: "grid-cols-2 gap-2"
1833
+ }
1834
+ }, {
1835
+ orientation: "horizontal",
1836
+ contentOrientation: "vertical",
1616
1837
  class: {
1617
- item: "-mb-px",
1618
- link: "after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full"
1838
+ childList: "gap-1",
1839
+ content: "w-60"
1619
1840
  }
1620
1841
  }, {
1842
+ orientation: "horizontal",
1621
1843
  highlight: true,
1844
+ class: {
1845
+ link: ["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full", options.theme.transitions && "after:transition-colors"]
1846
+ }
1847
+ }, {
1622
1848
  orientation: "vertical",
1849
+ highlight: true,
1850
+ level: true,
1851
+ class: {
1852
+ link: ["after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full", options.theme.transitions && "after:transition-colors"]
1853
+ }
1854
+ }, {
1855
+ disabled: false,
1856
+ active: false,
1857
+ variant: "pill",
1623
1858
  class: {
1624
- item: "px-1.5 -ms-px",
1625
- link: "after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full"
1859
+ link: ["hover:text-(--ui-text-highlighted) hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
1860
+ linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1626
1861
  }
1627
1862
  }, {
1628
1863
  disabled: false,
1629
1864
  active: false,
1630
1865
  variant: "pill",
1866
+ orientation: "horizontal",
1631
1867
  class: {
1632
- 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"],
1633
- linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1868
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
1869
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
1634
1870
  }
1635
1871
  }, {
1636
1872
  disabled: false,
@@ -1638,7 +1874,7 @@ const navigationMenu = (options) => ({
1638
1874
  highlight: true,
1639
1875
  orientation: "horizontal",
1640
1876
  class: {
1641
- link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1877
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
1642
1878
  }
1643
1879
  }, {
1644
1880
  disabled: false,
@@ -1647,75 +1883,99 @@ const navigationMenu = (options) => ({
1647
1883
  active: false,
1648
1884
  orientation: "horizontal",
1649
1885
  class: {
1650
- link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1886
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
1651
1887
  }
1652
1888
  }, ...(options.theme.colors || []).map((color) => ({
1653
1889
  color,
1654
1890
  variant: "pill",
1655
1891
  active: true,
1656
1892
  class: {
1657
- link: `text-[var(--ui-${color})]`,
1658
- linkLeadingIcon: `text-[var(--ui-${color})]`
1893
+ link: `text-(--ui-${color})`,
1894
+ linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1659
1895
  }
1660
1896
  })), {
1661
1897
  color: "neutral",
1662
1898
  variant: "pill",
1663
1899
  active: true,
1664
1900
  class: {
1665
- link: "text-[var(--ui-text-highlighted)]",
1666
- linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
1901
+ link: "text-(--ui-text-highlighted)",
1902
+ linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
1667
1903
  }
1668
1904
  }, {
1669
1905
  variant: "pill",
1670
1906
  active: true,
1671
1907
  highlight: false,
1672
1908
  class: {
1673
- link: "before:bg-[var(--ui-bg-elevated)]"
1909
+ link: "before:bg-(--ui-bg-elevated)"
1674
1910
  }
1675
1911
  }, {
1676
1912
  variant: "pill",
1677
1913
  active: true,
1678
1914
  highlight: true,
1679
1915
  class: {
1680
- link: ["hover:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "before:transition-colors"]
1916
+ link: ["hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "before:transition-colors"]
1917
+ }
1918
+ }, {
1919
+ disabled: false,
1920
+ active: false,
1921
+ variant: "link",
1922
+ class: {
1923
+ link: ["hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
1924
+ linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1681
1925
  }
1682
1926
  }, {
1683
1927
  disabled: false,
1684
1928
  active: false,
1685
1929
  variant: "link",
1930
+ orientation: "horizontal",
1686
1931
  class: {
1687
- link: ["hover:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1688
- linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1932
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
1933
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
1689
1934
  }
1690
1935
  }, ...(options.theme.colors || []).map((color) => ({
1691
1936
  color,
1692
1937
  variant: "link",
1693
1938
  active: true,
1694
1939
  class: {
1695
- link: `text-[var(--ui-${color})]`,
1696
- linkLeadingIcon: `text-[var(--ui-${color})]`
1940
+ link: `text-(--ui-${color})`,
1941
+ linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1697
1942
  }
1698
1943
  })), {
1699
1944
  color: "neutral",
1700
1945
  variant: "link",
1701
1946
  active: true,
1702
1947
  class: {
1703
- link: "text-[var(--ui-text-highlighted)]",
1704
- linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
1948
+ link: "text-(--ui-text-highlighted)",
1949
+ linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
1705
1950
  }
1706
1951
  }, ...(options.theme.colors || []).map((highlightColor) => ({
1707
1952
  highlightColor,
1708
1953
  highlight: true,
1954
+ level: true,
1709
1955
  active: true,
1710
1956
  class: {
1711
- link: `after:bg-[var(--ui-${highlightColor})]`
1957
+ link: `after:bg-(--ui-${highlightColor})`
1712
1958
  }
1713
1959
  })), {
1714
1960
  highlightColor: "neutral",
1715
1961
  highlight: true,
1962
+ level: true,
1716
1963
  active: true,
1717
1964
  class: {
1718
- link: "after:bg-[var(--ui-bg-inverted)]"
1965
+ link: "after:bg-(--ui-bg-inverted)"
1966
+ }
1967
+ }, {
1968
+ orientation: "vertical",
1969
+ collapsed: false,
1970
+ class: {
1971
+ childList: "ms-5 border-s border-(--ui-border)",
1972
+ childItem: "ps-1.5 -ms-px"
1973
+ }
1974
+ }, {
1975
+ orientation: "vertical",
1976
+ collapsed: true,
1977
+ class: {
1978
+ link: "px-1.5"
1719
1979
  }
1720
1980
  }],
1721
1981
  defaultVariants: {
@@ -1737,7 +1997,7 @@ const pagination = {
1737
1997
  const pinInput = (options) => ({
1738
1998
  slots: {
1739
1999
  root: "relative inline-flex items-center gap-1.5",
1740
- base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-[var(--ui-text-dimmed)] text-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"]
2000
+ base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-(--ui-text-dimmed) text-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"]
1741
2001
  },
1742
2002
  variants: {
1743
2003
  size: {
@@ -1758,11 +2018,11 @@ const pinInput = (options) => ({
1758
2018
  }
1759
2019
  },
1760
2020
  variant: {
1761
- outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1762
- 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",
1763
- subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1764
- ghost: "text-[var(--ui-text-highlighted)] bg-transparent hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
1765
- none: "text-[var(--ui-text-highlighted)] bg-transparent"
2021
+ outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
2022
+ soft: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-(--ui-bg-elevated)/50",
2023
+ subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
2024
+ ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
2025
+ none: "text-(--ui-text-highlighted) bg-transparent"
1766
2026
  },
1767
2027
  color: {
1768
2028
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
@@ -1775,19 +2035,19 @@ const pinInput = (options) => ({
1775
2035
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1776
2036
  color,
1777
2037
  variant: ["outline", "subtle"],
1778
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
2038
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1779
2039
  })), ...(options.theme.colors || []).map((color) => ({
1780
2040
  color,
1781
2041
  highlight: true,
1782
- class: `ring ring-inset ring-[var(--ui-${color})]`
2042
+ class: `ring ring-inset ring-(--ui-${color})`
1783
2043
  })), {
1784
2044
  color: "neutral",
1785
2045
  variant: ["outline", "subtle"],
1786
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
2046
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1787
2047
  }, {
1788
2048
  color: "neutral",
1789
2049
  highlight: true,
1790
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
2050
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1791
2051
  }],
1792
2052
  defaultVariants: {
1793
2053
  size: "md",
@@ -1798,17 +2058,17 @@ const pinInput = (options) => ({
1798
2058
 
1799
2059
  const popover = {
1800
2060
  slots: {
1801
- 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",
1802
- arrow: "fill-[var(--ui-border)]"
2061
+ content: "bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none pointer-events-auto",
2062
+ arrow: "fill-(--ui-border)"
1803
2063
  }
1804
2064
  };
1805
2065
 
1806
2066
  const progress = (options) => ({
1807
2067
  slots: {
1808
2068
  root: "gap-2",
1809
- base: "relative overflow-hidden rounded-full bg-[var(--ui-bg-accented)]",
2069
+ base: "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
1810
2070
  indicator: "rounded-full size-full transition-transform duration-200 ease-out",
1811
- status: "flex justify-end text-[var(--ui-text-dimmed)] transition-[width] duration-200",
2071
+ status: "flex justify-end text-(--ui-text-dimmed) transition-[width] duration-200",
1812
2072
  steps: "grid items-end",
1813
2073
  step: "truncate text-end row-start-1 col-start-1 transition-opacity"
1814
2074
  },
@@ -1821,12 +2081,12 @@ const progress = (options) => ({
1821
2081
  },
1822
2082
  color: {
1823
2083
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1824
- indicator: `bg-[var(--ui-${color})]`,
1825
- steps: `text-[var(--ui-${color})]`
2084
+ indicator: `bg-(--ui-${color})`,
2085
+ steps: `text-(--ui-${color})`
1826
2086
  }])),
1827
2087
  neutral: {
1828
- indicator: "bg-[var(--ui-bg-inverted)]",
1829
- steps: "text-[var(--ui-bg)]"
2088
+ indicator: "bg-(--ui-bg-inverted)",
2089
+ steps: "text-(--ui-bg)"
1830
2090
  }
1831
2091
  },
1832
2092
  size: {
@@ -1864,7 +2124,7 @@ const progress = (options) => ({
1864
2124
  step: "opacity-100"
1865
2125
  },
1866
2126
  first: {
1867
- step: "opacity-100 text-[var(--ui-text-muted)]"
2127
+ step: "opacity-100 text-(--ui-text-muted)"
1868
2128
  },
1869
2129
  other: {
1870
2130
  step: "opacity-0"
@@ -1965,7 +2225,7 @@ const progress = (options) => ({
1965
2225
  orientation: "horizontal",
1966
2226
  animation: "carousel",
1967
2227
  class: {
1968
- indicator: "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite]"
2228
+ indicator: "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_ease-in-out_infinite]"
1969
2229
  }
1970
2230
  }, {
1971
2231
  orientation: "vertical",
@@ -1977,7 +2237,7 @@ const progress = (options) => ({
1977
2237
  orientation: "horizontal",
1978
2238
  animation: "carousel-inverse",
1979
2239
  class: {
1980
- indicator: "data-[state=indeterminate]:animate-[carousel-inverse_2s_ease-in-out_infinite]"
2240
+ indicator: "data-[state=indeterminate]:animate-[carousel-inverse_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"
1981
2241
  }
1982
2242
  }, {
1983
2243
  orientation: "vertical",
@@ -2021,24 +2281,24 @@ const radioGroup = (options) => ({
2021
2281
  slots: {
2022
2282
  root: "relative",
2023
2283
  fieldset: "flex",
2024
- legend: "mb-1 block font-medium text-[var(--ui-text)]",
2284
+ legend: "mb-1 block font-medium text-(--ui-text)",
2025
2285
  item: "flex items-start",
2026
- 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)]",
2027
- indicator: "flex items-center justify-center size-full rounded-full after:bg-[var(--ui-bg)] after:rounded-full",
2286
+ base: "rounded-full ring ring-inset ring-(--ui-border-accented) focus-visible:outline-2 focus-visible:outline-offset-2",
2287
+ indicator: "flex items-center justify-center size-full rounded-full after:bg-(--ui-bg) after:rounded-full",
2028
2288
  container: "flex items-center",
2029
2289
  wrapper: "ms-2",
2030
- label: "block font-medium text-[var(--ui-text)]",
2031
- description: "text-[var(--ui-text-muted)]"
2290
+ label: "block font-medium text-(--ui-text)",
2291
+ description: "text-(--ui-text-muted)"
2032
2292
  },
2033
2293
  variants: {
2034
2294
  color: {
2035
2295
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2036
- base: `focus-visible:outline-[var(--ui-${color})]`,
2037
- indicator: `bg-[var(--ui-${color})]`
2296
+ base: `focus-visible:outline-(--ui-${color})`,
2297
+ indicator: `bg-(--ui-${color})`
2038
2298
  }])),
2039
2299
  neutral: {
2040
- base: "focus-visible:outline-[var(--ui-border-inverted)]",
2041
- indicator: "bg-[var(--ui-bg-inverted)]"
2300
+ base: "focus-visible:outline-(--ui-border-inverted)",
2301
+ indicator: "bg-(--ui-bg-inverted)"
2042
2302
  }
2043
2303
  },
2044
2304
  orientation: {
@@ -2100,7 +2360,7 @@ const radioGroup = (options) => ({
2100
2360
  },
2101
2361
  required: {
2102
2362
  true: {
2103
- legend: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2363
+ legend: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
2104
2364
  }
2105
2365
  }
2106
2366
  },
@@ -2113,18 +2373,19 @@ const radioGroup = (options) => ({
2113
2373
  const select = (options) => {
2114
2374
  return defuFn({
2115
2375
  slots: {
2116
- root: () => void 0,
2376
+ root: () => undefined,
2117
2377
  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"],
2118
- value: "truncate group-data-placeholder:text-[var(--ui-text-dimmed)]",
2119
- arrow: "fill-[var(--ui-border)]",
2120
- 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]",
2121
- viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
2378
+ value: "truncate pointer-events-none",
2379
+ placeholder: "truncate text-(--ui-text-dimmed)",
2380
+ arrow: "fill-(--ui-border)",
2381
+ content: "max-h-60 w-(--reka-popper-anchor-width) bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-(--ui-border) overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
2382
+ viewport: "divide-y divide-(--ui-border) scroll-py-1",
2122
2383
  group: "p-1 isolate",
2123
- empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
2124
- label: "font-semibold text-[var(--ui-text-highlighted)]",
2125
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
2126
- 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"],
2127
- itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
2384
+ empty: "py-2 text-center text-sm text-(--ui-text-muted)",
2385
+ label: "font-semibold text-(--ui-text-highlighted)",
2386
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
2387
+ 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-(--ui-text) data-highlighted:text-(--ui-text-highlighted) data-highlighted:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
2388
+ itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
2128
2389
  itemLeadingAvatar: "shrink-0",
2129
2390
  itemLeadingAvatarSize: "",
2130
2391
  itemLeadingChip: "shrink-0",
@@ -2189,9 +2450,8 @@ const select = (options) => {
2189
2450
  const selectMenu = (options) => {
2190
2451
  return defu({
2191
2452
  slots: {
2192
- value: "truncate",
2193
- placeholder: "truncate text-[var(--ui-text-dimmed)]",
2194
- input: "border-b border-[var(--ui-border)]"
2453
+ input: "border-b border-(--ui-border)",
2454
+ focusScope: "flex flex-col min-h-0"
2195
2455
  }
2196
2456
  }, select(options));
2197
2457
  };
@@ -2200,7 +2460,7 @@ const separator = (options) => ({
2200
2460
  slots: {
2201
2461
  root: "flex items-center align-center text-center",
2202
2462
  border: "",
2203
- container: "font-medium text-[var(--ui-text)] flex",
2463
+ container: "font-medium text-(--ui-text) flex",
2204
2464
  icon: "shrink-0 size-5",
2205
2465
  avatar: "shrink-0",
2206
2466
  avatarSize: "2xs",
@@ -2208,8 +2468,8 @@ const separator = (options) => ({
2208
2468
  },
2209
2469
  variants: {
2210
2470
  color: {
2211
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[var(--ui-${color})]` }])),
2212
- neutral: { border: "border-[var(--ui-border)]" }
2471
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-(--ui-${color})` }])),
2472
+ neutral: { border: "border-(--ui-border)" }
2213
2473
  },
2214
2474
  orientation: {
2215
2475
  horizontal: {
@@ -2291,18 +2551,19 @@ const separator = (options) => ({
2291
2551
  });
2292
2552
 
2293
2553
  const skeleton = {
2294
- base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-[var(--ui-bg-elevated)]"
2554
+ base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-(--ui-bg-elevated)"
2295
2555
  };
2296
2556
 
2297
2557
  const slideover = {
2298
2558
  slots: {
2299
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
2300
- 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",
2301
- header: "px-4 py-5 sm:px-6",
2559
+ overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
2560
+ content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) sm:ring ring-(--ui-border) sm:shadow-lg flex flex-col focus:outline-none",
2561
+ header: "flex items-center gap-1.5 p-4 sm:px-6 min-h-16",
2562
+ wrapper: "",
2302
2563
  body: "flex-1 overflow-y-auto p-4 sm:p-6",
2303
2564
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
2304
- title: "text-[var(--ui-text-highlighted)] font-semibold",
2305
- description: "mt-1 text-[var(--ui-text-muted)] text-sm",
2565
+ title: "text-(--ui-text-highlighted) font-semibold",
2566
+ description: "mt-1 text-(--ui-text-muted) text-sm",
2306
2567
  close: "absolute top-4 end-4"
2307
2568
  },
2308
2569
  variants: {
@@ -2356,19 +2617,19 @@ const slideover = {
2356
2617
  const slider = (options) => ({
2357
2618
  slots: {
2358
2619
  root: "relative flex items-center select-none touch-none",
2359
- track: "relative bg-[var(--ui-bg-accented)] overflow-hidden rounded-full grow",
2620
+ track: "relative bg-(--ui-bg-accented) overflow-hidden rounded-full grow",
2360
2621
  range: "absolute rounded-full",
2361
- thumb: "rounded-full bg-[var(--ui-bg)] ring-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2"
2622
+ thumb: "rounded-full bg-(--ui-bg) ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
2362
2623
  },
2363
2624
  variants: {
2364
2625
  color: {
2365
2626
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2366
- range: `bg-[var(--ui-${color})]`,
2367
- thumb: `ring-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]`
2627
+ range: `bg-(--ui-${color})`,
2628
+ thumb: `ring-(--ui-${color}) focus-visible:outline-(--ui-${color})/50`
2368
2629
  }])),
2369
2630
  neutral: {
2370
- range: "bg-[var(--ui-bg-inverted)]",
2371
- thumb: "ring-[var(--ui-border-inverted)] focus-visible:outline-[var(--ui-border-inverted)]/50"
2631
+ range: "bg-(--ui-bg-inverted)",
2632
+ thumb: "ring-(--ui-border-inverted) focus-visible:outline-(--ui-border-inverted)/50"
2372
2633
  }
2373
2634
  },
2374
2635
  size: {
@@ -2471,26 +2732,150 @@ const slider = (options) => ({
2471
2732
  }
2472
2733
  });
2473
2734
 
2735
+ const stepper = (options) => ({
2736
+ slots: {
2737
+ root: "flex gap-4",
2738
+ header: "flex",
2739
+ item: "group text-center relative w-full",
2740
+ container: "relative",
2741
+ trigger: "rounded-full font-medium text-center align-middle flex items-center justify-center font-semibold group-data-[state=completed]:text-(--ui-bg) group-data-[state=active]:text-(--ui-bg) text-(--ui-text-muted) bg-(--ui-bg-elevated) focus-visible:outline-2 focus-visible:outline-offset-2",
2742
+ indicator: "flex items-center justify-center size-full",
2743
+ icon: "shrink-0",
2744
+ separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-(--ui-border-accented)",
2745
+ wrapper: "",
2746
+ title: "font-medium text-(--ui-text)",
2747
+ description: "text-(--ui-text-muted) text-wrap",
2748
+ content: "size-full"
2749
+ },
2750
+ variants: {
2751
+ orientation: {
2752
+ horizontal: {
2753
+ root: "flex-col",
2754
+ container: "flex justify-center",
2755
+ separator: "top-[calc(50%-2px)] h-0.5",
2756
+ wrapper: "mt-1"
2757
+ },
2758
+ vertical: {
2759
+ header: "flex-col gap-4",
2760
+ item: "flex text-start",
2761
+ separator: "start-[calc(50%-1px)] -bottom-[10px] w-0.5"
2762
+ }
2763
+ },
2764
+ size: {
2765
+ xs: {
2766
+ trigger: "size-6 text-xs",
2767
+ icon: "size-3",
2768
+ title: "text-xs",
2769
+ description: "text-xs",
2770
+ wrapper: "mt-1.5"
2771
+ },
2772
+ sm: {
2773
+ trigger: "size-8 text-sm",
2774
+ icon: "size-4",
2775
+ title: "text-xs",
2776
+ description: "text-xs",
2777
+ wrapper: "mt-2"
2778
+ },
2779
+ md: {
2780
+ trigger: "size-10 text-base",
2781
+ icon: "size-5",
2782
+ title: "text-sm",
2783
+ description: "text-sm",
2784
+ wrapper: "mt-2.5"
2785
+ },
2786
+ lg: {
2787
+ trigger: "size-12 text-lg",
2788
+ icon: "size-6",
2789
+ title: "text-base",
2790
+ description: "text-base",
2791
+ wrapper: "mt-3"
2792
+ },
2793
+ xl: {
2794
+ trigger: "size-14 text-xl",
2795
+ icon: "size-7",
2796
+ title: "text-lg",
2797
+ description: "text-lg",
2798
+ wrapper: "mt-3.5"
2799
+ }
2800
+ },
2801
+ color: {
2802
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2803
+ trigger: `group-data-[state=completed]:bg-(--ui-${color}) group-data-[state=active]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
2804
+ separator: `group-data-[state=completed]:bg-(--ui-${color})`
2805
+ }])),
2806
+ neutral: {
2807
+ trigger: `group-data-[state=completed]:bg-(--ui-bg-inverted) group-data-[state=active]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)`,
2808
+ separator: `group-data-[state=completed]:bg-(--ui-bg-inverted)`
2809
+ }
2810
+ }
2811
+ },
2812
+ compoundVariants: [{
2813
+ orientation: "horizontal",
2814
+ size: "xs",
2815
+ class: { separator: "start-[calc(50%+16px)] end-[calc(-50%+16px)]" }
2816
+ }, {
2817
+ orientation: "horizontal",
2818
+ size: "sm",
2819
+ class: { separator: "start-[calc(50%+20px)] end-[calc(-50%+20px)]" }
2820
+ }, {
2821
+ orientation: "horizontal",
2822
+ size: "md",
2823
+ class: { separator: "start-[calc(50%+28px)] end-[calc(-50%+28px)]" }
2824
+ }, {
2825
+ orientation: "horizontal",
2826
+ size: "lg",
2827
+ class: { separator: "start-[calc(50%+32px)] end-[calc(-50%+32px)]" }
2828
+ }, {
2829
+ orientation: "horizontal",
2830
+ size: "xl",
2831
+ class: { separator: "start-[calc(50%+36px)] end-[calc(-50%+36px)]" }
2832
+ }, {
2833
+ orientation: "vertical",
2834
+ size: "xs",
2835
+ class: { separator: "top-[30px]", item: "gap-1.5" }
2836
+ }, {
2837
+ orientation: "vertical",
2838
+ size: "sm",
2839
+ class: { separator: "top-[38px]", item: "gap-2" }
2840
+ }, {
2841
+ orientation: "vertical",
2842
+ size: "md",
2843
+ class: { separator: "top-[46px]", item: "gap-2.5" }
2844
+ }, {
2845
+ orientation: "vertical",
2846
+ size: "lg",
2847
+ class: { separator: "top-[54px]", item: "gap-3" }
2848
+ }, {
2849
+ orientation: "vertical",
2850
+ size: "xl",
2851
+ class: { separator: "top-[62px]", item: "gap-3.5" }
2852
+ }],
2853
+ defaultVariants: {
2854
+ size: "md",
2855
+ color: "primary"
2856
+ }
2857
+ });
2858
+
2474
2859
  const _switch = (options) => ({
2475
2860
  slots: {
2476
2861
  root: "relative flex items-start",
2477
- 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"],
2862
+ base: ["inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 data-[state=unchecked]:bg-(--ui-bg-accented)", options.theme.transitions && "transition-colors duration-200"],
2478
2863
  container: "flex items-center",
2479
- 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 data-[state=unchecked]:rtl:-translate-x-0 flex items-center justify-center",
2480
- 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"],
2864
+ thumb: "group pointer-events-none rounded-full bg-(--ui-bg) shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 data-[state=unchecked]:rtl:-translate-x-0 flex items-center justify-center",
2865
+ icon: ["absolute shrink-0 group-data-[state=unchecked]:text-(--ui-text-dimmed) opacity-0 size-10/12", options.theme.transitions && "transition-[color,opacity] duration-200"],
2481
2866
  wrapper: "ms-2",
2482
- label: "block font-medium text-[var(--ui-text)]",
2483
- description: "text-[var(--ui-text-muted)]"
2867
+ label: "block font-medium text-(--ui-text)",
2868
+ description: "text-(--ui-text-muted)"
2484
2869
  },
2485
2870
  variants: {
2486
2871
  color: {
2487
2872
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2488
- base: `data-[state=checked]:bg-[var(--ui-${color})] focus-visible:ring-[var(--ui-${color})]`,
2489
- icon: `group-data-[state=checked]:text-[var(--ui-${color})]`
2873
+ base: `data-[state=checked]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
2874
+ icon: `group-data-[state=checked]:text-(--ui-${color})`
2490
2875
  }])),
2491
2876
  neutral: {
2492
- base: "data-[state=checked]:bg-[var(--ui-bg-inverted)] focus-visible:ring-[var(--ui-border-inverted)]",
2493
- icon: "group-data-[state=checked]:text-[var(--ui-text-highlighted)]"
2877
+ base: "data-[state=checked]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)",
2878
+ icon: "group-data-[state=checked]:text-(--ui-text-highlighted)"
2494
2879
  }
2495
2880
  },
2496
2881
  size: {
@@ -2542,7 +2927,7 @@ const _switch = (options) => ({
2542
2927
  },
2543
2928
  required: {
2544
2929
  true: {
2545
- label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2930
+ label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
2546
2931
  }
2547
2932
  },
2548
2933
  disabled: {
@@ -2564,23 +2949,23 @@ const table = (options) => ({
2564
2949
  root: "relative overflow-auto",
2565
2950
  base: "min-w-full overflow-clip",
2566
2951
  caption: "sr-only",
2567
- 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)]",
2568
- tbody: "divide-y divide-[var(--ui-border)]",
2569
- tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
2570
- th: "px-4 py-3.5 text-sm text-[var(--ui-text-highlighted)] text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
2571
- td: "p-4 text-sm text-[var(--ui-text-muted)] whitespace-nowrap [&:has([role=checkbox])]:pe-0",
2572
- empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]"
2952
+ thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
2953
+ tbody: "divide-y divide-(--ui-border) [&>tr]:data-[selectable=true]:hover:bg-(--ui-bg-elevated)/50 [&>tr]:data-[selectable=true]:focus-visible:outline-(--ui-primary)",
2954
+ tr: "data-[selected=true]:bg-(--ui-bg-elevated)/50",
2955
+ th: "px-4 py-3.5 text-sm text-(--ui-text-highlighted) text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
2956
+ td: "p-4 text-sm text-(--ui-text-muted) whitespace-nowrap [&:has([role=checkbox])]:pe-0",
2957
+ empty: "py-6 text-center text-sm text-(--ui-text-muted)"
2573
2958
  },
2574
2959
  variants: {
2575
2960
  pinned: {
2576
2961
  true: {
2577
- th: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2578
- td: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
2962
+ th: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2963
+ td: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
2579
2964
  }
2580
2965
  },
2581
2966
  sticky: {
2582
2967
  true: {
2583
- thead: "sticky top-0 inset-x-0 bg-[var(--ui-bg)]/75 z-[1] backdrop-blur"
2968
+ thead: "sticky top-0 inset-x-0 bg-(--ui-bg)/75 z-[1] backdrop-blur"
2584
2969
  }
2585
2970
  },
2586
2971
  loading: {
@@ -2603,25 +2988,25 @@ const table = (options) => ({
2603
2988
  loading: true,
2604
2989
  loadingColor,
2605
2990
  class: {
2606
- thead: `after:bg-[var(--ui-${loadingColor})]`
2991
+ thead: `after:bg-(--ui-${loadingColor})`
2607
2992
  }
2608
2993
  })), {
2609
2994
  loading: true,
2610
2995
  loadingColor: "neutral",
2611
2996
  class: {
2612
- thead: "after:bg-[var(--ui-bg-inverted)]"
2997
+ thead: "after:bg-(--ui-bg-inverted)"
2613
2998
  }
2614
2999
  }, {
2615
3000
  loading: true,
2616
3001
  loadingAnimation: "carousel",
2617
3002
  class: {
2618
- thead: "after:animate-[carousel_2s_ease-in-out_infinite]"
3003
+ thead: "after:animate-[carousel_2s_ease-in-out_infinite] rtl:after:animate-[carousel-rtl_2s_ease-in-out_infinite]"
2619
3004
  }
2620
3005
  }, {
2621
3006
  loading: true,
2622
3007
  loadingAnimation: "carousel-inverse",
2623
3008
  class: {
2624
- thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite]"
3009
+ thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite] rtl:after:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"
2625
3010
  }
2626
3011
  }, {
2627
3012
  loading: true,
@@ -2647,7 +3032,7 @@ const tabs = (options) => ({
2647
3032
  root: "flex items-center gap-2",
2648
3033
  list: "relative flex p-1 group",
2649
3034
  indicator: "absolute transition-[translate,width] duration-200",
2650
- 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"],
3035
+ trigger: ["group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-(--ui-text-muted) hover:data-[state=inactive]:not-disabled:text-(--ui-text) font-medium rounded-[calc(var(--ui-radius)*1.5)] disabled:cursor-not-allowed disabled:opacity-75 focus:outline-hidden", options.theme.transitions && "transition-colors"],
2651
3036
  content: "focus:outline-none w-full",
2652
3037
  leadingIcon: "shrink-0",
2653
3038
  leadingAvatar: "shrink-0",
@@ -2661,12 +3046,12 @@ const tabs = (options) => ({
2661
3046
  },
2662
3047
  variant: {
2663
3048
  pill: {
2664
- list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
3049
+ list: "bg-(--ui-bg-elevated) rounded-[calc(var(--ui-radius)*2)]",
2665
3050
  trigger: "flex-1 w-full",
2666
3051
  indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
2667
3052
  },
2668
3053
  link: {
2669
- list: "border-[var(--ui-border)]",
3054
+ list: "border-(--ui-border)",
2670
3055
  indicator: "rounded-full"
2671
3056
  }
2672
3057
  },
@@ -2674,12 +3059,12 @@ const tabs = (options) => ({
2674
3059
  horizontal: {
2675
3060
  root: "flex-col",
2676
3061
  list: "w-full",
2677
- indicator: "left-0 w-[var(--radix-tabs-indicator-size)] translate-x-[var(--radix-tabs-indicator-position)]",
3062
+ indicator: "left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",
2678
3063
  trigger: "justify-center"
2679
3064
  },
2680
3065
  vertical: {
2681
3066
  list: "flex-col",
2682
- indicator: "top-0 h-[var(--radix-tabs-indicator-size)] translate-y-[var(--radix-tabs-indicator-position)]"
3067
+ indicator: "top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"
2683
3068
  }
2684
3069
  },
2685
3070
  size: {
@@ -2741,29 +3126,29 @@ const tabs = (options) => ({
2741
3126
  color,
2742
3127
  variant: "pill",
2743
3128
  class: {
2744
- indicator: `bg-[var(--ui-${color})]`,
2745
- trigger: `data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
3129
+ indicator: `bg-(--ui-${color})`,
3130
+ trigger: `data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-${color})`
2746
3131
  }
2747
3132
  })), {
2748
3133
  color: "neutral",
2749
3134
  variant: "pill",
2750
3135
  class: {
2751
- indicator: "bg-[var(--ui-bg-inverted)]",
2752
- trigger: "data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
3136
+ indicator: "bg-(--ui-bg-inverted)",
3137
+ trigger: "data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-border-inverted)"
2753
3138
  }
2754
3139
  }, ...(options.theme.colors || []).map((color) => ({
2755
3140
  color,
2756
3141
  variant: "link",
2757
3142
  class: {
2758
- indicator: `bg-[var(--ui-${color})]`,
2759
- trigger: `data-[state=active]:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
3143
+ indicator: `bg-(--ui-${color})`,
3144
+ trigger: `data-[state=active]:text-(--ui-${color}) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
2760
3145
  }
2761
3146
  })), {
2762
3147
  color: "neutral",
2763
3148
  variant: "link",
2764
3149
  class: {
2765
- indicator: "bg-[var(--ui-bg-inverted)]",
2766
- trigger: "data-[state=active]:text-[var(--ui-text-highlighted)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
3150
+ indicator: "bg-(--ui-bg-inverted)",
3151
+ trigger: "data-[state=active]:text-(--ui-text-highlighted) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
2767
3152
  }
2768
3153
  }],
2769
3154
  defaultVariants: {
@@ -2779,38 +3164,43 @@ const textarea = (options) => {
2779
3164
 
2780
3165
  const toast = (options) => ({
2781
3166
  slots: {
2782
- 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",
2783
- wrapper: "w-0 flex-1 flex flex-col gap-1",
2784
- title: "text-sm font-medium text-[var(--ui-text-highlighted)]",
2785
- description: "text-sm text-[var(--ui-text-muted)]",
3167
+ root: "relative group overflow-hidden bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*2)] ring ring-(--ui-border) p-4 flex gap-2.5 focus:outline-none",
3168
+ wrapper: "w-0 flex-1 flex flex-col",
3169
+ title: "text-sm font-medium text-(--ui-text-highlighted)",
3170
+ description: "text-sm text-(--ui-text-muted)",
2786
3171
  icon: "shrink-0 size-5",
2787
3172
  avatar: "shrink-0",
2788
3173
  avatarSize: "2xl",
2789
3174
  actions: "flex gap-1.5 shrink-0",
2790
3175
  progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
2791
- close: "p-0.5"
3176
+ close: "p-0"
2792
3177
  },
2793
3178
  variants: {
2794
3179
  color: {
2795
3180
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2796
- root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`,
2797
- icon: `text-[var(--ui-${color})]`,
2798
- progress: `bg-[var(--ui-${color})]`
3181
+ root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`,
3182
+ icon: `text-(--ui-${color})`,
3183
+ progress: `bg-(--ui-${color})`
2799
3184
  }])),
2800
3185
  neutral: {
2801
- root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]",
2802
- icon: "text-[var(--ui-text-highlighted)]",
2803
- progress: "bg-[var(--ui-bg-inverted)]"
3186
+ root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)",
3187
+ icon: "text-(--ui-text-highlighted)",
3188
+ progress: "bg-(--ui-bg-inverted)"
2804
3189
  }
2805
3190
  },
2806
- multiline: {
2807
- true: {
2808
- root: "items-start",
2809
- actions: "items-start mt-1"
2810
- },
2811
- false: {
3191
+ orientation: {
3192
+ horizontal: {
2812
3193
  root: "items-center",
2813
3194
  actions: "items-center"
3195
+ },
3196
+ vertical: {
3197
+ root: "items-start",
3198
+ actions: "items-start mt-2.5"
3199
+ }
3200
+ },
3201
+ title: {
3202
+ true: {
3203
+ description: "mt-1"
2814
3204
  }
2815
3205
  }
2816
3206
  },
@@ -2821,8 +3211,8 @@ const toast = (options) => ({
2821
3211
 
2822
3212
  const toaster = {
2823
3213
  slots: {
2824
- viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
2825
- base: "pointer-events-auto 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"
3214
+ viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
3215
+ 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"
2826
3216
  },
2827
3217
  variants: {
2828
3218
  position: {
@@ -2866,10 +3256,10 @@ const toaster = {
2866
3256
  }
2867
3257
  }, {
2868
3258
  swipeDirection: ["left", "right"],
2869
- 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"
3259
+ class: "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=end]:translate-x-(--reka-toast-swipe-end-x) data-[swipe=cancel]:translate-x-0"
2870
3260
  }, {
2871
3261
  swipeDirection: ["up", "down"],
2872
- 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"
3262
+ class: "data-[swipe=move]:translate-y-(--reka-toast-swipe-move-y) data-[swipe=end]:translate-y-(--reka-toast-swipe-end-y) data-[swipe=cancel]:translate-y-0"
2873
3263
  }],
2874
3264
  defaultVariants: {
2875
3265
  position: "bottom-right"
@@ -2878,14 +3268,95 @@ const toaster = {
2878
3268
 
2879
3269
  const tooltip = {
2880
3270
  slots: {
2881
- content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow-sm 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]",
2882
- arrow: "fill-[var(--ui-border)]",
3271
+ content: "flex items-center gap-1 bg-(--ui-bg) text-(--ui-text-highlighted) shadow-sm rounded-(--ui-radius) ring ring-(--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] pointer-events-auto",
3272
+ arrow: "fill-(--ui-border)",
2883
3273
  text: "truncate",
2884
3274
  kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
2885
3275
  kbdsSize: "sm"
2886
3276
  }
2887
3277
  };
2888
3278
 
3279
+ const tree = (options) => ({
3280
+ slots: {
3281
+ root: "relative isolate",
3282
+ item: "",
3283
+ listWithChildren: "ms-4.5 border-s border-(--ui-border)",
3284
+ itemWithChildren: "ps-1.5 -ms-px",
3285
+ link: "relative group w-full flex items-center text-sm before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-[calc(var(--ui-radius)*1.5)] focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
3286
+ linkLeadingIcon: "shrink-0",
3287
+ linkLabel: "truncate",
3288
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
3289
+ linkTrailingIcon: "shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"
3290
+ },
3291
+ variants: {
3292
+ color: {
3293
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
3294
+ link: `focus-visible:before:ring-(--ui-${color})`
3295
+ }])),
3296
+ neutral: {
3297
+ link: "focus-visible:before:ring-(--ui-border-inverted)"
3298
+ }
3299
+ },
3300
+ size: {
3301
+ xs: {
3302
+ link: "px-2 py-1 text-xs gap-1",
3303
+ linkLeadingIcon: "size-4",
3304
+ linkTrailingIcon: "size-4"
3305
+ },
3306
+ sm: {
3307
+ link: "px-2.5 py-1.5 text-xs gap-1.5",
3308
+ linkLeadingIcon: "size-4",
3309
+ linkTrailingIcon: "size-4"
3310
+ },
3311
+ md: {
3312
+ link: "px-2.5 py-1.5 text-sm gap-1.5",
3313
+ linkLeadingIcon: "size-5",
3314
+ linkTrailingIcon: "size-5"
3315
+ },
3316
+ lg: {
3317
+ link: "px-3 py-2 text-sm gap-2",
3318
+ linkLeadingIcon: "size-5",
3319
+ linkTrailingIcon: "size-5"
3320
+ },
3321
+ xl: {
3322
+ link: "px-3 py-2 text-base gap-2",
3323
+ linkLeadingIcon: "size-6",
3324
+ linkTrailingIcon: "size-6"
3325
+ }
3326
+ },
3327
+ selected: {
3328
+ true: {
3329
+ link: "before:bg-(--ui-bg-elevated)"
3330
+ },
3331
+ false: {
3332
+ link: ["hover:not-disabled:text-(--ui-text-highlighted) hover:not-disabled:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"]
3333
+ }
3334
+ },
3335
+ disabled: {
3336
+ true: {
3337
+ link: "cursor-not-allowed opacity-75"
3338
+ }
3339
+ }
3340
+ },
3341
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
3342
+ color,
3343
+ selected: true,
3344
+ class: {
3345
+ link: `text-(--ui-${color})`
3346
+ }
3347
+ })), {
3348
+ color: "neutral",
3349
+ selected: true,
3350
+ class: {
3351
+ link: "text-(--ui-text-highlighted)"
3352
+ }
3353
+ }],
3354
+ defaultVariants: {
3355
+ color: "primary",
3356
+ size: "md"
3357
+ }
3358
+ });
3359
+
2889
3360
  const theme = {
2890
3361
  __proto__: null,
2891
3362
  accordion: accordion,
@@ -2896,11 +3367,13 @@ const theme = {
2896
3367
  breadcrumb: breadcrumb,
2897
3368
  button: button,
2898
3369
  buttonGroup: buttonGroup,
3370
+ calendar: calendar,
2899
3371
  card: card,
2900
3372
  carousel: carousel,
2901
3373
  checkbox: checkbox,
2902
3374
  chip: chip,
2903
3375
  collapsible: collapsible,
3376
+ colorPicker: colorPicker,
2904
3377
  commandPalette: commandPalette,
2905
3378
  container: container,
2906
3379
  contextMenu: contextMenu,
@@ -2926,21 +3399,17 @@ const theme = {
2926
3399
  skeleton: skeleton,
2927
3400
  slideover: slideover,
2928
3401
  slider: slider,
3402
+ stepper: stepper,
2929
3403
  switch: _switch,
2930
3404
  table: table,
2931
3405
  tabs: tabs,
2932
3406
  textarea: textarea,
2933
3407
  toast: toast,
2934
3408
  toaster: toaster,
2935
- tooltip: tooltip
3409
+ tooltip: tooltip,
3410
+ tree: tree
2936
3411
  };
2937
3412
 
2938
- function buildTemplates(options) {
2939
- return Object.entries(theme).reduce((acc, [key, component]) => {
2940
- acc[key] = typeof component === "function" ? component(options) : component;
2941
- return acc;
2942
- }, {});
2943
- }
2944
3413
  function getTemplates(options, uiConfig) {
2945
3414
  const templates = [];
2946
3415
  for (const component in theme) {
@@ -2950,19 +3419,52 @@ function getTemplates(options, uiConfig) {
2950
3419
  getContents: async () => {
2951
3420
  const template = theme[component];
2952
3421
  const result = typeof template === "function" ? template(options) : template;
2953
- const variants = Object.keys(result.variants || {});
3422
+ const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
3423
+ const keys = Object.keys(values);
3424
+ return keys.some((key) => key !== "true" && key !== "false");
3425
+ }).map(([key]) => key);
2954
3426
  let json = JSON.stringify(result, null, 2);
2955
3427
  for (const variant of variants) {
2956
- json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), "$1 as const");
3428
+ json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
2957
3429
  json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
2958
- const replaced = match.replace(/("[^"]+")/g, "$1 as const");
3430
+ const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
2959
3431
  return `${before}${replaced}${after}`;
2960
3432
  });
2961
3433
  }
2962
- return `export default ${json}`;
3434
+ function generateVariantDeclarations(variants2) {
3435
+ return variants2.map((variant) => {
3436
+ const keys = Object.keys(result.variants[variant]);
3437
+ return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
3438
+ });
3439
+ }
3440
+ return [
3441
+ ...generateVariantDeclarations(variants),
3442
+ `export default ${json}`
3443
+ ].join("\n\n");
2963
3444
  }
2964
3445
  });
2965
3446
  }
3447
+ templates.push({
3448
+ filename: "ui.css",
3449
+ write: true,
3450
+ getContents: () => `@source "./ui";
3451
+
3452
+ @theme default static {
3453
+ --color-old-neutral-50: ${colors.neutral[50]};
3454
+ --color-old-neutral-100: ${colors.neutral[100]};
3455
+ --color-old-neutral-200: ${colors.neutral[200]};
3456
+ --color-old-neutral-300: ${colors.neutral[300]};
3457
+ --color-old-neutral-400: ${colors.neutral[400]};
3458
+ --color-old-neutral-500: ${colors.neutral[500]};
3459
+ --color-old-neutral-600: ${colors.neutral[600]};
3460
+ --color-old-neutral-700: ${colors.neutral[700]};
3461
+ --color-old-neutral-800: ${colors.neutral[800]};
3462
+ --color-old-neutral-900: ${colors.neutral[900]};
3463
+ --color-old-neutral-950: ${colors.neutral[950]};
3464
+ ${[...options.theme?.colors || [], "neutral"].map((color) => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((shade) => `--color-${color}-${shade}: var(--ui-color-${color}-${shade});`).join("\n ")).join("\n ")}
3465
+ }
3466
+ `
3467
+ });
2966
3468
  templates.push({
2967
3469
  filename: "ui/index.ts",
2968
3470
  write: true,
@@ -2971,13 +3473,14 @@ function getTemplates(options, uiConfig) {
2971
3473
  templates.push({
2972
3474
  filename: "types/ui.d.ts",
2973
3475
  getContents: () => `import * as ui from '#build/ui'
2974
- import type { DeepPartial } from '#ui/types/utils'
3476
+ import type { DeepPartial } from '@nuxt/ui'
3477
+ import type { defaultConfig } from 'tailwind-variants'
2975
3478
  import colors from 'tailwindcss/colors'
2976
3479
 
2977
3480
  const icons = ${JSON.stringify(uiConfig.icons)};
2978
3481
 
2979
- type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
2980
- type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor>
3482
+ type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | (string & {})
3483
+ type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
2981
3484
 
2982
3485
  type AppConfigUI = {
2983
3486
  colors?: {
@@ -2985,6 +3488,7 @@ type AppConfigUI = {
2985
3488
  neutral?: NeutralColor
2986
3489
  }
2987
3490
  icons?: Partial<typeof icons>
3491
+ tv?: typeof defaultConfig
2988
3492
  } & DeepPartial<typeof ui>
2989
3493
 
2990
3494
  declare module '@nuxt/schema' {
@@ -3020,4 +3524,4 @@ function addTemplates(options, nuxt, resolve) {
3020
3524
  });
3021
3525
  }
3022
3526
 
3023
- export { getDefaultUiConfig as a, addTemplates as b, buildTemplates as c, defaultOptions as d, getTemplates as g, resolveColors as r };
3527
+ export { getDefaultUiConfig as a, addTemplates as b, defaultOptions as d, getTemplates as g, resolveColors as r };