@nuxt/ui 3.3.4 → 3.3.5

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 (78) hide show
  1. package/.nuxt/ui/progress.ts +3 -3
  2. package/README.md +10 -10
  3. package/dist/module.d.mts +6 -6
  4. package/dist/module.json +3 -3
  5. package/dist/module.mjs +3 -3
  6. package/dist/runtime/components/Accordion.d.vue.ts +77 -0
  7. package/dist/runtime/components/Alert.d.vue.ts +81 -0
  8. package/dist/runtime/components/App.d.vue.ts +24 -0
  9. package/dist/runtime/components/Avatar.d.vue.ts +41 -0
  10. package/dist/runtime/components/AvatarGroup.d.vue.ts +31 -0
  11. package/dist/runtime/components/Badge.d.vue.ts +43 -0
  12. package/dist/runtime/components/Breadcrumb.d.vue.ts +66 -0
  13. package/dist/runtime/components/Button.d.vue.ts +44 -0
  14. package/dist/runtime/components/ButtonGroup.d.vue.ts +34 -0
  15. package/dist/runtime/components/Calendar.d.vue.ts +112 -0
  16. package/dist/runtime/components/Card.d.vue.ts +29 -0
  17. package/dist/runtime/components/Carousel.d.vue.ts +127 -0
  18. package/dist/runtime/components/Checkbox.d.vue.ts +73 -0
  19. package/dist/runtime/components/CheckboxGroup.d.vue.ts +84 -0
  20. package/dist/runtime/components/Chip.d.vue.ts +57 -0
  21. package/dist/runtime/components/Collapsible.d.vue.ts +35 -0
  22. package/dist/runtime/components/ColorPicker.d.vue.ts +48 -0
  23. package/dist/runtime/components/CommandPalette.d.vue.ts +192 -0
  24. package/dist/runtime/components/Container.d.vue.ts +18 -0
  25. package/dist/runtime/components/ContextMenu.d.vue.ts +109 -0
  26. package/dist/runtime/components/ContextMenuContent.d.vue.ts +49 -0
  27. package/dist/runtime/components/Drawer.d.vue.ts +83 -0
  28. package/dist/runtime/components/DropdownMenu.d.vue.ts +119 -0
  29. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +55 -0
  30. package/dist/runtime/components/FileUpload.d.vue.ts +166 -0
  31. package/dist/runtime/components/Form.d.vue.ts +71 -0
  32. package/dist/runtime/components/FormField.d.vue.ts +61 -0
  33. package/dist/runtime/components/Icon.d.vue.ts +8 -0
  34. package/dist/runtime/components/Input.d.vue.ts +77 -0
  35. package/dist/runtime/components/InputMenu.d.vue.ts +329 -0
  36. package/dist/runtime/components/InputMenu.vue +1 -1
  37. package/dist/runtime/components/InputMenu.vue.d.ts +2 -8
  38. package/dist/runtime/components/InputNumber.d.vue.ts +186 -0
  39. package/dist/runtime/components/InputTags.d.vue.ts +185 -0
  40. package/dist/runtime/components/InputTags.vue +2 -2
  41. package/dist/runtime/components/Kbd.d.vue.ts +38 -0
  42. package/dist/runtime/components/Link.d.vue.ts +91 -0
  43. package/dist/runtime/components/LinkBase.d.vue.ts +25 -0
  44. package/dist/runtime/components/Modal.d.vue.ts +106 -0
  45. package/dist/runtime/components/NavigationMenu.d.vue.ts +170 -0
  46. package/dist/runtime/components/OverlayProvider.d.vue.ts +2 -0
  47. package/dist/runtime/components/Pagination.d.vue.ts +118 -0
  48. package/dist/runtime/components/PinInput.d.vue.ts +60 -0
  49. package/dist/runtime/components/Popover.d.vue.ts +70 -0
  50. package/dist/runtime/components/Progress.d.vue.ts +66 -0
  51. package/dist/runtime/components/Progress.vue +2 -3
  52. package/dist/runtime/components/RadioGroup.d.vue.ts +94 -0
  53. package/dist/runtime/components/Select.d.vue.ts +253 -0
  54. package/dist/runtime/components/SelectMenu.d.vue.ts +302 -0
  55. package/dist/runtime/components/Separator.d.vue.ts +54 -0
  56. package/dist/runtime/components/Skeleton.d.vue.ts +17 -0
  57. package/dist/runtime/components/Slideover.d.vue.ts +107 -0
  58. package/dist/runtime/components/Slider.d.vue.ts +57 -0
  59. package/dist/runtime/components/Stepper.d.vue.ts +85 -0
  60. package/dist/runtime/components/Switch.d.vue.ts +70 -0
  61. package/dist/runtime/components/Table.d.vue.ts +201 -0
  62. package/dist/runtime/components/Tabs.d.vue.ts +98 -0
  63. package/dist/runtime/components/Tabs.vue +2 -2
  64. package/dist/runtime/components/Textarea.d.vue.ts +79 -0
  65. package/dist/runtime/components/Timeline.d.vue.ts +70 -0
  66. package/dist/runtime/components/Toast.d.vue.ts +164 -0
  67. package/dist/runtime/components/Toaster.d.vue.ts +44 -0
  68. package/dist/runtime/components/Tooltip.d.vue.ts +56 -0
  69. package/dist/runtime/components/Tree.d.vue.ts +114 -0
  70. package/dist/runtime/inertia/components/Link.d.vue.ts +63 -0
  71. package/dist/runtime/inertia/components/LinkBase.d.vue.ts +25 -0
  72. package/dist/runtime/types/tv.d.ts +9 -2
  73. package/dist/runtime/vue/components/Icon.d.vue.ts +5 -0
  74. package/dist/runtime/vue/components/Link.d.vue.ts +93 -0
  75. package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DH9BUZkq.mjs} +12 -8
  76. package/dist/unplugin.mjs +1 -1
  77. package/dist/vite.mjs +1 -1
  78. package/package.json +8 -8
