@nuxt/ui 4.0.1 → 4.2.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 (499) hide show
  1. package/cli/templates.mjs +16 -4
  2. package/dist/module.d.mts +25 -0
  3. package/dist/module.json +2 -2
  4. package/dist/module.mjs +7 -4
  5. package/dist/runtime/components/Accordion.d.vue.ts +7 -1
  6. package/dist/runtime/components/Accordion.vue +13 -12
  7. package/dist/runtime/components/Accordion.vue.d.ts +7 -1
  8. package/dist/runtime/components/Alert.d.vue.ts +4 -4
  9. package/dist/runtime/components/Alert.vue +10 -9
  10. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  11. package/dist/runtime/components/App.d.vue.ts +1 -1
  12. package/dist/runtime/components/App.vue +2 -1
  13. package/dist/runtime/components/App.vue.d.ts +1 -1
  14. package/dist/runtime/components/AuthForm.d.vue.ts +12 -9
  15. package/dist/runtime/components/AuthForm.vue +29 -21
  16. package/dist/runtime/components/AuthForm.vue.d.ts +12 -9
  17. package/dist/runtime/components/Avatar.d.vue.ts +7 -5
  18. package/dist/runtime/components/Avatar.vue +14 -5
  19. package/dist/runtime/components/Avatar.vue.d.ts +7 -5
  20. package/dist/runtime/components/AvatarGroup.vue +3 -3
  21. package/dist/runtime/components/Badge.d.vue.ts +9 -3
  22. package/dist/runtime/components/Badge.vue +8 -8
  23. package/dist/runtime/components/Badge.vue.d.ts +9 -3
  24. package/dist/runtime/components/Banner.d.vue.ts +4 -2
  25. package/dist/runtime/components/Banner.vue +10 -9
  26. package/dist/runtime/components/Banner.vue.d.ts +4 -2
  27. package/dist/runtime/components/BlogPost.d.vue.ts +9 -3
  28. package/dist/runtime/components/BlogPost.vue +21 -12
  29. package/dist/runtime/components/BlogPost.vue.d.ts +9 -3
  30. package/dist/runtime/components/BlogPosts.d.vue.ts +22 -13
  31. package/dist/runtime/components/BlogPosts.vue +8 -2
  32. package/dist/runtime/components/BlogPosts.vue.d.ts +22 -13
  33. package/dist/runtime/components/Breadcrumb.d.vue.ts +19 -4
  34. package/dist/runtime/components/Breadcrumb.vue +14 -14
  35. package/dist/runtime/components/Breadcrumb.vue.d.ts +19 -4
  36. package/dist/runtime/components/Button.d.vue.ts +9 -3
  37. package/dist/runtime/components/Button.vue +9 -7
  38. package/dist/runtime/components/Button.vue.d.ts +9 -3
  39. package/dist/runtime/components/Calendar.d.vue.ts +4 -0
  40. package/dist/runtime/components/Calendar.vue +15 -9
  41. package/dist/runtime/components/Calendar.vue.d.ts +4 -0
  42. package/dist/runtime/components/Card.vue +4 -4
  43. package/dist/runtime/components/Carousel.vue +10 -5
  44. package/dist/runtime/components/ChangelogVersion.d.vue.ts +12 -4
  45. package/dist/runtime/components/ChangelogVersion.vue +25 -17
  46. package/dist/runtime/components/ChangelogVersion.vue.d.ts +12 -4
  47. package/dist/runtime/components/ChangelogVersions.d.vue.ts +8 -36
  48. package/dist/runtime/components/ChangelogVersions.vue +6 -6
  49. package/dist/runtime/components/ChangelogVersions.vue.d.ts +8 -36
  50. package/dist/runtime/components/ChatMessage.d.vue.ts +1 -0
  51. package/dist/runtime/components/ChatMessage.vue +8 -8
  52. package/dist/runtime/components/ChatMessage.vue.d.ts +1 -0
  53. package/dist/runtime/components/ChatMessages.d.vue.ts +14 -15
  54. package/dist/runtime/components/ChatMessages.vue +28 -10
  55. package/dist/runtime/components/ChatMessages.vue.d.ts +14 -15
  56. package/dist/runtime/components/ChatPalette.vue +3 -3
  57. package/dist/runtime/components/ChatPrompt.d.vue.ts +3 -6
  58. package/dist/runtime/components/ChatPrompt.vue +23 -14
  59. package/dist/runtime/components/ChatPrompt.vue.d.ts +3 -6
  60. package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +4 -4
  61. package/dist/runtime/components/ChatPromptSubmit.vue +51 -4
  62. package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +4 -4
  63. package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
  64. package/dist/runtime/components/Checkbox.vue +9 -8
  65. package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
  66. package/dist/runtime/components/CheckboxGroup.vue +7 -4
  67. package/dist/runtime/components/Chip.vue +2 -2
  68. package/dist/runtime/components/Collapsible.vue +2 -2
  69. package/dist/runtime/components/ColorPicker.vue +7 -3
  70. package/dist/runtime/components/CommandPalette.d.vue.ts +43 -12
  71. package/dist/runtime/components/CommandPalette.vue +175 -84
  72. package/dist/runtime/components/CommandPalette.vue.d.ts +43 -12
  73. package/dist/runtime/components/ContextMenu.d.vue.ts +28 -6
  74. package/dist/runtime/components/ContextMenu.vue +2 -0
  75. package/dist/runtime/components/ContextMenu.vue.d.ts +28 -6
  76. package/dist/runtime/components/ContextMenuContent.d.vue.ts +2 -3
  77. package/dist/runtime/components/ContextMenuContent.vue +35 -23
  78. package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -3
  79. package/dist/runtime/components/DashboardNavbar.d.vue.ts +9 -3
  80. package/dist/runtime/components/DashboardNavbar.vue +10 -9
  81. package/dist/runtime/components/DashboardNavbar.vue.d.ts +9 -3
  82. package/dist/runtime/components/DashboardPanel.vue +3 -1
  83. package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -1
  84. package/dist/runtime/components/DashboardSearch.vue +4 -3
  85. package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -1
  86. package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -3
  87. package/dist/runtime/components/DashboardSearchButton.vue +48 -10
  88. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -3
  89. package/dist/runtime/components/DashboardSidebar.d.vue.ts +5 -1
  90. package/dist/runtime/components/DashboardSidebar.vue +13 -10
  91. package/dist/runtime/components/DashboardSidebar.vue.d.ts +5 -1
  92. package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +7 -4
  93. package/dist/runtime/components/DashboardSidebarCollapse.vue +51 -7
  94. package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +7 -4
  95. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +7 -4
  96. package/dist/runtime/components/DashboardSidebarToggle.vue +52 -7
  97. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +7 -4
  98. package/dist/runtime/components/DashboardToolbar.vue +3 -3
  99. package/dist/runtime/components/Drawer.d.vue.ts +1 -1
  100. package/dist/runtime/components/Drawer.vue +11 -14
  101. package/dist/runtime/components/Drawer.vue.d.ts +1 -1
  102. package/dist/runtime/components/DropdownMenu.d.vue.ts +28 -6
  103. package/dist/runtime/components/DropdownMenu.vue +3 -1
  104. package/dist/runtime/components/DropdownMenu.vue.d.ts +28 -6
  105. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +8 -5
  106. package/dist/runtime/components/DropdownMenuContent.vue +35 -23
  107. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
  108. package/dist/runtime/components/Empty.d.vue.ts +53 -0
  109. package/dist/runtime/components/Empty.vue +68 -0
  110. package/dist/runtime/components/Empty.vue.d.ts +53 -0
  111. package/dist/runtime/components/Error.d.vue.ts +1 -2
  112. package/dist/runtime/components/Error.vue +6 -6
  113. package/dist/runtime/components/Error.vue.d.ts +1 -2
  114. package/dist/runtime/components/FileUpload.d.vue.ts +14 -3
  115. package/dist/runtime/components/FileUpload.vue +41 -30
  116. package/dist/runtime/components/FileUpload.vue.d.ts +14 -3
  117. package/dist/runtime/components/Footer.vue +7 -7
  118. package/dist/runtime/components/FooterColumns.d.vue.ts +9 -2
  119. package/dist/runtime/components/FooterColumns.vue +13 -13
  120. package/dist/runtime/components/FooterColumns.vue.d.ts +9 -2
  121. package/dist/runtime/components/Form.d.vue.ts +3 -2
  122. package/dist/runtime/components/Form.vue +3 -4
  123. package/dist/runtime/components/Form.vue.d.ts +3 -2
  124. package/dist/runtime/components/FormField.vue +8 -8
  125. package/dist/runtime/components/Header.d.vue.ts +4 -1
  126. package/dist/runtime/components/Header.vue +12 -11
  127. package/dist/runtime/components/Header.vue.d.ts +4 -1
  128. package/dist/runtime/components/Input.d.vue.ts +15 -9
  129. package/dist/runtime/components/Input.vue +12 -11
  130. package/dist/runtime/components/Input.vue.d.ts +15 -9
  131. package/dist/runtime/components/InputDate.d.vue.ts +89 -0
  132. package/dist/runtime/components/InputDate.vue +161 -0
  133. package/dist/runtime/components/InputDate.vue.d.ts +89 -0
  134. package/dist/runtime/components/InputMenu.d.vue.ts +46 -137
  135. package/dist/runtime/components/InputMenu.vue +143 -83
  136. package/dist/runtime/components/InputMenu.vue.d.ts +46 -137
  137. package/dist/runtime/components/InputNumber.d.vue.ts +26 -127
  138. package/dist/runtime/components/InputNumber.vue +13 -12
  139. package/dist/runtime/components/InputNumber.vue.d.ts +26 -127
  140. package/dist/runtime/components/InputTags.d.vue.ts +15 -111
  141. package/dist/runtime/components/InputTags.vue +24 -20
  142. package/dist/runtime/components/InputTags.vue.d.ts +15 -111
  143. package/dist/runtime/components/InputTime.d.vue.ts +72 -0
  144. package/dist/runtime/components/InputTime.vue +137 -0
  145. package/dist/runtime/components/InputTime.vue.d.ts +72 -0
  146. package/dist/runtime/components/Link.d.vue.ts +4 -49
  147. package/dist/runtime/components/Link.vue +1 -0
  148. package/dist/runtime/components/Link.vue.d.ts +4 -49
  149. package/dist/runtime/components/Main.d.vue.ts +2 -4
  150. package/dist/runtime/components/Main.vue +1 -1
  151. package/dist/runtime/components/Main.vue.d.ts +2 -4
  152. package/dist/runtime/components/Marquee.d.vue.ts +1 -1
  153. package/dist/runtime/components/Marquee.vue +2 -6
  154. package/dist/runtime/components/Marquee.vue.d.ts +1 -1
  155. package/dist/runtime/components/Modal.d.vue.ts +8 -6
  156. package/dist/runtime/components/Modal.vue +55 -22
  157. package/dist/runtime/components/Modal.vue.d.ts +8 -6
  158. package/dist/runtime/components/NavigationMenu.d.vue.ts +60 -13
  159. package/dist/runtime/components/NavigationMenu.vue +86 -49
  160. package/dist/runtime/components/NavigationMenu.vue.d.ts +60 -13
  161. package/dist/runtime/components/Page.vue +4 -4
  162. package/dist/runtime/components/PageAnchors.d.vue.ts +9 -2
  163. package/dist/runtime/components/PageAnchors.vue +10 -10
  164. package/dist/runtime/components/PageAnchors.vue.d.ts +9 -2
  165. package/dist/runtime/components/PageAside.vue +6 -6
  166. package/dist/runtime/components/PageCTA.vue +9 -9
  167. package/dist/runtime/components/PageCard.d.vue.ts +3 -1
  168. package/dist/runtime/components/PageCard.vue +12 -11
  169. package/dist/runtime/components/PageCard.vue.d.ts +3 -1
  170. package/dist/runtime/components/PageFeature.d.vue.ts +3 -1
  171. package/dist/runtime/components/PageFeature.vue +7 -7
  172. package/dist/runtime/components/PageFeature.vue.d.ts +3 -1
  173. package/dist/runtime/components/PageHeader.vue +7 -7
  174. package/dist/runtime/components/PageHero.vue +10 -10
  175. package/dist/runtime/components/PageLinks.d.vue.ts +9 -2
  176. package/dist/runtime/components/PageLinks.vue +10 -10
  177. package/dist/runtime/components/PageLinks.vue.d.ts +9 -2
  178. package/dist/runtime/components/PageLogos.vue +6 -3
  179. package/dist/runtime/components/PageSection.d.vue.ts +3 -1
  180. package/dist/runtime/components/PageSection.vue +14 -14
  181. package/dist/runtime/components/PageSection.vue.d.ts +3 -1
  182. package/dist/runtime/components/Pagination.d.vue.ts +5 -3
  183. package/dist/runtime/components/Pagination.vue +9 -9
  184. package/dist/runtime/components/Pagination.vue.d.ts +5 -3
  185. package/dist/runtime/components/PinInput.d.vue.ts +2 -2
  186. package/dist/runtime/components/PinInput.vue +2 -0
  187. package/dist/runtime/components/PinInput.vue.d.ts +2 -2
  188. package/dist/runtime/components/Popover.d.vue.ts +24 -23
  189. package/dist/runtime/components/Popover.vue +6 -6
  190. package/dist/runtime/components/Popover.vue.d.ts +24 -23
  191. package/dist/runtime/components/PricingPlan.d.vue.ts +9 -3
  192. package/dist/runtime/components/PricingPlan.vue +31 -24
  193. package/dist/runtime/components/PricingPlan.vue.d.ts +9 -3
  194. package/dist/runtime/components/PricingPlans.d.vue.ts +20 -13
  195. package/dist/runtime/components/PricingPlans.vue +7 -1
  196. package/dist/runtime/components/PricingPlans.vue.d.ts +20 -13
  197. package/dist/runtime/components/PricingTable.vue +35 -31
  198. package/dist/runtime/components/Progress.d.vue.ts +1 -1
  199. package/dist/runtime/components/Progress.vue +6 -6
  200. package/dist/runtime/components/Progress.vue.d.ts +1 -1
  201. package/dist/runtime/components/RadioGroup.d.vue.ts +5 -5
  202. package/dist/runtime/components/RadioGroup.vue +13 -11
  203. package/dist/runtime/components/RadioGroup.vue.d.ts +5 -5
  204. package/dist/runtime/components/Select.d.vue.ts +25 -115
  205. package/dist/runtime/components/Select.vue +41 -29
  206. package/dist/runtime/components/Select.vue.d.ts +25 -115
  207. package/dist/runtime/components/SelectMenu.d.vue.ts +43 -114
  208. package/dist/runtime/components/SelectMenu.vue +145 -78
  209. package/dist/runtime/components/SelectMenu.vue.d.ts +43 -114
  210. package/dist/runtime/components/Separator.d.vue.ts +3 -1
  211. package/dist/runtime/components/Separator.vue +8 -8
  212. package/dist/runtime/components/Separator.vue.d.ts +3 -1
  213. package/dist/runtime/components/Slideover.d.vue.ts +3 -6
  214. package/dist/runtime/components/Slideover.vue +12 -13
  215. package/dist/runtime/components/Slideover.vue.d.ts +3 -6
  216. package/dist/runtime/components/Slider.vue +5 -4
  217. package/dist/runtime/components/Stepper.d.vue.ts +4 -1
  218. package/dist/runtime/components/Stepper.vue +13 -11
  219. package/dist/runtime/components/Stepper.vue.d.ts +4 -1
  220. package/dist/runtime/components/Switch.d.vue.ts +2 -1
  221. package/dist/runtime/components/Switch.vue +10 -9
  222. package/dist/runtime/components/Switch.vue.d.ts +2 -1
  223. package/dist/runtime/components/Table.d.vue.ts +25 -4
  224. package/dist/runtime/components/Table.vue +156 -71
  225. package/dist/runtime/components/Table.vue.d.ts +25 -4
  226. package/dist/runtime/components/Tabs.d.vue.ts +8 -3
  227. package/dist/runtime/components/Tabs.vue +13 -10
  228. package/dist/runtime/components/Tabs.vue.d.ts +8 -3
  229. package/dist/runtime/components/Textarea.d.vue.ts +15 -8
  230. package/dist/runtime/components/Textarea.vue +12 -11
  231. package/dist/runtime/components/Textarea.vue.d.ts +15 -8
  232. package/dist/runtime/components/Timeline.vue +16 -7
  233. package/dist/runtime/components/Toast.d.vue.ts +4 -4
  234. package/dist/runtime/components/Toast.vue +16 -13
  235. package/dist/runtime/components/Toast.vue.d.ts +4 -4
  236. package/dist/runtime/components/Toaster.d.vue.ts +6 -0
  237. package/dist/runtime/components/Toaster.vue +8 -3
  238. package/dist/runtime/components/Toaster.vue.d.ts +6 -0
  239. package/dist/runtime/components/Tooltip.d.vue.ts +3 -1
  240. package/dist/runtime/components/Tooltip.vue +5 -5
  241. package/dist/runtime/components/Tooltip.vue.d.ts +3 -1
  242. package/dist/runtime/components/Tree.d.vue.ts +43 -5
  243. package/dist/runtime/components/Tree.vue +176 -81
  244. package/dist/runtime/components/Tree.vue.d.ts +43 -5
  245. package/dist/runtime/components/User.d.vue.ts +3 -1
  246. package/dist/runtime/components/User.vue +14 -7
  247. package/dist/runtime/components/User.vue.d.ts +3 -1
  248. package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +3 -3
  249. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -4
  250. package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +3 -3
  251. package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +6 -13
  252. package/dist/runtime/components/color-mode/ColorModeButton.vue +59 -18
  253. package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +6 -13
  254. package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +4 -3
  255. package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -0
  256. package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +4 -3
  257. package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
  258. package/dist/runtime/components/color-mode/ColorModeSelect.vue +45 -5
  259. package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
  260. package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +2 -2
  261. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +29 -5
  262. package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +2 -2
  263. package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -0
  264. package/dist/runtime/components/content/ContentNavigation.vue +18 -17
  265. package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -0
  266. package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -1
  267. package/dist/runtime/components/content/ContentSearch.vue +64 -67
  268. package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -1
  269. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -3
  270. package/dist/runtime/components/content/ContentSearchButton.vue +48 -10
  271. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -3
  272. package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -0
  273. package/dist/runtime/components/content/ContentSurround.vue +10 -10
  274. package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -0
  275. package/dist/runtime/components/content/ContentToc.d.vue.ts +2 -0
  276. package/dist/runtime/components/content/ContentToc.vue +17 -17
  277. package/dist/runtime/components/content/ContentToc.vue.d.ts +2 -0
  278. package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +10 -6
  279. package/dist/runtime/components/locale/LocaleSelect.vue +54 -6
  280. package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +10 -6
  281. package/dist/runtime/components/prose/Accordion.d.vue.ts +6 -0
  282. package/dist/runtime/components/prose/Accordion.vue +3 -2
  283. package/dist/runtime/components/prose/Accordion.vue.d.ts +6 -0
  284. package/dist/runtime/components/prose/CodeTree.vue +40 -36
  285. package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -2
  286. package/dist/runtime/components/prose/Collapsible.vue +2 -2
  287. package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -2
  288. package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
  289. package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
  290. package/dist/runtime/components/prose/Img.vue +14 -3
  291. package/dist/runtime/components/prose/Tabs.d.vue.ts +6 -0
  292. package/dist/runtime/components/prose/Tabs.vue +3 -2
  293. package/dist/runtime/components/prose/Tabs.vue.d.ts +6 -0
  294. package/dist/runtime/composables/index.d.ts +8 -0
  295. package/dist/runtime/composables/index.js +8 -0
  296. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  297. package/dist/runtime/composables/useContentSearch.d.ts +5 -0
  298. package/dist/runtime/composables/useContentSearch.js +31 -1
  299. package/dist/runtime/composables/useFieldGroup.d.ts +1 -1
  300. package/dist/runtime/composables/useFileUpload.d.ts +2 -1
  301. package/dist/runtime/composables/useFileUpload.js +13 -4
  302. package/dist/runtime/composables/useFormField.d.ts +1 -1
  303. package/dist/runtime/composables/useKbd.js +1 -1
  304. package/dist/runtime/composables/useToast.d.ts +3 -1
  305. package/dist/runtime/composables/useToast.js +4 -3
  306. package/dist/runtime/index.css +1 -1
  307. package/dist/runtime/inertia/components/Link.d.vue.ts +17 -10
  308. package/dist/runtime/inertia/components/Link.vue +19 -13
  309. package/dist/runtime/inertia/components/Link.vue.d.ts +17 -10
  310. package/dist/runtime/inertia/stubs.js +1 -1
  311. package/dist/runtime/keyframes.css +1 -1
  312. package/dist/runtime/locale/gl.d.ts +3 -0
  313. package/dist/runtime/locale/gl.js +129 -0
  314. package/dist/runtime/locale/hr.d.ts +3 -0
  315. package/dist/runtime/locale/hr.js +129 -0
  316. package/dist/runtime/locale/index.d.ts +3 -0
  317. package/dist/runtime/locale/index.js +3 -0
  318. package/dist/runtime/locale/sq.d.ts +3 -0
  319. package/dist/runtime/locale/sq.js +129 -0
  320. package/dist/runtime/plugins/colors.js +8 -6
  321. package/dist/runtime/types/html.d.ts +8 -0
  322. package/dist/runtime/types/html.js +0 -0
  323. package/dist/runtime/types/index.d.ts +7 -1
  324. package/dist/runtime/types/index.js +7 -1
  325. package/dist/runtime/types/input.d.ts +5 -5
  326. package/dist/runtime/types/tv.d.ts +6 -0
  327. package/dist/runtime/types/utils.d.ts +2 -0
  328. package/dist/runtime/utils/content.d.ts +2 -2
  329. package/dist/runtime/utils/link.d.ts +1 -0
  330. package/dist/runtime/utils/link.js +40 -24
  331. package/dist/runtime/utils/virtualizer.d.ts +6 -0
  332. package/dist/runtime/utils/virtualizer.js +30 -0
  333. package/dist/runtime/vue/components/Link.d.vue.ts +8 -37
  334. package/dist/runtime/vue/components/Link.vue +5 -10
  335. package/dist/runtime/vue/components/Link.vue.d.ts +8 -37
  336. package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +5 -3
  337. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +44 -3
  338. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -3
  339. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +1 -1
  340. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +24 -3
  341. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
  342. package/dist/runtime/vue/stubs.d.ts +1 -1
  343. package/dist/runtime/vue/stubs.js +1 -1
  344. package/dist/shared/{ui.D-FDXAUi.mjs → ui.B77q-Dvh.mjs} +679 -102
  345. package/dist/unplugin.d.mts +1 -0
  346. package/dist/unplugin.mjs +31 -2
  347. package/dist/vite.mjs +5 -2
  348. package/package.json +46 -40
  349. package/.nuxt/ui/accordion.ts +0 -20
  350. package/.nuxt/ui/alert.ts +0 -264
  351. package/.nuxt/ui/auth-form.ts +0 -20
  352. package/.nuxt/ui/avatar-group.ts +0 -52
  353. package/.nuxt/ui/avatar.ts +0 -54
  354. package/.nuxt/ui/badge.ts +0 -263
  355. package/.nuxt/ui/banner.ts +0 -108
  356. package/.nuxt/ui/blog-post.ts +0 -142
  357. package/.nuxt/ui/blog-posts.ts +0 -9
  358. package/.nuxt/ui/breadcrumb.ts +0 -45
  359. package/.nuxt/ui/button.ts +0 -378
  360. package/.nuxt/ui/calendar.ts +0 -103
  361. package/.nuxt/ui/card.ts +0 -34
  362. package/.nuxt/ui/carousel.ts +0 -38
  363. package/.nuxt/ui/changelog-version.ts +0 -41
  364. package/.nuxt/ui/changelog-versions.ts +0 -8
  365. package/.nuxt/ui/chat-message.ts +0 -129
  366. package/.nuxt/ui/chat-messages.ts +0 -14
  367. package/.nuxt/ui/chat-palette.ts +0 -8
  368. package/.nuxt/ui/chat-prompt-submit.ts +0 -5
  369. package/.nuxt/ui/chat-prompt.ts +0 -35
  370. package/.nuxt/ui/checkbox-group.ts +0 -204
  371. package/.nuxt/ui/checkbox.ts +0 -236
  372. package/.nuxt/ui/chip.ts +0 -96
  373. package/.nuxt/ui/collapsible.ts +0 -6
  374. package/.nuxt/ui/color-picker.ts +0 -47
  375. package/.nuxt/ui/command-palette.ts +0 -52
  376. package/.nuxt/ui/container.ts +0 -3
  377. package/.nuxt/ui/content/content-navigation.ts +0 -368
  378. package/.nuxt/ui/content/content-search-button.ts +0 -6
  379. package/.nuxt/ui/content/content-search.ts +0 -13
  380. package/.nuxt/ui/content/content-surround.ts +0 -34
  381. package/.nuxt/ui/content/content-toc.ts +0 -155
  382. package/.nuxt/ui/context-menu.ts +0 -217
  383. package/.nuxt/ui/dashboard-group.ts +0 -3
  384. package/.nuxt/ui/dashboard-navbar.ts +0 -21
  385. package/.nuxt/ui/dashboard-panel.ts +0 -17
  386. package/.nuxt/ui/dashboard-resize-handle.ts +0 -3
  387. package/.nuxt/ui/dashboard-search-button.ts +0 -6
  388. package/.nuxt/ui/dashboard-search.ts +0 -13
  389. package/.nuxt/ui/dashboard-sidebar-collapse.ts +0 -9
  390. package/.nuxt/ui/dashboard-sidebar-toggle.ts +0 -9
  391. package/.nuxt/ui/dashboard-sidebar.ts +0 -37
  392. package/.nuxt/ui/dashboard-toolbar.ts +0 -7
  393. package/.nuxt/ui/drawer.ts +0 -149
  394. package/.nuxt/ui/dropdown-menu.ts +0 -218
  395. package/.nuxt/ui/error.ts +0 -9
  396. package/.nuxt/ui/field-group.ts +0 -16
  397. package/.nuxt/ui/file-upload.ts +0 -290
  398. package/.nuxt/ui/footer-columns.ts +0 -28
  399. package/.nuxt/ui/footer.ts +0 -11
  400. package/.nuxt/ui/form-field.ts +0 -48
  401. package/.nuxt/ui/form.ts +0 -3
  402. package/.nuxt/ui/header.ts +0 -25
  403. package/.nuxt/ui/index.ts +0 -105
  404. package/.nuxt/ui/input-menu.ts +0 -450
  405. package/.nuxt/ui/input-number.ts +0 -245
  406. package/.nuxt/ui/input-tags.ts +0 -310
  407. package/.nuxt/ui/input.ts +0 -289
  408. package/.nuxt/ui/kbd.ts +0 -195
  409. package/.nuxt/ui/link.ts +0 -22
  410. package/.nuxt/ui/main.ts +0 -3
  411. package/.nuxt/ui/marquee.ts +0 -66
  412. package/.nuxt/ui/modal.ts +0 -29
  413. package/.nuxt/ui/navigation-menu.ts +0 -510
  414. package/.nuxt/ui/page-anchors.ts +0 -30
  415. package/.nuxt/ui/page-aside.ts +0 -10
  416. package/.nuxt/ui/page-body.ts +0 -3
  417. package/.nuxt/ui/page-card.ts +0 -279
  418. package/.nuxt/ui/page-columns.ts +0 -3
  419. package/.nuxt/ui/page-cta.ts +0 -70
  420. package/.nuxt/ui/page-feature.ts +0 -26
  421. package/.nuxt/ui/page-grid.ts +0 -3
  422. package/.nuxt/ui/page-header.ts +0 -18
  423. package/.nuxt/ui/page-hero.ts +0 -44
  424. package/.nuxt/ui/page-links.ts +0 -25
  425. package/.nuxt/ui/page-list.ts +0 -8
  426. package/.nuxt/ui/page-logos.ts +0 -15
  427. package/.nuxt/ui/page-section.ts +0 -84
  428. package/.nuxt/ui/page.ts +0 -32
  429. package/.nuxt/ui/pagination.ts +0 -13
  430. package/.nuxt/ui/pin-input.ts +0 -171
  431. package/.nuxt/ui/popover.ts +0 -6
  432. package/.nuxt/ui/pricing-plan.ts +0 -101
  433. package/.nuxt/ui/pricing-plans.ts +0 -22
  434. package/.nuxt/ui/pricing-table.ts +0 -51
  435. package/.nuxt/ui/progress.ts +0 -297
  436. package/.nuxt/ui/prose/a.ts +0 -6
  437. package/.nuxt/ui/prose/accordion-item.ts +0 -3
  438. package/.nuxt/ui/prose/accordion.ts +0 -6
  439. package/.nuxt/ui/prose/badge.ts +0 -3
  440. package/.nuxt/ui/prose/blockquote.ts +0 -3
  441. package/.nuxt/ui/prose/callout.ts +0 -129
  442. package/.nuxt/ui/prose/card-group.ts +0 -3
  443. package/.nuxt/ui/prose/card.ts +0 -119
  444. package/.nuxt/ui/prose/code-collapse.ts +0 -19
  445. package/.nuxt/ui/prose/code-group.ts +0 -13
  446. package/.nuxt/ui/prose/code-icon.ts +0 -66
  447. package/.nuxt/ui/prose/code-preview.ts +0 -14
  448. package/.nuxt/ui/prose/code-tree.ts +0 -28
  449. package/.nuxt/ui/prose/code.ts +0 -27
  450. package/.nuxt/ui/prose/collapsible.ts +0 -12
  451. package/.nuxt/ui/prose/em.ts +0 -3
  452. package/.nuxt/ui/prose/field-group.ts +0 -3
  453. package/.nuxt/ui/prose/field.ts +0 -11
  454. package/.nuxt/ui/prose/h1.ts +0 -6
  455. package/.nuxt/ui/prose/h2.ts +0 -14
  456. package/.nuxt/ui/prose/h3.ts +0 -14
  457. package/.nuxt/ui/prose/h4.ts +0 -6
  458. package/.nuxt/ui/prose/hr.ts +0 -3
  459. package/.nuxt/ui/prose/icon.ts +0 -3
  460. package/.nuxt/ui/prose/img.ts +0 -22
  461. package/.nuxt/ui/prose/index.ts +0 -41
  462. package/.nuxt/ui/prose/kbd.ts +0 -3
  463. package/.nuxt/ui/prose/li.ts +0 -3
  464. package/.nuxt/ui/prose/ol.ts +0 -3
  465. package/.nuxt/ui/prose/p.ts +0 -3
  466. package/.nuxt/ui/prose/pre.ts +0 -17
  467. package/.nuxt/ui/prose/steps.ts +0 -19
  468. package/.nuxt/ui/prose/strong.ts +0 -3
  469. package/.nuxt/ui/prose/table.ts +0 -6
  470. package/.nuxt/ui/prose/tabs-item.ts +0 -3
  471. package/.nuxt/ui/prose/tabs.ts +0 -5
  472. package/.nuxt/ui/prose/tbody.ts +0 -3
  473. package/.nuxt/ui/prose/td.ts +0 -3
  474. package/.nuxt/ui/prose/th.ts +0 -3
  475. package/.nuxt/ui/prose/thead.ts +0 -3
  476. package/.nuxt/ui/prose/tr.ts +0 -3
  477. package/.nuxt/ui/prose/ul.ts +0 -3
  478. package/.nuxt/ui/radio-group.ts +0 -350
  479. package/.nuxt/ui/select-menu.ts +0 -351
  480. package/.nuxt/ui/select.ts +0 -346
  481. package/.nuxt/ui/separator.ts +0 -172
  482. package/.nuxt/ui/skeleton.ts +0 -3
  483. package/.nuxt/ui/slideover.ts +0 -71
  484. package/.nuxt/ui/slider.ts +0 -171
  485. package/.nuxt/ui/stepper.ts +0 -202
  486. package/.nuxt/ui/switch.ts +0 -131
  487. package/.nuxt/ui/table.ts +0 -156
  488. package/.nuxt/ui/tabs.ts +0 -258
  489. package/.nuxt/ui/textarea.ts +0 -294
  490. package/.nuxt/ui/timeline.ts +0 -321
  491. package/.nuxt/ui/toast.ts +0 -74
  492. package/.nuxt/ui/toaster.ts +0 -91
  493. package/.nuxt/ui/tooltip.ts +0 -9
  494. package/.nuxt/ui/tree.ts +0 -154
  495. package/.nuxt/ui/user.ts +0 -101
  496. package/.nuxt/ui.css +0 -146
  497. package/dist/runtime/vue/components/color-mode/ColorModeButton.d.vue.ts +0 -17
  498. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +0 -35
  499. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +0 -17
