@nuxt/ui 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (518) hide show
  1. package/.nuxt/ui.css +2 -0
  2. package/README.md +4 -1
  3. package/cli/package.json +1 -1
  4. package/cli/templates.mjs +5 -8
  5. package/dist/module.json +1 -1
  6. package/dist/module.mjs +3 -3
  7. package/dist/runtime/components/Accordion.d.vue.ts +8 -7
  8. package/dist/runtime/components/Accordion.vue +12 -10
  9. package/dist/runtime/components/Accordion.vue.d.ts +8 -7
  10. package/dist/runtime/components/Alert.d.vue.ts +8 -7
  11. package/dist/runtime/components/Alert.vue +12 -10
  12. package/dist/runtime/components/Alert.vue.d.ts +8 -7
  13. package/dist/runtime/components/App.d.vue.ts +2 -1
  14. package/dist/runtime/components/App.vue.d.ts +2 -1
  15. package/dist/runtime/components/AuthForm.d.vue.ts +13 -12
  16. package/dist/runtime/components/AuthForm.vue +19 -17
  17. package/dist/runtime/components/AuthForm.vue.d.ts +13 -12
  18. package/dist/runtime/components/Avatar.d.vue.ts +2 -1
  19. package/dist/runtime/components/Avatar.vue +7 -5
  20. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  21. package/dist/runtime/components/AvatarGroup.d.vue.ts +2 -1
  22. package/dist/runtime/components/AvatarGroup.vue +6 -4
  23. package/dist/runtime/components/AvatarGroup.vue.d.ts +2 -1
  24. package/dist/runtime/components/Badge.d.vue.ts +7 -6
  25. package/dist/runtime/components/Badge.vue +8 -6
  26. package/dist/runtime/components/Badge.vue.d.ts +7 -6
  27. package/dist/runtime/components/Banner.d.vue.ts +7 -6
  28. package/dist/runtime/components/Banner.vue +12 -10
  29. package/dist/runtime/components/Banner.vue.d.ts +7 -6
  30. package/dist/runtime/components/BlogPost.d.vue.ts +14 -12
  31. package/dist/runtime/components/BlogPost.vue +16 -14
  32. package/dist/runtime/components/BlogPost.vue.d.ts +14 -12
  33. package/dist/runtime/components/BlogPosts.d.vue.ts +8 -4
  34. package/dist/runtime/components/BlogPosts.vue +5 -2
  35. package/dist/runtime/components/BlogPosts.vue.d.ts +8 -4
  36. package/dist/runtime/components/Breadcrumb.d.vue.ts +15 -14
  37. package/dist/runtime/components/Breadcrumb.vue +12 -10
  38. package/dist/runtime/components/Breadcrumb.vue.d.ts +15 -14
  39. package/dist/runtime/components/Button.d.vue.ts +7 -6
  40. package/dist/runtime/components/Button.vue +8 -6
  41. package/dist/runtime/components/Button.vue.d.ts +7 -6
  42. package/dist/runtime/components/Calendar.d.vue.ts +6 -5
  43. package/dist/runtime/components/Calendar.vue +15 -13
  44. package/dist/runtime/components/Calendar.vue.d.ts +6 -5
  45. package/dist/runtime/components/Card.d.vue.ts +4 -3
  46. package/dist/runtime/components/Card.vue +7 -5
  47. package/dist/runtime/components/Card.vue.d.ts +4 -3
  48. package/dist/runtime/components/Carousel.d.vue.ts +3 -2
  49. package/dist/runtime/components/Carousel.vue +13 -11
  50. package/dist/runtime/components/Carousel.vue.d.ts +3 -2
  51. package/dist/runtime/components/ChangelogVersion.d.vue.ts +17 -15
  52. package/dist/runtime/components/ChangelogVersion.vue +19 -17
  53. package/dist/runtime/components/ChangelogVersion.vue.d.ts +17 -15
  54. package/dist/runtime/components/ChangelogVersions.d.vue.ts +6 -5
  55. package/dist/runtime/components/ChangelogVersions.vue +7 -5
  56. package/dist/runtime/components/ChangelogVersions.vue.d.ts +6 -5
  57. package/dist/runtime/components/ChatMessage.d.vue.ts +6 -5
  58. package/dist/runtime/components/ChatMessage.vue +10 -8
  59. package/dist/runtime/components/ChatMessage.vue.d.ts +6 -5
  60. package/dist/runtime/components/ChatMessages.d.vue.ts +9 -8
  61. package/dist/runtime/components/ChatMessages.vue +16 -11
  62. package/dist/runtime/components/ChatMessages.vue.d.ts +9 -8
  63. package/dist/runtime/components/ChatPalette.d.vue.ts +3 -2
  64. package/dist/runtime/components/ChatPalette.vue +6 -4
  65. package/dist/runtime/components/ChatPalette.vue.d.ts +3 -2
  66. package/dist/runtime/components/ChatPrompt.d.vue.ts +3 -2
  67. package/dist/runtime/components/ChatPrompt.vue +9 -6
  68. package/dist/runtime/components/ChatPrompt.vue.d.ts +3 -2
  69. package/dist/runtime/components/ChatPromptSubmit.vue +5 -3
  70. package/dist/runtime/components/Checkbox.d.vue.ts +7 -6
  71. package/dist/runtime/components/Checkbox.vue +19 -12
  72. package/dist/runtime/components/Checkbox.vue.d.ts +7 -6
  73. package/dist/runtime/components/CheckboxGroup.d.vue.ts +10 -9
  74. package/dist/runtime/components/CheckboxGroup.vue +9 -7
  75. package/dist/runtime/components/CheckboxGroup.vue.d.ts +10 -9
  76. package/dist/runtime/components/Chip.d.vue.ts +3 -2
  77. package/dist/runtime/components/Chip.vue +5 -3
  78. package/dist/runtime/components/Chip.vue.d.ts +3 -2
  79. package/dist/runtime/components/Collapsible.d.vue.ts +4 -3
  80. package/dist/runtime/components/Collapsible.vue +5 -3
  81. package/dist/runtime/components/Collapsible.vue.d.ts +4 -3
  82. package/dist/runtime/components/ColorPicker.vue +10 -8
  83. package/dist/runtime/components/CommandPalette.d.vue.ts +23 -22
  84. package/dist/runtime/components/CommandPalette.vue +33 -31
  85. package/dist/runtime/components/CommandPalette.vue.d.ts +23 -22
  86. package/dist/runtime/components/Container.d.vue.ts +5 -1
  87. package/dist/runtime/components/Container.vue +5 -2
  88. package/dist/runtime/components/Container.vue.d.ts +5 -1
  89. package/dist/runtime/components/ContextMenu.d.vue.ts +19 -18
  90. package/dist/runtime/components/ContextMenu.vue +5 -3
  91. package/dist/runtime/components/ContextMenu.vue.d.ts +19 -18
  92. package/dist/runtime/components/ContextMenuContent.vue +1 -0
  93. package/dist/runtime/components/DashboardGroup.d.vue.ts +5 -1
  94. package/dist/runtime/components/DashboardGroup.vue +4 -1
  95. package/dist/runtime/components/DashboardGroup.vue.d.ts +5 -1
  96. package/dist/runtime/components/DashboardNavbar.d.vue.ts +11 -10
  97. package/dist/runtime/components/DashboardNavbar.vue +10 -8
  98. package/dist/runtime/components/DashboardNavbar.vue.d.ts +11 -10
  99. package/dist/runtime/components/DashboardPanel.d.vue.ts +7 -6
  100. package/dist/runtime/components/DashboardPanel.vue +6 -4
  101. package/dist/runtime/components/DashboardPanel.vue.d.ts +7 -6
  102. package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +5 -1
  103. package/dist/runtime/components/DashboardResizeHandle.vue +5 -2
  104. package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +5 -1
  105. package/dist/runtime/components/DashboardSearch.d.vue.ts +4 -3
  106. package/dist/runtime/components/DashboardSearch.vue +6 -3
  107. package/dist/runtime/components/DashboardSearch.vue.d.ts +4 -3
  108. package/dist/runtime/components/DashboardSearchButton.d.vue.ts +1 -1
  109. package/dist/runtime/components/DashboardSearchButton.vue +6 -4
  110. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +1 -1
  111. package/dist/runtime/components/DashboardSidebar.d.vue.ts +25 -19
  112. package/dist/runtime/components/DashboardSidebar.vue +19 -15
  113. package/dist/runtime/components/DashboardSidebar.vue.d.ts +25 -19
  114. package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +3 -0
  115. package/dist/runtime/components/DashboardSidebarCollapse.vue +4 -2
  116. package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +3 -0
  117. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +3 -0
  118. package/dist/runtime/components/DashboardSidebarToggle.vue +4 -2
  119. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +3 -0
  120. package/dist/runtime/components/DashboardToolbar.d.vue.ts +4 -3
  121. package/dist/runtime/components/DashboardToolbar.vue +6 -4
  122. package/dist/runtime/components/DashboardToolbar.vue.d.ts +4 -3
  123. package/dist/runtime/components/Drawer.d.vue.ts +9 -8
  124. package/dist/runtime/components/Drawer.vue +16 -11
  125. package/dist/runtime/components/Drawer.vue.d.ts +9 -8
  126. package/dist/runtime/components/DropdownMenu.d.vue.ts +21 -19
  127. package/dist/runtime/components/DropdownMenu.vue +7 -5
  128. package/dist/runtime/components/DropdownMenu.vue.d.ts +21 -19
  129. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +4 -3
  130. package/dist/runtime/components/DropdownMenuContent.vue +1 -0
  131. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +4 -3
  132. package/dist/runtime/components/Editor.d.vue.ts +5 -3
  133. package/dist/runtime/components/Editor.vue +16 -4
  134. package/dist/runtime/components/Editor.vue.d.ts +5 -3
  135. package/dist/runtime/components/EditorDragHandle.d.vue.ts +16 -3
  136. package/dist/runtime/components/EditorDragHandle.vue +17 -8
  137. package/dist/runtime/components/EditorDragHandle.vue.d.ts +16 -3
  138. package/dist/runtime/components/EditorEmojiMenu.vue +1 -1
  139. package/dist/runtime/components/EditorMentionMenu.d.vue.ts +1 -1
  140. package/dist/runtime/components/EditorMentionMenu.vue +5 -2
  141. package/dist/runtime/components/EditorMentionMenu.vue.d.ts +1 -1
  142. package/dist/runtime/components/EditorSuggestionMenu.vue +1 -1
  143. package/dist/runtime/components/EditorToolbar.d.vue.ts +3 -2
  144. package/dist/runtime/components/EditorToolbar.vue +10 -7
  145. package/dist/runtime/components/EditorToolbar.vue.d.ts +3 -2
  146. package/dist/runtime/components/Empty.d.vue.ts +9 -8
  147. package/dist/runtime/components/Empty.vue +11 -9
  148. package/dist/runtime/components/Empty.vue.d.ts +9 -8
  149. package/dist/runtime/components/Error.d.vue.ts +6 -5
  150. package/dist/runtime/components/Error.vue +8 -6
  151. package/dist/runtime/components/Error.vue.d.ts +6 -5
  152. package/dist/runtime/components/FieldGroup.d.vue.ts +5 -2
  153. package/dist/runtime/components/FieldGroup.vue +4 -2
  154. package/dist/runtime/components/FieldGroup.vue.d.ts +5 -2
  155. package/dist/runtime/components/FileUpload.d.vue.ts +30 -29
  156. package/dist/runtime/components/FileUpload.vue +18 -16
  157. package/dist/runtime/components/FileUpload.vue.d.ts +30 -29
  158. package/dist/runtime/components/Footer.d.vue.ts +6 -5
  159. package/dist/runtime/components/Footer.vue +10 -8
  160. package/dist/runtime/components/Footer.vue.d.ts +6 -5
  161. package/dist/runtime/components/FooterColumns.d.vue.ts +12 -11
  162. package/dist/runtime/components/FooterColumns.vue +14 -12
  163. package/dist/runtime/components/FooterColumns.vue.d.ts +12 -11
  164. package/dist/runtime/components/Form.d.vue.ts +6 -2
  165. package/dist/runtime/components/Form.vue +10 -2
  166. package/dist/runtime/components/Form.vue.d.ts +6 -2
  167. package/dist/runtime/components/FormField.d.vue.ts +19 -18
  168. package/dist/runtime/components/FormField.vue +12 -10
  169. package/dist/runtime/components/FormField.vue.d.ts +19 -18
  170. package/dist/runtime/components/Header.d.vue.ts +18 -12
  171. package/dist/runtime/components/Header.vue +16 -12
  172. package/dist/runtime/components/Header.vue.d.ts +18 -12
  173. package/dist/runtime/components/Input.d.vue.ts +60 -17
  174. package/dist/runtime/components/Input.vue +16 -12
  175. package/dist/runtime/components/Input.vue.d.ts +60 -17
  176. package/dist/runtime/components/InputDate.d.vue.ts +11 -9
  177. package/dist/runtime/components/InputDate.vue +18 -11
  178. package/dist/runtime/components/InputDate.vue.d.ts +11 -9
  179. package/dist/runtime/components/InputMenu.d.vue.ts +177 -47
  180. package/dist/runtime/components/InputMenu.vue +52 -59
  181. package/dist/runtime/components/InputMenu.vue.d.ts +177 -47
  182. package/dist/runtime/components/InputNumber.d.vue.ts +18 -10
  183. package/dist/runtime/components/InputNumber.vue +23 -14
  184. package/dist/runtime/components/InputNumber.vue.d.ts +18 -10
  185. package/dist/runtime/components/InputTags.d.vue.ts +12 -9
  186. package/dist/runtime/components/InputTags.vue +16 -12
  187. package/dist/runtime/components/InputTags.vue.d.ts +12 -9
  188. package/dist/runtime/components/InputTime.d.vue.ts +13 -11
  189. package/dist/runtime/components/InputTime.vue +18 -10
  190. package/dist/runtime/components/InputTime.vue.d.ts +13 -11
  191. package/dist/runtime/components/Kbd.d.vue.ts +5 -1
  192. package/dist/runtime/components/Kbd.vue +5 -2
  193. package/dist/runtime/components/Kbd.vue.d.ts +5 -1
  194. package/dist/runtime/components/Link.d.vue.ts +4 -3
  195. package/dist/runtime/components/Link.vue +7 -7
  196. package/dist/runtime/components/Link.vue.d.ts +4 -3
  197. package/dist/runtime/components/Main.d.vue.ts +5 -1
  198. package/dist/runtime/components/Main.vue +5 -2
  199. package/dist/runtime/components/Main.vue.d.ts +5 -1
  200. package/dist/runtime/components/Marquee.d.vue.ts +2 -1
  201. package/dist/runtime/components/Marquee.vue +5 -3
  202. package/dist/runtime/components/Marquee.vue.d.ts +2 -1
  203. package/dist/runtime/components/Modal.d.vue.ts +18 -17
  204. package/dist/runtime/components/Modal.vue +17 -24
  205. package/dist/runtime/components/Modal.vue.d.ts +18 -17
  206. package/dist/runtime/components/NavigationMenu.d.vue.ts +33 -21
  207. package/dist/runtime/components/NavigationMenu.vue +83 -53
  208. package/dist/runtime/components/NavigationMenu.vue.d.ts +33 -21
  209. package/dist/runtime/components/Page.d.vue.ts +4 -3
  210. package/dist/runtime/components/Page.vue +16 -8
  211. package/dist/runtime/components/Page.vue.d.ts +4 -3
  212. package/dist/runtime/components/PageAnchors.d.vue.ts +8 -7
  213. package/dist/runtime/components/PageAnchors.vue +11 -9
  214. package/dist/runtime/components/PageAnchors.vue.d.ts +8 -7
  215. package/dist/runtime/components/PageAside.d.vue.ts +4 -3
  216. package/dist/runtime/components/PageAside.vue +9 -7
  217. package/dist/runtime/components/PageAside.vue.d.ts +4 -3
  218. package/dist/runtime/components/PageBody.d.vue.ts +5 -1
  219. package/dist/runtime/components/PageBody.vue +5 -2
  220. package/dist/runtime/components/PageBody.vue.d.ts +5 -1
  221. package/dist/runtime/components/PageCTA.d.vue.ts +10 -9
  222. package/dist/runtime/components/PageCTA.vue +12 -10
  223. package/dist/runtime/components/PageCTA.vue.d.ts +10 -9
  224. package/dist/runtime/components/PageCard.d.vue.ts +9 -8
  225. package/dist/runtime/components/PageCard.vue +14 -12
  226. package/dist/runtime/components/PageCard.vue.d.ts +9 -8
  227. package/dist/runtime/components/PageColumns.d.vue.ts +5 -1
  228. package/dist/runtime/components/PageColumns.vue +5 -2
  229. package/dist/runtime/components/PageColumns.vue.d.ts +5 -1
  230. package/dist/runtime/components/PageFeature.d.vue.ts +6 -5
  231. package/dist/runtime/components/PageFeature.vue +9 -7
  232. package/dist/runtime/components/PageFeature.vue.d.ts +6 -5
  233. package/dist/runtime/components/PageGrid.d.vue.ts +5 -1
  234. package/dist/runtime/components/PageGrid.vue +5 -2
  235. package/dist/runtime/components/PageGrid.vue.d.ts +5 -1
  236. package/dist/runtime/components/PageHeader.d.vue.ts +6 -5
  237. package/dist/runtime/components/PageHeader.vue +10 -8
  238. package/dist/runtime/components/PageHeader.vue.d.ts +6 -5
  239. package/dist/runtime/components/PageHero.d.vue.ts +11 -10
  240. package/dist/runtime/components/PageHero.vue +13 -11
  241. package/dist/runtime/components/PageHero.vue.d.ts +11 -10
  242. package/dist/runtime/components/PageLinks.d.vue.ts +9 -8
  243. package/dist/runtime/components/PageLinks.vue +11 -9
  244. package/dist/runtime/components/PageLinks.vue.d.ts +9 -8
  245. package/dist/runtime/components/PageList.d.vue.ts +5 -1
  246. package/dist/runtime/components/PageList.vue +5 -2
  247. package/dist/runtime/components/PageList.vue.d.ts +5 -1
  248. package/dist/runtime/components/PageLogos.d.vue.ts +2 -1
  249. package/dist/runtime/components/PageLogos.vue +9 -7
  250. package/dist/runtime/components/PageLogos.vue.d.ts +2 -1
  251. package/dist/runtime/components/PageSection.d.vue.ts +15 -14
  252. package/dist/runtime/components/PageSection.vue +16 -14
  253. package/dist/runtime/components/PageSection.vue.d.ts +15 -14
  254. package/dist/runtime/components/Pagination.d.vue.ts +10 -9
  255. package/dist/runtime/components/Pagination.vue +11 -9
  256. package/dist/runtime/components/Pagination.vue.d.ts +10 -9
  257. package/dist/runtime/components/PinInput.d.vue.ts +2 -0
  258. package/dist/runtime/components/PinInput.vue +12 -5
  259. package/dist/runtime/components/PinInput.vue.d.ts +2 -0
  260. package/dist/runtime/components/Popover.d.vue.ts +9 -5
  261. package/dist/runtime/components/Popover.vue +9 -4
  262. package/dist/runtime/components/Popover.vue.d.ts +9 -5
  263. package/dist/runtime/components/PricingPlan.d.vue.ts +17 -16
  264. package/dist/runtime/components/PricingPlan.vue +24 -22
  265. package/dist/runtime/components/PricingPlan.vue.d.ts +17 -16
  266. package/dist/runtime/components/PricingPlans.d.vue.ts +8 -4
  267. package/dist/runtime/components/PricingPlans.vue +5 -2
  268. package/dist/runtime/components/PricingPlans.vue.d.ts +8 -4
  269. package/dist/runtime/components/PricingTable.d.vue.ts +20 -19
  270. package/dist/runtime/components/PricingTable.vue +38 -36
  271. package/dist/runtime/components/PricingTable.vue.d.ts +20 -19
  272. package/dist/runtime/components/Progress.d.vue.ts +4 -3
  273. package/dist/runtime/components/Progress.vue +9 -7
  274. package/dist/runtime/components/Progress.vue.d.ts +4 -3
  275. package/dist/runtime/components/RadioGroup.d.vue.ts +8 -7
  276. package/dist/runtime/components/RadioGroup.vue +13 -11
  277. package/dist/runtime/components/RadioGroup.vue.d.ts +8 -7
  278. package/dist/runtime/components/ScrollArea.d.vue.ts +13 -2
  279. package/dist/runtime/components/ScrollArea.vue +37 -13
  280. package/dist/runtime/components/ScrollArea.vue.d.ts +13 -2
  281. package/dist/runtime/components/Select.d.vue.ts +82 -41
  282. package/dist/runtime/components/Select.vue +35 -36
  283. package/dist/runtime/components/Select.vue.d.ts +82 -41
  284. package/dist/runtime/components/SelectMenu.d.vue.ts +138 -52
  285. package/dist/runtime/components/SelectMenu.vue +52 -58
  286. package/dist/runtime/components/SelectMenu.vue.d.ts +138 -52
  287. package/dist/runtime/components/Separator.d.vue.ts +3 -2
  288. package/dist/runtime/components/Separator.vue +9 -7
  289. package/dist/runtime/components/Separator.vue.d.ts +3 -2
  290. package/dist/runtime/components/Skeleton.d.vue.ts +3 -0
  291. package/dist/runtime/components/Skeleton.vue +5 -2
  292. package/dist/runtime/components/Skeleton.vue.d.ts +3 -0
  293. package/dist/runtime/components/Slideover.d.vue.ts +19 -18
  294. package/dist/runtime/components/Slideover.vue +16 -11
  295. package/dist/runtime/components/Slideover.vue.d.ts +19 -18
  296. package/dist/runtime/components/Slider.d.vue.ts +1 -1
  297. package/dist/runtime/components/Slider.vue +8 -6
  298. package/dist/runtime/components/Slider.vue.d.ts +1 -1
  299. package/dist/runtime/components/Stepper.d.vue.ts +9 -8
  300. package/dist/runtime/components/Stepper.vue +15 -13
  301. package/dist/runtime/components/Stepper.vue.d.ts +9 -8
  302. package/dist/runtime/components/Switch.d.vue.ts +7 -6
  303. package/dist/runtime/components/Switch.vue +20 -13
  304. package/dist/runtime/components/Switch.vue.d.ts +7 -6
  305. package/dist/runtime/components/Table.d.vue.ts +12 -13
  306. package/dist/runtime/components/Table.vue +26 -24
  307. package/dist/runtime/components/Table.vue.d.ts +12 -13
  308. package/dist/runtime/components/Tabs.d.vue.ts +9 -9
  309. package/dist/runtime/components/Tabs.vue +17 -12
  310. package/dist/runtime/components/Tabs.vue.d.ts +9 -9
  311. package/dist/runtime/components/Textarea.d.vue.ts +60 -17
  312. package/dist/runtime/components/Textarea.vue +16 -12
  313. package/dist/runtime/components/Textarea.vue.d.ts +60 -17
  314. package/dist/runtime/components/Theme.d.vue.ts +18 -0
  315. package/dist/runtime/components/Theme.vue +17 -0
  316. package/dist/runtime/components/Theme.vue.d.ts +18 -0
  317. package/dist/runtime/components/Timeline.d.vue.ts +8 -7
  318. package/dist/runtime/components/Timeline.vue +12 -10
  319. package/dist/runtime/components/Timeline.vue.d.ts +8 -7
  320. package/dist/runtime/components/Toast.d.vue.ts +8 -7
  321. package/dist/runtime/components/Toast.vue +16 -16
  322. package/dist/runtime/components/Toast.vue.d.ts +8 -7
  323. package/dist/runtime/components/Toaster.d.vue.ts +2 -1
  324. package/dist/runtime/components/Toaster.vue +7 -4
  325. package/dist/runtime/components/Toaster.vue.d.ts +2 -1
  326. package/dist/runtime/components/Tooltip.d.vue.ts +6 -4
  327. package/dist/runtime/components/Tooltip.vue +9 -7
  328. package/dist/runtime/components/Tooltip.vue.d.ts +6 -4
  329. package/dist/runtime/components/Tree.d.vue.ts +7 -6
  330. package/dist/runtime/components/Tree.vue +13 -11
  331. package/dist/runtime/components/Tree.vue.d.ts +7 -6
  332. package/dist/runtime/components/User.d.vue.ts +6 -5
  333. package/dist/runtime/components/User.vue +9 -7
  334. package/dist/runtime/components/User.vue.d.ts +6 -5
  335. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +1 -1
  336. package/dist/runtime/components/color-mode/ColorModeButton.vue +5 -3
  337. package/dist/runtime/components/color-mode/ColorModeImage.vue +8 -3
  338. package/dist/runtime/components/color-mode/ColorModeSelect.vue +2 -2
  339. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -1
  340. package/dist/runtime/components/content/ContentNavigation.d.vue.ts +7 -6
  341. package/dist/runtime/components/content/ContentNavigation.vue +22 -20
  342. package/dist/runtime/components/content/ContentNavigation.vue.d.ts +7 -6
  343. package/dist/runtime/components/content/ContentSearch.d.vue.ts +5 -4
  344. package/dist/runtime/components/content/ContentSearch.vue +6 -3
  345. package/dist/runtime/components/content/ContentSearch.vue.d.ts +5 -4
  346. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +1 -1
  347. package/dist/runtime/components/content/ContentSearchButton.vue +6 -4
  348. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +1 -1
  349. package/dist/runtime/components/content/ContentSurround.d.vue.ts +6 -5
  350. package/dist/runtime/components/content/ContentSurround.vue +9 -7
  351. package/dist/runtime/components/content/ContentSurround.vue.d.ts +6 -5
  352. package/dist/runtime/components/content/ContentToc.d.vue.ts +15 -14
  353. package/dist/runtime/components/content/ContentToc.vue +21 -20
  354. package/dist/runtime/components/content/ContentToc.vue.d.ts +15 -14
  355. package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +1 -1
  356. package/dist/runtime/components/locale/LocaleSelect.vue +2 -2
  357. package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
  358. package/dist/runtime/components/prose/A.d.vue.ts +5 -1
  359. package/dist/runtime/components/prose/A.vue +7 -4
  360. package/dist/runtime/components/prose/A.vue.d.ts +5 -1
  361. package/dist/runtime/components/prose/Accordion.d.vue.ts +2 -1
  362. package/dist/runtime/components/prose/Accordion.vue +4 -2
  363. package/dist/runtime/components/prose/Accordion.vue.d.ts +2 -1
  364. package/dist/runtime/components/prose/AccordionItem.d.vue.ts +5 -1
  365. package/dist/runtime/components/prose/AccordionItem.vue +5 -2
  366. package/dist/runtime/components/prose/AccordionItem.vue.d.ts +5 -1
  367. package/dist/runtime/components/prose/Badge.d.vue.ts +5 -1
  368. package/dist/runtime/components/prose/Badge.vue +5 -2
  369. package/dist/runtime/components/prose/Badge.vue.d.ts +5 -1
  370. package/dist/runtime/components/prose/Blockquote.d.vue.ts +5 -1
  371. package/dist/runtime/components/prose/Blockquote.vue +5 -2
  372. package/dist/runtime/components/prose/Blockquote.vue.d.ts +5 -1
  373. package/dist/runtime/components/prose/Callout.d.vue.ts +2 -1
  374. package/dist/runtime/components/prose/Callout.vue +6 -4
  375. package/dist/runtime/components/prose/Callout.vue.d.ts +2 -1
  376. package/dist/runtime/components/prose/Card.d.vue.ts +3 -2
  377. package/dist/runtime/components/prose/Card.vue +8 -6
  378. package/dist/runtime/components/prose/Card.vue.d.ts +3 -2
  379. package/dist/runtime/components/prose/CardGroup.d.vue.ts +5 -1
  380. package/dist/runtime/components/prose/CardGroup.vue +5 -2
  381. package/dist/runtime/components/prose/CardGroup.vue.d.ts +5 -1
  382. package/dist/runtime/components/prose/Code.d.vue.ts +5 -1
  383. package/dist/runtime/components/prose/Code.vue +5 -2
  384. package/dist/runtime/components/prose/Code.vue.d.ts +5 -1
  385. package/dist/runtime/components/prose/CodeCollapse.d.vue.ts +2 -1
  386. package/dist/runtime/components/prose/CodeCollapse.vue +7 -5
  387. package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +2 -1
  388. package/dist/runtime/components/prose/CodeGroup.d.vue.ts +2 -1
  389. package/dist/runtime/components/prose/CodeGroup.vue +9 -7
  390. package/dist/runtime/components/prose/CodeGroup.vue.d.ts +2 -1
  391. package/dist/runtime/components/prose/CodePreview.d.vue.ts +3 -2
  392. package/dist/runtime/components/prose/CodePreview.vue +6 -4
  393. package/dist/runtime/components/prose/CodePreview.vue.d.ts +3 -2
  394. package/dist/runtime/components/prose/CodeTree.d.vue.ts +2 -1
  395. package/dist/runtime/components/prose/CodeTree.vue +14 -12
  396. package/dist/runtime/components/prose/CodeTree.vue.d.ts +2 -1
  397. package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -1
  398. package/dist/runtime/components/prose/Collapsible.vue +7 -5
  399. package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -1
  400. package/dist/runtime/components/prose/Em.d.vue.ts +5 -1
  401. package/dist/runtime/components/prose/Em.vue +5 -2
  402. package/dist/runtime/components/prose/Em.vue.d.ts +5 -1
  403. package/dist/runtime/components/prose/Field.d.vue.ts +2 -1
  404. package/dist/runtime/components/prose/Field.vue +10 -8
  405. package/dist/runtime/components/prose/Field.vue.d.ts +2 -1
  406. package/dist/runtime/components/prose/FieldGroup.d.vue.ts +5 -1
  407. package/dist/runtime/components/prose/FieldGroup.vue +5 -2
  408. package/dist/runtime/components/prose/FieldGroup.vue.d.ts +5 -1
  409. package/dist/runtime/components/prose/H1.d.vue.ts +2 -1
  410. package/dist/runtime/components/prose/H1.vue +5 -3
  411. package/dist/runtime/components/prose/H1.vue.d.ts +2 -1
  412. package/dist/runtime/components/prose/H2.d.vue.ts +2 -1
  413. package/dist/runtime/components/prose/H2.vue +7 -5
  414. package/dist/runtime/components/prose/H2.vue.d.ts +2 -1
  415. package/dist/runtime/components/prose/H3.d.vue.ts +2 -1
  416. package/dist/runtime/components/prose/H3.vue +7 -5
  417. package/dist/runtime/components/prose/H3.vue.d.ts +2 -1
  418. package/dist/runtime/components/prose/H4.d.vue.ts +2 -1
  419. package/dist/runtime/components/prose/H4.vue +5 -3
  420. package/dist/runtime/components/prose/H4.vue.d.ts +2 -1
  421. package/dist/runtime/components/prose/Hr.d.vue.ts +3 -0
  422. package/dist/runtime/components/prose/Hr.vue +5 -2
  423. package/dist/runtime/components/prose/Hr.vue.d.ts +3 -0
  424. package/dist/runtime/components/prose/Icon.d.vue.ts +3 -0
  425. package/dist/runtime/components/prose/Icon.vue +5 -2
  426. package/dist/runtime/components/prose/Icon.vue.d.ts +3 -0
  427. package/dist/runtime/components/prose/Img.vue +9 -15
  428. package/dist/runtime/components/prose/Kbd.d.vue.ts +3 -0
  429. package/dist/runtime/components/prose/Kbd.vue +5 -2
  430. package/dist/runtime/components/prose/Kbd.vue.d.ts +3 -0
  431. package/dist/runtime/components/prose/Li.d.vue.ts +5 -1
  432. package/dist/runtime/components/prose/Li.vue +5 -2
  433. package/dist/runtime/components/prose/Li.vue.d.ts +5 -1
  434. package/dist/runtime/components/prose/Ol.d.vue.ts +5 -1
  435. package/dist/runtime/components/prose/Ol.vue +5 -2
  436. package/dist/runtime/components/prose/Ol.vue.d.ts +5 -1
  437. package/dist/runtime/components/prose/P.d.vue.ts +5 -1
  438. package/dist/runtime/components/prose/P.vue +5 -2
  439. package/dist/runtime/components/prose/P.vue.d.ts +5 -1
  440. package/dist/runtime/components/prose/Pre.d.vue.ts +2 -1
  441. package/dist/runtime/components/prose/Pre.vue +9 -7
  442. package/dist/runtime/components/prose/Pre.vue.d.ts +2 -1
  443. package/dist/runtime/components/prose/Steps.d.vue.ts +5 -1
  444. package/dist/runtime/components/prose/Steps.vue +5 -2
  445. package/dist/runtime/components/prose/Steps.vue.d.ts +5 -1
  446. package/dist/runtime/components/prose/Strong.d.vue.ts +5 -1
  447. package/dist/runtime/components/prose/Strong.vue +5 -2
  448. package/dist/runtime/components/prose/Strong.vue.d.ts +5 -1
  449. package/dist/runtime/components/prose/Table.d.vue.ts +2 -1
  450. package/dist/runtime/components/prose/Table.vue +5 -3
  451. package/dist/runtime/components/prose/Table.vue.d.ts +2 -1
  452. package/dist/runtime/components/prose/Tabs.d.vue.ts +2 -1
  453. package/dist/runtime/components/prose/Tabs.vue +4 -2
  454. package/dist/runtime/components/prose/Tabs.vue.d.ts +2 -1
  455. package/dist/runtime/components/prose/TabsItem.d.vue.ts +5 -1
  456. package/dist/runtime/components/prose/TabsItem.vue +5 -2
  457. package/dist/runtime/components/prose/TabsItem.vue.d.ts +5 -1
  458. package/dist/runtime/components/prose/Tbody.d.vue.ts +5 -1
  459. package/dist/runtime/components/prose/Tbody.vue +5 -2
  460. package/dist/runtime/components/prose/Tbody.vue.d.ts +5 -1
  461. package/dist/runtime/components/prose/Td.d.vue.ts +5 -1
  462. package/dist/runtime/components/prose/Td.vue +5 -2
  463. package/dist/runtime/components/prose/Td.vue.d.ts +5 -1
  464. package/dist/runtime/components/prose/Th.d.vue.ts +5 -1
  465. package/dist/runtime/components/prose/Th.vue +5 -2
  466. package/dist/runtime/components/prose/Th.vue.d.ts +5 -1
  467. package/dist/runtime/components/prose/Thead.d.vue.ts +5 -1
  468. package/dist/runtime/components/prose/Thead.vue +5 -2
  469. package/dist/runtime/components/prose/Thead.vue.d.ts +5 -1
  470. package/dist/runtime/components/prose/Tr.d.vue.ts +5 -1
  471. package/dist/runtime/components/prose/Tr.vue +5 -2
  472. package/dist/runtime/components/prose/Tr.vue.d.ts +5 -1
  473. package/dist/runtime/components/prose/Ul.d.vue.ts +5 -1
  474. package/dist/runtime/components/prose/Ul.vue +5 -2
  475. package/dist/runtime/components/prose/Ul.vue.d.ts +5 -1
  476. package/dist/runtime/composables/defineShortcuts.js +4 -1
  477. package/dist/runtime/composables/internal/useFilter.d.ts +9 -0
  478. package/dist/runtime/composables/internal/useFilter.js +60 -0
  479. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  480. package/dist/runtime/composables/useComponentUI.d.ts +33 -0
  481. package/dist/runtime/composables/useComponentUI.js +13 -0
  482. package/dist/runtime/composables/useEditorMenu.js +27 -10
  483. package/dist/runtime/composables/useFieldGroup.d.ts +1 -1
  484. package/dist/runtime/composables/useFormField.d.ts +1 -1
  485. package/dist/runtime/composables/useResizable.d.ts +2 -2
  486. package/dist/runtime/composables/useResizable.js +2 -2
  487. package/dist/runtime/composables/useToast.d.ts +4 -0
  488. package/dist/runtime/composables/useToast.js +25 -1
  489. package/dist/runtime/keyframes.css +1 -1
  490. package/dist/runtime/locale/be.d.ts +3 -0
  491. package/dist/runtime/locale/be.js +129 -0
  492. package/dist/runtime/locale/index.d.ts +1 -0
  493. package/dist/runtime/locale/index.js +1 -0
  494. package/dist/runtime/types/html.d.ts +3 -1
  495. package/dist/runtime/types/index.d.ts +1 -0
  496. package/dist/runtime/types/index.js +1 -0
  497. package/dist/runtime/types/input.d.ts +16 -6
  498. package/dist/runtime/types/utils.d.ts +12 -10
  499. package/dist/runtime/utils/index.d.ts +2 -1
  500. package/dist/runtime/utils/index.js +11 -1
  501. package/dist/runtime/utils/overlay.d.ts +19 -0
  502. package/dist/runtime/utils/overlay.js +13 -0
  503. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +2 -2
  504. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -1
  505. package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +4 -3
  506. package/dist/runtime/vue/overrides/inertia/Link.vue +4 -2
  507. package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +4 -3
  508. package/dist/runtime/vue/overrides/none/Link.d.vue.ts +4 -4
  509. package/dist/runtime/vue/overrides/none/Link.vue.d.ts +4 -4
  510. package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +4 -3
  511. package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +4 -3
  512. package/dist/runtime/vue/stubs/base.d.ts +6 -0
  513. package/dist/runtime/vue/stubs/base.js +8 -0
  514. package/dist/shared/{ui.Ddb3hKxo.mjs → ui.DI_ypO2T.mjs} +107 -57
  515. package/dist/unplugin.d.mts +1 -1
  516. package/dist/unplugin.mjs +1 -1
  517. package/dist/vite.mjs +1 -1
  518. package/package.json +51 -52
