@nuxt/ui 4.7.1 → 4.8.1

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 (359) hide show
  1. package/.nuxt/{ui.css → ui.static.css} +0 -10
  2. package/LICENSE.md +1 -1
  3. package/cli/commands/make/component.mjs +6 -2
  4. package/cli/templates.mjs +46 -20
  5. package/cli/utils.mjs +19 -0
  6. package/dist/module.json +1 -1
  7. package/dist/module.mjs +4 -4
  8. package/dist/runtime/components/Accordion.vue +15 -14
  9. package/dist/runtime/components/Alert.vue +20 -20
  10. package/dist/runtime/components/AuthForm.vue +37 -37
  11. package/dist/runtime/components/Avatar.d.vue.ts +4 -0
  12. package/dist/runtime/components/Avatar.vue +14 -12
  13. package/dist/runtime/components/Avatar.vue.d.ts +4 -0
  14. package/dist/runtime/components/AvatarGroup.d.vue.ts +4 -0
  15. package/dist/runtime/components/AvatarGroup.vue +11 -8
  16. package/dist/runtime/components/AvatarGroup.vue.d.ts +4 -0
  17. package/dist/runtime/components/Badge.vue +11 -11
  18. package/dist/runtime/components/Banner.vue +25 -23
  19. package/dist/runtime/components/BlogPost.d.vue.ts +1 -1
  20. package/dist/runtime/components/BlogPost.vue +30 -28
  21. package/dist/runtime/components/BlogPost.vue.d.ts +1 -1
  22. package/dist/runtime/components/BlogPosts.vue +6 -6
  23. package/dist/runtime/components/Breadcrumb.d.vue.ts +4 -0
  24. package/dist/runtime/components/Breadcrumb.vue +21 -18
  25. package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -0
  26. package/dist/runtime/components/Button.vue +16 -16
  27. package/dist/runtime/components/Calendar.vue +21 -20
  28. package/dist/runtime/components/Card.vue +11 -11
  29. package/dist/runtime/components/Carousel.vue +23 -22
  30. package/dist/runtime/components/ChangelogVersion.vue +31 -29
  31. package/dist/runtime/components/ChangelogVersions.vue +8 -8
  32. package/dist/runtime/components/ChatMessage.d.vue.ts +6 -0
  33. package/dist/runtime/components/ChatMessage.vue +46 -36
  34. package/dist/runtime/components/ChatMessage.vue.d.ts +6 -0
  35. package/dist/runtime/components/ChatMessages.vue +14 -14
  36. package/dist/runtime/components/ChatPalette.vue +6 -6
  37. package/dist/runtime/components/ChatPrompt.d.vue.ts +7 -0
  38. package/dist/runtime/components/ChatPrompt.vue +22 -12
  39. package/dist/runtime/components/ChatPrompt.vue.d.ts +7 -0
  40. package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +3 -3
  41. package/dist/runtime/components/ChatPromptSubmit.vue +6 -6
  42. package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +3 -3
  43. package/dist/runtime/components/ChatReasoning.vue +20 -20
  44. package/dist/runtime/components/ChatShimmer.vue +7 -7
  45. package/dist/runtime/components/ChatTool.d.vue.ts +1 -1
  46. package/dist/runtime/components/ChatTool.vue +19 -19
  47. package/dist/runtime/components/ChatTool.vue.d.ts +1 -1
  48. package/dist/runtime/components/Checkbox.d.vue.ts +2 -0
  49. package/dist/runtime/components/Checkbox.vue +25 -24
  50. package/dist/runtime/components/Checkbox.vue.d.ts +2 -0
  51. package/dist/runtime/components/CheckboxGroup.d.vue.ts +1 -1
  52. package/dist/runtime/components/CheckboxGroup.vue +17 -14
  53. package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
  54. package/dist/runtime/components/Chip.vue +8 -8
  55. package/dist/runtime/components/Collapsible.vue +8 -7
  56. package/dist/runtime/components/ColorPicker.d.vue.ts +2 -0
  57. package/dist/runtime/components/ColorPicker.vue +10 -10
  58. package/dist/runtime/components/ColorPicker.vue.d.ts +2 -0
  59. package/dist/runtime/components/CommandPalette.d.vue.ts +5 -5
  60. package/dist/runtime/components/CommandPalette.vue +92 -69
  61. package/dist/runtime/components/CommandPalette.vue.d.ts +5 -5
  62. package/dist/runtime/components/Container.vue +4 -4
  63. package/dist/runtime/components/ContextMenu.vue +16 -15
  64. package/dist/runtime/components/DashboardGroup.d.vue.ts +1 -1
  65. package/dist/runtime/components/DashboardGroup.vue +6 -4
  66. package/dist/runtime/components/DashboardGroup.vue.d.ts +1 -1
  67. package/dist/runtime/components/DashboardNavbar.vue +16 -16
  68. package/dist/runtime/components/DashboardPanel.vue +7 -7
  69. package/dist/runtime/components/DashboardResizeHandle.vue +5 -5
  70. package/dist/runtime/components/DashboardSearch.d.vue.ts +16 -1
  71. package/dist/runtime/components/DashboardSearch.vue +25 -12
  72. package/dist/runtime/components/DashboardSearch.vue.d.ts +16 -1
  73. package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -2
  74. package/dist/runtime/components/DashboardSearchButton.vue +15 -15
  75. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -2
  76. package/dist/runtime/components/DashboardSidebar.d.vue.ts +1 -1
  77. package/dist/runtime/components/DashboardSidebar.vue +22 -22
  78. package/dist/runtime/components/DashboardSidebar.vue.d.ts +1 -1
  79. package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +1 -1
  80. package/dist/runtime/components/DashboardSidebarCollapse.vue +5 -5
  81. package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
  82. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -1
  83. package/dist/runtime/components/DashboardSidebarToggle.vue +5 -5
  84. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
  85. package/dist/runtime/components/DashboardToolbar.vue +6 -6
  86. package/dist/runtime/components/Drawer.d.vue.ts +1 -1
  87. package/dist/runtime/components/Drawer.vue +23 -22
  88. package/dist/runtime/components/Drawer.vue.d.ts +1 -1
  89. package/dist/runtime/components/DropdownMenu.vue +21 -20
  90. package/dist/runtime/components/Editor.vue +8 -7
  91. package/dist/runtime/components/EditorDragHandle.d.vue.ts +2 -2
  92. package/dist/runtime/components/EditorDragHandle.vue +9 -8
  93. package/dist/runtime/components/EditorDragHandle.vue.d.ts +2 -2
  94. package/dist/runtime/components/EditorToolbar.vue +10 -9
  95. package/dist/runtime/components/Empty.vue +14 -14
  96. package/dist/runtime/components/Error.d.vue.ts +9 -1
  97. package/dist/runtime/components/Error.vue +17 -10
  98. package/dist/runtime/components/Error.vue.d.ts +9 -1
  99. package/dist/runtime/components/FieldGroup.vue +4 -4
  100. package/dist/runtime/components/FileUpload.vue +36 -37
  101. package/dist/runtime/components/Footer.vue +10 -10
  102. package/dist/runtime/components/FooterColumns.vue +15 -15
  103. package/dist/runtime/components/Form.d.vue.ts +1 -1
  104. package/dist/runtime/components/Form.vue +6 -5
  105. package/dist/runtime/components/Form.vue.d.ts +1 -1
  106. package/dist/runtime/components/FormField.d.vue.ts +1 -0
  107. package/dist/runtime/components/FormField.vue +21 -21
  108. package/dist/runtime/components/FormField.vue.d.ts +1 -0
  109. package/dist/runtime/components/Header.vue +19 -19
  110. package/dist/runtime/components/Icon.vue +2 -1
  111. package/dist/runtime/components/Input.vue +19 -19
  112. package/dist/runtime/components/InputDate.vue +21 -20
  113. package/dist/runtime/components/InputMenu.d.vue.ts +52 -51
  114. package/dist/runtime/components/InputMenu.vue +66 -63
  115. package/dist/runtime/components/InputMenu.vue.d.ts +52 -51
  116. package/dist/runtime/components/InputNumber.vue +25 -24
  117. package/dist/runtime/components/InputTags.vue +26 -25
  118. package/dist/runtime/components/InputTime.vue +21 -20
  119. package/dist/runtime/components/Kbd.vue +5 -5
  120. package/dist/runtime/components/Link.d.vue.ts +2 -2
  121. package/dist/runtime/components/Link.vue.d.ts +2 -2
  122. package/dist/runtime/components/LinkBase.d.vue.ts +1 -1
  123. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  124. package/dist/runtime/components/Listbox.d.vue.ts +13 -9
  125. package/dist/runtime/components/Listbox.vue +34 -32
  126. package/dist/runtime/components/Listbox.vue.d.ts +13 -9
  127. package/dist/runtime/components/Main.vue +4 -4
  128. package/dist/runtime/components/Marquee.vue +5 -5
  129. package/dist/runtime/components/Modal.d.vue.ts +2 -2
  130. package/dist/runtime/components/Modal.vue +25 -24
  131. package/dist/runtime/components/Modal.vue.d.ts +2 -2
  132. package/dist/runtime/components/NavigationMenu.vue +66 -65
  133. package/dist/runtime/components/Page.vue +7 -7
  134. package/dist/runtime/components/PageAnchors.vue +11 -11
  135. package/dist/runtime/components/PageAside.vue +9 -9
  136. package/dist/runtime/components/PageBody.vue +4 -4
  137. package/dist/runtime/components/PageCTA.vue +18 -16
  138. package/dist/runtime/components/PageCard.vue +25 -23
  139. package/dist/runtime/components/PageColumns.vue +4 -4
  140. package/dist/runtime/components/PageFeature.vue +17 -15
  141. package/dist/runtime/components/PageGrid.vue +4 -4
  142. package/dist/runtime/components/PageHeader.vue +14 -14
  143. package/dist/runtime/components/PageHero.vue +20 -18
  144. package/dist/runtime/components/PageLinks.vue +12 -12
  145. package/dist/runtime/components/PageList.vue +4 -4
  146. package/dist/runtime/components/PageLogos.vue +16 -16
  147. package/dist/runtime/components/PageSection.d.vue.ts +1 -1
  148. package/dist/runtime/components/PageSection.vue +24 -22
  149. package/dist/runtime/components/PageSection.vue.d.ts +1 -1
  150. package/dist/runtime/components/Pagination.d.vue.ts +2 -2
  151. package/dist/runtime/components/Pagination.vue +23 -22
  152. package/dist/runtime/components/Pagination.vue.d.ts +2 -2
  153. package/dist/runtime/components/PinInput.vue +15 -14
  154. package/dist/runtime/components/Popover.vue +9 -8
  155. package/dist/runtime/components/PricingPlan.vue +36 -36
  156. package/dist/runtime/components/PricingPlans.vue +6 -6
  157. package/dist/runtime/components/PricingTable.vue +44 -44
  158. package/dist/runtime/components/Progress.d.vue.ts +1 -1
  159. package/dist/runtime/components/Progress.vue +12 -11
  160. package/dist/runtime/components/Progress.vue.d.ts +1 -1
  161. package/dist/runtime/components/RadioGroup.d.vue.ts +2 -0
  162. package/dist/runtime/components/RadioGroup.vue +28 -27
  163. package/dist/runtime/components/RadioGroup.vue.d.ts +2 -0
  164. package/dist/runtime/components/ScrollArea.vue +13 -13
  165. package/dist/runtime/components/Select.vue +38 -40
  166. package/dist/runtime/components/SelectMenu.d.vue.ts +46 -46
  167. package/dist/runtime/components/SelectMenu.vue +49 -48
  168. package/dist/runtime/components/SelectMenu.vue.d.ts +46 -46
  169. package/dist/runtime/components/Separator.d.vue.ts +9 -3
  170. package/dist/runtime/components/Separator.vue +29 -16
  171. package/dist/runtime/components/Separator.vue.d.ts +9 -3
  172. package/dist/runtime/components/Sidebar.vue +28 -28
  173. package/dist/runtime/components/Skeleton.vue +5 -5
  174. package/dist/runtime/components/Slideover.d.vue.ts +3 -3
  175. package/dist/runtime/components/Slideover.vue +24 -23
  176. package/dist/runtime/components/Slideover.vue.d.ts +3 -3
  177. package/dist/runtime/components/Slider.vue +16 -15
  178. package/dist/runtime/components/Stepper.vue +19 -18
  179. package/dist/runtime/components/Switch.d.vue.ts +2 -0
  180. package/dist/runtime/components/Switch.vue +26 -23
  181. package/dist/runtime/components/Switch.vue.d.ts +2 -0
  182. package/dist/runtime/components/Table.vue +26 -25
  183. package/dist/runtime/components/Tabs.vue +22 -21
  184. package/dist/runtime/components/Textarea.vue +19 -18
  185. package/dist/runtime/components/Theme.d.vue.ts +13 -5
  186. package/dist/runtime/components/Theme.vue +32 -4
  187. package/dist/runtime/components/Theme.vue.d.ts +13 -5
  188. package/dist/runtime/components/Timeline.vue +15 -15
  189. package/dist/runtime/components/Toast.vue +35 -34
  190. package/dist/runtime/components/Toaster.d.vue.ts +1 -1
  191. package/dist/runtime/components/Toaster.vue +10 -9
  192. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  193. package/dist/runtime/components/Tooltip.vue +13 -12
  194. package/dist/runtime/components/Tree.vue +24 -23
  195. package/dist/runtime/components/User.vue +23 -21
  196. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +5 -2
  197. package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +1 -1
  198. package/dist/runtime/components/color-mode/ColorModeButton.vue +8 -6
  199. package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +1 -1
  200. package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -2
  201. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -0
  202. package/dist/runtime/components/content/ContentNavigation.vue +31 -30
  203. package/dist/runtime/components/content/ContentSearch.d.vue.ts +31 -4
  204. package/dist/runtime/components/content/ContentSearch.vue +78 -33
  205. package/dist/runtime/components/content/ContentSearch.vue.d.ts +31 -4
  206. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -2
  207. package/dist/runtime/components/content/ContentSearchButton.vue +15 -15
  208. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -2
  209. package/dist/runtime/components/content/ContentSurround.vue +14 -12
  210. package/dist/runtime/components/content/ContentToc.vue +34 -33
  211. package/dist/runtime/components/prose/A.vue +4 -4
  212. package/dist/runtime/components/prose/Accordion.vue +4 -4
  213. package/dist/runtime/components/prose/AccordionItem.vue +5 -5
  214. package/dist/runtime/components/prose/Badge.vue +4 -4
  215. package/dist/runtime/components/prose/Blockquote.vue +4 -4
  216. package/dist/runtime/components/prose/Callout.vue +8 -8
  217. package/dist/runtime/components/prose/Card.vue +12 -12
  218. package/dist/runtime/components/prose/CardGroup.vue +4 -4
  219. package/dist/runtime/components/prose/Code.vue +4 -4
  220. package/dist/runtime/components/prose/CodeCollapse.vue +8 -8
  221. package/dist/runtime/components/prose/CodeGroup.vue +9 -9
  222. package/dist/runtime/components/prose/CodePreview.vue +6 -6
  223. package/dist/runtime/components/prose/CodeTree.vue +14 -14
  224. package/dist/runtime/components/prose/Collapsible.vue +7 -7
  225. package/dist/runtime/components/prose/Em.vue +4 -4
  226. package/dist/runtime/components/prose/Field.vue +13 -13
  227. package/dist/runtime/components/prose/FieldGroup.vue +4 -4
  228. package/dist/runtime/components/prose/H1.vue +5 -5
  229. package/dist/runtime/components/prose/H2.vue +7 -7
  230. package/dist/runtime/components/prose/H3.vue +7 -7
  231. package/dist/runtime/components/prose/H4.vue +5 -5
  232. package/dist/runtime/components/prose/Hr.vue +4 -4
  233. package/dist/runtime/components/prose/Icon.vue +4 -4
  234. package/dist/runtime/components/prose/Img.vue +12 -12
  235. package/dist/runtime/components/prose/Kbd.d.vue.ts +10 -2
  236. package/dist/runtime/components/prose/Kbd.vue +8 -5
  237. package/dist/runtime/components/prose/Kbd.vue.d.ts +10 -2
  238. package/dist/runtime/components/prose/Li.vue +4 -4
  239. package/dist/runtime/components/prose/Ol.vue +4 -4
  240. package/dist/runtime/components/prose/P.vue +4 -4
  241. package/dist/runtime/components/prose/Pre.vue +9 -9
  242. package/dist/runtime/components/prose/Prompt.vue +12 -12
  243. package/dist/runtime/components/prose/Steps.vue +4 -4
  244. package/dist/runtime/components/prose/Strong.vue +4 -4
  245. package/dist/runtime/components/prose/Table.vue +5 -5
  246. package/dist/runtime/components/prose/Tabs.vue +4 -4
  247. package/dist/runtime/components/prose/TabsItem.vue +5 -5
  248. package/dist/runtime/components/prose/Tbody.vue +4 -4
  249. package/dist/runtime/components/prose/Td.vue +4 -4
  250. package/dist/runtime/components/prose/Th.vue +4 -4
  251. package/dist/runtime/components/prose/Thead.vue +4 -4
  252. package/dist/runtime/components/prose/Tr.vue +4 -4
  253. package/dist/runtime/components/prose/Ul.vue +4 -4
  254. package/dist/runtime/composables/defineShortcuts.js +7 -2
  255. package/dist/runtime/composables/index.d.ts +1 -2
  256. package/dist/runtime/composables/index.js +1 -2
  257. package/dist/runtime/composables/useAvatarGroup.d.ts +12 -1
  258. package/dist/runtime/composables/useAvatarGroup.js +4 -2
  259. package/dist/runtime/composables/useComponentIcons.js +1 -1
  260. package/dist/runtime/composables/useComponentProps.d.ts +180 -0
  261. package/dist/runtime/composables/useComponentProps.js +59 -0
  262. package/dist/runtime/composables/useContentSearch.d.ts +4 -2
  263. package/dist/runtime/composables/useContentSearch.js +64 -7
  264. package/dist/runtime/composables/useFieldGroup.d.ts +9 -1
  265. package/dist/runtime/composables/useFormField.d.ts +21 -1
  266. package/dist/runtime/composables/useForwardProps.d.ts +13 -0
  267. package/dist/runtime/composables/useForwardProps.js +14 -0
  268. package/dist/runtime/composables/usePrefix.d.ts +6 -0
  269. package/dist/runtime/composables/usePrefix.js +11 -0
  270. package/dist/runtime/composables/useResizable.d.ts +4 -0
  271. package/dist/runtime/composables/useResizable.js +1 -1
  272. package/dist/runtime/locale/ar.js +1 -0
  273. package/dist/runtime/locale/az.js +1 -0
  274. package/dist/runtime/locale/be.js +1 -0
  275. package/dist/runtime/locale/bg.js +1 -0
  276. package/dist/runtime/locale/bn.js +1 -0
  277. package/dist/runtime/locale/ca.js +1 -0
  278. package/dist/runtime/locale/ckb.js +1 -0
  279. package/dist/runtime/locale/cs.js +1 -0
  280. package/dist/runtime/locale/da.js +1 -0
  281. package/dist/runtime/locale/de.js +1 -0
  282. package/dist/runtime/locale/de_ch.js +1 -0
  283. package/dist/runtime/locale/el.js +1 -0
  284. package/dist/runtime/locale/en.js +1 -0
  285. package/dist/runtime/locale/es.js +1 -0
  286. package/dist/runtime/locale/et.js +1 -0
  287. package/dist/runtime/locale/eu.js +1 -0
  288. package/dist/runtime/locale/fa_ir.js +1 -0
  289. package/dist/runtime/locale/fi.js +1 -0
  290. package/dist/runtime/locale/fr.js +1 -0
  291. package/dist/runtime/locale/gl.js +1 -0
  292. package/dist/runtime/locale/he.js +1 -0
  293. package/dist/runtime/locale/hi.js +1 -0
  294. package/dist/runtime/locale/hr.js +1 -0
  295. package/dist/runtime/locale/hu.js +1 -0
  296. package/dist/runtime/locale/hy.js +1 -0
  297. package/dist/runtime/locale/id.js +1 -0
  298. package/dist/runtime/locale/is.js +1 -0
  299. package/dist/runtime/locale/it.js +1 -0
  300. package/dist/runtime/locale/ja.js +1 -0
  301. package/dist/runtime/locale/ka.js +1 -0
  302. package/dist/runtime/locale/kk.js +1 -0
  303. package/dist/runtime/locale/km.js +1 -0
  304. package/dist/runtime/locale/ko.js +1 -0
  305. package/dist/runtime/locale/ky.js +1 -0
  306. package/dist/runtime/locale/lb.js +1 -0
  307. package/dist/runtime/locale/lo.js +1 -0
  308. package/dist/runtime/locale/lt.js +1 -0
  309. package/dist/runtime/locale/mn.js +1 -0
  310. package/dist/runtime/locale/ms.js +1 -0
  311. package/dist/runtime/locale/nb_no.js +1 -0
  312. package/dist/runtime/locale/nl.js +1 -0
  313. package/dist/runtime/locale/pl.js +1 -0
  314. package/dist/runtime/locale/pt.js +1 -0
  315. package/dist/runtime/locale/pt_br.js +1 -0
  316. package/dist/runtime/locale/ro.js +1 -0
  317. package/dist/runtime/locale/ru.js +1 -0
  318. package/dist/runtime/locale/sk.js +1 -0
  319. package/dist/runtime/locale/sl.js +1 -0
  320. package/dist/runtime/locale/sq.js +1 -0
  321. package/dist/runtime/locale/sv.js +1 -0
  322. package/dist/runtime/locale/th.js +7 -6
  323. package/dist/runtime/locale/tj.js +1 -0
  324. package/dist/runtime/locale/tr.js +1 -0
  325. package/dist/runtime/locale/ug_cn.js +1 -0
  326. package/dist/runtime/locale/uk.js +1 -0
  327. package/dist/runtime/locale/ur.js +1 -0
  328. package/dist/runtime/locale/uz.js +1 -0
  329. package/dist/runtime/locale/vi.js +1 -0
  330. package/dist/runtime/locale/zh_cn.js +1 -0
  331. package/dist/runtime/locale/zh_tw.js +1 -0
  332. package/dist/runtime/plugins/colors.js +1 -1
  333. package/dist/runtime/types/content.d.ts +1 -0
  334. package/dist/runtime/types/content.js +1 -0
  335. package/dist/runtime/types/form.d.ts +2 -2
  336. package/dist/runtime/types/locale.d.ts +1 -0
  337. package/dist/runtime/types/tv.d.ts +13 -7
  338. package/dist/runtime/types/utils.d.ts +3 -0
  339. package/dist/runtime/utils/dashboard.d.ts +1 -1
  340. package/dist/runtime/utils/{fuse.d.ts → search.d.ts} +2 -1
  341. package/dist/runtime/utils/{fuse.js → search.js} +11 -2
  342. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -0
  343. package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +2 -2
  344. package/dist/runtime/vue/overrides/inertia/Link.vue +5 -0
  345. package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +2 -2
  346. package/dist/runtime/vue/overrides/inertia/LinkBase.d.vue.ts +1 -1
  347. package/dist/runtime/vue/overrides/inertia/LinkBase.vue.d.ts +1 -1
  348. package/dist/runtime/vue/overrides/none/Link.d.vue.ts +2 -2
  349. package/dist/runtime/vue/overrides/none/Link.vue.d.ts +2 -2
  350. package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +2 -2
  351. package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +2 -2
  352. package/dist/shared/{ui.C6mn7iap.mjs → ui.BzjkAvk7.mjs} +244 -78
  353. package/dist/unplugin.mjs +1 -1
  354. package/dist/vite.mjs +1 -1
  355. package/package.json +46 -53
  356. package/dist/runtime/composables/useComponentUI.d.ts +0 -33
  357. package/dist/runtime/composables/useComponentUI.js +0 -13
  358. package/dist/runtime/composables/useResolvedVariants.d.ts +0 -21
  359. package/dist/runtime/composables/useResolvedVariants.js +0 -14