@@ -5,7 +5,7 @@ import theme from "#build/ui/modal";
5
5
  <script setup>
6
6
  import { computed, toRef } from "vue";
7
7
  import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden, useForwardPropsEmits } from "reka-ui";
8
- import { reactivePick } from "@vueuse/core";
8
+ import { reactivePick, createReusableTemplate } from "@vueuse/core";
9
9
  import { useAppConfig } from "#imports";
10
10
  import { useLocale } from "../composables/useLocale";
11
11
  import { usePortal } from "../composables/usePortal";
@@ -16,6 +16,7 @@ const props = defineProps({
16
16
  description: { type: String, required: false },
17
17
  content: { type: Object, required: false },
18
18
  overlay: { type: Boolean, required: false, default: true },
19
+ scrollable: { type: Boolean, required: false },
19
20
  transition: { type: Boolean, required: false, default: true },
20
21
  fullscreen: { type: Boolean, required: false },
21
22
  portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
@@ -36,9 +37,6 @@ const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen"
36
37
  const portalProps = usePortal(toRef(() => props.portal));
37
38
  const contentProps = toRef(() => props.content);
38
39
  const contentEvents = computed(() => {
39
- const defaultEvents = {
40
- closeAutoFocus: (e) => e.preventDefault()
41
- };
42
40
  if (!props.dismissible) {
43
41
  const events = ["pointerDownOutside", "interactOutside", "escapeKeyDown"];
44
42
  return events.reduce((acc, curr) => {
@@ -47,26 +45,42 @@ const contentEvents = computed(() => {
47
45
  emits("close:prevent");
48
46
  };
49
47
  return acc;
50
- }, defaultEvents);
48
+ }, {});
51
49
  }
52
- return defaultEvents;
50
+ if (props.scrollable) {
51
+ return {
52
+ // FIXME: This is a workaround to prevent the modal from closing when clicking on the scrollbar https://reka-ui.com/docs/components/dialog#scrollable-overlay but it's not working on Mac OS.
53
+ pointerDownOutside: (e) => {
54
+ const originalEvent = e.detail.originalEvent;
55
+ const target = originalEvent.target;
56
+ if (originalEvent.offsetX > target.clientWidth || originalEvent.offsetY > target.clientHeight) {
57
+ e.preventDefault();
58
+ }
59
+ }
60
+ };
61
+ }
62
+ return {};
53
63
  });
64
+ const [DefineContentTemplate, ReuseContentTemplate] = createReusableTemplate();
54
65
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.modal || {} })({
55
66
  transition: props.transition,
56
- fullscreen: props.fullscreen
67
+ fullscreen: props.fullscreen,
68
+ overlay: props.overlay,
69
+ scrollable: props.scrollable
57
70
  }));