@@ -1,11 +1,12 @@
1
1
  import type { SelectRootProps, SelectRootEmits, SelectContentProps, SelectContentEmits, SelectArrowProps } from 'reka-ui';
2
+ import type { VNode } from 'vue';
2
3
  import type { AppConfig } from '@nuxt/schema';
3
4
  import theme from '#build/ui/select';
4
5
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
6
  import type { AvatarProps, ChipProps, IconProps } from '../types';
6
- import type { ModelModifiers } from '../types/input';
7
+ import type { ModelModifiers, ApplyModifiers } from '../types/input';
7
8
  import type { ButtonHTMLAttributes } from '../types/html';
8
- import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, EmitsToProps } from '../types/utils';
9
+ import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, NestedItem, EmitsToProps } from '../types/utils';
9
10
  import type { ComponentConfig } from '../types/tv';
10
11
  type Select = ComponentConfig<typeof theme, AppConfig, 'select'>;
11
12
  export type SelectValue = AcceptableValue;
@@ -30,7 +31,10 @@ export type SelectItem = SelectValue | {
30
31
  ui?: Pick<Select['slots'], 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChipSize' | 'itemLeadingChip' | 'itemWrapper' | 'itemLabel' | 'itemDescription' | 'itemTrailing' | 'itemTrailingIcon'>;
31
32
  [key: string]: any;
32
33
  };
