@nuxt/ui 2.18.3 → 2.18.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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/module.d.mts +1 -6
  3. package/dist/module.d.ts +1 -6
  4. package/dist/module.json +2 -2
  5. package/dist/module.mjs +16 -8
  6. package/dist/runtime/components/data/Table.vue +5 -4
  7. package/dist/runtime/components/data/Table.vue.d.ts +1749 -9
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +1014 -9
  9. package/dist/runtime/components/elements/Alert.vue.d.ts +1257 -7
  10. package/dist/runtime/components/elements/Avatar.vue.d.ts +53 -7
  11. package/dist/runtime/components/elements/AvatarGroup.d.ts +6 -6
  12. package/dist/runtime/components/elements/Badge.vue.d.ts +6 -6
  13. package/dist/runtime/components/elements/Button.vue.d.ts +280 -10
  14. package/dist/runtime/components/elements/ButtonGroup.d.ts +7 -7
  15. package/dist/runtime/components/elements/Carousel.vue.d.ts +857 -7
  16. package/dist/runtime/components/elements/Chip.vue.d.ts +6 -6
  17. package/dist/runtime/components/elements/Dropdown.vue.d.ts +639 -10
  18. package/dist/runtime/components/elements/Icon.vue.d.ts +4 -4
  19. package/dist/runtime/components/elements/Kbd.vue.d.ts +6 -6
  20. package/dist/runtime/components/elements/Link.vue +1 -0
  21. package/dist/runtime/components/elements/Link.vue.d.ts +8 -8
  22. package/dist/runtime/components/elements/Meter.vue.d.ts +54 -8
  23. package/dist/runtime/components/elements/MeterGroup.d.ts +9 -7
  24. package/dist/runtime/components/elements/Progress.vue.d.ts +9 -9
  25. package/dist/runtime/components/forms/Checkbox.vue.d.ts +9 -9
  26. package/dist/runtime/components/forms/Form.vue +6 -8
  27. package/dist/runtime/components/forms/Form.vue.d.ts +13 -6
  28. package/dist/runtime/components/forms/FormGroup.vue.d.ts +8 -8
  29. package/dist/runtime/components/forms/Input.vue +1 -2
  30. package/dist/runtime/components/forms/Input.vue.d.ts +56 -10
  31. package/dist/runtime/components/forms/InputMenu.vue.d.ts +710 -13
  32. package/dist/runtime/components/forms/Radio.vue.d.ts +9 -9
  33. package/dist/runtime/components/forms/RadioGroup.vue +1 -1
  34. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +188 -8
  35. package/dist/runtime/components/forms/Range.vue.d.ts +10 -10
  36. package/dist/runtime/components/forms/Select.vue.d.ts +55 -9
  37. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +909 -12
  38. package/dist/runtime/components/forms/Textarea.vue +3 -0
  39. package/dist/runtime/components/forms/Textarea.vue.d.ts +10 -10
  40. package/dist/runtime/components/forms/Toggle.vue.d.ts +143 -9
  41. package/dist/runtime/components/layout/Card.vue.d.ts +6 -6
  42. package/dist/runtime/components/layout/Container.vue.d.ts +6 -6
  43. package/dist/runtime/components/layout/Divider.vue.d.ts +408 -7
  44. package/dist/runtime/components/layout/Skeleton.vue.d.ts +6 -6
  45. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +276 -6
  46. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +1729 -9
  47. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +545 -6
  48. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +768 -6
  49. package/dist/runtime/components/navigation/Pagination.vue +4 -0
  50. package/dist/runtime/components/navigation/Pagination.vue.d.ts +859 -9
  51. package/dist/runtime/components/navigation/Tabs.vue +9 -2
  52. package/dist/runtime/components/navigation/Tabs.vue.d.ts +234 -11
  53. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1413 -6
  54. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +9 -9
  55. package/dist/runtime/components/overlays/Modal.vue.d.ts +343 -9
  56. package/dist/runtime/components/overlays/Notification.vue.d.ts +1258 -8
  57. package/dist/runtime/components/overlays/Notifications.vue.d.ts +1541 -11
  58. package/dist/runtime/components/overlays/Popover.vue.d.ts +113 -11
  59. package/dist/runtime/components/overlays/Slideover.vue +2 -2
  60. package/dist/runtime/components/overlays/Slideover.vue.d.ts +343 -9
  61. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +107 -9
  62. package/dist/runtime/composables/useFormGroup.d.ts +2 -2
  63. package/dist/runtime/composables/useFormGroup.js +17 -19
  64. package/dist/runtime/composables/useModal.d.ts +1 -1
  65. package/dist/runtime/composables/usePopper.d.ts +262 -1
  66. package/dist/runtime/composables/useShortcuts.d.ts +4 -4
  67. package/dist/runtime/composables/useSlideover.d.ts +1 -1
  68. package/dist/runtime/composables/useUI.d.ts +1 -1
  69. package/dist/runtime/plugins/colors.js +5 -5
  70. package/dist/runtime/types/command-palette.d.ts +2 -2
  71. package/dist/runtime/ui.config/elements/button.js +9 -9
  72. package/dist/runtime/ui.config/elements/carousel.js +1 -1
  73. package/dist/runtime/utils/colors.js +75 -67
  74. package/dist/runtime/utils/index.d.ts +2 -1
  75. package/dist/runtime/utils/index.js +5 -1
  76. package/package.json +26 -28
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- declare const _default: import("vue").DefineComponent<{
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
3
  name: {
4
4
  type: StringConstructor;
5
5
  required: true;
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  required: false;
20
20
  default: any;
21
21
  };
22
- }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
23
  name: {
24
24
  type: StringConstructor;
25
25
  required: true;
@@ -39,9 +39,9 @@ declare const _default: import("vue").DefineComponent<{
39
39
  required: false;
40
40
  default: any;
41
41
  };
42
- }>>, {
42
+ }>> & Readonly<{}>, {
43
43
  mode: "svg" | "css";
44
44
  size: string | number;
45
45
  customize: Function;
46
- }, {}>;
46
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
47
47
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { KbdSize, Strategy } from '../../types.js';
2
+ import type { KbdSize, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  base: string;
5
5
  padding: string;
@@ -16,7 +16,7 @@ declare const config: {
16
16
  size: string;
17
17
  };
18
18
  };
