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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/.nuxt/ui/accordion.ts +2 -2
  2. package/.nuxt/ui/alert.ts +122 -95
  3. package/.nuxt/ui/avatar-group.ts +14 -2
  4. package/.nuxt/ui/avatar.ts +16 -4
  5. package/.nuxt/ui/badge.ts +139 -93
  6. package/.nuxt/ui/breadcrumb.ts +5 -5
  7. package/.nuxt/ui/button-group.ts +13 -0
  8. package/.nuxt/ui/button.ts +167 -136
  9. package/.nuxt/ui/calendar.ts +103 -0
  10. package/.nuxt/ui/card.ts +27 -1
  11. package/.nuxt/ui/carousel.ts +7 -5
  12. package/.nuxt/ui/checkbox.ts +45 -27
  13. package/.nuxt/ui/chip.ts +44 -15
  14. package/.nuxt/ui/color-picker.ts +47 -0
  15. package/.nuxt/ui/command-palette.ts +28 -18
  16. package/.nuxt/ui/container.ts +1 -1
  17. package/.nuxt/ui/context-menu.ts +64 -46
  18. package/.nuxt/ui/drawer.ts +83 -15
  19. package/.nuxt/ui/dropdown-menu.ts +65 -47
  20. package/.nuxt/ui/form-field.ts +15 -7
  21. package/.nuxt/ui/index.ts +5 -1
  22. package/.nuxt/ui/input-menu.ts +150 -116
  23. package/.nuxt/ui/input-number.ts +102 -71
  24. package/.nuxt/ui/input.ts +111 -76
  25. package/.nuxt/ui/kbd.ts +18 -6
  26. package/.nuxt/ui/link.ts +3 -3
  27. package/.nuxt/ui/modal.ts +8 -7
  28. package/.nuxt/ui/navigation-menu.ts +244 -131
  29. package/.nuxt/ui/pin-input.ts +77 -51
  30. package/.nuxt/ui/popover.ts +2 -2
  31. package/.nuxt/ui/progress.ts +111 -72
  32. package/.nuxt/ui/radio-group.ts +45 -22
  33. package/.nuxt/ui/select-menu.ts +122 -86
  34. package/.nuxt/ui/select.ts +120 -84
  35. package/.nuxt/ui/separator.ts +60 -31
  36. package/.nuxt/ui/skeleton.ts +1 -1
  37. package/.nuxt/ui/slideover.ts +17 -9
  38. package/.nuxt/ui/slider.ts +61 -38
  39. package/.nuxt/ui/stepper.ts +202 -0
  40. package/.nuxt/ui/switch.ts +40 -22
  41. package/.nuxt/ui/table.ts +48 -31
  42. package/.nuxt/ui/tabs.ts +100 -72
  43. package/.nuxt/ui/textarea.ts +111 -76
  44. package/.nuxt/ui/toast.ts +53 -33
  45. package/.nuxt/ui/toaster.ts +31 -15
  46. package/.nuxt/ui/tooltip.ts +2 -2
  47. package/.nuxt/ui/tree.ts +154 -0
  48. package/.nuxt/ui.css +92 -0
  49. package/README.md +19 -8
  50. package/cli/commands/make/component.mjs +12 -0
  51. package/cli/package.json +2 -2
  52. package/cli/templates.mjs +27 -22
  53. package/dist/module.cjs +9 -171
  54. package/dist/module.d.cts +5 -15
  55. package/dist/module.d.mts +5 -15
  56. package/dist/module.d.ts +5 -15
  57. package/dist/module.json +2 -2
  58. package/dist/module.mjs +12 -168
  59. package/dist/runtime/components/Accordion.vue +8 -39
  60. package/dist/runtime/components/Alert.vue +22 -21
  61. package/dist/runtime/components/App.vue +9 -15
  62. package/dist/runtime/components/Avatar.vue +33 -21
  63. package/dist/runtime/components/AvatarGroup.vue +5 -7
  64. package/dist/runtime/components/Badge.vue +10 -8
  65. package/dist/runtime/components/Breadcrumb.vue +5 -31
  66. package/dist/runtime/components/Button.vue +5 -8
  67. package/dist/runtime/components/ButtonGroup.vue +5 -7
  68. package/dist/runtime/components/Calendar.vue +194 -0
  69. package/dist/runtime/components/Card.vue +10 -9
  70. package/dist/runtime/components/Carousel.vue +15 -10
  71. package/dist/runtime/components/Checkbox.vue +32 -38
  72. package/dist/runtime/components/Chip.vue +6 -8
  73. package/dist/runtime/components/Collapsible.vue +10 -11
  74. package/dist/runtime/components/ColorPicker.vue +297 -0
  75. package/dist/runtime/components/CommandPalette.vue +111 -97
  76. package/dist/runtime/components/Container.vue +4 -7
  77. package/dist/runtime/components/ContextMenu.vue +16 -69
  78. package/dist/runtime/components/ContextMenuContent.vue +12 -10
  79. package/dist/runtime/components/Drawer.vue +23 -12
  80. package/dist/runtime/components/DropdownMenu.vue +18 -59
  81. package/dist/runtime/components/DropdownMenuContent.vue +12 -10
  82. package/dist/runtime/components/Form.vue +65 -34
  83. package/dist/runtime/components/FormField.vue +22 -13
  84. package/dist/runtime/components/Icon.vue +1 -1
  85. package/dist/runtime/components/Input.vue +15 -7
  86. package/dist/runtime/components/InputMenu.vue +95 -104
  87. package/dist/runtime/components/InputNumber.vue +14 -9
  88. package/dist/runtime/components/Kbd.vue +5 -6
  89. package/dist/runtime/components/Link.vue +5 -8
  90. package/dist/runtime/components/LinkBase.vue +1 -1
  91. package/dist/runtime/components/Modal.vue +51 -38
  92. package/dist/runtime/components/NavigationMenu.vue +129 -114
  93. package/dist/runtime/components/OverlayProvider.vue +28 -0
  94. package/dist/runtime/components/Pagination.vue +6 -9
  95. package/dist/runtime/components/PinInput.vue +10 -11
  96. package/dist/runtime/components/Popover.vue +16 -18
  97. package/dist/runtime/components/Progress.vue +28 -12
  98. package/dist/runtime/components/RadioGroup.vue +9 -12
  99. package/dist/runtime/components/Select.vue +60 -34
  100. package/dist/runtime/components/SelectMenu.vue +160 -165
  101. package/dist/runtime/components/Separator.vue +6 -5
  102. package/dist/runtime/components/Skeleton.vue +4 -7
  103. package/dist/runtime/components/Slideover.vue +51 -37
  104. package/dist/runtime/components/Slider.vue +8 -7
  105. package/dist/runtime/components/Stepper.vue +170 -0
  106. package/dist/runtime/components/Switch.vue +19 -23
  107. package/dist/runtime/components/Table.vue +146 -31
  108. package/dist/runtime/components/Tabs.vue +12 -31
  109. package/dist/runtime/components/Textarea.vue +17 -8
  110. package/dist/runtime/components/Toast.vue +36 -25
  111. package/dist/runtime/components/Toaster.vue +10 -11
  112. package/dist/runtime/components/Tooltip.vue +9 -12
  113. package/dist/runtime/components/Tree.vue +196 -0
  114. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  115. package/dist/runtime/composables/defineShortcuts.js +2 -2
  116. package/dist/runtime/composables/useFormField.d.ts +7 -3
  117. package/dist/runtime/composables/useFormField.js +18 -8
  118. package/dist/runtime/composables/useLocale.js +1 -1
  119. package/dist/runtime/composables/useOverlay.d.ts +30 -0
  120. package/dist/runtime/composables/useOverlay.js +70 -0
  121. package/dist/runtime/composables/useToast.d.ts +4 -3
  122. package/dist/runtime/composables/useToast.js +20 -6
  123. package/dist/runtime/index.css +1 -1
  124. package/dist/runtime/keyframes.css +1 -1
  125. package/dist/runtime/locale/ar.js +9 -1
  126. package/dist/runtime/locale/az.js +54 -0
  127. package/dist/runtime/locale/bn.js +54 -0
  128. package/dist/runtime/locale/cs.js +9 -1
  129. package/dist/runtime/locale/da.d.ts +2 -0
  130. package/dist/runtime/locale/da.js +54 -0
  131. package/dist/runtime/locale/de.js +11 -3
  132. package/dist/runtime/locale/el.d.ts +2 -0
  133. package/dist/runtime/locale/el.js +54 -0
  134. package/dist/runtime/locale/en.js +9 -1
  135. package/dist/runtime/locale/es.js +9 -1
  136. package/dist/runtime/locale/et.d.ts +2 -0
  137. package/dist/runtime/locale/et.js +54 -0
  138. package/dist/runtime/locale/fa_ir.js +9 -1
  139. package/dist/runtime/locale/fi.d.ts +2 -0
  140. package/dist/runtime/locale/fi.js +54 -0
  141. package/dist/runtime/locale/fr.js +9 -1
  142. package/dist/runtime/locale/he.d.ts +2 -0
  143. package/dist/runtime/locale/he.js +53 -0
  144. package/dist/runtime/locale/hi.d.ts +2 -0
  145. package/dist/runtime/locale/hi.js +54 -0
  146. package/dist/runtime/locale/hu.d.ts +2 -0
  147. package/dist/runtime/locale/hu.js +54 -0
  148. package/dist/runtime/locale/id.d.ts +2 -0
  149. package/dist/runtime/locale/id.js +54 -0
  150. package/dist/runtime/locale/index.d.ts +25 -3
  151. package/dist/runtime/locale/index.js +25 -3
  152. package/dist/runtime/locale/it.js +9 -1
  153. package/dist/runtime/locale/ja.d.ts +2 -0
  154. package/dist/runtime/locale/ja.js +54 -0
  155. package/dist/runtime/locale/km.d.ts +2 -0
  156. package/dist/runtime/locale/km.js +54 -0
  157. package/dist/runtime/locale/ko.d.ts +2 -0
  158. package/dist/runtime/locale/ko.js +54 -0
  159. package/dist/runtime/locale/nb_no.d.ts +2 -0
  160. package/dist/runtime/locale/nb_no.js +54 -0
  161. package/dist/runtime/locale/nl.d.ts +2 -0
  162. package/dist/runtime/locale/nl.js +54 -0
  163. package/dist/runtime/locale/pl.js +9 -1
  164. package/dist/runtime/locale/pt.d.ts +2 -0
  165. package/dist/runtime/locale/pt.js +54 -0
  166. package/dist/runtime/locale/pt_br.d.ts +2 -0
  167. package/dist/runtime/locale/pt_br.js +54 -0
  168. package/dist/runtime/locale/ru.js +9 -1
  169. package/dist/runtime/locale/sk.d.ts +2 -0
  170. package/dist/runtime/locale/sk.js +54 -0
  171. package/dist/runtime/locale/sv.d.ts +2 -0
  172. package/dist/runtime/locale/sv.js +54 -0
  173. package/dist/runtime/locale/th.d.ts +2 -0
  174. package/dist/runtime/locale/th.js +54 -0
  175. package/dist/runtime/locale/tr.d.ts +2 -0
  176. package/dist/runtime/locale/tr.js +54 -0
  177. package/dist/runtime/locale/uk.d.ts +2 -0
  178. package/dist/runtime/locale/uk.js +54 -0
  179. package/dist/runtime/locale/vi.d.ts +2 -0
  180. package/dist/runtime/locale/vi.js +54 -0
  181. package/dist/runtime/locale/zh_cn.d.ts +2 -0
  182. package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +10 -2
  183. package/dist/runtime/locale/zh_tw.d.ts +2 -0
  184. package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +16 -8
  185. package/dist/runtime/plugins/colors.js +8 -5
  186. package/dist/runtime/types/form.d.ts +24 -15
  187. package/dist/runtime/types/form.js +2 -2
  188. package/dist/runtime/types/index.d.ts +5 -0
  189. package/dist/runtime/types/index.js +5 -0
  190. package/dist/runtime/types/locale.d.ts +8 -0
  191. package/dist/runtime/types/utils.d.ts +7 -3
  192. package/dist/runtime/utils/form.d.ts +4 -4
  193. package/dist/runtime/utils/form.js +6 -8
  194. package/dist/runtime/utils/index.d.ts +1 -1
  195. package/dist/runtime/utils/index.js +15 -2
  196. package/dist/runtime/utils/tv.d.ts +1 -0
  197. package/dist/runtime/utils/tv.js +4 -0
  198. package/dist/runtime/vue/components/Icon.vue +2 -2
  199. package/dist/runtime/vue/components/Link.vue +87 -23
  200. package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
  201. package/dist/runtime/vue/composables/useAppConfig.js +2 -0
  202. package/dist/runtime/vue/plugins/head.d.ts +1 -1
  203. package/dist/runtime/vue/plugins/head.js +3 -3
  204. package/dist/runtime/vue/stubs.d.ts +19 -0
  205. package/dist/runtime/vue/stubs.js +37 -0
  206. package/dist/shared/{ui.d52SSCwA.mjs → ui.DSPu6Y8j.mjs} +905 -401
  207. package/dist/shared/{ui.BPnAe4QS.cjs → ui.DfK2RX6G.cjs} +908 -401
  208. package/dist/unplugin.cjs +62 -26
  209. package/dist/unplugin.d.cts +13 -1
  210. package/dist/unplugin.d.mts +13 -1
  211. package/dist/unplugin.d.ts +13 -1
  212. package/dist/unplugin.mjs +61 -25
  213. package/dist/vite.cjs +3 -2
  214. package/dist/vite.d.cts +2 -0
  215. package/dist/vite.d.mts +2 -0
  216. package/dist/vite.d.ts +2 -0
  217. package/dist/vite.mjs +3 -2
  218. package/package.json +103 -67
  219. package/dist/chunks/component-meta.cjs +0 -77249
  220. package/dist/chunks/component-meta.mjs +0 -77247
  221. package/dist/client/devtools/200.html +0 -1
  222. package/dist/client/devtools/404.html +0 -1
  223. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
  224. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
  225. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
  226. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
  227. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
  228. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
  229. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
  230. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
  231. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
  232. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
  233. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
  234. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
  235. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
  236. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
  237. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
  238. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
  239. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
  240. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
  241. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
  242. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
  243. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
  244. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
  245. package/dist/client/devtools/_nuxt/BDC8ywlR.js +0 -1
  246. package/dist/client/devtools/_nuxt/BT004Uxp.js +0 -53
  247. package/dist/client/devtools/_nuxt/C1H2Soz3.js +0 -1
  248. package/dist/client/devtools/_nuxt/builds/latest.json +0 -1
  249. package/dist/client/devtools/_nuxt/builds/meta/f98c13ea-d751-4b37-8ce3-94e99708745f.json +0 -1
  250. package/dist/client/devtools/_nuxt/entry.Bx6WJjrx.css +0 -1
  251. package/dist/client/devtools/_nuxt/error-404.Cq4qshcf.css +0 -1
  252. package/dist/client/devtools/_nuxt/error-500.ax1aM34m.css +0 -1
  253. package/dist/client/devtools/favicon.svg +0 -1
  254. package/dist/client/devtools/index.html +0 -1
  255. package/dist/devtools/runtime/DevtoolsRenderer.vue +0 -53
  256. package/dist/devtools/runtime/examples/AvatarGroupExample.vue +0 -7
  257. package/dist/devtools/runtime/examples/ButtonGroupExample.vue +0 -8
  258. package/dist/devtools/runtime/examples/CardExample.vue +0 -13
  259. package/dist/devtools/runtime/examples/CarouselExample.vue +0 -13
  260. package/dist/devtools/runtime/examples/ChipExample.vue +0 -5
  261. package/dist/devtools/runtime/examples/CollapsibleExample.vue +0 -8
  262. package/dist/devtools/runtime/examples/CommandPaletteExample.vue +0 -29
  263. package/dist/devtools/runtime/examples/ContainerExample.vue +0 -5
  264. package/dist/devtools/runtime/examples/ContextMenuExample.vue +0 -5
  265. package/dist/devtools/runtime/examples/DrawerExample.vue +0 -8
  266. package/dist/devtools/runtime/examples/DropdownMenuExample.vue +0 -5
  267. package/dist/devtools/runtime/examples/FormExample.vue +0 -30
  268. package/dist/devtools/runtime/examples/FormFieldExample.vue +0 -5
  269. package/dist/devtools/runtime/examples/LinkExample.vue +0 -5
  270. package/dist/devtools/runtime/examples/ModalExample.vue +0 -8
  271. package/dist/devtools/runtime/examples/PopoverExample.vue +0 -8
  272. package/dist/devtools/runtime/examples/SkeletonExample.vue +0 -3
  273. package/dist/devtools/runtime/examples/SlideoverExample.vue +0 -8
  274. package/dist/devtools/runtime/examples/ToasterExample.vue +0 -11
  275. package/dist/devtools/runtime/examples/TooltipExample.vue +0 -5
  276. package/dist/runtime/components/ModalProvider.vue +0 -12
  277. package/dist/runtime/components/SlideoverProvider.vue +0 -12
  278. package/dist/runtime/composables/extendDevtoolsMeta.d.ts +0 -7
  279. package/dist/runtime/composables/extendDevtoolsMeta.js +0 -2
  280. package/dist/runtime/composables/useModal.d.ts +0 -17
  281. package/dist/runtime/composables/useModal.js +0 -46
  282. package/dist/runtime/composables/useSlideover.d.ts +0 -17
  283. package/dist/runtime/composables/useSlideover.js +0 -46
  284. package/dist/runtime/plugins/modal.d.ts +0 -2
  285. package/dist/runtime/plugins/modal.js +0 -10
  286. package/dist/runtime/plugins/slideover.d.ts +0 -2
  287. package/dist/runtime/plugins/slideover.js +0 -10
  288. /package/dist/runtime/locale/{zh_hans.d.ts → az.d.ts} +0 -0
  289. /package/dist/runtime/locale/{zh_hant.d.ts → bn.d.ts} +0 -0