58
71
  </script>
59
72
 
60
73
  <template>
61
74
  <DialogRoot v-slot="{ open, close }" v-bind="rootProps">
62
- <DialogTrigger v-if="!!slots.default" as-child :class="props.class">
63
- <slot :open="open" />
64
- </DialogTrigger>
65
-
66
- <DialogPortal v-bind="portalProps">
67
- <DialogOverlay v-if="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
68
-
69
- <DialogContent :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" @after-enter="emits('after:enter')" @after-leave="emits('after:leave')" v-on="contentEvents">
75
+ <DefineContentTemplate>
76
+ <DialogContent
77
+ data-slot="content"
78
+ :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })"
79
+ v-bind="contentProps"
80
+ @after-enter="emits('after:enter')"
81
+ @after-leave="emits('after:leave')"
82
+ v-on="contentEvents"
83
+ >
70
84
  <VisuallyHidden v-if="!!slots.content && (title || !!slots.title || (description || !!slots.description))">
71
85
  <DialogTitle v-if="title || !!slots.title">
72
86
  <slot name="title">
@@ -82,16 +96,16 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.modal || {} }
82
96
  </VisuallyHidden>
83
97
 
84
98
  <slot name="content" :close="close">
85
- <div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" :class="ui.header({ class: props.ui?.header })">
99
+ <div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" data-slot="header" :class="ui.header({ class: props.ui?.header })">
86
100
  <slot name="header" :close="close">
