@nuxt/ui 3.0.0-alpha.1 → 3.0.0-alpha.11

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 (353) hide show
  1. package/.nuxt/ui/accordion.ts +20 -0
  2. package/.nuxt/ui/alert.ts +259 -0
  3. package/.nuxt/ui/avatar-group.ts +52 -0
  4. package/.nuxt/ui/avatar.ts +54 -0
  5. package/.nuxt/ui/badge.ts +231 -0
  6. package/.nuxt/ui/breadcrumb.ts +45 -0
  7. package/.nuxt/ui/button-group.ts +29 -0
  8. package/.nuxt/ui/button.ts +376 -0
  9. package/.nuxt/ui/calendar.ts +103 -0
  10. package/.nuxt/ui/card.ts +8 -0
  11. package/.nuxt/ui/carousel.ts +43 -0
  12. package/.nuxt/ui/checkbox.ts +123 -0
  13. package/.nuxt/ui/chip.ts +96 -0
  14. package/.nuxt/ui/collapsible.ts +6 -0
  15. package/.nuxt/ui/color-picker.ts +47 -0
  16. package/.nuxt/ui/command-palette.ts +50 -0
  17. package/.nuxt/ui/container.ts +3 -0
  18. package/.nuxt/ui/context-menu.ts +216 -0
  19. package/.nuxt/ui/drawer.ts +62 -0
  20. package/.nuxt/ui/dropdown-menu.ts +217 -0
  21. package/.nuxt/ui/form-field.ts +48 -0
  22. package/.nuxt/ui/form.ts +3 -0
  23. package/.nuxt/ui/index.ts +48 -0
  24. package/.nuxt/ui/input-menu.ts +445 -0
  25. package/.nuxt/ui/input-number.ts +235 -0
  26. package/.nuxt/ui/input.ts +298 -0
  27. package/.nuxt/ui/kbd.ts +31 -0
  28. package/.nuxt/ui/link.ts +15 -0
  29. package/.nuxt/ui/modal.ts +28 -0
  30. package/.nuxt/ui/navigation-menu.ts +436 -0
  31. package/.nuxt/ui/pagination.ts +8 -0
  32. package/.nuxt/ui/pin-input.ts +171 -0
  33. package/.nuxt/ui/popover.ts +6 -0
  34. package/.nuxt/ui/progress.ts +297 -0
  35. package/.nuxt/ui/radio-group.ts +135 -0
  36. package/.nuxt/ui/select-menu.ts +351 -0
  37. package/.nuxt/ui/select.ts +350 -0
  38. package/.nuxt/ui/separator.ts +172 -0
  39. package/.nuxt/ui/skeleton.ts +3 -0
  40. package/.nuxt/ui/slideover.ts +70 -0
  41. package/.nuxt/ui/slider.ts +171 -0
  42. package/.nuxt/ui/stepper.ts +202 -0
  43. package/.nuxt/ui/switch.ts +131 -0
  44. package/.nuxt/ui/table.ts +146 -0
  45. package/.nuxt/ui/tabs.ts +255 -0
  46. package/.nuxt/ui/textarea.ts +298 -0
  47. package/.nuxt/ui/toast.ts +76 -0
  48. package/.nuxt/ui/toaster.ts +91 -0
  49. package/.nuxt/ui/tooltip.ts +9 -0
  50. package/README.md +82 -54
  51. package/cli/commands/{init.mjs → make/component.mjs} +17 -5
  52. package/cli/commands/make/index.mjs +14 -0
  53. package/cli/commands/make/locale.mjs +64 -0
  54. package/cli/index.mjs +2 -2
  55. package/cli/package.json +2 -2
  56. package/cli/templates.mjs +60 -10
  57. package/cli/utils.mjs +14 -0
  58. package/dist/chunks/component-meta.cjs +82802 -0
  59. package/dist/chunks/component-meta.mjs +82800 -0
  60. package/dist/client/devtools/200.html +1 -0
  61. package/dist/client/devtools/404.html +1 -0
  62. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
  63. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
  64. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
  65. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
  66. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
  67. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
  68. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
  69. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
  70. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
  71. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
  72. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
  73. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
  74. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
  75. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
  76. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
  77. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
  78. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
  79. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
  80. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
  81. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
  82. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
  83. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
  84. package/dist/client/devtools/_nuxt/CQ-XZFu7.js +54 -0
  85. package/dist/client/devtools/_nuxt/DNZFyo26.js +1 -0
  86. package/dist/client/devtools/_nuxt/Dtz-o9GB.js +1 -0
  87. package/dist/client/devtools/_nuxt/builds/latest.json +1 -0
  88. package/dist/client/devtools/_nuxt/builds/meta/1f5fbd7b-9d97-480e-9ae4-e02b4ff7018b.json +1 -0
  89. package/dist/client/devtools/_nuxt/entry.qOdop8tq.css +1 -0
  90. package/dist/client/devtools/_nuxt/error-404.D-rS9BDk.css +1 -0
  91. package/dist/client/devtools/_nuxt/error-500.CfcCHs91.css +1 -0
  92. package/dist/client/devtools/favicon.svg +1 -0
  93. package/dist/client/devtools/index.html +1 -0
  94. package/dist/devtools/runtime/DevtoolsRenderer.vue +54 -0
  95. package/dist/devtools/runtime/examples/AvatarGroupExample.vue +7 -0
  96. package/dist/devtools/runtime/examples/ButtonGroupExample.vue +8 -0
  97. package/dist/devtools/runtime/examples/CardExample.vue +13 -0
  98. package/dist/devtools/runtime/examples/CarouselExample.vue +13 -0
  99. package/dist/devtools/runtime/examples/ChipExample.vue +5 -0
  100. package/dist/devtools/runtime/examples/CollapsibleExample.vue +8 -0
  101. package/dist/devtools/runtime/examples/CommandPaletteExample.vue +29 -0
  102. package/dist/devtools/runtime/examples/ContainerExample.vue +5 -0
  103. package/dist/devtools/runtime/examples/ContextMenuExample.vue +5 -0
  104. package/dist/devtools/runtime/examples/DrawerExample.vue +8 -0
  105. package/dist/devtools/runtime/examples/DropdownMenuExample.vue +5 -0
  106. package/dist/devtools/runtime/examples/FormExample.vue +30 -0
  107. package/dist/devtools/runtime/examples/FormFieldExample.vue +5 -0
  108. package/dist/devtools/runtime/examples/LinkExample.vue +5 -0
  109. package/dist/devtools/runtime/examples/ModalExample.vue +8 -0
  110. package/dist/devtools/runtime/examples/PopoverExample.vue +8 -0
  111. package/dist/devtools/runtime/examples/SkeletonExample.vue +3 -0
  112. package/dist/devtools/runtime/examples/SlideoverExample.vue +8 -0
  113. package/dist/devtools/runtime/examples/StepperExample.vue +44 -0
  114. package/dist/devtools/runtime/examples/ToasterExample.vue +11 -0
  115. package/dist/devtools/runtime/examples/TooltipExample.vue +5 -0
  116. package/dist/module.cjs +223 -4
  117. package/dist/module.d.cts +54 -0
  118. package/dist/module.d.mts +38 -7
  119. package/dist/module.d.ts +38 -7
  120. package/dist/module.json +2 -1
  121. package/dist/module.mjs +179 -2568
  122. package/dist/runtime/components/Accordion.vue +51 -9
  123. package/dist/runtime/components/Alert.vue +16 -8
  124. package/dist/runtime/components/App.vue +20 -7
  125. package/dist/runtime/components/Avatar.vue +36 -11
  126. package/dist/runtime/components/AvatarGroup.vue +6 -2
  127. package/dist/runtime/components/Badge.vue +36 -5
  128. package/dist/runtime/components/Breadcrumb.vue +53 -14
  129. package/dist/runtime/components/Button.vue +47 -7
  130. package/dist/runtime/components/ButtonGroup.vue +7 -3
  131. package/dist/runtime/components/Calendar.vue +191 -0
  132. package/dist/runtime/components/Card.vue +5 -2
  133. package/dist/runtime/components/Carousel.vue +323 -0
  134. package/dist/runtime/components/Checkbox.vue +30 -34
  135. package/dist/runtime/components/Chip.vue +12 -4
  136. package/dist/runtime/components/Collapsible.vue +11 -6
  137. package/dist/runtime/components/ColorPicker.vue +266 -0
  138. package/dist/runtime/components/CommandPalette.vue +132 -99
  139. package/dist/runtime/components/Container.vue +5 -2
  140. package/dist/runtime/components/ContextMenu.vue +103 -15
  141. package/dist/runtime/components/ContextMenuContent.vue +49 -19
  142. package/dist/runtime/components/Drawer.vue +28 -12
  143. package/dist/runtime/components/DropdownMenu.vue +93 -17
  144. package/dist/runtime/components/DropdownMenuContent.vue +51 -19
  145. package/dist/runtime/components/Form.vue +59 -41
  146. package/dist/runtime/components/FormField.vue +20 -7
  147. package/dist/runtime/components/Icon.vue +1 -1
  148. package/dist/runtime/components/Input.vue +18 -8
  149. package/dist/runtime/components/InputMenu.vue +164 -66
  150. package/dist/runtime/components/InputNumber.vue +193 -0
  151. package/dist/runtime/components/Kbd.vue +5 -2
  152. package/dist/runtime/components/Link.vue +72 -9
  153. package/dist/runtime/components/LinkBase.vue +10 -7
  154. package/dist/runtime/components/Modal.vue +23 -16
  155. package/dist/runtime/components/NavigationMenu.vue +178 -78
  156. package/dist/runtime/components/Pagination.vue +32 -16
  157. package/dist/runtime/components/PinInput.vue +97 -0
  158. package/dist/runtime/components/Popover.vue +29 -9
  159. package/dist/runtime/components/Progress.vue +29 -11
  160. package/dist/runtime/components/RadioGroup.vue +30 -8
  161. package/dist/runtime/components/Select.vue +81 -33
  162. package/dist/runtime/components/SelectMenu.vue +181 -81
  163. package/dist/runtime/components/Separator.vue +5 -4
  164. package/dist/runtime/components/Skeleton.vue +5 -2
  165. package/dist/runtime/components/Slideover.vue +23 -15
  166. package/dist/runtime/components/Slider.vue +5 -4
  167. package/dist/runtime/components/Stepper.vue +173 -0
  168. package/dist/runtime/components/Switch.vue +18 -17
  169. package/dist/runtime/components/Table.vue +263 -0
  170. package/dist/runtime/components/Tabs.vue +45 -16
  171. package/dist/runtime/components/Textarea.vue +12 -5
  172. package/dist/runtime/components/Toast.vue +15 -6
  173. package/dist/runtime/components/Toaster.vue +33 -17
  174. package/dist/runtime/components/Tooltip.vue +10 -7
  175. package/dist/runtime/composables/defineLocale.d.ts +9 -0
  176. package/dist/runtime/composables/defineLocale.js +4 -0
  177. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  178. package/dist/runtime/composables/defineShortcuts.js +3 -9
  179. package/dist/runtime/composables/extendDevtoolsMeta.d.ts +7 -0
  180. package/dist/runtime/composables/extendDevtoolsMeta.js +2 -0
  181. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  182. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  183. package/dist/runtime/composables/useComponentIcons.d.ts +3 -0
  184. package/dist/runtime/composables/useFormField.d.ts +9 -5
  185. package/dist/runtime/composables/useFormField.js +8 -4
  186. package/dist/runtime/composables/useKbd.d.ts +10 -3
  187. package/dist/runtime/composables/useKbd.js +14 -8
  188. package/dist/runtime/composables/useLocale.d.ts +4 -0
  189. package/dist/runtime/composables/useLocale.js +10 -0
  190. package/dist/runtime/composables/useModal.d.ts +2 -2
  191. package/dist/runtime/composables/useSlideover.d.ts +2 -2
  192. package/dist/runtime/composables/useToast.d.ts +2 -2
  193. package/dist/runtime/index.css +1 -1
  194. package/dist/runtime/keyframes.css +1 -0
  195. package/dist/runtime/locale/ar.d.ts +2 -0
  196. package/dist/runtime/locale/ar.js +55 -0
  197. package/dist/runtime/locale/cs.d.ts +2 -0
  198. package/dist/runtime/locale/cs.js +54 -0
  199. package/dist/runtime/locale/da.d.ts +2 -0
  200. package/dist/runtime/locale/da.js +54 -0
  201. package/dist/runtime/locale/de.d.ts +2 -0
  202. package/dist/runtime/locale/de.js +54 -0
  203. package/dist/runtime/locale/el.d.ts +2 -0
  204. package/dist/runtime/locale/el.js +54 -0
  205. package/dist/runtime/locale/en.d.ts +2 -0
  206. package/dist/runtime/locale/en.js +54 -0
  207. package/dist/runtime/locale/es.d.ts +2 -0
  208. package/dist/runtime/locale/es.js +54 -0
  209. package/dist/runtime/locale/et.d.ts +2 -0
  210. package/dist/runtime/locale/et.js +54 -0
  211. package/dist/runtime/locale/fa_ir.d.ts +2 -0
  212. package/dist/runtime/locale/fa_ir.js +55 -0
  213. package/dist/runtime/locale/fi.d.ts +2 -0
  214. package/dist/runtime/locale/fi.js +54 -0
  215. package/dist/runtime/locale/fr.d.ts +2 -0
  216. package/dist/runtime/locale/fr.js +54 -0
  217. package/dist/runtime/locale/id.d.ts +2 -0
  218. package/dist/runtime/locale/id.js +54 -0
  219. package/dist/runtime/locale/index.d.ts +28 -0
  220. package/dist/runtime/locale/index.js +28 -0
  221. package/dist/runtime/locale/it.d.ts +2 -0
  222. package/dist/runtime/locale/it.js +54 -0
  223. package/dist/runtime/locale/ja.d.ts +2 -0
  224. package/dist/runtime/locale/ja.js +54 -0
  225. package/dist/runtime/locale/ko.d.ts +2 -0
  226. package/dist/runtime/locale/ko.js +54 -0
  227. package/dist/runtime/locale/nl.d.ts +2 -0
  228. package/dist/runtime/locale/nl.js +54 -0
  229. package/dist/runtime/locale/pl.d.ts +2 -0
  230. package/dist/runtime/locale/pl.js +54 -0
  231. package/dist/runtime/locale/pt.d.ts +2 -0
  232. package/dist/runtime/locale/pt.js +54 -0
  233. package/dist/runtime/locale/pt_br.d.ts +2 -0
  234. package/dist/runtime/locale/pt_br.js +54 -0
  235. package/dist/runtime/locale/ru.d.ts +2 -0
  236. package/dist/runtime/locale/ru.js +54 -0
  237. package/dist/runtime/locale/sk.d.ts +2 -0
  238. package/dist/runtime/locale/sk.js +54 -0
  239. package/dist/runtime/locale/sv.d.ts +2 -0
  240. package/dist/runtime/locale/sv.js +54 -0
  241. package/dist/runtime/locale/th.d.ts +2 -0
  242. package/dist/runtime/locale/th.js +54 -0
  243. package/dist/runtime/locale/tr.d.ts +2 -0
  244. package/dist/runtime/locale/tr.js +54 -0
  245. package/dist/runtime/locale/uk.d.ts +2 -0
  246. package/dist/runtime/locale/uk.js +54 -0
  247. package/dist/runtime/locale/vi.d.ts +2 -0
  248. package/dist/runtime/locale/vi.js +54 -0
  249. package/dist/runtime/locale/zh_hans.d.ts +2 -0
  250. package/dist/runtime/locale/zh_hans.js +54 -0
  251. package/dist/runtime/locale/zh_hant.d.ts +2 -0
  252. package/dist/runtime/locale/zh_hant.js +54 -0
  253. package/dist/runtime/plugins/colors.js +12 -8
  254. package/dist/runtime/types/form.d.ts +11 -4
  255. package/dist/runtime/types/form.js +2 -2
  256. package/dist/runtime/types/index.d.ts +50 -42
  257. package/dist/runtime/types/index.js +8 -0
  258. package/dist/runtime/types/locale.d.ts +56 -0
  259. package/dist/runtime/types/utils.d.ts +8 -3
  260. package/dist/runtime/utils/form.d.ts +7 -5
  261. package/dist/runtime/utils/form.js +117 -28
  262. package/dist/runtime/utils/index.d.ts +2 -1
  263. package/dist/runtime/utils/index.js +16 -0
  264. package/dist/runtime/utils/link.d.ts +5 -3
  265. package/dist/runtime/utils/link.js +1 -1
  266. package/dist/runtime/utils/locale.d.ts +15 -0
  267. package/dist/runtime/utils/locale.js +25 -0
  268. package/dist/runtime/utils/tv.d.ts +1 -0
  269. package/dist/runtime/utils/tv.js +4 -0
  270. package/dist/runtime/vue/components/Icon.vue +15 -0
  271. package/dist/runtime/vue/components/Link.vue +208 -0
  272. package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
  273. package/dist/runtime/vue/plugins/color-mode.js +6 -0
  274. package/dist/runtime/vue/plugins/head.d.ts +4 -0
  275. package/dist/runtime/vue/plugins/head.js +6 -0
  276. package/dist/runtime/vue/stubs.d.ts +15 -0
  277. package/dist/runtime/vue/stubs.js +27 -0
  278. package/dist/shared/ui.BKsd22-Q.mjs +3289 -0
  279. package/dist/shared/ui.DCjJwb6l.cjs +3296 -0
  280. package/dist/unplugin.cjs +192 -0
  281. package/dist/unplugin.d.cts +49 -0
  282. package/dist/unplugin.d.mts +49 -0
  283. package/dist/unplugin.d.ts +49 -0
  284. package/dist/unplugin.mjs +181 -0
  285. package/dist/vite.cjs +22 -0
  286. package/dist/vite.d.cts +13 -0
  287. package/dist/vite.d.mts +13 -0
  288. package/dist/vite.d.ts +13 -0
  289. package/dist/vite.mjs +20 -0
  290. package/package.json +107 -35
  291. package/vue-plugin.d.ts +5 -0
  292. package/cli/node_modules/.ignored/citty/LICENSE +0 -36
  293. package/cli/node_modules/.ignored/citty/README.md +0 -134
  294. package/cli/node_modules/.ignored/citty/dist/index.cjs +0 -475
  295. package/cli/node_modules/.ignored/citty/dist/index.d.cts +0 -80
  296. package/cli/node_modules/.ignored/citty/dist/index.d.mts +0 -80
  297. package/cli/node_modules/.ignored/citty/dist/index.d.ts +0 -80
  298. package/cli/node_modules/.ignored/citty/dist/index.mjs +0 -463
  299. package/cli/node_modules/.ignored/citty/package.json +0 -49
  300. package/cli/node_modules/.ignored/consola/LICENSE +0 -47
  301. package/cli/node_modules/.ignored/consola/README.md +0 -318
  302. package/cli/node_modules/.ignored/consola/core.d.ts +0 -1
  303. package/cli/node_modules/.ignored/consola/dist/basic.cjs +0 -32
  304. package/cli/node_modules/.ignored/consola/dist/basic.d.ts +0 -9
  305. package/cli/node_modules/.ignored/consola/dist/basic.mjs +0 -24
  306. package/cli/node_modules/.ignored/consola/dist/browser.cjs +0 -80
  307. package/cli/node_modules/.ignored/consola/dist/browser.d.ts +0 -7
  308. package/cli/node_modules/.ignored/consola/dist/browser.mjs +0 -72
  309. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +0 -436
  310. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +0 -429
  311. package/cli/node_modules/.ignored/consola/dist/core.cjs +0 -415
  312. package/cli/node_modules/.ignored/consola/dist/core.d.ts +0 -124
  313. package/cli/node_modules/.ignored/consola/dist/core.mjs +0 -410
  314. package/cli/node_modules/.ignored/consola/dist/index.cjs +0 -21
  315. package/cli/node_modules/.ignored/consola/dist/index.d.ts +0 -9
  316. package/cli/node_modules/.ignored/consola/dist/index.mjs +0 -8
  317. package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +0 -62
  318. package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +0 -636
  319. package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +0 -645
  320. package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +0 -65
  321. package/cli/node_modules/.ignored/consola/dist/utils.cjs +0 -308
  322. package/cli/node_modules/.ignored/consola/dist/utils.d.ts +0 -169
  323. package/cli/node_modules/.ignored/consola/dist/utils.mjs +0 -284
  324. package/cli/node_modules/.ignored/consola/lib/index.cjs +0 -9
  325. package/cli/node_modules/.ignored/consola/package.json +0 -101
  326. package/cli/node_modules/.ignored/consola/utils.d.ts +0 -1
  327. package/cli/node_modules/.ignored/pathe/LICENSE +0 -44
  328. package/cli/node_modules/.ignored/pathe/README.md +0 -69
  329. package/cli/node_modules/.ignored/pathe/dist/index.cjs +0 -23
  330. package/cli/node_modules/.ignored/pathe/dist/index.d.cts +0 -36
  331. package/cli/node_modules/.ignored/pathe/dist/index.d.mts +0 -36
  332. package/cli/node_modules/.ignored/pathe/dist/index.d.ts +0 -36
  333. package/cli/node_modules/.ignored/pathe/dist/index.mjs +0 -1
  334. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +0 -238
  335. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +0 -221
  336. package/cli/node_modules/.ignored/pathe/dist/utils.cjs +0 -58
  337. package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +0 -5
  338. package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +0 -5
  339. package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +0 -5
  340. package/cli/node_modules/.ignored/pathe/dist/utils.mjs +0 -54
  341. package/cli/node_modules/.ignored/pathe/package.json +0 -48
  342. package/cli/node_modules/.ignored/pathe/utils.d.ts +0 -1
  343. package/cli/node_modules/.ignored/scule/LICENSE +0 -21
  344. package/cli/node_modules/.ignored/scule/README.md +0 -149
  345. package/cli/node_modules/.ignored/scule/dist/index.cjs +0 -92
  346. package/cli/node_modules/.ignored/scule/dist/index.d.cts +0 -57
  347. package/cli/node_modules/.ignored/scule/dist/index.d.mts +0 -57
  348. package/cli/node_modules/.ignored/scule/dist/index.d.ts +0 -57
  349. package/cli/node_modules/.ignored/scule/dist/index.mjs +0 -80
  350. package/cli/node_modules/.ignored/scule/package.json +0 -43
  351. package/cli/node_modules/.package-lock.json +0 -33
  352. package/dist/runtime/types/component.d.ts +0 -17
  353. /package/dist/runtime/types/{component.js → locale.js} +0 -0