@@ -0,0 +1,166 @@
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 {
96
+ change: [event: Event];
97
+ }
98
+ type FileUploadFiles<M> = (M extends true ? File[] : File) | null;
99
+ export interface FileUploadSlots<M extends boolean = false> {
100
+ 'default'(props: {
101
+ open: UseFileDialogReturn['open'];
102
+ removeFile: (index?: number) => void;
103
+ }): any;
104
+ 'leading'(props?: {}): any;
105
+ 'label'(props?: {}): any;
106
+ 'description'(props?: {}): any;
107
+ 'actions'(props: {
108
+ files?: FileUploadFiles<M>;
109
+ open: UseFileDialogReturn['open'];
110
+ removeFile: (index?: number) => void;
111
+ }): any;
112
+ 'files'(props: {
113
+ files?: FileUploadFiles<M>;
114
+ }): any;
115
+ 'files-top'(props: {
116
+ files?: FileUploadFiles<M>;
117
+ open: UseFileDialogReturn['open'];
118
+ removeFile: (index?: number) => void;
119
+ }): any;
120
+ 'files-bottom'(props: {
121
+ files?: FileUploadFiles<M>;
122
+ open: UseFileDialogReturn['open'];
123
+ removeFile: (index?: number) => void;
124
+ }): any;
125
+ 'file'(props: {
126
+ file: File;
127
+ index: number;
128
+ }): any;
129
+ 'file-leading'(props: {
130
+ file: File;
131
+ index: number;
132
+ }): any;
133
+ 'file-name'(props: {
134
+ file: File;
135
+ index: number;
136
+ }): any;
137
+ 'file-size'(props: {
138
+ file: File;
139
+ index: number;
140
+ }): any;
141
+ 'file-trailing'(props: {
142
+ file: File;
143
+ index: number;
144
+ }): any;
145
+ }
146
+ 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<{
147
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
148
+ readonly onChange?: ((event: Event) => any) | undefined;
149
+ readonly "onUpdate:modelValue"?: ((value: (M extends true ? File[] : File) | null | undefined) => any) | undefined;
150
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & (FileUploadProps<M> & {
151
+ modelValue?: (M extends true ? File[] : File) | null;
152
+ }) & {}> & import("vue").PublicProps;
153
+ expose(exposed: import("vue").ShallowUnwrapRef<{
154
+ inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
155
+ dropzoneRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
156
+ }>): void;
157
+ attrs: any;
158
+ slots: FileUploadSlots<M>;
159
+ emit: ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: (M extends true ? File[] : File) | null | undefined) => void);
160
+ }>) => import("vue").VNode & {
161
+ __ctx?: Awaited<typeof __VLS_setup>;
162
+ };
163
+ export default _default;
164
+ type __VLS_PrettifyLocal<T> = {
165
+ [K in keyof T as K]: T[K];
166
+ } & {};
@@ -0,0 +1,71 @@
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
+ id?: string | number;
4
+ /** Schema to validate the form state. Supports Standard Schema objects, Yup, Joi, and Superstructs. */
5
+ schema?: S;
6
+ /** An object representing the current state of the form. */
7
+ state: Partial<InferInput<S>>;
8
+ /**
9
+ * Custom validation function to validate the form state.
10
+ * @param state - The current state of the form.
11
+ * @returns A promise that resolves to an array of FormError objects, or an array of FormError objects directly.
12
+ */
13
+ validate?: (state: Partial<InferInput<S>>) => Promise<FormError[]> | FormError[];
14
+ /**
15
+ * The list of input events that trigger the form validation.
16
+ * @remarks The form always validates on submit.
17
+ * @defaultValue `['blur', 'change', 'input']`
18
+ */
19
+ validateOn?: FormInputEvents[];
20
+ /** Disable all inputs inside the form. */
21
+ disabled?: boolean;
22
+ /**
23
+ * Delay in milliseconds before validating the form on input events.
24
+ * @defaultValue `300`
25
+ */
26
+ validateOnInputDelay?: number;
27
+ /**
28
+ * If true, schema transformations will be applied to the state on submit.
29
+ * @defaultValue `true`
30
+ */
31
+ transform?: T;
32
+ /**
33
+ * If true, this form will attach to its parent Form (if any) and validate at the same time.
34
+ * @defaultValue `true`
35
+ */
36
+ attach?: boolean;
37
+ /**
38
+ * When `true`, all form elements will be disabled on `@submit` event.
39
+ * This will cause any focused input elements to lose their focus state.
40
+ * @defaultValue `true`
41
+ */
42
+ loadingAuto?: boolean;
43
+ class?: any;
44
+ onSubmit?: ((event: FormSubmitEvent<FormData<S, T>>) => void | Promise<void>) | (() => void | Promise<void>);
45
+ }
46
+ export interface FormEmits<S extends FormSchema, T extends boolean = true> {
47
+ submit: [event: FormSubmitEvent<FormData<S, T>>];
48
+ error: [event: FormErrorEvent];
49
+ }
50
+ export interface FormSlots {
51
+ default(props: {
52
+ errors: FormError[];
53
+ loading: boolean;
54
+ }): any;
55
+ }
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<{
57
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
58
+ readonly onError?: ((event: FormErrorEvent) => any) | undefined;
59
+ readonly onSubmit?: ((event: FormSubmitEvent<FormData<S, T>>) => any) | undefined;
60
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onSubmit" | "onError"> & FormProps<S, T> & {}> & import("vue").PublicProps;
61
+ expose(exposed: import("vue").ShallowUnwrapRef<Form<S>>): void;
62
+ attrs: any;
63
+ slots: FormSlots;
64
+ emit: ((evt: "error", event: FormErrorEvent) => void) & ((evt: "submit", event: FormSubmitEvent<FormData<S, T>>) => void);
65
+ }>) => import("vue").VNode & {
66
+ __ctx?: Awaited<typeof __VLS_setup>;
67
+ };
68
+ export default _default;
69
+ type __VLS_PrettifyLocal<T> = {
70
+ [K in keyof T as K]: T[K];
71
+ } & {};
@@ -0,0 +1,61 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/form-field';
3
+ import type { ComponentConfig } from '../types/utils';
4
+ type FormField = ComponentConfig<typeof theme, AppConfig, 'formField'>;
5
+ export interface FormFieldProps {
6
+ /**
7
+ * The element or component this component should render as.
8
+ * @defaultValue 'div'
9
+ */
10
+ as?: any;
11
+ /** The name of the FormField. Also used to match form errors. */
12
+ name?: string;
13
+ /** A regular expression to match form error names. */
14
+ errorPattern?: RegExp;
15
+ label?: string;
16
+ description?: string;
17
+ help?: string;
18
+ error?: boolean | string;
19
+ hint?: string;
20
+ /**
21
+ * @defaultValue 'md'
22
+ */
23
+ size?: FormField['variants']['size'];
24
+ required?: boolean;
25
+ /** If true, validation on input will be active immediately instead of waiting for a blur event. */
26
+ eagerValidation?: boolean;
27
+ /**
28
+ * Delay in milliseconds before validating the form on input events.
29
+ * @defaultValue `300`
30
+ */
31
+ validateOnInputDelay?: number;
32
+ class?: any;
33
+ ui?: FormField['slots'];
34
+ }
35
+ export interface FormFieldSlots {
36
+ label(props: {
37
+ label?: string;
38
+ }): any;
39
+ hint(props: {
40
+ hint?: string;
41
+ }): any;
42
+ description(props: {
43
+ description?: string;
44
+ }): any;
45
+ help(props: {
46
+ help?: string;
47
+ }): any;
48
+ error(props: {
49
+ error?: boolean | string;
50
+ }): any;
51
+ default(props: {
52
+ error?: boolean | string;
53
+ }): any;
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>;
56
+ export default _default;
57
+ type __VLS_WithSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,8 @@
1
+ export interface IconProps {
2
+ name: string;
3
+ mode?: 'svg' | 'css';
4
+ size?: string | number;
5
+ customize?: (content: string, name?: string, prefix?: string, provider?: string) => string;
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>;
8
+ export default _default;
@@ -0,0 +1,77 @@
1
+ import type { InputHTMLAttributes } from 'vue';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/input';
4
+ import type { UseComponentIconsProps } from '../composables/useComponentIcons';
5
+ import type { AcceptableValue, ComponentConfig } from '../types/utils';
6
+ type Input = ComponentConfig<typeof theme, AppConfig, 'input'>;
7
+ export interface InputProps<T extends AcceptableValue = AcceptableValue> extends UseComponentIconsProps {
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
+ type?: InputHTMLAttributes['type'];
16
+ /** The placeholder text when the input is empty. */
17
+ placeholder?: string;
18
+ /**
19
+ * @defaultValue 'primary'
20
+ */
21
+ color?: Input['variants']['color'];
22
+ /**
23
+ * @defaultValue 'outline'
24
+ */
25
+ variant?: Input['variants']['variant'];
26
+ /**
27
+ * @defaultValue 'md'
28
+ */
29
+ size?: Input['variants']['size'];
30
+ required?: boolean;
31
+ autocomplete?: InputHTMLAttributes['autocomplete'];
32
+ autofocus?: boolean;
33
+ autofocusDelay?: number;
34
+ disabled?: boolean;
35
+ /** Highlight the ring color like a focus state. */
36
+ highlight?: boolean;
37
+ modelValue?: T;
38
+ defaultValue?: T;
39
+ modelModifiers?: {
40
+ string?: boolean;
41
+ number?: boolean;
42
+ trim?: boolean;
43
+ lazy?: boolean;
44
+ nullify?: boolean;
45
+ };
46
+ class?: any;
47
+ ui?: Input['slots'];
48
+ }
49
+ export interface InputEmits<T extends AcceptableValue = AcceptableValue> {
50
+ 'update:modelValue': [value: T];
51
+ 'blur': [event: FocusEvent];
52
+ 'change': [event: Event];
53
+ }
54
+ export interface InputSlots {
55
+ leading(props?: {}): any;
56
+ default(props?: {}): any;
57
+ trailing(props?: {}): any;
58
+ }
59
+ declare const _default: <T extends AcceptableValue>(__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<{
60
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
61
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
62
+ readonly onChange?: ((event: Event) => any) | undefined;
63
+ readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
64
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & InputProps<T> & {}> & import("vue").PublicProps;
65
+ expose(exposed: import("vue").ShallowUnwrapRef<{
66
+ inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
67
+ }>): void;
68
+ attrs: any;
69
+ slots: InputSlots;
70
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void);
71
+ }>) => import("vue").VNode & {
72
+ __ctx?: Awaited<typeof __VLS_setup>;
73
+ };
74
+ export default _default;
75
+ type __VLS_PrettifyLocal<T> = {
76
+ [K in keyof T as K]: T[K];
77
+ } & {};