19
- declare const _default: import("vue").DefineComponent<{
19
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
20
20
  value: {
21
21
  type: StringConstructor;
22
22
  default: any;
@@ -36,7 +36,7 @@ declare const _default: import("vue").DefineComponent<{
36
36
  }>;
37
37
  default: () => {};
38
38
  };
39
- }, {
39
+ }>, {
40
40
  ui: import("vue").ComputedRef<{
41
41
  base: string;
42
42
  padding: string;
@@ -57,7 +57,7 @@ declare const _default: import("vue").DefineComponent<{
57
57
  [x: string]: unknown;
58
58
  }, string>>;
59
59
  kbdClass: import("vue").ComputedRef<string>;
60
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
60
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
61
61
  value: {
62
62
  type: StringConstructor;
63
63
  default: any;
@@ -77,10 +77,10 @@ declare const _default: import("vue").DefineComponent<{
77
77
  }>;
78
78
  default: () => {};
79
79
  };
80
- }>>, {
80
+ }>> & Readonly<{}>, {
81
81
  size: KbdSize;
82
82
  class: any;
83
83
  ui: {};
84
84
  value: string;
85
- }, {}>;
85
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
86
86
  export default _default;
@@ -23,6 +23,7 @@
23
23
  :rel="rel"
24
24
  :target="target"
25
25
  :class="active !== undefined ? (active ? activeClass : inactiveClass) : resolveLinkClass(route, $route, { isActive, isExactActive })"
26
+ :tabindex="disabled ? -1 : undefined"
26
27
  @click="(e) => (!isExternal && !disabled) && navigate(e)"
27
28
  >
28
29
  <slot v-bind="{ isActive: active !== undefined ? active : (exact ? isExactActive : isActive) }" />
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  as: {
3
3
  type: StringConstructor;
4
4
  default: string;
@@ -96,12 +96,12 @@ declare const _default: import("vue").DefineComponent<{
96
96
  readonly default: any;
97
97
  readonly required: false;
98
98
  };
99
- }, {
99
+ }>, {
100
100
  resolveLinkClass: (route: any, $route: any, { isActive, isExactActive }: {
101
101
  isActive: boolean;
102
102
  isExactActive: boolean;
103
103
  }) => string;
104
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
104
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
105
105
  as: {
106
106
  type: StringConstructor;
107
107
  default: string;
@@ -199,21 +199,21 @@ declare const _default: import("vue").DefineComponent<{
199
199
  readonly default: any;
200
200
  readonly required: false;
201
201
  };
202
- }>>, {
202
+ }>> & Readonly<{}>, {
203
203
  type: string;
204
- replace: boolean;
205
- target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
206
204
  to: any;
205
+ disabled: boolean;
206
+ target: "_blank" | "_parent" | "_self" | "_top" | (string & {});
207
207
  activeClass: string;
208
208
  exactActiveClass: string;
209
209
  ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
210
+ replace: boolean;
210
211
  noRel: boolean;
211
212
  prefetch: boolean;
212
213
  noPrefetch: boolean;
213
214
  prefetchedClass: string;
214
215
  external: boolean;
215
216
  as: string;
216
- disabled: boolean;
217
217
  active: boolean;
218
218
  exact: boolean;
219
219
  exactQuery: boolean;
@@ -221,5 +221,5 @@ declare const _default: import("vue").DefineComponent<{
221
221
  inactiveClass: string;
222
222
  href: any;
223
223
  rel: any;
224
- }, {}>;
224
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
225
225
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { SlotsType, PropType } from 'vue';
2
- import type { Strategy, MeterColor, MeterSize } from '../../types.js';
2
+ import type { Strategy, MeterColor, MeterSize } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  indicator: {
@@ -76,7 +76,7 @@ declare const config: {
76
76
  color: string;
77
77
  };
78
78
  };
79
- declare const _default: import("vue").DefineComponent<{
79
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
80
80
  value: {
81
81
  type: NumberConstructor;
82
82
  default: number;
@@ -121,7 +121,7 @@ declare const _default: import("vue").DefineComponent<{
121
121
  }>;
122
122
  default: () => {};
123
123
  };
124
- }, {
124
+ }>, {
125
125
  ui: import("vue").ComputedRef<{
126
126
  wrapper: string;
127
127
  indicator: {
@@ -210,7 +210,7 @@ declare const _default: import("vue").DefineComponent<{
210
210
  normalizedMin: import("vue").ComputedRef<number>;
211
211
  normalizedMax: import("vue").ComputedRef<number>;
212
212
  percent: import("vue").ComputedRef<number>;
213
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
213
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
214
214
  value: {
215
215
  type: NumberConstructor;
216
216
  default: number;
@@ -255,16 +255,16 @@ declare const _default: import("vue").DefineComponent<{
255
255
  }>;
256
256
  default: () => {};
257
257
  };
258
- }>>, {
258
+ }>> & Readonly<{}>, {
259
259
  size: "xs" | "sm" | "2xs" | "md" | "lg" | "xl" | "2xl";
260
260
  class: any;
261
+ max: number;
261
262
  color: MeterColor;
262
263
  label: string;
263
264
  ui: {};
264
265
  icon: string;
265
- indicator: boolean;
266
266
  value: number;
267
- max: number;
267
+ indicator: boolean;
268
268
  min: number;
269
269
  }, SlotsType<{
270
270
  indicator?: {
@@ -275,5 +275,51 @@ declare const _default: import("vue").DefineComponent<{
275
275
  percent: number;
276
276
  value: number;
277
277
  };
278
- }>>;
278
+ }>, {
279
+ UIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
280
+ name: {
281
+ type: StringConstructor;
282
+ required: true;
283
+ };
284
+ mode: {
285
+ type: PropType<"svg" | "css">;
286
+ required: false;
287
+ default: any;
288
+ };
289
+ size: {
290
+ type: (StringConstructor | NumberConstructor)[];
291
+ required: false;
292
+ default: any;
293
+ };
294
+ customize: {
295
+ type: FunctionConstructor;
296
+ required: false;
297
+ default: any;
298
+ };
299
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
300
+ name: {
301
+ type: StringConstructor;
302
+ required: true;
303
+ };
304
+ mode: {
305
+ type: PropType<"svg" | "css">;
306
+ required: false;
307
+ default: any;
308
+ };
309
+ size: {
310
+ type: (StringConstructor | NumberConstructor)[];
311
+ required: false;
312
+ default: any;
313
+ };
314
+ customize: {
315
+ type: FunctionConstructor;
316
+ required: false;
317
+ default: any;
318
+ };
319
+ }>> & Readonly<{}>, {
320
+ mode: "svg" | "css";
321
+ size: string | number;
322
+ customize: Function;
323
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
324
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
279
325
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import type { VNode, SlotsType, PropType } from 'vue';
2
2
  import Meter from './Meter.vue.js';
3
- import type { Strategy, MeterSize } from '../../types.js';
3
+ import type { Strategy, MeterSize } from '../../types/index.js';
4
4
  declare const meterGroupConfig: {
5
5
  wrapper: string;
6
6
  base: string;
@@ -52,7 +52,7 @@ declare const meterGroupConfig: {
52
52
  icon: string;
53
53
  };
54
54
  };
55
- declare const _default: import("@vue/runtime-core").DefineComponent<{
55
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
56
56
  min: {
57
57
  type: NumberConstructor;
58
58
  default: number;
@@ -84,9 +84,9 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
84
84
  }>;
85
85
  default: () => {};
86
86
  };
87
- }, () => VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
87
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
88
88
  [key: string]: any;
89
- }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
89
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
90
90
  min: {
91
91
  type: NumberConstructor;
92
92
  default: number;
@@ -118,11 +118,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
118
118
  }>;
119
119
  default: () => {};
120
120
  };
121
- }>>, {
121
+ }>> & Readonly<{}>, {
122
122
  size: "xs" | "sm" | "2xs" | "md" | "lg" | "xl" | "2xl";
123
123
  ui: {};
124
- class: any;
125
124
  icon: string;
125
+ class: any;
126
126
  max: number;
127
127
  min: number;
128
128
  indicator: boolean;
@@ -131,5 +131,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
131
131
  indicator?: {
132
132
  percent: number;
133
133
  };
134
- }>>;
134
+ }>, {
135
+ UIcon: any;
136
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
135
137
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Strategy, ProgressSize, ProgressAnimation, ProgressColor } from '../../types.js';
2
+ import type { Strategy, ProgressSize, ProgressAnimation, ProgressColor } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  indicator: {
@@ -74,7 +74,7 @@ declare const config: {
74
74
  animation: string;
75
75
  };
76
76
  };
77
- declare const _default: import("vue").DefineComponent<{
77
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
78
78
  value: {
79
79
  type: NumberConstructor;
80
80
  default: any;
@@ -127,7 +127,7 @@ declare const _default: import("vue").DefineComponent<{
127
127
  }>;
128
128
  default: () => {};
129
129
  };
130
- }, {
130
+ }>, {
131
131
  ui: import("vue").ComputedRef<{
132
132
  wrapper: string;
133
133
  indicator: {
@@ -214,7 +214,7 @@ declare const _default: import("vue").DefineComponent<{
214
214
  isSteps: import("vue").ComputedRef<boolean>;
215
215
  realMax: import("vue").ComputedRef<number>;
216
216
  percent: import("vue").ComputedRef<number>;
217
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
217
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
218
218
  value: {
219
219
  type: NumberConstructor;
220
220
  default: any;
@@ -267,14 +267,14 @@ declare const _default: import("vue").DefineComponent<{
267
267
  }>;
268
268
  default: () => {};
269
269
  };
270
- }>>, {
270
+ }>> & Readonly<{}>, {
271
271
  size: "xs" | "sm" | "2xs" | "md" | "lg" | "xl" | "2xl";
272
272
  class: any;
273
+ max: number | any[];
274
+ animation: "carousel" | "carousel-inverse" | "swing" | "elastic";
273
275
  color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
274
276
  ui: {};
275
- indicator: boolean;
276
- animation: "carousel" | "carousel-inverse" | "swing" | "elastic";
277
277
  value: number;
278
- max: number | any[];
279
- }, {}>;
278
+ indicator: boolean;
279
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
280
280
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Strategy } from '../../types.js';
2
+ import type { Strategy } from '../../types/index.js';
3
3
  import colors from '#ui-colors';
4
4
  declare const config: {
5
5
  wrapper: string;
@@ -19,7 +19,7 @@ declare const config: {
19
19
  color: string;
20
20
  };
21
21
  };
22
- declare const _default: import("vue").DefineComponent<{
22
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
23
23
  id: {
24
24
  type: StringConstructor;
25
25
  default: () => any;
@@ -75,7 +75,7 @@ declare const _default: import("vue").DefineComponent<{
75
75
  }>;
76
76
  default: () => {};
77
77
  };
78
- }, {
78
+ }>, {
79
79
  ui: import("vue").ComputedRef<{
80
80
  wrapper: string;
81
81
  container: string;
@@ -97,12 +97,12 @@ declare const _default: import("vue").DefineComponent<{
97
97
  attrs: import("vue").ComputedRef<Pick<{
98
98
  [x: string]: unknown;
99
99
  }, string>>;
100
- toggle: import("vue").WritableComputedRef<boolean | unknown[]>;
100
+ toggle: import("vue").WritableComputedRef<boolean | unknown[], boolean | unknown[]>;
101
101
  inputId: string;
102
102
  name: import("vue").ComputedRef<string>;
103
103
  inputClass: import("vue").ComputedRef<string>;
104
104
  onChange: (event: Event) => void;
105
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
105
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
106
106
  id: {
107
107
  type: StringConstructor;
108
108
  default: () => any;
@@ -158,15 +158,15 @@ declare const _default: import("vue").DefineComponent<{
158
158
  }>;
159
159
  default: () => {};
160
160
  };
161
- }>> & {
161
+ }>> & Readonly<{
162
162
  onChange?: (...args: any[]) => any;
163
163
  "onUpdate:modelValue"?: (...args: any[]) => any;
164
- }, {
164
+ }>, {
165
165
  name: string;
166
166
  required: boolean;
167
167
  class: any;
168
- color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
169
168
  disabled: boolean;
169
+ color: "primary" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
170
170
  label: string;
171
171
  ui: {};
172
172
  id: string;
@@ -175,5 +175,5 @@ declare const _default: import("vue").DefineComponent<{
175
175
  help: string;
176
176
  indeterminate: boolean;
177
177
  inputClass: string;
178
- }, {}>;
178
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
179
179
  export default _default;
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <form @submit.prevent="onSubmit">
3
- <slot />
3
+ <slot v-bind="{ errors }" />
4
4
  </form>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import { provide, ref, defineComponent, onUnmounted, onMounted } from "vue";
8
+ import { provide, ref, defineComponent, onUnmounted, onMounted, readonly } from "vue";
9
9
  import { useEventBus } from "@vueuse/core";
10
10
  import { useId } from "#imports";
11
11
  class FormException extends Error {
@@ -100,11 +100,8 @@ export default defineComponent({
100
100
  if (props.validateOn?.includes("submit")) {
101
101
  await validate();
102
102
  }
103
- const submitEvent = {
104
- ...event,
105
- data: props.state
106
- };
107
- emit("submit", submitEvent);
103
+ event.data = props.state;
104
+ emit("submit", event);
108
105
  } catch (error) {
109
106
  if (!(error instanceof FormException)) {
110
107
  throw error;
@@ -149,7 +146,8 @@ export default defineComponent({
149
146
  }
150
147
  });
151
148
  return {
152
- onSubmit
149
+ onSubmit,
150
+ errors: readonly(errors)
153
151
  };
154
152
  }
155
153
  });
@@ -6,7 +6,7 @@ import type { BaseSchema as ValibotSchema30, BaseSchemaAsync as ValibotSchemaAsy
6
6
  import type { GenericSchema as ValibotSchema31, GenericSchemaAsync as ValibotSchemaAsync31, SafeParser as ValibotSafeParser31, SafeParserAsync as ValibotSafeParserAsync31 } from 'valibot31';
7
7
  import type { GenericSchema as ValibotSchema, GenericSchemaAsync as ValibotSchemaAsync, SafeParser as ValibotSafeParser, SafeParserAsync as ValibotSafeParserAsync } from 'valibot';
8
8
  import type { FormError, FormEventType } from '../../types/form.js';
9
- declare const _default: import("vue").DefineComponent<{
9
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
10
  schema: {
11
11
  type: PropType<ZodSchema> | PropType<YupObjectSchema<any>> | PropType<JoiSchema> | PropType<ValibotSchema30 | ValibotSchemaAsync30> | PropType<ValibotSchema31 | ValibotSchemaAsync31> | PropType<ValibotSafeParser31<any, any> | ValibotSafeParserAsync31<any, any>> | PropType<ValibotSchema | ValibotSchemaAsync> | PropType<ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any>>;
12
12
  default: any;
@@ -23,9 +23,16 @@ declare const _default: import("vue").DefineComponent<{
23
23
  type: PropType<FormEventType[]>;
24
24
  default: () => string[];
25
25
  };
26
- }, {
26
+ }>, {
27
27
  onSubmit: (payload: Event) => Promise<void>;
28
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("error" | "submit")[], "error" | "submit", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
+ errors: Readonly<import("vue").Ref<readonly {
29
+ readonly path: string;
30
+ readonly message: string;
31
+ }[], readonly {
32
+ readonly path: string;
33
+ readonly message: string;
34
+ }[]>>;
35
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("error" | "submit")[], "error" | "submit", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
29
36
  schema: {
30
37
  type: PropType<ZodSchema> | PropType<YupObjectSchema<any>> | PropType<JoiSchema> | PropType<ValibotSchema30 | ValibotSchemaAsync30> | PropType<ValibotSchema31 | ValibotSchemaAsync31> | PropType<ValibotSafeParser31<any, any> | ValibotSafeParserAsync31<any, any>> | PropType<ValibotSchema | ValibotSchemaAsync> | PropType<ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any>>;
31
38
  default: any;
@@ -42,12 +49,12 @@ declare const _default: import("vue").DefineComponent<{
42
49
  type: PropType<FormEventType[]>;
43
50
  default: () => string[];
44
51
  };
45
- }>> & {
52
+ }>> & Readonly<{
46
53
  onSubmit?: (...args: any[]) => any;
47
54
  onError?: (...args: any[]) => any;
48
- }, {
55
+ }>, {
49
56
  schema: ZodSchema<any, import("zod").ZodTypeDef, any> | YupObjectSchema<any, import("yup").AnyObject, any, ""> | import("joi").AnySchema<any> | ValibotSchema30<any, any> | ValibotSchemaAsync30<any, any> | ValibotSchema31<unknown, unknown, import("valibot31").BaseIssue<unknown>> | ValibotSchemaAsync31<unknown, unknown, import("valibot31").BaseIssue<unknown>> | ValibotSafeParser31<any, any> | ValibotSafeParserAsync31<any, any> | ValibotSchema<unknown, unknown, import("valibot").BaseIssue<unknown>> | ValibotSchemaAsync<unknown, unknown, import("valibot").BaseIssue<unknown>>;
50
57
  validate: ((state: any) => Promise<FormError[]>) | ((state: any) => FormError[]);
51
58
  validateOn: FormEventType[];
52
- }, {}>;
59
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
53
60
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { Ref, PropType } from 'vue';
2
- import type { FormGroupSize, Strategy } from '../../types.js';
2
+ import type { FormGroupSize, Strategy } from '../../types/index.js';
3
3
  declare const config: {
4
4
  wrapper: string;
5
5
  inner: string;
@@ -25,7 +25,7 @@ declare const config: {
25
25
  size: string;
26
26
  };
27
27
  };
28
- declare const _default: import("vue").DefineComponent<{
28
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
29
29
  name: {
30
30
  type: StringConstructor;
31
31
  default: any;
@@ -73,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
73
73
  type: BooleanConstructor;
74
74
  default: boolean;
75
75
  };
76
- }, {
76
+ }>, {
77
77
  ui: import("vue").ComputedRef<{
78
78
  wrapper: string;
79
79
  inner: string;
@@ -102,10 +102,10 @@ declare const _default: import("vue").DefineComponent<{
102
102
  attrs: import("vue").ComputedRef<Pick<{
103
103
  [x: string]: unknown;
104
104
  }, string>>;
105
- inputId: Ref<string>;
105
+ inputId: Ref<string, string>;
106
106
  size: import("vue").ComputedRef<any>;
107
107
  error: import("vue").ComputedRef<string | boolean>;
108
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
108
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
109
109
  name: {
110
110
  type: StringConstructor;
111
111
  default: any;
@@ -153,10 +153,10 @@ declare const _default: import("vue").DefineComponent<{
153
153
  type: BooleanConstructor;
154
154
  default: boolean;
155
155
  };
156
- }>>, {
156
+ }>> & Readonly<{}>, {
157
157
  name: string;
158
- size: FormGroupSize;
159
158
  required: boolean;
159
+ size: FormGroupSize;
160
160
  class: any;
161
161
  label: string;
162
162
  error: string | boolean;
@@ -165,5 +165,5 @@ declare const _default: import("vue").DefineComponent<{
165
165
  help: string;
166
166
  hint: string;
167
167
  eagerValidation: boolean;
168
- }, {}>;
168
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
169
169
  export default _default;
@@ -4,13 +4,12 @@
4
4
  :id="inputId"
5
5
  ref="input"
6
6
  :name="name"
7
- :value="modelValue"
8
7
  :type="type"
9
8
  :required="required"
10
9
  :placeholder="placeholder"
11
10
  :disabled="disabled"
12
11
  :class="inputClass"
13
- v-bind="attrs"
12
+ v-bind="type === 'file' ? attrs : { ...attrs, value: modelValue }"
14
13
  @input="onInput"
15
14
  @blur="onBlur"
16
15
  @change="onChange"