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

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