33
- export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Omit<SelectRootProps<T>, 'dir' | 'multiple' | 'modelValue' | 'defaultValue' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'name'> {
34
+ type ExcludeItem = {
35
+ type: 'label' | 'separator';
36
+ };
37
+ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = 'value', M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>> extends Omit<SelectRootProps<T>, 'dir' | 'multiple' | 'modelValue' | 'defaultValue' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'name'> {
34
38
  id?: string;
35
39
  /** The placeholder text when the select is empty. */
36
40
  placeholder?: string;
@@ -65,6 +69,7 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
65
69
  content?: Omit<SelectContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<SelectContentEmits>>;
66
70
  /**
67
71
  * Display an arrow alongside the menu.
72
+ * `{ rounded: true }`{lang="ts-type"}
68
73
  * @defaultValue false
69
74
  */
70
75
  arrow?: boolean | Omit<SelectArrowProps, 'as' | 'asChild'>;
@@ -90,17 +95,12 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
90
95
  descriptionKey?: GetItemKeys<T>;
91
96
  items?: T;
92
97
  /** The value of the Select when initially rendered. Use when you do not need to control the state of the Select. */
93
- defaultValue?: GetModelValue<T, VK, M>;
98
+ defaultValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod>;
94
99
  /** The controlled value of the Select. Can be bind as `v-model`. */
95
- modelValue?: GetModelValue<T, VK, M>;
96
- modelModifiers?: Omit<ModelModifiers<GetModelValue<T, VK, M>>, 'lazy'>;
100
+ modelValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod>;
101
+ modelModifiers?: Mod;
97
102
  /** Whether multiple options can be selected or not. */
98
103
  multiple?: M & boolean;
99
- /**
100
- * Use a custom comparator to compare objects.
101
- * This can be a string (key) or a function that compares two objects.
102
- */
103
- by?: string | ((a: any, b: any) => boolean);
104
104
  /** Highlight the ring color like a focus state. */
105
105
  highlight?: boolean;
106
106
  autofocus?: boolean;
@@ -108,55 +108,76 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
108
108
  class?: any;
109
109
  ui?: Select['slots'];
110
110
  }
111
- export type SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<SelectRootEmits, 'update:modelValue'> & {
112
- change: [event: Event];
113
- blur: [event: FocusEvent];
114
- focus: [event: FocusEvent];
115
- } & GetModelValueEmits<A, VK, M>;
111
+ export interface SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined, M extends boolean, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>> extends Omit<SelectRootEmits, 'update:modelValue'> {
112
+ 'change': [event: Event];
113
+ 'blur': [event: FocusEvent];
114
+ 'focus': [event: FocusEvent];
115
+ 'update:modelValue': [value: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>];
116
+ }
116
117
  type SlotProps<T extends SelectItem> = (props: {
117
118
  item: T;
118
119
  index: number;
119
120
  ui: Select['ui'];
120
- }) => any;
121
- export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
122
- 'leading'(props: {
123
- modelValue?: GetModelValue<A, VK, M>;
121
+ }) => VNode[];
122
+ export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, T extends NestedItem<A> = NestedItem<A>> {
123
+ 'leading'?(props: {
124
+ modelValue: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>;
124
125
  open: boolean;
125
126
  ui: Select['ui'];
126
- }): any;
127
- 'default'(props: {
128
- modelValue?: GetModelValue<A, VK, M>;
127
+ }): VNode[];
128
+ 'default'?(props: {
129
+ modelValue: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>;
129
130
  open: boolean;
130
131
  ui: Select['ui'];
131
- }): any;
132
- 'trailing'(props: {
133
- modelValue?: GetModelValue<A, VK, M>;
132
+ }): VNode[];
133
+ 'trailing'?(props: {
134
+ modelValue: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>;
134
135
  open: boolean;
135
136
  ui: Select['ui'];
136
- }): any;
137
- 'item': SlotProps<T>;
138
- 'item-leading': SlotProps<T>;
139
- 'item-label'(props: {
137
+ }): VNode[];
138
+ 'item'?: SlotProps<T>;
139
+ 'item-leading'?: SlotProps<T>;
140
+ 'item-label'?(props: {
140
141
  item: T;
141
142
  index: number;
142
- }): any;
143
- 'item-description'(props: {
143
+ }): VNode[];
144
+ 'item-description'?(props: {
144
145
  item: T;
145
146
  index: number;
146
- }): any;
147
- 'item-trailing': SlotProps<T>;
148
- 'content-top': (props?: {}) => any;
149
- 'content-bottom': (props?: {}) => any;
147
+ }): VNode[];
148
+ 'item-trailing'?: SlotProps<T>;
149
+ 'content-top'?: (props?: {}) => VNode[];
150
+ 'content-bottom'?: (props?: {}) => VNode[];
150
151
  }