87
- <div :class="ui.wrapper({ class: props.ui?.wrapper })">
88
- <DialogTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
101
+ <div data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
102
+ <DialogTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
89
103
  <slot name="title">
90
104
  {{ title }}
91
105
  </slot>
92
106
  </DialogTitle>
93
107
 
94
- <DialogDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
108
+ <DialogDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
95
109
  <slot name="description">
96
110
  {{ description }}
97
111
  </slot>
@@ -101,7 +115,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.modal || {} }
101
115
  <slot name="actions" />
102
116
 
103
117
  <DialogClose v-if="props.close || !!slots.close" as-child>
104
- <slot name="close" :close="close" :ui="ui">
118
+ <slot name="close" :ui="ui">
105
119
  <UButton
106
120
  v-if="props.close"
107
121
  :icon="closeIcon || appConfig.ui.icons.close"
@@ -109,6 +123,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.modal || {} }
109
123
  variant="ghost"
110
124
  :aria-label="t('modal.close')"
111
125
  v-bind="typeof props.close === 'object' ? props.close : {}"
126
+ data-slot="close"
112
127
  :class="ui.close({ class: props.ui?.close })"
113
128
  />
114
129
  </slot>
@@ -116,15 +131,33 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.modal || {} }
116
131
  </slot>
117
132
  </div>
