@nuxt/ui 4.4.0 → 4.5.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 (362) hide show
  1. package/README.md +4 -1
  2. package/cli/package.json +1 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +3 -3
  5. package/dist/runtime/components/Accordion.vue +12 -10
  6. package/dist/runtime/components/Alert.vue +12 -10
  7. package/dist/runtime/components/AuthForm.vue +19 -17
  8. package/dist/runtime/components/Avatar.vue +7 -5
  9. package/dist/runtime/components/AvatarGroup.vue +6 -4
  10. package/dist/runtime/components/Badge.vue +8 -6
  11. package/dist/runtime/components/Banner.vue +12 -10
  12. package/dist/runtime/components/BlogPost.d.vue.ts +3 -2
  13. package/dist/runtime/components/BlogPost.vue +16 -14
  14. package/dist/runtime/components/BlogPost.vue.d.ts +3 -2
  15. package/dist/runtime/components/BlogPosts.d.vue.ts +3 -0
  16. package/dist/runtime/components/BlogPosts.vue +5 -2
  17. package/dist/runtime/components/BlogPosts.vue.d.ts +3 -0
  18. package/dist/runtime/components/Breadcrumb.vue +12 -10
  19. package/dist/runtime/components/Button.vue +8 -6
  20. package/dist/runtime/components/Calendar.vue +15 -13
  21. package/dist/runtime/components/Card.vue +7 -5
  22. package/dist/runtime/components/Carousel.vue +13 -11
  23. package/dist/runtime/components/ChangelogVersion.d.vue.ts +2 -1
  24. package/dist/runtime/components/ChangelogVersion.vue +19 -17
  25. package/dist/runtime/components/ChangelogVersion.vue.d.ts +2 -1
  26. package/dist/runtime/components/ChangelogVersions.vue +7 -5
  27. package/dist/runtime/components/ChatMessage.vue +10 -8
  28. package/dist/runtime/components/ChatMessages.vue +16 -11
  29. package/dist/runtime/components/ChatPalette.vue +6 -4
  30. package/dist/runtime/components/ChatPrompt.vue +9 -6
  31. package/dist/runtime/components/ChatPromptSubmit.vue +5 -3
  32. package/dist/runtime/components/Checkbox.vue +19 -12
  33. package/dist/runtime/components/CheckboxGroup.d.vue.ts +5 -5
  34. package/dist/runtime/components/CheckboxGroup.vue +9 -7
  35. package/dist/runtime/components/CheckboxGroup.vue.d.ts +5 -5
  36. package/dist/runtime/components/Chip.vue +5 -3
  37. package/dist/runtime/components/Collapsible.vue +5 -3
  38. package/dist/runtime/components/ColorPicker.vue +10 -8
  39. package/dist/runtime/components/CommandPalette.d.vue.ts +4 -4
  40. package/dist/runtime/components/CommandPalette.vue +33 -31
  41. package/dist/runtime/components/CommandPalette.vue.d.ts +4 -4
  42. package/dist/runtime/components/Container.d.vue.ts +3 -0
  43. package/dist/runtime/components/Container.vue +5 -2
  44. package/dist/runtime/components/Container.vue.d.ts +3 -0
  45. package/dist/runtime/components/ContextMenu.vue +5 -3
  46. package/dist/runtime/components/ContextMenuContent.vue +1 -0
  47. package/dist/runtime/components/DashboardGroup.d.vue.ts +3 -0
  48. package/dist/runtime/components/DashboardGroup.vue +4 -1
  49. package/dist/runtime/components/DashboardGroup.vue.d.ts +3 -0
  50. package/dist/runtime/components/DashboardNavbar.vue +10 -8
  51. package/dist/runtime/components/DashboardPanel.vue +6 -4
  52. package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +3 -0
  53. package/dist/runtime/components/DashboardResizeHandle.vue +5 -2
  54. package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +3 -0
  55. package/dist/runtime/components/DashboardSearch.vue +6 -3
  56. package/dist/runtime/components/DashboardSearchButton.d.vue.ts +1 -1
  57. package/dist/runtime/components/DashboardSearchButton.vue +6 -4
  58. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +1 -1
  59. package/dist/runtime/components/DashboardSidebar.d.vue.ts +6 -1
  60. package/dist/runtime/components/DashboardSidebar.vue +16 -12
  61. package/dist/runtime/components/DashboardSidebar.vue.d.ts +6 -1
  62. package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +3 -0
  63. package/dist/runtime/components/DashboardSidebarCollapse.vue +4 -2
  64. package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +3 -0
  65. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +3 -0
  66. package/dist/runtime/components/DashboardSidebarToggle.vue +4 -2
  67. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +3 -0
  68. package/dist/runtime/components/DashboardToolbar.vue +6 -4
  69. package/dist/runtime/components/Drawer.d.vue.ts +1 -1
  70. package/dist/runtime/components/Drawer.vue +16 -11
  71. package/dist/runtime/components/Drawer.vue.d.ts +1 -1
  72. package/dist/runtime/components/DropdownMenu.vue +6 -4
  73. package/dist/runtime/components/DropdownMenuContent.vue +1 -0
  74. package/dist/runtime/components/Editor.d.vue.ts +2 -1
  75. package/dist/runtime/components/Editor.vue +16 -4
  76. package/dist/runtime/components/Editor.vue.d.ts +2 -1
  77. package/dist/runtime/components/EditorDragHandle.d.vue.ts +13 -1
  78. package/dist/runtime/components/EditorDragHandle.vue +17 -8
  79. package/dist/runtime/components/EditorDragHandle.vue.d.ts +13 -1
  80. package/dist/runtime/components/EditorEmojiMenu.vue +1 -1
  81. package/dist/runtime/components/EditorMentionMenu.d.vue.ts +1 -1
  82. package/dist/runtime/components/EditorMentionMenu.vue +5 -2
  83. package/dist/runtime/components/EditorMentionMenu.vue.d.ts +1 -1
  84. package/dist/runtime/components/EditorSuggestionMenu.vue +1 -1
  85. package/dist/runtime/components/EditorToolbar.vue +10 -7
  86. package/dist/runtime/components/Empty.vue +11 -9
  87. package/dist/runtime/components/Error.vue +8 -6
  88. package/dist/runtime/components/FieldGroup.d.vue.ts +3 -1
  89. package/dist/runtime/components/FieldGroup.vue +4 -2
  90. package/dist/runtime/components/FieldGroup.vue.d.ts +3 -1
  91. package/dist/runtime/components/FileUpload.d.vue.ts +1 -1
  92. package/dist/runtime/components/FileUpload.vue +18 -16
  93. package/dist/runtime/components/FileUpload.vue.d.ts +1 -1
  94. package/dist/runtime/components/Footer.vue +10 -8
  95. package/dist/runtime/components/FooterColumns.vue +14 -12
  96. package/dist/runtime/components/Form.d.vue.ts +3 -0
  97. package/dist/runtime/components/Form.vue +10 -2
  98. package/dist/runtime/components/Form.vue.d.ts +3 -0
  99. package/dist/runtime/components/FormField.vue +12 -10
  100. package/dist/runtime/components/Header.d.vue.ts +6 -1
  101. package/dist/runtime/components/Header.vue +16 -12
  102. package/dist/runtime/components/Header.vue.d.ts +6 -1
  103. package/dist/runtime/components/Input.d.vue.ts +53 -11
  104. package/dist/runtime/components/Input.vue +16 -12
  105. package/dist/runtime/components/Input.vue.d.ts +53 -11
  106. package/dist/runtime/components/InputDate.d.vue.ts +2 -0
  107. package/dist/runtime/components/InputDate.vue +18 -11
  108. package/dist/runtime/components/InputDate.vue.d.ts +2 -0
  109. package/dist/runtime/components/InputMenu.d.vue.ts +153 -25
  110. package/dist/runtime/components/InputMenu.vue +51 -58
  111. package/dist/runtime/components/InputMenu.vue.d.ts +153 -25
  112. package/dist/runtime/components/InputNumber.d.vue.ts +15 -8
  113. package/dist/runtime/components/InputNumber.vue +23 -14
  114. package/dist/runtime/components/InputNumber.vue.d.ts +15 -8
  115. package/dist/runtime/components/InputTags.d.vue.ts +2 -0
  116. package/dist/runtime/components/InputTags.vue +16 -12
  117. package/dist/runtime/components/InputTags.vue.d.ts +2 -0
  118. package/dist/runtime/components/InputTime.d.vue.ts +6 -4
  119. package/dist/runtime/components/InputTime.vue +18 -10
  120. package/dist/runtime/components/InputTime.vue.d.ts +6 -4
  121. package/dist/runtime/components/Kbd.d.vue.ts +3 -0
  122. package/dist/runtime/components/Kbd.vue +5 -2
  123. package/dist/runtime/components/Kbd.vue.d.ts +3 -0
  124. package/dist/runtime/components/Link.d.vue.ts +1 -1
  125. package/dist/runtime/components/Link.vue +7 -7
  126. package/dist/runtime/components/Link.vue.d.ts +1 -1
  127. package/dist/runtime/components/Main.d.vue.ts +3 -0
  128. package/dist/runtime/components/Main.vue +5 -2
  129. package/dist/runtime/components/Main.vue.d.ts +3 -0
  130. package/dist/runtime/components/Marquee.vue +5 -3
  131. package/dist/runtime/components/Modal.d.vue.ts +2 -2
  132. package/dist/runtime/components/Modal.vue +17 -24
  133. package/dist/runtime/components/Modal.vue.d.ts +2 -2
  134. package/dist/runtime/components/NavigationMenu.d.vue.ts +13 -6
  135. package/dist/runtime/components/NavigationMenu.vue +77 -53
  136. package/dist/runtime/components/NavigationMenu.vue.d.ts +13 -6
  137. package/dist/runtime/components/Page.vue +7 -5
  138. package/dist/runtime/components/PageAnchors.vue +11 -9
  139. package/dist/runtime/components/PageAside.vue +9 -7
  140. package/dist/runtime/components/PageBody.d.vue.ts +3 -0
  141. package/dist/runtime/components/PageBody.vue +5 -2
  142. package/dist/runtime/components/PageBody.vue.d.ts +3 -0
  143. package/dist/runtime/components/PageCTA.vue +12 -10
  144. package/dist/runtime/components/PageCard.vue +14 -12
  145. package/dist/runtime/components/PageColumns.d.vue.ts +3 -0
  146. package/dist/runtime/components/PageColumns.vue +5 -2
  147. package/dist/runtime/components/PageColumns.vue.d.ts +3 -0
  148. package/dist/runtime/components/PageFeature.vue +9 -7
  149. package/dist/runtime/components/PageGrid.d.vue.ts +3 -0
  150. package/dist/runtime/components/PageGrid.vue +5 -2
  151. package/dist/runtime/components/PageGrid.vue.d.ts +3 -0
  152. package/dist/runtime/components/PageHeader.vue +10 -8
  153. package/dist/runtime/components/PageHero.vue +13 -11
  154. package/dist/runtime/components/PageLinks.vue +11 -9
  155. package/dist/runtime/components/PageList.d.vue.ts +3 -0
  156. package/dist/runtime/components/PageList.vue +5 -2
  157. package/dist/runtime/components/PageList.vue.d.ts +3 -0
  158. package/dist/runtime/components/PageLogos.vue +9 -7
  159. package/dist/runtime/components/PageSection.d.vue.ts +1 -1
  160. package/dist/runtime/components/PageSection.vue +16 -14
  161. package/dist/runtime/components/PageSection.vue.d.ts +1 -1
  162. package/dist/runtime/components/Pagination.d.vue.ts +1 -1
  163. package/dist/runtime/components/Pagination.vue +11 -9
  164. package/dist/runtime/components/Pagination.vue.d.ts +1 -1
  165. package/dist/runtime/components/PinInput.d.vue.ts +2 -0
  166. package/dist/runtime/components/PinInput.vue +12 -5
  167. package/dist/runtime/components/PinInput.vue.d.ts +2 -0
  168. package/dist/runtime/components/Popover.vue +8 -3
  169. package/dist/runtime/components/PricingPlan.vue +24 -22
  170. package/dist/runtime/components/PricingPlans.d.vue.ts +3 -0
  171. package/dist/runtime/components/PricingPlans.vue +5 -2
  172. package/dist/runtime/components/PricingPlans.vue.d.ts +3 -0
  173. package/dist/runtime/components/PricingTable.vue +38 -36
  174. package/dist/runtime/components/Progress.vue +9 -7
  175. package/dist/runtime/components/RadioGroup.d.vue.ts +2 -2
  176. package/dist/runtime/components/RadioGroup.vue +13 -11
  177. package/dist/runtime/components/RadioGroup.vue.d.ts +2 -2
  178. package/dist/runtime/components/ScrollArea.d.vue.ts +7 -0
  179. package/dist/runtime/components/ScrollArea.vue +35 -11
  180. package/dist/runtime/components/ScrollArea.vue.d.ts +7 -0
  181. package/dist/runtime/components/Select.d.vue.ts +64 -25
  182. package/dist/runtime/components/Select.vue +34 -35
  183. package/dist/runtime/components/Select.vue.d.ts +64 -25
  184. package/dist/runtime/components/SelectMenu.d.vue.ts +115 -30
  185. package/dist/runtime/components/SelectMenu.vue +51 -57
  186. package/dist/runtime/components/SelectMenu.vue.d.ts +115 -30
  187. package/dist/runtime/components/Separator.vue +9 -7
  188. package/dist/runtime/components/Skeleton.d.vue.ts +3 -0
  189. package/dist/runtime/components/Skeleton.vue +5 -2
  190. package/dist/runtime/components/Skeleton.vue.d.ts +3 -0
  191. package/dist/runtime/components/Slideover.d.vue.ts +3 -3
  192. package/dist/runtime/components/Slideover.vue +16 -11
  193. package/dist/runtime/components/Slideover.vue.d.ts +3 -3
  194. package/dist/runtime/components/Slider.d.vue.ts +1 -1
  195. package/dist/runtime/components/Slider.vue +8 -6
  196. package/dist/runtime/components/Slider.vue.d.ts +1 -1
  197. package/dist/runtime/components/Stepper.d.vue.ts +1 -1
  198. package/dist/runtime/components/Stepper.vue +15 -13
  199. package/dist/runtime/components/Stepper.vue.d.ts +1 -1
  200. package/dist/runtime/components/Switch.vue +20 -13
  201. package/dist/runtime/components/Table.d.vue.ts +1 -1
  202. package/dist/runtime/components/Table.vue +26 -24
  203. package/dist/runtime/components/Table.vue.d.ts +1 -1
  204. package/dist/runtime/components/Tabs.vue +17 -12
  205. package/dist/runtime/components/Textarea.d.vue.ts +53 -11
  206. package/dist/runtime/components/Textarea.vue +16 -12
  207. package/dist/runtime/components/Textarea.vue.d.ts +53 -11
  208. package/dist/runtime/components/Theme.d.vue.ts +17 -0
  209. package/dist/runtime/components/Theme.vue +17 -0
  210. package/dist/runtime/components/Theme.vue.d.ts +17 -0
  211. package/dist/runtime/components/Timeline.d.vue.ts +1 -1
  212. package/dist/runtime/components/Timeline.vue +12 -10
  213. package/dist/runtime/components/Timeline.vue.d.ts +1 -1
  214. package/dist/runtime/components/Toast.vue +16 -16
  215. package/dist/runtime/components/Toaster.vue +7 -4
  216. package/dist/runtime/components/Tooltip.vue +8 -6
  217. package/dist/runtime/components/Tree.vue +13 -11
  218. package/dist/runtime/components/User.vue +9 -7
  219. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +1 -1
  220. package/dist/runtime/components/color-mode/ColorModeButton.vue +5 -3
  221. package/dist/runtime/components/color-mode/ColorModeImage.vue +8 -3
  222. package/dist/runtime/components/color-mode/ColorModeSelect.vue +2 -2
  223. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -1
  224. package/dist/runtime/components/content/ContentNavigation.vue +21 -19
  225. package/dist/runtime/components/content/ContentSearch.d.vue.ts +1 -1
  226. package/dist/runtime/components/content/ContentSearch.vue +6 -3
  227. package/dist/runtime/components/content/ContentSearch.vue.d.ts +1 -1
  228. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +1 -1
  229. package/dist/runtime/components/content/ContentSearchButton.vue +6 -4
  230. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +1 -1
  231. package/dist/runtime/components/content/ContentSurround.vue +9 -7
  232. package/dist/runtime/components/content/ContentToc.vue +18 -16
  233. package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +1 -1
  234. package/dist/runtime/components/locale/LocaleSelect.vue +2 -2
  235. package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
  236. package/dist/runtime/components/prose/A.d.vue.ts +3 -0
  237. package/dist/runtime/components/prose/A.vue +7 -4
  238. package/dist/runtime/components/prose/A.vue.d.ts +3 -0
  239. package/dist/runtime/components/prose/Accordion.vue +4 -2
  240. package/dist/runtime/components/prose/AccordionItem.d.vue.ts +3 -0
  241. package/dist/runtime/components/prose/AccordionItem.vue +5 -2
  242. package/dist/runtime/components/prose/AccordionItem.vue.d.ts +3 -0
  243. package/dist/runtime/components/prose/Badge.d.vue.ts +3 -0
  244. package/dist/runtime/components/prose/Badge.vue +5 -2
  245. package/dist/runtime/components/prose/Badge.vue.d.ts +3 -0
  246. package/dist/runtime/components/prose/Blockquote.d.vue.ts +3 -0
  247. package/dist/runtime/components/prose/Blockquote.vue +5 -2
  248. package/dist/runtime/components/prose/Blockquote.vue.d.ts +3 -0
  249. package/dist/runtime/components/prose/Callout.vue +6 -4
  250. package/dist/runtime/components/prose/Card.vue +8 -6
  251. package/dist/runtime/components/prose/CardGroup.d.vue.ts +3 -0
  252. package/dist/runtime/components/prose/CardGroup.vue +5 -2
  253. package/dist/runtime/components/prose/CardGroup.vue.d.ts +3 -0
  254. package/dist/runtime/components/prose/Code.d.vue.ts +3 -0
  255. package/dist/runtime/components/prose/Code.vue +5 -2
  256. package/dist/runtime/components/prose/Code.vue.d.ts +3 -0
  257. package/dist/runtime/components/prose/CodeCollapse.vue +7 -5
  258. package/dist/runtime/components/prose/CodeGroup.vue +9 -7
  259. package/dist/runtime/components/prose/CodePreview.vue +6 -4
  260. package/dist/runtime/components/prose/CodeTree.vue +14 -12
  261. package/dist/runtime/components/prose/Collapsible.vue +7 -5
  262. package/dist/runtime/components/prose/Em.d.vue.ts +3 -0
  263. package/dist/runtime/components/prose/Em.vue +5 -2
  264. package/dist/runtime/components/prose/Em.vue.d.ts +3 -0
  265. package/dist/runtime/components/prose/Field.vue +10 -8
  266. package/dist/runtime/components/prose/FieldGroup.d.vue.ts +3 -0
  267. package/dist/runtime/components/prose/FieldGroup.vue +5 -2
  268. package/dist/runtime/components/prose/FieldGroup.vue.d.ts +3 -0
  269. package/dist/runtime/components/prose/H1.vue +5 -3
  270. package/dist/runtime/components/prose/H2.vue +7 -5
  271. package/dist/runtime/components/prose/H3.vue +7 -5
  272. package/dist/runtime/components/prose/H4.vue +5 -3
  273. package/dist/runtime/components/prose/Hr.d.vue.ts +3 -0
  274. package/dist/runtime/components/prose/Hr.vue +5 -2
  275. package/dist/runtime/components/prose/Hr.vue.d.ts +3 -0
  276. package/dist/runtime/components/prose/Icon.d.vue.ts +3 -0
  277. package/dist/runtime/components/prose/Icon.vue +5 -2
  278. package/dist/runtime/components/prose/Icon.vue.d.ts +3 -0
  279. package/dist/runtime/components/prose/Img.vue +9 -15
  280. package/dist/runtime/components/prose/Kbd.d.vue.ts +3 -0
  281. package/dist/runtime/components/prose/Kbd.vue +5 -2
  282. package/dist/runtime/components/prose/Kbd.vue.d.ts +3 -0
  283. package/dist/runtime/components/prose/Li.d.vue.ts +3 -0
  284. package/dist/runtime/components/prose/Li.vue +5 -2
  285. package/dist/runtime/components/prose/Li.vue.d.ts +3 -0
  286. package/dist/runtime/components/prose/Ol.d.vue.ts +3 -0
  287. package/dist/runtime/components/prose/Ol.vue +5 -2
  288. package/dist/runtime/components/prose/Ol.vue.d.ts +3 -0
  289. package/dist/runtime/components/prose/P.d.vue.ts +3 -0
  290. package/dist/runtime/components/prose/P.vue +5 -2
  291. package/dist/runtime/components/prose/P.vue.d.ts +3 -0
  292. package/dist/runtime/components/prose/Pre.vue +9 -7
  293. package/dist/runtime/components/prose/Steps.d.vue.ts +3 -0
  294. package/dist/runtime/components/prose/Steps.vue +5 -2
  295. package/dist/runtime/components/prose/Steps.vue.d.ts +3 -0
  296. package/dist/runtime/components/prose/Strong.d.vue.ts +3 -0
  297. package/dist/runtime/components/prose/Strong.vue +5 -2
  298. package/dist/runtime/components/prose/Strong.vue.d.ts +3 -0
  299. package/dist/runtime/components/prose/Table.vue +5 -3
  300. package/dist/runtime/components/prose/Tabs.vue +4 -2
  301. package/dist/runtime/components/prose/TabsItem.d.vue.ts +3 -0
  302. package/dist/runtime/components/prose/TabsItem.vue +5 -2
  303. package/dist/runtime/components/prose/TabsItem.vue.d.ts +3 -0
  304. package/dist/runtime/components/prose/Tbody.d.vue.ts +3 -0
  305. package/dist/runtime/components/prose/Tbody.vue +5 -2
  306. package/dist/runtime/components/prose/Tbody.vue.d.ts +3 -0
  307. package/dist/runtime/components/prose/Td.d.vue.ts +3 -0
  308. package/dist/runtime/components/prose/Td.vue +5 -2
  309. package/dist/runtime/components/prose/Td.vue.d.ts +3 -0
  310. package/dist/runtime/components/prose/Th.d.vue.ts +3 -0
  311. package/dist/runtime/components/prose/Th.vue +5 -2
  312. package/dist/runtime/components/prose/Th.vue.d.ts +3 -0
  313. package/dist/runtime/components/prose/Thead.d.vue.ts +3 -0
  314. package/dist/runtime/components/prose/Thead.vue +5 -2
  315. package/dist/runtime/components/prose/Thead.vue.d.ts +3 -0
  316. package/dist/runtime/components/prose/Tr.d.vue.ts +3 -0
  317. package/dist/runtime/components/prose/Tr.vue +5 -2
  318. package/dist/runtime/components/prose/Tr.vue.d.ts +3 -0
  319. package/dist/runtime/components/prose/Ul.d.vue.ts +3 -0
  320. package/dist/runtime/components/prose/Ul.vue +5 -2
  321. package/dist/runtime/components/prose/Ul.vue.d.ts +3 -0
  322. package/dist/runtime/composables/defineShortcuts.js +4 -1
  323. package/dist/runtime/composables/internal/useFilter.d.ts +9 -0
  324. package/dist/runtime/composables/internal/useFilter.js +60 -0
  325. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  326. package/dist/runtime/composables/useComponentUI.d.ts +33 -0
  327. package/dist/runtime/composables/useComponentUI.js +13 -0
  328. package/dist/runtime/composables/useEditorMenu.js +27 -10
  329. package/dist/runtime/composables/useFieldGroup.d.ts +1 -1
  330. package/dist/runtime/composables/useFormField.d.ts +1 -1
  331. package/dist/runtime/composables/useToast.d.ts +4 -0
  332. package/dist/runtime/composables/useToast.js +25 -1
  333. package/dist/runtime/keyframes.css +1 -1
  334. package/dist/runtime/locale/be.d.ts +3 -0
  335. package/dist/runtime/locale/be.js +129 -0
  336. package/dist/runtime/locale/index.d.ts +1 -0
  337. package/dist/runtime/locale/index.js +1 -0
  338. package/dist/runtime/types/html.d.ts +3 -1
  339. package/dist/runtime/types/index.d.ts +1 -0
  340. package/dist/runtime/types/index.js +1 -0
  341. package/dist/runtime/types/input.d.ts +16 -6
  342. package/dist/runtime/types/utils.d.ts +10 -8
  343. package/dist/runtime/utils/index.d.ts +1 -0
  344. package/dist/runtime/utils/index.js +10 -0
  345. package/dist/runtime/utils/overlay.d.ts +19 -0
  346. package/dist/runtime/utils/overlay.js +13 -0
  347. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +2 -2
  348. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -1
  349. package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +1 -1
  350. package/dist/runtime/vue/overrides/inertia/Link.vue +4 -2
  351. package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +1 -1
  352. package/dist/runtime/vue/overrides/none/Link.d.vue.ts +1 -1
  353. package/dist/runtime/vue/overrides/none/Link.vue.d.ts +1 -1
  354. package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +1 -1
  355. package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +1 -1
  356. package/dist/runtime/vue/stubs/base.d.ts +6 -0
  357. package/dist/runtime/vue/stubs/base.js +8 -0
  358. package/dist/shared/{ui.Ddb3hKxo.mjs → ui.BrgdrRzy.mjs} +99 -51
  359. package/dist/unplugin.d.mts +1 -1
  360. package/dist/unplugin.mjs +1 -1
  361. package/dist/vite.mjs +1 -1
  362. package/package.json +50 -51
