@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
@@ -5,13 +5,13 @@ import theme from "#build/ui/dashboard-panel";
5
5
  <script setup>
6
6
  import { computed, useId, toRef } from "vue";
7
7
  import { useAppConfig } from "#imports";
8
- import { useComponentUI } from "../composables/useComponentUI";
8
+ import { useComponentProps } from "../composables/useComponentProps";
9
9
  import { useResizable } from "../composables/useResizable";
10
10
  import { useDashboard } from "../utils/dashboard";
11
11
  import { tv } from "../utils/tv";
12
12
  import UDashboardResizeHandle from "./DashboardResizeHandle.vue";
13
13
  defineOptions({ inheritAttrs: false });
14
- const props = defineProps({
14
+ const _props = defineProps({
15
15
  class: { type: null, required: false },
16
16
  ui: { type: Object, required: false },
17
17
  id: { type: String, required: false },
@@ -21,8 +21,8 @@ const props = defineProps({
21
21
  resizable: { type: Boolean, required: false, default: false }
22
22
  });
23
23
  defineSlots();
24
+ const props = useComponentProps("dashboardPanel", _props);
24
25
  const appConfig = useAppConfig();
25
- const uiProp = useComponentUI("dashboardPanel", props);
26
26
  const dashboardContext = useDashboard({ storageKey: "dashboard", unit: "%" });
27
27
  const id = `${dashboardContext.storageKey}-panel-${props.id || useId()}`;
28
28
  const { el, size, isDragging, onMouseDown, onTouchStart, onDoubleClick } = useResizable(id, toRef(() => ({ ...dashboardContext, ...props })));
@@ -38,13 +38,13 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardPane
38
38
  v-bind="$attrs"
39
39
  :data-dragging="isDragging"
40
40
  data-slot="root"
41
- :class="ui.root({ class: [uiProp?.root, props.class] })"
41
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
42
42
  :style="[size ? { '--width': `${size}${dashboardContext.unit}` } : void 0]"
43
43
  >
44
44
  <slot>
45
45
  <slot name="header" />
46
46
 
47
- <div data-slot="body" :class="ui.body({ class: uiProp?.body })">
47
+ <div data-slot="body" :class="ui.body({ class: props.ui?.body })">
48
48
  <slot name="body" />
49
49
  </div>
50
50
 
@@ -54,10 +54,10 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardPane
54
54
 
55
55
  <slot name="resize-handle" :on-mouse-down="onMouseDown" :on-touch-start="onTouchStart" :on-double-click="onDoubleClick">
56
56
  <UDashboardResizeHandle
57
- v-if="resizable"
57
+ v-if="props.resizable"
58
58
  :aria-controls="id"
59
59
  data-slot="handle"
60
- :class="ui.handle({ class: uiProp?.handle })"
60
+ :class="ui.handle({ class: props.ui?.handle })"
61
61
  @mousedown="onMouseDown"
62
62
  @touchstart="onTouchStart"
63
63
  @dblclick="onDoubleClick"
@@ -7,23 +7,23 @@ 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
16
  defineSlots();
17
+ const props = useComponentProps("dashboardResizeHandle", _props);
17
18
  const appConfig = useAppConfig();
18
- const uiProp = useComponentUI("dashboardResizeHandle", props);
19
19
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardResizeHandle || {} }));
20
20
  </script>
21
21
 
22
22
  <template>
23
23
  <Primitive
24
- :as="as"
24
+ :as="props.as"
25
25
  role="separator"
26
- :class="ui({ class: [uiProp?.base, props.class] })"
26
+ :class="ui({ class: [props.ui?.base, props.class] })"
27
27
  >
28
28
  <slot />
29
29
  </Primitive>
@@ -1,10 +1,11 @@
1
1
  import type { VNode } from 'vue';
2
2
  import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/dashboard-search';
4
+ import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
4
5
  import type { ButtonProps, ModalProps, CommandPaletteProps, CommandPaletteSlots, CommandPaletteGroup, CommandPaletteItem, LinkPropsKeys } from '../types';
5
6
  import type { ComponentConfig } from '../types/tv';
6
7
  type DashboardSearch = ComponentConfig<typeof theme, AppConfig, 'dashboardSearch'>;
7
- export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups' | 'fuse'> {
8
+ export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups'> {
8
9
  /**
9
10
  * @defaultValue 'md'
10
11
  */
@@ -21,6 +22,20 @@ export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPale
21
22
  * @defaultValue 'meta_k'
22
23
  */
23
24
  shortcut?: string;
25
+ /**
26
+ * Options for [useFuse](https://vueuse.org/integrations/useFuse) passed to the [CommandPalette](https://ui.nuxt.com/docs/components/command-palette).
27
+ * @defaultValue {
28
+ fuseOptions: {
29
+ ignoreLocation: true,
30
+ useTokenSearch: true,
31
+ threshold: 0.1,
32
+ keys: ['label', 'description', 'suffix']
33
+ },
34
+ resultLimit: 12,
35
+ matchAllWhenSearchEmpty: true
36
+ }
37
+ */
38
+ fuse?: UseFuseOptions<T>;
24
39
  /**
25
40
  * Delay (in milliseconds) before the search term is passed to Fuse (debounced).
26
41
  * Useful for large datasets where running fuzzy search on every keystroke is the bottleneck — the input stays responsive while Fuse only re-runs after typing settles.
@@ -4,20 +4,21 @@ import theme from "#build/ui/dashboard-search";
4
4
 
5
5
  <script setup>
6
6
  import { computed, useTemplateRef } from "vue";
7
- import { useForwardProps } from "reka-ui";
8
7
  import { defu } from "defu";
9
8
  import { reactivePick } from "@vueuse/core";
10
9
  import { useAppConfig, useColorMode, defineShortcuts, useRuntimeHook } from "#imports";
11
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ import { useForwardProps } from "../composables/useForwardProps";
12
12
  import { useLocale } from "../composables/useLocale";
13
13
  import { omit, transformUI } from "../utils";
14
14
  import { tv } from "../utils/tv";
15
15
  import UCommandPalette from "./CommandPalette.vue";
16
16
  import UModal from "./Modal.vue";
17
- const props = defineProps({
17
+ const _props = defineProps({
18
18
  size: { type: null, required: false },
19
19
  close: { type: [Boolean, Object], required: false, default: true },
20
20
  shortcut: { type: String, required: false, default: "meta_k" },
21
+ fuse: { type: Object, required: false },
21
22
  searchDelay: { type: Number, required: false, default: 100 },
22
23
  colorMode: { type: Boolean, required: false, default: true },
23
24
  class: { type: null, required: false },
@@ -37,10 +38,10 @@ const props = defineProps({
37
38
  loading: { type: Boolean, required: false },
38
39
  loadingIcon: { type: null, required: false },
39
40
  closeIcon: { type: null, required: false },
40
- groups: { type: Array, required: false },
41
- fuse: { type: Object, required: false }
41
+ groups: { type: Array, required: false }
42
42
  });
43
43
  const slots = defineSlots();
44
+ const props = useComponentProps("dashboardSearch", _props);
44
45
  const open = defineModel("open", { type: Boolean, ...{ default: false } });
45
46
  const searchTerm = defineModel("searchTerm", { type: String, ...{ default: "" } });
46
47
  useRuntimeHook("dashboard:search:toggle", () => {
@@ -49,12 +50,13 @@ useRuntimeHook("dashboard:search:toggle", () => {
49
50
  const { t } = useLocale();
50
51
  const colorMode = useColorMode();
51
52
  const appConfig = useAppConfig();
52
- const uiProp = useComponentUI("dashboardSearch", props);
53
53
  const commandPaletteProps = useForwardProps(reactivePick(props, "size", "icon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon", "searchDelay"));
54
54
  const modalProps = useForwardProps(reactivePick(props, "overlay", "transition", "content", "dismissible", "fullscreen", "modal", "portal"));
55
55
  const getProxySlots = () => omit(slots, ["content"]);
56
56
  const fuse = computed(() => defu({}, props.fuse, {
57
- fuseOptions: {}
57
+ fuseOptions: {
58
+ useTokenSearch: true
59
+ }
58
60
  }));
59
61
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSearch || {} })({
60
62
  size: props.size,
@@ -115,11 +117,11 @@ defineExpose({
115
117
  <template>
116
118
  <UModal
117
119
  v-model:open="open"
118
- :title="title || t('dashboardSearch.title')"
119
- :description="description || t('dashboardSearch.description')"
120
+ :title="props.title || t('dashboardSearch.title')"
121
+ :description="props.description || t('dashboardSearch.description')"
120
122
  v-bind="modalProps"
121
123
  data-slot="modal"
122
- :class="ui.modal({ class: [uiProp?.modal, props.class] })"
124
+ :class="ui.modal({ class: [props.ui?.modal, props.class] })"
123
125
  >
124
126
  <template #content="contentData">
125
127
  <slot name="content" v-bind="contentData">
@@ -130,7 +132,7 @@ defineExpose({
130
132
  :groups="groups"
131
133
  :fuse="fuse"
132
134
  :input="{ fixed: true }"
133
- :ui="transformUI(omit(ui, ['modal']), uiProp)"
135
+ :ui="transformUI(omit(ui, ['modal']), props.ui)"
134
136
  @update:model-value="onSelect"
135
137
  @update:open="open = $event"
136
138
  >
@@ -1,10 +1,11 @@
1
1
  import type { VNode } from 'vue';
2
2
  import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/dashboard-search';
4
+ import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
4
5
  import type { ButtonProps, ModalProps, CommandPaletteProps, CommandPaletteSlots, CommandPaletteGroup, CommandPaletteItem, LinkPropsKeys } from '../types';
5
6
  import type { ComponentConfig } from '../types/tv';
6
7
  type DashboardSearch = ComponentConfig<typeof theme, AppConfig, 'dashboardSearch'>;
7
- export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups' | 'fuse'> {
8
+ export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> extends Pick<ModalProps, 'title' | 'description' | 'overlay' | 'transition' | 'content' | 'dismissible' | 'fullscreen' | 'modal' | 'portal'>, Pick<CommandPaletteProps<CommandPaletteGroup<T>, T>, 'icon' | 'placeholder' | 'autofocus' | 'loading' | 'loadingIcon' | 'closeIcon' | 'groups'> {
8
9
  /**
9
10
  * @defaultValue 'md'
10
11
  */
@@ -21,6 +22,20 @@ export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPale
21
22
  * @defaultValue 'meta_k'
22
23
  */
23
24
  shortcut?: string;
25
+ /**
26
+ * Options for [useFuse](https://vueuse.org/integrations/useFuse) passed to the [CommandPalette](https://ui.nuxt.com/docs/components/command-palette).
27
+ * @defaultValue {
28
+ fuseOptions: {
29
+ ignoreLocation: true,
30
+ useTokenSearch: true,
31
+ threshold: 0.1,
32
+ keys: ['label', 'description', 'suffix']
33
+ },
34
+ resultLimit: 12,
35
+ matchAllWhenSearchEmpty: true
36
+ }
37
+ */
38
+ fuse?: UseFuseOptions<T>;
24
39
  /**
25
40
  * Delay (in milliseconds) before the search term is passed to Fuse (debounced).
26
41
  * Useful for large datasets where running fuzzy search on every keystroke is the bottleneck — the input stays responsive while Fuse only re-runs after typing settles.
@@ -47,10 +47,10 @@ export interface DashboardSearchButtonProps extends Omit<ButtonProps, LinkPropsK
47
47
  declare const _default: typeof __VLS_export;
48
48
  export default _default;
49
49
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DashboardSearchButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSearchButtonProps> & Readonly<{}>, {
50
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
51
- collapsed: boolean;
50
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
52
51
  tooltip: boolean | TooltipProps;
53
52
  kbds: KbdProps["value"][] | KbdProps[];
53
+ collapsed: boolean;
54
54
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
55
55
  type __VLS_WithSlots<T, S> = T & {
56
56
  new (): {
@@ -4,11 +4,11 @@ import theme from "#build/ui/dashboard-search-button";
4
4
 
5
5
  <script setup>
6
6
  import { computed, toRef } from "vue";
7
- import { useForwardProps } from "reka-ui";
8
7
  import { defu } from "defu";
9
8
  import { reactiveOmit, createReusableTemplate } from "@vueuse/core";
10
9
  import { useAppConfig } from "#imports";
11
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ import { useForwardProps } from "../composables/useForwardProps";
12
12
  import { useLocale } from "../composables/useLocale";
13
13
  import { useDashboard } from "../utils/dashboard";
14
14
  import { omit, transformUI } from "../utils";
@@ -17,7 +17,7 @@ import UButton from "./Button.vue";
17
17
  import UKbd from "./Kbd.vue";
18
18
  import UTooltip from "./Tooltip.vue";
19
19
  defineOptions({ inheritAttrs: false });
20
- const props = defineProps({
20
+ const _props = defineProps({
21
21
  icon: { type: null, required: false },
22
22
  label: { type: String, required: false },
23
23
  color: { type: null, required: false, default: "neutral" },
@@ -48,13 +48,13 @@ const props = defineProps({
48
48
  viewTransition: { type: Boolean, required: false }
49
49
  });
50
50
  const slots = defineSlots();
51
+ const props = useComponentProps("dashboardSearchButton", _props);
51
52
  const [DefineButtonTemplate, ReuseButtonTemplate] = createReusableTemplate();
52
53
  const getProxySlots = () => omit(slots, ["trailing"]);
53
54
  const buttonProps = useForwardProps(reactiveOmit(props, "icon", "label", "variant", "collapsed", "tooltip", "kbds", "class", "ui"));
54
55
  const tooltipProps = toRef(() => defu(typeof props.tooltip === "boolean" ? {} : props.tooltip, { delayDuration: 0, content: { side: "right" } }));
55
56
  const { t } = useLocale();
56
57
  const appConfig = useAppConfig();
57
- const uiProp = useComponentUI("dashboardSearchButton", props);
58
58
  const { toggleSearch } = useDashboard({ toggleSearch: () => {
59
59
  } });
60
60
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSearchButton || {} })({
@@ -65,19 +65,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSear
65
65
  <template>
66
66
  <DefineButtonTemplate>
67
67
  <UButton
68
- :icon="icon || appConfig.ui.icons.search"
69
- :label="label || t('dashboardSearchButton.label')"
70
- :variant="variant || (collapsed ? 'ghost' : 'outline')"
68
+ :icon="props.icon || appConfig.ui.icons.search"
69
+ :label="props.label || t('dashboardSearchButton.label')"
70
+ :variant="props.variant || (props.collapsed ? 'ghost' : 'outline')"
71
71
  v-bind="{
72
72
  ...buttonProps,
73
- ...collapsed ? {
73
+ ...props.collapsed ? {
74
74
  'square': true,
75
- 'aria-label': label || t('dashboardSearchButton.label')
75
+ 'aria-label': props.label || t('dashboardSearchButton.label')
76
76
  } : {},
77
77
  ...$attrs
78
78
  }"
79
- :class="ui.base({ class: [uiProp?.base, props.class] })"
80
- :ui="transformUI(ui, uiProp)"
79
+ :class="ui.base({ class: [props.ui?.base, props.class] })"
80
+ :ui="transformUI(ui, props.ui)"
81
81
  @click="toggleSearch"
82
82
  >
83
83
  <template v-for="(_, name) in getProxySlots()" #[name]="slotData">
@@ -85,10 +85,10 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSear
85
85
  </template>
86
86
 
87
87
  <template #trailing="{ ui: uiProxy }">
88
- <span data-slot="trailing" :class="ui.trailing({ class: uiProp?.trailing })">
88
+ <span data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
89
89
  <slot name="trailing" :ui="uiProxy">
90
- <template v-if="kbds?.length">
91
- <UKbd v-for="(kbd, index) in kbds" :key="index" variant="subtle" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
90
+ <template v-if="props.kbds?.length">
91
+ <UKbd v-for="(kbd, index) in props.kbds" :key="index" variant="subtle" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
92
92
  </template>
93
93
  </slot>
94
94
  </span>
@@ -96,7 +96,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSear
96
96
  </UButton>
97
97
  </DefineButtonTemplate>
98
98
 
99
- <UTooltip v-if="collapsed && tooltip" :text="label || t('dashboardSearchButton.label')" v-bind="tooltipProps">
99
+ <UTooltip v-if="props.collapsed && props.tooltip" :text="props.label || t('dashboardSearchButton.label')" v-bind="tooltipProps">
100
100
  <ReuseButtonTemplate />
101
101
  </UTooltip>
102
102
  <ReuseButtonTemplate v-else />
@@ -47,10 +47,10 @@ export interface DashboardSearchButtonProps extends Omit<ButtonProps, LinkPropsK
47
47
  declare const _default: typeof __VLS_export;
48
48
  export default _default;
49
49
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DashboardSearchButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSearchButtonProps> & Readonly<{}>, {
50
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
51
- collapsed: boolean;
50
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
52
51
  tooltip: boolean | TooltipProps;
53
52
  kbds: KbdProps["value"][] | KbdProps[];
53
+ collapsed: boolean;
54
54
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
55
55
  type __VLS_WithSlots<T, S> = T & {
56
56
  new (): {
@@ -10,7 +10,7 @@ type DashboardSidebarMenu<T> = T extends 'modal' ? ModalProps : T extends 'slide
10
10
  export interface DashboardSidebarProps<T extends DashboardSidebarMode = DashboardSidebarMode> extends Pick<UseResizableProps, 'id' | 'side' | 'minSize' | 'maxSize' | 'defaultSize' | 'resizable' | 'collapsible' | 'collapsedSize'> {
11
11
  /**
12
12
  * The mode of the sidebar menu.
13
- * @defaultValue 'modal'
13
+ * @defaultValue 'slideover'
14
14
  */
15
15
  mode?: T;
16
16
  /**
@@ -7,7 +7,7 @@ import { ref, computed, toRef, useId, watch } from "vue";
7
7
  import { defu } from "defu";
8
8
  import { createReusableTemplate } from "@vueuse/core";
9
9
  import { useAppConfig, useRuntimeHook, useRoute } from "#imports";
10
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
11
  import { useResizable } from "../composables/useResizable";
12
12
  import { useLocale } from "../composables/useLocale";
13
13
  import { useDashboard } from "../utils/dashboard";
@@ -18,7 +18,7 @@ import USlideover from "./Slideover.vue";
18
18
  import UModal from "./Modal.vue";
19
19
  import UDrawer from "./Drawer.vue";
20
20
  defineOptions({ inheritAttrs: false });
21
- const props = defineProps({
21
+ const _props = defineProps({
22
22
  mode: { type: null, required: false, default: "slideover" },
23
23
  menu: { type: null, required: false },
24
24
  toggle: { type: [Boolean, Object], required: false, default: true },
@@ -36,12 +36,12 @@ const props = defineProps({
36
36
  collapsedSize: { type: Number, required: false, default: 0 }
37
37
  });
38
38
  const slots = defineSlots();
39
+ const props = useComponentProps("dashboardSidebar", _props);
39
40
  const open = defineModel("open", { type: Boolean, ...{ default: false } });
40
41
  const collapsed = defineModel("collapsed", { type: Boolean, ...{ default: false } });
41
42
  const route = useRoute();
42
43
  const { t } = useLocale();
43
44
  const appConfig = useAppConfig();
44
- const uiProp = useComponentUI("dashboardSidebar", props);
45
45
  const dashboardContext = useDashboard({
46
46
  storageKey: "dashboard",
47
47
  unit: "%",
@@ -82,11 +82,11 @@ function toggleOpen() {
82
82
  <DefineToggleTemplate>
83
83
  <slot name="toggle" :open="open" :toggle="toggleOpen" :ui="ui">
84
84
  <UDashboardSidebarToggle
85
- v-if="toggle"
86
- v-bind="typeof toggle === 'object' ? toggle : {}"
87
- :side="toggleSide"
85
+ v-if="props.toggle"
86
+ v-bind="typeof props.toggle === 'object' ? props.toggle : {}"
87
+ :side="props.toggleSide"
88
88
  data-slot="toggle"
89
- :class="ui.toggle({ class: uiProp?.toggle, toggleSide })"
89
+ :class="ui.toggle({ class: props.ui?.toggle, toggleSide: props.toggleSide })"
90
90
  />
91
91
  </slot>
92
92
  </DefineToggleTemplate>
@@ -94,10 +94,10 @@ function toggleOpen() {
94
94
  <DefineResizeHandleTemplate>
95
95
  <slot name="resize-handle" :on-mouse-down="onMouseDown" :on-touch-start="onTouchStart" :on-double-click="onDoubleClick" :ui="ui">
96
96
  <UDashboardResizeHandle
97
- v-if="resizable"
97
+ v-if="props.resizable"
98
98
  :aria-controls="id"
99
99
  data-slot="handle"
100
- :class="ui.handle({ class: uiProp?.handle })"
100
+ :class="ui.handle({ class: props.ui?.handle })"
101
101
  @mousedown="onMouseDown"
102
102
  @touchstart="onTouchStart"
103
103
  @dblclick="onDoubleClick"
@@ -105,7 +105,7 @@ function toggleOpen() {
105
105
  </slot>
106
106
  </DefineResizeHandleTemplate>
107
107
 
108
- <ReuseResizeHandleTemplate v-if="side === 'right'" />
108
+ <ReuseResizeHandleTemplate v-if="props.side === 'right'" />
109
109
 
110
110
  <div
111
111
  :id="id"
@@ -114,23 +114,23 @@ function toggleOpen() {
114
114
  :data-collapsed="isCollapsed"
115
115
  :data-dragging="isDragging"
116
116
  data-slot="root"
117
- :class="ui.root({ class: [uiProp?.root, props.class] })"
117
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
118
118
  :style="{ '--width': `${size || 0}${dashboardContext.unit}` }"
119
119
  >
120
- <div v-if="!!slots.header" data-slot="header" :class="ui.header({ class: uiProp?.header })">
120
+ <div v-if="!!slots.header" data-slot="header" :class="ui.header({ class: props.ui?.header })">
121
121
  <slot name="header" :collapsed="isCollapsed" :collapse="collapse" />
122
122
  </div>
123
123
 
124
- <div data-slot="body" :class="ui.body({ class: uiProp?.body })">
124
+ <div data-slot="body" :class="ui.body({ class: props.ui?.body })">
125
125
  <slot :collapsed="isCollapsed" :collapse="collapse" />
126
126
  </div>
127
127
 
128
- <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: uiProp?.footer })">
128
+ <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
129
129
  <slot name="footer" :collapsed="isCollapsed" :collapse="collapse" />
130
130
  </div>
131
131
  </div>
132
132
 
133
- <ReuseResizeHandleTemplate v-if="side === 'left'" />
133
+ <ReuseResizeHandleTemplate v-if="props.side === 'left'" />
134
134
 
135
135
  <Menu
136
136
  v-model:open="open"
@@ -138,27 +138,27 @@ function toggleOpen() {
138
138
  :description="t('dashboardSidebar.description')"
139
139
  v-bind="menuProps"
140
140
  :ui="{
141
- overlay: ui.overlay({ class: uiProp?.overlay }),
142
- content: ui.content({ class: uiProp?.content })
141
+ overlay: ui.overlay({ class: props.ui?.overlay }),
142
+ content: ui.content({ class: props.ui?.content })
143
143
  }"
144
144
  >
145
145
  <template #content="contentData">
146
146
  <slot name="content" v-bind="contentData">
147
- <div v-if="!!slots.header || mode !== 'drawer'" data-slot="header" :class="ui.header({ class: uiProp?.header, menu: true })">
148
- <ReuseToggleTemplate v-if="mode !== 'drawer' && toggleSide === 'left'" />
147
+ <div v-if="!!slots.header || props.mode !== 'drawer'" data-slot="header" :class="ui.header({ class: props.ui?.header, menu: true })">
148
+ <ReuseToggleTemplate v-if="props.mode !== 'drawer' && props.toggleSide === 'left'" />
149
149
 
150
150
  <slot name="header" :collapsed="false" :collapse="() => {
151
151
  }" />
152
152
 
153
- <ReuseToggleTemplate v-if="mode !== 'drawer' && toggleSide === 'right'" />
153
+ <ReuseToggleTemplate v-if="props.mode !== 'drawer' && props.toggleSide === 'right'" />
154
154
  </div>
155
155
 
156
- <div data-slot="body" :class="ui.body({ class: uiProp?.body, menu: true })">
156
+ <div data-slot="body" :class="ui.body({ class: props.ui?.body, menu: true })">
157
157
  <slot :collapsed="false" :collapse="() => {
158
158
  }" />
159
159
  </div>
160
160
 
161
- <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: uiProp?.footer, menu: true })">
161
+ <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer, menu: true })">
162
162
  <slot name="footer" :collapsed="false" :collapse="() => {
163
163
  }" />
164
164
  </div>
@@ -10,7 +10,7 @@ type DashboardSidebarMenu<T> = T extends 'modal' ? ModalProps : T extends 'slide
10
10
  export interface DashboardSidebarProps<T extends DashboardSidebarMode = DashboardSidebarMode> extends Pick<UseResizableProps, 'id' | 'side' | 'minSize' | 'maxSize' | 'defaultSize' | 'resizable' | 'collapsible' | 'collapsedSize'> {
11
11
  /**
12
12
  * The mode of the sidebar menu.
13
- * @defaultValue 'modal'
13
+ * @defaultValue 'slideover'
14
14
  */
15
15
  mode?: T;
16
16
  /**
@@ -20,7 +20,7 @@ export interface DashboardSidebarCollapseProps extends Omit<ButtonProps, LinkPro
20
20
  declare const _default: typeof __VLS_export;
21
21
  export default _default;
22
22
  declare const __VLS_export: import("vue").DefineComponent<DashboardSidebarCollapseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarCollapseProps> & Readonly<{}>, {
23
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
23
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
24
24
  variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
25
25
  side: "left" | "right";
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -4,15 +4,15 @@ import theme from "#build/ui/dashboard-sidebar-collapse";
4
4
 
5
5
  <script setup>
6
6
  import { ref, computed } from "vue";
7
- import { useForwardProps } from "reka-ui";
8
7
  import { reactiveOmit } from "@vueuse/core";
9
8
  import { useAppConfig } from "#imports";
10
9
  import { useLocale } from "../composables/useLocale";
11
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ import { useForwardProps } from "../composables/useForwardProps";
12
12
  import { useDashboard } from "../utils/dashboard";
13
13
  import { tv } from "../utils/tv";
14
14
  import UButton from "./Button.vue";
15
- const props = defineProps({
15
+ const _props = defineProps({
16
16
  color: { type: null, required: false, default: "neutral" },
17
17
  variant: { type: null, required: false, default: "ghost" },
18
18
  side: { type: String, required: false, default: "left" },
@@ -40,10 +40,10 @@ const props = defineProps({
40
40
  exactActiveClass: { type: String, required: false },
41
41
  viewTransition: { type: Boolean, required: false }
42
42
  });
43
+ const props = useComponentProps("dashboardSidebarCollapse", _props);
43
44
  const buttonProps = useForwardProps(reactiveOmit(props, "icon", "side", "class"));
44
45
  const { t } = useLocale();
45
46
  const appConfig = useAppConfig();
46
- const uiProp = useComponentUI("dashboardSidebarCollapse", props);
47
47
  const { sidebarCollapsed, collapseSidebar } = useDashboard({ sidebarCollapsed: ref(false), collapseSidebar: () => {
48
48
  } });
49
49
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebarCollapse || {} }));
@@ -57,7 +57,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSide
57
57
  'aria-label': sidebarCollapsed ? t('dashboardSidebarCollapse.expand') : t('dashboardSidebarCollapse.collapse'),
58
58
  ...$attrs
59
59
  }"
60
- :class="ui({ class: [uiProp?.base, props.class], side: props.side })"
60
+ :class="ui({ class: [props.ui?.base, props.class], side: props.side })"
61
61
  @click="collapseSidebar?.(!sidebarCollapsed)"
62
62
  />
63
63
  </template>
@@ -20,7 +20,7 @@ export interface DashboardSidebarCollapseProps extends Omit<ButtonProps, LinkPro
20
20
  declare const _default: typeof __VLS_export;
21
21
  export default _default;
22
22
  declare const __VLS_export: import("vue").DefineComponent<DashboardSidebarCollapseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarCollapseProps> & Readonly<{}>, {
23
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
23
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
24
24
  variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
25
25
  side: "left" | "right";
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -20,7 +20,7 @@ export interface DashboardSidebarToggleProps extends Omit<ButtonProps, LinkProps
20
20
  declare const _default: typeof __VLS_export;
21
21
  export default _default;
22
22
  declare const __VLS_export: import("vue").DefineComponent<DashboardSidebarToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarToggleProps> & Readonly<{}>, {
23
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
23
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
24
24
  variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
25
25
  side: "left" | "right";
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -4,16 +4,16 @@ import theme from "#build/ui/dashboard-sidebar-toggle";
4
4
 
5
5
  <script setup>
6
6
  import { ref, computed } from "vue";
7
- import { useForwardProps } from "reka-ui";
8
7
  import { reactiveOmit } from "@vueuse/core";
9
8
  import { useAppConfig } from "#imports";
10
9
  import { useLocale } from "../composables/useLocale";
11
- import { useComponentUI } from "../composables/useComponentUI";
10
+ import { useComponentProps } from "../composables/useComponentProps";
11
+ import { useForwardProps } from "../composables/useForwardProps";
12
12
  import { useDashboard } from "../utils/dashboard";
13
13
  import { tv } from "../utils/tv";
14
14
  import UButton from "./Button.vue";
15
15
  defineOptions({ inheritAttrs: false });
16
- const props = defineProps({
16
+ const _props = defineProps({
17
17
  color: { type: null, required: false, default: "neutral" },
18
18
  variant: { type: null, required: false, default: "ghost" },
19
19
  side: { type: String, required: false, default: "left" },
@@ -41,10 +41,10 @@ const props = defineProps({
41
41
  exactActiveClass: { type: String, required: false },
42
42
  viewTransition: { type: Boolean, required: false }
43
43
  });
44
+ const props = useComponentProps("dashboardSidebarToggle", _props);
44
45
  const buttonProps = useForwardProps(reactiveOmit(props, "icon", "side", "class"));
45
46
  const { t } = useLocale();
46
47
  const appConfig = useAppConfig();
47
- const uiProp = useComponentUI("dashboardSidebarToggle", props);
48
48
  const { sidebarOpen, toggleSidebar } = useDashboard({ sidebarOpen: ref(false), toggleSidebar: () => {
49
49
  } });
50
50
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebarToggle || {} }));
@@ -58,7 +58,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSide
58
58
  'aria-label': sidebarOpen ? t('dashboardSidebarToggle.close') : t('dashboardSidebarToggle.open'),
59
59
  ...$attrs
60
60
  }"
61
- :class="ui({ class: [uiProp?.base, props.class], side: props.side })"
61
+ :class="ui({ class: [props.ui?.base, props.class], side: props.side })"
62
62
  @click="toggleSidebar"
63
63
  />
64
64
  </template>
@@ -20,7 +20,7 @@ export interface DashboardSidebarToggleProps extends Omit<ButtonProps, LinkProps
20
20
  declare const _default: typeof __VLS_export;
21
21
  export default _default;
22
22
  declare const __VLS_export: import("vue").DefineComponent<DashboardSidebarToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarToggleProps> & Readonly<{}>, {
23
- color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
23
+ color: "error" | "neutral" | "primary" | "secondary" | "success" | "info" | "warning";
24
24
  variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
25
25
  side: "left" | "right";
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;