118
133
 
119
- <div v-if="!!slots.body" :class="ui.body({ class: props.ui?.body })">
134
+ <div v-if="!!slots.body" data-slot="body" :class="ui.body({ class: props.ui?.body })">
120
135
  <slot name="body" :close="close" />
121
136
  </div>
122
137
 
123
- <div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
138
+ <div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
124
139
  <slot name="footer" :close="close" />
125
140
  </div>
126
141
  </slot>
127
142
  </DialogContent>
143
+ </DefineContentTemplate>
144
+
145
+ <DialogTrigger v-if="!!slots.default" as-child :class="props.class">
146
+ <slot :open="open" />
147
+ </DialogTrigger>
148
+
149
+ <DialogPortal v-bind="portalProps">
150
+ <template v-if="scrollable">
151
+ <DialogOverlay data-slot="overlay" :class="ui.overlay({ class: props.ui?.overlay })">
152
+ <ReuseContentTemplate />
153
+ </DialogOverlay>
154
+ </template>
155
+
156
+ <template v-else>
157
+ <DialogOverlay v-if="overlay" data-slot="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
158
+
159
+ <ReuseContentTemplate />
160
+ </template>
128
161
  </DialogPortal>
129
162
  </DialogRoot>
130
163
  </template>
@@ -15,6 +15,11 @@ export interface ModalProps extends DialogRootProps {
15
15
  * @defaultValue true
16
16
  */
17
17
  overlay?: boolean;
18
+ /**
19
+ * When `true`, enables scrollable overlay mode where content scrolls within the overlay.
20
+ * @defaultValue false
21
+ */
22
+ scrollable?: boolean;
18
23
  /**
19
24
  * Animate the modal when opening or closing.
20
25
  * @defaultValue true
@@ -69,10 +74,7 @@ export interface ModalSlots {
69
74
  description(props?: {}): any;
70
75
  actions(props?: {}): any;
71
76
  close(props: {
72
- close: () => void;
73
- ui: {
74
- [K in keyof Required<Modal['slots']>]: (props?: Record<string, any>) => string;
75
- };
77
+ ui: Modal['ui'];
76
78
  }): any;
77
79
  body(props: {
78
80
  close: () => void;
@@ -92,11 +94,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ModalP
92
94
  "onAfter:enter"?: (() => any) | undefined;
93
95
  "onClose:prevent"?: (() => any) | undefined;
94
96
  }>, {
97
+ overlay: boolean;
95
98
  close: boolean | Partial<ButtonProps>;
96
- modal: boolean;
97
99
  transition: boolean;
100
+ modal: boolean;
98
101
  portal: boolean | string | HTMLElement;
99
- overlay: boolean;
100
102
  dismissible: boolean;
101
103
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ModalSlots>;
102
104
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,4 @@
1
- import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, AccordionRootProps } from 'reka-ui';
1
+ import type { NavigationMenuRootProps, NavigationMenuContentProps, NavigationMenuContentEmits, AccordionRootProps } from 'reka-ui';
2
2
  import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/navigation-menu';
4
4
  import type { AvatarProps, BadgeProps, IconProps, LinkProps, PopoverProps, TooltipProps } from '../types';
@@ -52,17 +52,45 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
52
52
  children?: NavigationMenuChildItem[];
53
53
  defaultOpen?: boolean;
54
54
  open?: boolean;
55
- onSelect?(e: Event): void;
55
+ onSelect?: (e: Event) => void;
56
56
  class?: any;
57
57
  ui?: Pick<NavigationMenu['slots'], 'item' | 'linkLeadingAvatarSize' | 'linkLeadingAvatar' | 'linkLeadingIcon' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkTrailing' | 'linkTrailingBadgeSize' | 'linkTrailingBadge' | 'linkTrailingIcon' | 'label' | 'link' | 'content' | 'childList' | 'childLabel' | 'childItem' | 'childLink' | 'childLinkIcon' | 'childLinkWrapper' | 'childLinkLabel' | 'childLinkLabelExternalIcon' | 'childLinkDescription'>;
58
58
  [key: string]: any;
59
59
  }
60
- export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>> extends Pick<NavigationMenuRootProps, 'modelValue' | 'defaultValue' | 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'skipDelayDuration' | 'disablePointerLeaveClose' | 'unmountOnHide'>, Pick<AccordionRootProps, 'disabled' | 'type' | 'collapsible'> {
60
+ type SingleOrMultipleType = 'single' | 'multiple';
61
+ type Orientation = NavigationMenuRootProps['orientation'];
62
+ type NavigationMenuModelValue<K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation> = O extends 'horizontal' ? string : K extends 'single' ? string : K extends 'multiple' ? string[] : string | string[];
63
+ export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation> extends Pick<NavigationMenuRootProps, 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'skipDelayDuration' | 'disablePointerLeaveClose' | 'unmountOnHide'>, Pick<AccordionRootProps, 'disabled' | 'collapsible'> {
61
64
  /**
62
65
  * The element or component this component should render as.
63
66
  * @defaultValue 'div'
64
67
  */
65
68
  as?: any;
69
+ /**
70
+ * Determines whether a "single" or "multiple" items can be selected at a time.
71
+ *
72
+ * Only works when `orientation` is `vertical`.
73
+ * @defaultValue 'multiple'
74
+ */
75
+ type?: K;
76
+ /**
77
+ * The controlled value of the active item(s).
78
+ * - In horizontal orientation: always `string`
79
+ * - In vertical orientation with `type="single"`: `string`
80
+ * - In vertical orientation with `type="multiple"`: `string[]`
81
+ *
82
+ * Use this when you need to control the state of the items. Can be binded with `v-model`
83
+ */
84
+ modelValue?: NavigationMenuModelValue<K, O>;
85
+ /**
86
+ * The default active value of the item(s).
87
+ * - In horizontal orientation: always `string`
88
+ * - In vertical orientation with `type="single"`: `string`
89
+ * - In vertical orientation with `type="multiple"`: `string[]`
90
+ *
91
+ * Use when you do not need to control the state of the item(s).
92
+ */
93
+ defaultValue?: NavigationMenuModelValue<K, O>;
66
94
  /**
67
95
  * The icon displayed to open the menu.
68
96
  * @defaultValue appConfig.ui.icons.chevronDown
@@ -89,7 +117,7 @@ export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem>
89
117
  * The orientation of the menu.
90
118
  * @defaultValue 'horizontal'
91
119
  */
92
- orientation?: NavigationMenuRootProps['orientation'];
120
+ orientation?: O;
93
121
  /**
94
122
  * Collapse the navigation menu to only show icons.
95
123
  * Only works when `orientation` is `vertical`.
@@ -135,33 +163,52 @@ export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem>
135
163
  class?: any;
136
164
  ui?: NavigationMenu['slots'];
137
165
  }
138
- export interface NavigationMenuEmits extends NavigationMenuRootEmits {
139
- }
166
+ export type NavigationMenuEmits<K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation> = {
167
+ /**
168
+ * Event handler called when the value changes.
169
+ * - In horizontal orientation: emits `string`
170
+ * - In vertical orientation with `type="single"`: emits `string | undefined`
171
+ * - In vertical orientation with `type="multiple"`: emits `string[] | undefined`
172
+ */
173
+ 'update:modelValue': [value: NavigationMenuModelValue<K, O> | undefined];
174
+ };
140
175
  type SlotProps<T extends NavigationMenuItem> = (props: {
141
176
  item: T;
142
177
  index: number;
143
178
  active?: boolean;
179
+ ui: NavigationMenu['ui'];
144
180
  }) => any;
