@nuxt/ui 3.0.0-alpha.8 → 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 (310) 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 +9 -7
  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 +7 -1
  22. package/.nuxt/ui/input-menu.ts +150 -116
  23. package/.nuxt/ui/input-number.ts +235 -0
  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 +171 -0
  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 +127 -96
  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 +49 -31
  42. package/.nuxt/ui/tabs.ts +101 -73
  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 +69 -18
  50. package/cli/commands/{init.mjs → make/component.mjs} +16 -4
  51. package/cli/commands/make/index.mjs +14 -0
  52. package/cli/commands/make/locale.mjs +64 -0
  53. package/cli/index.mjs +2 -2
  54. package/cli/package.json +2 -2
  55. package/cli/templates.mjs +62 -12
  56. package/cli/utils.mjs +14 -0
  57. package/dist/module.cjs +9 -170
  58. package/dist/module.d.cts +5 -15
  59. package/dist/module.d.mts +5 -15
  60. package/dist/module.d.ts +5 -15
  61. package/dist/module.json +2 -2
  62. package/dist/module.mjs +12 -167
  63. package/dist/runtime/components/Accordion.vue +8 -39
  64. package/dist/runtime/components/Alert.vue +25 -21
  65. package/dist/runtime/components/App.vue +15 -15
  66. package/dist/runtime/components/Avatar.vue +33 -21
  67. package/dist/runtime/components/AvatarGroup.vue +5 -7
  68. package/dist/runtime/components/Badge.vue +10 -8
  69. package/dist/runtime/components/Breadcrumb.vue +13 -34
  70. package/dist/runtime/components/Button.vue +5 -8
  71. package/dist/runtime/components/ButtonGroup.vue +5 -7
  72. package/dist/runtime/components/Calendar.vue +194 -0
  73. package/dist/runtime/components/Card.vue +10 -9
  74. package/dist/runtime/components/Carousel.vue +26 -17
  75. package/dist/runtime/components/Checkbox.vue +32 -38
  76. package/dist/runtime/components/Chip.vue +6 -8
  77. package/dist/runtime/components/Collapsible.vue +10 -11
  78. package/dist/runtime/components/ColorPicker.vue +297 -0
  79. package/dist/runtime/components/CommandPalette.vue +114 -98
  80. package/dist/runtime/components/Container.vue +4 -7
  81. package/dist/runtime/components/ContextMenu.vue +16 -69
  82. package/dist/runtime/components/ContextMenuContent.vue +14 -10
  83. package/dist/runtime/components/Drawer.vue +23 -12
  84. package/dist/runtime/components/DropdownMenu.vue +18 -59
  85. package/dist/runtime/components/DropdownMenuContent.vue +14 -10
  86. package/dist/runtime/components/Form.vue +78 -49
  87. package/dist/runtime/components/FormField.vue +28 -15
  88. package/dist/runtime/components/Icon.vue +1 -1
  89. package/dist/runtime/components/Input.vue +15 -7
  90. package/dist/runtime/components/InputMenu.vue +133 -66
  91. package/dist/runtime/components/InputNumber.vue +197 -0
  92. package/dist/runtime/components/Kbd.vue +5 -6
  93. package/dist/runtime/components/Link.vue +24 -13
  94. package/dist/runtime/components/LinkBase.vue +1 -1
  95. package/dist/runtime/components/Modal.vue +56 -34
  96. package/dist/runtime/components/NavigationMenu.vue +129 -112
  97. package/dist/runtime/components/OverlayProvider.vue +28 -0
  98. package/dist/runtime/components/Pagination.vue +18 -14
  99. package/dist/runtime/components/PinInput.vue +95 -0
  100. package/dist/runtime/components/Popover.vue +28 -14
  101. package/dist/runtime/components/Progress.vue +28 -12
  102. package/dist/runtime/components/RadioGroup.vue +9 -12
  103. package/dist/runtime/components/Select.vue +61 -35
  104. package/dist/runtime/components/SelectMenu.vue +201 -130
  105. package/dist/runtime/components/Separator.vue +6 -5
  106. package/dist/runtime/components/Skeleton.vue +4 -7
  107. package/dist/runtime/components/Slideover.vue +56 -33
  108. package/dist/runtime/components/Slider.vue +8 -7
  109. package/dist/runtime/components/Stepper.vue +170 -0
  110. package/dist/runtime/components/Switch.vue +19 -23
  111. package/dist/runtime/components/Table.vue +157 -32
  112. package/dist/runtime/components/Tabs.vue +12 -31
  113. package/dist/runtime/components/Textarea.vue +18 -9
  114. package/dist/runtime/components/Toast.vue +39 -25
  115. package/dist/runtime/components/Toaster.vue +31 -24
  116. package/dist/runtime/components/Tooltip.vue +9 -12
  117. package/dist/runtime/components/Tree.vue +196 -0
  118. package/dist/runtime/composables/defineLocale.d.ts +9 -0
  119. package/dist/runtime/composables/defineLocale.js +4 -0
  120. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  121. package/dist/runtime/composables/defineShortcuts.js +2 -2
  122. package/dist/runtime/composables/useFormField.d.ts +11 -4
  123. package/dist/runtime/composables/useFormField.js +19 -9
  124. package/dist/runtime/composables/useLocale.d.ts +4 -0
  125. package/dist/runtime/composables/useLocale.js +10 -0
  126. package/dist/runtime/composables/useOverlay.d.ts +30 -0
  127. package/dist/runtime/composables/useOverlay.js +70 -0
  128. package/dist/runtime/composables/useToast.d.ts +4 -3
  129. package/dist/runtime/composables/useToast.js +20 -6
  130. package/dist/runtime/index.css +1 -1
  131. package/dist/runtime/keyframes.css +1 -1
  132. package/dist/runtime/locale/ar.d.ts +2 -0
  133. package/dist/runtime/locale/ar.js +55 -0
  134. package/dist/runtime/locale/az.d.ts +2 -0
  135. package/dist/runtime/locale/az.js +54 -0
  136. package/dist/runtime/locale/bn.d.ts +2 -0
  137. package/dist/runtime/locale/bn.js +54 -0
  138. package/dist/runtime/locale/cs.d.ts +2 -0
  139. package/dist/runtime/locale/cs.js +54 -0
  140. package/dist/runtime/locale/da.d.ts +2 -0
  141. package/dist/runtime/locale/da.js +54 -0
  142. package/dist/runtime/locale/de.d.ts +2 -0
  143. package/dist/runtime/locale/de.js +54 -0
  144. package/dist/runtime/locale/el.d.ts +2 -0
  145. package/dist/runtime/locale/el.js +54 -0
  146. package/dist/runtime/locale/en.d.ts +2 -0
  147. package/dist/runtime/locale/en.js +54 -0
  148. package/dist/runtime/locale/es.d.ts +2 -0
  149. package/dist/runtime/locale/es.js +54 -0
  150. package/dist/runtime/locale/et.d.ts +2 -0
  151. package/dist/runtime/locale/et.js +54 -0
  152. package/dist/runtime/locale/fa_ir.d.ts +2 -0
  153. package/dist/runtime/locale/fa_ir.js +55 -0
  154. package/dist/runtime/locale/fi.d.ts +2 -0
  155. package/dist/runtime/locale/fi.js +54 -0
  156. package/dist/runtime/locale/fr.d.ts +2 -0
  157. package/dist/runtime/locale/fr.js +54 -0
  158. package/dist/runtime/locale/he.d.ts +2 -0
  159. package/dist/runtime/locale/he.js +53 -0
  160. package/dist/runtime/locale/hi.d.ts +2 -0
  161. package/dist/runtime/locale/hi.js +54 -0
  162. package/dist/runtime/locale/hu.d.ts +2 -0
  163. package/dist/runtime/locale/hu.js +54 -0
  164. package/dist/runtime/locale/id.d.ts +2 -0
  165. package/dist/runtime/locale/id.js +54 -0
  166. package/dist/runtime/locale/index.d.ts +34 -0
  167. package/dist/runtime/locale/index.js +34 -0
  168. package/dist/runtime/locale/it.d.ts +2 -0
  169. package/dist/runtime/locale/it.js +54 -0
  170. package/dist/runtime/locale/ja.d.ts +2 -0
  171. package/dist/runtime/locale/ja.js +54 -0
  172. package/dist/runtime/locale/km.d.ts +2 -0
  173. package/dist/runtime/locale/km.js +54 -0
  174. package/dist/runtime/locale/ko.d.ts +2 -0
  175. package/dist/runtime/locale/ko.js +54 -0
  176. package/dist/runtime/locale/nb_no.d.ts +2 -0
  177. package/dist/runtime/locale/nb_no.js +54 -0
  178. package/dist/runtime/locale/nl.d.ts +2 -0
  179. package/dist/runtime/locale/nl.js +54 -0
  180. package/dist/runtime/locale/pl.d.ts +2 -0
  181. package/dist/runtime/locale/pl.js +54 -0
  182. package/dist/runtime/locale/pt.d.ts +2 -0
  183. package/dist/runtime/locale/pt.js +54 -0
  184. package/dist/runtime/locale/pt_br.d.ts +2 -0
  185. package/dist/runtime/locale/pt_br.js +54 -0
  186. package/dist/runtime/locale/ru.d.ts +2 -0
  187. package/dist/runtime/locale/ru.js +54 -0
  188. package/dist/runtime/locale/sk.d.ts +2 -0
  189. package/dist/runtime/locale/sk.js +54 -0
  190. package/dist/runtime/locale/sv.d.ts +2 -0
  191. package/dist/runtime/locale/sv.js +54 -0
  192. package/dist/runtime/locale/th.d.ts +2 -0
  193. package/dist/runtime/locale/th.js +54 -0
  194. package/dist/runtime/locale/tr.d.ts +2 -0
  195. package/dist/runtime/locale/tr.js +54 -0
  196. package/dist/runtime/locale/uk.d.ts +2 -0
  197. package/dist/runtime/locale/uk.js +54 -0
  198. package/dist/runtime/locale/vi.d.ts +2 -0
  199. package/dist/runtime/locale/vi.js +54 -0
  200. package/dist/runtime/locale/zh_cn.d.ts +2 -0
  201. package/dist/runtime/locale/zh_cn.js +54 -0
  202. package/dist/runtime/locale/zh_tw.d.ts +2 -0
  203. package/dist/runtime/locale/zh_tw.js +54 -0
  204. package/dist/runtime/plugins/colors.js +8 -5
  205. package/dist/runtime/types/form.d.ts +29 -15
  206. package/dist/runtime/types/form.js +2 -2
  207. package/dist/runtime/types/index.d.ts +8 -0
  208. package/dist/runtime/types/index.js +8 -0
  209. package/dist/runtime/types/locale.d.ts +56 -0
  210. package/dist/runtime/types/locale.js +0 -0
  211. package/dist/runtime/types/utils.d.ts +7 -3
  212. package/dist/runtime/utils/form.d.ts +5 -9
  213. package/dist/runtime/utils/form.js +113 -50
  214. package/dist/runtime/utils/index.d.ts +1 -1
  215. package/dist/runtime/utils/index.js +15 -2
  216. package/dist/runtime/utils/link.d.ts +1 -1
  217. package/dist/runtime/utils/locale.d.ts +15 -0
  218. package/dist/runtime/utils/locale.js +25 -0
  219. package/dist/runtime/utils/tv.d.ts +1 -0
  220. package/dist/runtime/utils/tv.js +4 -0
  221. package/dist/runtime/vue/components/Icon.vue +2 -2
  222. package/dist/runtime/vue/components/Link.vue +87 -23
  223. package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
  224. package/dist/runtime/vue/composables/useAppConfig.js +2 -0
  225. package/dist/runtime/vue/plugins/head.d.ts +1 -1
  226. package/dist/runtime/vue/plugins/head.js +3 -3
  227. package/dist/runtime/vue/stubs.d.ts +19 -0
  228. package/dist/runtime/vue/stubs.js +37 -0
  229. package/dist/shared/{ui.BufKhDiD.mjs → ui.DSPu6Y8j.mjs} +1071 -409
  230. package/dist/shared/{ui.BU7wzH0D.cjs → ui.DfK2RX6G.cjs} +1074 -409
  231. package/dist/unplugin.cjs +62 -26
  232. package/dist/unplugin.d.cts +17 -3
  233. package/dist/unplugin.d.mts +17 -3
  234. package/dist/unplugin.d.ts +17 -3
  235. package/dist/unplugin.mjs +61 -25
  236. package/dist/vite.cjs +3 -2
  237. package/dist/vite.d.cts +2 -0
  238. package/dist/vite.d.mts +2 -0
  239. package/dist/vite.d.ts +2 -0
  240. package/dist/vite.mjs +3 -2
  241. package/package.json +110 -67
  242. package/dist/chunks/component-meta.cjs +0 -73264
  243. package/dist/chunks/component-meta.mjs +0 -73262
  244. package/dist/client/devtools/200.html +0 -1
  245. package/dist/client/devtools/404.html +0 -1
  246. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
  247. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
  248. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
  249. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
  250. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
  251. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
  252. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
  253. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
  254. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
  255. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
  256. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
  257. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
  258. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
  259. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
  260. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
  261. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
  262. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
  263. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
  264. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
  265. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
  266. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
  267. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
  268. package/dist/client/devtools/_nuxt/Bj9hdafK.js +0 -1
  269. package/dist/client/devtools/_nuxt/DM3_wAgz.js +0 -62
  270. package/dist/client/devtools/_nuxt/builds/latest.json +0 -1
  271. package/dist/client/devtools/_nuxt/builds/meta/e6b425f7-b919-4014-915b-0ea07c316790.json +0 -1
  272. package/dist/client/devtools/_nuxt/entry.DaJP-ZMB.css +0 -24
  273. package/dist/client/devtools/_nuxt/error-404.B0Nmv3fV.css +0 -1
  274. package/dist/client/devtools/_nuxt/error-500.C8fgTxVz.css +0 -1
  275. package/dist/client/devtools/_nuxt/hKiujHsR.js +0 -1
  276. package/dist/client/devtools/favicon.svg +0 -1
  277. package/dist/client/devtools/index.html +0 -1
  278. package/dist/devtools/runtime/DevtoolsRenderer.vue +0 -53
  279. package/dist/devtools/runtime/examples/AvatarGroupExample.vue +0 -7
  280. package/dist/devtools/runtime/examples/ButtonGroupExample.vue +0 -8
  281. package/dist/devtools/runtime/examples/CardExample.vue +0 -13
  282. package/dist/devtools/runtime/examples/CarouselExample.vue +0 -13
  283. package/dist/devtools/runtime/examples/ChipExample.vue +0 -5
  284. package/dist/devtools/runtime/examples/CollapsibleExample.vue +0 -8
  285. package/dist/devtools/runtime/examples/CommandPaletteExample.vue +0 -29
  286. package/dist/devtools/runtime/examples/ContainerExample.vue +0 -5
  287. package/dist/devtools/runtime/examples/ContextMenuExample.vue +0 -5
  288. package/dist/devtools/runtime/examples/DrawerExample.vue +0 -8
  289. package/dist/devtools/runtime/examples/DropdownMenuExample.vue +0 -5
  290. package/dist/devtools/runtime/examples/FormExample.vue +0 -30
  291. package/dist/devtools/runtime/examples/FormFieldExample.vue +0 -5
  292. package/dist/devtools/runtime/examples/LinkExample.vue +0 -5
  293. package/dist/devtools/runtime/examples/ModalExample.vue +0 -8
  294. package/dist/devtools/runtime/examples/PopoverExample.vue +0 -8
  295. package/dist/devtools/runtime/examples/SkeletonExample.vue +0 -3
  296. package/dist/devtools/runtime/examples/SlideoverExample.vue +0 -8
  297. package/dist/devtools/runtime/examples/ToasterExample.vue +0 -11
  298. package/dist/devtools/runtime/examples/TooltipExample.vue +0 -5
  299. package/dist/runtime/components/ModalProvider.vue +0 -12
  300. package/dist/runtime/components/SlideoverProvider.vue +0 -12
  301. package/dist/runtime/composables/extendDevtoolsMeta.d.ts +0 -7
  302. package/dist/runtime/composables/extendDevtoolsMeta.js +0 -2
  303. package/dist/runtime/composables/useModal.d.ts +0 -17
  304. package/dist/runtime/composables/useModal.js +0 -46
  305. package/dist/runtime/composables/useSlideover.d.ts +0 -17
  306. package/dist/runtime/composables/useSlideover.js +0 -46
  307. package/dist/runtime/plugins/modal.d.ts +0 -2
  308. package/dist/runtime/plugins/modal.js +0 -10
  309. package/dist/runtime/plugins/slideover.d.ts +0 -2
  310. package/dist/runtime/plugins/slideover.js +0 -10