@@ -7,6 +7,7 @@ import { useTemplateRef, computed, onMounted } from "vue";
7
7
  import { Primitive } from "reka-ui";
8
8
  import { useVModel } from "@vueuse/core";
9
9
  import { useAppConfig } from "#imports";
10
+ import { useComponentUI } from "../composables/useComponentUI";
10
11
  import { useFieldGroup } from "../composables/useFieldGroup";
11
12
  import { useComponentIcons } from "../composables/useComponentIcons";
12
13
  import { useFormField } from "../composables/useFormField";
@@ -25,16 +26,17 @@ const props = defineProps({
25
26
  variant: { type: null, required: false },
26
27
  size: { type: null, required: false },
27
28
  required: { type: Boolean, required: false },
28
- autocomplete: { type: null, required: false, default: "off" },
29
+ autocomplete: { type: [String, Object], required: false, default: "off" },
29
30
  autofocus: { type: Boolean, required: false },
30
31
  autofocusDelay: { type: Number, required: false, default: 0 },
31
32
  disabled: { type: Boolean, required: false },
32
33
  highlight: { type: Boolean, required: false },
34
+ fixed: { type: Boolean, required: false },
33
35
  modelValue: { type: null, required: false },
34
36
  defaultValue: { type: null, required: false },
35
- modelModifiers: { type: Object, required: false },
37
+ modelModifiers: { type: null, required: false },
36
38
  class: { type: null, required: false },
37
- ui: { type: null, required: false },
39
+ ui: { type: Object, required: false },
38
40
  icon: { type: null, required: false },
39
41
  avatar: { type: Object, required: false },
40
42
  leading: { type: Boolean, required: false },
@@ -48,6 +50,7 @@ const emits = defineEmits(["update:modelValue", "blur", "change"]);
48
50
  const slots = defineSlots();
49
51
  const modelValue = useVModel(props, "modelValue", emits, { defaultValue: props.defaultValue });
50
52
  const appConfig = useAppConfig();
53
+ const uiProp = useComponentUI("input", props);
51
54
  const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled, emitFormFocus, ariaAttrs } = useFormField(props, { deferInputValidation: true });
52
55
  const { orientation, size: fieldGroupSize } = useFieldGroup(props);
53
56
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
@@ -59,13 +62,14 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.input || {} }
59
62
  size: inputSize?.value,
