@nuxt/ui 3.0.0-alpha.7 → 3.0.0-alpha.9

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