@nuxt/ui 3.1.3 → 3.3.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 (208) hide show
  1. package/.nuxt/ui/avatar.ts +1 -1
  2. package/.nuxt/ui/button.ts +42 -42
  3. package/.nuxt/ui/card.ts +1 -1
  4. package/.nuxt/ui/carousel.ts +1 -1
  5. package/.nuxt/ui/command-palette.ts +3 -1
  6. package/.nuxt/ui/drawer.ts +1 -1
  7. package/.nuxt/ui/file-upload.ts +290 -0
  8. package/.nuxt/ui/index.ts +3 -0
  9. package/.nuxt/ui/input-menu.ts +24 -10
  10. package/.nuxt/ui/input-tags.ts +310 -0
  11. package/.nuxt/ui/kbd.ts +167 -3
  12. package/.nuxt/ui/modal.ts +1 -1
  13. package/.nuxt/ui/navigation-menu.ts +1 -1
  14. package/.nuxt/ui/select-menu.ts +11 -6
  15. package/.nuxt/ui/select.ts +11 -6
  16. package/.nuxt/ui/table.ts +11 -2
  17. package/.nuxt/ui/tabs.ts +4 -2
  18. package/.nuxt/ui/timeline.ts +321 -0
  19. package/.nuxt/ui/toast.ts +8 -15
  20. package/.nuxt/ui/toaster.ts +1 -1
  21. package/.nuxt/ui/tooltip.ts +1 -1
  22. package/cli/templates.mjs +11 -7
  23. package/dist/module.d.mts +15 -1
  24. package/dist/module.json +1 -1
  25. package/dist/module.mjs +3 -3
  26. package/dist/runtime/components/Accordion.vue.d.ts +1 -1
  27. package/dist/runtime/components/Alert.vue +0 -1
  28. package/dist/runtime/components/Alert.vue.d.ts +2 -2
  29. package/dist/runtime/components/App.vue.d.ts +1 -1
  30. package/dist/runtime/components/Avatar.vue +10 -2
  31. package/dist/runtime/components/Avatar.vue.d.ts +3 -1
  32. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  33. package/dist/runtime/components/Badge.vue.d.ts +1 -1
  34. package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
  35. package/dist/runtime/components/Button.vue +6 -6
  36. package/dist/runtime/components/Button.vue.d.ts +1 -5
  37. package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
  38. package/dist/runtime/components/Calendar.vue +4 -1
  39. package/dist/runtime/components/Calendar.vue.d.ts +1 -1
  40. package/dist/runtime/components/Card.vue.d.ts +1 -1
  41. package/dist/runtime/components/Carousel.vue +19 -16
  42. package/dist/runtime/components/Carousel.vue.d.ts +1 -1
  43. package/dist/runtime/components/Checkbox.vue +1 -1
  44. package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
  45. package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
  46. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  47. package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
  48. package/dist/runtime/components/ColorPicker.vue +1 -2
  49. package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
  50. package/dist/runtime/components/CommandPalette.vue +84 -16
  51. package/dist/runtime/components/CommandPalette.vue.d.ts +38 -9
  52. package/dist/runtime/components/Container.vue.d.ts +1 -1
  53. package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
  54. package/dist/runtime/components/ContextMenuContent.vue.d.ts +5 -21
  55. package/dist/runtime/components/Drawer.vue +4 -4
  56. package/dist/runtime/components/Drawer.vue.d.ts +6 -1
  57. package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
  58. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +12 -25
  59. package/dist/runtime/components/FileUpload.vue +242 -0
  60. package/dist/runtime/components/FileUpload.vue.d.ts +167 -0
  61. package/dist/runtime/components/Form.vue +6 -6
  62. package/dist/runtime/components/Form.vue.d.ts +15 -13
  63. package/dist/runtime/components/FormField.vue +2 -2
  64. package/dist/runtime/components/FormField.vue.d.ts +4 -4
  65. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  66. package/dist/runtime/components/Input.vue +10 -7
  67. package/dist/runtime/components/Input.vue.d.ts +9 -9
  68. package/dist/runtime/components/InputMenu.vue +17 -10
  69. package/dist/runtime/components/InputMenu.vue.d.ts +19 -16
  70. package/dist/runtime/components/InputNumber.vue +3 -2
  71. package/dist/runtime/components/InputNumber.vue.d.ts +5 -5
  72. package/dist/runtime/components/InputTags.vue +161 -0
  73. package/dist/runtime/components/InputTags.vue.d.ts +185 -0
  74. package/dist/runtime/components/Kbd.vue +2 -1
  75. package/dist/runtime/components/Kbd.vue.d.ts +5 -1
  76. package/dist/runtime/components/Link.vue +6 -5
  77. package/dist/runtime/components/Link.vue.d.ts +1 -3
  78. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  79. package/dist/runtime/components/Modal.vue +14 -13
  80. package/dist/runtime/components/Modal.vue.d.ts +16 -6
  81. package/dist/runtime/components/NavigationMenu.vue +19 -17
  82. package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
  83. package/dist/runtime/components/OverlayProvider.vue +2 -2
  84. package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
  85. package/dist/runtime/components/Pagination.vue +1 -1
  86. package/dist/runtime/components/Pagination.vue.d.ts +1 -2
  87. package/dist/runtime/components/PinInput.vue +4 -3
  88. package/dist/runtime/components/PinInput.vue.d.ts +22 -19
  89. package/dist/runtime/components/Popover.vue +2 -1
  90. package/dist/runtime/components/Popover.vue.d.ts +8 -2
  91. package/dist/runtime/components/Progress.vue +2 -1
  92. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  93. package/dist/runtime/components/RadioGroup.vue +3 -3
  94. package/dist/runtime/components/RadioGroup.vue.d.ts +5 -4
  95. package/dist/runtime/components/Select.vue +23 -4
  96. package/dist/runtime/components/Select.vue.d.ts +108 -2
  97. package/dist/runtime/components/SelectMenu.vue +33 -11
  98. package/dist/runtime/components/SelectMenu.vue.d.ts +106 -2
  99. package/dist/runtime/components/Separator.vue.d.ts +1 -1
  100. package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
  101. package/dist/runtime/components/Slideover.vue +14 -13
  102. package/dist/runtime/components/Slideover.vue.d.ts +16 -6
  103. package/dist/runtime/components/Slider.vue.d.ts +5 -5
  104. package/dist/runtime/components/Stepper.vue.d.ts +1 -1
  105. package/dist/runtime/components/Switch.vue.d.ts +1 -1
  106. package/dist/runtime/components/Table.vue +90 -9
  107. package/dist/runtime/components/Table.vue.d.ts +30 -12
  108. package/dist/runtime/components/Tabs.vue +24 -4
  109. package/dist/runtime/components/Tabs.vue.d.ts +12 -4
  110. package/dist/runtime/components/Textarea.vue +10 -7
  111. package/dist/runtime/components/Textarea.vue.d.ts +14 -12
  112. package/dist/runtime/components/Timeline.vue +92 -0
  113. package/dist/runtime/components/Timeline.vue.d.ts +70 -0
  114. package/dist/runtime/components/Toast.vue +16 -9
  115. package/dist/runtime/components/Toast.vue.d.ts +14 -13
  116. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  117. package/dist/runtime/components/Tooltip.vue +2 -1
  118. package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
  119. package/dist/runtime/components/Tree.vue +6 -4
  120. package/dist/runtime/components/Tree.vue.d.ts +2 -2
  121. package/dist/runtime/composables/defineLocale.d.ts +2 -0
  122. package/dist/runtime/composables/defineLocale.js +4 -0
  123. package/dist/runtime/composables/defineShortcuts.js +7 -5
  124. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  125. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  126. package/dist/runtime/composables/useFileUpload.d.ts +19 -0
  127. package/dist/runtime/composables/useFileUpload.js +63 -0
  128. package/dist/runtime/composables/useFormField.d.ts +3 -6
  129. package/dist/runtime/composables/useFormField.js +5 -2
  130. package/dist/runtime/composables/useKbd.d.ts +1 -1
  131. package/dist/runtime/composables/useLocale.js +2 -2
  132. package/dist/runtime/composables/useOverlay.d.ts +30 -2
  133. package/dist/runtime/composables/useOverlay.js +8 -7
  134. package/dist/runtime/composables/usePortal.d.ts +1 -1
  135. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  136. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
  137. package/dist/runtime/inertia/stubs.d.ts +1 -0
  138. package/dist/runtime/inertia/stubs.js +4 -2
  139. package/dist/runtime/locale/ar.js +4 -2
  140. package/dist/runtime/locale/az.js +3 -1
  141. package/dist/runtime/locale/bg.js +3 -1
  142. package/dist/runtime/locale/bn.js +3 -1
  143. package/dist/runtime/locale/ca.js +3 -1
  144. package/dist/runtime/locale/ckb.js +4 -2
  145. package/dist/runtime/locale/cs.js +3 -1
  146. package/dist/runtime/locale/da.js +3 -1
  147. package/dist/runtime/locale/de.js +3 -1
  148. package/dist/runtime/locale/el.js +3 -1
  149. package/dist/runtime/locale/en.js +3 -1
  150. package/dist/runtime/locale/es.js +3 -1
  151. package/dist/runtime/locale/et.js +3 -1
  152. package/dist/runtime/locale/fa_ir.js +3 -1
  153. package/dist/runtime/locale/fi.js +3 -1
  154. package/dist/runtime/locale/fr.js +3 -1
  155. package/dist/runtime/locale/he.js +3 -1
  156. package/dist/runtime/locale/hi.js +4 -2
  157. package/dist/runtime/locale/hu.js +3 -1
  158. package/dist/runtime/locale/hy.js +3 -1
  159. package/dist/runtime/locale/id.js +3 -1
  160. package/dist/runtime/locale/index.d.ts +1 -0
  161. package/dist/runtime/locale/index.js +1 -0
  162. package/dist/runtime/locale/it.js +3 -1
  163. package/dist/runtime/locale/ja.js +3 -1
  164. package/dist/runtime/locale/kk.js +3 -1
  165. package/dist/runtime/locale/km.js +4 -2
  166. package/dist/runtime/locale/ko.js +3 -1
  167. package/dist/runtime/locale/ky.js +3 -1
  168. package/dist/runtime/locale/lb.d.ts +3 -0
  169. package/dist/runtime/locale/lb.js +56 -0
  170. package/dist/runtime/locale/lt.js +3 -1
  171. package/dist/runtime/locale/mn.js +3 -1
  172. package/dist/runtime/locale/ms.js +3 -1
  173. package/dist/runtime/locale/nb_no.js +3 -1
  174. package/dist/runtime/locale/nl.js +3 -1
  175. package/dist/runtime/locale/pl.js +3 -1
  176. package/dist/runtime/locale/pt.js +3 -1
  177. package/dist/runtime/locale/pt_br.js +3 -1
  178. package/dist/runtime/locale/ro.js +3 -1
  179. package/dist/runtime/locale/ru.js +3 -1
  180. package/dist/runtime/locale/sk.js +3 -1
  181. package/dist/runtime/locale/sl.js +3 -1
  182. package/dist/runtime/locale/sv.js +3 -1
  183. package/dist/runtime/locale/th.js +3 -1
  184. package/dist/runtime/locale/tj.js +3 -1
  185. package/dist/runtime/locale/tr.js +3 -1
  186. package/dist/runtime/locale/ug_cn.js +3 -1
  187. package/dist/runtime/locale/uk.js +3 -1
  188. package/dist/runtime/locale/ur.js +3 -1
  189. package/dist/runtime/locale/uz.js +3 -1
  190. package/dist/runtime/locale/vi.js +3 -1
  191. package/dist/runtime/locale/zh_cn.js +3 -1
  192. package/dist/runtime/locale/zh_tw.js +3 -1
  193. package/dist/runtime/types/form.d.ts +11 -10
  194. package/dist/runtime/types/index.d.ts +3 -0
  195. package/dist/runtime/types/index.js +3 -0
  196. package/dist/runtime/types/locale.d.ts +2 -0
  197. package/dist/runtime/types/utils.d.ts +3 -0
  198. package/dist/runtime/utils/index.d.ts +1 -0
  199. package/dist/runtime/utils/index.js +9 -0
  200. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  201. package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
  202. package/dist/runtime/vue/stubs.d.ts +1 -0
  203. package/dist/runtime/vue/stubs.js +3 -1
  204. package/dist/shared/{ui.Bix4DSU4.mjs → ui.BkSj2DmF.mjs} +560 -55
  205. package/dist/unplugin.d.mts +2 -0
  206. package/dist/unplugin.mjs +6 -3
  207. package/dist/vite.mjs +1 -1
  208. package/package.json +37 -38