145
181
  export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
146
182
  'item': SlotProps<T>;
147
183
  'item-leading': SlotProps<T>;
148
- 'item-label': SlotProps<T>;
184
+ 'item-label': (props: {
185
+ item: T;
186
+ index: number;
187
+ active?: boolean;
188
+ }) => any;
149
189
  'item-trailing': SlotProps<T>;
150
- 'item-content': SlotProps<T>;
190
+ 'item-content': SlotProps<T> & {
191
+ close?: () => void;
192
+ };
151
193
  'list-leading': (props?: {}) => any;
152
194
  'list-trailing': (props?: {}) => any;
153
- } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing' | 'content', {
195
+ } & DynamicSlots<MergeTypes<T>, 'label', {
196
+ index: number;
197
+ active?: boolean;
198
+ ui: NavigationMenu['ui'];
199
+ }> & DynamicSlots<MergeTypes<T>, 'leading' | 'trailing' | 'content', {
154
200
  index: number;
155
201
  active?: boolean;
202
+ ui: NavigationMenu['ui'];
156
203
  }>;
157
- declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
158
- props: __VLS_PrettifyLocal<NavigationMenuProps<T> & {
159
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
204
+ declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>, K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
205
+ props: __VLS_PrettifyLocal<NavigationMenuProps<T, K, O> & {
206
+ "onUpdate:modelValue"?: ((value: NavigationMenuModelValue<K, O> | undefined) => any) | undefined;
160
207
  }> & import("vue").PublicProps;
161
208
  expose: (exposed: {}) => void;
162
209
  attrs: any;
163
210
  slots: NavigationMenuSlots<T, NestedItem<T>>;
164
- emit: (evt: "update:modelValue", value: string) => void;
211
+ emit: (evt: "update:modelValue", value: NavigationMenuModelValue<K, O> | undefined) => void;
165
212
  }>) => import("vue").VNode & {
166
213
  __ctx?: Awaited<typeof __VLS_setup>;
167
214
  };
@@ -21,6 +21,9 @@ import UTooltip from "./Tooltip.vue";
21
21
  defineOptions({ inheritAttrs: false });
