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