@@ -5,21 +5,30 @@ require('node:url');
5
5
  const scule = require('scule');
6
6
  const kit = require('@nuxt/kit');
7
7
  const defu = require('defu');
8
+ const colors = require('tailwindcss/colors');
9
+
10
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
11
+
12
+ const colors__default = /*#__PURE__*/_interopDefaultCompat(colors);
8
13
 
9
14
  const icons = {
15
+ arrowLeft: "i-lucide-arrow-left",
16
+ arrowRight: "i-lucide-arrow-right",
17
+ check: "i-lucide-check",
10
18
  chevronDoubleLeft: "i-lucide-chevrons-left",
11
19
  chevronDoubleRight: "i-lucide-chevrons-right",
12
20
  chevronDown: "i-lucide-chevron-down",
13
21
  chevronLeft: "i-lucide-chevron-left",
14
22
  chevronRight: "i-lucide-chevron-right",
15
- arrowLeft: "i-lucide-arrow-left",
16
- arrowRight: "i-lucide-arrow-right",
17
- check: "i-lucide-check",
23
+ chevronUp: "i-lucide-chevron-up",
18
24
  close: "i-lucide-x",
19
25
  ellipsis: "i-lucide-ellipsis",
20
26
  external: "i-lucide-arrow-up-right",
21
- loading: "i-lucide-refresh-ccw",
27
+ folder: "i-lucide-folder",
28
+ folderOpen: "i-lucide-folder-open",
29
+ loading: "i-lucide-refresh-cw",
22
30
  minus: "i-lucide-minus",
31
+ plus: "i-lucide-plus",
23
32
  search: "i-lucide-search"
24
33
  };
25
34
 
@@ -40,11 +49,8 @@ const defaultOptions = {
40
49
  fonts: true,
41
50
  colorMode: true,
42
51
  theme: {
43
- colors: void 0,
52
+ colors: undefined,
44
53
  transitions: true
45
- },
46
- devtools: {
47
- enabled: true
48
54
  }
49
55
  };