60
63
  loading: props.loading,
61
64
  highlight: highlight.value,
65
+ fixed: props.fixed,
62
66
  leading: isLeading.value || !!props.avatar || !!slots.leading,
63
67
  trailing: isTrailing.value || !!slots.trailing,
64
68
  fieldGroup: orientation.value
65
69
  }));
66
70
  const inputRef = useTemplateRef("inputRef");
67
71
  function updateInput(value) {
68
- if (props.modelModifiers?.trim) {
72
+ if (props.modelModifiers?.trim && (typeof value === "string" || value === null || value === void 0)) {
69
73
  value = value?.trim() ?? null;
70
74
  }
71
75
  if (props.modelModifiers?.number || props.type === "number") {
@@ -74,7 +78,7 @@ function updateInput(value) {
74
78
  if (props.modelModifiers?.nullable) {
75
79
  value ||= null;
76
80
  }
77
- if (props.modelModifiers?.optional) {
81
+ if (props.modelModifiers?.optional && !props.modelModifiers?.nullable && value !== null) {
78
82
  value ||= void 0;
79
83
  }
80
84
  modelValue.value = value;
@@ -116,7 +120,7 @@ defineExpose({
116
120
  </script>
117
121
 
118
122
  <template>
119
- <Primitive :as="as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
123
+ <Primitive :as="as" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
120
124
  <input
121
125
  :id="id"
122
126
  ref="inputRef"
@@ -125,7 +129,7 @@ defineExpose({
125
129
  :name="name"
126
130
  :placeholder="placeholder"
127
131
  data-slot="base"
128
- :class="ui.base({ class: props.ui?.base })"
132
+ :class="ui.base({ class: uiProp?.base })"
129
133
  :disabled="disabled"
130
134
  :required="required"
131
135
  :autocomplete="autocomplete"
@@ -138,16 +142,16 @@ defineExpose({
138
142
 
139
143
  <slot :ui="ui" />
140
144
 
141
- <span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
145
+ <span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: uiProp?.leading })">
142
146
  <slot name="leading" :ui="ui">
143
- <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
144
- <UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
147
+ <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: uiProp?.leadingIcon })" />
148
+ <UAvatar v-else-if="!!avatar" :size="uiProp?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: uiProp?.leadingAvatar })" />
145
149
  </slot>
146
150
  </span>
147
151
 
148
- <span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
152
+ <span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: uiProp?.trailing })">
149
153
  <slot name="trailing" :ui="ui">
150
- <UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
154
+ <UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: uiProp?.trailingIcon })" />
151
155
  </slot>
152
156
  </span>
153
157
  </Primitive>
@@ -2,12 +2,12 @@ import type { AppConfig } from '@nuxt/schema';
2
2
  import theme from '#build/ui/input';
3
3
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
4
4
  import type { InputHTMLAttributes } from '../types/html';
5
- import type { ModelModifiers } from '../types/input';
5
+ import type { ModelModifiers, ApplyModifiers } from '../types/input';
6
6
  import type { AcceptableValue } from '../types/utils';
7
7
  import type { ComponentConfig } from '../types/tv';
8
8
  type Input = ComponentConfig<typeof theme, AppConfig, 'input'>;
9
9
  export type InputValue = AcceptableValue;
10
- export interface InputProps<T extends InputValue = InputValue> extends UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'name' | 'type' | 'placeholder' | 'required' | 'autocomplete' | 'autofocus' | 'disabled'> {
10
+ export interface InputProps<T extends InputValue = InputValue, Mod extends ModelModifiers = ModelModifiers> extends UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'name' | 'type' | 'placeholder' | 'required' | 'autocomplete' | 'autofocus' | 'disabled'> {
11
11
  /**
12
12
  * The element or component this component should render as.
13
13
  * @defaultValue 'div'
@@ -37,14 +37,16 @@ export interface InputProps<T extends InputValue = InputValue> extends UseCompon
37
37
  disabled?: boolean;
38
38
  /** Highlight the ring color like a focus state. */
39
39
  highlight?: boolean;
40
- modelValue?: T;
41
- defaultValue?: T;
42
- modelModifiers?: ModelModifiers<T>;
40
+ /** Keep the mobile text size on all breakpoints. */
41
+ fixed?: boolean;
42
+ modelValue?: ApplyModifiers<T, Mod>;
43
+ defaultValue?: ApplyModifiers<T, Mod>;
44
+ modelModifiers?: Mod;
43
45
  class?: any;
44
46
  ui?: Input['slots'];
45
47
  }
46
- export interface InputEmits<T extends InputValue = InputValue> {
47
- 'update:modelValue': [value: T];
48
+ export interface InputEmits<T extends InputValue = InputValue, Mod extends ModelModifiers = ModelModifiers> {
49
+ 'update:modelValue': [value: ApplyModifiers<T, Mod>];
48
50
  'blur': [event: FocusEvent];
49
51
  'change': [event: Event];
50
52
  }
@@ -61,11 +63,31 @@ export interface InputSlots {
61
63
  }
62
64
  declare const _default: typeof __VLS_export;
63
65
  export default _default;
64
- declare const __VLS_export: <T extends InputValue>(__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<{
65
- props: import("vue").PublicProps & __VLS_PrettifyLocal<InputProps<T> & {
66
+ declare const __VLS_export: <T extends InputValue, Mod extends ModelModifiers>(__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<{
67
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<InputProps<T, Mod> & {
66
68
  onBlur?: ((event: FocusEvent) => any) | undefined;
67
69
  onChange?: ((event: Event) => any) | undefined;
68
- "onUpdate:modelValue"?: ((value: T) => any) | undefined;
70
+ "onUpdate:modelValue"?: ((value: Mod extends {
71
+ number: true;
72
+ } ? (Mod extends {
73
+ optional: true;
74
+ } ? (Mod extends {
75
+ nullable: true;
76
+ } ? T | null : T) | undefined : Mod extends {
77
+ nullable: true;
78
+ } ? T | null : T) extends infer T_1 ? T_1 extends (Mod extends {
79
+ optional: true;
80
+ } ? (Mod extends {
81
+ nullable: true;
82
+ } ? T | null : T) | undefined : Mod extends {
83
+ nullable: true;
84
+ } ? T | null : T) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
85
+ optional: true;
86
+ } ? (Mod extends {
87
+ nullable: true;
88
+ } ? T | null : T) | undefined : Mod extends {
89
+ nullable: true;
90
+ } ? T | null : T) => any) | undefined;
69
91
  }> & (typeof globalThis extends {
70
92
  __VLS_PROPS_FALLBACK: infer P;
71
93
  } ? P : {});
@@ -74,7 +96,27 @@ declare const __VLS_export: <T extends InputValue>(__VLS_props: NonNullable<Awai
74
96
  }>) => void;
75
97
  attrs: any;
76
98
  slots: InputSlots;
77
- emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void);
99
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: Mod extends {
100
+ number: true;
101
+ } ? (Mod extends {
102
+ optional: true;
103
+ } ? (Mod extends {
104
+ nullable: true;
105
+ } ? T | null : T) | undefined : Mod extends {
106
+ nullable: true;
107
+ } ? T | null : T) extends infer T_1 ? T_1 extends (Mod extends {
108
+ optional: true;
109
+ } ? (Mod extends {
110
+ nullable: true;
111
+ } ? T | null : T) | undefined : Mod extends {
112
+ nullable: true;
113
+ } ? T | null : T) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
114
+ optional: true;
115
+ } ? (Mod extends {
116
+ nullable: true;
117
+ } ? T | null : T) | undefined : Mod extends {
118
+ nullable: true;
119
+ } ? T | null : T) => void);
78
120
  }>) => import("vue").VNode & {
79
121
  __ctx?: Awaited<typeof __VLS_setup>;
80
122
  };
@@ -30,6 +30,8 @@ export interface InputDateProps<R extends boolean = false> extends UseComponentI
30
30
  size?: InputDate['variants']['size'];
31
31
  /** Highlight the ring color like a focus state. */
32
32
  highlight?: boolean;
33
+ /** Keep the mobile text size on all breakpoints. */
34
+ fixed?: boolean;
33
35
  autofocus?: boolean;
34
36
  autofocusDelay?: number;
35
37
  /**
@@ -8,6 +8,7 @@ import { useForwardPropsEmits } from "reka-ui";
8
8
  import { DateField as SingleDateField, DateRangeField as RangeDateField } from "reka-ui/namespaced";
9
9
  import { reactiveOmit, createReusableTemplate } 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";
@@ -21,6 +22,7 @@ const props = defineProps({
21
22
  variant: { type: null, required: false },
22
23
  size: { type: null, required: false },
23
24
  highlight: { type: Boolean, required: false },
25
+ fixed: { type: Boolean, required: false },
24
26
  autofocus: { type: Boolean, required: false },
25
27
  autofocusDelay: { type: Number, required: false, default: 0 },
26
28
  separatorIcon: { type: null, required: false },
@@ -28,7 +30,7 @@ const props = defineProps({
28
30
  defaultValue: { type: null, required: false },
29
31
  modelValue: { type: null, required: false },
30
32
  class: { type: null, required: false },
31
- ui: { type: null, required: false },
33
+ ui: { type: Object, required: false },
32
34
  icon: { type: null, required: false },
33
35
  avatar: { type: Object, required: false },
34
36
  leading: { type: Boolean, required: false },
@@ -55,7 +57,8 @@ const props = defineProps({
55
57
  const emits = defineEmits(["update:modelValue", "change", "blur", "focus", "update:placeholder"]);
56
58
  const slots = defineSlots();
57
59
  const appConfig = useAppConfig();
58
- const rootProps = useForwardPropsEmits(reactiveOmit(props, "id", "name", "range", "modelValue", "defaultValue", "color", "variant", "size", "highlight", "disabled", "autofocus", "autofocusDelay", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "separatorIcon", "class", "ui"), emits);
60
+ const uiProp = useComponentUI("inputDate", props);
61
+ const rootProps = useForwardPropsEmits(reactiveOmit(props, "id", "name", "range", "modelValue", "defaultValue", "color", "variant", "size", "highlight", "fixed", "disabled", "autofocus", "autofocusDelay", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "separatorIcon", "class", "ui"), emits);
59
62
  const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, size: formGroupSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
60
63
  const { orientation, size: fieldGroupSize } = useFieldGroup(props);
61
64
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
@@ -66,12 +69,16 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.inputDate ||
66
69
  variant: props.variant,
67
70
  size: inputSize.value,
68
71
  highlight: highlight.value,
72
+ fixed: props.fixed,
69
73
  loading: props.loading,
70
74
  leading: isLeading.value || !!props.avatar || !!slots.leading,
71
75
  trailing: isTrailing.value || !!slots.trailing,
72
76
  fieldGroup: orientation.value
73
77
  }));
74
78
  const inputsRef = ref([]);
79
+ function setInputRef(index, el) {
80
+ inputsRef.value[index] = el;
81
+ }
75
82
  function onUpdate(value) {
76
83
  const event = new Event("change", { target: { value } });
77
84
  emits("change", event);
@@ -107,11 +114,11 @@ defineExpose({
107
114
  <DateField.Input
108
115
  v-for="(segment, index) in segments"
109
116
  :key="`${segment.part}-${index}`"
110
- :ref="(el) => inputsRef[index] = el"
117
+ :ref="(el) => setInputRef(index, el)"
111
118
  :type="type"
112
119
  :part="segment.part"
113
120
  data-slot="segment"
114
- :class="ui.segment({ class: props.ui?.segment })"
121
+ :class="ui.segment({ class: uiProp?.segment })"
115
122
  :data-segment="segment.part"
116
123
  >
117
124
  {{ segment.value.trim() }}
@@ -127,7 +134,7 @@ defineExpose({
127
134
  :name="name"
128
135
  :disabled="disabled"
129
136
  data-slot="base"
130
- :class="ui.base({ class: [props.ui?.base, props.class] })"
137
+ :class="ui.base({ class: [uiProp?.base, props.class] })"
131
138
  @update:model-value="onUpdate"
132
139
  @blur="onBlur"
133
140
  @focus="onFocus"
@@ -138,23 +145,23 @@ defineExpose({
138
145
  <template v-else>
139
146
  <ReuseSegmentsTemplate :segments="segments.start" type="start" />
140
147
  <slot name="separator" :ui="ui">
141
- <UIcon :name="separatorIcon || appConfig.ui.icons.minus" data-slot="separatorIcon" :class="ui.separatorIcon({ class: props.ui?.separatorIcon })" />
148
+ <UIcon :name="separatorIcon || appConfig.ui.icons.minus" data-slot="separatorIcon" :class="ui.separatorIcon({ class: uiProp?.separatorIcon })" />
142
149
  </slot>
143
150
  <ReuseSegmentsTemplate :segments="segments.end" type="end" />
144
151
  </template>
145
152
 
146
153
  <slot :ui="ui" />
147
154
 
148
- <span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
155
+ <span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: uiProp?.leading })">
149
156
  <slot name="leading" :ui="ui">
150
- <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
151
- <UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
157
+ <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: uiProp?.leadingIcon })" />
158
+ <UAvatar v-else-if="!!avatar" :size="uiProp?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: uiProp?.leadingAvatar })" />
152
159
  </slot>
153
160
  </span>
154
161
 
155
- <span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
162
+ <span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: uiProp?.trailing })">
156
163
  <slot name="trailing" :ui="ui">
157
- <UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
164
+ <UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: uiProp?.trailingIcon })" />
158
165
  </slot>
159
166
  </span>
160
167
  </DateField.Root>
@@ -30,6 +30,8 @@ export interface InputDateProps<R extends boolean = false> extends UseComponentI
30
30
  size?: InputDate['variants']['size'];
31
31
  /** Highlight the ring color like a focus state. */
32
32
  highlight?: boolean;
33
+ /** Keep the mobile text size on all breakpoints. */
34
+ fixed?: boolean;
33
35
  autofocus?: boolean;
34
36
  autofocusDelay?: number;
35
37
  /**
@@ -3,9 +3,9 @@ import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/input-menu';
4
4
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
5
  import type { AvatarProps, ButtonProps, ChipProps, IconProps, LinkPropsKeys } from '../types';
6
- import type { ModelModifiers } from '../types/input';
6
+ import type { ModelModifiers, ApplyModifiers } from '../types/input';
7
7
  import type { InputHTMLAttributes } from '../types/html';
8
- import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, EmitsToProps } from '../types/utils';
8
+ import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, NestedItem, EmitsToProps } from '../types/utils';
9
9
  import type { ComponentConfig } from '../types/tv';
10
10
  type InputMenu = ComponentConfig<typeof theme, AppConfig, 'inputMenu'>;
11
11
  export type InputMenuValue = AcceptableValue;
@@ -29,7 +29,11 @@ export type InputMenuItem = InputMenuValue | {
29
29
  ui?: Pick<InputMenu['slots'], 'tagsItem' | 'tagsItemText' | 'tagsItemDelete' | 'tagsItemDeleteIcon' | 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChip' | 'itemLeadingChipSize' | 'itemWrapper' | 'itemLabel' | 'itemDescription' | 'itemTrailing' | 'itemTrailingIcon'>;
30
30
  [key: string]: any;
31
31
  };
32
- export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'resetModelValueOnClear' | 'highlightOnHover' | 'openOnClick' | 'openOnFocus' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'name' | 'type' | 'placeholder' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size' | 'min' | 'max' | 'step'> {
32
+ type ExcludeItem = {
33
+ type: 'label' | 'separator';
34
+ };
35
+ type IsClearUsed<M extends boolean, C extends boolean | object> = M extends false ? (C extends true ? null : C extends object ? null : never) : never;
36
+ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'resetModelValueOnClear' | 'highlightOnHover' | 'openOnClick' | 'openOnFocus' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'name' | 'type' | 'placeholder' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size' | 'min' | 'max' | 'step'> {
33
37
  /**
34
38
  * The element or component this component should render as.
35
39
  * @defaultValue 'div'
@@ -78,7 +82,7 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
78
82
  * Can be an object to pass additional props to the Button.
79
83
  * @defaultValue false
80
84
  */
81
- clear?: boolean | Partial<Omit<ButtonProps, LinkPropsKeys>>;
85
+ clear?: (C & boolean) | (C & Partial<Omit<ButtonProps, LinkPropsKeys>>);
82
86
  /**
83
87
  * The icon displayed in the clear button.
84
88
  * @defaultValue appConfig.ui.icons.close
@@ -134,14 +138,16 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
134
138
  descriptionKey?: GetItemKeys<T>;
135
139
  items?: T;
136
140
  /** The value of the InputMenu when initially rendered. Use when you do not need to control the state of the InputMenu. */
137
- defaultValue?: GetModelValue<T, VK, M>;
141
+ defaultValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
138
142
  /** The controlled value of the InputMenu. Can be binded-with with `v-model`. */
139
- modelValue?: GetModelValue<T, VK, M>;
140
- modelModifiers?: Omit<ModelModifiers<GetModelValue<T, VK, M>>, 'lazy'>;
143
+ modelValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
144
+ modelModifiers?: Mod;
141
145
  /** Whether multiple options can be selected or not. */
142
146
  multiple?: M & boolean;
143
147
  /** Highlight the ring color like a focus state. */
144
148
  highlight?: boolean;
149
+ /** Keep the mobile text size on all breakpoints. */
150
+ fixed?: boolean;
145
151
  /**
146
152
  * Determines if custom user input that does not exist in options can be added.
147
153
  * @defaultValue false
@@ -163,7 +169,7 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
163
169
  class?: any;
164
170
  ui?: InputMenu['slots'];
165
171
  }
166
- export type InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Pick<ComboboxRootEmits, 'update:open'> & {
172
+ export interface InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false> extends Pick<ComboboxRootEmits, 'update:open'> {
167
173
  'change': [event: Event];
168
174
  'blur': [event: FocusEvent];
169
175
  'focus': [event: FocusEvent];
@@ -173,24 +179,26 @@ export type InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends Ge
173
179
  'highlight': [
174
180
  payload: {
175
181
  ref: HTMLElement;
176
- value: GetModelValue<A, VK, M>;
182
+ value: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
177
183
  } | undefined
178
184
  ];
179
- 'remove-tag': [item: GetModelValue<A, VK, M>];
180
- } & GetModelValueEmits<A, VK, M>;
185
+ 'remove-tag': [item: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>];
186
+ /** Event handler called when the value changes. */
187
+ 'update:modelValue': [value: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>];
188
+ }
181
189
  type SlotProps<T extends InputMenuItem> = (props: {
182
190
  item: T;
183
191
  index: number;
184
192
  ui: InputMenu['ui'];
185
193
  }) => any;
186
- export interface InputMenuSlots<A extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
194
+ export interface InputMenuSlots<A extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false, T extends NestedItem<A> = NestedItem<A>> {
187
195
  'leading'(props: {
188
- modelValue?: GetModelValue<A, VK, M>;
196
+ modelValue?: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
189
197
  open: boolean;
190
198
  ui: InputMenu['ui'];
191
199
  }): any;
192
200
  'trailing'(props: {
193
- modelValue?: GetModelValue<A, VK, M>;
201
+ modelValue?: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
194
202
  open: boolean;
195
203
  ui: InputMenu['ui'];
196
204
  }): any;
@@ -221,23 +229,83 @@ export interface InputMenuSlots<A extends ArrayOrNested<InputMenuItem> = ArrayOr
221
229
  }
222
230
  declare const _default: typeof __VLS_export;
223
231
  export default _default;
224
- declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, 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<{
225
- props: import("vue").PublicProps & __VLS_PrettifyLocal<(InputMenuProps<T, VK, M> & {
232
+ declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, "lazy"> = Omit<ModelModifiers, "lazy">, C extends boolean | object = 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<{
233
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(InputMenuProps<T, VK, M, Mod, C> & {
226
234
  searchTerm?: string;
227
235
  }) & {
228
236
  onClear?: (() => any) | undefined;
229
237
  onBlur?: ((event: FocusEvent) => any) | undefined;
230
238
  onChange?: ((event: Event) => any) | undefined;
231
239
  onFocus?: ((event: FocusEvent) => any) | undefined;
232
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
233
- onCreate?: ((item: string) => any) | undefined;
234
- "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
235
240
  onHighlight?: ((payload: {
236
241
  ref: HTMLElement;
237
- value: GetModelValue<T, VK, M>;
242
+ value: (Mod extends {
243
+ number: true;
244
+ } ? (Mod extends {
245
+ optional: true;
246
+ } ? (Mod extends {
247
+ nullable: true;
248
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
249
+ nullable: true;
250
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
251
+ optional: true;
252
+ } ? (Mod extends {
253
+ nullable: true;
254
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
255
+ nullable: true;
256
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
257
+ optional: true;
258
+ } ? (Mod extends {
259
+ nullable: true;
260
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
261
+ nullable: true;
262
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>;
238
263
  } | undefined) => any) | undefined;
264
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
265
+ onCreate?: ((item: string) => any) | undefined;
266
+ "onUpdate:modelValue"?: ((value: (Mod extends {
267
+ number: true;
268
+ } ? (Mod extends {
269
+ optional: true;
270
+ } ? (Mod extends {
271
+ nullable: true;
272
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
273
+ nullable: true;
274
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
275
+ optional: true;
276
+ } ? (Mod extends {
277
+ nullable: true;
278
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
279
+ nullable: true;
280
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
281
+ optional: true;
282
+ } ? (Mod extends {
283
+ nullable: true;
284
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
285
+ nullable: true;
286
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => any) | undefined;
239
287
  "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
240
- "onRemove-tag"?: ((item: GetModelValue<T, VK, M>) => any) | undefined;
288
+ "onRemove-tag"?: ((item: (Mod extends {
289
+ number: true;
290
+ } ? (Mod extends {
291
+ optional: true;
292
+ } ? (Mod extends {
293
+ nullable: true;
294
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
295
+ nullable: true;
296
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
297
+ optional: true;
298
+ } ? (Mod extends {
299
+ nullable: true;
300
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
301
+ nullable: true;
302
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
303
+ optional: true;
304
+ } ? (Mod extends {
305
+ nullable: true;
306
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
307
+ nullable: true;
308
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => any) | undefined;
241
309
  }> & (typeof globalThis extends {
242
310
  __VLS_PROPS_FALLBACK: infer P;
243
311
  } ? P : {});
@@ -246,11 +314,71 @@ declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends
246
314
  viewportRef: Readonly<import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>>;
247
315
  }>) => void;
248
316
  attrs: any;
249
- slots: InputMenuSlots<T, VK, M, NestedItem<T>>;
250
- emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "create", item: string) => void) & ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void) & ((evt: "highlight", payload: {
317
+ slots: InputMenuSlots<T, VK, M, Mod, C, NestedItem<T>>;
318
+ emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "highlight", payload: {
251
319
  ref: HTMLElement;
252
- value: GetModelValue<T, VK, M>;
253
- } | undefined) => void) & ((evt: "remove-tag", item: GetModelValue<T, VK, M>) => void)) & ((evt: "update:searchTerm", value: string) => void);
320
+ value: (Mod extends {
321
+ number: true;
322
+ } ? (Mod extends {
323
+ optional: true;
324
+ } ? (Mod extends {
325
+ nullable: true;
326
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
327
+ nullable: true;
328
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
329
+ optional: true;
330
+ } ? (Mod extends {
331
+ nullable: true;
332
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
333
+ nullable: true;
334
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
335
+ optional: true;
336
+ } ? (Mod extends {
337
+ nullable: true;
338
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
339
+ nullable: true;
340
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>;
341
+ } | undefined) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "create", item: string) => void) & ((evt: "update:modelValue", value: (Mod extends {
342
+ number: true;
343
+ } ? (Mod extends {
344
+ optional: true;
345
+ } ? (Mod extends {
346
+ nullable: true;
347
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
348
+ nullable: true;
349
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
350
+ optional: true;
351
+ } ? (Mod extends {
352
+ nullable: true;
353
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
354
+ nullable: true;
355
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
356
+ optional: true;
357
+ } ? (Mod extends {
358
+ nullable: true;
359
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
360
+ nullable: true;
361
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => void) & ((evt: "remove-tag", item: (Mod extends {
362
+ number: true;
363
+ } ? (Mod extends {
364
+ optional: true;
365
+ } ? (Mod extends {
366
+ nullable: true;
367
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
368
+ nullable: true;
369
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
370
+ optional: true;
371
+ } ? (Mod extends {
372
+ nullable: true;
373
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
374
+ nullable: true;
375
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
376
+ optional: true;
377
+ } ? (Mod extends {
378
+ nullable: true;
379
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
380
+ nullable: true;
381
+ } ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => void)) & ((event: "update:searchTerm", value: string) => void);
254
382
  }>) => import("vue").VNode & {
255
383
  __ctx?: Awaited<typeof __VLS_setup>;
256
384
  };