@@ -0,0 +1,167 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import type { UseFileDialogReturn } from '@vueuse/core';
3
+ import theme from '#build/ui/file-upload';
4
+ import type { ButtonProps } from '../types';
5
+ import type { ComponentConfig } from '../types/utils';
6
+ type FileUpload = ComponentConfig<typeof theme, AppConfig, 'fileUpload'>;
7
+ export interface FileUploadProps<M extends boolean = false> {
8
+ /**
9
+ * The element or component this component should render as.
10
+ * @defaultValue 'div'
11
+ */
12
+ as?: any;
13
+ id?: string;
14
+ name?: string;
15
+ /**
16
+ * The icon to display.
17
+ * @defaultValue appConfig.ui.icons.upload
18
+ * @IconifyIcon
19
+ */
20
+ icon?: string;
21
+ label?: string;
22
+ description?: string;
23
+ /**
24
+ * @defaultValue 'primary'
25
+ */
26
+ color?: FileUpload['variants']['color'];
27
+ /**
28
+ * The `button` variant is only available when `multiple` is `false`.
29
+ * @defaultValue 'area'
30
+ */
31
+ variant?: FileUpload['variants']['variant'];
32
+ /**
33
+ * @defaultValue 'md'
34
+ */
35
+ size?: FileUpload['variants']['size'];
36
+ /**
37
+ * The layout of how files are displayed.
38
+ * Only works when `variant` is `area`.
39
+ * @defaultValue 'list'
40
+ */
41
+ layout?: FileUpload['variants']['layout'];
42
+ /**
43
+ * The position of the files.
44
+ * Only works when `variant` is `area` and when `layout` is `list`.
45
+ * @defaultValue 'outside'
46
+ */
47
+ position?: FileUpload['variants']['position'];
48
+ /** Highlight the ring color like a focus state. */
49
+ highlight?: boolean;
50
+ /**
51
+ * Specifies the allowed file types for the input. Provide a comma-separated list of MIME types or file extensions (e.g., "image/png,application/pdf,.jpg").
52
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept
53
+ * @defaultValue '*'
54
+ */
55
+ accept?: string;
56
+ multiple?: M & boolean;
57
+ /**
58
+ * Reset the file input when the dialog is opened.
59
+ * @defaultValue false
60
+ */
61
+ reset?: boolean;
62
+ /**
63
+ * Create a zone that allows the user to drop files onto it.
64
+ * @defaultValue true
65
+ */
66
+ dropzone?: boolean;
67
+ /**
68
+ * Make the dropzone interactive when the user is clicking on it.
69
+ * @defaultValue true
70
+ */
71
+ interactive?: boolean;
72
+ required?: boolean;
73
+ disabled?: boolean;
74
+ /**
75
+ * The icon to display for the file.
76
+ * @defaultValue appConfig.ui.icons.file
77
+ * @IconifyIcon
78
+ */
79
+ fileIcon?: string;
80
+ /**
81
+ * Configure the delete button for the file.
82
+ * When `layout` is `grid`, the default is `{ color: 'neutral', variant: 'solid', size: 'xs' }`{lang="ts-type"}
83
+ * When `layout` is `list`, the default is `{ color: 'neutral', variant: 'link' }`{lang="ts-type"}
84
+ */
85
+ fileDelete?: boolean | Partial<ButtonProps>;
86
+ /**
87
+ * The icon displayed to delete a file.
88
+ * @defaultValue appConfig.ui.icons.close
89
+ * @IconifyIcon
90
+ */
91
+ fileDeleteIcon?: string;
92
+ class?: any;
93
+ ui?: FileUpload['slots'];
94
+ }
95
+ export interface FileUploadEmits<M extends boolean = false> {
96
+ 'update:modelValue': [payload: M extends true ? File[] : File | null];
97
+ 'change': [event: Event];
98
+ }
99
+ type FileUploadFiles<M> = (M extends true ? File[] : File) | null;
100
+ export interface FileUploadSlots<M extends boolean = false> {
101
+ 'default'(props: {
102
+ open: UseFileDialogReturn['open'];
103
+ removeFile: (index?: number) => void;
104
+ }): any;
105
+ 'leading'(props?: {}): any;
106
+ 'label'(props?: {}): any;
107
+ 'description'(props?: {}): any;
108
+ 'actions'(props: {
109
+ files?: FileUploadFiles<M>;
110
+ open: UseFileDialogReturn['open'];
111
+ removeFile: (index?: number) => void;
112
+ }): any;
113
+ 'files'(props: {
114
+ files?: FileUploadFiles<M>;
115
+ }): any;
116
+ 'files-top'(props: {
117
+ files?: FileUploadFiles<M>;
118
+ open: UseFileDialogReturn['open'];
119
+ removeFile: (index?: number) => void;
120
+ }): any;
121
+ 'files-bottom'(props: {
122
+ files?: FileUploadFiles<M>;
123
+ open: UseFileDialogReturn['open'];
124
+ removeFile: (index?: number) => void;
125
+ }): any;
126
+ 'file'(props: {
127
+ file: File;
128
+ index: number;
129
+ }): any;
130
+ 'file-leading'(props: {
131
+ file: File;
132
+ index: number;
133
+ }): any;
134
+ 'file-name'(props: {
135
+ file: File;
136
+ index: number;
137
+ }): any;
138
+ 'file-size'(props: {
139
+ file: File;
140
+ index: number;
141
+ }): any;
142
+ 'file-trailing'(props: {
143
+ file: File;
144
+ index: number;
145
+ }): any;
146
+ }
147
+ declare const _default: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
148
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
149
+ readonly onChange?: ((event: Event) => any) | undefined;
150
+ readonly "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
151
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & (FileUploadProps<M> & {
152
+ modelValue?: (M extends true ? File[] : File) | null;
153
+ }) & Partial<{}>> & import("vue").PublicProps;
154
+ expose(exposed: import("vue").ShallowUnwrapRef<{
155
+ inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
156
+ dropzoneRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
157
+ }>): void;
158
+ attrs: any;
159
+ slots: FileUploadSlots<M>;
160
+ emit: (((evt: "change", event: Event) => void) & ((evt: "update:modelValue", payload: M extends true ? File[] : File | null) => void)) & ((evt: "update:modelValue", value: (M extends true ? File[] : File) | null | undefined) => void);
161
+ }>) => import("vue").VNode & {
162
+ __ctx?: Awaited<typeof __VLS_setup>;
163
+ };
164
+ export default _default;
165
+ type __VLS_PrettifyLocal<T> = {
166
+ [K in keyof T as K]: T[K];
167
+ } & {};
@@ -3,7 +3,7 @@ import theme from "#build/ui/form";
3
3
  </script>