22
22
  const props = defineProps({
23
23
  as: { type: null, required: false },
24
+ type: { type: null, required: false, default: "multiple" },
25
+ modelValue: { type: null, required: false },
26
+ defaultValue: { type: null, required: false },
24
27
  trailingIcon: { type: [String, Object], required: false },
25
28
  externalIcon: { type: [Boolean, String, Object], required: false, default: true },
26
29
  items: { type: null, required: false },
@@ -38,8 +41,6 @@ const props = defineProps({
38
41
  labelKey: { type: null, required: false, default: "label" },
39
42
  class: { type: null, required: false },
40
43
  ui: { type: null, required: false },
41
- modelValue: { type: String, required: false },
42
- defaultValue: { type: String, required: false },
43
44
  delayDuration: { type: Number, required: false, default: 0 },
44
45
  disableClickTrigger: { type: Boolean, required: false },
45
46
  disableHoverTrigger: { type: Boolean, required: false },
@@ -47,7 +48,6 @@ const props = defineProps({
47
48
  disablePointerLeaveClose: { type: Boolean, required: false },
48
49
  unmountOnHide: { type: Boolean, required: false, default: true },
49
50
  disabled: { type: Boolean, required: false },
50
- type: { type: String, required: false, default: "multiple" },
51
51
  collapsible: { type: Boolean, required: false, default: true }
52
52
  });
53
53
  const emits = defineEmits(["update:modelValue"]);
@@ -55,8 +55,6 @@ const slots = defineSlots();
55
55
  const appConfig = useAppConfig();
56
56
  const rootProps = useForwardPropsEmits(computed(() => ({
57
57
  as: props.as,
58
- modelValue: props.modelValue,
59
- defaultValue: props.defaultValue,
60
58
  delayDuration: props.delayDuration,
61
59
  skipDelayDuration: props.skipDelayDuration,
62
60
  orientation: props.orientation,
@@ -102,36 +100,45 @@ function getAccordionDefaultValue(list, level = 0) {
102
100
 
103
101
  <template>
104
102
  <DefineLinkTemplate v-slot="{ item, active, index }">
105
- <slot :name="item.slot || 'item'" :item="item" :index="index">
106
- <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index">
107
- <UAvatar v-if="item.avatar" :size="item.ui?.linkLeadingAvatarSize || props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active, disabled: !!item.disabled })" />
108
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active, disabled: !!item.disabled })" />
103
+ <slot :name="item.slot || 'item'" :item="item" :index="index" :active="active" :ui="ui">
104
+ <slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="active" :index="index" :ui="ui">
105
+ <UAvatar v-if="item.avatar" :size="item.ui?.linkLeadingAvatarSize || props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" data-slot="linkLeadingAvatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active, disabled: !!item.disabled })" />
106
+ <UIcon v-else-if="item.icon" :name="item.icon" data-slot="linkLeadingIcon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active, disabled: !!item.disabled })" />
109
107
  </slot>
110
108
 
111
109
  <span
112
- v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
110
+ v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']"
111
+ data-slot="linkLabel"
113
112
  :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })"
114
113
  >
115
114
  <slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="active" :index="index">
116
115
  {{ get(item, props.labelKey) }}
117
116
  </slot>
118
117
 
119
- <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.linkLabelExternalIcon({ class: [props.ui?.linkLabelExternalIcon, item.ui?.linkLabelExternalIcon], active })" />
118
+ <UIcon v-if="item.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" data-slot="linkLabelExternalIcon" :class="ui.linkLabelExternalIcon({ class: [props.ui?.linkLabelExternalIcon, item.ui?.linkLabelExternalIcon], active })" />
120
119
  </span>
121
120
 
122
- <component :is="orientation === 'vertical' && item.children?.length && !collapsed ? AccordionTrigger : 'span'" v-if="(!collapsed || orientation !== 'vertical') && (item.badge || orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing'])" as="span" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })" @click.stop.prevent>
123
- <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index">
121
+ <component
122
+ :is="orientation === 'vertical' && item.children?.length && !collapsed ? AccordionTrigger : 'span'"
123
+ v-if="item.badge || item.badge === 0 || orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length || item.trailingIcon || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']"
124
+ as="span"
125
+ data-slot="linkTrailing"
126
+ :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })"
127
+ @click.stop.prevent
128
+ >
129
+ <slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="active" :index="index" :ui="ui">
124
130
  <UBadge
125
- v-if="item.badge !== void 0"
131
+ v-if="item.badge || item.badge === 0"
126
132
  color="neutral"
127
133
  variant="outline"
128
134
  :size="item.ui?.linkTrailingBadgeSize || props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
129
135
  v-bind="typeof item.badge === 'string' || typeof item.badge === 'number' ? { label: item.badge } : item.badge"
136
+ data-slot="linkTrailingBadge"
130
137
  :class="ui.linkTrailingBadge({ class: [props.ui?.linkTrailingBadge, item.ui?.linkTrailingBadge] })"
131
138
  />
132
139
 
133
- <UIcon v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length" :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
134
- <UIcon v-else-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
140
+ <UIcon v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content']) || orientation === 'vertical' && item.children?.length" :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" data-slot="linkTrailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
141
+ <UIcon v-else-if="item.trailingIcon" :name="item.trailingIcon" data-slot="linkTrailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon], active })" />
135
142
  </slot>
136
143
  </component>
137
144
  </slot>
@@ -143,7 +150,7 @@ function getAccordionDefaultValue(list, level = 0) {
143
150
  as="li"
144
151
  :value="item.value || (level > 0 ? `item-${level}-${index}` : `item-${index}`)"
145
152
  >
146
- <div v-if="orientation === 'vertical' && item.type === 'label' && !collapsed" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
153
+ <div v-if="orientation === 'vertical' && item.type === 'label' && !collapsed" data-slot="label" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
147
154
  <ReuseLinkTemplate :item="item" :index="index" />
148
155
  </div>
149
156
  <ULink v-else-if="item.type !== 'label'" v-slot="{ active, ...slotProps }" v-bind="orientation === 'vertical' && item.children?.length && !collapsed && item.type === 'trigger' ? {} : pickLinkProps(item)" custom>
@@ -155,26 +162,33 @@ function getAccordionDefaultValue(list, level = 0) {
155
162
  @select="item.onSelect"
156
163
  >
157
164
  <UPopover v-if="orientation === 'vertical' && collapsed && item.children?.length && (!!props.popover || !!item.popover)" v-bind="{ ...popoverProps, ...typeof item.popover === 'boolean' ? {} : item.popover || {} }" :ui="{ content: ui.content({ class: [props.ui?.content, item.ui?.content] }) }">
158
- <ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
165
+ <ULinkBase v-bind="slotProps" data-slot="link" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
159
166
  <ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
160
167
  </ULinkBase>
161
168
 
162
- <template #content>
163
- <slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
164
- <ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
165
- <li :class="ui.childLabel({ class: [props.ui?.childLabel, item.ui?.childLabel] })">
169
+ <template #content="{ close }">
170
+ <slot
171
+ :name="item.slot ? `${item.slot}-content` : 'item-content'"
172
+ :item="item"
173
+ :active="active || item.active"
174
+ :index="index"
175
+ :ui="ui"
176
+ :close="close"
177
+ >
178
+ <ul data-slot="childList" :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
179
+ <li data-slot="childLabel" :class="ui.childLabel({ class: [props.ui?.childLabel, item.ui?.childLabel] })">
166
180
  {{ get(item, props.labelKey) }}
167
181
  </li>
168
- <li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
182
+ <li v-for="(childItem, childIndex) in item.children" :key="childIndex" data-slot="childItem" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
169
183
  <ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
170
184
  <NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
171
- <ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
172
- <UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
185
+ <ULinkBase v-bind="childSlotProps" data-slot="childLink" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
186
+ <UIcon v-if="childItem.icon" :name="childItem.icon" data-slot="childLinkIcon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
173
187
 
174
- <span :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
188
+ <span data-slot="childLinkLabel" :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
175
189
  {{ get(childItem, props.labelKey) }}
176
190
 
177
- <UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
191
+ <UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" data-slot="childLinkLabelExternalIcon" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
178
192
  </span>
179
193
  </ULinkBase>
180
194
  </NavigationMenuLink>
@@ -185,31 +199,31 @@ function getAccordionDefaultValue(list, level = 0) {
185
199
  </template>
186
200
  </UPopover>
187
201
  <UTooltip v-else-if="orientation === 'vertical' && collapsed && (!!props.tooltip || !!item.tooltip)" :text="get(item, props.labelKey)" v-bind="{ ...tooltipProps, ...typeof item.tooltip === 'boolean' ? {} : item.tooltip || {} }">
188
- <ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
202
+ <ULinkBase v-bind="slotProps" data-slot="link" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: level > 0 })">
189
203
  <ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
190
204
  </ULinkBase>
191
205
  </UTooltip>
192
- <ULinkBase v-else v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
206
+ <ULinkBase v-else v-bind="slotProps" data-slot="link" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: active || item.active, disabled: !!item.disabled, level: orientation === 'horizontal' || level > 0 })">
193
207
  <ReuseLinkTemplate :item="item" :active="active || item.active" :index="index" />