50
56
  const resolveColors = (colors) => {
@@ -54,9 +60,9 @@ const resolveColors = (colors) => {
54
60
  const accordion = {
55
61
  slots: {
56
62
  root: "w-full",
57
- item: "border-b border-[var(--ui-border)] last:border-b-0",
63
+ item: "border-b border-(--ui-border) last:border-b-0",
58
64
  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",
65
+ 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
66
  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
67
  body: "text-sm pb-3.5",
62
68
  leadingIcon: "shrink-0 size-5",
@@ -75,14 +81,14 @@ const accordion = {
75
81
  const alert = (options) => ({
76
82
  slots: {
77
83
  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",
84
+ wrapper: "min-w-0 flex-1 flex flex-col",
79
85
  title: "text-sm font-medium",
80
86
  description: "text-sm opacity-90",
81
87
  icon: "shrink-0 size-5",
82
88
  avatar: "shrink-0",
83
89
  avatarSize: "2xl",
84
- actions: "flex gap-1.5 shrink-0",
85
- close: "p-0.5"
90
+ actions: "flex flex-wrap gap-1.5 shrink-0",
91
+ close: "p-0"
86
92
  },
87
93
  variants: {
88
94
  color: {
@@ -95,14 +101,19 @@ const alert = (options) => ({
95
101
  soft: "",
96
102
  subtle: ""
97
103
  },
98
- multiline: {
99
- true: {
100
- root: "items-start",
101
- actions: "items-start mt-1"
102
- },
103
- false: {
104
+ orientation: {
105
+ horizontal: {
104
106
  root: "items-center",
105
107
  actions: "items-center"
108
+ },
109
+ vertical: {
110
+ root: "items-start",
111
+ actions: "items-start mt-2.5"
112
+ }
113
+ },
114
+ title: {
115
+ true: {
116
+ description: "mt-1"
106
117
  }
107
118
  }
108
119
  },
@@ -110,49 +121,49 @@ const alert = (options) => ({
110
121
  color,
111
122
  variant: "solid",
112
123
  class: {
113
- root: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
124
+ root: `bg-(--ui-${color}) text-(--ui-bg)`
114
125
  }
115
126
  })), ...(options.theme.colors || []).map((color) => ({
116
127
  color,
117
128
  variant: "outline",
118
129
  class: {
119
- root: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
130
+ root: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
120
131
  }
121
132
  })), ...(options.theme.colors || []).map((color) => ({
122
133
  color,
123
134
  variant: "soft",
124
135
  class: {
125
- root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
136
+ root: `bg-(--ui-${color})/10 text-(--ui-${color})`
126
137
  }
127
138
  })), ...(options.theme.colors || []).map((color) => ({
128
139
  color,
129
140
  variant: "subtle",
130
141
  class: {
131
- root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
142
+ root: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
132
143
  }
133
144
  })), {
134
145
  color: "neutral",
135
146
  variant: "solid",
136
147
  class: {
137
- root: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
148
+ root: "text-(--ui-bg) bg-(--ui-bg-inverted)"
138
149
  }
139
150
  }, {
140
151
  color: "neutral",
141
152
  variant: "outline",
142
153
  class: {
143
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border)]"
154
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border)"
144
155
  }
145
156
  }, {
146
157
  color: "neutral",
147
158
  variant: "soft",
148
159
  class: {
149
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50"
160
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50"
150
161
  }
151
162
  }, {
152
163
  color: "neutral",
153
164
  variant: "subtle",
154
165
  class: {
155
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 ring ring-inset ring-[var(--ui-border-accented)]"
166
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50 ring ring-inset ring-(--ui-border-accented)"
156
167
  }
157
168
  }],
158
169
  defaultVariants: {
@@ -163,10 +174,10 @@ const alert = (options) => ({
163
174
 
164
175
  const avatar = {
165
176
  slots: {
166
- root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
177
+ root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-(--ui-bg-elevated)",
167
178
  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"
179
+ fallback: "font-medium leading-none text-(--ui-text-muted) truncate",
180
+ icon: "text-(--ui-text-muted) shrink-0"
170
181
  },
171
182
  variants: {
172
183
  size: {
@@ -207,7 +218,7 @@ const avatar = {
207
218
  const avatarGroup = {
208
219
  slots: {
209
220
  root: "inline-flex flex-row-reverse justify-end",
210
- base: "relative rounded-full ring-[var(--ui-bg)] first:me-0"
221
+ base: "relative rounded-full ring-(--ui-bg) first:me-0"
211
222
  },
212
223
  variants: {
213
224
  size: {
@@ -245,9 +256,44 @@ const avatarGroup = {
245
256
  }
246
257
  };
247
258
 
259
+ const buttonGroupVariant = {
260
+ buttonGroup: {
261
+ horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
262
+ vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
263
+ }
264
+ };
265
+ const buttonGroupVariantWithRoot = {
266
+ buttonGroup: {
267
+ horizontal: {
268
+ root: "group",
269
+ 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"
270
+ },
271
+ vertical: {
272
+ root: "group",
273
+ 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"
274
+ }
275
+ }
276
+ };
277
+ const buttonGroup = {
278
+ base: "relative",
279
+ variants: {
280
+ size: {
281
+ xs: "",
282
+ sm: "",
283
+ md: "",
284
+ lg: "",
285
+ xl: ""
286
+ },
287
+ orientation: {
288
+ horizontal: "inline-flex -space-x-px",
289
+ vertical: "flex flex-col -space-y-px"
290
+ }
291
+ }
292
+ };
293
+
248
294
  const badge = (options) => ({
249
295
  slots: {
250
- base: "rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center",
296
+ base: "font-medium inline-flex items-center",
251
297
  label: "truncate",
252
298
  leadingIcon: "shrink-0",
253
299
  leadingAvatar: "shrink-0",
@@ -255,6 +301,7 @@ const badge = (options) => ({
255
301
  trailingIcon: "shrink-0"
256
302
  },
257
303
  variants: {
304
+ ...buttonGroupVariant,
258
305
  color: {
259
306
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
260
307
  neutral: ""
@@ -266,58 +313,70 @@ const badge = (options) => ({
266
313
  subtle: ""
267
314
  },
268
315
  size: {
316
+ xs: {
317
+ base: "text-[8px]/3 px-1 py-0.5 gap-1 rounded-[calc(var(--ui-radius))]",
318
+ leadingIcon: "size-3",
319
+ leadingAvatarSize: "3xs",
320
+ trailingIcon: "size-3"
321
+ },
269
322
  sm: {
270
- base: "text-xs px-1.5 py-0.5 gap-1",
271
- leadingIcon: "size-4",
323
+ base: "text-[10px]/3 px-1.5 py-1 gap-1 rounded-[calc(var(--ui-radius))]",
324
+ leadingIcon: "size-3",
272
325
  leadingAvatarSize: "3xs",
273
- trailingIcon: "size-4"
326
+ trailingIcon: "size-3"
274
327
  },
275
328
  md: {
276
- base: "text-xs px-2 py-1 gap-1",
329
+ base: "text-xs px-2 py-1 gap-1 rounded-[calc(var(--ui-radius)*1.5)]",
277
330
  leadingIcon: "size-4",
278
331
  leadingAvatarSize: "3xs",
279
332
  trailingIcon: "size-4"
280
333
  },
281
334
  lg: {
282
- base: "text-sm px-2 py-1 gap-1.5",
335
+ base: "text-sm px-2 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
283
336
  leadingIcon: "size-5",
284
337
  leadingAvatarSize: "2xs",
285
338
  trailingIcon: "size-5"
339
+ },
340
+ xl: {
341
+ base: "text-base px-2.5 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
342
+ leadingIcon: "size-6",
343
+ leadingAvatarSize: "2xs",
344
+ trailingIcon: "size-6"
286
345
  }
287
346
  }
288
347
  },
289
348
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
290
349
  color,
291
350
  variant: "solid",
292
- class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
351
+ class: `bg-(--ui-${color}) text-(--ui-bg)`
293
352
  })), ...(options.theme.colors || []).map((color) => ({
294
353
  color,
295
354
  variant: "outline",
296
- class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/50`
355
+ class: `text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/50`
297
356
  })), ...(options.theme.colors || []).map((color) => ({
298
357
  color,
299
358
  variant: "soft",
300
- class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
359
+ class: `bg-(--ui-${color})/10 text-(--ui-${color})`
301
360
  })), ...(options.theme.colors || []).map((color) => ({
302
361
  color,
303
362
  variant: "subtle",
304
- class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
363
+ class: `bg-(--ui-${color})/10 text-(--ui-${color}) ring ring-inset ring-(--ui-${color})/25`
305
364
  })), {
306
365
  color: "neutral",
307
366
  variant: "solid",
308
- class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
367
+ class: "text-(--ui-bg) bg-(--ui-bg-inverted)"
309
368
  }, {
310
369
  color: "neutral",
311
370
  variant: "outline",
312
- class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)]"
371
+ class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg)"
313
372
  }, {
314
373
  color: "neutral",
315
374
  variant: "soft",
316
- class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
375
+ class: "text-(--ui-text) bg-(--ui-bg-elevated)"
317
376
  }, {
318
377
  color: "neutral",
319
378
  variant: "subtle",
320
- class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
379
+ class: "ring ring-inset ring-(--ui-border-accented) text-(--ui-text) bg-(--ui-bg-elevated)"
321
380
  }],
322
381
  defaultVariants: {
323
382
  color: "primary",
@@ -331,21 +390,21 @@ const breadcrumb = (options) => ({
331
390
  root: "relative min-w-0",
332
391
  list: "flex items-center gap-1.5",
333
392
  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)]",
393
+ link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-(--ui-primary)",
335
394
  linkLeadingIcon: "shrink-0 size-5",
336
395
  linkLeadingAvatar: "shrink-0",
337
396
  linkLeadingAvatarSize: "2xs",
338
397
  linkLabel: "truncate",
339
398
  separator: "flex",
340
- separatorIcon: "shrink-0 size-5 text-[var(--ui-text-muted)]"
399
+ separatorIcon: "shrink-0 size-5 text-(--ui-text-muted)"
341
400
  },
342
401
  variants: {
343
402
  active: {
344
403
  true: {
345
- link: "text-[var(--ui-primary)] font-semibold"
404
+ link: "text-(--ui-primary) font-semibold"
346
405
  },
347
406
  false: {
348
- link: "text-[var(--ui-text-muted)] font-medium"
407
+ link: "text-(--ui-text-muted) font-medium"
349
408
  }
350
409
  },
351
410
  disabled: {
@@ -362,49 +421,14 @@ const breadcrumb = (options) => ({
362
421
  active: false,
363
422
  to: true,
364
423
  class: {
365
- link: ["hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
424
+ link: ["hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
366
425
  }
367
426
  }]
368
427
  });
369
428
 
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
429
  const button = (options) => ({
406
430
  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"],
431
+ 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
432
  label: "truncate",
409
433
  leadingIcon: "shrink-0",
410
434
  leadingAvatar: "shrink-0",
@@ -460,7 +484,6 @@ const button = (options) => ({
460
484
  block: {
461
485
  true: {
462
486
  base: "w-full justify-center",
463
- leadingAvatarSize: "xs",
464
487
  trailingIcon: "ms-auto"
465
488
  }
466
489
  },
@@ -480,51 +503,51 @@ const button = (options) => ({
480
503
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
481
504
  color,
482
505
  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})]`
506
+ 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
507
  })), ...(options.theme.colors || []).map((color) => ({
485
508
  color,
486
509
  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})]`
510
+ 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
511
  })), ...(options.theme.colors || []).map((color) => ({
489
512
  color,
490
513
  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`
514
+ 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
515
  })), ...(options.theme.colors || []).map((color) => ({
493
516
  color,
494
517
  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})]`
518
+ 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
519
  })), ...(options.theme.colors || []).map((color) => ({
497
520
  color,
498
521
  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`
522
+ 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
523
  })), ...(options.theme.colors || []).map((color) => ({
501
524
  color,
502
525
  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})]`
526
+ 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
527
  })), {
505
528
  color: "neutral",
506
529
  variant: "solid",
507
- class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/80 disabled:bg-[var(--ui-bg-inverted)] aria-disabled:bg-[var(--ui-bg-inverted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
530
+ 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
531
  }, {
509
532
  color: "neutral",
510
533
  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)]"
534
+ 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
535
  }, {
513
536
  color: "neutral",
514
537
  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)]"
538
+ 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
539
  }, {
517
540
  color: "neutral",
518
541
  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)]"
542
+ 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
543
  }, {
521
544
  color: "neutral",
522
545
  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"
546
+ 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
547
  }, {
525
548
  color: "neutral",
526
549
  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)]"
550
+ 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
551
  }, {
529
552
  size: "xs",
530
553
  square: true,
@@ -566,12 +589,94 @@ const button = (options) => ({
566
589
  }
567
590
  });
568
591
 
592
+ const calendar = (options) => ({
593
+ slots: {
594
+ root: "",
595
+ header: "flex items-center justify-between",
596
+ body: "flex flex-col space-y-4 pt-4 sm:flex-row sm:space-x-4 sm:space-y-0",
597
+ heading: "text-center font-medium truncate mx-auto",
598
+ grid: "w-full border-collapse select-none space-y-1 focus:outline-none",
599
+ gridRow: "grid grid-cols-7",
600
+ gridWeekDaysRow: "mb-1 grid w-full grid-cols-7",
601
+ gridBody: "grid",
602
+ headCell: "rounded-[calc(var(--ui-radius)*1.5)]",
603
+ cell: "relative text-center",
604
+ 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"]
605
+ },
606
+ variants: {
607
+ color: {
608
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
609
+ headCell: `text-(--ui-${color})`,
610
+ 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`
611
+ }])),
612
+ neutral: {
613
+ headCell: "text-(--ui-bg-inverted)",
614
+ 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"
615
+ }
616
+ },
617
+ size: {
618
+ xs: {
619
+ heading: "text-xs",
620
+ cell: "text-xs",
621
+ headCell: "text-[10px]",
622
+ cellTrigger: "size-7",
623
+ body: "space-y-2 pt-2"
624
+ },
625
+ sm: {
626
+ heading: "text-xs",
627
+ headCell: "text-xs",
628
+ cell: "text-xs",
629
+ cellTrigger: "size-7"
630
+ },
631
+ md: {
632
+ heading: "text-sm",
633
+ headCell: "text-xs",
634
+ cell: "text-sm",
635
+ cellTrigger: "size-8"
636
+ },
637
+ lg: {
638
+ heading: "text-md",
639
+ headCell: "text-md",
640
+ cellTrigger: "size-9 text-md"
641
+ },
642
+ xl: {
643
+ heading: "text-lg",
644
+ headCell: "text-lg",
645
+ cellTrigger: "size-10 text-lg"
646
+ }
647
+ }
648
+ },
649
+ defaultVariants: {
650
+ size: "md",
651
+ color: "primary"
652
+ }
653
+ });
654
+
569
655
  const card = {
570
656
  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",
657
+ root: "rounded-[calc(var(--ui-radius)*2)]",
572
658
  header: "p-4 sm:px-6",
573
659
  body: "p-4 sm:p-6",
574
660
  footer: "p-4 sm:px-6"
661
+ },
662
+ variants: {
663
+ variant: {
664
+ solid: {
665
+ root: "bg-(--ui-bg-inverted) text-(--ui-bg)"
666
+ },
667
+ outline: {
668
+ root: "bg-(--ui-bg) ring ring-(--ui-border) divide-y divide-(--ui-border)"
669
+ },
670
+ soft: {
671
+ root: "bg-(--ui-bg-elevated)/50 divide-y divide-(--ui-border)"
672
+ },
673
+ subtle: {
674
+ root: "bg-(--ui-bg-elevated)/50 ring ring-(--ui-border) divide-y divide-(--ui-border)"
675
+ }
676
+ }
677
+ },
678
+ defaultVariants: {
679
+ variant: "outline"
575
680
  }
576
681
  };
577
682
 
@@ -586,15 +691,15 @@ const carousel = (options) => ({
586
691
  prev: "absolute rounded-full",
587
692
  next: "absolute rounded-full",
588
693
  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"]
694
+ dot: ["cursor-pointer size-3 bg-(--ui-border-accented) rounded-full", options.theme.transitions && "transition"]
590
695
  },
591
696
  variants: {
592
697
  orientation: {
593
698
  vertical: {
594
699
  container: "flex-col -mt-4",
595
700
  item: "pt-4",
596
- prev: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
597
- next: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90"
701
+ prev: "-top-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90",
702
+ next: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90"
598
703
  },
599
704
  horizontal: {
600
705
  container: "flex-row -ms-4",
@@ -605,29 +710,26 @@ const carousel = (options) => ({
605
710
  },
606
711
  active: {
607
712
  true: {
608
- dot: "bg-[var(--ui-border-inverted)]"
713
+ dot: "bg-(--ui-border-inverted)"
609
714
  }
610
715
  }
611
- },
612
- defaultVariants: {
613
- orientation: "horizontal"
614
716
  }
615
717
  });
616
718
 
617
719
  const checkbox = (options) => ({
618
720
  slots: {
619
721
  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",
722
+ 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
723
  container: "flex items-center",
622
724
  wrapper: "ms-2",
623
725
  icon: "shrink-0 size-full",
624
- label: "block font-medium text-[var(--ui-text)]",
625
- description: "text-[var(--ui-text-muted)]"
726
+ label: "block font-medium text-(--ui-text)",
727
+ description: "text-(--ui-text-muted)"
626
728
  },
627
729
  variants: {
628
730
  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)]"
731
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-(--ui-${color})`])),
732
+ neutral: "focus-visible:outline-(--ui-border-inverted)"
631
733
  },
632
734
  size: {
633
735
  xs: {
@@ -658,7 +760,7 @@ const checkbox = (options) => ({
658
760
  },
659
761
  required: {
660
762
  true: {
661
- label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
763
+ label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
662
764
  }
663
765
  },
664
766
  disabled: {
@@ -675,11 +777,11 @@ const checkbox = (options) => ({
675
777
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
676
778
  color,
677
779
  checked: true,
678
- class: `ring-2 ring-[var(--ui-${color})] bg-[var(--ui-${color})]`
780
+ class: `ring-2 ring-(--ui-${color}) bg-(--ui-${color})`
679
781
  })), {
680
782
  color: "neutral",
681
783
  checked: true,
682
- class: "ring-2 ring-[var(--ui-border-inverted)] bg-[var(--ui-bg-inverted)]"
784
+ class: "ring-2 ring-(--ui-border-inverted) bg-(--ui-bg-inverted)"
683
785
  }],
684
786
  defaultVariants: {
685
787
  size: "md",
@@ -690,12 +792,12 @@ const checkbox = (options) => ({
690
792
  const chip = (options) => ({
691
793
  slots: {
692
794
  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"
795
+ base: "rounded-full ring ring-(--ui-bg) flex items-center justify-center text-(--ui-bg) font-medium whitespace-nowrap"
694
796
  },
695
797
  variants: {
696
798
  color: {
697
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[var(--ui-${color})]`])),
698
- neutral: "bg-[var(--ui-text-muted)]"
799
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-(--ui-${color})`])),
800
+ neutral: "bg-(--ui-text-muted)"
699
801
  },
700
802
  size: {
701
803
  "3xs": "h-[4px] min-w-[4px] text-[4px]",
@@ -752,33 +854,83 @@ const collapsible = {
752
854
  }
753
855
  };
754
856
 
857
+ const colorPicker = {
858
+ slots: {
859
+ root: "data-[disabled]:opacity-75",
860
+ picker: "flex gap-4",
861
+ selector: "rounded-[calc(var(--ui-radius)*1.5)]",
862
+ selectorBackground: "w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]",
863
+ 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",
864
+ track: "w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]",
865
+ 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"
866
+ },
867
+ variants: {
868
+ size: {
869
+ xs: {
870
+ selector: "w-38 h-38",
871
+ track: "h-38"
872
+ },
873
+ sm: {
874
+ selector: "w-40 h-40",
875
+ track: "h-40"
876
+ },
877
+ md: {
878
+ selector: "w-42 h-42",
879
+ track: "h-42"
880
+ },
881
+ lg: {
882
+ selector: "w-44 h-44",
883
+ track: "h-44"
884
+ },
885
+ xl: {
886
+ selector: "w-46 h-46",
887
+ track: "h-46"
888
+ }
889
+ }
890
+ },
891
+ compoundVariants: [],
892
+ defaultVariants: {
893
+ size: "md"
894
+ }
895
+ };
896
+
755
897
  const commandPalette = (options) => ({
756
898
  slots: {
757
- root: "flex flex-col min-h-0 min-w-0 divide-y divide-[var(--ui-border)]",
899
+ root: "flex flex-col min-h-0 min-w-0 divide-y divide-(--ui-border)",
758
900
  input: "[&>input]:h-12",
759
901
  close: "",
760
- content: "relative overflow-hidden",
761
- viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
902
+ content: "relative overflow-hidden flex flex-col",
903
+ viewport: "relative divide-y divide-(--ui-border) scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
762
904
  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"],
905
+ empty: "py-6 text-center text-sm text-(--ui-text-muted)",
906
+ label: "px-2 py-1.5 text-xs font-semibold text-(--ui-text-highlighted)",
907
+ 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",
908
+ itemLeadingIcon: "shrink-0 size-5",
767
909
  itemLeadingAvatar: "shrink-0",
768
910
  itemLeadingAvatarSize: "2xs",
769
911
  itemLeadingChip: "shrink-0 size-5",
770
912
  itemLeadingChipSize: "md",
771
913
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
772
914
  itemTrailingIcon: "shrink-0 size-5",
773
- itemTrailingHighlightedIcon: "shrink-0 size-5 text-[var(--ui-text-dimmed)] hidden group-data-highlighted:inline-flex",
915
+ itemTrailingHighlightedIcon: "shrink-0 size-5 text-(--ui-text-dimmed) hidden group-data-highlighted:inline-flex",
774
916
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
775
917
  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)]"
918
+ itemLabel: "truncate space-x-1 rtl:space-x-reverse text-(--ui-text-dimmed)",
919
+ itemLabelBase: "text-(--ui-text-highlighted) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)",
920
+ itemLabelPrefix: "text-(--ui-text)",
921
+ itemLabelSuffix: "text-(--ui-text-dimmed) [&>mark]:text-(--ui-bg) [&>mark]:bg-(--ui-primary)"
780
922
  },
781
923
  variants: {
924
+ active: {
925
+ true: {
926
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
927
+ itemLeadingIcon: "text-(--ui-text)"
928
+ },
929
+ false: {
930
+ 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"],
931
+ itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"]
932
+ }
933
+ },
782
934
  loading: {
783
935
  true: {
784
936
  itemLeadingIcon: "animate-spin"
@@ -788,25 +940,25 @@ const commandPalette = (options) => ({
788
940
  });
789
941
 
790
942
  const container = {
791
- base: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"
943
+ base: "max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8"
792
944
  };
793
945
 
794
946
  const contextMenu = (options) => ({
795
947
  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]",
948
+ 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
949
  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)]",
950
+ label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
951
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
800
952
  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
953
  itemLeadingIcon: "shrink-0",
802
954
  itemLeadingAvatar: "shrink-0",
803
955
  itemLeadingAvatarSize: "",
804
- itemTrailing: "ms-auto inline-flex",
956
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
805
957
  itemTrailingIcon: "shrink-0",
806
958
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
807
959
  itemTrailingKbdsSize: "",
808
960
  itemLabel: "truncate",
809
- itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
961
+ itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
810
962
  },
811
963
  variants: {
812
964
  color: {
@@ -815,12 +967,12 @@ const contextMenu = (options) => ({
815
967
  },
816
968
  active: {
817
969
  true: {
818
- item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
819
- itemLeadingIcon: "text-[var(--ui-text)]"
970
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
971
+ itemLeadingIcon: "text-(--ui-text)"
820
972
  },
821
973
  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"]
974
+ 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"],
975
+ itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
824
976
  }
825
977
  },
826
978
  loading: {
@@ -880,15 +1032,15 @@ const contextMenu = (options) => ({
880
1032
  color,
881
1033
  active: false,
882
1034
  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})]`
1035
+ item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
1036
+ itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
885
1037
  }
886
1038
  })), ...(options.theme.colors || []).map((color) => ({
887
1039
  color,
888
1040
  active: true,
889
1041
  class: {
890
- item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
891
- itemLeadingIcon: `text-[var(--ui-${color})]`
1042
+ item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
1043
+ itemLeadingIcon: `text-(--ui-${color})`
892
1044
  }
893
1045
  }))],