4
4
 
5
5
  <script setup>
6
- import { provide, inject, nextTick, ref, onUnmounted, onMounted, computed, useId, readonly } from "vue";
6
+ import { provide, inject, nextTick, ref, onUnmounted, onMounted, computed, useId, readonly, reactive } from "vue";
7
7
  import { useEventBus } from "@vueuse/core";
8
8
  import { useAppConfig } from "#imports";
9
9
  import { formOptionsInjectionKey, formInputsInjectionKey, formBusInjectionKey, formLoadingInjectionKey } from "../composables/useFormField";
@@ -20,7 +20,7 @@ const props = defineProps({
20
20
  } },
21
21
  disabled: { type: Boolean, required: false },
22
22
  validateOnInputDelay: { type: Number, required: false, default: 300 },
23
- transform: { type: Boolean, required: false, default: true },
23
+ transform: { type: null, required: false, default: () => true },
24
24
  attach: { type: Boolean, required: false, default: true },
25
25
  loadingAuto: { type: Boolean, required: false, default: true },
26
26
  class: { type: null, required: false },
@@ -80,9 +80,9 @@ const errors = ref([]);
80
80
  provide("form-errors", errors);
81
81
  const inputs = ref({});
82
82
  provide(formInputsInjectionKey, inputs);
83
- const dirtyFields = /* @__PURE__ */ new Set();
84
- const touchedFields = /* @__PURE__ */ new Set();
85
- const blurredFields = /* @__PURE__ */ new Set();
83
+ const dirtyFields = reactive(/* @__PURE__ */ new Set());
84
+ const touchedFields = reactive(/* @__PURE__ */ new Set());
85
+ const blurredFields = reactive(/* @__PURE__ */ new Set());
86
86
  function resolveErrorIds(errs) {
87
87
  return errs.map((err) => ({
88
88
  ...err,
@@ -205,6 +205,6 @@ defineExpose({
205
205
  :class="ui({ class: props.class })"
206
206
  @submit.prevent="onSubmitWrapper"
207
207
  >
208
- <slot :errors="errors" />
208
+ <slot :errors="errors" :loading="loading" />
209
209
  </component>
210
210
  </template>
@@ -1,5 +1,5 @@
1
- import type { FormSchema, FormError, FormInputEvents, FormErrorEvent, FormSubmitEvent, Form, InferInput, InferOutput } from '../types/form';
2
- export interface FormProps<S extends FormSchema> {
1
+ import type { FormSchema, FormError, FormInputEvents, FormErrorEvent, FormSubmitEvent, Form, InferInput, FormData } from '../types/form';
2
+ export interface FormProps<S extends FormSchema, T extends boolean = true> {
3
3
  id?: string | number;
4
4
  /** Schema to validate the form state. Supports Standard Schema objects, Yup, Joi, and Superstructs. */
5
5
  schema?: S;
@@ -13,6 +13,7 @@ export interface FormProps<S extends FormSchema> {
13
13
  validate?: (state: Partial<InferInput<S>>) => Promise<FormError[]> | FormError[];
14
14
  /**
15
15
  * The list of input events that trigger the form validation.
16
+ * @remarks The form always validates on submit.
16
17
  * @defaultValue `['blur', 'change', 'input']`
17
18
  */
18
19
  validateOn?: FormInputEvents[];
@@ -27,7 +28,7 @@ export interface FormProps<S extends FormSchema> {
27
28
  * If true, schema transformations will be applied to the state on submit.
28
29
  * @defaultValue `true`
29
30
  */
30
- transform?: boolean;
31
+ transform?: T;
31
32
  /**
32
33
  * If true, this form will attach to its parent Form (if any) and validate at the same time.
33
34
  * @defaultValue `true`
@@ -40,30 +41,31 @@ export interface FormProps<S extends FormSchema> {
40
41
  */
41
42
  loadingAuto?: boolean;
42
43
  class?: any;
43
- onSubmit?: ((event: FormSubmitEvent<InferOutput<S>>) => void | Promise<void>) | (() => void | Promise<void>);
44
+ onSubmit?: ((event: FormSubmitEvent<FormData<S, T>>) => void | Promise<void>) | (() => void | Promise<void>);
44
45
  }
45
- export interface FormEmits<S extends FormSchema> {
46
- (e: 'submit', payload: FormSubmitEvent<InferOutput<S>>): void;
47
- (e: 'error', payload: FormErrorEvent): void;
46
+ export interface FormEmits<S extends FormSchema, T extends boolean = true> {
47
+ submit: [payload: FormSubmitEvent<FormData<S, T>>];
48
+ error: [payload: FormErrorEvent];
48
49
  }
49
50
  export interface FormSlots {
50
51
  default(props?: {
51
52
  errors: FormError[];
53
+ loading: boolean;
52
54
  }): any;
53
55
  }
54
- declare const _default: <S extends FormSchema>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
56
+ declare const _default: <S extends FormSchema, T extends boolean = true>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
55
57
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
56
58
  readonly onError?: ((payload: FormErrorEvent) => any) | undefined;
57
- readonly onSubmit?: ((payload: FormSubmitEvent<InferOutput<S>>) => any) | undefined;
58
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onError" | "onSubmit"> & FormProps<S> & Partial<{}>> & import("vue").PublicProps;
59
- expose(exposed: import("vue").ShallowUnwrapRef<Form<InferInput<S>>>): void;
59
+ readonly onSubmit?: ((payload: FormSubmitEvent<FormData<S, T>>) => any) | undefined;
60
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSubmit" | "onError"> & FormProps<S, T> & Partial<{}>> & import("vue").PublicProps;
61
+ expose(exposed: import("vue").ShallowUnwrapRef<Form<S>>): void;
60
62
  attrs: any;
61
63
  slots: FormSlots;
62
- emit: FormEmits<S>;
64
+ emit: ((evt: "error", payload: FormErrorEvent) => void) & ((evt: "submit", payload: FormSubmitEvent<FormData<S, T>>) => void);
63
65
  }>) => import("vue").VNode & {
64
66
  __ctx?: Awaited<typeof __VLS_setup>;
65
67
  };
66
68
  export default _default;
67
69
  type __VLS_PrettifyLocal<T> = {
68
- [K in keyof T]: T[K];
70
+ [K in keyof T as K]: T[K];
69
71
  } & {};
@@ -15,7 +15,7 @@ const props = defineProps({
15
15
  label: { type: String, required: false },
16
16
  description: { type: String, required: false },
17
17
  help: { type: String, required: false },
18
- error: { type: [String, Boolean], required: false },
18
+ error: { type: [Boolean, String], required: false },
19
19
  hint: { type: String, required: false },
20
20
  size: { type: null, required: false },
21
21
  required: { type: Boolean, required: false },
@@ -80,7 +80,7 @@ provide(formFieldInjectionKey, computed(() => ({
80
80
  {{ error }}
81
81
  </slot>
82
82
  </div>
83
- <div v-else-if="help || !!slots.help" :class="ui.help({ class: props.ui?.help })">
83
+ <div v-else-if="help || !!slots.help" :id="`${ariaId}-help`" :class="ui.help({ class: props.ui?.help })">
84
84
  <slot name="help" :help="help">
85
85
  {{ help }}
86
86
  </slot>
@@ -15,7 +15,7 @@ export interface FormFieldProps {
15
15
  label?: string;
16
16
  description?: string;
17
17
  help?: string;
18
- error?: string | boolean;
18
+ error?: boolean | string;
19
19
  hint?: string;
20
20
  /**
21
21
  * @defaultValue 'md'
@@ -46,13 +46,13 @@ export interface FormFieldSlots {
46
46
  help?: string;
47
47
  }): any;
48
48
  error(props: {
49
- error?: string | boolean;
49
+ error?: boolean | string;
50
50
  }): any;
51
51
  default(props: {
52
- error?: string | boolean;
52
+ error?: boolean | string;
53
53
  }): any;
54
54
  }
55
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<FormFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, FormFieldSlots>;
55
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<FormFieldProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, FormFieldSlots>;
56
56
  export default _default;
57
57
  type __VLS_WithSlots<T, S> = T & {
58
58
  new (): {
@@ -4,5 +4,5 @@ export interface IconProps {
4
4
  size?: string | number;
5
5
  customize?: (content: string, name?: string, prefix?: string, provider?: string) => string;
6
6
  }
7
- declare const _default: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: import("vue").DefineComponent<IconProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
8
  export default _default;
@@ -5,6 +5,7 @@ import theme from "#build/ui/input";
5
5
  <script setup>
6
6
  import { ref, computed, onMounted } from "vue";
7
7
  import { Primitive } from "reka-ui";
8
+ import { useVModel } from "@vueuse/core";
8
9
  import { useAppConfig } from "#imports";
9
10
  import { useButtonGroup } from "../composables/useButtonGroup";
10
11
  import { useComponentIcons } from "../composables/useComponentIcons";
@@ -29,6 +30,8 @@ const props = defineProps({
29
30
  autofocusDelay: { type: Number, required: false, default: 0 },
30
31
  disabled: { type: Boolean, required: false },
31
32
  highlight: { type: Boolean, required: false },
33
+ modelValue: { type: null, required: false },
34
+ defaultValue: { type: null, required: false },
32
35
  modelModifiers: { type: Object, required: false },
33
36
  class: { type: null, required: false },
34
37
  ui: { type: null, required: false },
@@ -43,7 +46,7 @@ const props = defineProps({
43
46
  });
44
47
  const emits = defineEmits(["update:modelValue", "blur", "change"]);
45
48
  const slots = defineSlots();
46
- const [modelValue, modelModifiers] = defineModel({ type: null });
49
+ const modelValue = useVModel(props, "modelValue", emits, { defaultValue: props.defaultValue });
47
50
  const appConfig = useAppConfig();
48
51
  const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled, emitFormFocus, ariaAttrs } = useFormField(props, { deferInputValidation: true });
49
52
  const { orientation, size: buttonGroupSize } = useButtonGroup(props);
@@ -62,29 +65,29 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.input || {} }
62
65
  }));
63
66
  const inputRef = ref(null);
64
67
  function updateInput(value) {
65
- if (modelModifiers.trim) {
68
+ if (props.modelModifiers?.trim) {
66
69
  value = value?.trim() ?? null;
67
70
  }
68
- if (modelModifiers.number || props.type === "number") {
71
+ if (props.modelModifiers?.number || props.type === "number") {
69
72
  value = looseToNumber(value);
70
73
  }
71
- if (modelModifiers.nullify) {
74
+ if (props.modelModifiers?.nullify) {
72
75
  value ||= null;
73
76
  }
74
77
  modelValue.value = value;
75
78
  emitFormInput();
76
79
  }
77
80
  function onInput(event) {
78
- if (!modelModifiers.lazy) {
81
+ if (!props.modelModifiers?.lazy) {
79
82
  updateInput(event.target.value);
80
83
  }
81
84
  }
82
85
  function onChange(event) {
83
86
  const value = event.target.value;
84
- if (modelModifiers.lazy) {
87
+ if (props.modelModifiers?.lazy) {
85
88
  updateInput(value);
86
89
  }
87
- if (modelModifiers.trim) {
90
+ if (props.modelModifiers?.trim) {
88
91
  event.target.value = value.trim();
89
92
  }
90
93
  emitFormChange();
@@ -4,7 +4,7 @@ import theme from '#build/ui/input';
4
4
  import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
5
  import type { AcceptableValue, ComponentConfig } from '../types/utils';
6
6
  type Input = ComponentConfig<typeof theme, AppConfig, 'input'>;
7
- export interface InputProps extends UseComponentIconsProps {
7
+ export interface InputProps<T extends AcceptableValue = AcceptableValue> extends UseComponentIconsProps {
8
8
  /**
9
9
  * The element or component this component should render as.
10
10
  * @defaultValue 'div'
@@ -34,6 +34,8 @@ export interface InputProps extends UseComponentIconsProps {
34
34
  disabled?: boolean;
35
35
  /** Highlight the ring color like a focus state. */
36
36
  highlight?: boolean;
37
+ modelValue?: T;
38
+ defaultValue?: T;
37
39
  modelModifiers?: {
38
40
  string?: boolean;
39
41
  number?: boolean;
@@ -45,9 +47,9 @@ export interface InputProps extends UseComponentIconsProps {
45
47
  ui?: Input['slots'];
46
48
  }
47
49
  export interface InputEmits<T extends AcceptableValue = AcceptableValue> {
48
- (e: 'update:modelValue', payload: T): void;
49
- (e: 'blur', event: FocusEvent): void;
50
- (e: 'change', event: Event): void;
50
+ 'update:modelValue': [payload: T];
51
+ 'blur': [event: FocusEvent];
52
+ 'change': [event: Event];
51
53
  }
52
54
  export interface InputSlots {
53
55
  leading(props?: {}): any;
@@ -59,19 +61,17 @@ declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awa
59
61
  readonly onBlur?: ((event: FocusEvent) => any) | undefined;
60
62
  readonly onChange?: ((event: Event) => any) | undefined;
61
63
  readonly "onUpdate:modelValue"?: ((payload: T) => any) | undefined;
62
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & (InputProps & {
63
- modelValue?: T;
64
- }) & Partial<{}>> & import("vue").PublicProps;
64
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & InputProps<T> & Partial<{}>> & import("vue").PublicProps;
65
65
  expose(exposed: import("vue").ShallowUnwrapRef<{
66
66
  inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
67
67
  }>): void;
68
68
  attrs: any;
69
69
  slots: InputSlots;
70
- emit: InputEmits<T> & ((evt: "update:modelValue", value: T | undefined) => void);
70
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", payload: T) => void);
71
71
  }>) => import("vue").VNode & {
72
72
  __ctx?: Awaited<typeof __VLS_setup>;
73
73
  };
74
74
  export default _default;
75
75
  type __VLS_PrettifyLocal<T> = {
76
- [K in keyof T]: T[K];
76
+ [K in keyof T as K]: T[K];
77
77
  } & {};
@@ -3,7 +3,7 @@ import theme from "#build/ui/input-menu";
3
3
  </script>
4
4
 
5
5
  <script setup>
6
- import { computed, ref, toRef, onMounted, toRaw } from "vue";
6
+ import { computed, ref, toRef, onMounted, toRaw, nextTick } from "vue";
7
7
  import { ComboboxRoot, ComboboxArrow, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxPortal, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput, useForwardPropsEmits, useFilter } from "reka-ui";
8
8
  import { defu } from "defu";
9
9
  import { isEqual } from "ohash/utils";
@@ -64,7 +64,7 @@ const props = defineProps({
64
64
  loading: { type: Boolean, required: false },
65
65
  loadingIcon: { type: String, required: false }
66
66
  });
67
- const emits = defineEmits(["update:open", "change", "blur", "focus", "create", "highlight", "update:modelValue"]);
67
+ const emits = defineEmits(["update:open", "change", "blur", "focus", "create", "highlight", "remove-tag", "update:modelValue"]);
68
68
  const slots = defineSlots();
69
69
  const searchTerm = defineModel("searchTerm", { type: String, ...{ default: "" } });
70
70
  const { t } = useLocale();
@@ -91,10 +91,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.inputMenu ||
91
91
  buttonGroup: orientation.value
92
92
  }));
93
93
  function displayValue(value) {
94
- if (!props.valueKey) {
95
- return value && (typeof value === "object" ? get(value, props.labelKey) : value);
96
- }
97
- const item = items.value.find((item2) => compare(typeof item2 === "object" ? get(item2, props.valueKey) : item2, value));
94
+ const item = items.value.find((item2) => compare(typeof item2 === "object" && props.valueKey ? get(item2, props.valueKey) : item2, value));
98
95
  return item && (typeof item === "object" ? get(item, props.labelKey) : item);
99
96
  }
100
97
  const groups = computed(
@@ -106,14 +103,20 @@ const filteredGroups = computed(() => {
106
103
  return groups.value;
107
104
  }
108
105
  const fields = Array.isArray(props.filterFields) ? props.filterFields : [props.labelKey];
109
- return groups.value.map((group) => group.filter((item) => {
110
- if (typeof item !== "object" || item === null) {
106
+ return groups.value.map((items2) => items2.filter((item) => {
107
+ if (item === void 0 || item === null) {
108
+ return false;
109
+ }
110
+ if (typeof item !== "object") {
111
111
  return contains(String(item), searchTerm.value);
112
112
  }
113
113
  if (item.type && ["label", "separator"].includes(item.type)) {
114
114
  return true;
115
115
  }
116
- return fields.some((field) => contains(get(item, field), searchTerm.value));
116
+ return fields.some((field) => {
117
+ const value = get(item, field);
118
+ return value !== void 0 && value !== null && contains(String(value), searchTerm.value);
119
+ });
117
120
  })).filter((group) => group.filter(
118
121
  (item) => !isInputItem(item) || (!item.type || !["label", "separator"].includes(item.type))
119
122
  ).length > 0);
@@ -137,6 +140,9 @@ function autoFocus() {
137
140
  }
138
141
  }
139
142
  onMounted(() => {
143
+ nextTick(() => {
144
+ searchTerm.value = "";
145
+ });
140
146
  setTimeout(() => {
141
147
  autoFocus();
142
148
  }, props.autofocusDelay);
@@ -185,6 +191,7 @@ function onRemoveTag(event) {
185
191
  const modelValue = props.modelValue;
186
192
  const filteredValue = modelValue.filter((value) => !isEqual(value, event));
187
193
  emits("update:modelValue", filteredValue);
194
+ emits("remove-tag", event);
188
195
  onUpdate(filteredValue);
189
196
  }
190
197
  }
@@ -252,7 +259,7 @@ defineExpose({
252
259
  <TagsInputItem v-for="(item, index) in tags" :key="index" :value="item" :class="ui.tagsItem({ class: [props.ui?.tagsItem, isInputItem(item) && item.ui?.tagsItem] })">
253
260
  <TagsInputItemText :class="ui.tagsItemText({ class: [props.ui?.tagsItemText, isInputItem(item) && item.ui?.tagsItemText] })">
254
261
  <slot name="tags-item-text" :item="item" :index="index">
255
- {{ displayValue(item) }}
262
+ {{ displayValue(item) ?? item }}
256
263
  </slot>
257
264
  </TagsInputItemText>
258
265
 
@@ -1,3 +1,4 @@
1
+ import { nextTick } from 'vue';
1
2
  import type { InputHTMLAttributes } from 'vue';
2
3
  import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, ComboboxContentEmits, ComboboxArrowProps } from 'reka-ui';
3
4
  import type { AppConfig } from '@nuxt/schema';
@@ -126,17 +127,18 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
126
127
  ui?: InputMenu['slots'];
127
128
  }
128
129
  export type InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Pick<ComboboxRootEmits, 'update:open'> & {
129
- change: [payload: Event];
130
- blur: [payload: FocusEvent];
131
- focus: [payload: FocusEvent];
132
- create: [item: string];
130
+ 'change': [payload: Event];
131
+ 'blur': [payload: FocusEvent];
132
+ 'focus': [payload: FocusEvent];
133
+ 'create': [item: string];
133
134
  /** Event handler when highlighted element changes. */
134
- highlight: [
135
+ 'highlight': [
135
136
  payload: {
136
137
  ref: HTMLElement;
137
138
  value: GetModelValue<A, VK, M>;
138
139
  } | undefined
139
140
  ];
141
+ 'remove-tag': [item: GetModelValue<A, VK, M>];
140
142
  } & GetModelValueEmits<A, VK, M>;
141
143
  type SlotProps<T extends InputMenuItem> = (props: {
142
144
  item: T;
@@ -185,7 +187,8 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
185
187
  value: GetModelValue<T, VK, M>;
186
188
  } | undefined) => any) | undefined;
187
189
  readonly "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
188
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onHighlight" | "onUpdate:searchTerm" | "onCreate"> & (InputMenuProps<T, VK, M> & {
190
+ readonly "onRemove-tag"?: ((item: GetModelValue<T, VK, M>) => any) | undefined;
191
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onHighlight" | "onUpdate:searchTerm" | "onCreate" | "onRemove-tag"> & (InputMenuProps<T, VK, M> & {
189
192
  searchTerm?: string;
190
193
  }) & Partial<{}>> & import("vue").PublicProps;
191
194
  expose(exposed: import("vue").ShallowUnwrapRef<{
@@ -293,7 +296,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
293
296
  errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
294
297
  };
295
298
  $forceUpdate: () => void;
296
- $nextTick: typeof import("vue").nextTick;
299
+ $nextTick: typeof nextTick;
297
300
  $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
298
301
  } & Readonly<{
299
302
  as: import("reka-ui").AsTag | import("vue").Component;
@@ -301,11 +304,11 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
301
304
  "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
302
305
  }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
303
306
  $slots: Readonly<{
304
- default: (props: {
307
+ default?: (props: {
305
308
  modelValue: string | undefined;
306
309
  }) => any;
307
310
  }> & {
308
- default: (props: {
311
+ default?: (props: {
309
312
  modelValue: string | undefined;
310
313
  }) => any;
311
314
  };
@@ -343,7 +346,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
343
346
  errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
344
347
  };
345
348
  $forceUpdate: () => void;
346
- $nextTick: typeof import("vue").nextTick;
349
+ $nextTick: typeof nextTick;
347
350
  $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
348
351
  } & Readonly<{
349
352
  as: import("reka-ui").AsTag | import("vue").Component;
@@ -457,7 +460,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
457
460
  errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
458
461
  };
459
462
  $forceUpdate: () => void;
460
- $nextTick: typeof import("vue").nextTick;
463
+ $nextTick: typeof nextTick;
461
464
  $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
462
465
  } & Readonly<{
463
466
  as: import("reka-ui").AsTag | import("vue").Component;
@@ -465,11 +468,11 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
465
468
  "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
466
469
  }>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
467
470
  $slots: Readonly<{
468
- default: (props: {
471
+ default?: (props: {
469
472
  modelValue: string | undefined;
470
473
  }) => any;
471
474
  }> & {
472
- default: (props: {
475
+ default?: (props: {
473
476
  modelValue: string | undefined;
474
477
  }) => any;
475
478
  };
@@ -507,7 +510,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
507
510
  errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
508
511
  };
509
512
  $forceUpdate: () => void;
510
- $nextTick: typeof import("vue").nextTick;
513
+ $nextTick: typeof nextTick;
511
514
  $watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
512
515
  } & Readonly<{
513
516
  as: import("reka-ui").AsTag | import("vue").Component;
@@ -524,11 +527,11 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
524
527
  emit: (((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void) & ((evt: "highlight", payload: {
525
528
  ref: HTMLElement;
526
529
  value: GetModelValue<T, VK, M>;
527
- } | undefined) => void)) & ((evt: "update:searchTerm", value: string) => void);
530
+ } | undefined) => void) & ((evt: "remove-tag", item: GetModelValue<T, VK, M>) => void)) & ((evt: "update:searchTerm", value: string) => void);
528
531
  }>) => import("vue").VNode & {
529
532
  __ctx?: Awaited<typeof __VLS_setup>;
530
533
  };
531
534
  export default _default;
532
535
  type __VLS_PrettifyLocal<T> = {
533
- [K in keyof T]: T[K];
536
+ [K in keyof T as K]: T[K];
534
537
  } & {};