@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
@@ -8,7 +8,7 @@ import { Primitive } from "reka-ui";
8
8
  import { defu } from "defu";
9
9
  import { createReusableTemplate, useMediaQuery } from "@vueuse/core";
10
10
  import { useAppConfig } from "#imports";
11
- import { useComponentUI } from "../composables/useComponentUI";
11
+ import { useComponentProps } from "../composables/useComponentProps";
12
12
  import { useLocale } from "../composables/useLocale";
13
13
  import { tv } from "../utils/tv";
14
14
  import UButton from "./Button.vue";
@@ -16,7 +16,7 @@ import USlideover from "./Slideover.vue";
16
16
  import UModal from "./Modal.vue";
17
17
  import UDrawer from "./Drawer.vue";
18
18
  defineOptions({ inheritAttrs: false });
19
- const props = defineProps({
19
+ const _props = defineProps({
20
20
  as: { type: null, required: false, default: "aside" },
21
21
  variant: { type: null, required: false, default: "sidebar" },
22
22
  collapsible: { type: null, required: false, default: "offcanvas" },
@@ -32,6 +32,7 @@ const props = defineProps({
32
32
  ui: { type: Object, required: false }
33
33
  });
34
34
  const slots = defineSlots();
35
+ const props = useComponentProps("sidebar", _props);
35
36
  const [DefineInnerTemplate, ReuseInnerTemplate] = createReusableTemplate();
36
37
  const [DefineContentTemplate, ReuseContentTemplate] = createReusableTemplate();
37
38
  const mediaQuery = useMediaQuery("(max-width: 1023px)");
@@ -73,7 +74,6 @@ watch(openMobile, (value) => {
73
74
  });
74
75
  const { t } = useLocale();
75
76
  const appConfig = useAppConfig();
76
- const uiProp = useComponentUI("sidebar", props);
77
77
  const state = computed(() => open.value ? "expanded" : "collapsed");
78
78
  const canClose = computed(() => props.close && props.collapsible !== "none" || isMobile.value);
79
79
  function closeSidebar() {
@@ -100,35 +100,35 @@ const menuProps = toRef(() => defu(props.menu, {
100
100
 
101
101
  <template>
102
102
  <DefineContentTemplate>
103
- <div v-if="hasHeader" data-slot="header" :class="ui.header({ class: uiProp?.header })">
103
+ <div v-if="hasHeader" data-slot="header" :class="ui.header({ class: props.ui?.header })">
104
104
  <slot name="header" :state="state" :open="open" :close="closeSidebar">
105
- <div v-if="title || !!slots.title || description || !!slots.description" data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
106
- <p v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: uiProp?.title })">
105
+ <div v-if="props.title || !!slots.title || props.description || !!slots.description" data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
106
+ <p v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
107
107
  <slot name="title" :state="state">
108
- {{ title }}
108
+ {{ props.title }}
109
109
  </slot>
110
110
  </p>
111
111
 
112
- <p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
112
+ <p v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
113
113
  <slot name="description" :state="state">
114
- {{ description }}
114
+ {{ props.description }}
115
115
  </slot>
116
116
  </p>
117
117
  </div>
118
118
 
119
- <div v-if="!!slots.actions || canClose" data-slot="actions" :class="ui.actions({ class: uiProp?.actions })">
119
+ <div v-if="!!slots.actions || canClose" data-slot="actions" :class="ui.actions({ class: props.ui?.actions })">
120
120
  <slot name="actions" :state="state" />
121
121
 
122
122
  <slot name="close" :state="state" :ui="ui">
123
123
  <UButton
124
124
  v-if="canClose"
125
- :icon="closeIcon || appConfig.ui.icons.close"
125
+ :icon="props.closeIcon || appConfig.ui.icons.close"
126
126
  color="neutral"
127
127
  variant="ghost"
128
128
  :aria-label="t('sidebar.close')"
129
129
  v-bind="typeof props.close === 'object' ? props.close : {}"
130
130
  data-slot="close"
131
- :class="ui.close({ class: uiProp?.close })"
131
+ :class="ui.close({ class: props.ui?.close })"
132
132
  @click="closeSidebar"
133
133
  />
134
134
  </slot>
@@ -136,29 +136,29 @@ const menuProps = toRef(() => defu(props.menu, {
136
136
  </slot>
137
137
  </div>
138
138
 
139
- <div data-slot="body" :class="ui.body({ class: uiProp?.body })">
139
+ <div data-slot="body" :class="ui.body({ class: props.ui?.body })">
140
140
  <slot :state="state" :open="open" :close="closeSidebar" />
141
141
  </div>
142
142
 
143
- <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: uiProp?.footer })">
143
+ <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
144
144
  <slot name="footer" :state="state" :open="open" :close="closeSidebar" />
145
145
  </div>
146
146
  </DefineContentTemplate>
147
147
 
148
148
  <DefineInnerTemplate>
149
- <div data-slot="inner" :class="ui.inner({ class: uiProp?.inner })">
149
+ <div data-slot="inner" :class="ui.inner({ class: props.ui?.inner })">
150
150
  <ReuseContentTemplate />
151
151
  </div>
152
152
  </DefineInnerTemplate>
153
153
 
154
154
  <!-- Non-collapsible: simple inline sidebar -->
155
155
  <Primitive
156
- v-if="collapsible === 'none'"
157
- :as="as"
156
+ v-if="props.collapsible === 'none'"
157
+ :as="props.as"
158
158
  v-bind="$attrs"
159
159
  data-slot="root"
160
- :data-variant="variant"
161
- :class="ui.root({ class: [uiProp?.root, props.class] })"
160
+ :data-variant="props.variant"
161
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
162
162
  >
163
163
  <ReuseInnerTemplate />
164
164
  </Primitive>
@@ -166,37 +166,37 @@ const menuProps = toRef(() => defu(props.menu, {
166
166
  <!-- Collapsible: fixed sidebar with gap spacer + mobile menu -->
167
167
  <template v-else>
168
168
  <Primitive
169
- :as="as"
169
+ :as="props.as"
170
170
  v-bind="$attrs"
171
171
  data-slot="root"
172
172
  :data-state="state"
173
- :data-collapsible="state === 'collapsed' ? collapsible : void 0"
174
- :data-variant="variant"
175
- :data-side="side"
176
- :class="ui.root({ class: [uiProp?.root, props.class] })"
173
+ :data-collapsible="state === 'collapsed' ? props.collapsible : void 0"
174
+ :data-variant="props.variant"
175
+ :data-side="props.side"
176
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
177
177
  >
178
178
  <!-- Gap spacer: reserves layout space for the fixed sidebar -->
179
179
  <div
180
180
  data-slot="gap"
181
181
  :data-state="state"
182
- :class="ui.gap({ class: uiProp?.gap })"
182
+ :class="ui.gap({ class: props.ui?.gap })"
183
183
  />
184
184
 
185
185
  <!-- Fixed container: the actual visible sidebar -->
186
186
  <div
187
187
  data-slot="container"
188
188
  :data-state="state"
189
- :class="ui.container({ class: uiProp?.container })"
189
+ :class="ui.container({ class: props.ui?.container })"
190
190
  >
191
191
  <ReuseInnerTemplate />
192
192
 
193
- <slot v-if="rail" name="rail" :state="state" :ui="ui">
193
+ <slot v-if="props.rail" name="rail" :state="state" :ui="ui">
194
194
  <button
195
195
  data-slot="rail"
196
196
  :data-state="state"
197
197
  :aria-label="t('sidebar.toggle')"
198
198
  :tabindex="-1"
199
- :class="ui.rail({ class: uiProp?.rail })"
199
+ :class="ui.rail({ class: props.ui?.rail })"
200
200
  @click="open = !open"
201
201
  />
202
202
  </slot>
@@ -7,25 +7,25 @@ import { computed } from "vue";
7
7
  import { Primitive } from "reka-ui";
8
8
  import { useAppConfig } from "#imports";
9
9
  import { tv } from "../utils/tv";
10
- import { useComponentUI } from "../composables/useComponentUI";
11
- const props = defineProps({
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ const _props = defineProps({
12
12
  as: { type: null, required: false },
13
13
  class: { type: null, required: false },
14
14
  ui: { type: Object, required: false }
15
15
  });
16
+ const props = useComponentProps("skeleton", _props);
16
17
  const appConfig = useAppConfig();
17
- const uiProp = useComponentUI("skeleton", props);
18
18
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.skeleton || {} }));
19
19
  </script>
20
20
 
21
21
  <template>
22
22
  <Primitive
23
- :as="as"
23
+ :as="props.as"
24
24
  aria-busy="true"
25
25
  aria-label="loading"
26
26
  aria-live="polite"
27
27
  role="alert"
28
- :class="ui({ class: [uiProp?.base, props.class] })"
28
+ :class="ui({ class: [props.ui?.base, props.class] })"
29
29
  >
30
30
  <slot />
31
31
  </Primitive>
@@ -98,11 +98,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Slideo
98
98
  "onClose:prevent"?: (() => any) | undefined;
99
99
  }>, {
100
100
  close: boolean | Omit<ButtonProps, LinkPropsKeys>;
101
- transition: boolean;
102
- side: Slideover["variants"]["side"];
103
- overlay: boolean;
104
101
  modal: boolean;
102
+ transition: boolean;
105
103
  portal: boolean | string | HTMLElement;
104
+ overlay: boolean;
105
+ side: Slideover["variants"]["side"];
106
106
  dismissible: boolean;
107
107
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SlideoverSlots>;
108
108
  type __VLS_WithSlots<T, S> = T & {
@@ -4,17 +4,18 @@ import theme from "#build/ui/slideover";
4
4
 
5
5
  <script setup>
6
6
  import { computed, toRef } from "vue";
7
- import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden, useForwardPropsEmits } from "reka-ui";
7
+ import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden } 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 { FieldGroupReset } from "../composables/useFieldGroup";
12
13
  import { useLocale } from "../composables/useLocale";
13
14
  import { usePortal } from "../composables/usePortal";
14
15
  import { pointerDownOutside } from "../utils/overlay";
15
16
  import { tv } from "../utils/tv";
16
17
  import UButton from "./Button.vue";
17
- const props = defineProps({
18
+ const _props = defineProps({
18
19
  title: { type: String, required: false },
19
20
  description: { type: String, required: false },
20
21
  content: { type: Object, required: false },
@@ -34,10 +35,10 @@ const props = defineProps({
34
35
  });
35
36
  const emits = defineEmits(["after:leave", "after:enter", "close:prevent", "update:open"]);
36
37
  const slots = defineSlots();
38
+ const props = useComponentProps("slideover", _props);
37
39
  const { t } = useLocale();
38
40
  const appConfig = useAppConfig();
39
- const uiProp = useComponentUI("slideover", props);
40
- const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen", "modal"), emits);
41
+ const rootProps = useForwardProps(reactivePick(props, "open", "defaultOpen", "modal"), emits);
41
42
  const portalProps = usePortal(toRef(() => props.portal));
42
43
  const contentProps = toRef(() => props.content);
43
44
  const contentEvents = computed(() => {
@@ -70,46 +71,46 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover ||
70
71
 
71
72
  <DialogPortal v-bind="portalProps">
72
73
  <FieldGroupReset>
73
- <DialogOverlay v-if="overlay" data-slot="overlay" :class="ui.overlay({ class: uiProp?.overlay })" />
74
+ <DialogOverlay v-if="props.overlay" data-slot="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
74
75
 
75
76
  <DialogContent
76
- :data-side="side"
77
+ :data-side="props.side"
77
78
  data-slot="content"
78
- :class="ui.content({ class: [!slots.default && props.class, uiProp?.content] })"
79
+ :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })"
79
80
  v-bind="contentProps"
80
81
  @after-enter="emits('after:enter')"
81
82
  @after-leave="emits('after:leave')"
82
83
  v-on="contentEvents"
83
84
  >
84
- <VisuallyHidden v-if="!title && !slots.title || !description && !slots.description || !!slots.content">
85
- <DialogTitle v-if="!title && !slots.title" />
85
+ <VisuallyHidden v-if="!props.title && !slots.title || !props.description && !slots.description || !!slots.content">
86
+ <DialogTitle v-if="!props.title && !slots.title" />
86
87
  <DialogTitle v-else-if="!!slots.content">
87
88
  <slot name="title">
88
- {{ title }}
89
+ {{ props.title }}
89
90
  </slot>
90
91
  </DialogTitle>
91
92
 
92
- <DialogDescription v-if="!description && !slots.description" />
93
+ <DialogDescription v-if="!props.description && !slots.description" />
93
94
  <DialogDescription v-else-if="!!slots.content">
94
95
  <slot name="description">
95
- {{ description }}
96
+ {{ props.description }}
96
97
  </slot>
97
98
  </DialogDescription>
98
99
  </VisuallyHidden>
99
100
 
100
101
  <slot name="content" :close="close">
101
- <div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" data-slot="header" :class="ui.header({ class: uiProp?.header })">
102
+ <div v-if="!!slots.header || (props.title || !!slots.title) || (props.description || !!slots.description) || (props.close || !!slots.close)" data-slot="header" :class="ui.header({ class: props.ui?.header })">
102
103
  <slot name="header" :close="close">
103
- <div v-if="title || !!slots.title || description || !!slots.description" data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
104
- <DialogTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: uiProp?.title })">
104
+ <div v-if="props.title || !!slots.title || props.description || !!slots.description" data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
105
+ <DialogTitle v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
105
106
  <slot name="title">
106
- {{ title }}
107
+ {{ props.title }}
107
108
  </slot>
108
109
  </DialogTitle>
109
110
 
110
- <DialogDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
111
+ <DialogDescription v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
111
112
  <slot name="description">
112
- {{ description }}
113
+ {{ props.description }}
113
114
  </slot>
114
115
  </DialogDescription>
115
116
  </div>
@@ -120,24 +121,24 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover ||
120
121
  <slot name="close" :ui="ui">
121
122
  <UButton
122
123
  v-if="props.close"
123
- :icon="closeIcon || appConfig.ui.icons.close"
124
+ :icon="props.closeIcon || appConfig.ui.icons.close"
124
125
  color="neutral"
125
126
  variant="ghost"
126
127
  :aria-label="t('slideover.close')"
127
128
  v-bind="typeof props.close === 'object' ? props.close : {}"
128
129
  data-slot="close"
129
- :class="ui.close({ class: uiProp?.close })"
130
+ :class="ui.close({ class: props.ui?.close })"
130
131
  />
131
132
  </slot>
132
133
  </DialogClose>
133
134
  </slot>
134
135
  </div>
135
136
 
136
- <div data-slot="body" :class="ui.body({ class: uiProp?.body })">
137
+ <div data-slot="body" :class="ui.body({ class: props.ui?.body })">
137
138
  <slot name="body" :close="close" />
138
139
  </div>
139
140
 
140
- <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: uiProp?.footer })">
141
+ <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
141
142
  <slot name="footer" :close="close" />
142
143
  </div>
143
144
  </slot>
@@ -98,11 +98,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Slideo
98
98
  "onClose:prevent"?: (() => any) | undefined;
99
99
  }>, {
100
100
  close: boolean | Omit<ButtonProps, LinkPropsKeys>;
101
- transition: boolean;
102
- side: Slideover["variants"]["side"];
103
- overlay: boolean;
104
101
  modal: boolean;
102
+ transition: boolean;
105
103
  portal: boolean | string | HTMLElement;
104
+ overlay: boolean;
105
+ side: Slideover["variants"]["side"];
106
106
  dismissible: boolean;
107
107
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SlideoverSlots>;
108
108
  type __VLS_WithSlots<T, S> = T & {
@@ -4,14 +4,15 @@ import theme from "#build/ui/slider";
4
4
 
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
- import { SliderRoot, SliderRange, SliderTrack, SliderThumb, useForwardPropsEmits } from "reka-ui";
7
+ import { SliderRoot, SliderRange, SliderTrack, SliderThumb } 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 { useFormField } from "../composables/useFormField";
12
13
  import { tv } from "../utils/tv";
13
14
  import UTooltip from "./Tooltip.vue";
14
- const props = defineProps({
15
+ const _props = defineProps({
15
16
  as: { type: null, required: false },
16
17
  size: { type: null, required: false },
17
18
  color: { type: null, required: false },
@@ -29,11 +30,11 @@ const props = defineProps({
29
30
  minStepsBetweenThumbs: { type: Number, required: false }
30
31
  });
31
32
  const emits = defineEmits(["change"]);
33
+ const props = useComponentProps("slider", _props);
32
34
  const modelValue = defineModel({ type: null });
33
35
  const appConfig = useAppConfig();
34
- const uiProp = useComponentUI("slider", props);
35
- const rootProps = useForwardPropsEmits(reactivePick(props, "as", "orientation", "min", "max", "step", "minStepsBetweenThumbs", "inverted"), emits);
36
- const { id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
36
+ const rootProps = useForwardProps(reactivePick(props, "as", "orientation", "min", "max", "step", "minStepsBetweenThumbs", "inverted"), emits);
37
+ const { id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(_props);
37
38
  const defaultSliderValue = computed(() => {
38
39
  if (typeof props.defaultValue === "number") {
39
40
  return [props.defaultValue];
@@ -54,8 +55,8 @@ const sliderValue = computed({
54
55
  const thumbs = computed(() => sliderValue.value?.length ?? 1);
55
56
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slider || {} })({
56
57
  disabled: disabled.value,
57
- size: size.value,
58
- color: color.value,
58
+ size: size.value ?? props.size,
59
+ color: color.value ?? props.color,
59
60
  orientation: props.orientation
60
61
  }));
61
62
  function onChange(value) {
@@ -73,25 +74,25 @@ function onChange(value) {
73
74
  :name="name"
74
75
  :disabled="disabled"
75
76
  data-slot="root"
76
- :class="ui.root({ class: [uiProp?.root, props.class] })"
77
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
77
78
  :default-value="defaultSliderValue"
78
79
  @update:model-value="emitFormInput()"
79
80
  @value-commit="onChange"
80
81
  >
81
- <SliderTrack data-slot="track" :class="ui.track({ class: uiProp?.track })">
82
- <SliderRange data-slot="range" :class="ui.range({ class: uiProp?.range })" />
82
+ <SliderTrack data-slot="track" :class="ui.track({ class: props.ui?.track })">
83
+ <SliderRange data-slot="range" :class="ui.range({ class: props.ui?.range })" />
83
84
  </SliderTrack>
84
85
 
85
86
  <template v-for="thumb in thumbs" :key="thumb">
86
87
  <UTooltip
87
- v-if="!!tooltip"
88
+ v-if="!!props.tooltip"
88
89
  :text="thumbs > 1 ? String(sliderValue?.[thumb - 1]) : String(sliderValue)"
89
90
  disable-closing-trigger
90
- v-bind="typeof tooltip === 'object' ? tooltip : {}"
91
+ v-bind="typeof props.tooltip === 'object' ? props.tooltip : {}"
91
92
  >
92
- <SliderThumb data-slot="thumb" :class="ui.thumb({ class: uiProp?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
93
+ <SliderThumb data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
93
94
  </UTooltip>
94
- <SliderThumb v-else data-slot="thumb" :class="ui.thumb({ class: uiProp?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
95
+ <SliderThumb v-else data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
95
96
  </template>
96
97
  </SliderRoot>
97
98
  </template>
@@ -4,14 +4,15 @@ import theme from "#build/ui/stepper";
4
4
 
5
5
  <script setup>
6
6
  import { computed } from "vue";
7
- import { StepperRoot, StepperItem, StepperTrigger, StepperIndicator, StepperSeparator, StepperTitle, StepperDescription, useForwardProps } from "reka-ui";
7
+ import { StepperRoot, StepperItem, StepperTrigger, StepperIndicator, StepperSeparator, StepperTitle, StepperDescription } from "reka-ui";
8
8
  import { reactivePick } from "@vueuse/core";
9
9
  import { useAppConfig } from "#imports";
10
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ import { useForwardProps } from "../composables/useForwardProps";
11
12
  import { tv } from "../utils/tv";
12
13
  import { get } from "../utils";
13
14
  import UIcon from "./Icon.vue";
14
- const props = defineProps({
15
+ const _props = defineProps({
15
16
  as: { type: null, required: false },
16
17
  items: { type: Array, required: true },
17
18
  size: { type: null, required: false },
@@ -26,9 +27,9 @@ const props = defineProps({
26
27
  });
27
28
  const emits = defineEmits(["next", "prev"]);
28
29
  const slots = defineSlots();
30
+ const props = useComponentProps("stepper", _props);
29
31
  const modelValue = defineModel({ type: [String, Number] });
30
32
  const appConfig = useAppConfig();
31
- const uiProp = useComponentUI("stepper", props);
32
33
  const rootProps = useForwardProps(reactivePick(props, "as", "linear"));
33
34
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.stepper || {} })({
34
35
  orientation: props.orientation,
@@ -66,21 +67,21 @@ defineExpose({
66
67
  </script>
67
68
 
68
69
  <template>
69
- <StepperRoot v-bind="rootProps" v-model="currentStepIndex" :orientation="orientation" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
70
- <div data-slot="header" :class="ui.header({ class: uiProp?.header })">
70
+ <StepperRoot v-bind="rootProps" v-model="currentStepIndex" :orientation="props.orientation" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
71
+ <div data-slot="header" :class="ui.header({ class: props.ui?.header })">
71
72
  <StepperItem
72
- v-for="(item, count) in items"
73
+ v-for="(item, count) in props.items"
73
74
  :key="count"
74
75
  :step="count"
75
76
  :disabled="item.disabled || props.disabled"
76
77
  data-slot="item"
77
- :class="ui.item({ class: [uiProp?.item, item.ui?.item, item.class] })"
78
+ :class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
78
79
  >
79
- <div data-slot="container" :class="ui.container({ class: [uiProp?.container, item.ui?.container] })">
80
- <StepperTrigger data-slot="trigger" :class="ui.trigger({ class: [uiProp?.trigger, item.ui?.trigger] })">
81
- <StepperIndicator data-slot="indicator" :class="ui.indicator({ class: [uiProp?.indicator, item.ui?.indicator] })">
80
+ <div data-slot="container" :class="ui.container({ class: [props.ui?.container, item.ui?.container] })">
81
+ <StepperTrigger data-slot="trigger" :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })">
82
+ <StepperIndicator data-slot="indicator" :class="ui.indicator({ class: [props.ui?.indicator, item.ui?.indicator] })">
82
83
  <slot name="indicator" :item="item" :ui="ui">
83
- <UIcon v-if="item.icon" :name="item.icon" data-slot="icon" :class="ui.icon({ class: [uiProp?.icon, item.ui?.icon] })" />
84
+ <UIcon v-if="item.icon" :name="item.icon" data-slot="icon" :class="ui.icon({ class: [props.ui?.icon, item.ui?.icon] })" />
84
85
  <template v-else>
85
86
  {{ count + 1 }}
86
87
  </template>
@@ -89,20 +90,20 @@ defineExpose({
89
90
  </StepperTrigger>
90
91
 
91
92
  <StepperSeparator
92
- v-if="count < items.length - 1"
93
+ v-if="count < props.items.length - 1"
93
94
  data-slot="separator"
94
- :class="ui.separator({ class: [uiProp?.separator, item.ui?.separator] })"
95
+ :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })"
95
96
  />
96
97
  </div>
97
98
 
98
- <div data-slot="wrapper" :class="ui.wrapper({ class: [uiProp?.wrapper, item.ui?.wrapper] })">
99
+ <div data-slot="wrapper" :class="ui.wrapper({ class: [props.ui?.wrapper, item.ui?.wrapper] })">
99
100
  <slot :name="item.slot ? `${item.slot}-wrapper` : 'wrapper'" :item="item">
100
- <StepperTitle v-if="item.title || !!slots[item.slot ? `${item.slot}-title` : 'title']" as="div" data-slot="title" :class="ui.title({ class: [uiProp?.title, item.ui?.title] })">
101
+ <StepperTitle v-if="item.title || !!slots[item.slot ? `${item.slot}-title` : 'title']" as="div" data-slot="title" :class="ui.title({ class: [props.ui?.title, item.ui?.title] })">
101
102
  <slot :name="item.slot ? `${item.slot}-title` : 'title'" :item="item">
102
103
  {{ item.title }}
103
104
  </slot>
104
105
  </StepperTitle>
105
- <StepperDescription v-if="item.description || !!slots[item.slot ? `${item.slot}-description` : 'description']" as="div" data-slot="description" :class="ui.description({ class: [uiProp?.description, item.ui?.description] })">
106
+ <StepperDescription v-if="item.description || !!slots[item.slot ? `${item.slot}-description` : 'description']" as="div" data-slot="description" :class="ui.description({ class: [props.ui?.description, item.ui?.description] })">
106
107
  <slot :name="item.slot ? `${item.slot}-description` : 'description'" :item="item">
107
108
  {{ item.description }}
108
109
  </slot>
@@ -112,7 +113,7 @@ defineExpose({
112
113
  </StepperItem>
113
114
  </div>
114
115
 
115
- <div v-if="currentStep?.content || !!slots.content || currentStep?.slot && !!slots[currentStep.slot]" data-slot="content" :class="ui.content({ class: uiProp?.content })">
116
+ <div v-if="currentStep?.content || !!slots.content || currentStep?.slot && !!slots[currentStep.slot]" data-slot="content" :class="ui.content({ class: props.ui?.content })">
116
117
  <slot
117
118
  :name="currentStep?.slot || 'content'"
118
119
  :item="currentStep"
@@ -20,6 +20,8 @@ export interface SwitchProps<T = boolean> extends Pick<SwitchRootProps<T>, 'disa
20
20
  * @defaultValue 'md'
21
21
  */
22
22
  size?: Switch['variants']['size'];
23
+ /** Highlight the ring color like a focus state. */
24
+ highlight?: boolean;
23
25
  /** When `true`, the loading icon will be displayed. */
24
26
  loading?: boolean;
25
27
  /**
@@ -4,18 +4,20 @@ import theme from "#build/ui/switch";
4
4
 
5
5
  <script setup>
6
6
  import { computed, useAttrs, useId } from "vue";
7
- import { Primitive, SwitchRoot, SwitchThumb, useForwardPropsEmits, Label } from "reka-ui";
7
+ import { Primitive, SwitchRoot, SwitchThumb, Label } 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 { useFormField } from "../composables/useFormField";
12
13
  import { tv } from "../utils/tv";
13
14
  import UIcon from "./Icon.vue";
14
15
  defineOptions({ inheritAttrs: false });
15
- const props = defineProps({
16
+ const _props = defineProps({
16
17
  as: { type: null, required: false },
17
18
  color: { type: null, required: false },
18
19
  size: { type: null, required: false },
20
+ highlight: { type: Boolean, required: false },
19
21
  loading: { type: Boolean, required: false },
20
22
  loadingIcon: { type: null, required: false },
21
23
  checkedIcon: { type: null, required: false },
@@ -36,10 +38,10 @@ const props = defineProps({
36
38
  });
37
39
  const slots = defineSlots();
38
40
  const emits = defineEmits(["change", "update:modelValue"]);
41
+ const props = useComponentProps("switch", _props);
39
42
  const appConfig = useAppConfig();
40
- const uiProp = useComponentUI("switch", props);
41
- const rootProps = useForwardPropsEmits(reactivePick(props, "required", "value", "defaultValue", "modelValue", "trueValue", "falseValue"), emits);
42
- const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
43
+ const rootProps = useForwardProps(reactivePick(props, "required", "value", "defaultValue", "modelValue", "trueValue", "falseValue"), emits);
44
+ const { id: _id, emitFormChange, emitFormInput, size, color, highlight, name, disabled, ariaAttrs } = useFormField(_props);
43
45
  const id = _id.value ?? useId();
44
46
  const attrs = useAttrs();
45
47
  const forwardedAttrs = computed(() => {
@@ -47,8 +49,9 @@ const forwardedAttrs = computed(() => {
47
49
  return rest;
48
50
  });
49
51
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.switch || {} })({
50
- size: size.value,
51
- color: color.value,
52
+ size: size.value ?? props.size,
53
+ color: color.value ?? props.color,
54
+ highlight: highlight.value ?? props.highlight,
52
55
  required: props.required,
53
56
  loading: props.loading,
54
57
  disabled: disabled.value || props.loading
@@ -62,35 +65,35 @@ function onUpdate(value) {
62
65
  </script>
63
66
 
64
67
  <template>
65
- <Primitive :as="as" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
66
- <div data-slot="container" :class="ui.container({ class: uiProp?.container })">
68
+ <Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
69
+ <div data-slot="container" :class="ui.container({ class: props.ui?.container })">
67
70
  <SwitchRoot
68
71
  :id="id"
69
72
  v-bind="{ ...rootProps, ...forwardedAttrs, ...ariaAttrs }"
70
73
  :name="name"
71
- :disabled="disabled || loading"
74
+ :disabled="disabled || props.loading"
72
75
  data-slot="base"
73
- :class="ui.base({ class: uiProp?.base })"
76
+ :class="ui.base({ class: props.ui?.base })"
74
77
  @update:model-value="onUpdate"
75
78
  >
76
- <SwitchThumb data-slot="thumb" :class="ui.thumb({ class: uiProp?.thumb })">
77
- <UIcon v-if="loading" :name="loadingIcon || appConfig.ui.icons.loading" data-slot="icon" :class="ui.icon({ class: uiProp?.icon, checked: true, unchecked: true })" />
79
+ <SwitchThumb data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })">
80
+ <UIcon v-if="props.loading" :name="props.loadingIcon || appConfig.ui.icons.loading" data-slot="icon" :class="ui.icon({ class: props.ui?.icon, checked: true, unchecked: true })" />
78
81
  <template v-else>
79
- <UIcon v-if="checkedIcon" :name="checkedIcon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon, checked: true })" />
80
- <UIcon v-if="uncheckedIcon" :name="uncheckedIcon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon, unchecked: true })" />
82
+ <UIcon v-if="props.checkedIcon" :name="props.checkedIcon" data-slot="icon" :class="ui.icon({ class: props.ui?.icon, checked: true })" />
83
+ <UIcon v-if="props.uncheckedIcon" :name="props.uncheckedIcon" data-slot="icon" :class="ui.icon({ class: props.ui?.icon, unchecked: true })" />
81
84
  </template>
82
85
  </SwitchThumb>
83
86
  </SwitchRoot>
84
87
  </div>
85
- <div v-if="label || !!slots.label || (description || !!slots.description)" data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
86
- <Label v-if="label || !!slots.label" :for="id" data-slot="label" :class="ui.label({ class: uiProp?.label })">
87
- <slot name="label" :label="label">
88
- {{ label }}
88
+ <div v-if="props.label || !!slots.label || (props.description || !!slots.description)" data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
89
+ <Label v-if="props.label || !!slots.label" :for="id" data-slot="label" :class="ui.label({ class: props.ui?.label })">
90
+ <slot name="label" :label="props.label">
91
+ {{ props.label }}
89
92
  </slot>
90
93
  </Label>
91
- <p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
92
- <slot name="description" :description="description">
93
- {{ description }}
94
+ <p v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
95
+ <slot name="description" :description="props.description">
96
+ {{ props.description }}
94
97
  </slot>
95
98
  </p>
96
99
  </div>