@nuxt/ui 4.7.1 → 4.8.0

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 (352) 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 +13 -11
  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 +8 -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 +5 -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/Input.vue +19 -19
  111. package/dist/runtime/components/InputDate.vue +21 -20
  112. package/dist/runtime/components/InputMenu.d.vue.ts +52 -51
  113. package/dist/runtime/components/InputMenu.vue +66 -63
  114. package/dist/runtime/components/InputMenu.vue.d.ts +52 -51
  115. package/dist/runtime/components/InputNumber.vue +25 -24
  116. package/dist/runtime/components/InputTags.vue +26 -25
  117. package/dist/runtime/components/InputTime.vue +21 -20
  118. package/dist/runtime/components/Kbd.vue +5 -5
  119. package/dist/runtime/components/Link.d.vue.ts +1 -1
  120. package/dist/runtime/components/Link.vue.d.ts +1 -1
  121. package/dist/runtime/components/Listbox.d.vue.ts +13 -9
  122. package/dist/runtime/components/Listbox.vue +34 -32
  123. package/dist/runtime/components/Listbox.vue.d.ts +13 -9
  124. package/dist/runtime/components/Main.vue +4 -4
  125. package/dist/runtime/components/Marquee.vue +5 -5
  126. package/dist/runtime/components/Modal.d.vue.ts +2 -2
  127. package/dist/runtime/components/Modal.vue +25 -24
  128. package/dist/runtime/components/Modal.vue.d.ts +2 -2
  129. package/dist/runtime/components/NavigationMenu.vue +66 -65
  130. package/dist/runtime/components/Page.vue +7 -7
  131. package/dist/runtime/components/PageAnchors.vue +11 -11
  132. package/dist/runtime/components/PageAside.vue +9 -9
  133. package/dist/runtime/components/PageBody.vue +4 -4
  134. package/dist/runtime/components/PageCTA.vue +18 -16
  135. package/dist/runtime/components/PageCard.vue +25 -23
  136. package/dist/runtime/components/PageColumns.vue +4 -4
  137. package/dist/runtime/components/PageFeature.vue +17 -15
  138. package/dist/runtime/components/PageGrid.vue +4 -4
  139. package/dist/runtime/components/PageHeader.vue +14 -14
  140. package/dist/runtime/components/PageHero.vue +20 -18
  141. package/dist/runtime/components/PageLinks.vue +12 -12
  142. package/dist/runtime/components/PageList.vue +4 -4
  143. package/dist/runtime/components/PageLogos.vue +16 -16
  144. package/dist/runtime/components/PageSection.d.vue.ts +1 -1
  145. package/dist/runtime/components/PageSection.vue +24 -22
  146. package/dist/runtime/components/PageSection.vue.d.ts +1 -1
  147. package/dist/runtime/components/Pagination.d.vue.ts +2 -2
  148. package/dist/runtime/components/Pagination.vue +23 -22
  149. package/dist/runtime/components/Pagination.vue.d.ts +2 -2
  150. package/dist/runtime/components/PinInput.vue +15 -14
  151. package/dist/runtime/components/Popover.vue +9 -8
  152. package/dist/runtime/components/PricingPlan.vue +36 -36
  153. package/dist/runtime/components/PricingPlans.vue +6 -6
  154. package/dist/runtime/components/PricingTable.vue +44 -44
  155. package/dist/runtime/components/Progress.d.vue.ts +1 -1
  156. package/dist/runtime/components/Progress.vue +12 -11
  157. package/dist/runtime/components/Progress.vue.d.ts +1 -1
  158. package/dist/runtime/components/RadioGroup.d.vue.ts +2 -0
  159. package/dist/runtime/components/RadioGroup.vue +28 -27
  160. package/dist/runtime/components/RadioGroup.vue.d.ts +2 -0
  161. package/dist/runtime/components/ScrollArea.vue +13 -13
  162. package/dist/runtime/components/Select.vue +38 -40
  163. package/dist/runtime/components/SelectMenu.d.vue.ts +46 -46
  164. package/dist/runtime/components/SelectMenu.vue +49 -48
  165. package/dist/runtime/components/SelectMenu.vue.d.ts +46 -46
  166. package/dist/runtime/components/Separator.d.vue.ts +9 -3
  167. package/dist/runtime/components/Separator.vue +29 -16
  168. package/dist/runtime/components/Separator.vue.d.ts +9 -3
  169. package/dist/runtime/components/Sidebar.vue +28 -28
  170. package/dist/runtime/components/Skeleton.vue +5 -5
  171. package/dist/runtime/components/Slideover.d.vue.ts +3 -3
  172. package/dist/runtime/components/Slideover.vue +24 -23
  173. package/dist/runtime/components/Slideover.vue.d.ts +3 -3
  174. package/dist/runtime/components/Slider.vue +16 -15
  175. package/dist/runtime/components/Stepper.vue +19 -18
  176. package/dist/runtime/components/Switch.d.vue.ts +2 -0
  177. package/dist/runtime/components/Switch.vue +26 -23
  178. package/dist/runtime/components/Switch.vue.d.ts +2 -0
  179. package/dist/runtime/components/Table.vue +26 -25
  180. package/dist/runtime/components/Tabs.vue +22 -21
  181. package/dist/runtime/components/Textarea.vue +19 -18
  182. package/dist/runtime/components/Theme.d.vue.ts +13 -5
  183. package/dist/runtime/components/Theme.vue +32 -4
  184. package/dist/runtime/components/Theme.vue.d.ts +13 -5
  185. package/dist/runtime/components/Timeline.vue +15 -15
  186. package/dist/runtime/components/Toast.vue +35 -34
  187. package/dist/runtime/components/Toaster.d.vue.ts +1 -1
  188. package/dist/runtime/components/Toaster.vue +10 -9
  189. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  190. package/dist/runtime/components/Tooltip.vue +13 -12
  191. package/dist/runtime/components/Tree.vue +24 -23
  192. package/dist/runtime/components/User.vue +23 -21
  193. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +5 -2
  194. package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +1 -1
  195. package/dist/runtime/components/color-mode/ColorModeButton.vue +8 -6
  196. package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +1 -1
  197. package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -2
  198. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -0
  199. package/dist/runtime/components/content/ContentNavigation.vue +31 -30
  200. package/dist/runtime/components/content/ContentSearch.d.vue.ts +30 -3
  201. package/dist/runtime/components/content/ContentSearch.vue +66 -32
  202. package/dist/runtime/components/content/ContentSearch.vue.d.ts +30 -3
  203. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -2
  204. package/dist/runtime/components/content/ContentSearchButton.vue +15 -15
  205. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -2
  206. package/dist/runtime/components/content/ContentSurround.vue +14 -12
  207. package/dist/runtime/components/content/ContentToc.vue +34 -33
  208. package/dist/runtime/components/prose/A.vue +4 -4
  209. package/dist/runtime/components/prose/Accordion.vue +4 -4
  210. package/dist/runtime/components/prose/AccordionItem.vue +5 -5
  211. package/dist/runtime/components/prose/Badge.vue +4 -4
  212. package/dist/runtime/components/prose/Blockquote.vue +4 -4
  213. package/dist/runtime/components/prose/Callout.vue +8 -8
  214. package/dist/runtime/components/prose/Card.vue +12 -12
  215. package/dist/runtime/components/prose/CardGroup.vue +4 -4
  216. package/dist/runtime/components/prose/Code.vue +4 -4
  217. package/dist/runtime/components/prose/CodeCollapse.vue +8 -8
  218. package/dist/runtime/components/prose/CodeGroup.vue +9 -9
  219. package/dist/runtime/components/prose/CodePreview.vue +6 -6
  220. package/dist/runtime/components/prose/CodeTree.vue +14 -14
  221. package/dist/runtime/components/prose/Collapsible.vue +7 -7
  222. package/dist/runtime/components/prose/Em.vue +4 -4
  223. package/dist/runtime/components/prose/Field.vue +13 -13
  224. package/dist/runtime/components/prose/FieldGroup.vue +4 -4
  225. package/dist/runtime/components/prose/H1.vue +5 -5
  226. package/dist/runtime/components/prose/H2.vue +7 -7
  227. package/dist/runtime/components/prose/H3.vue +7 -7
  228. package/dist/runtime/components/prose/H4.vue +5 -5
  229. package/dist/runtime/components/prose/Hr.vue +4 -4
  230. package/dist/runtime/components/prose/Icon.vue +4 -4
  231. package/dist/runtime/components/prose/Img.vue +12 -12
  232. package/dist/runtime/components/prose/Kbd.d.vue.ts +10 -2
  233. package/dist/runtime/components/prose/Kbd.vue +8 -5
  234. package/dist/runtime/components/prose/Kbd.vue.d.ts +10 -2
  235. package/dist/runtime/components/prose/Li.vue +4 -4
  236. package/dist/runtime/components/prose/Ol.vue +4 -4
  237. package/dist/runtime/components/prose/P.vue +4 -4
  238. package/dist/runtime/components/prose/Pre.vue +9 -9
  239. package/dist/runtime/components/prose/Prompt.vue +12 -12
  240. package/dist/runtime/components/prose/Steps.vue +4 -4
  241. package/dist/runtime/components/prose/Strong.vue +4 -4
  242. package/dist/runtime/components/prose/Table.vue +5 -5
  243. package/dist/runtime/components/prose/Tabs.vue +4 -4
  244. package/dist/runtime/components/prose/TabsItem.vue +5 -5
  245. package/dist/runtime/components/prose/Tbody.vue +4 -4
  246. package/dist/runtime/components/prose/Td.vue +4 -4
  247. package/dist/runtime/components/prose/Th.vue +4 -4
  248. package/dist/runtime/components/prose/Thead.vue +4 -4
  249. package/dist/runtime/components/prose/Tr.vue +4 -4
  250. package/dist/runtime/components/prose/Ul.vue +4 -4
  251. package/dist/runtime/composables/defineShortcuts.js +7 -2
  252. package/dist/runtime/composables/index.d.ts +1 -2
  253. package/dist/runtime/composables/index.js +1 -2
  254. package/dist/runtime/composables/useAvatarGroup.d.ts +12 -1
  255. package/dist/runtime/composables/useAvatarGroup.js +4 -2
  256. package/dist/runtime/composables/useComponentIcons.js +1 -1
  257. package/dist/runtime/composables/useComponentProps.d.ts +180 -0
  258. package/dist/runtime/composables/useComponentProps.js +59 -0
  259. package/dist/runtime/composables/useContentSearch.d.ts +4 -2
  260. package/dist/runtime/composables/useContentSearch.js +64 -7
  261. package/dist/runtime/composables/useFieldGroup.d.ts +9 -1
  262. package/dist/runtime/composables/useFormField.d.ts +21 -1
  263. package/dist/runtime/composables/useForwardProps.d.ts +13 -0
  264. package/dist/runtime/composables/useForwardProps.js +14 -0
  265. package/dist/runtime/composables/usePrefix.d.ts +6 -0
  266. package/dist/runtime/composables/usePrefix.js +11 -0
  267. package/dist/runtime/composables/useResizable.d.ts +4 -0
  268. package/dist/runtime/composables/useResizable.js +1 -1
  269. package/dist/runtime/locale/ar.js +1 -0
  270. package/dist/runtime/locale/az.js +1 -0
  271. package/dist/runtime/locale/be.js +1 -0
  272. package/dist/runtime/locale/bg.js +1 -0
  273. package/dist/runtime/locale/bn.js +1 -0
  274. package/dist/runtime/locale/ca.js +1 -0
  275. package/dist/runtime/locale/ckb.js +1 -0
  276. package/dist/runtime/locale/cs.js +1 -0
  277. package/dist/runtime/locale/da.js +1 -0
  278. package/dist/runtime/locale/de.js +1 -0
  279. package/dist/runtime/locale/de_ch.js +1 -0
  280. package/dist/runtime/locale/el.js +1 -0
  281. package/dist/runtime/locale/en.js +1 -0
  282. package/dist/runtime/locale/es.js +1 -0
  283. package/dist/runtime/locale/et.js +1 -0
  284. package/dist/runtime/locale/eu.js +1 -0
  285. package/dist/runtime/locale/fa_ir.js +1 -0
  286. package/dist/runtime/locale/fi.js +1 -0
  287. package/dist/runtime/locale/fr.js +1 -0
  288. package/dist/runtime/locale/gl.js +1 -0
  289. package/dist/runtime/locale/he.js +1 -0
  290. package/dist/runtime/locale/hi.js +1 -0
  291. package/dist/runtime/locale/hr.js +1 -0
  292. package/dist/runtime/locale/hu.js +1 -0
  293. package/dist/runtime/locale/hy.js +1 -0
  294. package/dist/runtime/locale/id.js +1 -0
  295. package/dist/runtime/locale/is.js +1 -0
  296. package/dist/runtime/locale/it.js +1 -0
  297. package/dist/runtime/locale/ja.js +1 -0
  298. package/dist/runtime/locale/ka.js +1 -0
  299. package/dist/runtime/locale/kk.js +1 -0
  300. package/dist/runtime/locale/km.js +1 -0
  301. package/dist/runtime/locale/ko.js +1 -0
  302. package/dist/runtime/locale/ky.js +1 -0
  303. package/dist/runtime/locale/lb.js +1 -0
  304. package/dist/runtime/locale/lo.js +1 -0
  305. package/dist/runtime/locale/lt.js +1 -0
  306. package/dist/runtime/locale/mn.js +1 -0
  307. package/dist/runtime/locale/ms.js +1 -0
  308. package/dist/runtime/locale/nb_no.js +1 -0
  309. package/dist/runtime/locale/nl.js +1 -0
  310. package/dist/runtime/locale/pl.js +1 -0
  311. package/dist/runtime/locale/pt.js +1 -0
  312. package/dist/runtime/locale/pt_br.js +1 -0
  313. package/dist/runtime/locale/ro.js +1 -0
  314. package/dist/runtime/locale/ru.js +1 -0
  315. package/dist/runtime/locale/sk.js +1 -0
  316. package/dist/runtime/locale/sl.js +1 -0
  317. package/dist/runtime/locale/sq.js +1 -0
  318. package/dist/runtime/locale/sv.js +1 -0
  319. package/dist/runtime/locale/th.js +1 -0
  320. package/dist/runtime/locale/tj.js +1 -0
  321. package/dist/runtime/locale/tr.js +1 -0
  322. package/dist/runtime/locale/ug_cn.js +1 -0
  323. package/dist/runtime/locale/uk.js +1 -0
  324. package/dist/runtime/locale/ur.js +1 -0
  325. package/dist/runtime/locale/uz.js +1 -0
  326. package/dist/runtime/locale/vi.js +1 -0
  327. package/dist/runtime/locale/zh_cn.js +1 -0
  328. package/dist/runtime/locale/zh_tw.js +1 -0
  329. package/dist/runtime/plugins/colors.js +1 -1
  330. package/dist/runtime/types/content.d.ts +1 -0
  331. package/dist/runtime/types/content.js +1 -0
  332. package/dist/runtime/types/form.d.ts +2 -2
  333. package/dist/runtime/types/locale.d.ts +1 -0
  334. package/dist/runtime/utils/dashboard.d.ts +1 -1
  335. package/dist/runtime/utils/{fuse.d.ts → search.d.ts} +2 -1
  336. package/dist/runtime/utils/{fuse.js → search.js} +11 -2
  337. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -0
  338. package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +1 -1
  339. package/dist/runtime/vue/overrides/inertia/Link.vue +5 -0
  340. package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +1 -1
  341. package/dist/runtime/vue/overrides/none/Link.d.vue.ts +1 -1
  342. package/dist/runtime/vue/overrides/none/Link.vue.d.ts +1 -1
  343. package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +1 -1
  344. package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +1 -1
  345. package/dist/shared/{ui.C6mn7iap.mjs → ui.CoJ8bnb0.mjs} +238 -77
  346. package/dist/unplugin.mjs +1 -1
  347. package/dist/vite.mjs +1 -1
  348. package/package.json +27 -34
  349. package/dist/runtime/composables/useComponentUI.d.ts +0 -33
  350. package/dist/runtime/composables/useComponentUI.js +0 -13
  351. package/dist/runtime/composables/useResolvedVariants.d.ts +0 -21
  352. package/dist/runtime/composables/useResolvedVariants.js +0 -14