@@ -5,6 +5,11 @@ 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 = {
10
15
  arrowLeft: "i-lucide-arrow-left",
@@ -15,14 +20,16 @@ const icons = {
15
20
  chevronDown: "i-lucide-chevron-down",
16
21
  chevronLeft: "i-lucide-chevron-left",
17
22
  chevronRight: "i-lucide-chevron-right",
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",
23
31
  plus: "i-lucide-plus",
24
- search: "i-lucide-search",
25
- chevronUp: "i-lucide-chevron-up"
32
+ search: "i-lucide-search"
26
33
  };
27
34
 
28
35
  const getDefaultUiConfig = (colors) => ({
@@ -42,11 +49,8 @@ const defaultOptions = {
42
49
  fonts: true,
43
50
  colorMode: true,
44
51
  theme: {
45
- colors: void 0,
52
+ colors: undefined,
46
53
  transitions: true
47
- },
48
- devtools: {
49
- enabled: true
50
54
  }
51
55
  };
52
56
  const resolveColors = (colors) => {
@@ -56,9 +60,9 @@ const resolveColors = (colors) => {
56
60
  const accordion = {
57
61
  slots: {
58
62
  root: "w-full",
59
- item: "border-b border-[var(--ui-border)] last:border-b-0",
63
+ item: "border-b border-(--ui-border) last:border-b-0",
60
64
  header: "flex",
61
- 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",
62
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",
63
67
  body: "text-sm pb-3.5",
64
68
  leadingIcon: "shrink-0 size-5",
@@ -77,14 +81,14 @@ const accordion = {
77
81
  const alert = (options) => ({
78
82
  slots: {
79
83
  root: "relative overflow-hidden w-full rounded-[calc(var(--ui-radius)*2)] p-4 flex gap-2.5",
80
- wrapper: "min-w-0 flex-1 flex flex-col gap-1",
84
+ wrapper: "min-w-0 flex-1 flex flex-col",
81
85
  title: "text-sm font-medium",
82
86
  description: "text-sm opacity-90",
83
87
  icon: "shrink-0 size-5",
84
88
  avatar: "shrink-0",
85
89
  avatarSize: "2xl",
86
- actions: "flex gap-1.5 shrink-0",
87
- close: "p-0.5"
90
+ actions: "flex flex-wrap gap-1.5 shrink-0",
91
+ close: "p-0"
88
92
  },
89
93
  variants: {
90
94
  color: {
@@ -97,14 +101,19 @@ const alert = (options) => ({
97
101
  soft: "",
98
102
  subtle: ""
99
103
  },
100
- multiline: {
101
- true: {
102
- root: "items-start",
103
- actions: "items-start mt-1"
104
- },
105
- false: {
104
+ orientation: {
105
+ horizontal: {
106
106
  root: "items-center",
107
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"
108
117
  }
109
118
  }
110
119
  },
@@ -112,49 +121,49 @@ const alert = (options) => ({
112
121
  color,
113
122
  variant: "solid",
114
123
  class: {
115
- root: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
124
+ root: `bg-(--ui-${color}) text-(--ui-bg)`
116
125
  }
117
126
  })), ...(options.theme.colors || []).map((color) => ({
118
127
  color,
119
128
  variant: "outline",
120
129
  class: {
121
- 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`
122
131
  }
123
132
  })), ...(options.theme.colors || []).map((color) => ({
124
133
  color,
125
134
  variant: "soft",
126
135
  class: {
127
- root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
136
+ root: `bg-(--ui-${color})/10 text-(--ui-${color})`
128
137
  }
129
138
  })), ...(options.theme.colors || []).map((color) => ({
130
139
  color,
131
140
  variant: "subtle",
132
141
  class: {
133
- 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`
134
143
  }
135
144
  })), {
136
145
  color: "neutral",
137
146
  variant: "solid",
138
147
  class: {
139
- root: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
148
+ root: "text-(--ui-bg) bg-(--ui-bg-inverted)"
140
149
  }
141
150
  }, {
142
151
  color: "neutral",
143
152
  variant: "outline",
144
153
  class: {
145
- 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)"
146
155
  }
147
156
  }, {
148
157
  color: "neutral",
149
158
  variant: "soft",
150
159
  class: {
151
- root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50"
160
+ root: "text-(--ui-text-highlighted) bg-(--ui-bg-elevated)/50"
152
161
  }
153
162
  }, {
154
163
  color: "neutral",
155
164
  variant: "subtle",
156
165
  class: {
157
- 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)"
158
167
  }
159
168
  }],
160
169
  defaultVariants: {
@@ -165,10 +174,10 @@ const alert = (options) => ({
165
174
 
166
175
  const avatar = {
167
176
  slots: {
168
- 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)",
169
178
  image: "h-full w-full rounded-[inherit] object-cover",
170
- fallback: "font-medium leading-none text-[var(--ui-text-muted)] truncate",
171
- 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"
172
181
  },
173
182
  variants: {
174
183
  size: {
@@ -209,7 +218,7 @@ const avatar = {
209
218
  const avatarGroup = {
210
219
  slots: {
211
220
  root: "inline-flex flex-row-reverse justify-end",
212
- base: "relative rounded-full ring-[var(--ui-bg)] first:me-0"
221
+ base: "relative rounded-full ring-(--ui-bg) first:me-0"
213
222
  },
214
223
  variants: {
215
224
  size: {
@@ -247,9 +256,44 @@ const avatarGroup = {
247
256
  }
248
257
  };
249
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
+
250
294
  const badge = (options) => ({
251
295
  slots: {
252
- base: "rounded-[calc(var(--ui-radius)*1.5)] font-medium inline-flex items-center",
296
+ base: "font-medium inline-flex items-center",
253
297
  label: "truncate",
254
298
  leadingIcon: "shrink-0",
255
299
  leadingAvatar: "shrink-0",
@@ -257,6 +301,7 @@ const badge = (options) => ({
257
301
  trailingIcon: "shrink-0"
258
302
  },
259
303
  variants: {
304
+ ...buttonGroupVariant,
260
305
  color: {
261
306
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
262
307
  neutral: ""
@@ -268,58 +313,70 @@ const badge = (options) => ({
268
313
  subtle: ""
269
314
  },
270
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
+ },
271
322
  sm: {
272
- base: "text-xs px-1.5 py-0.5 gap-1",
273
- leadingIcon: "size-4",
323
+ base: "text-[10px]/3 px-1.5 py-1 gap-1 rounded-[calc(var(--ui-radius))]",
324
+ leadingIcon: "size-3",
274
325
  leadingAvatarSize: "3xs",
275
- trailingIcon: "size-4"
326
+ trailingIcon: "size-3"
276
327
  },
277
328
  md: {
278
- 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)]",
279
330
  leadingIcon: "size-4",
280
331
  leadingAvatarSize: "3xs",
281
332
  trailingIcon: "size-4"
282
333
  },
283
334
  lg: {
284
- 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)]",
285
336
  leadingIcon: "size-5",
286
337
  leadingAvatarSize: "2xs",
287
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"
288
345
  }
289
346
  }
290
347
  },
291
348
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
292
349
  color,
293
350
  variant: "solid",
294
- class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
351
+ class: `bg-(--ui-${color}) text-(--ui-bg)`
295
352
  })), ...(options.theme.colors || []).map((color) => ({
296
353
  color,
297
354
  variant: "outline",
298
- 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`
299
356
  })), ...(options.theme.colors || []).map((color) => ({
300
357
  color,
301
358
  variant: "soft",
302
- class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
359
+ class: `bg-(--ui-${color})/10 text-(--ui-${color})`
303
360
  })), ...(options.theme.colors || []).map((color) => ({
304
361
  color,
305
362
  variant: "subtle",
306
- 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`
307
364
  })), {
308
365
  color: "neutral",
309
366
  variant: "solid",
310
- class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
367
+ class: "text-(--ui-bg) bg-(--ui-bg-inverted)"
311
368
  }, {
312
369
  color: "neutral",
313
370
  variant: "outline",
314
- 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)"
315
372
  }, {
316
373
  color: "neutral",
317
374
  variant: "soft",
318
- class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
375
+ class: "text-(--ui-text) bg-(--ui-bg-elevated)"
319
376
  }, {
320
377
  color: "neutral",
321
378
  variant: "subtle",
322
- 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)"
323
380
  }],
324
381
  defaultVariants: {
325
382
  color: "primary",
@@ -333,21 +390,21 @@ const breadcrumb = (options) => ({
333
390
  root: "relative min-w-0",
334
391
  list: "flex items-center gap-1.5",
335
392
  item: "flex min-w-0",
336
- 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)",
337
394
  linkLeadingIcon: "shrink-0 size-5",
338
395
  linkLeadingAvatar: "shrink-0",
339
396
  linkLeadingAvatarSize: "2xs",
340
397
  linkLabel: "truncate",
341
398
  separator: "flex",
342
- separatorIcon: "shrink-0 size-5 text-[var(--ui-text-muted)]"
399
+ separatorIcon: "shrink-0 size-5 text-(--ui-text-muted)"
343
400
  },
344
401
  variants: {
345
402
  active: {
346
403
  true: {
347
- link: "text-[var(--ui-primary)] font-semibold"
404
+ link: "text-(--ui-primary) font-semibold"
348
405
  },
349
406
  false: {
350
- link: "text-[var(--ui-text-muted)] font-medium"
407
+ link: "text-(--ui-text-muted) font-medium"
351
408
  }
352
409
  },
353
410
  disabled: {
@@ -364,49 +421,14 @@ const breadcrumb = (options) => ({
364
421
  active: false,
365
422
  to: true,
366
423
  class: {
367
- link: ["hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
424
+ link: ["hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
368
425
  }
369
426
  }]
370
427
  });
371
428
 
372
- const buttonGroupVariant = {
373
- buttonGroup: {
374
- horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
375
- vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
376
- }
377
- };
378
- const buttonGroupVariantWithRoot = {
379
- buttonGroup: {
380
- horizontal: {
381
- root: "group",
382
- 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"
383
- },
384
- vertical: {
385
- root: "group",
386
- 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"
387
- }
388
- }
389
- };
390
- const buttonGroup = {
391
- base: "relative",
392
- variants: {
393
- size: {
394
- xs: "",
395
- sm: "",
396
- md: "",
397
- lg: "",
398
- xl: ""
399
- },
400
- orientation: {
401
- horizontal: "inline-flex -space-x-px",
402
- vertical: "flex flex-col -space-y-px"
403
- }
404
- }
405
- };
406
-
407
429
  const button = (options) => ({
408
430
  slots: {
409
- 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"],
410
432
  label: "truncate",
411
433
  leadingIcon: "shrink-0",
412
434
  leadingAvatar: "shrink-0",
@@ -462,7 +484,6 @@ const button = (options) => ({
462
484
  block: {
463
485
  true: {
464
486
  base: "w-full justify-center",
465
- leadingAvatarSize: "xs",
466
487
  trailingIcon: "ms-auto"
467
488
  }
468
489
  },
@@ -482,51 +503,51 @@ const button = (options) => ({
482
503
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
483
504
  color,
484
505
  variant: "solid",
485
- 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})`
486
507
  })), ...(options.theme.colors || []).map((color) => ({
487
508
  color,
488
509
  variant: "outline",
489
- 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})`
490
511
  })), ...(options.theme.colors || []).map((color) => ({
491
512
  color,
492
513
  variant: "soft",
493
- 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`
494
515
  })), ...(options.theme.colors || []).map((color) => ({
495
516
  color,
496
517
  variant: "subtle",
497
- 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})`
498
519
  })), ...(options.theme.colors || []).map((color) => ({
499
520
  color,
500
521
  variant: "ghost",
501
- 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`
502
523
  })), ...(options.theme.colors || []).map((color) => ({
503
524
  color,
504
525
  variant: "link",
505
- 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})`
506
527
  })), {
507
528
  color: "neutral",
508
529
  variant: "solid",
509
- class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)] hover:bg-[var(--ui-bg-inverted)]/90 disabled:bg-[var(--ui-bg-inverted)] aria-disabled:bg-[var(--ui-bg-inverted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
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)"
510
531
  }, {
511
532
  color: "neutral",
512
533
  variant: "outline",
513
- 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)"
514
535
  }, {
515
536
  color: "neutral",
516
537
  variant: "soft",
517
- 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)"
518
539
  }, {
519
540
  color: "neutral",
520
541
  variant: "subtle",
521
- 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)"
522
543
  }, {
523
544
  color: "neutral",
524
545
  variant: "ghost",
525
- 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"
526
547
  }, {
527
548
  color: "neutral",
528
549
  variant: "link",
529
- 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)"
530
551
  }, {
531
552
  size: "xs",
532
553
  square: true,
@@ -568,12 +589,94 @@ const button = (options) => ({
568
589
  }
569
590
  });
570
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
+
571
655
  const card = {
572
656
  slots: {
573
- root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow-sm",
657
+ root: "rounded-[calc(var(--ui-radius)*2)]",
574
658
  header: "p-4 sm:px-6",
575
659
  body: "p-4 sm:p-6",
576
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"
577
680
  }
578
681
  };
579
682
 
@@ -588,7 +691,7 @@ const carousel = (options) => ({
588
691
  prev: "absolute rounded-full",
589
692
  next: "absolute rounded-full",
590
693
  dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
591
- 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"]
592
695
  },
593
696
  variants: {
594
697
  orientation: {
@@ -607,29 +710,26 @@ const carousel = (options) => ({
607
710
  },
608
711
  active: {
609
712
  true: {
610
- dot: "bg-[var(--ui-border-inverted)]"
713
+ dot: "bg-(--ui-border-inverted)"
611
714
  }
612
715
  }
613
- },
614
- defaultVariants: {
615
- orientation: "horizontal"
616
716
  }
617
717
  });
618
718
 
619
719
  const checkbox = (options) => ({
620
720
  slots: {
621
721
  root: "relative flex items-start",
622
- 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",
623
723
  container: "flex items-center",
624
724
  wrapper: "ms-2",
625
725
  icon: "shrink-0 size-full",
626
- label: "block font-medium text-[var(--ui-text)]",
627
- description: "text-[var(--ui-text-muted)]"
726
+ label: "block font-medium text-(--ui-text)",
727
+ description: "text-(--ui-text-muted)"
628
728
  },
629
729
  variants: {
630
730
  color: {
631
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-[var(--ui-${color})]`])),
632
- 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)"
633
733
  },
634
734
  size: {
635
735
  xs: {
@@ -660,7 +760,7 @@ const checkbox = (options) => ({
660
760
  },
661
761
  required: {
662
762
  true: {
663
- label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
763
+ label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
664
764
  }
665
765
  },
666
766
  disabled: {
@@ -677,11 +777,11 @@ const checkbox = (options) => ({
677
777
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
678
778
  color,
679
779
  checked: true,
680
- class: `ring-2 ring-[var(--ui-${color})] bg-[var(--ui-${color})]`
780
+ class: `ring-2 ring-(--ui-${color}) bg-(--ui-${color})`
681
781
  })), {
682
782
  color: "neutral",
683
783
  checked: true,
684
- 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)"
685
785
  }],
686
786
  defaultVariants: {
687
787
  size: "md",
@@ -692,12 +792,12 @@ const checkbox = (options) => ({
692
792
  const chip = (options) => ({
693
793
  slots: {
694
794
  root: "relative inline-flex items-center justify-center shrink-0",
695
- 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"
696
796
  },
697
797
  variants: {
698
798
  color: {
699
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[var(--ui-${color})]`])),
700
- neutral: "bg-[var(--ui-text-muted)]"
799
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-(--ui-${color})`])),
800
+ neutral: "bg-(--ui-text-muted)"
701
801
  },
702
802
  size: {
703
803
  "3xs": "h-[4px] min-w-[4px] text-[4px]",
@@ -754,33 +854,83 @@ const collapsible = {
754
854
  }
755
855
  };
756
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
+
757
897
  const commandPalette = (options) => ({
758
898
  slots: {
759
- 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)",
760
900
  input: "[&>input]:h-12",
761
901
  close: "",
762
- content: "relative overflow-hidden",
763
- 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",
764
904
  group: "p-1 isolate",
765
- empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]",
766
- label: "px-2 py-1.5 text-xs font-semibold text-[var(--ui-text-highlighted)]",
767
- 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"],
768
- 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",
769
909
  itemLeadingAvatar: "shrink-0",
770
910
  itemLeadingAvatarSize: "2xs",
771
911
  itemLeadingChip: "shrink-0 size-5",
772
912
  itemLeadingChipSize: "md",
773
913
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
774
914
  itemTrailingIcon: "shrink-0 size-5",
775
- 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",
776
916
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
777
917
  itemTrailingKbdsSize: "md",
778
- itemLabel: "truncate space-x-1 rtl:space-x-reverse",
779
- itemLabelBase: "text-[var(--ui-text-highlighted)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]",
780
- itemLabelPrefix: "text-[var(--ui-text)]",
781
- 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)"
782
922
  },
783
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
+ },
784
934
  loading: {
785
935
  true: {
786
936
  itemLeadingIcon: "animate-spin"
@@ -790,25 +940,25 @@ const commandPalette = (options) => ({
790
940
  });
791
941
 
792
942
  const container = {
793
- base: "max-w-[var(--ui-container)] 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"
794
944
  };
795
945
 
796
946
  const contextMenu = (options) => ({
797
947
  slots: {
798
- 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]",
799
949
  group: "p-1 isolate",
800
- label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
801
- 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)",
802
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",
803
953
  itemLeadingIcon: "shrink-0",
804
954
  itemLeadingAvatar: "shrink-0",
805
955
  itemLeadingAvatarSize: "",
806
- itemTrailing: "ms-auto inline-flex",
956
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
807
957
  itemTrailingIcon: "shrink-0",
808
958
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
809
959
  itemTrailingKbdsSize: "",
810
960
  itemLabel: "truncate",
811
- itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
961
+ itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
812
962
  },
813
963
  variants: {
814
964
  color: {
@@ -817,12 +967,12 @@ const contextMenu = (options) => ({
817
967
  },
818
968
  active: {
819
969
  true: {
820
- item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
821
- itemLeadingIcon: "text-[var(--ui-text)]"
970
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
971
+ itemLeadingIcon: "text-(--ui-text)"
822
972
  },
823
973
  false: {
824
- 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"],
825
- 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"]
826
976
  }
827
977
  },
828
978
  loading: {
@@ -882,15 +1032,15 @@ const contextMenu = (options) => ({
882
1032
  color,
883
1033
  active: false,
884
1034
  class: {
885
- 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`,
886
- 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})`
887
1037
  }
888
1038
  })), ...(options.theme.colors || []).map((color) => ({
889
1039
  color,
890
1040
  active: true,
891
1041
  class: {
892
- item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
893
- itemLeadingIcon: `text-[var(--ui-${color})]`
1042
+ item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
1043
+ itemLeadingIcon: `text-(--ui-${color})`
894
1044
  }
895
1045
  }))],
896
1046
  defaultVariants: {
@@ -900,68 +1050,121 @@ const contextMenu = (options) => ({
900
1050
 
901
1051
  const drawer = {
902
1052
  slots: {
903
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
904
- content: "fixed bg-[var(--ui-bg)] ring ring-[var(--ui-border)] flex focus:outline-none",
905
- 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)",
906
1056
  container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
907
1057
  header: "",
908
- title: "text-[var(--ui-text-highlighted)] font-semibold",
909
- 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",
910
1060
  body: "flex-1",
911
1061
  footer: "flex flex-col gap-1.5"
912
1062
  },
913
1063
  variants: {
914
1064
  direction: {
915
1065
  top: {
916
- content: "top-0 mb-24 flex-col-reverse rounded-b-[calc(var(--ui-radius)*2)]",
1066
+ content: "mb-24 flex-col-reverse",
917
1067
  handle: "mb-4"
918
1068
  },
919
1069
  right: {
920
- content: "right-4 flex-row",
1070
+ content: "flex-row",
921
1071
  handle: "ml-4"
922
1072
  },
923
1073
  bottom: {
924
- content: "bottom-0 mt-24 flex-col rounded-t-[calc(var(--ui-radius)*2)]",
1074
+ content: "mt-24 flex-col",
925
1075
  handle: "mt-4"
926
1076
  },
927
1077
  left: {
928
- content: "left-4 flex-row-reverse",
1078
+ content: "flex-row-reverse",
929
1079
  handle: "mr-4"
930
1080
  }
1081
+ },
1082
+ inset: {
1083
+ true: {
1084
+ content: "rounded-[calc(var(--ui-radius)*2)] after:hidden"
1085
+ }
931
1086
  }
932
1087
  },
933
1088
  compoundVariants: [{
934
1089
  direction: ["top", "bottom"],
935
1090
  class: {
936
- content: "inset-x-0 h-auto max-h-[96%]",
1091
+ content: "h-auto max-h-[96%]",
937
1092
  handle: "w-12 h-1.5 mx-auto"
938
1093
  }
939
1094
  }, {
940
1095
  direction: ["right", "left"],
941
1096
  class: {
942
- 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)]",
943
1098
  handle: "h-12 w-1.5 mt-auto mb-auto"
944
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
+ }
945
1148
  }]
946
1149
  };
947
1150
 
948
1151
  const dropdownMenu = (options) => ({
949
1152
  slots: {
950
- 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]",
951
- 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)",
952
1155
  group: "p-1 isolate",
953
- label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
954
- 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)",
955
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",
956
1159
  itemLeadingIcon: "shrink-0",
957
1160
  itemLeadingAvatar: "shrink-0",
958
1161
  itemLeadingAvatarSize: "",
959
- itemTrailing: "ms-auto inline-flex",
1162
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
960
1163
  itemTrailingIcon: "shrink-0",
961
1164
  itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
962
1165
  itemTrailingKbdsSize: "",
963
1166
  itemLabel: "truncate",
964
- itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
1167
+ itemLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)"
965
1168
  },
966
1169
  variants: {
967
1170
  color: {
@@ -970,12 +1173,12 @@ const dropdownMenu = (options) => ({
970
1173
  },
971
1174
  active: {
972
1175
  true: {
973
- item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
974
- itemLeadingIcon: "text-[var(--ui-text)]"
1176
+ item: "text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)",
1177
+ itemLeadingIcon: "text-(--ui-text)"
975
1178
  },
976
1179
  false: {
977
- 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"],
978
- 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"]
979
1182
  }
980
1183
  },
981
1184
  loading: {
@@ -1035,15 +1238,15 @@ const dropdownMenu = (options) => ({
1035
1238
  color,
1036
1239
  active: false,
1037
1240
  class: {
1038
- 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`,
1039
- 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})`
1040
1243
  }
1041
1244
  })), ...(options.theme.colors || []).map((color) => ({
1042
1245
  color,
1043
1246
  active: true,
1044
1247
  class: {
1045
- item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
1046
- itemLeadingIcon: `text-[var(--ui-${color})]`
1248
+ item: `text-(--ui-${color}) before:bg-(--ui-${color})/10`,
1249
+ itemLeadingIcon: `text-(--ui-${color})`
1047
1250
  }
1048
1251
  }))],
1049
1252
  defaultVariants: {
@@ -1060,12 +1263,12 @@ const formField = {
1060
1263
  root: "",
1061
1264
  wrapper: "",
1062
1265
  labelWrapper: "flex content-center items-center justify-between",
1063
- label: "block font-medium text-[var(--ui-text)]",
1266
+ label: "block font-medium text-(--ui-text)",
1064
1267
  container: "mt-1 relative",
1065
- description: "text-[var(--ui-text-muted)]",
1066
- error: "mt-2 text-[var(--ui-error)]",
1067
- hint: "text-[var(--ui-text-muted)]",
1068
- 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)"
1069
1272
  },
1070
1273
  variants: {
1071
1274
  size: {
@@ -1077,7 +1280,7 @@ const formField = {
1077
1280
  },
1078
1281
  required: {
1079
1282
  true: {
1080
- label: `after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]`
1283
+ label: `after:content-['*'] after:ms-0.5 after:text-(--ui-error)`
1081
1284
  }
1082
1285
  }
1083
1286
  },
@@ -1089,13 +1292,13 @@ const formField = {
1089
1292
  const input = (options) => ({
1090
1293
  slots: {
1091
1294
  root: "relative inline-flex items-center",
1092
- 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"],
1093
1296
  leading: "absolute inset-y-0 start-0 flex items-center",
1094
- leadingIcon: "shrink-0 text-[var(--ui-text-dimmed)]",
1297
+ leadingIcon: "shrink-0 text-(--ui-text-dimmed)",
1095
1298
  leadingAvatar: "shrink-0",
1096
1299
  leadingAvatarSize: "",
1097
1300
  trailing: "absolute inset-y-0 end-0 flex items-center",
1098
- trailingIcon: "shrink-0 text-[var(--ui-text-dimmed)]"
1301
+ trailingIcon: "shrink-0 text-(--ui-text-dimmed)"
1099
1302
  },
1100
1303
  variants: {
1101
1304
  ...buttonGroupVariantWithRoot,
@@ -1142,11 +1345,11 @@ const input = (options) => ({
1142
1345
  }
1143
1346
  },
1144
1347
  variant: {
1145
- outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1146
- 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",
1147
- subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1148
- ghost: "text-[var(--ui-text-highlighted)] bg-transparent hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
1149
- none: "text-[var(--ui-text-highlighted)] bg-transparent"
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"
1150
1353
  },
1151
1354
  color: {
1152
1355
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
@@ -1165,25 +1368,25 @@ const input = (options) => ({
1165
1368
  true: ""
1166
1369
  },
1167
1370
  type: {
1168
- 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"
1169
1372
  }
1170
1373
  },
1171
1374
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1172
1375
  color,
1173
1376
  variant: ["outline", "subtle"],
1174
- 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})`
1175
1378
  })), ...(options.theme.colors || []).map((color) => ({
1176
1379
  color,
1177
1380
  highlight: true,
1178
- class: `ring ring-inset ring-[var(--ui-${color})]`
1381
+ class: `ring ring-inset ring-(--ui-${color})`
1179
1382
  })), {
1180
1383
  color: "neutral",
1181
1384
  variant: ["outline", "subtle"],
1182
- 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)"
1183
1386
  }, {
1184
1387
  color: "neutral",
1185
1388
  highlight: true,
1186
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1389
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1187
1390
  }, {
1188
1391
  leading: true,
1189
1392
  size: "xs",
@@ -1250,15 +1453,15 @@ const inputMenu = (options) => {
1250
1453
  slots: {
1251
1454
  base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
1252
1455
  trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
1253
- arrow: "fill-[var(--ui-border)]",
1254
- 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]",
1255
- 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",
1256
1459
  group: "p-1 isolate",
1257
- empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
1258
- label: "font-semibold text-[var(--ui-text-highlighted)]",
1259
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1260
- 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"],
1261
- 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"],
1262
1465
  itemLeadingAvatar: "shrink-0",
1263
1466
  itemLeadingAvatarSize: "",
1264
1467
  itemLeadingChip: "shrink-0",
@@ -1266,9 +1469,9 @@ const inputMenu = (options) => {
1266
1469
  itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
1267
1470
  itemTrailingIcon: "shrink-0",
1268
1471
  itemLabel: "truncate",
1269
- 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",
1270
1473
  tagsItemText: "truncate",
1271
- 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"],
1272
1475
  tagsItemDeleteIcon: "",
1273
1476
  tagsInput: ""
1274
1477
  },
@@ -1276,11 +1479,10 @@ const inputMenu = (options) => {
1276
1479
  multiple: {
1277
1480
  true: {
1278
1481
  root: "flex-wrap",
1279
- base: "",
1280
- tagsInput: "border-0 bg-transparent 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"
1281
1483
  },
1282
1484
  false: {
1283
- 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"
1284
1486
  }
1285
1487
  },
1286
1488
  size: {
@@ -1345,12 +1547,12 @@ const inputMenu = (options) => {
1345
1547
  color,
1346
1548
  multiple: true,
1347
1549
  variant: ["outline", "subtle"],
1348
- 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})`
1349
1551
  })), {
1350
1552
  color: "neutral",
1351
1553
  multiple: true,
1352
1554
  variant: ["outline", "subtle"],
1353
- 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)"
1354
1556
  }]
1355
1557
  }, input(options));
1356
1558
  };
@@ -1360,7 +1562,7 @@ const inputNumber = (options) => {
1360
1562
  return {
1361
1563
  slots: {
1362
1564
  root: "relative inline-flex items-center",
1363
- 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"],
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"],
1364
1566
  increment: "absolute flex items-center",
1365
1567
  decrement: "absolute flex items-center"
1366
1568
  },
@@ -1403,19 +1605,19 @@ const inputNumber = (options) => {
1403
1605
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1404
1606
  color,
1405
1607
  variant: ["outline", "subtle"],
1406
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1608
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1407
1609
  })), ...(options.theme.colors || []).map((color) => ({
1408
1610
  color,
1409
1611
  highlight: true,
1410
- class: `ring ring-inset ring-[var(--ui-${color})]`
1612
+ class: `ring ring-inset ring-(--ui-${color})`
1411
1613
  })), {
1412
1614
  color: "neutral",
1413
1615
  variant: ["outline", "subtle"],
1414
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1616
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1415
1617
  }, {
1416
1618
  color: "neutral",
1417
1619
  highlight: true,
1418
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1620
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1419
1621
  }, {
1420
1622
  orientation: "horizontal",
1421
1623
  size: "xs",
@@ -1466,12 +1668,12 @@ const inputNumber = (options) => {
1466
1668
  };
1467
1669
 
1468
1670
  const kbd = {
1469
- 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",
1470
1672
  variants: {
1471
1673
  variant: {
1472
- solid: "bg-[var(--ui-bg-inverted)] text-[var(--ui-bg)]",
1473
- outline: "bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] ring ring-inset ring-[var(--ui-border-accented)]",
1474
- 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)"
1475
1677
  },
1476
1678
  size: {
1477
1679
  sm: "h-4 min-w-[16px] text-[10px]",
@@ -1486,11 +1688,11 @@ const kbd = {
1486
1688
  };
1487
1689
 
1488
1690
  const link = (options) => ({
1489
- base: "focus-visible:outline-[var(--ui-primary)]",
1691
+ base: "focus-visible:outline-(--ui-primary)",
1490
1692
  variants: {
1491
1693
  active: {
1492
- true: "text-[var(--ui-primary)]",
1493
- 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"]
1494
1696
  },
1495
1697
  disabled: {
1496
1698
  true: "cursor-not-allowed opacity-75"
@@ -1500,13 +1702,14 @@ const link = (options) => ({
1500
1702
 
1501
1703
  const modal = {
1502
1704
  slots: {
1503
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
1504
- content: "fixed w-full h-dvh bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] flex flex-col focus:outline-none",
1505
- header: "px-4 py-5 sm:px-6",
1506
- 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",
1507
1710
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
1508
- title: "text-[var(--ui-text-highlighted)] font-semibold",
1509
- 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",
1510
1713
  close: "absolute top-4 end-4"
1511
1714
  },
1512
1715
  variants: {
@@ -1521,7 +1724,7 @@ const modal = {
1521
1724
  content: "inset-0"
1522
1725
  },
1523
1726
  false: {
1524
- 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)"
1525
1728
  }
1526
1729
  }
1527
1730
  }
@@ -1531,41 +1734,42 @@ const navigationMenu = (options) => ({
1531
1734
  slots: {
1532
1735
  root: "relative flex gap-1.5 [&>div]:min-w-0",
1533
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",
1534
1738
  item: "min-w-0",
1535
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",
1536
1740
  linkLeadingIcon: "shrink-0 size-5",
1537
1741
  linkLeadingAvatar: "shrink-0",
1538
1742
  linkLeadingAvatarSize: "2xs",
1539
- linkTrailing: "ms-auto inline-flex",
1540
- linkTrailingBadge: "shrink-0 rounded-[calc(var(--ui-radius)]",
1743
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
1744
+ linkTrailingBadge: "shrink-0",
1541
1745
  linkTrailingBadgeSize: "sm",
1542
1746
  linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
1543
1747
  linkLabel: "truncate",
1544
- linkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1748
+ linkLabelExternalIcon: "inline-block size-3 align-top text-(--ui-text-dimmed)",
1545
1749
  childList: "",
1546
1750
  childItem: "",
1547
1751
  childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-start",
1548
1752
  childLinkWrapper: "flex flex-col items-start",
1549
1753
  childLinkIcon: "size-5 shrink-0",
1550
1754
  childLinkLabel: "font-semibold text-sm relative inline-flex",
1551
- childLinkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1552
- childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
1553
- separator: "px-2 h-px bg-[var(--ui-border)]",
1554
- viewportWrapper: "absolute top-full left-0 flex w-full justify-center",
1555
- 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]",
1556
- 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]",
1557
- 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",
1558
- 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)]"
1559
1763
  },
1560
1764
  variants: {
1561
1765
  color: {
1562
1766
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1563
- link: `focus-visible:before:ring-[var(--ui-${color})]`,
1564
- childLink: `focus-visible:outline-[var(--ui-${color})]`
1767
+ link: `focus-visible:before:ring-(--ui-${color})`,
1768
+ childLink: `focus-visible:outline-(--ui-${color})`
1565
1769
  }])),
1566
1770
  neutral: {
1567
- link: "focus-visible:before:ring-[var(--ui-border-inverted)]",
1568
- 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)"
1569
1773
  }
1570
1774
  },
1571
1775
  highlightColor: {
@@ -1578,29 +1782,38 @@ const navigationMenu = (options) => ({
1578
1782
  },
1579
1783
  orientation: {
1580
1784
  horizontal: {
1581
- root: "w-full items-center justify-between",
1785
+ root: "items-center justify-between",
1582
1786
  list: "flex items-center",
1583
1787
  item: "py-2",
1584
1788
  link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
1585
- childList: "grid grid-cols-2 gap-2 p-2"
1789
+ childList: "grid p-2"
1586
1790
  },
1587
1791
  vertical: {
1588
1792
  root: "flex-col",
1589
- link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
1590
- childList: "ms-5 border-s border-[var(--ui-border)]",
1591
- 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: ""
1592
1805
  }
1593
1806
  },
1594
1807
  active: {
1595
1808
  true: {
1596
- childLink: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text-highlighted)]",
1597
- childLinkIcon: "text-[var(--ui-text)]"
1809
+ childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
1810
+ childLinkIcon: "text-(--ui-text)"
1598
1811
  },
1599
1812
  false: {
1600
- link: "text-[var(--ui-text-muted)]",
1601
- linkLeadingIcon: "text-[var(--ui-text-dimmed)]",
1602
- childLink: ["hover:bg-[var(--ui-bg-elevated)]/50 text-[var(--ui-text)] hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1603
- 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"]
1604
1817
  }
1605
1818
  },
1606
1819
  disabled: {
@@ -1610,29 +1823,56 @@ const navigationMenu = (options) => ({
1610
1823
  },
1611
1824
  highlight: {
1612
1825
  true: ""
1826
+ },
1827
+ level: {
1828
+ true: ""
1829
+ },
1830
+ collapsed: {
1831
+ true: ""
1613
1832
  }
1614
1833
  },
1615
1834
  compoundVariants: [{
1616
- highlight: true,
1617
1835
  orientation: "horizontal",
1836
+ contentOrientation: "horizontal",
1837
+ class: {
1838
+ childList: "grid-cols-2 gap-2"
1839
+ }
1840
+ }, {
1841
+ orientation: "horizontal",
1842
+ contentOrientation: "vertical",
1618
1843
  class: {
1619
- item: "-mb-px",
1620
- link: "after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full"
1844
+ childList: "gap-1",
1845
+ content: "w-60"
1621
1846
  }
1622
1847
  }, {
1848
+ orientation: "horizontal",
1623
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
+ }, {
1624
1854
  orientation: "vertical",
1855
+ highlight: true,
1856
+ level: true,
1857
+ class: {
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"]
1859
+ }
1860
+ }, {
1861
+ disabled: false,
1862
+ active: false,
1863
+ variant: "pill",
1625
1864
  class: {
1626
- item: "px-1.5 -ms-px",
1627
- link: "after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full"
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"]
1628
1867
  }
1629
1868
  }, {
1630
1869
  disabled: false,
1631
1870
  active: false,
1632
1871
  variant: "pill",
1872
+ orientation: "horizontal",
1633
1873
  class: {
1634
- 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"],
1635
- linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1874
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
1875
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
1636
1876
  }
1637
1877
  }, {
1638
1878
  disabled: false,
@@ -1640,7 +1880,7 @@ const navigationMenu = (options) => ({
1640
1880
  highlight: true,
1641
1881
  orientation: "horizontal",
1642
1882
  class: {
1643
- link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1883
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
1644
1884
  }
1645
1885
  }, {
1646
1886
  disabled: false,
@@ -1649,75 +1889,99 @@ const navigationMenu = (options) => ({
1649
1889
  active: false,
1650
1890
  orientation: "horizontal",
1651
1891
  class: {
1652
- link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1892
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
1653
1893
  }
1654
1894
  }, ...(options.theme.colors || []).map((color) => ({
1655
1895
  color,
1656
1896
  variant: "pill",
1657
1897
  active: true,
1658
1898
  class: {
1659
- link: `text-[var(--ui-${color})]`,
1660
- linkLeadingIcon: `text-[var(--ui-${color})]`
1899
+ link: `text-(--ui-${color})`,
1900
+ linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1661
1901
  }
1662
1902
  })), {
1663
1903
  color: "neutral",
1664
1904
  variant: "pill",
1665
1905
  active: true,
1666
1906
  class: {
1667
- link: "text-[var(--ui-text-highlighted)]",
1668
- 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)"
1669
1909
  }
1670
1910
  }, {
1671
1911
  variant: "pill",
1672
1912
  active: true,
1673
1913
  highlight: false,
1674
1914
  class: {
1675
- link: "before:bg-[var(--ui-bg-elevated)]"
1915
+ link: "before:bg-(--ui-bg-elevated)"
1676
1916
  }
1677
1917
  }, {
1678
1918
  variant: "pill",
1679
1919
  active: true,
1680
1920
  highlight: true,
1681
1921
  class: {
1682
- 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"]
1923
+ }
1924
+ }, {
1925
+ disabled: false,
1926
+ active: false,
1927
+ variant: "link",
1928
+ class: {
1929
+ link: ["hover:text-(--ui-text-highlighted)", options.theme.transitions && "transition-colors"],
1930
+ linkLeadingIcon: ["group-hover:text-(--ui-text)", options.theme.transitions && "transition-colors"]
1683
1931
  }
1684
1932
  }, {
1685
1933
  disabled: false,
1686
1934
  active: false,
1687
1935
  variant: "link",
1936
+ orientation: "horizontal",
1688
1937
  class: {
1689
- link: ["hover:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1690
- linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1938
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
1939
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
1691
1940
  }
1692
1941
  }, ...(options.theme.colors || []).map((color) => ({
1693
1942
  color,
1694
1943
  variant: "link",
1695
1944
  active: true,
1696
1945
  class: {
1697
- link: `text-[var(--ui-${color})]`,
1698
- linkLeadingIcon: `text-[var(--ui-${color})]`
1946
+ link: `text-(--ui-${color})`,
1947
+ linkLeadingIcon: `text-(--ui-${color}) group-data-[state=open]:text-(--ui-${color})`
1699
1948
  }
1700
1949
  })), {
1701
1950
  color: "neutral",
1702
1951
  variant: "link",
1703
1952
  active: true,
1704
1953
  class: {
1705
- link: "text-[var(--ui-text-highlighted)]",
1706
- 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)"
1707
1956
  }
1708
1957
  }, ...(options.theme.colors || []).map((highlightColor) => ({
1709
1958
  highlightColor,
1710
1959
  highlight: true,
1960
+ level: true,
1711
1961
  active: true,
1712
1962
  class: {
1713
- link: `after:bg-[var(--ui-${highlightColor})]`
1963
+ link: `after:bg-(--ui-${highlightColor})`
1714
1964
  }
1715
1965
  })), {
1716
1966
  highlightColor: "neutral",
1717
1967
  highlight: true,
1968
+ level: true,
1718
1969
  active: true,
1719
1970
  class: {
1720
- 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"
1721
1985
  }
1722
1986
  }],
1723
1987
  defaultVariants: {
@@ -1739,7 +2003,7 @@ const pagination = {
1739
2003
  const pinInput = (options) => ({
1740
2004
  slots: {
1741
2005
  root: "relative inline-flex items-center gap-1.5",
1742
- base: ["rounded-[calc(var(--ui-radius)*1.5)] border-0 placeholder:text-[var(--ui-text-dimmed)] text-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"]
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"]
1743
2007
  },
1744
2008
  variants: {
1745
2009
  size: {
@@ -1760,11 +2024,11 @@ const pinInput = (options) => ({
1760
2024
  }
1761
2025
  },
1762
2026
  variant: {
1763
- outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1764
- 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",
1765
- subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1766
- ghost: "text-[var(--ui-text-highlighted)] bg-transparent hover:bg-[var(--ui-bg-elevated)] focus:bg-[var(--ui-bg-elevated)] disabled:bg-transparent dark:disabled:bg-transparent",
1767
- none: "text-[var(--ui-text-highlighted)] bg-transparent"
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"
1768
2032
  },
1769
2033
  color: {
1770
2034
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
@@ -1777,19 +2041,19 @@ const pinInput = (options) => ({
1777
2041
  compoundVariants: [...(options.theme.colors || []).map((color) => ({
1778
2042
  color,
1779
2043
  variant: ["outline", "subtle"],
1780
- class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
2044
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-${color})`
1781
2045
  })), ...(options.theme.colors || []).map((color) => ({
1782
2046
  color,
1783
2047
  highlight: true,
1784
- class: `ring ring-inset ring-[var(--ui-${color})]`
2048
+ class: `ring ring-inset ring-(--ui-${color})`
1785
2049
  })), {
1786
2050
  color: "neutral",
1787
2051
  variant: ["outline", "subtle"],
1788
- class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
2052
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)"
1789
2053
  }, {
1790
2054
  color: "neutral",
1791
2055
  highlight: true,
1792
- class: "ring ring-inset ring-[var(--ui-border-inverted)]"
2056
+ class: "ring ring-inset ring-(--ui-border-inverted)"
1793
2057
  }],
1794
2058
  defaultVariants: {
1795
2059
  size: "md",
@@ -1800,17 +2064,17 @@ const pinInput = (options) => ({
1800
2064
 
1801
2065
  const popover = {
1802
2066
  slots: {
1803
- 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",
1804
- 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)"
1805
2069
  }
1806
2070
  };
1807
2071
 
1808
2072
  const progress = (options) => ({
1809
2073
  slots: {
1810
2074
  root: "gap-2",
1811
- base: "relative overflow-hidden rounded-full bg-[var(--ui-bg-accented)]",
2075
+ base: "relative overflow-hidden rounded-full bg-(--ui-bg-accented)",
1812
2076
  indicator: "rounded-full size-full transition-transform duration-200 ease-out",
1813
- 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",
1814
2078
  steps: "grid items-end",
1815
2079
  step: "truncate text-end row-start-1 col-start-1 transition-opacity"
1816
2080
  },
@@ -1823,12 +2087,12 @@ const progress = (options) => ({
1823
2087
  },
1824
2088
  color: {
1825
2089
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1826
- indicator: `bg-[var(--ui-${color})]`,
1827
- steps: `text-[var(--ui-${color})]`
2090
+ indicator: `bg-(--ui-${color})`,
2091
+ steps: `text-(--ui-${color})`
1828
2092
  }])),
1829
2093
  neutral: {
1830
- indicator: "bg-[var(--ui-bg-inverted)]",
1831
- steps: "text-[var(--ui-bg)]"
2094
+ indicator: "bg-(--ui-bg-inverted)",
2095
+ steps: "text-(--ui-bg)"
1832
2096
  }
1833
2097
  },
1834
2098
  size: {
@@ -1866,7 +2130,7 @@ const progress = (options) => ({
1866
2130
  step: "opacity-100"
1867
2131
  },
1868
2132
  first: {
1869
- step: "opacity-100 text-[var(--ui-text-muted)]"
2133
+ step: "opacity-100 text-(--ui-text-muted)"
1870
2134
  },
1871
2135
  other: {
1872
2136
  step: "opacity-0"
@@ -1967,7 +2231,7 @@ const progress = (options) => ({
1967
2231
  orientation: "horizontal",
1968
2232
  animation: "carousel",
1969
2233
  class: {
1970
- 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]"
1971
2235
  }
1972
2236
  }, {
1973
2237
  orientation: "vertical",
@@ -1979,7 +2243,7 @@ const progress = (options) => ({
1979
2243
  orientation: "horizontal",
1980
2244
  animation: "carousel-inverse",
1981
2245
  class: {
1982
- 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]"
1983
2247
  }
1984
2248
  }, {
1985
2249
  orientation: "vertical",
@@ -2023,24 +2287,24 @@ const radioGroup = (options) => ({
2023
2287
  slots: {
2024
2288
  root: "relative",
2025
2289
  fieldset: "flex",
2026
- legend: "mb-1 block font-medium text-[var(--ui-text)]",
2290
+ legend: "mb-1 block font-medium text-(--ui-text)",
2027
2291
  item: "flex items-start",
2028
- 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)]",
2029
- 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",
2030
2294
  container: "flex items-center",
2031
2295
  wrapper: "ms-2",
2032
- label: "block font-medium text-[var(--ui-text)]",
2033
- description: "text-[var(--ui-text-muted)]"
2296
+ label: "block font-medium text-(--ui-text)",
2297
+ description: "text-(--ui-text-muted)"
2034
2298
  },
2035
2299
  variants: {
2036
2300
  color: {
2037
2301
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2038
- base: `focus-visible:outline-[var(--ui-${color})]`,
2039
- indicator: `bg-[var(--ui-${color})]`
2302
+ base: `focus-visible:outline-(--ui-${color})`,
2303
+ indicator: `bg-(--ui-${color})`
2040
2304
  }])),
2041
2305
  neutral: {
2042
- base: "focus-visible:outline-[var(--ui-border-inverted)]",
2043
- indicator: "bg-[var(--ui-bg-inverted)]"
2306
+ base: "focus-visible:outline-(--ui-border-inverted)",
2307
+ indicator: "bg-(--ui-bg-inverted)"
2044
2308
  }
2045
2309
  },
2046
2310
  orientation: {
@@ -2102,7 +2366,7 @@ const radioGroup = (options) => ({
2102
2366
  },
2103
2367
  required: {
2104
2368
  true: {
2105
- legend: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2369
+ legend: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
2106
2370
  }
2107
2371
  }
2108
2372
  },
@@ -2115,18 +2379,19 @@ const radioGroup = (options) => ({
2115
2379
  const select = (options) => {
2116
2380
  return defu.defuFn({
2117
2381
  slots: {
2118
- root: () => void 0,
2382
+ root: () => undefined,
2119
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"],
2120
- value: "truncate group-data-placeholder:text-[var(--ui-text-dimmed)]",
2121
- arrow: "fill-[var(--ui-border)]",
2122
- 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]",
2123
- 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",
2124
2389
  group: "p-1 isolate",
2125
- empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
2126
- label: "font-semibold text-[var(--ui-text-highlighted)]",
2127
- separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
2128
- 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"],
2129
- 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"],
2130
2395
  itemLeadingAvatar: "shrink-0",
2131
2396
  itemLeadingAvatarSize: "",
2132
2397
  itemLeadingChip: "shrink-0",
@@ -2191,9 +2456,8 @@ const select = (options) => {
2191
2456
  const selectMenu = (options) => {
2192
2457
  return defu.defu({
2193
2458
  slots: {
2194
- value: "truncate",
2195
- placeholder: "truncate text-[var(--ui-text-dimmed)]",
2196
- input: "border-b border-[var(--ui-border)]"
2459
+ input: "border-b border-(--ui-border)",
2460
+ focusScope: "flex flex-col min-h-0"
2197
2461
  }
2198
2462
  }, select(options));
2199
2463
  };
@@ -2202,7 +2466,7 @@ const separator = (options) => ({
2202
2466
  slots: {
2203
2467
  root: "flex items-center align-center text-center",
2204
2468
  border: "",
2205
- container: "font-medium text-[var(--ui-text)] flex",
2469
+ container: "font-medium text-(--ui-text) flex",
2206
2470
  icon: "shrink-0 size-5",
2207
2471
  avatar: "shrink-0",
2208
2472
  avatarSize: "2xs",
@@ -2210,8 +2474,8 @@ const separator = (options) => ({
2210
2474
  },
2211
2475
  variants: {
2212
2476
  color: {
2213
- ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[var(--ui-${color})]` }])),
2214
- 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)" }
2215
2479
  },
2216
2480
  orientation: {
2217
2481
  horizontal: {
@@ -2293,18 +2557,19 @@ const separator = (options) => ({
2293
2557
  });
2294
2558
 
2295
2559
  const skeleton = {
2296
- 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)"
2297
2561
  };
2298
2562
 
2299
2563
  const slideover = {
2300
2564
  slots: {
2301
- overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
2302
- 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",
2303
- 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: "",
2304
2569
  body: "flex-1 overflow-y-auto p-4 sm:p-6",
2305
2570
  footer: "flex items-center gap-1.5 p-4 sm:px-6",
2306
- title: "text-[var(--ui-text-highlighted)] font-semibold",
2307
- 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",
2308
2573
  close: "absolute top-4 end-4"
2309
2574
  },
2310
2575
  variants: {
@@ -2358,19 +2623,19 @@ const slideover = {
2358
2623
  const slider = (options) => ({
2359
2624
  slots: {
2360
2625
  root: "relative flex items-center select-none touch-none",
2361
- track: "relative bg-[var(--ui-bg-accented)] overflow-hidden rounded-full grow",
2626
+ track: "relative bg-(--ui-bg-accented) overflow-hidden rounded-full grow",
2362
2627
  range: "absolute rounded-full",
2363
- 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"
2364
2629
  },
2365
2630
  variants: {
2366
2631
  color: {
2367
2632
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2368
- range: `bg-[var(--ui-${color})]`,
2369
- 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`
2370
2635
  }])),
2371
2636
  neutral: {
2372
- range: "bg-[var(--ui-bg-inverted)]",
2373
- 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"
2374
2639
  }
2375
2640
  },
2376
2641
  size: {
@@ -2473,26 +2738,150 @@ const slider = (options) => ({
2473
2738
  }
2474
2739
  });
2475
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
+
2476
2865
  const _switch = (options) => ({
2477
2866
  slots: {
2478
2867
  root: "relative flex items-start",
2479
- 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"],
2480
2869
  container: "flex items-center",
2481
- 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",
2482
- 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"],
2483
2872
  wrapper: "ms-2",
2484
- label: "block font-medium text-[var(--ui-text)]",
2485
- description: "text-[var(--ui-text-muted)]"
2873
+ label: "block font-medium text-(--ui-text)",
2874
+ description: "text-(--ui-text-muted)"
2486
2875
  },
2487
2876
  variants: {
2488
2877
  color: {
2489
2878
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2490
- base: `data-[state=checked]:bg-[var(--ui-${color})] focus-visible:ring-[var(--ui-${color})]`,
2491
- 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})`
2492
2881
  }])),
2493
2882
  neutral: {
2494
- base: "data-[state=checked]:bg-[var(--ui-bg-inverted)] focus-visible:ring-[var(--ui-border-inverted)]",
2495
- 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)"
2496
2885
  }
2497
2886
  },
2498
2887
  size: {
@@ -2544,7 +2933,7 @@ const _switch = (options) => ({
2544
2933
  },
2545
2934
  required: {
2546
2935
  true: {
2547
- label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2936
+ label: "after:content-['*'] after:ms-0.5 after:text-(--ui-error)"
2548
2937
  }
2549
2938
  },
2550
2939
  disabled: {
@@ -2566,23 +2955,23 @@ const table = (options) => ({
2566
2955
  root: "relative overflow-auto",
2567
2956
  base: "min-w-full overflow-clip",
2568
2957
  caption: "sr-only",
2569
- 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)]",
2570
- tbody: "divide-y divide-[var(--ui-border)]",
2571
- tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
2572
- 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",
2573
- td: "p-4 text-sm text-[var(--ui-text-muted)] whitespace-nowrap [&:has([role=checkbox])]:pe-0",
2574
- empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]"
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)"
2575
2964
  },
2576
2965
  variants: {
2577
2966
  pinned: {
2578
2967
  true: {
2579
- th: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2580
- 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"
2581
2970
  }
2582
2971
  },
2583
2972
  sticky: {
2584
2973
  true: {
2585
- 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"
2586
2975
  }
2587
2976
  },
2588
2977
  loading: {
@@ -2605,25 +2994,25 @@ const table = (options) => ({
2605
2994
  loading: true,
2606
2995
  loadingColor,
2607
2996
  class: {
2608
- thead: `after:bg-[var(--ui-${loadingColor})]`
2997
+ thead: `after:bg-(--ui-${loadingColor})`
2609
2998
  }
2610
2999
  })), {
2611
3000
  loading: true,
2612
3001
  loadingColor: "neutral",
2613
3002
  class: {
2614
- thead: "after:bg-[var(--ui-bg-inverted)]"
3003
+ thead: "after:bg-(--ui-bg-inverted)"
2615
3004
  }
2616
3005
  }, {
2617
3006
  loading: true,
2618
3007
  loadingAnimation: "carousel",
2619
3008
  class: {
2620
- 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]"
2621
3010
  }
2622
3011
  }, {
2623
3012
  loading: true,
2624
3013
  loadingAnimation: "carousel-inverse",
2625
3014
  class: {
2626
- 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]"
2627
3016
  }
2628
3017
  }, {
2629
3018
  loading: true,
@@ -2649,7 +3038,7 @@ const tabs = (options) => ({
2649
3038
  root: "flex items-center gap-2",
2650
3039
  list: "relative flex p-1 group",
2651
3040
  indicator: "absolute transition-[translate,width] duration-200",
2652
- 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"],
2653
3042
  content: "focus:outline-none w-full",
2654
3043
  leadingIcon: "shrink-0",
2655
3044
  leadingAvatar: "shrink-0",
@@ -2663,12 +3052,12 @@ const tabs = (options) => ({
2663
3052
  },
2664
3053
  variant: {
2665
3054
  pill: {
2666
- list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
3055
+ list: "bg-(--ui-bg-elevated) rounded-[calc(var(--ui-radius)*2)]",
2667
3056
  trigger: "flex-1 w-full",
2668
3057
  indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
2669
3058
  },
2670
3059
  link: {
2671
- list: "border-[var(--ui-border)]",
3060
+ list: "border-(--ui-border)",
2672
3061
  indicator: "rounded-full"
2673
3062
  }
2674
3063
  },
@@ -2676,12 +3065,12 @@ const tabs = (options) => ({
2676
3065
  horizontal: {
2677
3066
  root: "flex-col",
2678
3067
  list: "w-full",
2679
- 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)",
2680
3069
  trigger: "justify-center"
2681
3070
  },
2682
3071
  vertical: {
2683
3072
  list: "flex-col",
2684
- 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)"
2685
3074
  }
2686
3075
  },
2687
3076
  size: {
@@ -2743,29 +3132,29 @@ const tabs = (options) => ({
2743
3132
  color,
2744
3133
  variant: "pill",
2745
3134
  class: {
2746
- indicator: `bg-[var(--ui-${color})]`,
2747
- 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})`
2748
3137
  }
2749
3138
  })), {
2750
3139
  color: "neutral",
2751
3140
  variant: "pill",
2752
3141
  class: {
2753
- indicator: "bg-[var(--ui-bg-inverted)]",
2754
- 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)"
2755
3144
  }
2756
3145
  }, ...(options.theme.colors || []).map((color) => ({
2757
3146
  color,
2758
3147
  variant: "link",
2759
3148
  class: {
2760
- indicator: `bg-[var(--ui-${color})]`,
2761
- 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})`
2762
3151
  }
2763
3152
  })), {
2764
3153
  color: "neutral",
2765
3154
  variant: "link",
2766
3155
  class: {
2767
- indicator: "bg-[var(--ui-bg-inverted)]",
2768
- 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)"
2769
3158
  }
2770
3159
  }],
2771
3160
  defaultVariants: {
@@ -2781,38 +3170,43 @@ const textarea = (options) => {
2781
3170
 
2782
3171
  const toast = (options) => ({
2783
3172
  slots: {
2784
- 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",
2785
- wrapper: "w-0 flex-1 flex flex-col gap-1",
2786
- title: "text-sm font-medium text-[var(--ui-text-highlighted)]",
2787
- 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)",
2788
3177
  icon: "shrink-0 size-5",
2789
3178
  avatar: "shrink-0",
2790
3179
  avatarSize: "2xl",
2791
3180
  actions: "flex gap-1.5 shrink-0",
2792
3181
  progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
2793
- close: "p-0.5"
3182
+ close: "p-0"
2794
3183
  },
2795
3184
  variants: {
2796
3185
  color: {
2797
3186
  ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2798
- root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`,
2799
- icon: `text-[var(--ui-${color})]`,
2800
- 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})`
2801
3190
  }])),
2802
3191
  neutral: {
2803
- root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]",
2804
- icon: "text-[var(--ui-text-highlighted)]",
2805
- 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)"
2806
3195
  }
2807
3196
  },
2808
- multiline: {
2809
- true: {
2810
- root: "items-start",
2811
- actions: "items-start mt-1"
2812
- },
2813
- false: {
3197
+ orientation: {
3198
+ horizontal: {
2814
3199
  root: "items-center",
2815
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"
2816
3210
  }
2817
3211
  }
2818
3212
  },
@@ -2823,8 +3217,8 @@ const toast = (options) => ({
2823
3217
 
2824
3218
  const toaster = {
2825
3219
  slots: {
2826
- viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
2827
- base: "pointer-events-auto absolute inset-x-0 z-[var(--index)] transform-[var(--transform)] data-[expanded=false]:data-[front=false]:h-[var(--front-height)] data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
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"
2828
3222
  },
2829
3223
  variants: {
2830
3224
  position: {
@@ -2868,10 +3262,10 @@ const toaster = {
2868
3262
  }
2869
3263
  }, {
2870
3264
  swipeDirection: ["left", "right"],
2871
- 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"
2872
3266
  }, {
2873
3267
  swipeDirection: ["up", "down"],
2874
- 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"
2875
3269
  }],
2876
3270
  defaultVariants: {
2877
3271
  position: "bottom-right"
@@ -2880,14 +3274,95 @@ const toaster = {
2880
3274
 
2881
3275
  const tooltip = {
2882
3276
  slots: {
2883
- content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow-sm rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] h-6 px-2 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
2884
- 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)",
2885
3279
  text: "truncate",
2886
3280
  kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
2887
3281
  kbdsSize: "sm"
2888
3282
  }
2889
3283
  };
2890
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
+
2891
3366
  const theme = {
2892
3367
  __proto__: null,
2893
3368
  accordion: accordion,
@@ -2898,11 +3373,13 @@ const theme = {
2898
3373
  breadcrumb: breadcrumb,
2899
3374
  button: button,
2900
3375
  buttonGroup: buttonGroup,
3376
+ calendar: calendar,
2901
3377
  card: card,
2902
3378
  carousel: carousel,
2903
3379
  checkbox: checkbox,
2904
3380
  chip: chip,
2905
3381
  collapsible: collapsible,
3382
+ colorPicker: colorPicker,
2906
3383
  commandPalette: commandPalette,
2907
3384
  container: container,
2908
3385
  contextMenu: contextMenu,
@@ -2928,21 +3405,17 @@ const theme = {
2928
3405
  skeleton: skeleton,
2929
3406
  slideover: slideover,
2930
3407
  slider: slider,
3408
+ stepper: stepper,
2931
3409
  switch: _switch,
2932
3410
  table: table,
2933
3411
  tabs: tabs,
2934
3412
  textarea: textarea,
2935
3413
  toast: toast,
2936
3414
  toaster: toaster,
2937
- tooltip: tooltip
3415
+ tooltip: tooltip,
3416
+ tree: tree
2938
3417
  };
2939
3418
 
2940
- function buildTemplates(options) {
2941
- return Object.entries(theme).reduce((acc, [key, component]) => {
2942
- acc[key] = typeof component === "function" ? component(options) : component;
2943
- return acc;
2944
- }, {});
2945
- }
2946
3419
  function getTemplates(options, uiConfig) {
2947
3420
  const templates = [];
2948
3421
  for (const component in theme) {
@@ -2952,19 +3425,52 @@ function getTemplates(options, uiConfig) {
2952
3425
  getContents: async () => {
2953
3426
  const template = theme[component];
2954
3427
  const result = typeof template === "function" ? template(options) : template;
2955
- 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);
2956
3432
  let json = JSON.stringify(result, null, 2);
2957
3433
  for (const variant of variants) {
2958
- json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), "$1 as const");
3434
+ json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
2959
3435
  json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
2960
- const replaced = match.replace(/("[^"]+")/g, "$1 as const");
3436
+ const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
2961
3437
  return `${before}${replaced}${after}`;
2962
3438
  });
2963
3439
  }
2964
- 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");
2965
3450
  }
2966
3451
  });
2967
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
+ });
2968
3474
  templates.push({
2969
3475
  filename: "ui/index.ts",
2970
3476
  write: true,
@@ -2973,13 +3479,14 @@ function getTemplates(options, uiConfig) {
2973
3479
  templates.push({
2974
3480
  filename: "types/ui.d.ts",
2975
3481
  getContents: () => `import * as ui from '#build/ui'
2976
- import type { DeepPartial } from '#ui/types/utils'
3482
+ import type { DeepPartial } from '@nuxt/ui'
3483
+ import type { defaultConfig } from 'tailwind-variants'
2977
3484
  import colors from 'tailwindcss/colors'
2978
3485
 
2979
3486
  const icons = ${JSON.stringify(uiConfig.icons)};
2980
3487
 
2981
- type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
2982
- 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 & {})
2983
3490
 
2984
3491
  type AppConfigUI = {
2985
3492
  colors?: {
@@ -2987,6 +3494,7 @@ type AppConfigUI = {
2987
3494
  neutral?: NeutralColor
2988
3495
  }
2989
3496
  icons?: Partial<typeof icons>
3497
+ tv?: typeof defaultConfig
2990
3498
  } & DeepPartial<typeof ui>
2991
3499
 
2992
3500
  declare module '@nuxt/schema' {
@@ -3023,7 +3531,6 @@ function addTemplates(options, nuxt, resolve) {
3023
3531
  }
3024
3532
 
3025
3533
  exports.addTemplates = addTemplates;
3026
- exports.buildTemplates = buildTemplates;
3027
3534
  exports.defaultOptions = defaultOptions;
3028
3535
  exports.getDefaultUiConfig = getDefaultUiConfig;
3029
3536
  exports.getTemplates = getTemplates;