894
1046
  defaultVariants: {
@@ -898,68 +1050,121 @@ const contextMenu = (options) => ({
898
1050
 
899
1051
  const drawer = {
900
1052
  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)]",
1053
+ overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
1054
+ content: "fixed bg-(--ui-bg) ring ring-(--ui-border) flex focus:outline-none",
1055
+ handle: "shrink-0 rounded-full bg-(--ui-bg-accented)",
904
1056
  container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
905
1057
  header: "",
906
- title: "text-[var(--ui-text-highlighted)] font-semibold",
907
- description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1058
+ title: "text-(--ui-text-highlighted) font-semibold",
1059
+ description: "mt-1 text-(--ui-text-muted) text-sm",
908
1060
  body: "flex-1",
909
1061
  footer: "flex flex-col gap-1.5"
910
1062
  },
911
1063
  variants: {
912
1064
  direction: {
913
1065
  top: {
914
- content: "top-0 mb-24 flex-col-reverse rounded-b-[calc(var(--ui-radius)*2)]",
1066
+ content: "mb-24 flex-col-reverse",
915
1067
  handle: "mb-4"
916
1068
  },
917
1069
  right: {
918
- content: "right-4 flex-row",
1070
+ content: "flex-row",
919
1071
  handle: "ml-4"
920
1072
  },
921
1073
  bottom: {
922
- content: "bottom-0 mt-24 flex-col rounded-t-[calc(var(--ui-radius)*2)]",
1074
+ content: "mt-24 flex-col",
923
1075
  handle: "mt-4"
924
1076
  },
925
1077
  left: {
926
- content: "left-4 flex-row-reverse",
1078
+ content: "flex-row-reverse",
927
1079
  handle: "mr-4"
928
1080
  }
1081
+ },
1082
+ inset: {
1083
+ true: {
1084
+ content: "rounded-[calc(var(--ui-radius)*2)] after:hidden"
1085
+ }
929
1086
  }
930
1087
  },
931
1088
  compoundVariants: [{
932
1089
  direction: ["top", "bottom"],
933
1090
  class: {
934
- content: "inset-x-0 h-auto max-h-[96%]",
1091
+ content: "h-auto max-h-[96%]",
935
1092
  handle: "w-12 h-1.5 mx-auto"
936
1093
  }
937
1094
  }, {
938
1095
  direction: ["right", "left"],
939
1096
  class: {
940
- content: "inset-y-4 w-auto max-w-[calc(100%-2rem)] rounded-[calc(var(--ui-radius)*2)] after:hidden",
1097
+ content: "w-auto max-w-[calc(100%-2rem)]",
941
1098
  handle: "h-12 w-1.5 mt-auto mb-auto"
942
1099
  }
1100
+ }, {
1101
+ direction: "top",
1102
+ inset: true,
1103
+ class: {
1104
+ content: "inset-x-4 top-4"
1105
+ }
1106
+ }, {
1107
+ direction: "top",
1108
+ inset: false,
1109
+ class: {
1110
+ content: "inset-x-0 top-0 rounded-b-[calc(var(--ui-radius)*2)]"
1111
+ }
1112
+ }, {
1113
+ direction: "bottom",
1114
+ inset: true,
1115
+ class: {
1116
+ content: "inset-x-4 bottom-4"
1117
+ }
1118
+ }, {
1119
+ direction: "bottom",
1120
+ inset: false,
1121
+ class: {
1122
+ content: "inset-x-0 bottom-0 rounded-t-[calc(var(--ui-radius)*2)]"
1123
+ }
1124
+ }, {
1125
+ direction: "left",
1126
+ inset: true,
1127
+ class: {
1128
+ content: "inset-y-4 left-4"
1129
+ }
1130
+ }, {
1131
+ direction: "left",
1132
+ inset: false,
1133
+ class: {
1134
+ content: "inset-y-0 left-0 rounded-r-[calc(var(--ui-radius)*2)]"
1135
+ }
1136
+ }, {
1137
+ direction: "right",
1138
+ inset: true,
1139
+ class: {
1140
+ content: "inset-y-4 right-4"
1141
+ }
1142
+ }, {
1143
+ direction: "right",
1144
+ inset: false,
1145
+ class: {
1146
+ content: "inset-y-0 right-0 rounded-l-[calc(var(--ui-radius)*2)]"
1147
+ }
943
1148
  }]
944
1149
  };
945
1150
 
946
1151
  const dropdownMenu = (options) => ({
947
1152
  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)]",
1153
+ 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]",
1154
+ arrow: "fill-(--ui-border)",
950
1155
  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)]",
1156
+ label: "w-full flex items-center font-semibold text-(--ui-text-highlighted)",
1157
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
953
1158
  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
1159
  itemLeadingIcon: "shrink-0",
955
1160
  itemLeadingAvatar: "shrink-0",
956
1161
  itemLeadingAvatarSize: "",
957
- itemTrailing: "ms-auto inline-flex",
1162
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
958
1163
  itemTrailingIcon: "shrink-0",
959
1164
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
960
1165
  itemTrailingKbdsSize: "",
961
1166
  itemLabel: "truncate",
962
- itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
1167
+ itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
963
1168
  },
964
1169
  variants: {
965
1170
  color: {
@@ -968,12 +1173,12 @@ const dropdownMenu = (options) => ({
968
1173
  },
969
1174
  active: {
970
1175
  true: {
971
- item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
972
- itemLeadingIcon: "text-[var(--ui-text)]"
1176
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
1177
+ itemLeadingIcon: "text-(--ui-text)"
973
1178
  },
974
1179
  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"]
1180
+ 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"],
1181
+ itemLeadingIcon: ["text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text) group-data-[state=open]:text-(--ui-text)", options.theme.transitions && "transition-colors"]
977
1182
  }
978
1183
  },
979
1184
  loading: {
@@ -1033,15 +1238,15 @@ const dropdownMenu = (options) => ({
1033
1238
  color,
1034
1239
  active: false,
1035
1240
  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})]`
1241
+ item: `text-(--ui-${color}) data-highlighted:text-(--ui-${color}) data-highlighted:before:bg-(--ui-${color})/10 data-[state=open]:before:bg-(--ui-${color})/10`,
1242
+ itemLeadingIcon: `text-(--ui-${color})/75 group-data-highlighted:text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1038
1243
  }
1039
1244
  })), ...(options.theme.colors || []).map((color) => ({
1040
1245
  color,
1041
1246
  active: true,
1042
1247
  class: {
1043
- item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
1044
- itemLeadingIcon: `text-[var(--ui-${color})]`
1248
+ item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
1249
+ itemLeadingIcon: `text-(--ui-${color})`
1045
1250
  }
1046
1251
  }))],
1047
1252
  defaultVariants: {
@@ -1058,12 +1263,12 @@ const formField = {
1058
1263
  root: "",
1059
1264
  wrapper: "",
1060
1265
  labelWrapper: "flex content-center items-center justify-between",
1061
- label: "block font-medium text-[var(--ui-text)]",
1266
+ label: "block font-medium text-(--ui-text)",
1062
1267
  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)]"
1268
+ description: "text-(--ui-text-muted)",
1269
+ error: "mt-2 text-(--ui-error)",
1270
+ hint: "text-(--ui-text-muted)",
1271
+ help: "mt-2 text-(--ui-text-muted)"
1067
1272
  },
1068
1273
  variants: {
1069
1274
  size: {
@@ -1075,7 +1280,7 @@ const formField = {
1075
1280
  },
1076
1281
  required: {
1077
1282
  true: {
1078
- label: `after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]`
1283
+ label: `after:content-['*'] after:ms-0.5 after:text-(--ui-error)`
1079
1284
  }
1080
1285
  }
1081
1286
  },
@@ -1087,13 +1292,13 @@ const formField = {
1087
1292
  const input = (options) => ({
1088
1293
  slots: {
1089
1294
  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"],
1295
+ 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
1296
  leading: "absolute inset-y-0 start-0 flex items-center",
1092
- leadingIcon: "shrink-0 text-[var(--ui-text-dimmed)]",
1297
+ leadingIcon: "shrink-0 text-(--ui-text-dimmed)",
1093
1298
  leadingAvatar: "shrink-0",
1094
1299
  leadingAvatarSize: "",
1095
1300
  trailing: "absolute inset-y-0 end-0 flex items-center",
1096
- trailingIcon: "shrink-0 text-[var(--ui-text-dimmed)]"
1301
+ trailingIcon: "shrink-0 text-(--ui-text-dimmed)"
1097
1302
  },
1098
1303
  variants: {
1099
1304
  ...buttonGroupVariantWithRoot,
@@ -1140,11 +1345,11 @@ const input = (options) => ({
1140
1345
  }
1141
1346
  },
1142
1347
  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)] 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)]"
1348
+ outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
1349
+ 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",
1350
+ subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
1351
+ ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
1352
+ none: "text-(--ui-text-highlighted) bg-transparent"
1148
1353
  },
1149
1354
  color: {
1150
1355
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
@@ -1163,25 +1368,25 @@ const input = (options) => ({
1163
1368
  true: ""
1164
1369
  },
1165
1370
  type: {
1166
- file: "file:me-1.5 file:font-medium file:text-[var(--ui-text-muted)] file:outline-none"
1371
+ file: "file:me-1.5 file:font-medium file:text-(--ui-text-muted) file:outline-none"
1167
1372
  }
1168
1373
  },
1169
1374
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1170
1375
  color,
1171
1376
  variant: ["outline", "subtle"],
1172
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1377
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1173
1378
  })), ...(options.theme.colors || []).map((color) => ({
1174
1379
  color,
1175
1380
  highlight: true,
1176
- class: `ring ring-inset ring-[var(--ui-${color})]`
1381
+ class: `ring ring-inset ring-(--ui-${color})`
1177
1382
  })), {
1178
1383
  color: "neutral",
1179
1384
  variant: ["outline", "subtle"],
1180
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1385
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1181
1386
  }, {
1182
1387
  color: "neutral",
1183
1388
  highlight: true,
1184
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1389
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1185
1390
  }, {
1186
1391
  leading: true,
1187
1392
  size: "xs",
@@ -1248,15 +1453,15 @@ const inputMenu = (options) => {
1248
1453
  slots: {
1249
1454
  base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
1250
1455
  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",
1456
+ arrow: "fill-(--ui-border)",
1457
+ 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",
1458
+ viewport: "divide-y divide-(--ui-border) scroll-py-1",
1254
1459
  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"],
1460
+ empty: "py-2 text-center text-sm text-(--ui-text-muted)",
1461
+ label: "font-semibold text-(--ui-text-highlighted)",
1462
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
1463
+ 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"],
1464
+ itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
1260
1465
  itemLeadingAvatar: "shrink-0",
1261
1466
  itemLeadingAvatarSize: "",
1262
1467
  itemLeadingChip: "shrink-0",
@@ -1264,9 +1469,9 @@ const inputMenu = (options) => {
1264
1469
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
1265
1470
  itemTrailingIcon: "shrink-0",
1266
1471
  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",
1472
+ 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
1473
  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"],
1474
+ 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
1475
  tagsItemDeleteIcon: "",
1271
1476
  tagsInput: ""
1272
1477
  },
@@ -1274,11 +1479,10 @@ const inputMenu = (options) => {
1274
1479
  multiple: {
1275
1480
  true: {
1276
1481
  root: "flex-wrap",
1277
- base: "",
1278
- tagsInput: "border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1482
+ tagsInput: "border-0 bg-transparent placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1279
1483
  },
1280
1484
  false: {
1281
- base: "w-full border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1485
+ base: "w-full border-0 placeholder:text-(--ui-text-dimmed) focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1282
1486
  }
1283
1487
  },
1284
1488
  size: {
@@ -1343,23 +1547,133 @@ const inputMenu = (options) => {
1343
1547
  color,
1344
1548
  multiple: true,
1345
1549
  variant: ["outline", "subtle"],
1346
- class: `has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--${color})]`
1550
+ class: `has-focus-visible:ring-2 has-focus-visible:ring-(--ui-${color})`
1347
1551
  })), {
1348
1552
  color: "neutral",
1349
1553
  multiple: true,
1350
1554
  variant: ["outline", "subtle"],
1351
- class: "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--ui-border-inverted)]"
1555
+ class: "has-focus-visible:ring-2 has-focus-visible:ring-(--ui-border-inverted)"
1352
1556
  }]
1353
1557
  }, input(options));
1354
1558
  };
1355
1559
 