@@ -8,24 +8,26 @@ import { Primitive, Slot } from "reka-ui";
8
8
  import { defu } from "defu";
9
9
  import { useAppConfig } from "#imports";
10
10
  import ImageComponent from "#build/ui-image-component";
11
- import { useComponentUI } from "../composables/useComponentUI";
11
+ import { useComponentProps } from "../composables/useComponentProps";
12
12
  import { useAvatarGroup } from "../composables/useAvatarGroup";
13
13
  import { tv } from "../utils/tv";
14
14
  import UIcon from "./Icon.vue";
15
15
  import UChip from "./Chip.vue";
16
16
  defineOptions({ inheritAttrs: false });
17
- const props = defineProps({
17
+ const _props = defineProps({
18
18
  as: { type: null, required: false },
19
19
  src: { type: String, required: false },
20
20
  alt: { type: String, required: false },
21
21
  icon: { type: null, required: false },
22
22
  text: { type: String, required: false },
23
23
  size: { type: null, required: false },
24
+ color: { type: null, required: false },
24
25
  chip: { type: [Boolean, Object], required: false },
25
26
  class: { type: null, required: false },
26
27
  style: { type: null, required: false },
27
28
  ui: { type: Object, required: false }
28
29
  });
30
+ const props = useComponentProps("avatar", _props);
29
31
  const as = computed(() => {
30
32
  if (typeof props.as === "string" || typeof props.as?.render === "function") {
31
33
  return { root: props.as };
@@ -34,12 +36,12 @@ const as = computed(() => {
34
36
  });
35
37
  const fallback = computed(() => props.text || (props.alt || "").split(" ").map((word) => word.charAt(0)).join("").substring(0, 2));
36
38
  const appConfig = useAppConfig();
37
- const uiProp = useComponentUI("avatar", props);
38
- const { size } = useAvatarGroup(props);
39
+ const { size, color } = useAvatarGroup(_props);
39
40
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.avatar || {} })({
40
- size: size.value
41
+ size: size.value ?? props.size,
42
+ color: color.value ?? props.color
41
43
  }));
42
- const rootClass = computed(() => ui.value.root({ class: [uiProp.value?.root, props.class] }));
44
+ const rootClass = computed(() => ui.value.root({ class: [props.ui?.root, props.class] }));
43
45
  const sizePx = computed(() => {
44
46
  const sizeClass = rootClass.value.split(" ").find((c) => /^size-\d+$/.test(c));
45
47
  if (sizeClass) {
@@ -70,21 +72,21 @@ function onError() {
70
72
  >
71
73
  <component
72
74
  :is="as.img || ImageComponent"
73
- v-if="src && !error"
74
- :src="src"
75
- :alt="alt"
75
+ v-if="props.src && !error"
76
+ :src="props.src"
77
+ :alt="props.alt"
76
78
  :width="sizePx"
77
79
  :height="sizePx"
78
80
  v-bind="$attrs"
79
81
  data-slot="image"
80
- :class="ui.image({ class: uiProp?.image })"
82
+ :class="ui.image({ class: props.ui?.image })"
81
83
  @error="onError"
82
84
  />
83
85
 
84
86
  <Slot v-else v-bind="$attrs">
85
87
  <slot>
86
- <UIcon v-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon })" />
87
- <span v-else data-slot="fallback" :class="ui.fallback({ class: uiProp?.fallback })">{{ fallback || "\xA0" }}</span>
88
+ <UIcon v-if="props.icon" :name="props.icon" data-slot="icon" :class="ui.icon({ class: props.ui?.icon })" />
89
+ <span v-else data-slot="fallback" :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || "\xA0" }}</span>
88
90
  </slot>
89
91
  </Slot>
90
92
  </component>
@@ -25,6 +25,10 @@ export interface AvatarProps extends /** @vue-ignore */ Omit<ImgHTMLAttributes,
25
25
  * @defaultValue 'md'
26
26
  */
27
27
  size?: Avatar['variants']['size'];
28
+ /**
29
+ * @defaultValue 'neutral'
30
+ */
31
+ color?: Avatar['variants']['color'];
28
32
  chip?: boolean | ChipProps;
29
33
  class?: any;
30
34
  style?: any;
@@ -13,6 +13,10 @@ export interface AvatarGroupProps {
13
13
  * @defaultValue 'md'
14
14
  */
15
15
  size?: AvatarGroup['variants']['size'];
16
+ /**
17
+ * @defaultValue 'neutral'
18
+ */
19
+ color?: AvatarGroup['variants']['color'];
16
20
  /**
17
21
  * The maximum number of avatars to display.
18
22
  */
@@ -6,22 +6,24 @@ import theme from "#build/ui/avatar-group";
6
6
  import { computed, provide } 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
10
  import { avatarGroupInjectionKey } from "../composables/useAvatarGroup";
11
11
  import { tv } from "../utils/tv";
12
12
  import UAvatar from "./Avatar.vue";
13
- const props = defineProps({
13
+ const _props = defineProps({
14
14
  as: { type: null, required: false },
15
15
  size: { type: null, required: false },
16
+ color: { type: null, required: false },
16
17
  max: { type: [Number, String], required: false },
17
18
  class: { type: null, required: false },
18
19
  ui: { type: Object, required: false }
19
20
  });
20
21
  const slots = defineSlots();
22
+ const props = useComponentProps("avatarGroup", _props);
21
23
  const appConfig = useAppConfig();
22
- const uiProp = useComponentUI("avatarGroup", props);
23
24
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.avatarGroup || {} })({
24
- size: props.size
25
+ size: props.size,
26
+ color: props.color
25
27
  }));
26
28
  const max = computed(() => typeof props.max === "string" ? Number.parseInt(props.max, 10) : props.max);
27
29
  const children = computed(() => {
@@ -55,13 +57,14 @@ const hiddenCount = computed(() => {
55
57
  return children.value.length - visibleAvatars.value.length;
56
58
  });
57
59
  provide(avatarGroupInjectionKey, computed(() => ({
58
- size: props.size
60
+ size: props.size,
61
+ color: props.color
59
62
  })));
60
63
  </script>
61
64
 
62
65
  <template>
63
- <Primitive :as="as" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
64
- <UAvatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" data-slot="base" :class="ui.base({ class: uiProp?.base })" />
65
- <component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" data-slot="base" :class="ui.base({ class: uiProp?.base })" />
66
+ <Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
67
+ <UAvatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" data-slot="base" :class="ui.base({ class: props.ui?.base })" />
68
+ <component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" data-slot="base" :class="ui.base({ class: props.ui?.base })" />
66
69
  </Primitive>
67
70
  </template>
@@ -13,6 +13,10 @@ export interface AvatarGroupProps {
13
13
  * @defaultValue 'md'
14
14
  */
15
15
  size?: AvatarGroup['variants']['size'];
16
+ /**
17
+ * @defaultValue 'neutral'
18
+ */
19
+ color?: AvatarGroup['variants']['color'];
16
20
  /**
17
21
  * The maximum number of avatars to display.
18
22
  */
@@ -8,11 +8,11 @@ import { Primitive } from "reka-ui";
8
8
  import { useAppConfig } from "#imports";
9
9
  import { useFieldGroup } from "../composables/useFieldGroup";
10
10
  import { useComponentIcons } from "../composables/useComponentIcons";
11
- import { useComponentUI } from "../composables/useComponentUI";
11
+ import { useComponentProps } from "../composables/useComponentProps";
12
12
  import { tv } from "../utils/tv";
13
13
  import UIcon from "./Icon.vue";
14
14
  import UAvatar from "./Avatar.vue";
15
- const props = defineProps({
15
+ const _props = defineProps({
16
16
  as: { type: null, required: false, default: "span" },
17
17
  label: { type: [String, Number], required: false },
18
18
  color: { type: null, required: false },
@@ -29,34 +29,34 @@ const props = defineProps({
29
29
  trailingIcon: { type: null, required: false }
30
30
  });
31
31
  const slots = defineSlots();
32
+ const props = useComponentProps("badge", _props);
32
33
  const appConfig = useAppConfig();
33
- const uiProp = useComponentUI("badge", props);
34
- const { orientation, size: fieldGroupSize } = useFieldGroup(props);
34
+ const { orientation, size: fieldGroupSize } = useFieldGroup(_props);
35
35
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
36
36
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.badge || {} })({
37
37
  color: props.color,
38
38
  variant: props.variant,
39
- size: fieldGroupSize.value || props.size,
39
+ size: fieldGroupSize.value ?? props.size,
40
40
  square: props.square || !slots.default && !props.label,
41
41
  fieldGroup: orientation.value
42
42
  }));
43
43
  </script>
44
44
 
45
45
  <template>
46
- <Primitive :as="as" data-slot="base" :class="ui.base({ class: [uiProp?.base, props.class] })">
46
+ <Primitive :as="props.as" data-slot="base" :class="ui.base({ class: [props.ui?.base, props.class] })">
47
47
  <slot name="leading" :ui="ui">
48
- <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: uiProp?.leadingIcon })" />
49
- <UAvatar v-else-if="!!avatar" :size="uiProp?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: uiProp?.leadingAvatar })" />
48
+ <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
49
+ <UAvatar v-else-if="!!props.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="props.avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
50
50
  </slot>
51
51
 
52
52
  <slot :ui="ui">
53
- <span v-if="label !== void 0 && label !== null" data-slot="label" :class="ui.label({ class: uiProp?.label })">
54
- {{ label }}
53
+ <span v-if="props.label !== void 0 && props.label !== null" data-slot="label" :class="ui.label({ class: props.ui?.label })">
54
+ {{ props.label }}
55
55
  </span>
56
56
  </slot>
57
57
 
58
58
  <slot name="trailing" :ui="ui">
59
- <UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: uiProp?.trailingIcon })" />
59
+ <UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
60
60
  </slot>
61
61
  </Primitive>
62
62
  </template>
@@ -6,15 +6,16 @@ import theme from "#build/ui/banner";
6
6
  import { computed, ref, onMounted, useId } from "vue";
7
7
  import { Primitive } from "reka-ui";
8
8
  import { useHead, useAppConfig } from "#imports";
9
- import { useComponentUI } from "../composables/useComponentUI";
9
+ import { useComponentProps } from "../composables/useComponentProps";
10
10
  import { useLocale } from "../composables/useLocale";
11
+ import { usePrefix } from "../composables/usePrefix";
11
12
  import { tv } from "../utils/tv";
12
13
  import ULink from "./Link.vue";
13
14
  import UContainer from "./Container.vue";
14
15
  import UIcon from "./Icon.vue";
15
16
  import UButton from "./Button.vue";
16
17
  defineOptions({ inheritAttrs: false });
17
- const props = defineProps({
18
+ const _props = defineProps({
18
19
  as: { type: null, required: false },
19
20
  id: { type: String, required: false },
20
21
  icon: { type: null, required: false },
@@ -30,9 +31,10 @@ const props = defineProps({
30
31
  });
31
32
  const slots = defineSlots();
32
33
  const emits = defineEmits(["close"]);
34
+ const props = useComponentProps("banner", _props);
33
35
  const { t } = useLocale();
34
36
  const appConfig = useAppConfig();
35
- const uiProp = useComponentUI("banner", props);
37
+ const prefix = usePrefix();
36
38
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.banner || {} })({
37
39
  color: props.color,
38
40
  to: !!props.to
@@ -87,56 +89,56 @@ function onClose() {
87
89
  <template>
88
90
  <Primitive
89
91
  v-show="isVisible"
90
- :as="as"
92
+ :as="props.as"
91
93
  class="banner"
92
94
  :data-banner-id="id"
93
95
  data-slot="root"
94
- :class="ui.root({ class: [uiProp?.root, props.class] })"
96
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
95
97
  >
96
98
  <ULink
97
- v-if="to"
98
- :aria-label="title"
99
- v-bind="{ to, target, ...$attrs }"
100
- class="focus:outline-none"
99
+ v-if="props.to"
100
+ :aria-label="props.title"
101
+ v-bind="{ to: props.to, target: props.target, ...$attrs }"
102
+ :class="prefix('focus:outline-none')"
101
103
  tabindex="-1"
102
104
  raw
103
105
  >
104
- <span class="absolute inset-0" aria-hidden="true" />
106
+ <span :class="prefix('absolute inset-0')" aria-hidden="true" />
105
107
  </ULink>
106
108
 
107
- <UContainer data-slot="container" :class="ui.container({ class: uiProp?.container })">
108
- <div data-slot="left" :class="ui.left({ class: uiProp?.left })" />
109
+ <UContainer data-slot="container" :class="ui.container({ class: props.ui?.container })">
110
+ <div data-slot="left" :class="ui.left({ class: props.ui?.left })" />
109
111
 
110
- <div data-slot="center" :class="ui.center({ class: uiProp?.center })">
112
+ <div data-slot="center" :class="ui.center({ class: props.ui?.center })">
111
113
  <slot name="leading" :ui="ui">
112
- <UIcon v-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon })" />
114
+ <UIcon v-if="props.icon" :name="props.icon" data-slot="icon" :class="ui.icon({ class: props.ui?.icon })" />
113
115
  </slot>
114
116
 
115
- <div v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: uiProp?.title })">
117
+ <div v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
116
118
  <slot name="title">
117
- {{ title }}
119
+ {{ props.title }}
118
120
  </slot>
119
121
  </div>
120
122
 
121
- <div v-if="actions?.length || !!slots.actions" data-slot="actions" :class="ui.actions({ class: uiProp?.actions })">
123
+ <div v-if="props.actions?.length || !!slots.actions" data-slot="actions" :class="ui.actions({ class: props.ui?.actions })">
122
124
  <slot name="actions">
123
- <UButton v-for="(action, index) in actions" :key="index" color="neutral" size="xs" v-bind="action" />
125
+ <UButton v-for="(action, index) in props.actions" :key="index" color="neutral" size="xs" v-bind="action" />
124
126
  </slot>
125
127
  </div>
126
128
  </div>
127
129
 
128
- <div data-slot="right" :class="ui.right({ class: uiProp?.right })">
130
+ <div data-slot="right" :class="ui.right({ class: props.ui?.right })">
129
131
  <slot name="close" :ui="ui">
130
132
  <UButton
131
- v-if="close"
132
- :icon="closeIcon || appConfig.ui.icons.close"
133
+ v-if="props.close"
134
+ :icon="props.closeIcon || appConfig.ui.icons.close"
133
135
  size="md"
134
136
  color="neutral"
135
137
  variant="ghost"
136
138
  :aria-label="t('banner.close')"
137
- v-bind="typeof close === 'object' ? close : {}"
139
+ v-bind="typeof props.close === 'object' ? props.close : {}"
138
140
  data-slot="close"
139
- :class="ui.close({ class: uiProp?.close })"
141
+ :class="ui.close({ class: props.ui?.close })"
140
142
  @click="onClose"
141
143
  />
142
144
  </slot>
@@ -59,8 +59,8 @@ export interface BlogPostSlots {
59
59
  declare const _default: typeof __VLS_export;
60
60
  export default _default;
61
61
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<BlogPostProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlogPostProps> & Readonly<{}>, {
62
- orientation: BlogPost["variants"]["orientation"];
63
62
  as: any;
63
+ orientation: BlogPost["variants"]["orientation"];
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BlogPostSlots>;
65
65
  type __VLS_WithSlots<T, S> = T & {
66
66
  new (): {
@@ -7,7 +7,8 @@ import { computed } from "vue";
7
7
  import { Primitive, useDateFormatter } from "reka-ui";
8
8
  import { useAppConfig } from "#imports";
9
9
  import { useLocale } from "../composables/useLocale";
10
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ import { usePrefix } from "../composables/usePrefix";
11
12
  import ImageComponent from "#build/ui-image-component";
12
13
  import { getSlotChildrenText } from "../utils";
13
14
  import { tv } from "../utils/tv";
@@ -17,7 +18,7 @@ import UAvatar from "./Avatar.vue";
17
18
  import UAvatarGroup from "./AvatarGroup.vue";
18
19
  import UUser from "./User.vue";
19
20
  defineOptions({ inheritAttrs: false });
20
- const props = defineProps({
21
+ const _props = defineProps({
21
22
  as: { type: null, required: false, default: "article" },
22
23
  title: { type: String, required: false },
23
24
  description: { type: String, required: false },
@@ -34,10 +35,11 @@ const props = defineProps({
34
35
  ui: { type: Object, required: false }
35
36
  });
36
37
  const slots = defineSlots();
38
+ const props = useComponentProps("blogPost", _props);
37
39
  const { locale } = useLocale();
38
40
  const appConfig = useAppConfig();
39
- const uiProp = useComponentUI("blogPost", props);
40
41
  const formatter = useDateFormatter(locale.value.code);
42
+ const prefix = usePrefix();
41
43
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.blogPost || {} })({
42
44
  orientation: props.orientation,
43
45
  variant: props.variant,
@@ -71,85 +73,85 @@ const ariaLabel = computed(() => {
71
73
  </script>
72
74
 
73
75
  <template>
74
- <Primitive :as="as" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })" @click="onClick">
75
- <div v-if="image || !!slots.header" data-slot="header" :class="ui.header({ class: uiProp?.header })">
76
+ <Primitive :as="props.as" :data-orientation="props.orientation" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="props.onClick">
77
+ <div v-if="props.image || !!slots.header" data-slot="header" :class="ui.header({ class: props.ui?.header })">
76
78
  <slot name="header" :ui="ui">
77
79
  <component
78
80
  :is="ImageComponent"
79
- v-bind="typeof image === 'string' ? { src: image, alt: title } : { alt: title, ...image }"
81
+ v-bind="typeof props.image === 'string' ? { src: props.image, alt: props.title } : { alt: props.title, ...props.image }"
80
82
  data-slot="image"
81
- :class="ui.image({ class: uiProp?.image, to: !!to })"
83
+ :class="ui.image({ class: props.ui?.image, to: !!props.to })"
82
84
  />
83
85
  </slot>
84
86
  </div>
85
87
 
86
- <div data-slot="body" :class="ui.body({ class: uiProp?.body })">
88
+ <div data-slot="body" :class="ui.body({ class: props.ui?.body })">
87
89
  <ULink
88
- v-if="to"
90
+ v-if="props.to"
89
91
  :aria-label="ariaLabel"
90
- v-bind="{ to, target, ...$attrs }"
91
- class="focus:outline-none peer"
92
+ v-bind="{ to: props.to, target: props.target, ...$attrs }"
93
+ :class="prefix('focus:outline-none peer')"
92
94
  raw
93
95
  >
94
- <span class="absolute inset-0" aria-hidden="true" />
96
+ <span :class="prefix('absolute inset-0')" aria-hidden="true" />
95
97
  </ULink>
96
98
 
97
99
  <slot name="body">
98
- <div v-if="date || !!slots.date || (badge || !!slots.badge)" data-slot="meta" :class="ui.meta({ class: uiProp?.meta })">
100
+ <div v-if="date || !!slots.date || (props.badge || !!slots.badge)" data-slot="meta" :class="ui.meta({ class: props.ui?.meta })">
99
101
  <slot name="badge">
100
102
  <UBadge
101
- v-if="badge"
103
+ v-if="props.badge"
102
104
  color="neutral"
103
105
  variant="subtle"
104
- v-bind="typeof badge === 'string' ? { label: badge } : badge"
106
+ v-bind="typeof props.badge === 'string' ? { label: props.badge } : props.badge"
105
107
  data-slot="badge"
106
- :class="ui.badge({ class: uiProp?.badge })"
108
+ :class="ui.badge({ class: props.ui?.badge })"
107
109
  />
108
110
  </slot>
109
111
 
110
- <time v-if="date || !!slots.date" :datetime="datetime" data-slot="date" :class="ui.date({ class: uiProp?.date })">
112
+ <time v-if="date || !!slots.date" :datetime="datetime" data-slot="date" :class="ui.date({ class: props.ui?.date })">
111
113
  <slot name="date">
112
114
  {{ date }}
113
115
  </slot>
114
116
  </time>
115
117
  </div>
116
118
 
117
- <h2 v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: uiProp?.title })">
119
+ <h2 v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
118
120
  <slot name="title">
119
- {{ title }}
121
+ {{ props.title }}
120
122
  </slot>
121
123
  </h2>
122
124
 
123
- <div v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
125
+ <div v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
124
126
  <slot name="description">
125
- {{ description }}
127
+ {{ props.description }}
126
128
  </slot>
127
129
  </div>
128
130
 
129
- <div v-if="authors?.length || !!slots.authors" data-slot="authors" :class="ui.authors({ class: uiProp?.authors })">
131
+ <div v-if="props.authors?.length || !!slots.authors" data-slot="authors" :class="ui.authors({ class: props.ui?.authors })">
130
132
  <slot name="authors" :ui="ui">
131
- <template v-if="authors?.length">
132
- <UAvatarGroup v-if="authors.length > 1">
133
+ <template v-if="props.authors?.length">
134
+ <UAvatarGroup v-if="props.authors.length > 1">
133
135
  <ULink
134
- v-for="(author, index) in authors"
136
+ v-for="(author, index) in props.authors"
135
137
  :key="index"
136
138
  :to="author.to"
137
139
  :target="author.target"
138
140
  data-slot="avatar"
139
- :class="ui.avatar({ class: uiProp?.avatar, to: !!author.to })"
141
+ :class="ui.avatar({ class: props.ui?.avatar, to: !!author.to })"
140
142
  raw
141
143
  >
142
144
  <UAvatar v-bind="author.avatar" />
143
145
  </ULink>
144
146
  </UAvatarGroup>
145
- <UUser v-else v-bind="authors[0]" />
147
+ <UUser v-else v-bind="props.authors[0]" />
146
148
  </template>
147
149
  </slot>
148
150
  </div>
149
151
  </slot>
150
152
  </div>
151
153
 
152
- <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: uiProp?.footer })">
154
+ <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
153
155
  <slot name="footer" />
154
156
  </div>
155
157
  </Primitive>
@@ -59,8 +59,8 @@ export interface BlogPostSlots {
59
59
  declare const _default: typeof __VLS_export;
60
60
  export default _default;
61
61
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<BlogPostProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlogPostProps> & Readonly<{}>, {
62
- orientation: BlogPost["variants"]["orientation"];
63
62
  as: any;
63
+ orientation: BlogPost["variants"]["orientation"];
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BlogPostSlots>;
65
65
  type __VLS_WithSlots<T, S> = T & {
66
66
  new (): {
@@ -8,9 +8,9 @@ import { Primitive } from "reka-ui";
8
8
  import { useAppConfig } from "#imports";
9
9
  import { omit } from "../utils";
10
10
  import { tv } from "../utils/tv";
11
- import { useComponentUI } from "../composables/useComponentUI";
11
+ import { useComponentProps } from "../composables/useComponentProps";
12
12
  import UBlogPost from "./BlogPost.vue";
13
- const props = defineProps({
13
+ const _props = defineProps({
14
14
  as: { type: null, required: false },
15
15
  posts: { type: Array, required: false },
16
16
  orientation: { type: null, required: false, default: "horizontal" },
@@ -18,19 +18,19 @@ const props = defineProps({
18
18
  ui: { type: Object, required: false }
19
19
  });
20
20
  const slots = defineSlots();
21
+ const props = useComponentProps("blogPosts", _props);
21
22
  const getProxySlots = () => omit(slots, ["default"]);
22
23
  const appConfig = useAppConfig();
23
- const uiProp = useComponentUI("blogPosts", props);
24
24
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.blogPosts || {} }));
25
25
  </script>
26
26
 
27
27
  <template>
28
- <Primitive :as="as" :data-orientation="orientation" :class="ui({ orientation, class: [uiProp?.base, props.class] })">
28
+ <Primitive :as="props.as" :data-orientation="props.orientation" :class="ui({ orientation: props.orientation, class: [props.ui?.base, props.class] })">
29
29
  <slot>
30
30
  <UBlogPost
31
- v-for="(post, index) in posts"
31
+ v-for="(post, index) in props.posts"
32
32
  :key="index"
33
- :orientation="orientation === 'vertical' ? 'horizontal' : 'vertical'"
33
+ :orientation="props.orientation === 'vertical' ? 'horizontal' : 'vertical'"
34
34
  v-bind="post"
35
35
  >
36
36
  <template v-for="(_, name) in getProxySlots()" #[name]="slotData">
@@ -30,6 +30,10 @@ export interface BreadcrumbProps<T extends BreadcrumbItem = BreadcrumbItem> {
30
30
  * @IconifyIcon
31
31
  */
32
32
  separatorIcon?: IconProps['name'];
33
+ /**
34
+ * @defaultValue 'primary'
35
+ */
36
+ color?: Breadcrumb['variants']['color'];
33
37
  /**
34
38
  * The key used to get the label from the item.
35
39
  * @defaultValue 'label'
@@ -6,7 +6,7 @@ import theme from "#build/ui/breadcrumb";
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
10
  import { useLocale } from "../composables/useLocale";
11
11
  import { get } from "../utils";
12
12
  import { tv } from "../utils/tv";
@@ -15,50 +15,53 @@ import UIcon from "./Icon.vue";
15
15
  import UAvatar from "./Avatar.vue";
16
16
  import ULinkBase from "./LinkBase.vue";
17
17
  import ULink from "./Link.vue";
18
- const props = defineProps({
18
+ const _props = defineProps({
19
19
  as: { type: null, required: false, default: "nav" },
20
20
  items: { type: Array, required: false },
21
21
  separatorIcon: { type: null, required: false },
22
+ color: { type: null, required: false },
22
23
  labelKey: { type: null, required: false, default: "label" },
23
24
  class: { type: null, required: false },
24
25
  ui: { type: Object, required: false }
25
26
  });
26
27
  const slots = defineSlots();
28
+ const props = useComponentProps("breadcrumb", _props);
27
29
  const { dir } = useLocale();
28
30
  const appConfig = useAppConfig();
29
- const uiProp = useComponentUI("breadcrumb", props);
30
31
  const separatorIcon = computed(() => props.separatorIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
31
- const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb || {} })());
32
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb || {} })({
33
+ color: props.color
34
+ }));
32
35
  </script>
33
36
 
34
37
  <template>
35
- <Primitive :as="as" aria-label="breadcrumb" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
36
- <ol data-slot="list" :class="ui.list({ class: uiProp?.list })">
37
- <template v-for="(item, index) in items" :key="index">
38
- <li data-slot="item" :class="ui.item({ class: [uiProp?.item, item.ui?.item] })">
38
+ <Primitive :as="props.as" aria-label="breadcrumb" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
39
+ <ol data-slot="list" :class="ui.list({ class: props.ui?.list })">
40
+ <template v-for="(item, index) in props.items" :key="index">
41
+ <li data-slot="item" :class="ui.item({ class: [props.ui?.item, item.ui?.item] })">
39
42
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
40
- <ULinkBase v-bind="slotProps" as="span" :aria-current="(item.active ?? active) && index === items.length - 1 ? 'page' : void 0" data-slot="link" :class="ui.link({ class: [uiProp?.link, item.ui?.link, item.class], active: item.active ?? index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
41
- <slot :name="item.slot || 'item'" :item="item" :active="item.active ?? index === items.length - 1" :index="index" :ui="ui">
42
- <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="item.active ?? index === items.length - 1" :index="index" :ui="ui">
43
- <UIcon v-if="item.icon" :name="item.icon" data-slot="linkLeadingIcon" :class="ui.linkLeadingIcon({ class: [uiProp?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: item.active ?? index === items.length - 1 })" />
44
- <UAvatar v-else-if="item.avatar" :size="uiProp?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" data-slot="linkLeadingAvatar" :class="ui.linkLeadingAvatar({ class: [uiProp?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: item.active ?? index === items.length - 1 })" />
43
+ <ULinkBase v-bind="slotProps" as="span" :aria-current="(item.active ?? active) && index === props.items.length - 1 ? 'page' : void 0" data-slot="link" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: item.active ?? index === props.items.length - 1, disabled: !!item.disabled, to: !!item.to })">
44
+ <slot :name="item.slot || 'item'" :item="item" :active="item.active ?? index === props.items.length - 1" :index="index" :ui="ui">
45
+ <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="item.active ?? index === props.items.length - 1" :index="index" :ui="ui">
46
+ <UIcon v-if="item.icon" :name="item.icon" data-slot="linkLeadingIcon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: item.active ?? index === props.items.length - 1 })" />
47
+ <UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" data-slot="linkLeadingAvatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: item.active ?? index === props.items.length - 1 })" />
45
48
  </slot>
46
49
 
47
- <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" data-slot="linkLabel" :class="ui.linkLabel({ class: [uiProp?.linkLabel, item.ui?.linkLabel] })">
48
- <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="item.active ?? index === items.length - 1" :index="index">
50
+ <span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" data-slot="linkLabel" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
51
+ <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="item.active ?? index === props.items.length - 1" :index="index">
49
52
  {{ get(item, props.labelKey) }}
50
53
  </slot>
51
54
  </span>
52
55
 
53
- <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="item.active ?? index === items.length - 1" :index="index" />
56
+ <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="item.active ?? index === props.items.length - 1" :index="index" />
54
57
  </slot>
55
58
  </ULinkBase>
56
59
  </ULink>
57
60
  </li>
58
61
 
59
- <li v-if="index < items.length - 1" role="presentation" aria-hidden="true" data-slot="separator" :class="ui.separator({ class: [uiProp?.separator, item.ui?.separator] })">
62
+ <li v-if="index < props.items.length - 1" role="presentation" aria-hidden="true" data-slot="separator" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })">
60
63
  <slot name="separator" :ui="ui">
61
- <UIcon :name="separatorIcon" data-slot="separatorIcon" :class="ui.separatorIcon({ class: [uiProp?.separatorIcon, item.ui?.separatorIcon] })" />
64
+ <UIcon :name="separatorIcon" data-slot="separatorIcon" :class="ui.separatorIcon({ class: [props.ui?.separatorIcon, item.ui?.separatorIcon] })" />
62
65
  </slot>
63
66
  </li>
64
67
  </template>