@@ -4,17 +4,18 @@ import theme from "#build/ui/toast";
4
4
 
5
5
  <script setup>
6
6
  import { ref, computed, onMounted, useTemplateRef } from "vue";
7
- import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from "reka-ui";
7
+ import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from "reka-ui";
8
+ import { useForwardProps } from "../composables/useForwardProps";
8
9
  import { reactivePick } from "@vueuse/core";
9
10
  import { useAppConfig } from "#imports";
10
- import { useComponentUI } from "../composables/useComponentUI";
11
+ import { useComponentProps } from "../composables/useComponentProps";
11
12
  import { useLocale } from "../composables/useLocale";
12
13
  import { tv } from "../utils/tv";
13
14
  import UIcon from "./Icon.vue";
14
15
  import UAvatar from "./Avatar.vue";
15
16
  import UButton from "./Button.vue";
16
17
  import UProgress from "./Progress.vue";
17
- const props = defineProps({
18
+ const _props = defineProps({
18
19
  as: { type: null, required: false },
19
20
  title: { type: [String, Object, Function], required: false },
20
21
  description: { type: [String, Object, Function], required: false },
@@ -35,10 +36,10 @@ const props = defineProps({
35
36
  });
36
37
  const emits = defineEmits(["escapeKeyDown", "pause", "resume", "swipeStart", "swipeMove", "swipeCancel", "swipeEnd", "update:open"]);
37
38
  const slots = defineSlots();
39
+ const props = useComponentProps("toast", _props);
38
40
  const { t } = useLocale();
39
41
  const appConfig = useAppConfig();
40
- const uiProp = useComponentUI("toast", props);
41
- const rootProps = useForwardPropsEmits(reactivePick(props, "as", "defaultOpen", "open", "duration", "type"), emits);
42
+ const rootProps = useForwardProps(reactivePick(props, "as", "defaultOpen", "open", "duration", "type"), emits);
42
43
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.toast || {} })({
43
44
  color: props.color,
44
45
  orientation: props.orientation,
@@ -62,65 +63,65 @@ defineExpose({
62
63
  ref="rootRef"
63
64
  v-slot="{ remaining, duration, open }"
64
65
  v-bind="rootProps"
65
- :data-orientation="orientation"
66
+ :data-orientation="props.orientation"
66
67
  data-slot="root"
67
- :class="ui.root({ class: [uiProp?.root, props.class] })"
68
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
68
69
  :style="{ '--height': height }"
69
70
  >
70
71
  <slot name="leading" :ui="ui">
71
- <UAvatar v-if="avatar" :size="uiProp?.avatarSize || ui.avatarSize()" v-bind="avatar" data-slot="avatar" :class="ui.avatar({ class: uiProp?.avatar })" />
72
- <UIcon v-else-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon })" />
72
+ <UAvatar v-if="props.avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="props.avatar" data-slot="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
73
+ <UIcon v-else-if="props.icon" :name="props.icon" data-slot="icon" :class="ui.icon({ class: props.ui?.icon })" />
73
74
  </slot>
74
75
 
75
- <div data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
76
- <ToastTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: uiProp?.title })">
76
+ <div data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
77
+ <ToastTitle v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
77
78
  <slot name="title">
78
- <component :is="title()" v-if="typeof title === 'function'" />
79
- <component :is="title" v-else-if="typeof title === 'object'" />
79
+ <component :is="props.title()" v-if="typeof props.title === 'function'" />
80
+ <component :is="props.title" v-else-if="typeof props.title === 'object'" />
80
81
  <template v-else>
81
- {{ title }}
82
+ {{ props.title }}
82
83
  </template>
83
84
  </slot>
84
85
  </ToastTitle>
85
- <ToastDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
86
+ <ToastDescription v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
86
87
  <slot name="description">
87
- <component :is="description()" v-if="typeof description === 'function'" />
88
- <component :is="description" v-else-if="typeof description === 'object'" />
88
+ <component :is="props.description()" v-if="typeof props.description === 'function'" />
89
+ <component :is="props.description" v-else-if="typeof props.description === 'object'" />
89
90
  <template v-else>
90
- {{ description }}
91
+ {{ props.description }}
91
92
  </template>
92
93
  </slot>
93
94
  </ToastDescription>
94
95
 
95
- <div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" data-slot="actions" :class="ui.actions({ class: uiProp?.actions })">
96
+ <div v-if="props.orientation === 'vertical' && (props.actions?.length || !!slots.actions)" data-slot="actions" :class="ui.actions({ class: props.ui?.actions })">
96
97
  <slot name="actions">
97
- <ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
98
- <UButton size="xs" :color="color" v-bind="action" />
98
+ <ToastAction v-for="(action, index) in props.actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
99
+ <UButton size="xs" :color="props.color" v-bind="action" />
99
100
  </ToastAction>
100
101
  </slot>
101
102
  </div>
102
103
  </div>
103
104
 
104
- <div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" data-slot="actions" :class="ui.actions({ class: uiProp?.actions, orientation: 'horizontal' })">
105
- <template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
105
+ <div v-if="props.orientation === 'horizontal' && (props.actions?.length || !!slots.actions) || props.close" data-slot="actions" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
106
+ <template v-if="props.orientation === 'horizontal' && (props.actions?.length || !!slots.actions)">
106
107
  <slot name="actions">
107
- <ToastAction v-for="(action, index) in actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
108
- <UButton size="xs" :color="color" v-bind="action" />
108
+ <ToastAction v-for="(action, index) in props.actions" :key="index" :alt-text="action.label || 'Action'" as-child @click.stop>
109
+ <UButton size="xs" :color="props.color" v-bind="action" />
109
110
  </ToastAction>
110
111
  </slot>
111
112
  </template>
112
113
 
113
- <ToastClose v-if="close || !!slots.close" as-child>
114
+ <ToastClose v-if="props.close || !!slots.close" as-child>
114
115
  <slot name="close" :ui="ui">
115
116
  <UButton
116
- v-if="close"
117
- :icon="closeIcon || appConfig.ui.icons.close"
117
+ v-if="props.close"
118
+ :icon="props.closeIcon || appConfig.ui.icons.close"
118
119
  color="neutral"
119
120
  variant="link"
120
121
  :aria-label="t('toast.close')"
121
- v-bind="typeof close === 'object' ? close : {}"
122
+ v-bind="typeof props.close === 'object' ? props.close : {}"
122
123
  data-slot="close"
123
- :class="ui.close({ class: uiProp?.close })"
124
+ :class="ui.close({ class: props.ui?.close })"
124
125
  @click.stop
125
126
  />
126
127
  </slot>
@@ -128,13 +129,13 @@ defineExpose({
128
129
  </div>
129
130
 
130
131
  <UProgress
131
- v-if="progress && open && remaining > 0 && duration"
132
+ v-if="props.progress && open && remaining > 0 && duration"
132
133
  :model-value="remaining / duration * 100"
133
- :color="color"
134
- v-bind="typeof progress === 'object' ? progress : {}"
134
+ :color="props.color"
135
+ v-bind="typeof props.progress === 'object' ? props.progress : {}"
135
136
  size="sm"
136
137
  data-slot="progress"
137
- :class="ui.progress({ class: uiProp?.progress })"
138
+ :class="ui.progress({ class: props.ui?.progress })"
138
139
  />
139
140
  </ToastRoot>
140
141
  </template>
@@ -40,8 +40,8 @@ declare const _default: typeof __VLS_export;
40
40
  export default _default;
41
41
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToasterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
42
42
  progress: boolean;
43
- max: number;
44
43
  expand: boolean;
44
+ max: number;
45
45
  duration: number;
46
46
  portal: boolean | string | HTMLElement;
47
47
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToasterSlots>;
@@ -7,16 +7,17 @@ export default {
7
7
 
8
8
  <script setup>
9
9
  import { ref, computed, toRef, provide } from "vue";
10
- import { ToastProvider, ToastViewport, ToastPortal, useForwardProps } from "reka-ui";
10
+ import { ToastProvider, ToastViewport, ToastPortal } from "reka-ui";
11
11
  import { reactivePick } from "@vueuse/core";
12
12
  import { useAppConfig } from "#imports";
13
- import { useComponentUI } from "../composables/useComponentUI";
13
+ import { useComponentProps } from "../composables/useComponentProps";
14
+ import { useForwardProps } from "../composables/useForwardProps";
14
15
  import { useToast, toastMaxInjectionKey } from "../composables/useToast";
15
16
  import { usePortal } from "../composables/usePortal";
16
17
  import { omit } from "../utils";
17
18
  import { tv } from "../utils/tv";
18
19
  import UToast from "./Toast.vue";
19
- const props = defineProps({
20
+ const _props = defineProps({
20
21
  position: { type: null, required: false },
21
22
  expand: { type: Boolean, required: false, default: true },
22
23
  progress: { type: Boolean, required: false, default: true },
@@ -30,9 +31,9 @@ const props = defineProps({
30
31
  swipeThreshold: { type: Number, required: false }
31
32
  });
32
33
  defineSlots();
34
+ const props = useComponentProps("toaster", _props);
33
35
  const { toasts, remove } = useToast();
34
36
  const appConfig = useAppConfig();
35
- const uiProp = useComponentUI("toaster", props);
36
37
  provide(toastMaxInjectionKey, toRef(() => props.max));
37
38
  const providerProps = useForwardProps(reactivePick(props, "duration", "label", "swipeThreshold", "disableSwipe"));
38
39
  const portalProps = usePortal(toRef(() => props.portal));
@@ -79,7 +80,7 @@ function getOffset(index) {
79
80
  v-for="(toast, index) of toasts"
80
81
  :key="toast.id"
81
82
  ref="refs"
82
- :progress="progress"
83
+ :progress="props.progress"
83
84
  v-bind="omit(toast, ['id', 'close', '_duplicate', '_updated'])"
84
85
  :close="toast.close"
85
86
  :data-expanded="expanded"
@@ -94,7 +95,7 @@ function getOffset(index) {
94
95
  '--transform': 'translateY(var(--translate)) scale(var(--scale))'
95
96
  }"
96
97
  data-slot="base"
97
- :class="ui.base({ class: [uiProp?.base, toast.onClick ? 'cursor-pointer' : void 0] })"
98
+ :class="ui.base({ class: [props.ui?.base, toast.onClick ? 'cursor-pointer' : void 0] })"
98
99
  @update:open="onUpdateOpen($event, toast.id)"
99
100
  @click="toast.onClick && toast.onClick(toast)"
100
101
  />
@@ -103,11 +104,11 @@ function getOffset(index) {
103
104
  <ToastViewport
104
105
  :data-expanded="expanded"
105
106
  data-slot="viewport"
106
- :class="ui.viewport({ class: [uiProp?.viewport, props.class] })"
107
+ :class="ui.viewport({ class: [props.ui?.viewport, props.class] })"
107
108
  :style="{
108
109
  '--scale-factor': '0.05',
109
- '--translate-factor': position?.startsWith('top') ? '1px' : '-1px',
110
- '--gap': position?.startsWith('top') ? '16px' : '-16px',
110
+ '--translate-factor': props.position?.startsWith('top') ? '1px' : '-1px',
111
+ '--gap': props.position?.startsWith('top') ? '16px' : '-16px',
111
112
  '--front-height': `${frontHeight}px`,
112
113
  '--height': `${height}px`
113
114
  }"
@@ -40,8 +40,8 @@ declare const _default: typeof __VLS_export;
40
40
  export default _default;
41
41
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ToasterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
42
42
  progress: boolean;
43
- max: number;
44
43
  expand: boolean;
44
+ max: number;
45
45
  duration: number;
46
46
  portal: boolean | string | HTMLElement;
47
47
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToasterSlots>;
@@ -5,15 +5,16 @@ import theme from "#build/ui/tooltip";
5
5
  <script setup>
6
6
  import { computed, toRef } from "vue";
7
7
  import { defu } from "defu";
8
- import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, useForwardPropsEmits, injectTooltipProviderContext } from "reka-ui";
8
+ import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, injectTooltipProviderContext } from "reka-ui";
9
9
  import { reactivePick } from "@vueuse/core";
10
10
  import { useAppConfig } from "#imports";
11
- import { useComponentUI } from "../composables/useComponentUI";
11
+ import { useComponentProps } from "../composables/useComponentProps";
12
+ import { useForwardProps } from "../composables/useForwardProps";
12
13
  import { FieldGroupReset } from "../composables/useFieldGroup";
13
14
  import { usePortal } from "../composables/usePortal";
14
15
  import { tv } from "../utils/tv";
15
16
  import UKbd from "./Kbd.vue";
16
- const props = defineProps({
17
+ const _props = defineProps({
17
18
  text: { type: String, required: false },
18
19
  kbds: { type: Array, required: false },
19
20
  content: { type: Object, required: false },
@@ -32,10 +33,10 @@ const props = defineProps({
32
33
  });
33
34
  const emits = defineEmits(["update:open"]);
34
35
  const slots = defineSlots();
36
+ const props = useComponentProps("tooltip", _props);
35
37
  const appConfig = useAppConfig();
36
- const uiProp = useComponentUI("tooltip", props);
37
38
  const providerContext = injectTooltipProviderContext();
38
- const rootProps = useForwardPropsEmits(reactivePick(props, "defaultOpen", "open", "delayDuration", "disableHoverableContent", "disableClosingTrigger", "ignoreNonKeyboardFocus"), emits);
39
+ const rootProps = useForwardProps(reactivePick(props, "defaultOpen", "open", "delayDuration", "disableHoverableContent", "disableClosingTrigger", "ignoreNonKeyboardFocus"), emits);
39
40
  const portalProps = usePortal(toRef(() => props.portal));
40
41
  const contentProps = toRef(() => defu(props.content, providerContext.content.value, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
41
42
  const arrowProps = toRef(() => defu(props.arrow, { rounded: true }));
@@ -45,23 +46,23 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tooltip || {}
45
46
  </script>
46
47
 
47
48
  <template>
48
- <TooltipRoot v-slot="{ open }" v-bind="rootProps" :disabled="!(text || kbds?.length || !!slots.content) || props.disabled">
49
- <TooltipTrigger v-if="!!slots.default || !!reference" v-bind="$attrs" as-child :reference="reference" :class="props.class">
49
+ <TooltipRoot v-slot="{ open }" v-bind="rootProps" :disabled="!(props.text || props.kbds?.length || !!slots.content) || props.disabled">
50
+ <TooltipTrigger v-if="!!slots.default || !!props.reference" v-bind="$attrs" as-child :reference="props.reference" :class="props.class">
50
51
  <slot :open="open" />
51
52
  </TooltipTrigger>
52
53
 
53
54
  <TooltipPortal v-bind="portalProps">
54
55
  <FieldGroupReset>
55
- <TooltipContent v-bind="contentProps" data-slot="content" :class="ui.content({ class: [!slots.default && props.class, uiProp?.content] })">
56
+ <TooltipContent v-bind="contentProps" data-slot="content" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })">
56
57
  <slot name="content" :ui="ui">
57
- <span v-if="text" data-slot="text" :class="ui.text({ class: uiProp?.text })">{{ text }}</span>
58
+ <span v-if="props.text" data-slot="text" :class="ui.text({ class: props.ui?.text })">{{ props.text }}</span>
58
59
 
59
- <span v-if="kbds?.length" data-slot="kbds" :class="ui.kbds({ class: uiProp?.kbds })">
60
- <UKbd v-for="(kbd, index) in kbds" :key="index" :size="uiProp?.kbdsSize || ui.kbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
60
+ <span v-if="props.kbds?.length" data-slot="kbds" :class="ui.kbds({ class: props.ui?.kbds })">
61
+ <UKbd v-for="(kbd, index) in props.kbds" :key="index" :size="props.ui?.kbdsSize || ui.kbdsSize()" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
61
62
  </span>
62
63
  </slot>
63
64
 
64
- <TooltipArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: uiProp?.arrow })" />
65
+ <TooltipArrow v-if="!!props.arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: props.ui?.arrow })" />
65
66
  </TooltipContent>
66
67
  </FieldGroupReset>
67
68
  </TooltipPortal>
@@ -4,17 +4,18 @@ import theme from "#build/ui/tree";
4
4
 
5
5
  <script setup>
6
6
  import { computed, toRef, useTemplateRef } from "vue";
7
- import { TreeRoot, TreeItem, TreeVirtualizer, useForwardPropsEmits } from "reka-ui";
7
+ import { TreeRoot, TreeItem, TreeVirtualizer } from "reka-ui";
8
+ import { useForwardProps } from "../composables/useForwardProps";
8
9
  import { reactivePick, createReusableTemplate } from "@vueuse/core";
9
10
  import { defu } from "defu";
10
11
  import { useAppConfig } from "#imports";
11
- import { useComponentUI } from "../composables/useComponentUI";
12
+ import { useComponentProps } from "../composables/useComponentProps";
12
13
  import { get } from "../utils";
13
14
  import { getEstimateSize } from "../utils/virtualizer";
14
15
  import { tv } from "../utils/tv";
15
16
  import UIcon from "./Icon.vue";
16
17
  defineOptions({ inheritAttrs: false });
17
- const props = defineProps({
18
+ const _props = defineProps({
18
19
  as: { type: null, required: false },
19
20
  color: { type: null, required: false },
20
21
  size: { type: null, required: false },
@@ -42,9 +43,9 @@ const props = defineProps({
42
43
  });
43
44
  const emits = defineEmits(["update:modelValue", "update:expanded"]);
44
45
  const slots = defineSlots();
46
+ const props = useComponentProps("tree", _props);
45
47
  const appConfig = useAppConfig();
46
- const uiProp = useComponentUI("tree", props);
47
- const rootProps = useForwardPropsEmits(reactivePick(props, "items", "multiple", "expanded", "disabled", "propagateSelect", "bubbleSelect"), emits);
48
+ const rootProps = useForwardProps(reactivePick(props, "items", "multiple", "expanded", "disabled", "propagateSelect", "bubbleSelect"), emits);
48
49
  const as = computed(() => {
49
50
  if (typeof props.as === "string" || typeof props.as?.render === "function") {
50
51
  return { root: props.as, link: "button" };
@@ -120,7 +121,7 @@ defineExpose({
120
121
  <DefineItemTemplate v-slot="{ item, index, level }">
121
122
  <li
122
123
  role="presentation"
123
- :class="!!nested && level > 1 ? ui.itemWithChildren({ class: [uiProp?.itemWithChildren, item.ui?.itemWithChildren] }) : ui.item({ class: [uiProp?.item, item.ui?.item] })"
124
+ :class="!!nested && level > 1 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, item.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, item.ui?.item] })"
124
125
  >
125
126
  <TreeItem
126
127
  v-slot="{ isExpanded, isSelected, isIndeterminate, handleSelect, handleToggle }"
@@ -138,9 +139,9 @@ defineExpose({
138
139
  <component
139
140
  :is="as.link"
140
141
  :type="as.link === 'button' ? 'button' : void 0"
141
- :disabled="item.disabled || disabled"
142
+ :disabled="item.disabled || props.disabled"
142
143
  data-slot="link"
143
- :class="ui.link({ class: [uiProp?.link, item.ui?.link, item.class], selected: isSelected, disabled: item.disabled || disabled })"
144
+ :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], selected: isSelected, disabled: item.disabled || props.disabled })"
144
145
  :style="!nested && level > 1 ? { paddingLeft: flattenedPaddingFormula(level) } : void 0"
145
146
  >
146
147
  <slot
@@ -157,20 +158,20 @@ defineExpose({
157
158
  v-if="item.icon"
158
159
  :name="item.icon"
159
160
  data-slot="linkLeadingIcon"
160
- :class="ui.linkLeadingIcon({ class: [uiProp?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
161
+ :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
161
162
  />
162
163
  <UIcon
163
164
  v-else-if="item.children?.length"
164
- :name="isExpanded ? expandedIcon ?? appConfig.ui.icons.folderOpen : collapsedIcon ?? appConfig.ui.icons.folder"
165
+ :name="isExpanded ? props.expandedIcon ?? appConfig.ui.icons.folderOpen : props.collapsedIcon ?? appConfig.ui.icons.folder"
165
166
  data-slot="linkLeadingIcon"
166
- :class="ui.linkLeadingIcon({ class: [uiProp?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
167
+ :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
167
168
  />
168
169
  </slot>
169
170
 
170
171
  <span
171
172
  v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']"
172
173
  data-slot="linkLabel"
173
- :class="ui.linkLabel({ class: [uiProp?.linkLabel, item.ui?.linkLabel] })"
174
+ :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })"
174
175
  >
175
176
  <slot
176
177
  :name="item.slot ? `${item.slot}-label` : 'item-label'"
@@ -184,7 +185,7 @@ defineExpose({
184
185
  <span
185
186
  v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']"
186
187
  data-slot="linkTrailing"
187
- :class="ui.linkTrailing({ class: [uiProp?.linkTrailing, item.ui?.linkTrailing] })"
188
+ :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })"
188
189
  >
189
190
  <slot
190
191
  :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'"
@@ -195,13 +196,13 @@ defineExpose({
195
196
  v-if="item.trailingIcon"
196
197
  :name="item.trailingIcon"
197
198
  data-slot="linkTrailingIcon"
198
- :class="ui.linkTrailingIcon({ class: [uiProp?.linkTrailingIcon, item.ui?.linkTrailingIcon] })"
199
+ :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })"
199
200
  />
200
201
  <UIcon
201
202
  v-else-if="item.children?.length"
202
- :name="trailingIcon ?? appConfig.ui.icons.chevronDown"
203
+ :name="props.trailingIcon ?? appConfig.ui.icons.chevronDown"
203
204
  data-slot="linkTrailingIcon"
204
- :class="ui.linkTrailingIcon({ class: [uiProp?.linkTrailingIcon, item.ui?.linkTrailingIcon] })"
205
+ :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })"
205
206
  />
206
207
  </slot>
207
208
  </span>
@@ -213,7 +214,7 @@ defineExpose({
213
214
  v-if="nested && item.children?.length && isExpanded"
214
215
  role="group"
215
216
  data-slot="listWithChildren"
216
- :class="ui.listWithChildren({ class: [uiProp?.listWithChildren, item.ui?.listWithChildren] })"
217
+ :class="ui.listWithChildren({ class: [props.ui?.listWithChildren, item.ui?.listWithChildren] })"
217
218
  >
218
219
  <ReuseTreeTemplate :items="item.children" :level="level + 1" />
219
220
  </ul>
@@ -230,16 +231,16 @@ defineExpose({
230
231
  v-slot="{ flattenItems }"
231
232
  v-bind="{ ...rootProps, ...$attrs }"
232
233
  :as="as.root"
233
- :model-value="modelValue"
234
- :default-value="defaultValue"
234
+ :model-value="props.modelValue"
235
+ :default-value="props.defaultValue"
235
236
  data-slot="root"
236
- :class="ui.root({ class: [uiProp?.root, props.class] })"
237
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
237
238
  :get-key="getItemKey"
238
239
  :default-expanded="defaultExpanded"
239
- :selection-behavior="selectionBehavior"
240
+ :selection-behavior="props.selectionBehavior"
240
241
  >
241
242
  <TreeVirtualizer
242
- v-if="!!virtualize"
243
+ v-if="!!props.virtualize"
243
244
  v-slot="{ item, virtualItem }"
244
245
  :text-content="(item2) => getItemLabel(item2.value)"
245
246
  v-bind="virtualizerProps"
@@ -257,6 +258,6 @@ defineExpose({
257
258
  />
258
259
  </template>
259
260
 
260
- <ReuseTreeTemplate v-else :items="items" :level="1" />
261
+ <ReuseTreeTemplate v-else :items="props.items" :level="1" />
261
262
  </TreeRoot>
262
263
  </template>
@@ -6,13 +6,14 @@ import theme from "#build/ui/user";
6
6
  import { computed } from "vue";
7
7
  import { Primitive } from "reka-ui";
8
8
  import { useAppConfig } from "#imports";
9
- import { useComponentUI } from "../composables/useComponentUI";
9
+ import { useComponentProps } from "../composables/useComponentProps";
10
+ import { usePrefix } from "../composables/usePrefix";
10
11
  import { tv } from "../utils/tv";
11
12
  import UChip from "./Chip.vue";
12
13
  import UAvatar from "./Avatar.vue";
13
14
  import ULink from "./Link.vue";
14
15
  defineOptions({ inheritAttrs: false });
15
- const props = defineProps({
16
+ const _props = defineProps({
16
17
  as: { type: null, required: false },
17
18
  name: { type: String, required: false },
18
19
  description: { type: String, required: false },
@@ -27,8 +28,9 @@ const props = defineProps({
27
28
  ui: { type: Object, required: false }
28
29
  });
29
30
  const slots = defineSlots();
31
+ const props = useComponentProps("user", _props);
30
32
  const appConfig = useAppConfig();
31
- const uiProp = useComponentUI("user", props);
33
+ const prefix = usePrefix();
32
34
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.user || {} })({
33
35
  size: props.size,
34
36
  orientation: props.orientation,
@@ -37,41 +39,41 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.user || {} })
37
39
  </script>
38
40
 
39
41
  <template>
40
- <Primitive :as="as" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })" @click="onClick">
42
+ <Primitive :as="props.as" :data-orientation="props.orientation" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="props.onClick">
41
43
  <slot name="avatar" :ui="ui">
42
- <UChip v-if="chip && avatar" inset v-bind="typeof chip === 'object' ? chip : {}" :size="size">
43
- <UAvatar :alt="name" v-bind="avatar" :size="size" data-slot="avatar" :class="ui.avatar({ class: uiProp?.avatar })" />
44
+ <UChip v-if="props.chip && props.avatar" inset v-bind="typeof props.chip === 'object' ? props.chip : {}" :size="props.size">
45
+ <UAvatar :alt="props.name" v-bind="props.avatar" :size="props.size" data-slot="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
44
46
  </UChip>
45
47
  <UAvatar
46
- v-else-if="avatar"
47
- :alt="name"
48
- v-bind="avatar"
49
- :size="size"
48
+ v-else-if="props.avatar"
49
+ :alt="props.name"
50
+ v-bind="props.avatar"
51
+ :size="props.size"
50
52
  data-slot="avatar"
51
- :class="ui.avatar({ class: uiProp?.avatar })"
53
+ :class="ui.avatar({ class: props.ui?.avatar })"
52
54
  />
53
55
  </slot>
54
56
 
55
- <div data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
57
+ <div data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
56
58
  <ULink
57
- v-if="to"
58
- :aria-label="name"
59
- v-bind="{ to, target, ...$attrs }"
60
- class="focus:outline-none peer"
59
+ v-if="props.to"
60
+ :aria-label="props.name"
61
+ v-bind="{ to: props.to, target: props.target, ...$attrs }"
62
+ :class="prefix('focus:outline-none peer')"
61
63
  raw
62
64
  >
63
- <span class="absolute inset-0" aria-hidden="true" />
65
+ <span :class="prefix('absolute inset-0')" aria-hidden="true" />
64
66
  </ULink>
65
67
 
66
68
  <slot>
67
- <p v-if="name || !!slots.name" data-slot="name" :class="ui.name({ class: uiProp?.name })">
69
+ <p v-if="props.name || !!slots.name" data-slot="name" :class="ui.name({ class: props.ui?.name })">
68
70
  <slot name="name">
69
- {{ name }}
71
+ {{ props.name }}
70
72
  </slot>
71
73
  </p>
72
- <p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
74
+ <p v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
73
75
  <slot name="description">
74
- {{ description }}
76
+ {{ props.description }}
75
77
  </slot>
76
78
  </p>
77
79
  </slot>
@@ -5,6 +5,7 @@
5
5
  <script setup>
6
6
  import { useForwardProps } from "reka-ui";
7
7
  import { reactiveOmit } from "@vueuse/core";
8
+ import { usePrefix } from "../../composables/usePrefix";
8
9
  import UAvatar from "../Avatar.vue";
9
10
  defineOptions({ inheritAttrs: false });
10
11
  const props = defineProps({
@@ -15,15 +16,17 @@ const props = defineProps({
15
16
  icon: { type: null, required: false },
16
17
  text: { type: String, required: false },
17
18
  size: { type: null, required: false },
19
+ color: { type: null, required: false },
18
20
  chip: { type: [Boolean, Object], required: false },
19
21
  class: { type: null, required: false },
20
22
  style: { type: null, required: false },
21
23
  ui: { type: Object, required: false }
22
24
  });
23
25
  const avatarProps = useForwardProps(reactiveOmit(props, "light", "dark"));
26
+ const prefix = usePrefix();
24
27
  </script>
25
28
 
26
29
  <template>
27
- <UAvatar v-bind="{ ...avatarProps, ...$attrs }" :src="light" class="dark:hidden" />
28
- <UAvatar v-bind="{ ...avatarProps, ...$attrs }" :src="dark" class="hidden dark:block" />
30
+ <UAvatar v-bind="{ ...avatarProps, ...$attrs }" :src="light" :class="prefix('dark:hidden')" />
31
+ <UAvatar v-bind="{ ...avatarProps, ...$attrs }" :src="dark" :class="prefix('hidden dark:block')" />
29
32
  </template>
@@ -12,6 +12,6 @@ export interface ColorModeButtonProps extends Omit<ButtonProps, LinkPropsKeys |
12
12
  declare const _default: typeof __VLS_export;
13
13
  export default _default;
14
14
  declare const __VLS_export: import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
15
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
15
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
16
16
  variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -4,15 +4,16 @@
4
4
 
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
- import { useForwardProps } from "reka-ui";
8
7
  import { reactiveOmit } from "@vueuse/core";
9
8
  import { useColorMode, useAppConfig } from "#imports";
10
- import { useComponentUI } from "../../composables/useComponentUI";
9
+ import { useComponentProps } from "../../composables/useComponentProps";
10
+ import { useForwardProps } from "../../composables/useForwardProps";
11
11
  import { useLocale } from "../../composables/useLocale";
12
+ import { usePrefix } from "../../composables/usePrefix";
12
13
  import UButton from "../Button.vue";
13
14
  import UIcon from "../Icon.vue";
14
15
  defineOptions({ inheritAttrs: false });
15
- const props = defineProps({
16
+ const _props = defineProps({
16
17
  color: { type: null, required: false, default: "neutral" },
17
18
  variant: { type: null, required: false, default: "ghost" },
18
19
  label: { type: String, required: false },
@@ -39,10 +40,11 @@ const props = defineProps({
39
40
  exactActiveClass: { type: String, required: false },
40
41
  viewTransition: { type: Boolean, required: false }
41
42
  });
43
+ const props = useComponentProps("button", _props);
42
44
  const { t } = useLocale();
43
45
  const colorMode = useColorMode();
44
46
  const appConfig = useAppConfig();
45
- const uiProp = useComponentUI("button", props);
47
+ const prefix = usePrefix();
46
48
  const buttonProps = useForwardProps(reactiveOmit(props, "icon"));
47
49
  const isDark = computed({
48
50
  get() {
@@ -64,8 +66,8 @@ const isDark = computed({
64
66
  @click="isDark = !isDark"
65
67
  >
66
68
  <template #leading="{ ui }">
67
- <UIcon :class="ui.leadingIcon({ class: [uiProp?.leadingIcon, 'hidden dark:inline-block'] })" :name="appConfig.ui.icons.dark" />
68
- <UIcon :class="ui.leadingIcon({ class: [uiProp?.leadingIcon, 'dark:hidden'] })" :name="appConfig.ui.icons.light" />
69
+ <UIcon :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, prefix('hidden dark:inline-block')] })" :name="appConfig.ui.icons.dark" />
70
+ <UIcon :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, prefix('dark:hidden')] })" :name="appConfig.ui.icons.light" />
69
71
  </template>
70
72
  </UButton>
71
73
  </template>
@@ -12,6 +12,6 @@ export interface ColorModeButtonProps extends Omit<ButtonProps, LinkPropsKeys |
12
12
  declare const _default: typeof __VLS_export;
13
13
  export default _default;
14
14
  declare const __VLS_export: import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
15
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
15
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
16
16
  variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;