1560
+ const inputNumber = (options) => {
1561
+ const input$1 = input(options);
1562
+ return {
1563
+ slots: {
1564
+ root: "relative inline-flex items-center",
1565
+ 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"],
1566
+ increment: "absolute flex items-center",
1567
+ decrement: "absolute flex items-center"
1568
+ },
1569
+ variants: {
1570
+ color: {
1571
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1572
+ neutral: ""
1573
+ },
1574
+ size: {
1575
+ xs: "px-2 py-1 text-xs gap-1",
1576
+ sm: "px-2.5 py-1.5 text-xs gap-1.5",
1577
+ md: "px-2.5 py-1.5 text-sm gap-1.5",
1578
+ lg: "px-3 py-2 text-sm gap-2",
1579
+ xl: "px-3 py-2 text-base gap-2"
1580
+ },
1581
+ variant: {
1582
+ ...input$1.variants.variant
1583
+ },
1584
+ disabled: {
1585
+ true: {
1586
+ increment: "opacity-75 cursor-not-allowed",
1587
+ decrement: "opacity-75 cursor-not-allowed"
1588
+ }
1589
+ },
1590
+ orientation: {
1591
+ horizontal: {
1592
+ base: "text-center",
1593
+ increment: "inset-y-0 end-0 pe-1",
1594
+ decrement: "inset-y-0 start-0 ps-1"
1595
+ },
1596
+ vertical: {
1597
+ increment: "top-0 end-0 pe-1 [&>button]:py-0 scale-80",
1598
+ decrement: "bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"
1599
+ }
1600
+ },
1601
+ highlight: {
1602
+ true: ""
1603
+ }
1604
+ },
1605
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1606
+ color,
1607
+ variant: ["outline", "subtle"],
1608
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1609
+ })), ...(options.theme.colors || []).map((color) => ({
1610
+ color,
1611
+ highlight: true,
1612
+ class: `ring ring-inset ring-(--ui-${color})`
1613
+ })), {
1614
+ color: "neutral",
1615
+ variant: ["outline", "subtle"],
1616
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1617
+ }, {
1618
+ color: "neutral",
1619
+ highlight: true,
1620
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1621
+ }, {
1622
+ orientation: "horizontal",
1623
+ size: "xs",
1624
+ class: "px-7"
1625
+ }, {
1626
+ orientation: "horizontal",
1627
+ size: "sm",
1628
+ class: "px-8"
1629
+ }, {
1630
+ orientation: "horizontal",
1631
+ size: "md",
1632
+ class: "px-9"
1633
+ }, {
1634
+ orientation: "horizontal",
1635
+ size: "lg",
1636
+ class: "px-10"
1637
+ }, {
1638
+ orientation: "horizontal",
1639
+ size: "xl",
1640
+ class: "px-11"
1641
+ }, {
1642
+ orientation: "vertical",
1643
+ size: "xs",
1644
+ class: "pe-7"
1645
+ }, {
1646
+ orientation: "vertical",
1647
+ size: "sm",
1648
+ class: "pe-8"
1649
+ }, {
1650
+ orientation: "vertical",
1651
+ size: "md",
1652
+ class: "pe-9"
1653
+ }, {
1654
+ orientation: "vertical",
1655
+ size: "lg",
1656
+ class: "pe-10"
1657
+ }, {
1658
+ orientation: "vertical",
1659
+ size: "xl",
1660
+ class: "pe-11"
1661
+ }],
1662
+ defaultVariants: {
1663
+ size: "md",
1664
+ color: "primary",
1665
+ variant: "outline"
1666
+ }
1667
+ };
1668
+ };
1669
+
1356
1670
  const kbd = {
1357
- base: "inline-flex items-center justify-center px-1 rounded-[var(--ui-radius)] font-medium font-sans",
1671
+ base: "inline-flex items-center justify-center px-1 rounded-(--ui-radius) font-medium font-sans",
1358
1672
  variants: {
1359
1673
  variant: {
1360
- solid: "bg-[var(--ui-bg-inverted)] text-[var(--ui-bg)]",
1361
- outline: "bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] ring ring-inset ring-[var(--ui-border-accented)]",
1362
- subtle: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] ring ring-inset ring-[var(--ui-border-accented)]"
1674
+ solid: "bg-(--ui-bg-inverted) text-(--ui-bg)",
1675
+ outline: "bg-(--ui-bg) text-(--ui-text-highlighted) ring ring-inset ring-(--ui-border-accented)",
1676
+ subtle: "bg-(--ui-bg-elevated) text-(--ui-text) ring ring-inset ring-(--ui-border-accented)"
1363
1677
  },
1364
1678
  size: {
1365
1679
  sm: "h-4 min-w-[16px] text-[10px]",
@@ -1374,11 +1688,11 @@ const kbd = {
1374
1688
  };
1375
1689
 
1376
1690
  const link = (options) => ({
1377
- base: "focus-visible:outline-[var(--ui-primary)]",
1691
+ base: "focus-visible:outline-(--ui-primary)",
1378
1692
  variants: {
1379
1693
  active: {
1380
- true: "text-[var(--ui-primary)]",
1381
- false: ["text-[var(--ui-text-muted)] hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1694
+ true: "text-(--ui-primary)",
1695
+ false: ["text-(--ui-text-muted) hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1382
1696
  },
1383
1697
  disabled: {
1384
1698
  true: "cursor-not-allowed opacity-75"
@@ -1388,13 +1702,14 @@ const link = (options) => ({
1388
1702
 
1389
1703
  const modal = {
1390
1704
  slots: {
1391
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
1392
- content: "fixed w-full h-dvh bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] flex flex-col focus:outline-none",
1393
- header: "px-4 py-5 sm:px-6",
1394
- body: "flex-1 p-4 sm:p-6",
1705
+ overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
1706
+ content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) flex flex-col focus:outline-none",
1707
+ header: "flex items-center gap-1.5 p-4 sm:px-6 min-h-16",
1708
+ wrapper: "",
1709
+ body: "flex-1 overflow-y-auto p-4 sm:p-6",
1395
1710
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
1396
- title: "text-[var(--ui-text-highlighted)] font-semibold",
1397
- description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1711
+ title: "text-(--ui-text-highlighted) font-semibold",
1712
+ description: "mt-1 text-(--ui-text-muted) text-sm",
1398
1713
  close: "absolute top-4 end-4"
1399
1714
  },
1400
1715
  variants: {
@@ -1409,7 +1724,7 @@ const modal = {
1409
1724
  content: "inset-0"
1410
1725
  },
1411
1726
  false: {
1412
- 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)]"
1727
+ 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)"
1413
1728
  }
1414
1729
  }
1415
1730
  }
@@ -1419,41 +1734,42 @@ const navigationMenu = (options) => ({
1419
1734
  slots: {
1420
1735
  root: "relative flex gap-1.5 [&>div]:min-w-0",
1421
1736
  list: "isolate min-w-0",
1737
+ label: "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-(--ui-text-highlighted) px-2.5 py-1.5",
1422
1738
  item: "min-w-0",
1423
1739
  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",
1424
1740
  linkLeadingIcon: "shrink-0 size-5",
1425
1741
  linkLeadingAvatar: "shrink-0",
1426
1742
  linkLeadingAvatarSize: "2xs",
1427
- linkTrailing: "ms-auto inline-flex",
1428
- linkTrailingBadge: "shrink-0 rounded",
1743
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
1744
+ linkTrailingBadge: "shrink-0",
1429
1745
  linkTrailingBadgeSize: "sm",
1430
1746
  linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
1431
1747
  linkLabel: "truncate",
1432
- linkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1748
+ linkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
1433
1749
  childList: "",
1434
1750
  childItem: "",
1435
1751
  childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-start",
1436
1752
  childLinkWrapper: "flex flex-col items-start",
1437
1753
  childLinkIcon: "size-5 shrink-0",
1438
1754
  childLinkLabel: "font-semibold text-sm relative inline-flex",
1439
- childLinkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1440
- childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
1441
- separator: "px-2 h-px bg-[var(--ui-border)]",
1442
- viewportWrapper: "absolute top-full left-0 flex w-full justify-center",
1443
- 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]",
1444
- 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]",
1445
- 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",
1446
- 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)]"
1755
+ childLinkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
1756
+ childLinkDescription: "text-sm text-(--ui-text-muted)",
1757
+ separator: "px-2 h-px bg-(--ui-border)",
1758
+ viewportWrapper: "absolute top-full left-0 flex w-full",
1759
+ 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]",
1760
+ content: "absolute top-0 left-0 w-full",
1761
+ 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",
1762
+ arrow: "relative top-[50%] size-2.5 rotate-45 border border-(--ui-border) bg-(--ui-bg) z-[1] rounded-[calc(var(--ui-radius)/2)]"
1447
1763
  },
1448
1764
  variants: {
1449
1765
  color: {
1450
1766
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1451
- link: `focus-visible:before:ring-[var(--ui-${color})]`,
1452
- childLink: `focus-visible:outline-[var(--ui-${color})]`
1767
+ link: `focus-visible:before:ring-(--ui-${color})`,
1768
+ childLink: `focus-visible:outline-(--ui-${color})`
1453
1769
  }])),
1454
1770
  neutral: {
1455
- link: "focus-visible:before:ring-[var(--ui-border-inverted)]",
1456
- childLink: "focus-visible:outline-[var(--ui-border-inverted)]"
1771
+ link: "focus-visible:before:ring-(--ui-border-inverted)",
1772
+ childLink: "focus-visible:outline-(--ui-border-inverted)"
1457
1773
  }
1458
1774
  },
1459
1775
  highlightColor: {
@@ -1466,29 +1782,38 @@ const navigationMenu = (options) => ({
1466
1782
  },
1467
1783
  orientation: {
1468
1784
  horizontal: {
1469
- root: "w-full items-center justify-between",
1785
+ root: "items-center justify-between",
1470
1786
  list: "flex items-center",
1471
1787
  item: "py-2",
1472
1788
  link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
1473
- childList: "grid grid-cols-2 gap-2 p-2"
1789
+ childList: "grid p-2"
1474
1790
  },
1475
1791
  vertical: {
1476
1792
  root: "flex-col",
1477
- link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
1478
- childList: "ms-5 border-s border-[var(--ui-border)]",
1479
- childItem: "ps-1.5 -ms-px"
1793
+ link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
1794
+ }
1795
+ },
1796
+ contentOrientation: {
1797
+ horizontal: {
1798
+ viewport: "",
1799
+ viewportWrapper: "justify-center",
1800
+ 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]"
1801
+ },
1802
+ vertical: {
1803
+ viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
1804
+ content: ""
1480
1805
  }
1481
1806
  },
1482
1807
  active: {
1483
1808
  true: {
1484
- childLink: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text-highlighted)]",
1485
- childLinkIcon: "text-[var(--ui-text)]"
1809
+ childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
1810
+ childLinkIcon: "text-(--ui-text)"
1486
1811
  },
