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