@@ -0,0 +1,3289 @@
1
+ import { pick } from '../../dist/runtime/utils/index.js';
2
+ import 'node:url';
3
+ import { kebabCase } from 'scule';
4
+ import { addTypeTemplate, addTemplate } from '@nuxt/kit';
5
+ import { defuFn, defu } from 'defu';
6
+
7
+ const icons = {
8
+ arrowLeft: "i-lucide-arrow-left",
9
+ arrowRight: "i-lucide-arrow-right",
10
+ check: "i-lucide-check",
11
+ chevronDoubleLeft: "i-lucide-chevrons-left",
12
+ chevronDoubleRight: "i-lucide-chevrons-right",
13
+ chevronDown: "i-lucide-chevron-down",
14
+ chevronLeft: "i-lucide-chevron-left",
15
+ chevronRight: "i-lucide-chevron-right",
16
+ chevronUp: "i-lucide-chevron-up",
17
+ close: "i-lucide-x",
18
+ ellipsis: "i-lucide-ellipsis",
19
+ external: "i-lucide-arrow-up-right",
20
+ loading: "i-lucide-refresh-cw",
21
+ minus: "i-lucide-minus",
22
+ plus: "i-lucide-plus",
23
+ search: "i-lucide-search"
24
+ };
25
+
26
+ const getDefaultUiConfig = (colors) => ({
27
+ colors: pick({
28
+ primary: "green",
29
+ secondary: "blue",
30
+ success: "green",
31
+ info: "blue",
32
+ warning: "yellow",
33
+ error: "red",
34
+ neutral: "slate"
35
+ }, [...colors || [], "neutral"]),
36
+ icons
37
+ });
38
+ const defaultOptions = {
39
+ prefix: "U",
40
+ fonts: true,
41
+ colorMode: true,
42
+ theme: {
43
+ colors: undefined,
44
+ transitions: true
45
+ },
46
+ devtools: {
47
+ enabled: true
48
+ }
49
+ };
50
+ const resolveColors = (colors) => {
51
+ return colors?.length ? [.../* @__PURE__ */ new Set(["primary", ...colors])] : ["primary", "secondary", "success", "info", "warning", "error"];
52
+ };
53
+
54
+ const accordion = {
55
+ slots: {
56
+ root: "w-full",
57
+ item: "border-b border-[var(--ui-border)] last:border-b-0",
58
+ header: "flex",
59
+ trigger: "group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-[var(--ui-primary)] min-w-0",
60
+ content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
61
+ body: "text-sm pb-3.5",
62
+ leadingIcon: "shrink-0 size-5",
63
+ trailingIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200",
64
+ label: "text-start break-words"
65
+ },
66
+ variants: {
67
+ disabled: {
68
+ true: {
69
+ trigger: "cursor-not-allowed opacity-75"
70
+ }
71
+ }
72
+ }
73
+ };
74
+
75
+ const alert = (options) => ({
76
+ slots: {
77
+ root: "relative overflow-hidden w-full rounded-[calc(var(--ui-radius)*2)] p-4 flex gap-2.5",
78
+ wrapper: "min-w-0 flex-1 flex flex-col gap-1",
79
+ title: "text-sm font-medium",
80
+ description: "text-sm opacity-90",
81
+ icon: "shrink-0 size-5",
82
+ avatar: "shrink-0",
83
+ avatarSize: "2xl",
84
+ actions: "flex gap-1.5 shrink-0",
85
+ close: "p-0.5"
86
+ },
87
+ variants: {
88
+ color: {
89
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
90
+ neutral: ""
91
+ },
92
+ variant: {
93
+ solid: "",
94
+ outline: "",
95
+ soft: "",
96
+ subtle: ""
97
+ },
98
+ multiline: {
99
+ true: {
100
+ root: "items-start",
101
+ actions: "items-start mt-1"
102
+ },
103
+ false: {
104
+ root: "items-center",
105
+ actions: "items-center"
106
+ }
107
+ }
108
+ },
109
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
110
+ color,
111
+ variant: "solid",
112
+ class: {
113
+ root: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
114
+ }
115
+ })), ...(options.theme.colors || []).map((color) => ({
116
+ color,
117
+ variant: "outline",
118
+ class: {
119
+ root: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
120
+ }
121
+ })), ...(options.theme.colors || []).map((color) => ({
122
+ color,
123
+ variant: "soft",
124
+ class: {
125
+ root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
126
+ }
127
+ })), ...(options.theme.colors || []).map((color) => ({
128
+ color,
129
+ variant: "subtle",
130
+ class: {
131
+ root: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
132
+ }
133
+ })), {
134
+ color: "neutral",
135
+ variant: "solid",
136
+ class: {
137
+ root: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
138
+ }
139
+ }, {
140
+ color: "neutral",
141
+ variant: "outline",
142
+ class: {
143
+ root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border)]"
144
+ }
145
+ }, {
146
+ color: "neutral",
147
+ variant: "soft",
148
+ class: {
149
+ root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50"
150
+ }
151
+ }, {
152
+ color: "neutral",
153
+ variant: "subtle",
154
+ class: {
155
+ root: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)]/50 ring ring-inset ring-[var(--ui-border-accented)]"
156
+ }
157
+ }],
158
+ defaultVariants: {
159
+ color: "primary",
160
+ variant: "solid"
161
+ }
162
+ });
163
+
164
+ const avatar = {
165
+ slots: {
166
+ root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
167
+ image: "h-full w-full rounded-[inherit] object-cover",
168
+ fallback: "font-medium leading-none text-[var(--ui-text-muted)] truncate",
169
+ icon: "text-[var(--ui-text-muted)] shrink-0"
170
+ },
171
+ variants: {
172
+ size: {
173
+ "3xs": {
174
+ root: "size-4 text-[8px]"
175
+ },
176
+ "2xs": {
177
+ root: "size-5 text-[10px]"
178
+ },
179
+ "xs": {
180
+ root: "size-6 text-xs"
181
+ },
182
+ "sm": {
183
+ root: "size-7 text-sm"
184
+ },
185
+ "md": {
186
+ root: "size-8 text-base"
187
+ },
188
+ "lg": {
189
+ root: "size-9 text-lg"
190
+ },
191
+ "xl": {
192
+ root: "size-10 text-xl"
193
+ },
194
+ "2xl": {
195
+ root: "size-11 text-[22px]"
196
+ },
197
+ "3xl": {
198
+ root: "size-12 text-2xl"
199
+ }
200
+ }
201
+ },
202
+ defaultVariants: {
203
+ size: "md"
204
+ }
205
+ };
206
+
207
+ const avatarGroup = {
208
+ slots: {
209
+ root: "inline-flex flex-row-reverse justify-end",
210
+ base: "relative rounded-full ring-[var(--ui-bg)] first:me-0"
211
+ },
212
+ variants: {
213
+ size: {
214
+ "3xs": {
215
+ base: "ring -me-0.5"
216
+ },
217
+ "2xs": {
218
+ base: "ring -me-0.5"
219
+ },
220
+ "xs": {
221
+ base: "ring -me-0.5"
222
+ },
223
+ "sm": {
224
+ base: "ring-2 -me-1.5"
225
+ },
226
+ "md": {
227
+ base: "ring-2 -me-1.5"
228
+ },
229
+ "lg": {
230
+ base: "ring-2 -me-1.5"
231
+ },
232
+ "xl": {
233
+ base: "ring-3 -me-2"
234
+ },
235
+ "2xl": {
236
+ base: "ring-3 -me-2"
237
+ },
238
+ "3xl": {
239
+ base: "ring-3 -me-2"
240
+ }
241
+ }
242
+ },
243
+ defaultVariants: {
244
+ size: "md"
245
+ }
246
+ };
247
+
248
+ const badge = (options) => ({
249
+ slots: {
250
+ base: "font-medium inline-flex items-center",
251
+ label: "truncate",
252
+ leadingIcon: "shrink-0",
253
+ leadingAvatar: "shrink-0",
254
+ leadingAvatarSize: "",
255
+ trailingIcon: "shrink-0"
256
+ },
257
+ variants: {
258
+ color: {
259
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
260
+ neutral: ""
261
+ },
262
+ variant: {
263
+ solid: "",
264
+ outline: "",
265
+ soft: "",
266
+ subtle: ""
267
+ },
268
+ size: {
269
+ xs: {
270
+ base: "text-[8px]/3 px-1 py-0.5 gap-1 rounded-[calc(var(--ui-radius))]",
271
+ leadingIcon: "size-3",
272
+ leadingAvatarSize: "3xs",
273
+ trailingIcon: "size-3"
274
+ },
275
+ sm: {
276
+ base: "text-[10px]/3 px-1.5 py-1 gap-1 rounded-[calc(var(--ui-radius))]",
277
+ leadingIcon: "size-3",
278
+ leadingAvatarSize: "3xs",
279
+ trailingIcon: "size-3"
280
+ },
281
+ md: {
282
+ base: "text-xs px-2 py-1 gap-1 rounded-[calc(var(--ui-radius)*1.5)]",
283
+ leadingIcon: "size-4",
284
+ leadingAvatarSize: "3xs",
285
+ trailingIcon: "size-4"
286
+ },
287
+ lg: {
288
+ base: "text-sm px-2 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
289
+ leadingIcon: "size-5",
290
+ leadingAvatarSize: "2xs",
291
+ trailingIcon: "size-5"
292
+ },
293
+ xl: {
294
+ base: "text-base px-2.5 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
295
+ leadingIcon: "size-6",
296
+ leadingAvatarSize: "2xs",
297
+ trailingIcon: "size-6"
298
+ }
299
+ }
300
+ },
301
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
302
+ color,
303
+ variant: "solid",
304
+ class: `bg-[var(--ui-${color})] text-[var(--ui-bg)]`
305
+ })), ...(options.theme.colors || []).map((color) => ({
306
+ color,
307
+ variant: "outline",
308
+ class: `text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/50`
309
+ })), ...(options.theme.colors || []).map((color) => ({
310
+ color,
311
+ variant: "soft",
312
+ class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})]`
313
+ })), ...(options.theme.colors || []).map((color) => ({
314
+ color,
315
+ variant: "subtle",
316
+ class: `bg-[var(--ui-${color})]/10 text-[var(--ui-${color})] ring ring-inset ring-[var(--ui-${color})]/25`
317
+ })), {
318
+ color: "neutral",
319
+ variant: "solid",
320
+ class: "text-[var(--ui-bg)] bg-[var(--ui-bg-inverted)]"
321
+ }, {
322
+ color: "neutral",
323
+ variant: "outline",
324
+ class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg)]"
325
+ }, {
326
+ color: "neutral",
327
+ variant: "soft",
328
+ class: "text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
329
+ }, {
330
+ color: "neutral",
331
+ variant: "subtle",
332
+ class: "ring ring-inset ring-[var(--ui-border-accented)] text-[var(--ui-text)] bg-[var(--ui-bg-elevated)]"
333
+ }],
334
+ defaultVariants: {
335
+ color: "primary",
336
+ variant: "solid",
337
+ size: "md"
338
+ }
339
+ });
340
+
341
+ const breadcrumb = (options) => ({
342
+ slots: {
343
+ root: "relative min-w-0",
344
+ list: "flex items-center gap-1.5",
345
+ item: "flex min-w-0",
346
+ link: "group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-[var(--ui-primary)]",
347
+ linkLeadingIcon: "shrink-0 size-5",
348
+ linkLeadingAvatar: "shrink-0",
349
+ linkLeadingAvatarSize: "2xs",
350
+ linkLabel: "truncate",
351
+ separator: "flex",
352
+ separatorIcon: "shrink-0 size-5 text-[var(--ui-text-muted)]"
353
+ },
354
+ variants: {
355
+ active: {
356
+ true: {
357
+ link: "text-[var(--ui-primary)] font-semibold"
358
+ },
359
+ false: {
360
+ link: "text-[var(--ui-text-muted)] font-medium"
361
+ }
362
+ },
363
+ disabled: {
364
+ true: {
365
+ link: "cursor-not-allowed opacity-75"
366
+ }
367
+ },
368
+ to: {
369
+ true: ""
370
+ }
371
+ },
372
+ compoundVariants: [{
373
+ disabled: false,
374
+ active: false,
375
+ to: true,
376
+ class: {
377
+ link: ["hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
378
+ }
379
+ }]
380
+ });
381
+
382
+ const buttonGroupVariant = {
383
+ buttonGroup: {
384
+ horizontal: "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
385
+ vertical: "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
386
+ }
387
+ };
388
+ const buttonGroupVariantWithRoot = {
389
+ buttonGroup: {
390
+ horizontal: {
391
+ root: "group",
392
+ 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"
393
+ },
394
+ vertical: {
395
+ root: "group",
396
+ 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"
397
+ }
398
+ }
399
+ };
400
+ const buttonGroup = {
401
+ base: "relative",
402
+ variants: {
403
+ size: {
404
+ xs: "",
405
+ sm: "",
406
+ md: "",
407
+ lg: "",
408
+ xl: ""
409
+ },
410
+ orientation: {
411
+ horizontal: "inline-flex -space-x-px",
412
+ vertical: "flex flex-col -space-y-px"
413
+ }
414
+ }
415
+ };
416
+
417
+ const button = (options) => ({
418
+ slots: {
419
+ 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"],
420
+ label: "truncate",
421
+ leadingIcon: "shrink-0",
422
+ leadingAvatar: "shrink-0",
423
+ leadingAvatarSize: "",
424
+ trailingIcon: "shrink-0"
425
+ },
426
+ variants: {
427
+ ...buttonGroupVariant,
428
+ color: {
429
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
430
+ neutral: ""
431
+ },
432
+ variant: {
433
+ solid: "",
434
+ outline: "",
435
+ soft: "",
436
+ subtle: "",
437
+ ghost: "",
438
+ link: ""
439
+ },
440
+ size: {
441
+ xs: {
442
+ base: "px-2 py-1 text-xs gap-1",
443
+ leadingIcon: "size-4",
444
+ leadingAvatarSize: "3xs",
445
+ trailingIcon: "size-4"
446
+ },
447
+ sm: {
448
+ base: "px-2.5 py-1.5 text-xs gap-1.5",
449
+ leadingIcon: "size-4",
450
+ leadingAvatarSize: "3xs",
451
+ trailingIcon: "size-4"
452
+ },
453
+ md: {
454
+ base: "px-2.5 py-1.5 text-sm gap-1.5",
455
+ leadingIcon: "size-5",
456
+ leadingAvatarSize: "2xs",
457
+ trailingIcon: "size-5"
458
+ },
459
+ lg: {
460
+ base: "px-3 py-2 text-sm gap-2",
461
+ leadingIcon: "size-5",
462
+ leadingAvatarSize: "2xs",
463
+ trailingIcon: "size-5"
464
+ },
465
+ xl: {
466
+ base: "px-3 py-2 text-base gap-2",
467
+ leadingIcon: "size-6",
468
+ leadingAvatarSize: "xs",
469
+ trailingIcon: "size-6"
470
+ }
471
+ },
472
+ block: {
473
+ true: {
474
+ base: "w-full justify-center",
475
+ leadingAvatarSize: "xs",
476
+ trailingIcon: "ms-auto"
477
+ }
478
+ },
479
+ square: {
480
+ true: ""
481
+ },
482
+ leading: {
483
+ true: ""
484
+ },
485
+ trailing: {
486
+ true: ""
487
+ },
488
+ loading: {
489
+ true: ""
490
+ }
491
+ },
492
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
493
+ color,
494
+ variant: "solid",
495
+ 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})]`
496
+ })), ...(options.theme.colors || []).map((color) => ({
497
+ color,
498
+ variant: "outline",
499
+ 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})]`
500
+ })), ...(options.theme.colors || []).map((color) => ({
501
+ color,
502
+ variant: "soft",
503
+ 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`
504
+ })), ...(options.theme.colors || []).map((color) => ({
505
+ color,
506
+ variant: "subtle",
507
+ 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})]`
508
+ })), ...(options.theme.colors || []).map((color) => ({
509
+ color,
510
+ variant: "ghost",
511
+ 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`
512
+ })), ...(options.theme.colors || []).map((color) => ({
513
+ color,
514
+ variant: "link",
515
+ 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})]`
516
+ })), {
517
+ color: "neutral",
518
+ variant: "solid",
519
+ 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)]"
520
+ }, {
521
+ color: "neutral",
522
+ variant: "outline",
523
+ 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)]"
524
+ }, {
525
+ color: "neutral",
526
+ variant: "soft",
527
+ 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)]"
528
+ }, {
529
+ color: "neutral",
530
+ variant: "subtle",
531
+ 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)]"
532
+ }, {
533
+ color: "neutral",
534
+ variant: "ghost",
535
+ 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"
536
+ }, {
537
+ color: "neutral",
538
+ variant: "link",
539
+ 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)]"
540
+ }, {
541
+ size: "xs",
542
+ square: true,
543
+ class: "p-1"
544
+ }, {
545
+ size: "sm",
546
+ square: true,
547
+ class: "p-1.5"
548
+ }, {
549
+ size: "md",
550
+ square: true,
551
+ class: "p-1.5"
552
+ }, {
553
+ size: "lg",
554
+ square: true,
555
+ class: "p-2"
556
+ }, {
557
+ size: "xl",
558
+ square: true,
559
+ class: "p-2"
560
+ }, {
561
+ loading: true,
562
+ leading: true,
563
+ class: {
564
+ leadingIcon: "animate-spin"
565
+ }
566
+ }, {
567
+ loading: true,
568
+ leading: false,
569
+ trailing: true,
570
+ class: {
571
+ trailingIcon: "animate-spin"
572
+ }
573
+ }],
574
+ defaultVariants: {
575
+ color: "primary",
576
+ variant: "solid",
577
+ size: "md"
578
+ }
579
+ });
580
+
581
+ const calendar = (options) => ({
582
+ slots: {
583
+ root: "",
584
+ header: "flex items-center justify-between",
585
+ body: "flex flex-col space-y-4 pt-4 sm:flex-row sm:space-x-4 sm:space-y-0",
586
+ heading: "text-center font-medium truncate mx-auto",
587
+ grid: "w-full border-collapse select-none space-y-1 focus:outline-none",
588
+ gridRow: "grid grid-cols-7",
589
+ gridWeekDaysRow: "mb-1 grid w-full grid-cols-7",
590
+ gridBody: "grid",
591
+ headCell: "rounded-[calc(var(--ui-radius)*1.5)]",
592
+ cell: "relative text-center",
593
+ cellTrigger: ["m-0.5 relative flex items-center justify-center rounded-full whitespace-nowrap focus-visible:ring-2 focus:outline-none data-disabled:text-[var(--ui-text-muted)] data-unavailable:line-through data-unavailable:text-[var(--ui-text-muted)] data-unavailable:pointer-events-none data-[selected]:text-[var(--ui-bg)] data-today:font-semibold", options.theme.transitions && "transition"]
594
+ },
595
+ variants: {
596
+ color: {
597
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
598
+ headCell: `text-[var(--ui-${color})]`,
599
+ cellTrigger: `focus-visible:ring-[var(--ui-${color})] data-[selected]:bg-[var(--ui-${color})] data-today:not-data-[selected]:text-[var(--ui-${color})] data-[highlighted]:bg-[var(--ui-${color})]/20 hover:not-data-[selected]:bg-[var(--ui-${color})]/20`
600
+ }])),
601
+ neutral: {
602
+ headCell: "text-[var(--ui-bg-inverted)]",
603
+ cellTrigger: "focus-visible:ring-[var(--ui-border-inverted)] data-[selected]:bg-[var(--ui-bg-inverted)] data-today:not-data-[selected]:text-[var(--ui-bg-inverted)] data-[highlighted]:bg-[var(--ui-bg-inverted)]/20 hover:not-data-[selected]:bg-[var(--ui-bg-inverted)]/10"
604
+ }
605
+ },
606
+ size: {
607
+ xs: {
608
+ heading: "text-xs",
609
+ cell: "text-xs",
610
+ headCell: "text-[10px]",
611
+ cellTrigger: "size-7",
612
+ body: "space-y-2 pt-2"
613
+ },
614
+ sm: {
615
+ heading: "text-xs",
616
+ headCell: "text-xs",
617
+ cell: "text-xs",
618
+ cellTrigger: "size-7"
619
+ },
620
+ md: {
621
+ heading: "text-sm",
622
+ headCell: "text-xs",
623
+ cell: "text-sm",
624
+ cellTrigger: "size-8"
625
+ },
626
+ lg: {
627
+ heading: "text-md",
628
+ headCell: "text-md",
629
+ cellTrigger: "size-9 text-md"
630
+ },
631
+ xl: {
632
+ heading: "text-lg",
633
+ headCell: "text-lg",
634
+ cellTrigger: "size-10 text-lg"
635
+ }
636
+ }
637
+ },
638
+ defaultVariants: {
639
+ size: "md",
640
+ color: "primary"
641
+ }
642
+ });
643
+
644
+ const card = {
645
+ slots: {
646
+ root: "bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow-sm",
647
+ header: "p-4 sm:px-6",
648
+ body: "p-4 sm:p-6",
649
+ footer: "p-4 sm:px-6"
650
+ }
651
+ };
652
+
653
+ const carousel = (options) => ({
654
+ slots: {
655
+ root: "relative focus:outline-none",
656
+ viewport: "overflow-hidden",
657
+ container: "flex items-start",
658
+ item: "min-w-0 shrink-0 basis-full",
659
+ controls: "",
660
+ arrows: "",
661
+ prev: "absolute rounded-full",
662
+ next: "absolute rounded-full",
663
+ dots: "absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3",
664
+ dot: ["cursor-pointer size-3 bg-[var(--ui-border-accented)] rounded-full", options.theme.transitions && "transition"]
665
+ },
666
+ variants: {
667
+ orientation: {
668
+ vertical: {
669
+ container: "flex-col -mt-4",
670
+ item: "pt-4",
671
+ prev: "-top-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90",
672
+ next: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90"
673
+ },
674
+ horizontal: {
675
+ container: "flex-row -ms-4",
676
+ item: "ps-4",
677
+ prev: "-start-12 top-1/2 -translate-y-1/2",
678
+ next: "-end-12 top-1/2 -translate-y-1/2"
679
+ }
680
+ },
681
+ active: {
682
+ true: {
683
+ dot: "bg-[var(--ui-border-inverted)]"
684
+ }
685
+ }
686
+ }
687
+ });
688
+
689
+ const checkbox = (options) => ({
690
+ slots: {
691
+ root: "relative flex items-start",
692
+ 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-visible:outline-2 focus-visible:outline-offset-2",
693
+ container: "flex items-center",
694
+ wrapper: "ms-2",
695
+ icon: "shrink-0 size-full",
696
+ label: "block font-medium text-[var(--ui-text)]",
697
+ description: "text-[var(--ui-text-muted)]"
698
+ },
699
+ variants: {
700
+ color: {
701
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `focus-visible:outline-[var(--ui-${color})]`])),
702
+ neutral: "focus-visible:outline-[var(--ui-border-inverted)]"
703
+ },
704
+ size: {
705
+ xs: {
706
+ base: "size-3",
707
+ container: "h-4",
708
+ wrapper: "text-xs"
709
+ },
710
+ sm: {
711
+ base: "size-3.5",
712
+ container: "h-4",
713
+ wrapper: "text-xs"
714
+ },
715
+ md: {
716
+ base: "size-4",
717
+ container: "h-5",
718
+ wrapper: "text-sm"
719
+ },
720
+ lg: {
721
+ base: "size-4.5",
722
+ container: "h-5",
723
+ wrapper: "text-sm"
724
+ },
725
+ xl: {
726
+ base: "size-5",
727
+ container: "h-6",
728
+ wrapper: "text-base"
729
+ }
730
+ },
731
+ required: {
732
+ true: {
733
+ label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
734
+ }
735
+ },
736
+ disabled: {
737
+ true: {
738
+ base: "cursor-not-allowed opacity-75",
739
+ label: "cursor-not-allowed opacity-75",
740
+ description: "cursor-not-allowed opacity-75"
741
+ }
742
+ },
743
+ checked: {
744
+ true: ""
745
+ }
746
+ },
747
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
748
+ color,
749
+ checked: true,
750
+ class: `ring-2 ring-[var(--ui-${color})] bg-[var(--ui-${color})]`
751
+ })), {
752
+ color: "neutral",
753
+ checked: true,
754
+ class: "ring-2 ring-[var(--ui-border-inverted)] bg-[var(--ui-bg-inverted)]"
755
+ }],
756
+ defaultVariants: {
757
+ size: "md",
758
+ color: "primary"
759
+ }
760
+ });
761
+
762
+ const chip = (options) => ({
763
+ slots: {
764
+ root: "relative inline-flex items-center justify-center shrink-0",
765
+ base: "rounded-full ring ring-[var(--ui-bg)] flex items-center justify-center text-[var(--ui-bg)] font-medium whitespace-nowrap"
766
+ },
767
+ variants: {
768
+ color: {
769
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, `bg-[var(--ui-${color})]`])),
770
+ neutral: "bg-[var(--ui-text-muted)]"
771
+ },
772
+ size: {
773
+ "3xs": "h-[4px] min-w-[4px] text-[4px]",
774
+ "2xs": "h-[5px] min-w-[5px] text-[5px]",
775
+ "xs": "h-[6px] min-w-[6px] text-[6px]",
776
+ "sm": "h-[7px] min-w-[7px] text-[7px]",
777
+ "md": "h-[8px] min-w-[8px] text-[8px]",
778
+ "lg": "h-[9px] min-w-[9px] text-[9px]",
779
+ "xl": "h-[10px] min-w-[10px] text-[10px]",
780
+ "2xl": "h-[11px] min-w-[11px] text-[11px]",
781
+ "3xl": "h-[12px] min-w-[12px] text-[12px]"
782
+ },
783
+ position: {
784
+ "top-right": "top-0 right-0",
785
+ "bottom-right": "bottom-0 right-0",
786
+ "top-left": "top-0 left-0",
787
+ "bottom-left": "bottom-0 left-0"
788
+ },
789
+ inset: {
790
+ false: ""
791
+ },
792
+ standalone: {
793
+ false: "absolute"
794
+ }
795
+ },
796
+ compoundVariants: [{
797
+ position: "top-right",
798
+ inset: false,
799
+ class: "-translate-y-1/2 translate-x-1/2 transform"
800
+ }, {
801
+ position: "bottom-right",
802
+ inset: false,
803
+ class: "translate-y-1/2 translate-x-1/2 transform"
804
+ }, {
805
+ position: "top-left",
806
+ inset: false,
807
+ class: "-translate-y-1/2 -translate-x-1/2 transform"
808
+ }, {
809
+ position: "bottom-left",
810
+ inset: false,
811
+ class: "translate-y-1/2 -translate-x-1/2 transform"
812
+ }],
813
+ defaultVariants: {
814
+ size: "md",
815
+ color: "primary",
816
+ position: "top-right"
817
+ }
818
+ });
819
+
820
+ const collapsible = {
821
+ slots: {
822
+ root: "",
823
+ content: "data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"
824
+ }
825
+ };
826
+
827
+ const colorPicker = {
828
+ slots: {
829
+ root: "data-[disabled]:opacity-75",
830
+ picker: "flex gap-4",
831
+ selector: "rounded-[calc(var(--ui-radius)*1.5)]",
832
+ selectorBackground: "w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]",
833
+ selectorThumb: "-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-[var(--color-white)] rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",
834
+ track: "w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]",
835
+ trackThumb: "absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-[var(--color-white)] cursor-pointer data-[disabled]:cursor-not-allowed"
836
+ },
837
+ variants: {
838
+ size: {
839
+ xs: {
840
+ selector: "w-38 h-38",
841
+ track: "h-38"
842
+ },
843
+ sm: {
844
+ selector: "w-40 h-40",
845
+ track: "h-40"
846
+ },
847
+ md: {
848
+ selector: "w-42 h-42",
849
+ track: "h-42"
850
+ },
851
+ lg: {
852
+ selector: "w-44 h-44",
853
+ track: "h-44"
854
+ },
855
+ xl: {
856
+ selector: "w-46 h-46",
857
+ track: "h-46"
858
+ }
859
+ }
860
+ },
861
+ compoundVariants: [],
862
+ defaultVariants: {
863
+ size: "md"
864
+ }
865
+ };
866
+
867
+ const commandPalette = (options) => ({
868
+ slots: {
869
+ root: "flex flex-col min-h-0 min-w-0 divide-y divide-[var(--ui-border)]",
870
+ input: "[&>input]:h-12",
871
+ close: "",
872
+ content: "relative overflow-hidden flex flex-col",
873
+ viewport: "relative divide-y divide-[var(--ui-border)] scroll-py-1 overflow-y-auto flex-1 focus:outline-none",
874
+ group: "p-1 isolate",
875
+ empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]",
876
+ label: "px-2 py-1.5 text-xs font-semibold text-[var(--ui-text-highlighted)]",
877
+ 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",
878
+ itemLeadingIcon: "shrink-0 size-5",
879
+ itemLeadingAvatar: "shrink-0",
880
+ itemLeadingAvatarSize: "2xs",
881
+ itemLeadingChip: "shrink-0 size-5",
882
+ itemLeadingChipSize: "md",
883
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
884
+ itemTrailingIcon: "shrink-0 size-5",
885
+ itemTrailingHighlightedIcon: "shrink-0 size-5 text-[var(--ui-text-dimmed)] hidden group-data-highlighted:inline-flex",
886
+ itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0 gap-0.5",
887
+ itemTrailingKbdsSize: "md",
888
+ itemLabel: "truncate space-x-1 rtl:space-x-reverse",
889
+ itemLabelBase: "text-[var(--ui-text-highlighted)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]",
890
+ itemLabelPrefix: "text-[var(--ui-text)]",
891
+ itemLabelSuffix: "text-[var(--ui-text-dimmed)] [&>mark]:text-[var(--ui-bg)] [&>mark]:bg-[var(--ui-primary)]"
892
+ },
893
+ variants: {
894
+ active: {
895
+ true: {
896
+ item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
897
+ itemLeadingIcon: "text-[var(--ui-text)]"
898
+ },
899
+ false: {
900
+ item: ["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"],
901
+ itemLeadingIcon: ["text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
902
+ }
903
+ },
904
+ loading: {
905
+ true: {
906
+ itemLeadingIcon: "animate-spin"
907
+ }
908
+ }
909
+ }
910
+ });
911
+
912
+ const container = {
913
+ base: "max-w-[var(--ui-container)] mx-auto px-4 sm:px-6 lg:px-8"
914
+ };
915
+
916
+ const contextMenu = (options) => ({
917
+ slots: {
918
+ 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] pointer-events-auto",
919
+ group: "p-1 isolate",
920
+ label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
921
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
922
+ 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",
923
+ itemLeadingIcon: "shrink-0",
924
+ itemLeadingAvatar: "shrink-0",
925
+ itemLeadingAvatarSize: "",
926
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
927
+ itemTrailingIcon: "shrink-0",
928
+ itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
929
+ itemTrailingKbdsSize: "",
930
+ itemLabel: "truncate",
931
+ itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
932
+ },
933
+ variants: {
934
+ color: {
935
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
936
+ neutral: ""
937
+ },
938
+ active: {
939
+ true: {
940
+ item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
941
+ itemLeadingIcon: "text-[var(--ui-text)]"
942
+ },
943
+ false: {
944
+ 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"],
945
+ 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"]
946
+ }
947
+ },
948
+ loading: {
949
+ true: {
950
+ itemLeadingIcon: "animate-spin"
951
+ }
952
+ },
953
+ size: {
954
+ xs: {
955
+ label: "p-1 text-xs gap-1",
956
+ item: "p-1 text-xs gap-1",
957
+ itemLeadingIcon: "size-4",
958
+ itemLeadingAvatarSize: "3xs",
959
+ itemTrailingIcon: "size-4",
960
+ itemTrailingKbds: "gap-0.5",
961
+ itemTrailingKbdsSize: "sm"
962
+ },
963
+ sm: {
964
+ label: "p-1.5 text-xs gap-1.5",
965
+ item: "p-1.5 text-xs gap-1.5",
966
+ itemLeadingIcon: "size-4",
967
+ itemLeadingAvatarSize: "3xs",
968
+ itemTrailingIcon: "size-4",
969
+ itemTrailingKbds: "gap-0.5",
970
+ itemTrailingKbdsSize: "sm"
971
+ },
972
+ md: {
973
+ label: "p-1.5 text-sm gap-1.5",
974
+ item: "p-1.5 text-sm gap-1.5",
975
+ itemLeadingIcon: "size-5",
976
+ itemLeadingAvatarSize: "2xs",
977
+ itemTrailingIcon: "size-5",
978
+ itemTrailingKbds: "gap-0.5",
979
+ itemTrailingKbdsSize: "md"
980
+ },
981
+ lg: {
982
+ label: "p-2 text-sm gap-2",
983
+ item: "p-2 text-sm gap-2",
984
+ itemLeadingIcon: "size-5",
985
+ itemLeadingAvatarSize: "2xs",
986
+ itemTrailingIcon: "size-5",
987
+ itemTrailingKbds: "gap-1",
988
+ itemTrailingKbdsSize: "md"
989
+ },
990
+ xl: {
991
+ label: "p-2 text-base gap-2",
992
+ item: "p-2 text-base gap-2",
993
+ itemLeadingIcon: "size-6",
994
+ itemLeadingAvatarSize: "xs",
995
+ itemTrailingIcon: "size-6",
996
+ itemTrailingKbds: "gap-1",
997
+ itemTrailingKbdsSize: "lg"
998
+ }
999
+ }
1000
+ },
1001
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1002
+ color,
1003
+ active: false,
1004
+ class: {
1005
+ 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`,
1006
+ itemLeadingIcon: `text-[var(--ui-${color})]/75 group-data-highlighted:text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
1007
+ }
1008
+ })), ...(options.theme.colors || []).map((color) => ({
1009
+ color,
1010
+ active: true,
1011
+ class: {
1012
+ item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
1013
+ itemLeadingIcon: `text-[var(--ui-${color})]`
1014
+ }
1015
+ }))],
1016
+ defaultVariants: {
1017
+ size: "md"
1018
+ }
1019
+ });
1020
+
1021
+ const drawer = {
1022
+ slots: {
1023
+ overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
1024
+ content: "fixed bg-[var(--ui-bg)] ring ring-[var(--ui-border)] flex focus:outline-none",
1025
+ handle: "shrink-0 rounded-full bg-[var(--ui-bg-accented)]",
1026
+ container: "w-full flex flex-col gap-4 p-4 overflow-y-auto",
1027
+ header: "",
1028
+ title: "text-[var(--ui-text-highlighted)] font-semibold",
1029
+ description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1030
+ body: "flex-1",
1031
+ footer: "flex flex-col gap-1.5"
1032
+ },
1033
+ variants: {
1034
+ direction: {
1035
+ top: {
1036
+ content: "top-0 mb-24 flex-col-reverse rounded-b-[calc(var(--ui-radius)*2)]",
1037
+ handle: "mb-4"
1038
+ },
1039
+ right: {
1040
+ content: "right-4 flex-row",
1041
+ handle: "ml-4"
1042
+ },
1043
+ bottom: {
1044
+ content: "bottom-0 mt-24 flex-col rounded-t-[calc(var(--ui-radius)*2)]",
1045
+ handle: "mt-4"
1046
+ },
1047
+ left: {
1048
+ content: "left-4 flex-row-reverse",
1049
+ handle: "mr-4"
1050
+ }
1051
+ }
1052
+ },
1053
+ compoundVariants: [{
1054
+ direction: ["top", "bottom"],
1055
+ class: {
1056
+ content: "inset-x-0 h-auto max-h-[96%]",
1057
+ handle: "w-12 h-1.5 mx-auto"
1058
+ }
1059
+ }, {
1060
+ direction: ["right", "left"],
1061
+ class: {
1062
+ content: "inset-y-4 w-auto max-w-[calc(100%-2rem)] rounded-[calc(var(--ui-radius)*2)] after:hidden",
1063
+ handle: "h-12 w-1.5 mt-auto mb-auto"
1064
+ }
1065
+ }]
1066
+ };
1067
+
1068
+ const dropdownMenu = (options) => ({
1069
+ slots: {
1070
+ 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] pointer-events-auto",
1071
+ arrow: "fill-[var(--ui-border)]",
1072
+ group: "p-1 isolate",
1073
+ label: "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
1074
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1075
+ 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",
1076
+ itemLeadingIcon: "shrink-0",
1077
+ itemLeadingAvatar: "shrink-0",
1078
+ itemLeadingAvatarSize: "",
1079
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
1080
+ itemTrailingIcon: "shrink-0",
1081
+ itemTrailingKbds: "hidden lg:inline-flex items-center shrink-0",
1082
+ itemTrailingKbdsSize: "",
1083
+ itemLabel: "truncate",
1084
+ itemLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]"
1085
+ },
1086
+ variants: {
1087
+ color: {
1088
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1089
+ neutral: ""
1090
+ },
1091
+ active: {
1092
+ true: {
1093
+ item: "text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]",
1094
+ itemLeadingIcon: "text-[var(--ui-text)]"
1095
+ },
1096
+ false: {
1097
+ 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"],
1098
+ 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"]
1099
+ }
1100
+ },
1101
+ loading: {
1102
+ true: {
1103
+ itemLeadingIcon: "animate-spin"
1104
+ }
1105
+ },
1106
+ size: {
1107
+ xs: {
1108
+ label: "p-1 text-xs gap-1",
1109
+ item: "p-1 text-xs gap-1",
1110
+ itemLeadingIcon: "size-4",
1111
+ itemLeadingAvatarSize: "3xs",
1112
+ itemTrailingIcon: "size-4",
1113
+ itemTrailingKbds: "gap-0.5",
1114
+ itemTrailingKbdsSize: "sm"
1115
+ },
1116
+ sm: {
1117
+ label: "p-1.5 text-xs gap-1.5",
1118
+ item: "p-1.5 text-xs gap-1.5",
1119
+ itemLeadingIcon: "size-4",
1120
+ itemLeadingAvatarSize: "3xs",
1121
+ itemTrailingIcon: "size-4",
1122
+ itemTrailingKbds: "gap-0.5",
1123
+ itemTrailingKbdsSize: "sm"
1124
+ },
1125
+ md: {
1126
+ label: "p-1.5 text-sm gap-1.5",
1127
+ item: "p-1.5 text-sm gap-1.5",
1128
+ itemLeadingIcon: "size-5",
1129
+ itemLeadingAvatarSize: "2xs",
1130
+ itemTrailingIcon: "size-5",
1131
+ itemTrailingKbds: "gap-0.5",
1132
+ itemTrailingKbdsSize: "md"
1133
+ },
1134
+ lg: {
1135
+ label: "p-2 text-sm gap-2",
1136
+ item: "p-2 text-sm gap-2",
1137
+ itemLeadingIcon: "size-5",
1138
+ itemLeadingAvatarSize: "2xs",
1139
+ itemTrailingIcon: "size-5",
1140
+ itemTrailingKbds: "gap-1",
1141
+ itemTrailingKbdsSize: "md"
1142
+ },
1143
+ xl: {
1144
+ label: "p-2 text-base gap-2",
1145
+ item: "p-2 text-base gap-2",
1146
+ itemLeadingIcon: "size-6",
1147
+ itemLeadingAvatarSize: "xs",
1148
+ itemTrailingIcon: "size-6",
1149
+ itemTrailingKbds: "gap-1",
1150
+ itemTrailingKbdsSize: "lg"
1151
+ }
1152
+ }
1153
+ },
1154
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1155
+ color,
1156
+ active: false,
1157
+ class: {
1158
+ 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`,
1159
+ itemLeadingIcon: `text-[var(--ui-${color})]/75 group-data-highlighted:text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
1160
+ }
1161
+ })), ...(options.theme.colors || []).map((color) => ({
1162
+ color,
1163
+ active: true,
1164
+ class: {
1165
+ item: `text-[var(--ui-${color})] before:bg-[var(--ui-${color})]/10`,
1166
+ itemLeadingIcon: `text-[var(--ui-${color})]`
1167
+ }
1168
+ }))],
1169
+ defaultVariants: {
1170
+ size: "md"
1171
+ }
1172
+ });
1173
+
1174
+ const form = {
1175
+ base: ""
1176
+ };
1177
+
1178
+ const formField = {
1179
+ slots: {
1180
+ root: "",
1181
+ wrapper: "",
1182
+ labelWrapper: "flex content-center items-center justify-between",
1183
+ label: "block font-medium text-[var(--ui-text)]",
1184
+ container: "mt-1 relative",
1185
+ description: "text-[var(--ui-text-muted)]",
1186
+ error: "mt-2 text-[var(--ui-error)]",
1187
+ hint: "text-[var(--ui-text-muted)]",
1188
+ help: "mt-2 text-[var(--ui-text-muted)]"
1189
+ },
1190
+ variants: {
1191
+ size: {
1192
+ xs: { root: "text-xs" },
1193
+ sm: { root: "text-xs" },
1194
+ md: { root: "text-sm" },
1195
+ lg: { root: "text-sm" },
1196
+ xl: { root: "text-base" }
1197
+ },
1198
+ required: {
1199
+ true: {
1200
+ label: `after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]`
1201
+ }
1202
+ }
1203
+ },
1204
+ defaultVariants: {
1205
+ size: "md"
1206
+ }
1207
+ };
1208
+
1209
+ const input = (options) => ({
1210
+ slots: {
1211
+ root: "relative inline-flex items-center",
1212
+ 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"],
1213
+ leading: "absolute inset-y-0 start-0 flex items-center",
1214
+ leadingIcon: "shrink-0 text-[var(--ui-text-dimmed)]",
1215
+ leadingAvatar: "shrink-0",
1216
+ leadingAvatarSize: "",
1217
+ trailing: "absolute inset-y-0 end-0 flex items-center",
1218
+ trailingIcon: "shrink-0 text-[var(--ui-text-dimmed)]"
1219
+ },
1220
+ variants: {
1221
+ ...buttonGroupVariantWithRoot,
1222
+ size: {
1223
+ xs: {
1224
+ base: "px-2 py-1 text-xs gap-1",
1225
+ leading: "ps-2",
1226
+ trailing: "pe-2",
1227
+ leadingIcon: "size-4",
1228
+ leadingAvatarSize: "3xs",
1229
+ trailingIcon: "size-4"
1230
+ },
1231
+ sm: {
1232
+ base: "px-2.5 py-1.5 text-xs gap-1.5",
1233
+ leading: "ps-2.5",
1234
+ trailing: "pe-2.5",
1235
+ leadingIcon: "size-4",
1236
+ leadingAvatarSize: "3xs",
1237
+ trailingIcon: "size-4"
1238
+ },
1239
+ md: {
1240
+ base: "px-2.5 py-1.5 text-sm gap-1.5",
1241
+ leading: "ps-2.5",
1242
+ trailing: "pe-2.5",
1243
+ leadingIcon: "size-5",
1244
+ leadingAvatarSize: "2xs",
1245
+ trailingIcon: "size-5"
1246
+ },
1247
+ lg: {
1248
+ base: "px-3 py-2 text-sm gap-2",
1249
+ leading: "ps-3",
1250
+ trailing: "pe-3",
1251
+ leadingIcon: "size-5",
1252
+ leadingAvatarSize: "2xs",
1253
+ trailingIcon: "size-5"
1254
+ },
1255
+ xl: {
1256
+ base: "px-3 py-2 text-base gap-2",
1257
+ leading: "ps-3",
1258
+ trailing: "pe-3",
1259
+ leadingIcon: "size-6",
1260
+ leadingAvatarSize: "xs",
1261
+ trailingIcon: "size-6"
1262
+ }
1263
+ },
1264
+ variant: {
1265
+ outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1266
+ 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",
1267
+ subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1268
+ 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",
1269
+ none: "text-[var(--ui-text-highlighted)] bg-transparent"
1270
+ },
1271
+ color: {
1272
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1273
+ neutral: ""
1274
+ },
1275
+ leading: {
1276
+ true: ""
1277
+ },
1278
+ trailing: {
1279
+ true: ""
1280
+ },
1281
+ loading: {
1282
+ true: ""
1283
+ },
1284
+ highlight: {
1285
+ true: ""
1286
+ },
1287
+ type: {
1288
+ file: "file:me-1.5 file:font-medium file:text-[var(--ui-text-muted)] file:outline-none"
1289
+ }
1290
+ },
1291
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1292
+ color,
1293
+ variant: ["outline", "subtle"],
1294
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1295
+ })), ...(options.theme.colors || []).map((color) => ({
1296
+ color,
1297
+ highlight: true,
1298
+ class: `ring ring-inset ring-[var(--ui-${color})]`
1299
+ })), {
1300
+ color: "neutral",
1301
+ variant: ["outline", "subtle"],
1302
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1303
+ }, {
1304
+ color: "neutral",
1305
+ highlight: true,
1306
+ class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1307
+ }, {
1308
+ leading: true,
1309
+ size: "xs",
1310
+ class: "ps-7"
1311
+ }, {
1312
+ leading: true,
1313
+ size: "sm",
1314
+ class: "ps-8"
1315
+ }, {
1316
+ leading: true,
1317
+ size: "md",
1318
+ class: "ps-9"
1319
+ }, {
1320
+ leading: true,
1321
+ size: "lg",
1322
+ class: "ps-10"
1323
+ }, {
1324
+ leading: true,
1325
+ size: "xl",
1326
+ class: "ps-11"
1327
+ }, {
1328
+ trailing: true,
1329
+ size: "xs",
1330
+ class: "pe-7"
1331
+ }, {
1332
+ trailing: true,
1333
+ size: "sm",
1334
+ class: "pe-8"
1335
+ }, {
1336
+ trailing: true,
1337
+ size: "md",
1338
+ class: "pe-9"
1339
+ }, {
1340
+ trailing: true,
1341
+ size: "lg",
1342
+ class: "pe-10"
1343
+ }, {
1344
+ trailing: true,
1345
+ size: "xl",
1346
+ class: "pe-11"
1347
+ }, {
1348
+ loading: true,
1349
+ leading: true,
1350
+ class: {
1351
+ leadingIcon: "animate-spin"
1352
+ }
1353
+ }, {
1354
+ loading: true,
1355
+ leading: false,
1356
+ trailing: true,
1357
+ class: {
1358
+ trailingIcon: "animate-spin"
1359
+ }
1360
+ }],
1361
+ defaultVariants: {
1362
+ size: "md",
1363
+ color: "primary",
1364
+ variant: "outline"
1365
+ }
1366
+ });
1367
+
1368
+ const inputMenu = (options) => {
1369
+ return defuFn({
1370
+ slots: {
1371
+ base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
1372
+ trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
1373
+ arrow: "fill-[var(--ui-border)]",
1374
+ content: "max-h-60 w-[var(--reka-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] pointer-events-auto",
1375
+ viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
1376
+ group: "p-1 isolate",
1377
+ empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
1378
+ label: "font-semibold text-[var(--ui-text-highlighted)]",
1379
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
1380
+ 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"],
1381
+ itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
1382
+ itemLeadingAvatar: "shrink-0",
1383
+ itemLeadingAvatarSize: "",
1384
+ itemLeadingChip: "shrink-0",
1385
+ itemLeadingChipSize: "",
1386
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
1387
+ itemTrailingIcon: "shrink-0",
1388
+ itemLabel: "truncate",
1389
+ 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",
1390
+ tagsItemText: "truncate",
1391
+ 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"],
1392
+ tagsItemDeleteIcon: "",
1393
+ tagsInput: ""
1394
+ },
1395
+ variants: {
1396
+ multiple: {
1397
+ true: {
1398
+ root: "flex-wrap",
1399
+ tagsInput: "border-0 bg-transparent placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1400
+ },
1401
+ false: {
1402
+ base: "w-full border-0 placeholder:text-[var(--ui-text-dimmed)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
1403
+ }
1404
+ },
1405
+ size: {
1406
+ xs: {
1407
+ label: "p-1 text-[10px]/3 gap-1",
1408
+ item: "p-1 text-xs gap-1",
1409
+ itemLeadingIcon: "size-4",
1410
+ itemLeadingAvatarSize: "3xs",
1411
+ itemLeadingChip: "size-4",
1412
+ itemLeadingChipSize: "sm",
1413
+ itemTrailingIcon: "size-4",
1414
+ tagsItem: "text-[10px]/3",
1415
+ tagsItemDeleteIcon: "size-3"
1416
+ },
1417
+ sm: {
1418
+ label: "p-1.5 text-[10px]/3 gap-1.5",
1419
+ item: "p-1.5 text-xs gap-1.5",
1420
+ itemLeadingIcon: "size-4",
1421
+ itemLeadingAvatarSize: "3xs",
1422
+ itemLeadingChip: "size-4",
1423
+ itemLeadingChipSize: "sm",
1424
+ itemTrailingIcon: "size-4",
1425
+ tagsItem: "text-[10px]/3",
1426
+ tagsItemDeleteIcon: "size-3"
1427
+ },
1428
+ md: {
1429
+ label: "p-1.5 text-xs gap-1.5",
1430
+ item: "p-1.5 text-sm gap-1.5",
1431
+ itemLeadingIcon: "size-5",
1432
+ itemLeadingAvatarSize: "2xs",
1433
+ itemLeadingChip: "size-5",
1434
+ itemLeadingChipSize: "md",
1435
+ itemTrailingIcon: "size-5",
1436
+ tagsItem: "text-xs",
1437
+ tagsItemDeleteIcon: "size-3.5"
1438
+ },
1439
+ lg: {
1440
+ label: "p-2 text-xs gap-2",
1441
+ item: "p-2 text-sm gap-2",
1442
+ itemLeadingIcon: "size-5",
1443
+ itemLeadingAvatarSize: "2xs",
1444
+ itemLeadingChip: "size-5",
1445
+ itemLeadingChipSize: "md",
1446
+ itemTrailingIcon: "size-5",
1447
+ tagsItem: "text-xs",
1448
+ tagsItemDeleteIcon: "size-3.5"
1449
+ },
1450
+ xl: {
1451
+ label: "p-2 text-sm gap-2",
1452
+ item: "p-2 text-base gap-2",
1453
+ itemLeadingIcon: "size-6",
1454
+ itemLeadingAvatarSize: "xs",
1455
+ itemLeadingChip: "size-6",
1456
+ itemLeadingChipSize: "lg",
1457
+ itemTrailingIcon: "size-6",
1458
+ tagsItem: "text-sm",
1459
+ tagsItemDeleteIcon: "size-4"
1460
+ }
1461
+ }
1462
+ },
1463
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1464
+ color,
1465
+ multiple: true,
1466
+ variant: ["outline", "subtle"],
1467
+ class: `has-focus-visible:ring-2 has-focus-visible:ring-[var(--ui-${color})]`
1468
+ })), {
1469
+ color: "neutral",
1470
+ multiple: true,
1471
+ variant: ["outline", "subtle"],
1472
+ class: "has-focus-visible:ring-2 has-focus-visible:ring-[var(--ui-border-inverted)]"
1473
+ }]
1474
+ }, input(options));
1475
+ };
1476
+
1477
+ const inputNumber = (options) => {
1478
+ const input$1 = input(options);
1479
+ return {
1480
+ slots: {
1481
+ root: "relative inline-flex items-center",
1482
+ 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"],
1483
+ increment: "absolute flex items-center",
1484
+ decrement: "absolute flex items-center"
1485
+ },
1486
+ variants: {
1487
+ color: {
1488
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1489
+ neutral: ""
1490
+ },
1491
+ size: {
1492
+ xs: "px-2 py-1 text-xs gap-1",
1493
+ sm: "px-2.5 py-1.5 text-xs gap-1.5",
1494
+ md: "px-2.5 py-1.5 text-sm gap-1.5",
1495
+ lg: "px-3 py-2 text-sm gap-2",
1496
+ xl: "px-3 py-2 text-base gap-2"
1497
+ },
1498
+ variant: {
1499
+ ...input$1.variants.variant
1500
+ },
1501
+ disabled: {
1502
+ true: {
1503
+ increment: "opacity-75 cursor-not-allowed",
1504
+ decrement: "opacity-75 cursor-not-allowed"
1505
+ }
1506
+ },
1507
+ orientation: {
1508
+ horizontal: {
1509
+ base: "text-center",
1510
+ increment: "inset-y-0 end-0 pe-1",
1511
+ decrement: "inset-y-0 start-0 ps-1"
1512
+ },
1513
+ vertical: {
1514
+ increment: "top-0 end-0 pe-1 [&>button]:py-0 scale-80",
1515
+ decrement: "bottom-0 end-0 pe-1 [&>button]:py-0 scale-80"
1516
+ }
1517
+ },
1518
+ highlight: {
1519
+ true: ""
1520
+ }
1521
+ },
1522
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1523
+ color,
1524
+ variant: ["outline", "subtle"],
1525
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1526
+ })), ...(options.theme.colors || []).map((color) => ({
1527
+ color,
1528
+ highlight: true,
1529
+ class: `ring ring-inset ring-[var(--ui-${color})]`
1530
+ })), {
1531
+ color: "neutral",
1532
+ variant: ["outline", "subtle"],
1533
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1534
+ }, {
1535
+ color: "neutral",
1536
+ highlight: true,
1537
+ class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1538
+ }, {
1539
+ orientation: "horizontal",
1540
+ size: "xs",
1541
+ class: "px-7"
1542
+ }, {
1543
+ orientation: "horizontal",
1544
+ size: "sm",
1545
+ class: "px-8"
1546
+ }, {
1547
+ orientation: "horizontal",
1548
+ size: "md",
1549
+ class: "px-9"
1550
+ }, {
1551
+ orientation: "horizontal",
1552
+ size: "lg",
1553
+ class: "px-10"
1554
+ }, {
1555
+ orientation: "horizontal",
1556
+ size: "xl",
1557
+ class: "px-11"
1558
+ }, {
1559
+ orientation: "vertical",
1560
+ size: "xs",
1561
+ class: "pe-7"
1562
+ }, {
1563
+ orientation: "vertical",
1564
+ size: "sm",
1565
+ class: "pe-8"
1566
+ }, {
1567
+ orientation: "vertical",
1568
+ size: "md",
1569
+ class: "pe-9"
1570
+ }, {
1571
+ orientation: "vertical",
1572
+ size: "lg",
1573
+ class: "pe-10"
1574
+ }, {
1575
+ orientation: "vertical",
1576
+ size: "xl",
1577
+ class: "pe-11"
1578
+ }],
1579
+ defaultVariants: {
1580
+ size: "md",
1581
+ color: "primary",
1582
+ variant: "outline"
1583
+ }
1584
+ };
1585
+ };
1586
+
1587
+ const kbd = {
1588
+ base: "inline-flex items-center justify-center px-1 rounded-[var(--ui-radius)] font-medium font-sans",
1589
+ variants: {
1590
+ variant: {
1591
+ solid: "bg-[var(--ui-bg-inverted)] text-[var(--ui-bg)]",
1592
+ outline: "bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] ring ring-inset ring-[var(--ui-border-accented)]",
1593
+ subtle: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text)] ring ring-inset ring-[var(--ui-border-accented)]"
1594
+ },
1595
+ size: {
1596
+ sm: "h-4 min-w-[16px] text-[10px]",
1597
+ md: "h-5 min-w-[20px] text-[11px]",
1598
+ lg: "h-6 min-w-[24px] text-[12px]"
1599
+ }
1600
+ },
1601
+ defaultVariants: {
1602
+ variant: "outline",
1603
+ size: "md"
1604
+ }
1605
+ };
1606
+
1607
+ const link = (options) => ({
1608
+ base: "focus-visible:outline-[var(--ui-primary)]",
1609
+ variants: {
1610
+ active: {
1611
+ true: "text-[var(--ui-primary)]",
1612
+ false: ["text-[var(--ui-text-muted)] hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1613
+ },
1614
+ disabled: {
1615
+ true: "cursor-not-allowed opacity-75"
1616
+ }
1617
+ }
1618
+ });
1619
+
1620
+ const modal = {
1621
+ slots: {
1622
+ overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
1623
+ content: "fixed w-full h-dvh bg-[var(--ui-bg)] divide-y divide-[var(--ui-border)] flex flex-col focus:outline-none",
1624
+ header: "px-4 py-5 sm:px-6",
1625
+ body: "flex-1 overflow-y-auto p-4 sm:p-6",
1626
+ footer: "flex items-center gap-1.5 p-4 sm:px-6",
1627
+ title: "text-[var(--ui-text-highlighted)] font-semibold",
1628
+ description: "mt-1 text-[var(--ui-text-muted)] text-sm",
1629
+ close: "absolute top-4 end-4"
1630
+ },
1631
+ variants: {
1632
+ transition: {
1633
+ true: {
1634
+ overlay: "data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]",
1635
+ content: "data-[state=open]:animate-[scale-in_200ms_ease-out] data-[state=closed]:animate-[scale-out_200ms_ease-in]"
1636
+ }
1637
+ },
1638
+ fullscreen: {
1639
+ true: {
1640
+ content: "inset-0"
1641
+ },
1642
+ false: {
1643
+ content: "top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] sm:max-w-lg sm:h-auto sm:max-h-[calc(100vh-4rem)] sm:rounded-[calc(var(--ui-radius)*2)] sm:shadow-lg sm:ring ring-[var(--ui-border)]"
1644
+ }
1645
+ }
1646
+ }
1647
+ };
1648
+
1649
+ const navigationMenu = (options) => ({
1650
+ slots: {
1651
+ root: "relative flex gap-1.5 [&>div]:min-w-0",
1652
+ list: "isolate min-w-0",
1653
+ item: "min-w-0",
1654
+ 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",
1655
+ linkLeadingIcon: "shrink-0 size-5",
1656
+ linkLeadingAvatar: "shrink-0",
1657
+ linkLeadingAvatarSize: "2xs",
1658
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
1659
+ linkTrailingBadge: "shrink-0",
1660
+ linkTrailingBadgeSize: "sm",
1661
+ linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
1662
+ linkLabel: "truncate",
1663
+ linkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1664
+ childList: "",
1665
+ childItem: "",
1666
+ childLink: "group size-full px-3 py-2 rounded-[calc(var(--ui-radius)*1.5)] flex items-start gap-2 text-start",
1667
+ childLinkWrapper: "flex flex-col items-start",
1668
+ childLinkIcon: "size-5 shrink-0",
1669
+ childLinkLabel: "font-semibold text-sm relative inline-flex",
1670
+ childLinkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
1671
+ childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
1672
+ separator: "px-2 h-px bg-[var(--ui-border)]",
1673
+ viewportWrapper: "absolute top-full left-0 flex w-full justify-center",
1674
+ viewport: "relative overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] h-[var(--reka-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]",
1675
+ 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]",
1676
+ 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-[var(--reka-navigation-menu-indicator-size)] translate-x-[var(--reka-navigation-menu-indicator-position)] flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",
1677
+ 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)]"
1678
+ },
1679
+ variants: {
1680
+ color: {
1681
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1682
+ link: `focus-visible:before:ring-[var(--ui-${color})]`,
1683
+ childLink: `focus-visible:outline-[var(--ui-${color})]`
1684
+ }])),
1685
+ neutral: {
1686
+ link: "focus-visible:before:ring-[var(--ui-border-inverted)]",
1687
+ childLink: "focus-visible:outline-[var(--ui-border-inverted)]"
1688
+ }
1689
+ },
1690
+ highlightColor: {
1691
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1692
+ neutral: ""
1693
+ },
1694
+ variant: {
1695
+ pill: "",
1696
+ link: ""
1697
+ },
1698
+ orientation: {
1699
+ horizontal: {
1700
+ root: "items-center justify-between",
1701
+ list: "flex items-center",
1702
+ item: "py-2",
1703
+ link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
1704
+ childList: "grid grid-cols-2 gap-2 p-2"
1705
+ },
1706
+ vertical: {
1707
+ root: "flex-col",
1708
+ link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",
1709
+ childList: "ms-5 border-s border-[var(--ui-border)]",
1710
+ childItem: "ps-1.5 -ms-px"
1711
+ }
1712
+ },
1713
+ active: {
1714
+ true: {
1715
+ childLink: "bg-[var(--ui-bg-elevated)] text-[var(--ui-text-highlighted)]",
1716
+ childLinkIcon: "text-[var(--ui-text)]"
1717
+ },
1718
+ false: {
1719
+ link: "text-[var(--ui-text-muted)]",
1720
+ linkLeadingIcon: "text-[var(--ui-text-dimmed)]",
1721
+ childLink: ["hover:bg-[var(--ui-bg-elevated)]/50 text-[var(--ui-text)] hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1722
+ childLinkIcon: ["text-[var(--ui-text-dimmed)] group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1723
+ }
1724
+ },
1725
+ disabled: {
1726
+ true: {
1727
+ link: "cursor-not-allowed opacity-75"
1728
+ }
1729
+ },
1730
+ highlight: {
1731
+ true: ""
1732
+ },
1733
+ level: {
1734
+ true: ""
1735
+ }
1736
+ },
1737
+ compoundVariants: [{
1738
+ orientation: "horizontal",
1739
+ highlight: true,
1740
+ class: {
1741
+ item: "-mb-px",
1742
+ 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"]
1743
+ }
1744
+ }, {
1745
+ orientation: "vertical",
1746
+ highlight: true,
1747
+ level: true,
1748
+ class: {
1749
+ 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"]
1750
+ }
1751
+ }, {
1752
+ disabled: false,
1753
+ active: false,
1754
+ variant: "pill",
1755
+ class: {
1756
+ 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"],
1757
+ linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1758
+ }
1759
+ }, {
1760
+ disabled: false,
1761
+ variant: "pill",
1762
+ highlight: true,
1763
+ orientation: "horizontal",
1764
+ class: {
1765
+ link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1766
+ }
1767
+ }, {
1768
+ disabled: false,
1769
+ variant: "pill",
1770
+ highlight: false,
1771
+ active: false,
1772
+ orientation: "horizontal",
1773
+ class: {
1774
+ link: "data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50"
1775
+ }
1776
+ }, ...(options.theme.colors || []).map((color) => ({
1777
+ color,
1778
+ variant: "pill",
1779
+ active: true,
1780
+ class: {
1781
+ link: `text-[var(--ui-${color})]`,
1782
+ linkLeadingIcon: `text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
1783
+ }
1784
+ })), {
1785
+ color: "neutral",
1786
+ variant: "pill",
1787
+ active: true,
1788
+ class: {
1789
+ link: "text-[var(--ui-text-highlighted)]",
1790
+ linkLeadingIcon: "text-[var(--ui-text-highlighted)] group-data-[state=open]:text-[var(--ui-text-highlighted)]"
1791
+ }
1792
+ }, {
1793
+ variant: "pill",
1794
+ active: true,
1795
+ highlight: false,
1796
+ class: {
1797
+ link: "before:bg-[var(--ui-bg-elevated)]"
1798
+ }
1799
+ }, {
1800
+ variant: "pill",
1801
+ active: true,
1802
+ highlight: true,
1803
+ class: {
1804
+ link: ["hover:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "before:transition-colors"]
1805
+ }
1806
+ }, {
1807
+ disabled: false,
1808
+ active: false,
1809
+ variant: "link",
1810
+ class: {
1811
+ link: ["hover:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
1812
+ linkLeadingIcon: ["group-hover:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
1813
+ }
1814
+ }, ...(options.theme.colors || []).map((color) => ({
1815
+ color,
1816
+ variant: "link",
1817
+ active: true,
1818
+ class: {
1819
+ link: `text-[var(--ui-${color})]`,
1820
+ linkLeadingIcon: `text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
1821
+ }
1822
+ })), {
1823
+ color: "neutral",
1824
+ variant: "link",
1825
+ active: true,
1826
+ class: {
1827
+ link: "text-[var(--ui-text-highlighted)]",
1828
+ linkLeadingIcon: "text-[var(--ui-text-highlighted)] group-data-[state=open]:text-[var(--ui-text-highlighted)]"
1829
+ }
1830
+ }, ...(options.theme.colors || []).map((highlightColor) => ({
1831
+ highlightColor,
1832
+ highlight: true,
1833
+ level: true,
1834
+ active: true,
1835
+ class: {
1836
+ link: `after:bg-[var(--ui-${highlightColor})]`
1837
+ }
1838
+ })), {
1839
+ highlightColor: "neutral",
1840
+ highlight: true,
1841
+ level: true,
1842
+ active: true,
1843
+ class: {
1844
+ link: "after:bg-[var(--ui-bg-inverted)]"
1845
+ }
1846
+ }],
1847
+ defaultVariants: {
1848
+ color: "primary",
1849
+ highlightColor: "primary",
1850
+ variant: "pill"
1851
+ }
1852
+ });
1853
+
1854
+ const pagination = {
1855
+ slots: {
1856
+ root: "",
1857
+ list: "flex items-center gap-1",
1858
+ ellipsis: "pointer-events-none",
1859
+ label: "min-w-5 text-center"
1860
+ }
1861
+ };
1862
+
1863
+ const pinInput = (options) => ({
1864
+ slots: {
1865
+ root: "relative inline-flex items-center gap-1.5",
1866
+ 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"]
1867
+ },
1868
+ variants: {
1869
+ size: {
1870
+ xs: {
1871
+ base: "size-6 text-xs"
1872
+ },
1873
+ sm: {
1874
+ base: "size-7 text-xs"
1875
+ },
1876
+ md: {
1877
+ base: "size-8 text-sm"
1878
+ },
1879
+ lg: {
1880
+ base: "size-9 text-sm"
1881
+ },
1882
+ xl: {
1883
+ base: "size-10 text-base"
1884
+ }
1885
+ },
1886
+ variant: {
1887
+ outline: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg)] ring ring-inset ring-[var(--ui-border-accented)]",
1888
+ 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",
1889
+ subtle: "text-[var(--ui-text-highlighted)] bg-[var(--ui-bg-elevated)] ring ring-inset ring-[var(--ui-border-accented)]",
1890
+ 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",
1891
+ none: "text-[var(--ui-text-highlighted)] bg-transparent"
1892
+ },
1893
+ color: {
1894
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
1895
+ neutral: ""
1896
+ },
1897
+ highlight: {
1898
+ true: ""
1899
+ }
1900
+ },
1901
+ compoundVariants: [...(options.theme.colors || []).map((color) => ({
1902
+ color,
1903
+ variant: ["outline", "subtle"],
1904
+ class: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
1905
+ })), ...(options.theme.colors || []).map((color) => ({
1906
+ color,
1907
+ highlight: true,
1908
+ class: `ring ring-inset ring-[var(--ui-${color})]`
1909
+ })), {
1910
+ color: "neutral",
1911
+ variant: ["outline", "subtle"],
1912
+ class: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
1913
+ }, {
1914
+ color: "neutral",
1915
+ highlight: true,
1916
+ class: "ring ring-inset ring-[var(--ui-border-inverted)]"
1917
+ }],
1918
+ defaultVariants: {
1919
+ size: "md",
1920
+ color: "primary",
1921
+ variant: "outline"
1922
+ }
1923
+ });
1924
+
1925
+ const popover = {
1926
+ slots: {
1927
+ 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 pointer-events-auto",
1928
+ arrow: "fill-[var(--ui-border)]"
1929
+ }
1930
+ };
1931
+
1932
+ const progress = (options) => ({
1933
+ slots: {
1934
+ root: "gap-2",
1935
+ base: "relative overflow-hidden rounded-full bg-[var(--ui-bg-accented)]",
1936
+ indicator: "rounded-full size-full transition-transform duration-200 ease-out",
1937
+ status: "flex justify-end text-[var(--ui-text-dimmed)] transition-[width] duration-200",
1938
+ steps: "grid items-end",
1939
+ step: "truncate text-end row-start-1 col-start-1 transition-opacity"
1940
+ },
1941
+ variants: {
1942
+ animation: {
1943
+ "carousel": "",
1944
+ "carousel-inverse": "",
1945
+ "swing": "",
1946
+ "elastic": ""
1947
+ },
1948
+ color: {
1949
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
1950
+ indicator: `bg-[var(--ui-${color})]`,
1951
+ steps: `text-[var(--ui-${color})]`
1952
+ }])),
1953
+ neutral: {
1954
+ indicator: "bg-[var(--ui-bg-inverted)]",
1955
+ steps: "text-[var(--ui-bg)]"
1956
+ }
1957
+ },
1958
+ size: {
1959
+ "2xs": {
1960
+ status: "text-xs",
1961
+ steps: "text-xs"
1962
+ },
1963
+ "xs": {
1964
+ status: "text-xs",
1965
+ steps: "text-xs"
1966
+ },
1967
+ "sm": {
1968
+ status: "text-sm",
1969
+ steps: "text-sm"
1970
+ },
1971
+ "md": {
1972
+ status: "text-sm",
1973
+ steps: "text-sm"
1974
+ },
1975
+ "lg": {
1976
+ status: "text-sm",
1977
+ steps: "text-sm"
1978
+ },
1979
+ "xl": {
1980
+ status: "text-base",
1981
+ steps: "text-base"
1982
+ },
1983
+ "2xl": {
1984
+ status: "text-base",
1985
+ steps: "text-base"
1986
+ }
1987
+ },
1988
+ step: {
1989
+ active: {
1990
+ step: "opacity-100"
1991
+ },
1992
+ first: {
1993
+ step: "opacity-100 text-[var(--ui-text-muted)]"
1994
+ },
1995
+ other: {
1996
+ step: "opacity-0"
1997
+ },
1998
+ last: {
1999
+ step: ""
2000
+ }
2001
+ },
2002
+ orientation: {
2003
+ horizontal: {
2004
+ root: "w-full flex flex-col",
2005
+ base: "w-full",
2006
+ status: "flex-row"
2007
+ },
2008
+ vertical: {
2009
+ root: "h-full flex flex-row-reverse",
2010
+ base: "h-full",
2011
+ status: "flex-col"
2012
+ }
2013
+ },
2014
+ inverted: {
2015
+ true: {
2016
+ status: "self-end"
2017
+ }
2018
+ }
2019
+ },
2020
+ compoundVariants: [{
2021
+ inverted: true,
2022
+ orientation: "horizontal",
2023
+ class: {
2024
+ step: "text-start",
2025
+ status: "flex-row-reverse"
2026
+ }
2027
+ }, {
2028
+ inverted: true,
2029
+ orientation: "vertical",
2030
+ class: {
2031
+ steps: "items-start",
2032
+ status: "flex-col-reverse"
2033
+ }
2034
+ }, {
2035
+ orientation: "horizontal",
2036
+ size: "2xs",
2037
+ class: "h-px"
2038
+ }, {
2039
+ orientation: "horizontal",
2040
+ size: "xs",
2041
+ class: "h-0.5"
2042
+ }, {
2043
+ orientation: "horizontal",
2044
+ size: "sm",
2045
+ class: "h-1"
2046
+ }, {
2047
+ orientation: "horizontal",
2048
+ size: "md",
2049
+ class: "h-2"
2050
+ }, {
2051
+ orientation: "horizontal",
2052
+ size: "lg",
2053
+ class: "h-3"
2054
+ }, {
2055
+ orientation: "horizontal",
2056
+ size: "xl",
2057
+ class: "h-4"
2058
+ }, {
2059
+ orientation: "horizontal",
2060
+ size: "2xl",
2061
+ class: "h-5"
2062
+ }, {
2063
+ orientation: "vertical",
2064
+ size: "2xs",
2065
+ class: "w-px"
2066
+ }, {
2067
+ orientation: "vertical",
2068
+ size: "xs",
2069
+ class: "w-0.5"
2070
+ }, {
2071
+ orientation: "vertical",
2072
+ size: "sm",
2073
+ class: "w-1"
2074
+ }, {
2075
+ orientation: "vertical",
2076
+ size: "md",
2077
+ class: "w-2"
2078
+ }, {
2079
+ orientation: "vertical",
2080
+ size: "lg",
2081
+ class: "w-3"
2082
+ }, {
2083
+ orientation: "vertical",
2084
+ size: "xl",
2085
+ class: "w-4"
2086
+ }, {
2087
+ orientation: "vertical",
2088
+ size: "2xl",
2089
+ class: "w-5"
2090
+ }, {
2091
+ orientation: "horizontal",
2092
+ animation: "carousel",
2093
+ class: {
2094
+ indicator: "data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite] data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_ease-in-out_infinite]"
2095
+ }
2096
+ }, {
2097
+ orientation: "vertical",
2098
+ animation: "carousel",
2099
+ class: {
2100
+ indicator: "data-[state=indeterminate]:animate-[carousel-vertical_2s_ease-in-out_infinite]"
2101
+ }
2102
+ }, {
2103
+ orientation: "horizontal",
2104
+ animation: "carousel-inverse",
2105
+ class: {
2106
+ 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]"
2107
+ }
2108
+ }, {
2109
+ orientation: "vertical",
2110
+ animation: "carousel-inverse",
2111
+ class: {
2112
+ indicator: "data-[state=indeterminate]:animate-[carousel-inverse-vertical_2s_ease-in-out_infinite]"
2113
+ }
2114
+ }, {
2115
+ orientation: "horizontal",
2116
+ animation: "swing",
2117
+ class: {
2118
+ indicator: "data-[state=indeterminate]:animate-[swing_2s_ease-in-out_infinite]"
2119
+ }
2120
+ }, {
2121
+ orientation: "vertical",
2122
+ animation: "swing",
2123
+ class: {
2124
+ indicator: "data-[state=indeterminate]:animate-[swing-vertical_2s_ease-in-out_infinite]"
2125
+ }
2126
+ }, {
2127
+ orientation: "horizontal",
2128
+ animation: "elastic",
2129
+ class: {
2130
+ indicator: "data-[state=indeterminate]:animate-[elastic_2s_ease-in-out_infinite]"
2131
+ }
2132
+ }, {
2133
+ orientation: "vertical",
2134
+ animation: "elastic",
2135
+ class: {
2136
+ indicator: "data-[state=indeterminate]:animate-[elastic-vertical_2s_ease-in-out_infinite]"
2137
+ }
2138
+ }],
2139
+ defaultVariants: {
2140
+ animation: "carousel",
2141
+ color: "primary",
2142
+ size: "md"
2143
+ }
2144
+ });
2145
+
2146
+ const radioGroup = (options) => ({
2147
+ slots: {
2148
+ root: "relative",
2149
+ fieldset: "flex",
2150
+ legend: "mb-1 block font-medium text-[var(--ui-text)]",
2151
+ item: "flex items-start",
2152
+ base: "rounded-full ring ring-inset ring-[var(--ui-border-accented)] focus-visible:outline-2 focus-visible:outline-offset-2",
2153
+ indicator: "flex items-center justify-center size-full rounded-full after:bg-[var(--ui-bg)] after:rounded-full",
2154
+ container: "flex items-center",
2155
+ wrapper: "ms-2",
2156
+ label: "block font-medium text-[var(--ui-text)]",
2157
+ description: "text-[var(--ui-text-muted)]"
2158
+ },
2159
+ variants: {
2160
+ color: {
2161
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2162
+ base: `focus-visible:outline-[var(--ui-${color})]`,
2163
+ indicator: `bg-[var(--ui-${color})]`
2164
+ }])),
2165
+ neutral: {
2166
+ base: "focus-visible:outline-[var(--ui-border-inverted)]",
2167
+ indicator: "bg-[var(--ui-bg-inverted)]"
2168
+ }
2169
+ },
2170
+ orientation: {
2171
+ horizontal: {
2172
+ fieldset: "flex-row",
2173
+ wrapper: "me-2"
2174
+ },
2175
+ vertical: {
2176
+ fieldset: "flex-col"
2177
+ }
2178
+ },
2179
+ size: {
2180
+ xs: {
2181
+ fieldset: "gap-0.5",
2182
+ legend: "text-xs",
2183
+ base: "size-3",
2184
+ item: "text-xs",
2185
+ container: "h-4",
2186
+ indicator: "after:size-1"
2187
+ },
2188
+ sm: {
2189
+ fieldset: "gap-0.5",
2190
+ legend: "text-xs",
2191
+ base: "size-3.5",
2192
+ item: "text-xs",
2193
+ container: "h-4",
2194
+ indicator: "after:size-1"
2195
+ },
2196
+ md: {
2197
+ fieldset: "gap-1",
2198
+ legend: "text-sm",
2199
+ base: "size-4",
2200
+ item: "text-sm",
2201
+ container: "h-5",
2202
+ indicator: "after:size-1.5"
2203
+ },
2204
+ lg: {
2205
+ fieldset: "gap-1",
2206
+ legend: "text-sm",
2207
+ base: "size-4.5",
2208
+ item: "text-sm",
2209
+ container: "h-5",
2210
+ indicator: "after:size-1.5"
2211
+ },
2212
+ xl: {
2213
+ fieldset: "gap-1.5",
2214
+ legend: "text-base",
2215
+ base: "size-5",
2216
+ item: "text-base",
2217
+ container: "h-6",
2218
+ indicator: "after:size-2"
2219
+ }
2220
+ },
2221
+ disabled: {
2222
+ true: {
2223
+ base: "cursor-not-allowed opacity-75",
2224
+ label: "cursor-not-allowed opacity-75"
2225
+ }
2226
+ },
2227
+ required: {
2228
+ true: {
2229
+ legend: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2230
+ }
2231
+ }
2232
+ },
2233
+ defaultVariants: {
2234
+ size: "md",
2235
+ color: "primary"
2236
+ }
2237
+ });
2238
+
2239
+ const select = (options) => {
2240
+ return defuFn({
2241
+ slots: {
2242
+ root: () => undefined,
2243
+ 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"],
2244
+ value: "truncate pointer-events-none",
2245
+ placeholder: "truncate text-[var(--ui-text-dimmed)]",
2246
+ arrow: "fill-[var(--ui-border)]",
2247
+ content: "max-h-60 w-[var(--reka-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] pointer-events-auto",
2248
+ viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
2249
+ group: "p-1 isolate",
2250
+ empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
2251
+ label: "font-semibold text-[var(--ui-text-highlighted)]",
2252
+ separator: "-mx-1 my-1 h-px bg-[var(--ui-border)]",
2253
+ 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"],
2254
+ itemLeadingIcon: ["shrink-0 text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"],
2255
+ itemLeadingAvatar: "shrink-0",
2256
+ itemLeadingAvatarSize: "",
2257
+ itemLeadingChip: "shrink-0",
2258
+ itemLeadingChipSize: "",
2259
+ itemTrailing: "ms-auto inline-flex gap-1.5 items-center",
2260
+ itemTrailingIcon: "shrink-0",
2261
+ itemLabel: "truncate"
2262
+ },
2263
+ variants: {
2264
+ ...buttonGroupVariant,
2265
+ size: {
2266
+ xs: {
2267
+ label: "p-1 text-[10px]/3 gap-1",
2268
+ item: "p-1 text-xs gap-1",
2269
+ itemLeadingIcon: "size-4",
2270
+ itemLeadingAvatarSize: "3xs",
2271
+ itemLeadingChip: "size-4",
2272
+ itemLeadingChipSize: "sm",
2273
+ itemTrailingIcon: "size-4"
2274
+ },
2275
+ sm: {
2276
+ label: "p-1.5 text-[10px]/3 gap-1.5",
2277
+ item: "p-1.5 text-xs gap-1.5",
2278
+ itemLeadingIcon: "size-4",
2279
+ itemLeadingAvatarSize: "3xs",
2280
+ itemLeadingChip: "size-4",
2281
+ itemLeadingChipSize: "sm",
2282
+ itemTrailingIcon: "size-4"
2283
+ },
2284
+ md: {
2285
+ label: "p-1.5 text-xs gap-1.5",
2286
+ item: "p-1.5 text-sm gap-1.5",
2287
+ itemLeadingIcon: "size-5",
2288
+ itemLeadingAvatarSize: "2xs",
2289
+ itemLeadingChip: "size-5",
2290
+ itemLeadingChipSize: "md",
2291
+ itemTrailingIcon: "size-5"
2292
+ },
2293
+ lg: {
2294
+ label: "p-2 text-xs gap-2",
2295
+ item: "p-2 text-sm gap-2",
2296
+ itemLeadingIcon: "size-5",
2297
+ itemLeadingAvatarSize: "2xs",
2298
+ itemLeadingChip: "size-5",
2299
+ itemLeadingChipSize: "md",
2300
+ itemTrailingIcon: "size-5"
2301
+ },
2302
+ xl: {
2303
+ label: "p-2 text-sm gap-2",
2304
+ item: "p-2 text-base gap-2",
2305
+ itemLeadingIcon: "size-6",
2306
+ itemLeadingAvatarSize: "xs",
2307
+ itemLeadingChip: "size-6",
2308
+ itemLeadingChipSize: "lg",
2309
+ itemTrailingIcon: "size-6"
2310
+ }
2311
+ }
2312
+ }
2313
+ }, input(options));
2314
+ };
2315
+
2316
+ const selectMenu = (options) => {
2317
+ return defu({
2318
+ slots: {
2319
+ input: "border-b border-[var(--ui-border)]"
2320
+ }
2321
+ }, select(options));
2322
+ };
2323
+
2324
+ const separator = (options) => ({
2325
+ slots: {
2326
+ root: "flex items-center align-center text-center",
2327
+ border: "",
2328
+ container: "font-medium text-[var(--ui-text)] flex",
2329
+ icon: "shrink-0 size-5",
2330
+ avatar: "shrink-0",
2331
+ avatarSize: "2xs",
2332
+ label: "text-sm"
2333
+ },
2334
+ variants: {
2335
+ color: {
2336
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, { border: `border-[var(--ui-${color})]` }])),
2337
+ neutral: { border: "border-[var(--ui-border)]" }
2338
+ },
2339
+ orientation: {
2340
+ horizontal: {
2341
+ root: "w-full flex-row",
2342
+ border: "w-full",
2343
+ container: "mx-3 whitespace-nowrap"
2344
+ },
2345
+ vertical: {
2346
+ root: "h-full flex-col",
2347
+ border: "h-full",
2348
+ container: "my-2"
2349
+ }
2350
+ },
2351
+ size: {
2352
+ xs: "",
2353
+ sm: "",
2354
+ md: "",
2355
+ lg: "",
2356
+ xl: ""
2357
+ },
2358
+ type: {
2359
+ solid: {
2360
+ border: "border-solid"
2361
+ },
2362
+ dashed: {
2363
+ border: "border-dashed"
2364
+ },
2365
+ dotted: {
2366
+ border: "border-dotted"
2367
+ }
2368
+ }
2369
+ },
2370
+ compoundVariants: [{
2371
+ orientation: "horizontal",
2372
+ size: "xs",
2373
+ class: { border: "border-t" }
2374
+ }, {
2375
+ orientation: "horizontal",
2376
+ size: "sm",
2377
+ class: { border: "border-t-[2px]" }
2378
+ }, {
2379
+ orientation: "horizontal",
2380
+ size: "md",
2381
+ class: { border: "border-t-[3px]" }
2382
+ }, {
2383
+ orientation: "horizontal",
2384
+ size: "lg",
2385
+ class: { border: "border-t-[4px]" }
2386
+ }, {
2387
+ orientation: "horizontal",
2388
+ size: "xl",
2389
+ class: { border: "border-t-[5px]" }
2390
+ }, {
2391
+ orientation: "vertical",
2392
+ size: "xs",
2393
+ class: { border: "border-s" }
2394
+ }, {
2395
+ orientation: "vertical",
2396
+ size: "sm",
2397
+ class: { border: "border-s-[2px]" }
2398
+ }, {
2399
+ orientation: "vertical",
2400
+ size: "md",
2401
+ class: { border: "border-s-[3px]" }
2402
+ }, {
2403
+ orientation: "vertical",
2404
+ size: "lg",
2405
+ class: { border: "border-s-[4px]" }
2406
+ }, {
2407
+ orientation: "vertical",
2408
+ size: "xl",
2409
+ class: { border: "border-s-[5px]" }
2410
+ }],
2411
+ defaultVariants: {
2412
+ color: "neutral",
2413
+ size: "xs",
2414
+ type: "solid"
2415
+ }
2416
+ });
2417
+
2418
+ const skeleton = {
2419
+ base: "animate-pulse rounded-[calc(var(--ui-radius)*1.5)] bg-[var(--ui-bg-elevated)]"
2420
+ };
2421
+
2422
+ const slideover = {
2423
+ slots: {
2424
+ overlay: "fixed inset-0 bg-[var(--ui-bg-elevated)]/75",
2425
+ 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",
2426
+ header: "px-4 py-5 sm:px-6",
2427
+ body: "flex-1 overflow-y-auto p-4 sm:p-6",
2428
+ footer: "flex items-center gap-1.5 p-4 sm:px-6",
2429
+ title: "text-[var(--ui-text-highlighted)] font-semibold",
2430
+ description: "mt-1 text-[var(--ui-text-muted)] text-sm",
2431
+ close: "absolute top-4 end-4"
2432
+ },
2433
+ variants: {
2434
+ side: {
2435
+ top: {
2436
+ content: "inset-x-0 top-0 max-h-full"
2437
+ },
2438
+ right: {
2439
+ content: "right-0 inset-y-0 w-full max-w-md"
2440
+ },
2441
+ bottom: {
2442
+ content: "inset-x-0 bottom-0 max-h-full"
2443
+ },
2444
+ left: {
2445
+ content: "left-0 inset-y-0 w-full max-w-md"
2446
+ }
2447
+ },
2448
+ transition: {
2449
+ true: {
2450
+ overlay: "data-[state=open]:animate-[fade-in_200ms_ease-out] data-[state=closed]:animate-[fade-out_200ms_ease-in]"
2451
+ }
2452
+ }
2453
+ },
2454
+ compoundVariants: [{
2455
+ transition: true,
2456
+ side: "top",
2457
+ class: {
2458
+ content: "data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-top_200ms_ease-in-out]"
2459
+ }
2460
+ }, {
2461
+ transition: true,
2462
+ side: "right",
2463
+ class: {
2464
+ content: "data-[state=open]:animate-[slide-in-from-right_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-right_200ms_ease-in-out]"
2465
+ }
2466
+ }, {
2467
+ transition: true,
2468
+ side: "bottom",
2469
+ class: {
2470
+ content: "data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-bottom_200ms_ease-in-out]"
2471
+ }
2472
+ }, {
2473
+ transition: true,
2474
+ side: "left",
2475
+ class: {
2476
+ content: "data-[state=open]:animate-[slide-in-from-left_200ms_ease-in-out] data-[state=closed]:animate-[slide-out-to-left_200ms_ease-in-out]"
2477
+ }
2478
+ }]
2479
+ };
2480
+
2481
+ const slider = (options) => ({
2482
+ slots: {
2483
+ root: "relative flex items-center select-none touch-none",
2484
+ track: "relative bg-[var(--ui-bg-accented)] overflow-hidden rounded-full grow",
2485
+ range: "absolute rounded-full",
2486
+ thumb: "rounded-full bg-[var(--ui-bg)] ring-2 focus-visible:outline-2 focus-visible:outline-offset-2"
2487
+ },
2488
+ variants: {
2489
+ color: {
2490
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2491
+ range: `bg-[var(--ui-${color})]`,
2492
+ thumb: `ring-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]/50`
2493
+ }])),
2494
+ neutral: {
2495
+ range: "bg-[var(--ui-bg-inverted)]",
2496
+ thumb: "ring-[var(--ui-border-inverted)] focus-visible:outline-[var(--ui-border-inverted)]/50"
2497
+ }
2498
+ },
2499
+ size: {
2500
+ xs: {
2501
+ thumb: "size-3"
2502
+ },
2503
+ sm: {
2504
+ thumb: "size-3.5"
2505
+ },
2506
+ md: {
2507
+ thumb: "size-4"
2508
+ },
2509
+ lg: {
2510
+ thumb: "size-4.5"
2511
+ },
2512
+ xl: {
2513
+ thumb: "size-5"
2514
+ }
2515
+ },
2516
+ orientation: {
2517
+ horizontal: {
2518
+ root: "w-full",
2519
+ range: "h-full"
2520
+ },
2521
+ vertical: {
2522
+ root: "flex-col h-full",
2523
+ range: "w-full"
2524
+ }
2525
+ },
2526
+ disabled: {
2527
+ true: {
2528
+ root: "opacity-75 cursor-not-allowed"
2529
+ }
2530
+ }
2531
+ },
2532
+ compoundVariants: [{
2533
+ orientation: "horizontal",
2534
+ size: "xs",
2535
+ class: {
2536
+ track: "h-[6px]"
2537
+ }
2538
+ }, {
2539
+ orientation: "horizontal",
2540
+ size: "sm",
2541
+ class: {
2542
+ track: "h-[7px]"
2543
+ }
2544
+ }, {
2545
+ orientation: "horizontal",
2546
+ size: "md",
2547
+ class: {
2548
+ track: "h-[8px]"
2549
+ }
2550
+ }, {
2551
+ orientation: "horizontal",
2552
+ size: "lg",
2553
+ class: {
2554
+ track: "h-[9px]"
2555
+ }
2556
+ }, {
2557
+ orientation: "horizontal",
2558
+ size: "xl",
2559
+ class: {
2560
+ track: "h-[10px]"
2561
+ }
2562
+ }, {
2563
+ orientation: "vertical",
2564
+ size: "xs",
2565
+ class: {
2566
+ track: "w-[6px]"
2567
+ }
2568
+ }, {
2569
+ orientation: "vertical",
2570
+ size: "sm",
2571
+ class: {
2572
+ track: "w-[7px]"
2573
+ }
2574
+ }, {
2575
+ orientation: "vertical",
2576
+ size: "md",
2577
+ class: {
2578
+ track: "w-[8px]"
2579
+ }
2580
+ }, {
2581
+ orientation: "vertical",
2582
+ size: "lg",
2583
+ class: {
2584
+ track: "w-[9px]"
2585
+ }
2586
+ }, {
2587
+ orientation: "vertical",
2588
+ size: "xl",
2589
+ class: {
2590
+ track: "w-[10px]"
2591
+ }
2592
+ }],
2593
+ defaultVariants: {
2594
+ size: "md",
2595
+ color: "primary"
2596
+ }
2597
+ });
2598
+
2599
+ const stepper = (options) => ({
2600
+ slots: {
2601
+ root: "flex gap-4",
2602
+ header: "flex",
2603
+ item: "group text-center relative w-full",
2604
+ container: "relative",
2605
+ trigger: "rounded-full font-medium text-center align-middle flex items-center justify-center font-semibold group-data-[state=completed]:text-[var(--ui-bg)] group-data-[state=active]:text-[var(--ui-bg)] text-[var(--ui-text-muted)] bg-[var(--ui-bg-elevated)] focus-visible:outline-2 focus-visible:outline-offset-2",
2606
+ indicator: "flex items-center justify-center size-full",
2607
+ icon: "shrink-0",
2608
+ separator: "absolute rounded-full group-data-[disabled]:opacity-75 bg-[var(--ui-border-accented)]",
2609
+ wrapper: "",
2610
+ title: "font-medium text-[var(--ui-text)]",
2611
+ description: "text-[var(--ui-text-muted)] text-wrap",
2612
+ content: "size-full"
2613
+ },
2614
+ variants: {
2615
+ orientation: {
2616
+ horizontal: {
2617
+ root: "flex-col",
2618
+ container: "flex justify-center",
2619
+ separator: "top-[calc(50%-2px)] h-0.5",
2620
+ wrapper: "mt-1"
2621
+ },
2622
+ vertical: {
2623
+ header: "flex-col gap-4",
2624
+ item: "flex text-start",
2625
+ separator: "start-[calc(50%-1px)] -bottom-[10px] w-0.5"
2626
+ }
2627
+ },
2628
+ size: {
2629
+ xs: {
2630
+ trigger: "size-6 text-xs",
2631
+ icon: "size-3",
2632
+ title: "text-xs",
2633
+ description: "text-xs",
2634
+ wrapper: "mt-1.5"
2635
+ },
2636
+ sm: {
2637
+ trigger: "size-8 text-sm",
2638
+ icon: "size-4",
2639
+ title: "text-xs",
2640
+ description: "text-xs",
2641
+ wrapper: "mt-2"
2642
+ },
2643
+ md: {
2644
+ trigger: "size-10 text-base",
2645
+ icon: "size-5",
2646
+ title: "text-sm",
2647
+ description: "text-sm",
2648
+ wrapper: "mt-2.5"
2649
+ },
2650
+ lg: {
2651
+ trigger: "size-12 text-lg",
2652
+ icon: "size-6",
2653
+ title: "text-base",
2654
+ description: "text-base",
2655
+ wrapper: "mt-3"
2656
+ },
2657
+ xl: {
2658
+ trigger: "size-14 text-xl",
2659
+ icon: "size-7",
2660
+ title: "text-lg",
2661
+ description: "text-lg",
2662
+ wrapper: "mt-3.5"
2663
+ }
2664
+ },
2665
+ color: {
2666
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2667
+ trigger: `group-data-[state=completed]:bg-[var(--ui-${color})] group-data-[state=active]:bg-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]`,
2668
+ separator: `group-data-[state=completed]:bg-[var(--ui-${color})]`
2669
+ }])),
2670
+ neutral: {
2671
+ trigger: `group-data-[state=completed]:bg-[var(--ui-bg-inverted)] group-data-[state=active]:bg-[var(--ui-bg-inverted)] focus-visible:outline-[var(--ui-border-inverted)]`,
2672
+ separator: `group-data-[state=completed]:bg-[var(--ui-bg-inverted)]`
2673
+ }
2674
+ }
2675
+ },
2676
+ compoundVariants: [{
2677
+ orientation: "horizontal",
2678
+ size: "xs",
2679
+ class: { separator: "start-[calc(50%+16px)] end-[calc(-50%+16px)]" }
2680
+ }, {
2681
+ orientation: "horizontal",
2682
+ size: "sm",
2683
+ class: { separator: "start-[calc(50%+20px)] end-[calc(-50%+20px)]" }
2684
+ }, {
2685
+ orientation: "horizontal",
2686
+ size: "md",
2687
+ class: { separator: "start-[calc(50%+28px)] end-[calc(-50%+28px)]" }
2688
+ }, {
2689
+ orientation: "horizontal",
2690
+ size: "lg",
2691
+ class: { separator: "start-[calc(50%+32px)] end-[calc(-50%+32px)]" }
2692
+ }, {
2693
+ orientation: "horizontal",
2694
+ size: "xl",
2695
+ class: { separator: "start-[calc(50%+36px)] end-[calc(-50%+36px)]" }
2696
+ }, {
2697
+ orientation: "vertical",
2698
+ size: "xs",
2699
+ class: { separator: "top-[30px]", item: "gap-1.5" }
2700
+ }, {
2701
+ orientation: "vertical",
2702
+ size: "sm",
2703
+ class: { separator: "top-[38px]", item: "gap-2" }
2704
+ }, {
2705
+ orientation: "vertical",
2706
+ size: "md",
2707
+ class: { separator: "top-[46px]", item: "gap-2.5" }
2708
+ }, {
2709
+ orientation: "vertical",
2710
+ size: "lg",
2711
+ class: { separator: "top-[54px]", item: "gap-3" }
2712
+ }, {
2713
+ orientation: "vertical",
2714
+ size: "xl",
2715
+ class: { separator: "top-[62px]", item: "gap-3.5" }
2716
+ }],
2717
+ defaultVariants: {
2718
+ size: "md",
2719
+ color: "primary"
2720
+ }
2721
+ });
2722
+
2723
+ const _switch = (options) => ({
2724
+ slots: {
2725
+ root: "relative flex items-start",
2726
+ 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-[var(--ui-bg-accented)]", options.theme.transitions && "transition-colors duration-200"],
2727
+ container: "flex items-center",
2728
+ thumb: "group pointer-events-none 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",
2729
+ 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"],
2730
+ wrapper: "ms-2",
2731
+ label: "block font-medium text-[var(--ui-text)]",
2732
+ description: "text-[var(--ui-text-muted)]"
2733
+ },
2734
+ variants: {
2735
+ color: {
2736
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
2737
+ base: `data-[state=checked]:bg-[var(--ui-${color})] focus-visible:outline-[var(--ui-${color})]`,
2738
+ icon: `group-data-[state=checked]:text-[var(--ui-${color})]`
2739
+ }])),
2740
+ neutral: {
2741
+ base: "data-[state=checked]:bg-[var(--ui-bg-inverted)] focus-visible:outline-[var(--ui-border-inverted)]",
2742
+ icon: "group-data-[state=checked]:text-[var(--ui-text-highlighted)]"
2743
+ }
2744
+ },
2745
+ size: {
2746
+ xs: {
2747
+ base: "w-7",
2748
+ container: "h-4",
2749
+ thumb: "size-3 data-[state=checked]:translate-x-3 data-[state=checked]:rtl:-translate-x-3",
2750
+ wrapper: "text-xs"
2751
+ },
2752
+ sm: {
2753
+ base: "w-8",
2754
+ container: "h-4",
2755
+ thumb: "size-3.5 data-[state=checked]:translate-x-3.5 data-[state=checked]:rtl:-translate-x-3.5",
2756
+ wrapper: "text-xs"
2757
+ },
2758
+ md: {
2759
+ base: "w-9",
2760
+ container: "h-5",
2761
+ thumb: "size-4 data-[state=checked]:translate-x-4 data-[state=checked]:rtl:-translate-x-4",
2762
+ wrapper: "text-sm"
2763
+ },
2764
+ lg: {
2765
+ base: "w-10",
2766
+ container: "h-5",
2767
+ thumb: "size-4.5 data-[state=checked]:translate-x-4.5 data-[state=checked]:rtl:-translate-x-4.5",
2768
+ wrapper: "text-sm"
2769
+ },
2770
+ xl: {
2771
+ base: "w-11",
2772
+ container: "h-6",
2773
+ thumb: "size-5 data-[state=checked]:translate-x-5 data-[state=checked]:rtl:-translate-x-5",
2774
+ wrapper: "text-base"
2775
+ }
2776
+ },
2777
+ checked: {
2778
+ true: {
2779
+ icon: "group-data-[state=checked]:opacity-100"
2780
+ }
2781
+ },
2782
+ unchecked: {
2783
+ true: {
2784
+ icon: "group-data-[state=unchecked]:opacity-100"
2785
+ }
2786
+ },
2787
+ loading: {
2788
+ true: {
2789
+ icon: "animate-spin"
2790
+ }
2791
+ },
2792
+ required: {
2793
+ true: {
2794
+ label: "after:content-['*'] after:ms-0.5 after:text-[var(--ui-error)]"
2795
+ }
2796
+ },
2797
+ disabled: {
2798
+ true: {
2799
+ base: "cursor-not-allowed opacity-75",
2800
+ label: "cursor-not-allowed opacity-75",
2801
+ description: "cursor-not-allowed opacity-75"
2802
+ }
2803
+ }
2804
+ },
2805
+ defaultVariants: {
2806
+ color: "primary",
2807
+ size: "md"
2808
+ }
2809
+ });
2810
+
2811
+ const table = (options) => ({
2812
+ slots: {
2813
+ root: "relative overflow-auto",
2814
+ base: "min-w-full overflow-clip",
2815
+ caption: "sr-only",
2816
+ 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)]",
2817
+ tbody: "divide-y divide-[var(--ui-border)]",
2818
+ tr: "data-[selected=true]:bg-[var(--ui-bg-elevated)]/50",
2819
+ 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",
2820
+ td: "p-4 text-sm text-[var(--ui-text-muted)] whitespace-nowrap [&:has([role=checkbox])]:pe-0",
2821
+ empty: "py-6 text-center text-sm text-[var(--ui-text-muted)]"
2822
+ },
2823
+ variants: {
2824
+ pinned: {
2825
+ true: {
2826
+ th: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0",
2827
+ td: "sticky bg-[var(--ui-bg)]/75 data-[pinned=left]:left-0 data-[pinned=right]:right-0"
2828
+ }
2829
+ },
2830
+ sticky: {
2831
+ true: {
2832
+ thead: "sticky top-0 inset-x-0 bg-[var(--ui-bg)]/75 z-[1] backdrop-blur"
2833
+ }
2834
+ },
2835
+ loading: {
2836
+ true: {
2837
+ thead: "after:absolute after:bottom-0 after:inset-x-0 after:h-px"
2838
+ }
2839
+ },
2840
+ loadingAnimation: {
2841
+ "carousel": "",
2842
+ "carousel-inverse": "",
2843
+ "swing": "",
2844
+ "elastic": ""
2845
+ },
2846
+ loadingColor: {
2847
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
2848
+ neutral: ""
2849
+ }
2850
+ },
2851
+ compoundVariants: [...(options.theme.colors || []).map((loadingColor) => ({
2852
+ loading: true,
2853
+ loadingColor,
2854
+ class: {
2855
+ thead: `after:bg-[var(--ui-${loadingColor})]`
2856
+ }
2857
+ })), {
2858
+ loading: true,
2859
+ loadingColor: "neutral",
2860
+ class: {
2861
+ thead: "after:bg-[var(--ui-bg-inverted)]"
2862
+ }
2863
+ }, {
2864
+ loading: true,
2865
+ loadingAnimation: "carousel",
2866
+ class: {
2867
+ thead: "after:animate-[carousel_2s_ease-in-out_infinite] rtl:after:animate-[carousel-rtl_2s_ease-in-out_infinite]"
2868
+ }
2869
+ }, {
2870
+ loading: true,
2871
+ loadingAnimation: "carousel-inverse",
2872
+ class: {
2873
+ thead: "after:animate-[carousel-inverse_2s_ease-in-out_infinite] rtl:after:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]"
2874
+ }
2875
+ }, {
2876
+ loading: true,
2877
+ loadingAnimation: "swing",
2878
+ class: {
2879
+ thead: "after:animate-[swing_2s_ease-in-out_infinite]"
2880
+ }
2881
+ }, {
2882
+ loading: true,
2883
+ loadingAnimation: "elastic",
2884
+ class: {
2885
+ thead: "after:animate-[elastic_2s_ease-in-out_infinite]"
2886
+ }
2887
+ }],
2888
+ defaultVariants: {
2889
+ loadingColor: "primary",
2890
+ loadingAnimation: "carousel"
2891
+ }
2892
+ });
2893
+
2894
+ const tabs = (options) => ({
2895
+ slots: {
2896
+ root: "flex items-center gap-2",
2897
+ list: "relative flex p-1 group",
2898
+ indicator: "absolute transition-[translate,width] duration-200",
2899
+ trigger: ["group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-[var(--ui-text-muted)] hover:data-[state=inactive]:not-disabled:text-[var(--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"],
2900
+ content: "focus:outline-none w-full",
2901
+ leadingIcon: "shrink-0",
2902
+ leadingAvatar: "shrink-0",
2903
+ leadingAvatarSize: "",
2904
+ label: "truncate"
2905
+ },
2906
+ variants: {
2907
+ color: {
2908
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
2909
+ neutral: ""
2910
+ },
2911
+ variant: {
2912
+ pill: {
2913
+ list: "bg-[var(--ui-bg-elevated)] rounded-[calc(var(--ui-radius)*2)]",
2914
+ trigger: "flex-1 w-full",
2915
+ indicator: "rounded-[calc(var(--ui-radius)*1.5)] shadow-xs"
2916
+ },
2917
+ link: {
2918
+ list: "border-[var(--ui-border)]",
2919
+ indicator: "rounded-full"
2920
+ }
2921
+ },
2922
+ orientation: {
2923
+ horizontal: {
2924
+ root: "flex-col",
2925
+ list: "w-full",
2926
+ indicator: "left-0 w-[var(--reka-tabs-indicator-size)] translate-x-[var(--reka-tabs-indicator-position)]",
2927
+ trigger: "justify-center"
2928
+ },
2929
+ vertical: {
2930
+ list: "flex-col",
2931
+ indicator: "top-0 h-[var(--reka-tabs-indicator-size)] translate-y-[var(--reka-tabs-indicator-position)]"
2932
+ }
2933
+ },
2934
+ size: {
2935
+ xs: {
2936
+ trigger: "px-2 py-1 text-xs gap-1",
2937
+ leadingIcon: "size-4",
2938
+ leadingAvatarSize: "3xs"
2939
+ },
2940
+ sm: {
2941
+ trigger: "px-2.5 py-1.5 text-xs gap-1.5",
2942
+ leadingIcon: "size-4",
2943
+ leadingAvatarSize: "3xs"
2944
+ },
2945
+ md: {
2946
+ trigger: "px-3 py-1.5 text-sm gap-1.5",
2947
+ leadingIcon: "size-5",
2948
+ leadingAvatarSize: "2xs"
2949
+ },
2950
+ lg: {
2951
+ trigger: "px-3 py-2 text-sm gap-2",
2952
+ leadingIcon: "size-5",
2953
+ leadingAvatarSize: "2xs"
2954
+ },
2955
+ xl: {
2956
+ trigger: "px-3 py-2 text-base gap-2",
2957
+ leadingIcon: "size-6",
2958
+ leadingAvatarSize: "xs"
2959
+ }
2960
+ }
2961
+ },
2962
+ compoundVariants: [{
2963
+ orientation: "horizontal",
2964
+ variant: "pill",
2965
+ class: {
2966
+ indicator: "inset-y-1"
2967
+ }
2968
+ }, {
2969
+ orientation: "horizontal",
2970
+ variant: "link",
2971
+ class: {
2972
+ list: "border-b -mb-px",
2973
+ indicator: "-bottom-px h-px"
2974
+ }
2975
+ }, {
2976
+ orientation: "vertical",
2977
+ variant: "pill",
2978
+ class: {
2979
+ indicator: "inset-x-1",
2980
+ list: "items-center"
2981
+ }
2982
+ }, {
2983
+ orientation: "vertical",
2984
+ variant: "link",
2985
+ class: {
2986
+ list: "border-s -ms-px",
2987
+ indicator: "-start-px w-px"
2988
+ }
2989
+ }, ...(options.theme.colors || []).map((color) => ({
2990
+ color,
2991
+ variant: "pill",
2992
+ class: {
2993
+ indicator: `bg-[var(--ui-${color})]`,
2994
+ trigger: `data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-${color})]`
2995
+ }
2996
+ })), {
2997
+ color: "neutral",
2998
+ variant: "pill",
2999
+ class: {
3000
+ indicator: "bg-[var(--ui-bg-inverted)]",
3001
+ trigger: "data-[state=active]:text-[var(--ui-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ui-border-inverted)]"
3002
+ }
3003
+ }, ...(options.theme.colors || []).map((color) => ({
3004
+ color,
3005
+ variant: "link",
3006
+ class: {
3007
+ indicator: `bg-[var(--ui-${color})]`,
3008
+ trigger: `data-[state=active]:text-[var(--ui-${color})] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`
3009
+ }
3010
+ })), {
3011
+ color: "neutral",
3012
+ variant: "link",
3013
+ class: {
3014
+ indicator: "bg-[var(--ui-bg-inverted)]",
3015
+ trigger: "data-[state=active]:text-[var(--ui-text-highlighted)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]"
3016
+ }
3017
+ }],
3018
+ defaultVariants: {
3019
+ color: "primary",
3020
+ variant: "pill",
3021
+ size: "md"
3022
+ }
3023
+ });
3024
+
3025
+ const textarea = (options) => {
3026
+ return input(options);
3027
+ };
3028
+
3029
+ const toast = (options) => ({
3030
+ slots: {
3031
+ 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",
3032
+ wrapper: "w-0 flex-1 flex flex-col gap-1",
3033
+ title: "text-sm font-medium text-[var(--ui-text-highlighted)]",
3034
+ description: "text-sm text-[var(--ui-text-muted)]",
3035
+ icon: "shrink-0 size-5",
3036
+ avatar: "shrink-0",
3037
+ avatarSize: "2xl",
3038
+ actions: "flex gap-1.5 shrink-0",
3039
+ progress: "absolute inset-x-0 bottom-0 h-1 z-[-1]",
3040
+ close: "p-0.5"
3041
+ },
3042
+ variants: {
3043
+ color: {
3044
+ ...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
3045
+ root: `focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-${color})]`,
3046
+ icon: `text-[var(--ui-${color})]`,
3047
+ progress: `bg-[var(--ui-${color})]`
3048
+ }])),
3049
+ neutral: {
3050
+ root: "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--ui-border-inverted)]",
3051
+ icon: "text-[var(--ui-text-highlighted)]",
3052
+ progress: "bg-[var(--ui-bg-inverted)]"
3053
+ }
3054
+ },
3055
+ multiline: {
3056
+ true: {
3057
+ root: "items-start",
3058
+ actions: "items-start mt-1"
3059
+ },
3060
+ false: {
3061
+ root: "items-center",
3062
+ actions: "items-center"
3063
+ }
3064
+ }
3065
+ },
3066
+ defaultVariants: {
3067
+ color: "primary"
3068
+ }
3069
+ });
3070
+
3071
+ const toaster = {
3072
+ slots: {
3073
+ viewport: "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-[var(--height)] focus:outline-none",
3074
+ 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"
3075
+ },
3076
+ variants: {
3077
+ position: {
3078
+ "top-left": {
3079
+ viewport: "left-4"
3080
+ },
3081
+ "top-center": {
3082
+ viewport: "left-1/2 transform -translate-x-1/2"
3083
+ },
3084
+ "top-right": {
3085
+ viewport: "right-4"
3086
+ },
3087
+ "bottom-left": {
3088
+ viewport: "left-4"
3089
+ },
3090
+ "bottom-center": {
3091
+ viewport: "left-1/2 transform -translate-x-1/2"
3092
+ },
3093
+ "bottom-right": {
3094
+ viewport: "right-4"
3095
+ }
3096
+ },
3097
+ swipeDirection: {
3098
+ up: "data-[swipe=end]:animate-[toast-slide-up_200ms_ease-out]",
3099
+ right: "data-[swipe=end]:animate-[toast-slide-right_200ms_ease-out]",
3100
+ down: "data-[swipe=end]:animate-[toast-slide-down_200ms_ease-out]",
3101
+ left: "data-[swipe=end]:animate-[toast-slide-left_200ms_ease-out]"
3102
+ }
3103
+ },
3104
+ compoundVariants: [{
3105
+ position: ["top-left", "top-center", "top-right"],
3106
+ class: {
3107
+ viewport: "top-4",
3108
+ base: "top-0 data-[state=open]:animate-[slide-in-from-top_200ms_ease-in-out]"
3109
+ }
3110
+ }, {
3111
+ position: ["bottom-left", "bottom-center", "bottom-right"],
3112
+ class: {
3113
+ viewport: "bottom-4",
3114
+ base: "bottom-0 data-[state=open]:animate-[slide-in-from-bottom_200ms_ease-in-out]"
3115
+ }
3116
+ }, {
3117
+ swipeDirection: ["left", "right"],
3118
+ class: "data-[swipe=move]:translate-x-[var(--reka-toast-swipe-move-x)] data-[swipe=end]:translate-x-[var(--reka-toast-swipe-end-x)] data-[swipe=cancel]:translate-x-0"
3119
+ }, {
3120
+ swipeDirection: ["up", "down"],
3121
+ class: "data-[swipe=move]:translate-y-[var(--reka-toast-swipe-move-y)] data-[swipe=end]:translate-y-[var(--reka-toast-swipe-end-y)] data-[swipe=cancel]:translate-y-0"
3122
+ }],
3123
+ defaultVariants: {
3124
+ position: "bottom-right"
3125
+ }
3126
+ };
3127
+
3128
+ const tooltip = {
3129
+ slots: {
3130
+ 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] pointer-events-auto",
3131
+ arrow: "fill-[var(--ui-border)]",
3132
+ text: "truncate",
3133
+ kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
3134
+ kbdsSize: "sm"
3135
+ }
3136
+ };
3137
+
3138
+ const theme = {
3139
+ __proto__: null,
3140
+ accordion: accordion,
3141
+ alert: alert,
3142
+ avatar: avatar,
3143
+ avatarGroup: avatarGroup,
3144
+ badge: badge,
3145
+ breadcrumb: breadcrumb,
3146
+ button: button,
3147
+ buttonGroup: buttonGroup,
3148
+ calendar: calendar,
3149
+ card: card,
3150
+ carousel: carousel,
3151
+ checkbox: checkbox,
3152
+ chip: chip,
3153
+ collapsible: collapsible,
3154
+ colorPicker: colorPicker,
3155
+ commandPalette: commandPalette,
3156
+ container: container,
3157
+ contextMenu: contextMenu,
3158
+ drawer: drawer,
3159
+ dropdownMenu: dropdownMenu,
3160
+ form: form,
3161
+ formField: formField,
3162
+ input: input,
3163
+ inputMenu: inputMenu,
3164
+ inputNumber: inputNumber,
3165
+ kbd: kbd,
3166
+ link: link,
3167
+ modal: modal,
3168
+ navigationMenu: navigationMenu,
3169
+ pagination: pagination,
3170
+ pinInput: pinInput,
3171
+ popover: popover,
3172
+ progress: progress,
3173
+ radioGroup: radioGroup,
3174
+ select: select,
3175
+ selectMenu: selectMenu,
3176
+ separator: separator,
3177
+ skeleton: skeleton,
3178
+ slideover: slideover,
3179
+ slider: slider,
3180
+ stepper: stepper,
3181
+ switch: _switch,
3182
+ table: table,
3183
+ tabs: tabs,
3184
+ textarea: textarea,
3185
+ toast: toast,
3186
+ toaster: toaster,
3187
+ tooltip: tooltip
3188
+ };
3189
+
3190
+ function buildTemplates(options) {
3191
+ return Object.entries(theme).reduce((acc, [key, component]) => {
3192
+ acc[key] = typeof component === "function" ? component(options) : component;
3193
+ return acc;
3194
+ }, {});
3195
+ }
3196
+ function getTemplates(options, uiConfig) {
3197
+ const templates = [];
3198
+ for (const component in theme) {
3199
+ templates.push({
3200
+ filename: `ui/${kebabCase(component)}.ts`,
3201
+ write: true,
3202
+ getContents: async () => {
3203
+ const template = theme[component];
3204
+ const result = typeof template === "function" ? template(options) : template;
3205
+ const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
3206
+ const keys = Object.keys(values);
3207
+ return keys.some((key) => key !== "true" && key !== "false");
3208
+ }).map(([key]) => key);
3209
+ let json = JSON.stringify(result, null, 2);
3210
+ for (const variant of variants) {
3211
+ json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
3212
+ json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
3213
+ const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
3214
+ return `${before}${replaced}${after}`;
3215
+ });
3216
+ }
3217
+ function generateVariantDeclarations(variants2) {
3218
+ return variants2.map((variant) => {
3219
+ const keys = Object.keys(result.variants[variant]);
3220
+ return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
3221
+ });
3222
+ }
3223
+ return [
3224
+ ...generateVariantDeclarations(variants),
3225
+ `export default ${json}`
3226
+ ].join("\n\n");
3227
+ }
3228
+ });
3229
+ }
3230
+ templates.push({
3231
+ filename: "ui/index.ts",
3232
+ write: true,
3233
+ getContents: () => Object.keys(theme).map((component) => `export { default as ${component} } from './${kebabCase(component)}'`).join("\n")
3234
+ });
3235
+ templates.push({
3236
+ filename: "types/ui.d.ts",
3237
+ getContents: () => `import * as ui from '#build/ui'
3238
+ import type { DeepPartial } from '#ui/types/utils'
3239
+ import type { defaultConfig } from 'tailwind-variants'
3240
+ import colors from 'tailwindcss/colors'
3241
+
3242
+ const icons = ${JSON.stringify(uiConfig.icons)};
3243
+
3244
+ type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | (string & {})
3245
+ type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
3246
+
3247
+ type AppConfigUI = {
3248
+ colors?: {
3249
+ ${options.theme?.colors?.map((color) => `${color}?: Color`).join("\n ")}
3250
+ neutral?: NeutralColor
3251
+ }
3252
+ icons?: Partial<typeof icons>
3253
+ tv?: typeof defaultConfig
3254
+ } & DeepPartial<typeof ui>
3255
+
3256
+ declare module '@nuxt/schema' {
3257
+ interface AppConfigInput {
3258
+ ui?: AppConfigUI
3259
+ }
3260
+ }
3261
+
3262
+ export {}
3263
+ `
3264
+ });
3265
+ templates.push({
3266
+ filename: "ui-image-component.ts",
3267
+ write: true,
3268
+ getContents: ({ app }) => {
3269
+ const image = app?.components?.find((c) => c.pascalName === "NuxtImg" && !c.filePath.includes("nuxt/dist/app"));
3270
+ return image ? `export { default } from "${image.filePath}"` : 'export default "img"';
3271
+ }
3272
+ });
3273
+ return templates;
3274
+ }
3275
+ function addTemplates(options, nuxt, resolve) {
3276
+ const templates = getTemplates(options, nuxt.options.appConfig.ui);
3277
+ for (const template of templates) {
3278
+ if (template.filename.endsWith(".d.ts")) {
3279
+ addTypeTemplate(template);
3280
+ } else {
3281
+ addTemplate(template);
3282
+ }
3283
+ }
3284
+ nuxt.hook("prepare:types", ({ references }) => {
3285
+ references.push({ path: resolve("./runtime/types/app.config.d.ts") });
3286
+ });
3287
+ }
3288
+
3289
+ export { getDefaultUiConfig as a, addTemplates as b, buildTemplates as c, defaultOptions as d, getTemplates as g, resolveColors as r };