1487
1812
  false: {
1488
- link: "text-[var(--ui-text-muted)]",
1489
- linkLeadingIcon: "text-[var(--ui-text-dimmed)]",
1490
- childLink: ["hover:bg-[var(--ui-bg-elevated)]/50 text-[var(--ui-text)] hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1491
- childLinkIcon: ["text-[var(--ui-text-dimmed)] group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1813
+ link: "text-(--ui-text-muted)",
1814
+ linkLeadingIcon: "text-(--ui-text-dimmed)",
1815
+ childLink: ["hover:bg-(--ui-bg-elevated)/50 text-(--ui-text) hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
1816
+ childLinkIcon: ["text-(--ui-text-dimmed) group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1492
1817
  }
1493
1818
  },
1494
1819
  disabled: {
@@ -1498,29 +1823,56 @@ const navigationMenu = (options) => ({
1498
1823
  },
1499
1824
  highlight: {
1500
1825
  true: ""
1826
+ },
1827
+ level: {
1828
+ true: ""
1829
+ },
1830
+ collapsed: {
1831
+ true: ""
1501
1832
  }
1502
1833
  },
1503
1834
  compoundVariants: [{
1504
- highlight: true,
1505
1835
  orientation: "horizontal",
1836
+ contentOrientation: "horizontal",
1506
1837
  class: {
1507
- item: "-mb-px",
1508
- link: "after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full"
1838
+ childList: "grid-cols-2 gap-2"
1509
1839
  }
1510
1840
  }, {
1841
+ orientation: "horizontal",
1842
+ contentOrientation: "vertical",
1843
+ class: {
1844
+ childList: "gap-1",
1845
+ content: "w-60"
1846
+ }
1847
+ }, {
1848
+ orientation: "horizontal",
1511
1849
  highlight: true,
1850
+ class: {
1851
+ 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"]
1852
+ }
1853
+ }, {
1512
1854
  orientation: "vertical",
1855
+ highlight: true,
1856
+ level: true,
1513
1857
  class: {
1514
- item: "px-1.5 -ms-px",
1515
- link: "after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full"
1858
+ 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"]
1516
1859
  }
1517
1860
  }, {
1518
1861
  disabled: false,
1519
1862
  active: false,
1520
1863
  variant: "pill",
1521
1864
  class: {
1522
- 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"],
1523
- linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1865
+ link: ["hover:text-(--ui-text-highlighted) hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "transition-colors before:transition-colors"],
1866
+ linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1867
+ }
1868
+ }, {
1869
+ disabled: false,
1870
+ active: false,
1871
+ variant: "pill",
1872
+ orientation: "horizontal",
1873
+ class: {
1874
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
1875
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
1524
1876
  }
1525
1877
  }, {
1526
1878
  disabled: false,
@@ -1528,7 +1880,7 @@ const navigationMenu = (options) => ({
1528
1880
  highlight: true,
1529
1881
  orientation: "horizontal",
1530
1882
  class: {
1531
- link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1883
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
1532
1884
  }
1533
1885
  }, {
1534
1886
  disabled: false,
@@ -1537,75 +1889,99 @@ const navigationMenu = (options) => ({
1537
1889
  active: false,
1538
1890
  orientation: "horizontal",
1539
1891
  class: {
1540
- link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1892
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
1541
1893
  }
1542
1894
  }, ...(options.theme.colors || []).map((color) => ({
1543
1895
  color,
1544
1896
  variant: "pill",
1545
1897
  active: true,
1546
1898
  class: {
1547
- link: `text-[var(--ui-${color})]`,
1548
- linkLeadingIcon: `text-[var(--ui-${color})]`
1899
+ link: `text-(--ui-${color})`,
1900
+ linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1549
1901
  }
1550
1902
  })), {
1551
1903
  color: "neutral",
1552
1904
  variant: "pill",
1553
1905
  active: true,
1554
1906
  class: {
1555
- link: "text-[var(--ui-text-highlighted)]",
1556
- linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
1907
+ link: "text-(--ui-text-highlighted)",
1908
+ linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
1557
1909
  }
1558
1910
  }, {
1559
1911
  variant: "pill",
1560
1912
  active: true,
1561
1913
  highlight: false,
1562
1914
  class: {
1563
- link: "before:bg-[var(--ui-bg-elevated)]"
1915
+ link: "before:bg-(--ui-bg-elevated)"
1564
1916
  }
1565
1917
  }, {
1566
1918
  variant: "pill",
1567
1919
  active: true,
1568
1920
  highlight: true,
1569
1921
  class: {
1570
- link: ["hover:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "before:transition-colors"]
1922
+ link: ["hover:before:bg-(--ui-bg-elevated)/50", options.theme.transitions && "before:transition-colors"]
1571
1923
  }
1572
1924
  }, {
1573
1925
  disabled: false,
1574
1926
  active: false,
1575
1927
  variant: "link",
1576
1928
  class: {
1577
- link: ["hover:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1578
- linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1929
+ link: ["hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
1930
+ linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1931
+ }
1932
+ }, {
1933
+ disabled: false,
1934
+ active: false,
1935
+ variant: "link",
1936
+ orientation: "horizontal",
1937
+ class: {
1938
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
1939
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
1579
1940
  }
1580
1941
  }, ...(options.theme.colors || []).map((color) => ({
1581
1942
  color,
1582
1943
  variant: "link",
1583
1944
  active: true,
1584
1945
  class: {
1585
- link: `text-[var(--ui-${color})]`,
1586
- linkLeadingIcon: `text-[var(--ui-${color})]`
1946
+ link: `text-(--ui-${color})`,
1947
+ linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1587
1948
  }
1588
1949
  })), {
1589
1950
  color: "neutral",
1590
1951
  variant: "link",
1591
1952
  active: true,
1592
1953
  class: {
1593
- link: "text-[var(--ui-text-highlighted)]",
1594
- linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
1954
+ link: "text-(--ui-text-highlighted)",
1955
+ linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
1595
1956
  }
1596
1957
  }, ...(options.theme.colors || []).map((highlightColor) => ({
1597
1958
  highlightColor,
1598
1959
  highlight: true,
1960
+ level: true,
1599
1961
  active: true,
1600
1962
  class: {
1601
- link: `after:bg-[var(--ui-${highlightColor})]`
1963
+ link: `after:bg-(--ui-${highlightColor})`
1602
1964
  }
1603
1965
  })), {
1604
1966
  highlightColor: "neutral",
1605
1967
  highlight: true,
1968
+ level: true,
1606
1969
  active: true,
1607
1970
  class: {
1608
- link: "after:bg-[var(--ui-bg-inverted)]"
1971
+ link: "after:bg-(--ui-bg-inverted)"
1972
+ }
1973
+ }, {
1974
+ orientation: "vertical",
1975
+ collapsed: false,
1976
+ class: {
1977
+ childList: "ms-5 border-s border-(--ui-border)",
1978
+ childItem: "ps-1.5 -ms-px"
1979
+ }
1980
+ }, {
1981
+ orientation: "vertical",
1982
+ collapsed: true,
1983
+ class: {
1984
+ link: "px-1.5"
1609
1985
  }
1610
1986
  }],
1611
1987
  defaultVariants: {
@@ -1624,19 +2000,81 @@ const pagination = {
1624
2000
  }
1625
2001
  };
1626
2002
 
2003
+ const pinInput = (options) => ({
2004
+ slots: {
2005
+ root: "relative inline-flex items-center gap-1.5",
2006
+ 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"]
2007
+ },
2008
+ variants: {
2009
+ size: {
2010
+ xs: {
2011
+ base: "size-6 text-xs"
2012
+ },
2013
+ sm: {
2014
+ base: "size-7 text-xs"
2015
+ },
2016
+ md: {
2017
+ base: "size-8 text-sm"
2018
+ },
2019
+ lg: {
2020
+ base: "size-9 text-sm"
2021
+ },
2022
+ xl: {
2023
+ base: "size-10 text-base"
2024
+ }
2025
+ },
2026
+ variant: {
2027
+ outline: "text-(--ui-text-highlighted) bg-(--ui-bg) ring ring-inset ring-(--ui-border-accented)",
2028
+ 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",
2029
+ subtle: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated) ring ring-inset ring-(--ui-border-accented)",
2030
+ ghost: "text-(--ui-text-highlighted) bg-transparent hover:bg-(--ui-bg-elevated) focus:bg-(--ui-bg-elevated) disabled:bg-transparent dark:disabled:bg-transparent",
2031
+ none: "text-(--ui-text-highlighted) bg-transparent"
2032
+ },
2033
+ color: {
2034
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
2035
+ neutral: ""
2036
+ },
2037
+ highlight: {
2038
+ true: ""
2039
+ }
2040
+ },
2041
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
2042
+ color,
2043
+ variant: ["outline", "subtle"],
2044
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
2045
+ })), ...(options.theme.colors || []).map((color) => ({
2046
+ color,
2047
+ highlight: true,
2048
+ class: `ring ring-inset ring-(--ui-${color})`
2049
+ })), {
2050
+ color: "neutral",
2051
+ variant: ["outline", "subtle"],
2052
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
2053
+ }, {
2054
+ color: "neutral",
2055
+ highlight: true,
2056
+ class: "ring ring-inset ring-(--ui-border-inverted)"
2057
+ }],
2058
+ defaultVariants: {
2059
+ size: "md",
2060
+ color: "primary",
2061
+ variant: "outline"
2062
+ }
2063
+ });
2064
+
1627
2065
  const popover = {
1628
2066
  slots: {
1629
- 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",
1630
- arrow: "fill-[var(--ui-border)]"
2067
+ 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",
2068
+ arrow: "fill-(--ui-border)"
1631
2069
  }
1632
2070
  };
1633
2071
 
1634
2072
  const progress = (options) => ({
1635
2073
  slots: {
1636
2074
  root: "gap-2",
1637
- base: "relative overflow-hidden rounded-full bg-[var(--ui-bg-accented)]",
2075
+ base: "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
1638
2076
  indicator: "rounded-full size-full transition-transform duration-200 ease-out",
1639
- status: "flex justify-end text-[var(--ui-text-dimmed)] transition-[width] duration-200",
2077
+ status: "flex justify-end text-(--ui-text-dimmed) transition-[width] duration-200",
1640
2078
  steps: "grid items-end",
1641
2079
  step: "truncate text-end row-start-1 col-start-1 transition-opacity"
1642
2080
  },
@@ -1649,12 +2087,12 @@ const progress = (options) => ({
1649
2087
  },
1650
2088
  color: {
1651
2089
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1652
- indicator: `bg-[var(--ui-${color})]`,
1653
- steps: `text-[var(--ui-${color})]`
2090
+ indicator: `bg-(--ui-${color})`,
2091
+ steps: `text-(--ui-${color})`
1654
2092
  }])),
1655
2093
  neutral: {
1656
- indicator: "bg-[var(--ui-bg-inverted)]",
1657
- steps: "text-[var(--ui-bg)]"
2094
+ indicator: "bg-(--ui-bg-inverted)",
2095
+ steps: "text-(--ui-bg)"
1658
2096
  }
1659
2097
  },
1660
2098
  size: {
@@ -1692,7 +2130,7 @@ const progress = (options) => ({
1692
2130
  step: "opacity-100"
1693
2131
  },
1694
2132
  first: {
1695
- step: "opacity-100 text-[var(--ui-text-muted)]"
2133
+ step: "opacity-100 text-(--ui-text-muted)"
1696
2134
  },
1697
2135
  other: {
1698
2136
  step: "opacity-0"
@@ -1793,7 +2231,7 @@ const progress = (options) => ({
1793
2231
  orientation: "horizontal",
1794
2232
  animation: "carousel",
1795
2233
  class: {
1796
- indicator: "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite]"
2234
+ indicator: "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_ease-in-out_infinite]"
1797
2235
  }
1798
2236
  }, {
1799
2237
  orientation: "vertical",
@@ -1805,7 +2243,7 @@ const progress = (options) => ({
1805
2243
  orientation: "horizontal",
1806
2244
  animation: "carousel-inverse",
1807
2245
  class: {
1808
- indicator: "data-[state=indeterminate]:animate-[carousel-inverse_2s_ease-in-out_infinite]"
2246
+ 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]"
1809
2247
  }
1810
2248
  }, {
1811
2249
  orientation: "vertical",
@@ -1849,24 +2287,24 @@ const radioGroup = (options) => ({
1849
2287
  slots: {
1850
2288
  root: "relative",
1851
2289
  fieldset: "flex",
1852
- legend: "mb-1 block font-medium text-[var(--ui-text)]",
2290
+ legend: "mb-1 block font-medium text-(--ui-text)",
1853
2291
  item: "flex items-start",
1854
- 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)]",
1855
- indicator: "flex items-center justify-center size-full rounded-full after:bg-[var(--ui-bg)] after:rounded-full",
2292
+ base: "rounded-full ring ring-inset ring-(--ui-border-accented) focus-visible:outline-2 focus-visible:outline-offset-2",
2293
+ indicator: "flex items-center justify-center size-full rounded-full after:bg-(--ui-bg) after:rounded-full",
1856
2294
  container: "flex items-center",
1857
2295
  wrapper: "ms-2",
1858
- label: "block font-medium text-[var(--ui-text)]",
1859
- description: "text-[var(--ui-text-muted)]"
2296
+ label: "block font-medium text-(--ui-text)",
2297
+ description: "text-(--ui-text-muted)"
1860
2298
  },
1861
2299
  variants: {
1862
2300
  color: {
1863
2301
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1864
- base: `focus-visible:outline-[var(--ui-${color})]`,
1865
- indicator: `bg-[var(--ui-${color})]`
2302
+ base: `focus-visible:outline-(--ui-${color})`,
2303
+ indicator: `bg-(--ui-${color})`
1866
2304
  }])),
1867
2305
  neutral: {
1868
- base: "focus-visible:outline-[var(--ui-border-inverted)]",
1869
- indicator: "bg-[var(--ui-bg-inverted)]"
2306
+ base: "focus-visible:outline-(--ui-border-inverted)",
2307
+ indicator: "bg-(--ui-bg-inverted)"
1870
2308
  }
1871
2309
  },
1872
2310
  orientation: {
@@ -1928,7 +2366,7 @@ const radioGroup = (options) => ({
1928
2366
  },
1929
2367
  required: {
1930
2368
  true: {
1931
- legend: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2369
+ legend: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
1932
2370
  }
1933
2371
  }
1934
2372
  },
@@ -1941,18 +2379,19 @@ const radioGroup = (options) => ({
1941
2379
  const select = (options) => {
1942
2380
  return defu.defuFn({
1943
2381
  slots: {
1944
- root: () => void 0,
2382
+ root: () => undefined,
1945
2383
  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"],
1946
- value: "truncate group-data-placeholder:text-[var(--ui-text-dimmed)]",
1947
- arrow: "fill-[var(--ui-border)]",
1948
- 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]",
1949
- viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
2384
+ value: "truncate pointer-events-none",
2385
+ placeholder: "truncate text-(--ui-text-dimmed)",
2386
+ arrow: "fill-(--ui-border)",
2387
+ 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",
2388
+ viewport: "divide-y divide-(--ui-border) scroll-py-1",
1950
2389
  group: "p-1 isolate",
1951
- empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
1952
- label: "font-semibold text-[var(--ui-text-highlighted)]",
1953
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1954
- 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"],
1955
- itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
2390
+ empty: "py-2 text-center text-sm text-(--ui-text-muted)",
2391
+ label: "font-semibold text-(--ui-text-highlighted)",
2392
+ separator: "-mx-1 my-1 h-px bg-(--ui-border)",
2393
+ 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"],
2394
+ itemLeadingIcon: ["shrink-0 text-(--ui-text-dimmed) group-data-highlighted:text-(--ui-text)", options.theme.transitions && "transition-colors"],
1956
2395
  itemLeadingAvatar: "shrink-0",
1957
2396
  itemLeadingAvatarSize: "",
1958
2397
  itemLeadingChip: "shrink-0",
@@ -2017,28 +2456,8 @@ const select = (options) => {
2017
2456
  const selectMenu = (options) => {
2018
2457
  return defu.defu({
2019
2458
  slots: {
2020
- value: "truncate",
2021
- placeholder: "truncate text-[var(--ui-text-dimmed)]",
2022
- input: "placeholder:text-[var(--ui-text-dimmed)] border-0 border-b border-[var(--ui-border)] focus:outline-none"
2023
- },
2024
- variants: {
2025
- size: {
2026
- xs: {
2027
- input: "text-xs px-2 py-1"
2028
- },
2029
- sm: {
2030
- input: "text-xs px-2.5 py-1.5"
2031
- },
2032
- md: {
2033
- input: "text-sm px-2.5 py-1.5"
2034
- },
2035
- lg: {
2036
- input: "text-sm px-3 py-2"
2037
- },
2038
- xl: {
2039
- input: "text-base px-3 py-2"
2040
- }
2041
- }
2459
+ input: "border-b border-(--ui-border)",
2460
+ focusScope: "flex flex-col min-h-0"
2042
2461
  }
2043
2462
  }, select(options));
2044
2463
  };
@@ -2047,7 +2466,7 @@ const separator = (options) => ({
2047
2466
  slots: {
2048
2467
  root: "flex items-center align-center text-center",
2049
2468
  border: "",
2050
- container: "font-medium text-[var(--ui-text)] flex",
2469
+ container: "font-medium text-(--ui-text) flex",
2051
2470
  icon: "shrink-0 size-5",
2052
2471
  avatar: "shrink-0",
2053
2472
  avatarSize: "2xs",
@@ -2055,8 +2474,8 @@ const separator = (options) => ({
2055
2474
  },
2056
2475
  variants: {
2057
2476
  color: {
2058
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[var(--ui-${color})]` }])),
2059
- neutral: { border: "border-[var(--ui-border)]" }
2477
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-(--ui-${color})` }])),
2478
+ neutral: { border: "border-(--ui-border)" }
2060
2479
  },
2061
2480
  orientation: {
2062
2481
  horizontal: {
@@ -2138,18 +2557,19 @@ const separator = (options) => ({
2138
2557
  });
2139
2558
 
2140
2559
  const skeleton = {
2141
- base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-[var(--ui-bg-elevated)]"
2560
+ base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-(--ui-bg-elevated)"
2142
2561
  };
2143
2562
 
2144
2563
  const slideover = {
2145
2564
  slots: {
2146
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
2147
- 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",
2148
- header: "px-4 py-5 sm:px-6",
2565
+ overlay: "fixed inset-0 bg-(--ui-bg-elevated)/75",
2566
+ content: "fixed bg-(--ui-bg) divide-y divide-(--ui-border) sm:ring ring-(--ui-border) sm:shadow-lg flex flex-col focus:outline-none",
2567
+ header: "flex items-center gap-1.5 p-4 sm:px-6 min-h-16",
2568
+ wrapper: "",
2149
2569
  body: "flex-1 overflow-y-auto p-4 sm:p-6",
2150
2570
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
2151
- title: "text-[var(--ui-text-highlighted)] font-semibold",
2152
- description: "mt-1 text-[var(--ui-text-muted)] text-sm",
2571
+ title: "text-(--ui-text-highlighted) font-semibold",
2572
+ description: "mt-1 text-(--ui-text-muted) text-sm",
2153
2573
  close: "absolute top-4 end-4"
2154
2574
  },
2155
2575
  variants: {
@@ -2203,19 +2623,19 @@ const slideover = {
2203
2623
  const slider = (options) => ({
2204
2624
  slots: {
2205
2625
  root: "relative flex items-center select-none touch-none",
2206
- track: "relative bg-[var(--ui-bg-accented)] overflow-hidden rounded-full grow",
2626
+ track: "relative bg-(--ui-bg-accented) overflow-hidden rounded-full grow",
2207
2627
  range: "absolute rounded-full",
2208
- thumb: "rounded-full bg-[var(--ui-bg)] ring-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2"
2628
+ thumb: "rounded-full bg-(--ui-bg) ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
2209
2629
  },
2210
2630
  variants: {
2211
2631
  color: {
2212
2632
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2213
- range: `bg-[var(--ui-${color})]`,
2214
- thumb: `ring-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]`
2633
+ range: `bg-(--ui-${color})`,
2634
+ thumb: `ring-(--ui-${color}) focus-visible:outline-(--ui-${color})/50`
2215
2635
  }])),
2216
2636
  neutral: {
2217
- range: "bg-[var(--ui-bg-inverted)]",
2218
- thumb: "ring-[var(--ui-border-inverted)] focus-visible:outline-[var(--ui-border-inverted)]/50"
2637
+ range: "bg-(--ui-bg-inverted)",
2638
+ thumb: "ring-(--ui-border-inverted) focus-visible:outline-(--ui-border-inverted)/50"
2219
2639
  }
2220
2640
  },
2221
2641
  size: {
@@ -2318,26 +2738,150 @@ const slider = (options) => ({
2318
2738
  }
2319
2739
  });
2320
2740
 
2741
+ const stepper = (options) => ({
2742
+ slots: {
2743
+ root: "flex gap-4",
2744
+ header: "flex",
2745
+ item: "group text-center relative w-full",
2746
+ container: "relative",
2747
+ 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",
2748
+ indicator: "flex items-center justify-center size-full",
2749
+ icon: "shrink-0",
2750
+ separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-(--ui-border-accented)",
2751
+ wrapper: "",
2752
+ title: "font-medium text-(--ui-text)",
2753
+ description: "text-(--ui-text-muted) text-wrap",
2754
+ content: "size-full"
2755
+ },
2756
+ variants: {
2757
+ orientation: {
2758
+ horizontal: {
2759
+ root: "flex-col",
2760
+ container: "flex justify-center",
2761
+ separator: "top-[calc(50%-2px)] h-0.5",
2762
+ wrapper: "mt-1"
2763
+ },
2764
+ vertical: {
2765
+ header: "flex-col gap-4",
2766
+ item: "flex text-start",
2767
+ separator: "start-[calc(50%-1px)] -bottom-[10px] w-0.5"
2768
+ }
2769
+ },
2770
+ size: {
2771
+ xs: {
2772
+ trigger: "size-6 text-xs",
2773
+ icon: "size-3",
2774
+ title: "text-xs",
2775
+ description: "text-xs",
2776
+ wrapper: "mt-1.5"
2777
+ },
2778
+ sm: {
2779
+ trigger: "size-8 text-sm",
2780
+ icon: "size-4",
2781
+ title: "text-xs",
2782
+ description: "text-xs",
2783
+ wrapper: "mt-2"
2784
+ },
2785
+ md: {
2786
+ trigger: "size-10 text-base",
2787
+ icon: "size-5",
2788
+ title: "text-sm",
2789
+ description: "text-sm",
2790
+ wrapper: "mt-2.5"
2791
+ },
2792
+ lg: {
2793
+ trigger: "size-12 text-lg",
2794
+ icon: "size-6",
2795
+ title: "text-base",
2796
+ description: "text-base",
2797
+ wrapper: "mt-3"
2798
+ },
2799
+ xl: {
2800
+ trigger: "size-14 text-xl",
2801
+ icon: "size-7",
2802
+ title: "text-lg",
2803
+ description: "text-lg",
2804
+ wrapper: "mt-3.5"
2805
+ }
2806
+ },
2807
+ color: {
2808
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2809
+ trigger: `group-data-[state=completed]:bg-(--ui-${color}) group-data-[state=active]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
2810
+ separator: `group-data-[state=completed]:bg-(--ui-${color})`
2811
+ }])),
2812
+ neutral: {
2813
+ trigger: `group-data-[state=completed]:bg-(--ui-bg-inverted) group-data-[state=active]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)`,
2814
+ separator: `group-data-[state=completed]:bg-(--ui-bg-inverted)`
2815
+ }
2816
+ }
2817
+ },
2818
+ compoundVariants: [{
2819
+ orientation: "horizontal",
2820
+ size: "xs",
2821
+ class: { separator: "start-[calc(50%+16px)] end-[calc(-50%+16px)]" }
2822
+ }, {
2823
+ orientation: "horizontal",
2824
+ size: "sm",
2825
+ class: { separator: "start-[calc(50%+20px)] end-[calc(-50%+20px)]" }
2826
+ }, {
2827
+ orientation: "horizontal",
2828
+ size: "md",
2829
+ class: { separator: "start-[calc(50%+28px)] end-[calc(-50%+28px)]" }
2830
+ }, {
2831
+ orientation: "horizontal",
2832
+ size: "lg",
2833
+ class: { separator: "start-[calc(50%+32px)] end-[calc(-50%+32px)]" }
2834
+ }, {
2835
+ orientation: "horizontal",
2836
+ size: "xl",
2837
+ class: { separator: "start-[calc(50%+36px)] end-[calc(-50%+36px)]" }
2838
+ }, {
2839
+ orientation: "vertical",
2840
+ size: "xs",
2841
+ class: { separator: "top-[30px]", item: "gap-1.5" }
2842
+ }, {
2843
+ orientation: "vertical",
2844
+ size: "sm",
2845
+ class: { separator: "top-[38px]", item: "gap-2" }
2846
+ }, {
2847
+ orientation: "vertical",
2848
+ size: "md",
2849
+ class: { separator: "top-[46px]", item: "gap-2.5" }
2850
+ }, {
2851
+ orientation: "vertical",
2852
+ size: "lg",
2853
+ class: { separator: "top-[54px]", item: "gap-3" }
2854
+ }, {
2855
+ orientation: "vertical",
2856
+ size: "xl",
2857
+ class: { separator: "top-[62px]", item: "gap-3.5" }
2858
+ }],
2859
+ defaultVariants: {
2860
+ size: "md",
2861
+ color: "primary"
2862
+ }
2863
+ });
2864
+
2321
2865
  const _switch = (options) => ({
2322
2866
  slots: {
2323
2867
  root: "relative flex items-start",
2324
- 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"],
2868
+ 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"],
2325
2869
  container: "flex items-center",
2326
- 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",
2327
- 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"],
2870
+ 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",
2871
+ 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"],
2328
2872
  wrapper: "ms-2",
2329
- label: "block font-medium text-[var(--ui-text)]",
2330
- description: "text-[var(--ui-text-muted)]"
2873
+ label: "block font-medium text-(--ui-text)",
2874
+ description: "text-(--ui-text-muted)"
2331
2875
  },
2332
2876
  variants: {
2333
2877
  color: {
2334
2878
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2335
- base: `data-[state=checked]:bg-[var(--ui-${color})] focus-visible:ring-[var(--ui-${color})]`,
2336
- icon: `group-data-[state=checked]:text-[var(--ui-${color})]`
2879
+ base: `data-[state=checked]:bg-(--ui-${color}) focus-visible:outline-(--ui-${color})`,
2880
+ icon: `group-data-[state=checked]:text-(--ui-${color})`
2337
2881
  }])),
2338
2882
  neutral: {
2339
- base: "data-[state=checked]:bg-[var(--ui-bg-inverted)] focus-visible:ring-[var(--ui-border-inverted)]",
2340
- icon: "group-data-[state=checked]:text-[var(--ui-text-highlighted)]"
2883
+ base: "data-[state=checked]:bg-(--ui-bg-inverted) focus-visible:outline-(--ui-border-inverted)",
2884
+ icon: "group-data-[state=checked]:text-(--ui-text-highlighted)"
2341
2885
  }
2342
2886
  },
2343
2887
  size: {
@@ -2389,7 +2933,7 @@ const _switch = (options) => ({
2389
2933
  },
2390
2934
  required: {
2391
2935
  true: {
2392
- label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2936
+ label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
2393
2937
  }
2394
2938
  },
2395
2939
  disabled: {
@@ -2410,23 +2954,24 @@ const table = (options) => ({
2410
2954
  slots: {
2411
2955
  root: "relative overflow-auto",
2412
2956
  base: "min-w-full overflow-clip",
2413
- 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)]",
2414
- tbody: "divide-y divide-[var(--ui-border)]",
2415
- tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
2416
- 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",
2417
- td: "p-4 text-sm text-[var(--ui-text-muted)] whitespace-nowrap [&:has([role=checkbox])]:pe-0",
2418
- empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]"
2957
+ caption: "sr-only",
2958
+ thead: "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
2959
+ 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)",
2960
+ tr: "data-[selected=true]:bg-(--ui-bg-elevated)/50",
2961
+ th: "px-4 py-3.5 text-sm text-(--ui-text-highlighted) text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
2962
+ td: "p-4 text-sm text-(--ui-text-muted) whitespace-nowrap [&:has([role=checkbox])]:pe-0",
2963
+ empty: "py-6 text-center text-sm text-(--ui-text-muted)"
2419
2964
  },
2420
2965
  variants: {
2421
2966
  pinned: {
2422
2967
  true: {
2423
- th: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2424
- td: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
2968
+ th: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2969
+ td: "sticky bg-(--ui-bg)/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
2425
2970
  }
2426
2971
  },
2427
2972
  sticky: {
2428
2973
  true: {
2429
- thead: "sticky top-0 inset-x-0 bg-[var(--ui-bg)]/75 z-[1] backdrop-blur"
2974
+ thead: "sticky top-0 inset-x-0 bg-(--ui-bg)/75 z-[1] backdrop-blur"
2430
2975
  }
2431
2976
  },
2432
2977
  loading: {
@@ -2449,25 +2994,25 @@ const table = (options) => ({
2449
2994
  loading: true,
2450
2995
  loadingColor,
2451
2996
  class: {
2452
- thead: `after:bg-[var(--ui-${loadingColor})]`
2997
+ thead: `after:bg-(--ui-${loadingColor})`
2453
2998
  }
2454
2999
  })), {
2455
3000
  loading: true,
2456
3001
  loadingColor: "neutral",
2457
3002
  class: {
2458
- thead: "after:bg-[var(--ui-bg-inverted)]"
3003
+ thead: "after:bg-(--ui-bg-inverted)"
2459
3004
  }
2460
3005
  }, {
2461
3006
  loading: true,
2462
3007
  loadingAnimation: "carousel",
2463
3008
  class: {
2464
- thead: "after:animate-[carousel_2s_ease-in-out_infinite]"
3009
+ thead: "after:animate-[carousel_2s_ease-in-out_infinite] rtl:after:animate-[carousel-rtl_2s_ease-in-out_infinite]"
2465
3010
  }
2466
3011
  }, {
2467
3012
  loading: true,
2468
3013
  loadingAnimation: "carousel-inverse",
2469
3014
  class: {
2470
- thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite]"
3015
+ thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite] rtl:after:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"
2471
3016
  }
2472
3017
  }, {
2473
3018
  loading: true,
@@ -2493,7 +3038,7 @@ const tabs = (options) => ({
2493
3038
  root: "flex items-center gap-2",
2494
3039
  list: "relative flex p-1 group",
2495
3040
  indicator: "absolute transition-[translate,width] duration-200",
2496
- 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"],
3041
+ 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"],
2497
3042
  content: "focus:outline-none w-full",
2498
3043
  leadingIcon: "shrink-0",
2499
3044
  leadingAvatar: "shrink-0",
@@ -2507,12 +3052,12 @@ const tabs = (options) => ({
2507
3052
  },
2508
3053
  variant: {
2509
3054
  pill: {
2510
- list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
3055
+ list: "bg-(--ui-bg-elevated) rounded-[calc(var(--ui-radius)*2)]",
2511
3056
  trigger: "flex-1 w-full",
2512
- indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-sm"
3057
+ indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
2513
3058
  },
2514
3059
  link: {
2515
- list: "border-[var(--ui-border)]",
3060
+ list: "border-(--ui-border)",
2516
3061
  indicator: "rounded-full"
2517
3062
  }
2518
3063
  },
@@ -2520,12 +3065,12 @@ const tabs = (options) => ({
2520
3065
  horizontal: {
2521
3066
  root: "flex-col",
2522
3067
  list: "w-full",
2523
- indicator: "left-0 w-[var(--radix-tabs-indicator-size)] translate-x-[var(--radix-tabs-indicator-position)]",
3068
+ indicator: "left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)",
2524
3069
  trigger: "justify-center"
2525
3070
  },
2526
3071
  vertical: {
2527
3072
  list: "flex-col",
2528
- indicator: "top-0 h-[var(--radix-tabs-indicator-size)] translate-y-[var(--radix-tabs-indicator-position)]"
3073
+ indicator: "top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)"
2529
3074
  }
2530
3075
  },
2531
3076
  size: {
@@ -2587,29 +3132,29 @@ const tabs = (options) => ({
2587
3132
  color,
2588
3133
  variant: "pill",
2589
3134
  class: {
2590
- indicator: `bg-[var(--ui-${color})]`,
2591
- trigger: `data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
3135
+ indicator: `bg-(--ui-${color})`,
3136
+ trigger: `data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-${color})`
2592
3137
  }
2593
3138
  })), {
2594
3139
  color: "neutral",
2595
3140
  variant: "pill",
2596
3141
  class: {
2597
- indicator: "bg-[var(--ui-bg-inverted)]",
2598
- trigger: "data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
3142
+ indicator: "bg-(--ui-bg-inverted)",
3143
+ trigger: "data-[state=active]:text-(--ui-bg) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ui-border-inverted)"
2599
3144
  }
2600
3145
  }, ...(options.theme.colors || []).map((color) => ({
2601
3146
  color,
2602
3147
  variant: "link",
2603
3148
  class: {
2604
- indicator: `bg-[var(--ui-${color})]`,
2605
- trigger: `data-[state=active]:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
3149
+ indicator: `bg-(--ui-${color})`,
3150
+ trigger: `data-[state=active]:text-(--ui-${color}) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
2606
3151
  }
2607
3152
  })), {
2608
3153
  color: "neutral",
2609
3154
  variant: "link",
2610
3155
  class: {
2611
- indicator: "bg-[var(--ui-bg-inverted)]",
2612
- trigger: "data-[state=active]:text-[var(--ui-text-highlighted)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
3156
+ indicator: "bg-(--ui-bg-inverted)",
3157
+ trigger: "data-[state=active]:text-(--ui-text-highlighted) focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
2613
3158
  }
2614
3159
  }],
2615
3160
  defaultVariants: {
@@ -2625,38 +3170,43 @@ const textarea = (options) => {
2625
3170
 
2626
3171
  const toast = (options) => ({
2627
3172
  slots: {
2628
- 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",
2629
- wrapper: "w-0 flex-1 flex flex-col gap-1",
2630
- title: "text-sm font-medium text-[var(--ui-text-highlighted)]",
2631
- description: "text-sm text-[var(--ui-text-muted)]",
3173
+ 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",
3174
+ wrapper: "w-0 flex-1 flex flex-col",
3175
+ title: "text-sm font-medium text-(--ui-text-highlighted)",
3176
+ description: "text-sm text-(--ui-text-muted)",
2632
3177
  icon: "shrink-0 size-5",
2633
3178
  avatar: "shrink-0",
2634
3179
  avatarSize: "2xl",
2635
3180
  actions: "flex gap-1.5 shrink-0",
2636
3181
  progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
2637
- close: "p-0.5"
3182
+ close: "p-0"
2638
3183
  },
2639
3184
  variants: {
2640
3185
  color: {
2641
3186
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2642
- root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`,
2643
- icon: `text-[var(--ui-${color})]`,
2644
- progress: `bg-[var(--ui-${color})]`
3187
+ root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`,
3188
+ icon: `text-(--ui-${color})`,
3189
+ progress: `bg-(--ui-${color})`
2645
3190
  }])),
2646
3191
  neutral: {
2647
- root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]",
2648
- icon: "text-[var(--ui-text-highlighted)]",
2649
- progress: "bg-[var(--ui-bg-inverted)]"
3192
+ root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)",
3193
+ icon: "text-(--ui-text-highlighted)",
3194
+ progress: "bg-(--ui-bg-inverted)"
2650
3195
  }
2651
3196
  },
2652
- multiline: {
2653
- true: {
2654
- root: "items-start",
2655
- actions: "items-start mt-1"
2656
- },
2657
- false: {
3197
+ orientation: {
3198
+ horizontal: {
2658
3199
  root: "items-center",
2659
3200
  actions: "items-center"
3201
+ },
3202
+ vertical: {
3203
+ root: "items-start",
3204
+ actions: "items-start mt-2.5"
3205
+ }
3206
+ },
3207
+ title: {
3208
+ true: {
3209
+ description: "mt-1"
2660
3210
  }
2661
3211
  }
2662
3212
  },
@@ -2667,8 +3217,8 @@ const toast = (options) => ({
2667
3217
 
2668
3218
  const toaster = {
2669
3219
  slots: {
2670
- viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
2671
- base: "absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
3220
+ viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
3221
+ 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"
2672
3222
  },
2673
3223
  variants: {
2674
3224
  position: {
@@ -2712,10 +3262,10 @@ const toaster = {
2712
3262
  }
2713
3263
  }, {
2714
3264
  swipeDirection: ["left", "right"],
2715
- 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"
3265
+ 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"
2716
3266
  }, {
2717
3267
  swipeDirection: ["up", "down"],
2718
- 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"
3268
+ 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"
2719
3269
  }],
2720
3270
  defaultVariants: {
2721
3271
  position: "bottom-right"
@@ -2724,14 +3274,95 @@ const toaster = {
2724
3274
 
2725
3275
  const tooltip = {
2726
3276
  slots: {
2727
- content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
2728
- arrow: "fill-[var(--ui-border)]",
3277
+ 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",
3278
+ arrow: "fill-(--ui-border)",
2729
3279
  text: "truncate",
2730
3280
  kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
2731
3281
  kbdsSize: "sm"
2732
3282
  }
2733
3283
  };
2734
3284
 
3285
+ const tree = (options) => ({
3286
+ slots: {
3287
+ root: "relative isolate",
3288
+ item: "",
3289
+ listWithChildren: "ms-4.5 border-s border-(--ui-border)",
3290
+ itemWithChildren: "ps-1.5 -ms-px",
3291
+ 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",
3292
+ linkLeadingIcon: "shrink-0",
3293
+ linkLabel: "truncate",
3294
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
3295
+ linkTrailingIcon: "shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"
3296
+ },
3297
+ variants: {
3298
+ color: {
3299
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
3300
+ link: `focus-visible:before:ring-(--ui-${color})`
3301
+ }])),
3302
+ neutral: {
3303
+ link: "focus-visible:before:ring-(--ui-border-inverted)"
3304
+ }
3305
+ },
3306
+ size: {
3307
+ xs: {
3308
+ link: "px-2 py-1 text-xs gap-1",
3309
+ linkLeadingIcon: "size-4",
3310
+ linkTrailingIcon: "size-4"
3311
+ },
3312
+ sm: {
3313
+ link: "px-2.5 py-1.5 text-xs gap-1.5",
3314
+ linkLeadingIcon: "size-4",
3315
+ linkTrailingIcon: "size-4"
3316
+ },
3317
+ md: {
3318
+ link: "px-2.5 py-1.5 text-sm gap-1.5",
3319
+ linkLeadingIcon: "size-5",
3320
+ linkTrailingIcon: "size-5"
3321
+ },
3322
+ lg: {
3323
+ link: "px-3 py-2 text-sm gap-2",
3324
+ linkLeadingIcon: "size-5",
3325
+ linkTrailingIcon: "size-5"
3326
+ },
3327
+ xl: {
3328
+ link: "px-3 py-2 text-base gap-2",
3329
+ linkLeadingIcon: "size-6",
3330
+ linkTrailingIcon: "size-6"
3331
+ }
3332
+ },
3333
+ selected: {
3334
+ true: {
3335
+ link: "before:bg-(--ui-bg-elevated)"
3336
+ },
3337
+ false: {
3338
+ 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"]
3339
+ }
3340
+ },
3341
+ disabled: {
3342
+ true: {
3343
+ link: "cursor-not-allowed opacity-75"
3344
+ }
3345
+ }
3346
+ },
3347
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
3348
+ color,
3349
+ selected: true,
3350
+ class: {
3351
+ link: `text-(--ui-${color})`
3352
+ }
3353
+ })), {
3354
+ color: "neutral",
3355
+ selected: true,
3356
+ class: {
3357
+ link: "text-(--ui-text-highlighted)"
3358
+ }
3359
+ }],
3360
+ defaultVariants: {
3361
+ color: "primary",
3362
+ size: "md"
3363
+ }
3364
+ });
3365
+
2735
3366
  const theme = {
2736
3367
  __proto__: null,
2737
3368
  accordion: accordion,
@@ -2742,11 +3373,13 @@ const theme = {
2742
3373
  breadcrumb: breadcrumb,
2743
3374
  button: button,
2744
3375
  buttonGroup: buttonGroup,
3376
+ calendar: calendar,
2745
3377
  card: card,
2746
3378
  carousel: carousel,
2747
3379
  checkbox: checkbox,
2748
3380
  chip: chip,
2749
3381
  collapsible: collapsible,
3382
+ colorPicker: colorPicker,
2750
3383
  commandPalette: commandPalette,
2751
3384
  container: container,
2752
3385
  contextMenu: contextMenu,
@@ -2756,11 +3389,13 @@ const theme = {
2756
3389
  formField: formField,
2757
3390
  input: input,
2758
3391
  inputMenu: inputMenu,
3392
+ inputNumber: inputNumber,
2759
3393
  kbd: kbd,
2760
3394
  link: link,
2761
3395
  modal: modal,
2762
3396
  navigationMenu: navigationMenu,
2763
3397
  pagination: pagination,
3398
+ pinInput: pinInput,
2764
3399
  popover: popover,
2765
3400
  progress: progress,
2766
3401
  radioGroup: radioGroup,
@@ -2770,21 +3405,17 @@ const theme = {
2770
3405
  skeleton: skeleton,
2771
3406
  slideover: slideover,
2772
3407
  slider: slider,
3408
+ stepper: stepper,
2773
3409
  switch: _switch,
2774
3410
  table: table,
2775
3411
  tabs: tabs,
2776
3412
  textarea: textarea,
2777
3413
  toast: toast,
2778
3414
  toaster: toaster,
2779
- tooltip: tooltip
3415
+ tooltip: tooltip,
3416
+ tree: tree
2780
3417
  };
2781
3418
 
2782
- function buildTemplates(options) {
2783
- return Object.entries(theme).reduce((acc, [key, component]) => {
2784
- acc[key] = typeof component === "function" ? component(options) : component;
2785
- return acc;
2786
- }, {});
2787
- }
2788
3419
  function getTemplates(options, uiConfig) {
2789
3420
  const templates = [];
2790
3421
  for (const component in theme) {
@@ -2794,19 +3425,52 @@ function getTemplates(options, uiConfig) {
2794
3425
  getContents: async () => {
2795
3426
  const template = theme[component];
2796
3427
  const result = typeof template === "function" ? template(options) : template;
2797
- const variants = Object.keys(result.variants || {});
3428
+ const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
3429
+ const keys = Object.keys(values);
3430
+ return keys.some((key) => key !== "true" && key !== "false");
3431
+ }).map(([key]) => key);
2798
3432
  let json = JSON.stringify(result, null, 2);
2799
3433
  for (const variant of variants) {
2800
- json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), "$1 as const");
3434
+ json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
2801
3435
  json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
2802
- const replaced = match.replace(/("[^"]+")/g, "$1 as const");
3436
+ const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
2803
3437
  return `${before}${replaced}${after}`;
2804
3438
  });
2805
3439
  }
2806
- return `export default ${json}`;
3440
+ function generateVariantDeclarations(variants2) {
3441
+ return variants2.map((variant) => {
3442
+ const keys = Object.keys(result.variants[variant]);
3443
+ return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
3444
+ });
3445
+ }
3446
+ return [
3447
+ ...generateVariantDeclarations(variants),
3448
+ `export default ${json}`
3449
+ ].join("\n\n");
2807
3450
  }
2808
3451
  });
2809
3452
  }
3453
+ templates.push({
3454
+ filename: "ui.css",
3455
+ write: true,
3456
+ getContents: () => `@source "./ui";
3457
+
3458
+ @theme default static {
3459
+ --color-old-neutral-50: ${colors__default.neutral[50]};
3460
+ --color-old-neutral-100: ${colors__default.neutral[100]};
3461
+ --color-old-neutral-200: ${colors__default.neutral[200]};
3462
+ --color-old-neutral-300: ${colors__default.neutral[300]};
3463
+ --color-old-neutral-400: ${colors__default.neutral[400]};
3464
+ --color-old-neutral-500: ${colors__default.neutral[500]};
3465
+ --color-old-neutral-600: ${colors__default.neutral[600]};
3466
+ --color-old-neutral-700: ${colors__default.neutral[700]};
3467
+ --color-old-neutral-800: ${colors__default.neutral[800]};
3468
+ --color-old-neutral-900: ${colors__default.neutral[900]};
3469
+ --color-old-neutral-950: ${colors__default.neutral[950]};
3470
+ ${[...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 ")}
3471
+ }
3472
+ `
3473
+ });
2810
3474
  templates.push({
2811
3475
  filename: "ui/index.ts",
2812
3476
  write: true,
@@ -2815,13 +3479,14 @@ function getTemplates(options, uiConfig) {
2815
3479
  templates.push({
2816
3480
  filename: "types/ui.d.ts",
2817
3481
  getContents: () => `import * as ui from '#build/ui'
2818
- import type { DeepPartial } from '#ui/types/utils'
3482
+ import type { DeepPartial } from '@nuxt/ui'
3483
+ import type { defaultConfig } from 'tailwind-variants'
2819
3484
  import colors from 'tailwindcss/colors'
2820
3485
 
2821
3486
  const icons = ${JSON.stringify(uiConfig.icons)};
2822
3487
 
2823
- type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
2824
- type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor>
3488
+ type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | (string & {})
3489
+ type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
2825
3490
 
2826
3491
  type AppConfigUI = {
2827
3492
  colors?: {
@@ -2829,6 +3494,7 @@ type AppConfigUI = {
2829
3494
  neutral?: NeutralColor
2830
3495
  }
2831
3496
  icons?: Partial<typeof icons>
3497
+ tv?: typeof defaultConfig
2832
3498
  } & DeepPartial<typeof ui>
2833
3499
 
2834
3500
  declare module '@nuxt/schema' {
@@ -2865,7 +3531,6 @@ function addTemplates(options, nuxt, resolve) {
2865
3531
  }
2866
3532
 
2867
3533
  exports.addTemplates = addTemplates;
2868
- exports.buildTemplates = buildTemplates;
2869
3534
  exports.defaultOptions = defaultOptions;
2870
3535
  exports.getDefaultUiConfig = getDefaultUiConfig;
2871
3536
  exports.getTemplates = getTemplates;