151
152
  declare const _default: typeof __VLS_export;
152
153
  export default _default;
153
- declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
154
- props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectProps<T, VK, M> & {
154
+ declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = "value", M extends boolean = false, Mod extends Omit<ModelModifiers, "lazy"> = Omit<ModelModifiers, "lazy">>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
155
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectProps<T, VK, M, Mod> & {
155
156
  onBlur?: ((event: FocusEvent) => any) | undefined;
156
157
  onChange?: ((event: Event) => any) | undefined;
157
158
  onFocus?: ((event: FocusEvent) => any) | undefined;
158
159
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
159
- "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
160
+ "onUpdate:modelValue"?: ((value: Mod extends {
161
+ number: true;
162
+ } ? (Mod extends {
163
+ optional: true;
164
+ } ? (Mod extends {
165
+ nullable: true;
166
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
167
+ nullable: true;
168
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
169
+ optional: true;
170
+ } ? (Mod extends {
171
+ nullable: true;
172
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
173
+ nullable: true;
174
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
175
+ optional: true;
176
+ } ? (Mod extends {
177
+ nullable: true;
178
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
179
+ nullable: true;
180
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) => any) | undefined;
160
181
  }> & (typeof globalThis extends {
161
182
  __VLS_PROPS_FALLBACK: infer P;
162
183
  } ? P : {});
@@ -165,8 +186,28 @@ declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends Get
165
186
  viewportRef: Readonly<import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>>;
166
187
  }>) => void;
167
188
  attrs: any;
168
- slots: SelectSlots<T, VK, M, NestedItem<T>>;
169
- emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void);
189
+ slots: SelectSlots<T, VK, M, Mod, NestedItem<T>>;
190
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: Mod extends {
191
+ number: true;
192
+ } ? (Mod extends {
193
+ optional: true;
194
+ } ? (Mod extends {
195
+ nullable: true;
196
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
197
+ nullable: true;
198
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
199
+ optional: true;
200
+ } ? (Mod extends {
201
+ nullable: true;
202
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
203
+ nullable: true;
204
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
205
+ optional: true;
206
+ } ? (Mod extends {
207
+ nullable: true;
208
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
209
+ nullable: true;
210
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) => void);
170
211
  }>) => import("vue").VNode & {
171
212
  __ctx?: Awaited<typeof __VLS_setup>;
172
213
  };
@@ -8,6 +8,7 @@ import { SelectRoot, SelectArrow, SelectTrigger, SelectPortal, SelectContent, Se
8
8
  import { defu } from "defu";
9
9
  import { reactivePick } from "@vueuse/core";
10
10
  import { useAppConfig } from "#imports";
11
+ import { useComponentUI } from "../composables/useComponentUI";
11
12
  import { useFieldGroup } from "../composables/useFieldGroup";
12
13
  import { useComponentIcons } from "../composables/useComponentIcons";
13
14
  import { useFormField } from "../composables/useFormField";
@@ -35,14 +36,13 @@ const props = defineProps({
35
36
  items: { type: null, required: false },
36
37
  defaultValue: { type: null, required: false },
37
38
  modelValue: { type: null, required: false },
38
- modelModifiers: { type: Object, required: false },
39
+ modelModifiers: { type: null, required: false },
39
40
  multiple: { type: Boolean, required: false },
40
- by: { type: [String, Function], required: false },
41
41
  highlight: { type: Boolean, required: false },
42
42
  autofocus: { type: Boolean, required: false },
43
43
  autofocusDelay: { type: Number, required: false, default: 0 },
44
44
  class: { type: null, required: false },
45
- ui: { type: null, required: false },
45
+ ui: { type: Object, required: false },
46
46
  open: { type: Boolean, required: false },
47
47
  defaultOpen: { type: Boolean, required: false },
48
48
  autocomplete: { type: String, required: false },
@@ -57,13 +57,14 @@ const props = defineProps({
57
57
  loading: { type: Boolean, required: false },
58
58
  loadingIcon: { type: null, required: false }
59
59
  });
60
- const emits = defineEmits(["update:open", "change", "blur", "focus", "update:modelValue"]);
60
+ const emits = defineEmits(["change", "blur", "focus", "update:modelValue", "update:open"]);
61
61
  const slots = defineSlots();
62
62
  const appConfig = useAppConfig();
63
- const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen", "disabled", "autocomplete", "required", "multiple", "by"), emits);
63
+ const uiProp = useComponentUI("select", props);
64
+ const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen", "disabled", "autocomplete", "required", "multiple"), emits);
64
65
  const portalProps = usePortal(toRef(() => props.portal));
65
66
  const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8, position: "popper" }));
66
- const arrowProps = toRef(() => props.arrow);
67
+ const arrowProps = toRef(() => defu(props.arrow, { rounded: true }));
67
68
  const { emitFormChange, emitFormInput, emitFormBlur, emitFormFocus, size: formGroupSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
68
69
  const { orientation, size: fieldGroupSize } = useFieldGroup(props);
69
70
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(toRef(() => defu(props, { trailingIcon: appConfig.ui.icons.chevronDown })));
@@ -86,15 +87,13 @@ function displayValue(value) {
86
87
  if (props.multiple && Array.isArray(value)) {
87
88
  const displayedValues = value.map((item) => getDisplayValue(items.value, item, {
88
89
  labelKey: props.labelKey,
89
- valueKey: props.valueKey,
90
- by: props.by
90
+ valueKey: props.valueKey
91
91
  })).filter((v) => v != null && v !== "");
92
92
  return displayedValues.length > 0 ? displayedValues.join(", ") : void 0;
93
93
  }
94
94
  return getDisplayValue(items.value, value, {
95
95
  labelKey: props.labelKey,
96
- valueKey: props.valueKey,
97
- by: props.by
96
+ valueKey: props.valueKey
98
97
  });
99
98
  }
100
99
  const triggerRef = useTemplateRef("triggerRef");
@@ -111,7 +110,7 @@ onMounted(() => {
111
110
  }, props.autofocusDelay);
112
111
  });
113
112
  function onUpdate(value) {
114
- if (props.modelModifiers?.trim) {
113
+ if (props.modelModifiers?.trim && (typeof value === "string" || value === null || value === void 0)) {
115
114
  value = value?.trim() ?? null;
116
115
  }
117
116
  if (props.modelModifiers?.number) {
@@ -120,7 +119,7 @@ function onUpdate(value) {
120
119
  if (props.modelModifiers?.nullable) {
121
120
  value ??= null;
122
121
  }
123
- if (props.modelModifiers?.optional) {
122
+ if (props.modelModifiers?.optional && !props.modelModifiers?.nullable && value !== null) {
124
123
  value ??= void 0;
125
124
  }
126
125
  const event = new Event("change", { target: { value } });
@@ -165,89 +164,89 @@ defineExpose({
165
164
  :id="id"
166
165
  ref="triggerRef"
167
166
  data-slot="base"
168
- :class="ui.base({ class: [props.ui?.base, props.class] })"
167
+ :class="ui.base({ class: [uiProp?.base, props.class] })"
169
168
  v-bind="{ ...$attrs, ...ariaAttrs }"
170
169
  >
171
- <span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
170
+ <span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: uiProp?.leading })">
172
171
  <slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
173
- <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
174
- <UAvatar v-else-if="!!avatar" :size="props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" data-slot="itemLeadingAvatar" :class="ui.itemLeadingAvatar({ class: props.ui?.itemLeadingAvatar })" />
172
+ <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: uiProp?.leadingIcon })" />
173
+ <UAvatar v-else-if="!!avatar" :size="uiProp?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" data-slot="itemLeadingAvatar" :class="ui.itemLeadingAvatar({ class: uiProp?.itemLeadingAvatar })" />
175
174
  </slot>
176
175
  </span>
177
176
 
178
177
  <slot :model-value="modelValue" :open="open" :ui="ui">
179
178
  <template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
180
- <span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" data-slot="value" :class="ui.value({ class: props.ui?.value })">
179
+ <span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" data-slot="value" :class="ui.value({ class: uiProp?.value })">
181
180
  {{ displayedModelValue }}
182
181
  </span>
183
- <span v-else data-slot="placeholder" :class="ui.placeholder({ class: props.ui?.placeholder })">
182
+ <span v-else data-slot="placeholder" :class="ui.placeholder({ class: uiProp?.placeholder })">
184
183
  {{ placeholder ?? "\xA0" }}
185
184
  </span>
186
185
  </template>
187
186
  </slot>
188
187
 
189
- <span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
188
+ <span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: uiProp?.trailing })">
190
189
  <slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
191
- <UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
190
+ <UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: uiProp?.trailingIcon })" />
192
191
  </slot>
193
192
  </span>
194
193
  </SelectTrigger>
195
194
 
196
195
  <SelectPortal v-bind="portalProps">
197
- <SelectContent data-slot="content" :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
196
+ <SelectContent data-slot="content" :class="ui.content({ class: uiProp?.content })" v-bind="contentProps">
198
197
  <slot name="content-top" />
199
198
 
200
- <div ref="viewportRef" role="presentation" data-slot="viewport" :class="ui.viewport({ class: props.ui?.viewport })">
201
- <SelectGroup v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" data-slot="group" :class="ui.group({ class: props.ui?.group })">
199
+ <div ref="viewportRef" role="presentation" data-slot="viewport" :class="ui.viewport({ class: uiProp?.viewport })">
200
+ <SelectGroup v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" data-slot="group" :class="ui.group({ class: uiProp?.group })">
202
201
  <template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
203
- <SelectLabel v-if="isSelectItem(item) && item.type === 'label'" data-slot="label" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
202
+ <SelectLabel v-if="isSelectItem(item) && item.type === 'label'" data-slot="label" :class="ui.label({ class: [uiProp?.label, item.ui?.label, item.class] })">
204
203
  {{ get(item, props.labelKey) }}
205
204
  </SelectLabel>
206
205
 
207
- <SelectSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" data-slot="separator" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator, item.class] })" />
206
+ <SelectSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" data-slot="separator" :class="ui.separator({ class: [uiProp?.separator, item.ui?.separator, item.class] })" />
208
207
 
209
208
  <RSelectItem
210
209
  v-else
211
210
  data-slot="item"
212
- :class="ui.item({ class: [props.ui?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
211
+ :class="ui.item({ class: [uiProp?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
213
212
  :disabled="isSelectItem(item) && item.disabled"
214
213
  :value="isSelectItem(item) ? get(item, props.valueKey) : item"
215
214
  @select="isSelectItem(item) && item.onSelect?.($event)"
216
215
  >
217
216
  <slot name="item" :item="item" :index="index" :ui="ui">
218
217
  <slot name="item-leading" :item="item" :index="index" :ui="ui">
219
- <UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" data-slot="itemLeadingIcon" :class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
220
- <UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" data-slot="itemLeadingAvatar" :class="ui.itemLeadingAvatar({ class: [props.ui?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
218
+ <UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" data-slot="itemLeadingIcon" :class="ui.itemLeadingIcon({ class: [uiProp?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
219
+ <UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || uiProp?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" data-slot="itemLeadingAvatar" :class="ui.itemLeadingAvatar({ class: [uiProp?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
221
220
  <UChip
222
221
  v-else-if="isSelectItem(item) && item.chip"
223
- :size="item.ui?.itemLeadingChipSize || props.ui?.itemLeadingChipSize || ui.itemLeadingChipSize()"
222
+ :size="item.ui?.itemLeadingChipSize || uiProp?.itemLeadingChipSize || ui.itemLeadingChipSize()"
224
223
  inset
225
224
  standalone
226
225
  v-bind="item.chip"
227
226
  data-slot="itemLeadingChip"
228
- :class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
227
+ :class="ui.itemLeadingChip({ class: [uiProp?.itemLeadingChip, item.ui?.itemLeadingChip] })"
229
228
  />
230
229
  </slot>
231
230
 
232
- <span data-slot="itemWrapper" :class="ui.itemWrapper({ class: [props.ui?.itemWrapper, isSelectItem(item) && item.ui?.itemWrapper] })">
233
- <SelectItemText data-slot="itemLabel" :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
231
+ <span data-slot="itemWrapper" :class="ui.itemWrapper({ class: [uiProp?.itemWrapper, isSelectItem(item) && item.ui?.itemWrapper] })">
232
+ <SelectItemText data-slot="itemLabel" :class="ui.itemLabel({ class: [uiProp?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
234
233
  <slot name="item-label" :item="item" :index="index">
235
234
  {{ isSelectItem(item) ? get(item, props.labelKey) : item }}
236
235
  </slot>
237
236
  </SelectItemText>
238
237
 
239
- <span v-if="isSelectItem(item) && (get(item, props.descriptionKey) || !!slots['item-description'])" data-slot="itemDescription" :class="ui.itemDescription({ class: [props.ui?.itemDescription, isSelectItem(item) && item.ui?.itemDescription] })">
238
+ <span v-if="isSelectItem(item) && (get(item, props.descriptionKey) || !!slots['item-description'])" data-slot="itemDescription" :class="ui.itemDescription({ class: [uiProp?.itemDescription, isSelectItem(item) && item.ui?.itemDescription] })">
240
239
  <slot name="item-description" :item="item" :index="index">
241
240
  {{ get(item, props.descriptionKey) }}
242
241
  </slot>
243
242
  </span>
244
243
  </span>
245
244
 
246
- <span data-slot="itemTrailing" :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
245
+ <span data-slot="itemTrailing" :class="ui.itemTrailing({ class: [uiProp?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
247
246
  <slot name="item-trailing" :item="item" :index="index" :ui="ui" />
248
247
 
249
248
  <SelectItemIndicator as-child>
250
- <UIcon :name="selectedIcon || appConfig.ui.icons.check" data-slot="itemTrailingIcon" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
249
+ <UIcon :name="selectedIcon || appConfig.ui.icons.check" data-slot="itemTrailingIcon" :class="ui.itemTrailingIcon({ class: [uiProp?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
251
250
  </SelectItemIndicator>
252
251
  </span>
253
252
  </slot>
@@ -258,7 +257,7 @@ defineExpose({
258
257
 
259
258
  <slot name="content-bottom" />
260
259
 
261
- <SelectArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: props.ui?.arrow })" />
260
+ <SelectArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: uiProp?.arrow })" />
262
261
  </SelectContent>
263
262
  </SelectPortal>
264
263
  </SelectRoot>
@@ -1,11 +1,12 @@
1
1
  import type { SelectRootProps, SelectRootEmits, SelectContentProps, SelectContentEmits, SelectArrowProps } from 'reka-ui';
2
+ import type { VNode } from 'vue';
2
3
  import type { AppConfig } from '@nuxt/schema';
3
4
  import theme from '#build/ui/select';
4
5
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
6
  import type { AvatarProps, ChipProps, IconProps } from '../types';
6
- import type { ModelModifiers } from '../types/input';
7
+ import type { ModelModifiers, ApplyModifiers } from '../types/input';
7
8
  import type { ButtonHTMLAttributes } from '../types/html';
8
- import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, EmitsToProps } from '../types/utils';
9
+ import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, NestedItem, EmitsToProps } from '../types/utils';
9
10
  import type { ComponentConfig } from '../types/tv';
10
11
  type Select = ComponentConfig<typeof theme, AppConfig, 'select'>;
11
12
  export type SelectValue = AcceptableValue;
@@ -30,7 +31,10 @@ export type SelectItem = SelectValue | {
30
31
  ui?: Pick<Select['slots'], 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChipSize' | 'itemLeadingChip' | 'itemWrapper' | 'itemLabel' | 'itemDescription' | 'itemTrailing' | 'itemTrailingIcon'>;
31
32
  [key: string]: any;
32
33
  };
33
- export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Omit<SelectRootProps<T>, 'dir' | 'multiple' | 'modelValue' | 'defaultValue' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'name'> {
34
+ type ExcludeItem = {
35
+ type: 'label' | 'separator';
36
+ };
37
+ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = 'value', M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>> extends Omit<SelectRootProps<T>, 'dir' | 'multiple' | 'modelValue' | 'defaultValue' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'name'> {
34
38
  id?: string;
35
39
  /** The placeholder text when the select is empty. */
36
40
  placeholder?: string;
@@ -65,6 +69,7 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
65
69
  content?: Omit<SelectContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<SelectContentEmits>>;
66
70
  /**
67
71
  * Display an arrow alongside the menu.
72
+ * `{ rounded: true }`{lang="ts-type"}
68
73
  * @defaultValue false
69
74
  */
70
75
  arrow?: boolean | Omit<SelectArrowProps, 'as' | 'asChild'>;
@@ -90,17 +95,12 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
90
95
  descriptionKey?: GetItemKeys<T>;
91
96
  items?: T;
92
97
  /** The value of the Select when initially rendered. Use when you do not need to control the state of the Select. */
93
- defaultValue?: GetModelValue<T, VK, M>;
98
+ defaultValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod>;
94
99
  /** The controlled value of the Select. Can be bind as `v-model`. */
95
- modelValue?: GetModelValue<T, VK, M>;
96
- modelModifiers?: Omit<ModelModifiers<GetModelValue<T, VK, M>>, 'lazy'>;
100
+ modelValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod>;
101
+ modelModifiers?: Mod;
97
102
  /** Whether multiple options can be selected or not. */
98
103
  multiple?: M & boolean;
99
- /**
100
- * Use a custom comparator to compare objects.
101
- * This can be a string (key) or a function that compares two objects.
102
- */
103
- by?: string | ((a: any, b: any) => boolean);
104
104
  /** Highlight the ring color like a focus state. */
105
105
  highlight?: boolean;
106
106
  autofocus?: boolean;
@@ -108,55 +108,76 @@ export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested
108
108
  class?: any;
109
109
  ui?: Select['slots'];
110
110
  }
111
- export type SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<SelectRootEmits, 'update:modelValue'> & {
112
- change: [event: Event];
113
- blur: [event: FocusEvent];
114
- focus: [event: FocusEvent];
115
- } & GetModelValueEmits<A, VK, M>;
111
+ export interface SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined, M extends boolean, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>> extends Omit<SelectRootEmits, 'update:modelValue'> {
112
+ 'change': [event: Event];
113
+ 'blur': [event: FocusEvent];
114
+ 'focus': [event: FocusEvent];
115
+ 'update:modelValue': [value: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>];
116
+ }
116
117
  type SlotProps<T extends SelectItem> = (props: {
117
118
  item: T;
118
119
  index: number;
119
120
  ui: Select['ui'];
120
- }) => any;
121
- export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
122
- 'leading'(props: {
123
- modelValue?: GetModelValue<A, VK, M>;
121
+ }) => VNode[];
122
+ export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, T extends NestedItem<A> = NestedItem<A>> {
123
+ 'leading'?(props: {
124
+ modelValue: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>;
124
125
  open: boolean;
125
126
  ui: Select['ui'];
126
- }): any;
127
- 'default'(props: {
128
- modelValue?: GetModelValue<A, VK, M>;
127
+ }): VNode[];
128
+ 'default'?(props: {
129
+ modelValue: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>;
129
130
  open: boolean;
130
131
  ui: Select['ui'];
131
- }): any;
132
- 'trailing'(props: {
133
- modelValue?: GetModelValue<A, VK, M>;
132
+ }): VNode[];
133
+ 'trailing'?(props: {
134
+ modelValue: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod>;
134
135
  open: boolean;
135
136
  ui: Select['ui'];
136
- }): any;
137
- 'item': SlotProps<T>;
138
- 'item-leading': SlotProps<T>;
139
- 'item-label'(props: {
137
+ }): VNode[];
138
+ 'item'?: SlotProps<T>;
139
+ 'item-leading'?: SlotProps<T>;
140
+ 'item-label'?(props: {
140
141
  item: T;
141
142
  index: number;
142
- }): any;
143
- 'item-description'(props: {
143
+ }): VNode[];
144
+ 'item-description'?(props: {
144
145
  item: T;
145
146
  index: number;
146
- }): any;
147
- 'item-trailing': SlotProps<T>;
148
- 'content-top': (props?: {}) => any;
149
- 'content-bottom': (props?: {}) => any;
147
+ }): VNode[];
148
+ 'item-trailing'?: SlotProps<T>;
149
+ 'content-top'?: (props?: {}) => VNode[];
150
+ 'content-bottom'?: (props?: {}) => VNode[];
150
151
  }
151
152
  declare const _default: typeof __VLS_export;
152
153
  export default _default;
153
- declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
154
- props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectProps<T, VK, M> & {
154
+ declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = "value", M extends boolean = false, Mod extends Omit<ModelModifiers, "lazy"> = Omit<ModelModifiers, "lazy">>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
155
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectProps<T, VK, M, Mod> & {
155
156
  onBlur?: ((event: FocusEvent) => any) | undefined;
156
157
  onChange?: ((event: Event) => any) | undefined;
157
158
  onFocus?: ((event: FocusEvent) => any) | undefined;
158
159
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
159
- "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
160
+ "onUpdate:modelValue"?: ((value: Mod extends {
161
+ number: true;
162
+ } ? (Mod extends {
163
+ optional: true;
164
+ } ? (Mod extends {
165
+ nullable: true;
166
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
167
+ nullable: true;
168
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
169
+ optional: true;
170
+ } ? (Mod extends {
171
+ nullable: true;
172
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
173
+ nullable: true;
174
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
175
+ optional: true;
176
+ } ? (Mod extends {
177
+ nullable: true;
178
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
179
+ nullable: true;
180
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) => any) | undefined;
160
181
  }> & (typeof globalThis extends {
161
182
  __VLS_PROPS_FALLBACK: infer P;
162
183
  } ? P : {});
@@ -165,8 +186,28 @@ declare const __VLS_export: <T extends ArrayOrNested<SelectItem>, VK extends Get
165
186
  viewportRef: Readonly<import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>>;
166
187
  }>) => void;
167
188
  attrs: any;
168
- slots: SelectSlots<T, VK, M, NestedItem<T>>;
169
- emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void);
189
+ slots: SelectSlots<T, VK, M, Mod, NestedItem<T>>;
190
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: Mod extends {
191
+ number: true;
192
+ } ? (Mod extends {
193
+ optional: true;
194
+ } ? (Mod extends {
195
+ nullable: true;
196
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
197
+ nullable: true;
198
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
199
+ optional: true;
200
+ } ? (Mod extends {
201
+ nullable: true;
202
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
203
+ nullable: true;
204
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
205
+ optional: true;
206
+ } ? (Mod extends {
207
+ nullable: true;
208
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
209
+ nullable: true;
210
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) => void);
170
211
  }>) => import("vue").VNode & {
171
212
  __ctx?: Awaited<typeof __VLS_setup>;
172
213
  };