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