194
208
  </ULinkBase>
195
209
  </component>
196
210
 
197
- <NavigationMenuContent v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
198
- <slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index">
199
- <ul :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
200
- <li v-for="(childItem, childIndex) in item.children" :key="childIndex" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
211
+ <NavigationMenuContent v-if="orientation === 'horizontal' && (item.children?.length || !!slots[item.slot ? `${item.slot}-content` : 'item-content'])" v-bind="contentProps" data-slot="content" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
212
+ <slot :name="item.slot ? `${item.slot}-content` : 'item-content'" :item="item" :active="active || item.active" :index="index" :ui="ui">
213
+ <ul data-slot="childList" :class="ui.childList({ class: [props.ui?.childList, item.ui?.childList] })">
214
+ <li v-for="(childItem, childIndex) in item.children" :key="childIndex" data-slot="childItem" :class="ui.childItem({ class: [props.ui?.childItem, item.ui?.childItem] })">
201
215
  <ULink v-slot="{ active: childActive, ...childSlotProps }" v-bind="pickLinkProps(childItem)" custom>
202
216
  <NavigationMenuLink as-child :active="childActive" @select="childItem.onSelect">
203
- <ULinkBase v-bind="childSlotProps" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
204
- <UIcon v-if="childItem.icon" :name="childItem.icon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
217
+ <ULinkBase v-bind="childSlotProps" data-slot="childLink" :class="ui.childLink({ class: [props.ui?.childLink, item.ui?.childLink, childItem.class], active: childActive })">
218
+ <UIcon v-if="childItem.icon" :name="childItem.icon" data-slot="childLinkIcon" :class="ui.childLinkIcon({ class: [props.ui?.childLinkIcon, item.ui?.childLinkIcon], active: childActive })" />
205
219
 
206
- <div :class="ui.childLinkWrapper({ class: [props.ui?.childLinkWrapper, item.ui?.childLinkWrapper] })">
207
- <p :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
220
+ <div data-slot="childLinkWrapper" :class="ui.childLinkWrapper({ class: [props.ui?.childLinkWrapper, item.ui?.childLinkWrapper] })">
221
+ <p data-slot="childLinkLabel" :class="ui.childLinkLabel({ class: [props.ui?.childLinkLabel, item.ui?.childLinkLabel], active: childActive })">
208
222
  {{ get(childItem, props.labelKey) }}
209
223
 
210
- <UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
224
+ <UIcon v-if="childItem.target === '_blank' && externalIcon !== false" :name="typeof externalIcon === 'string' ? externalIcon : appConfig.ui.icons.external" data-slot="childLinkLabelExternalIcon" :class="ui.childLinkLabelExternalIcon({ class: [props.ui?.childLinkLabelExternalIcon, item.ui?.childLinkLabelExternalIcon], active: childActive })" />
211
225
  </p>
212
- <p v-if="childItem.description" :class="ui.childLinkDescription({ class: [props.ui?.childLinkDescription, item.ui?.childLinkDescription], active: childActive })">
226
+ <p v-if="childItem.description" data-slot="childLinkDescription" :class="ui.childLinkDescription({ class: [props.ui?.childLinkDescription, item.ui?.childLinkDescription], active: childActive })">
213
227
  {{ childItem.description }}
214
228
  </p>
215
229
  </div>
@@ -222,13 +236,14 @@ function getAccordionDefaultValue(list, level = 0) {
222
236
  </NavigationMenuContent>
223
237
  </ULink>
224
238
 
225
- <AccordionContent v-if="orientation === 'vertical' && item.children?.length && !collapsed" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
239
+ <AccordionContent v-if="orientation === 'vertical' && item.children?.length && !collapsed" data-slot="content" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
226
240
  <AccordionRoot
227
241
  v-bind="{
228
242
  ...accordionProps,
229
243
  defaultValue: getAccordionDefaultValue(item.children, level + 1)
230
244
  }"
231
245
  as="ul"
246
+ data-slot="childList"
232
247
  :class="ui.childList({ class: props.ui?.childList })"
233
248
  >
234
249
  <ReuseItemTemplate
@@ -237,6 +252,7 @@ function getAccordionDefaultValue(list, level = 0) {
237
252
  :item="childItem"
238
253
  :index="childIndex"
239
254
  :level="level + 1"
255
+ data-slot="childItem"
240
256
  :class="ui.childItem({ class: [props.ui?.childItem, childItem.ui?.childItem] })"
241
257
  />
242
258
  </AccordionRoot>
@@ -244,33 +260,54 @@ function getAccordionDefaultValue(list, level = 0) {
244
260
  </component>
245
261
  </DefineItemTemplate>
246
262
 
247
- <NavigationMenuRoot v-bind="{ ...rootProps, ...$attrs }" :data-collapsed="collapsed" :class="ui.root({ class: [props.ui?.root, props.class] })">
263
+ <NavigationMenuRoot
264
+ v-bind="{
265
+ ...rootProps,
266
+ ...orientation === 'horizontal' ? {
267
+ modelValue,
268
+ defaultValue
269
+ } : {},
270
+ ...$attrs
271
+ }"
272
+ :data-collapsed="collapsed"
273
+ data-slot="root"
274
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
275
+ >
248
276
  <slot name="list-leading" />
249
277
 
250
278
  <template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
251
279
  <component
252
280
  v-bind="orientation === 'vertical' && !collapsed ? {
253
281
  ...accordionProps,
254
- defaultValue: getAccordionDefaultValue(list)
282
+ modelValue,
283
+ defaultValue: defaultValue ?? getAccordionDefaultValue(list)
255
284
  } : {}"
256
- :is="orientation === 'vertical' && !collapsed ? AccordionRoot : NavigationMenuList"
285
+ :is="orientation === 'vertical' ? AccordionRoot : NavigationMenuList"
257
286
  as="ul"
287
+ data-slot="list"
258
288
  :class="ui.list({ class: props.ui?.list })"
259
289
  >
260
- <ReuseItemTemplate v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="ui.item({ class: [props.ui?.item, item.ui?.item] })" />
290
+ <ReuseItemTemplate
291
+ v-for="(item, index) in list"
292
+ :key="`list-${listIndex}-${index}`"
293
+ :item="item"
294
+ :index="index"
295
+ data-slot="item"
296
+ :class="ui.item({ class: [props.ui?.item, item.ui?.item] })"
297
+ />
261
298
  </component>
262
299
 
263
- <div v-if="orientation === 'vertical' && listIndex < lists.length - 1" :class="ui.separator({ class: props.ui?.separator })" />
300
+ <div v-if="orientation === 'vertical' && listIndex < lists.length - 1" data-slot="separator" :class="ui.separator({ class: props.ui?.separator })" />
264
301
  </template>
265
302
 
266
303
  <slot name="list-trailing" />
267
304
 
268
- <div v-if="orientation === 'horizontal'" :class="ui.viewportWrapper({ class: props.ui?.viewportWrapper })">
269
- <NavigationMenuIndicator v-if="arrow" :class="ui.indicator({ class: props.ui?.indicator })">
270
- <div :class="ui.arrow({ class: props.ui?.arrow })" />
305
+ <div v-if="orientation === 'horizontal'" data-slot="viewportWrapper" :class="ui.viewportWrapper({ class: props.ui?.viewportWrapper })">
306
+ <NavigationMenuIndicator v-if="arrow" data-slot="indicator" :class="ui.indicator({ class: props.ui?.indicator })">
307
+ <div data-slot="arrow" :class="ui.arrow({ class: props.ui?.arrow })" />
271
308
  </NavigationMenuIndicator>
272
309
 
273
- <NavigationMenuViewport :class="ui.viewport({ class: props.ui?.viewport })" />
310
+ <NavigationMenuViewport data-slot="viewport" :class="ui.viewport({ class: props.ui?.viewport })" />
274
311
  </div>
275
312
  </NavigationMenuRoot>
276
313
  </template>