@vuecs/forms 4.0.1 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import type { ComponentDefaultValues, ComponentThemeDefinition, ThemeClassesOverride, ThemeElementDefinition, VariantValues } from '@vuecs/core';
1
+ import type { ComponentThemeDefinition, ThemeClassesOverride, ThemeElementDefinition, VariantValues } from '@vuecs/core';
2
2
  import type { ExtractPublicPropTypes, PropType, SlotsType } from 'vue';
3
3
  import { ValidationSeverity } from '../constants';
4
- import type { ValidationMessages } from '../type';
4
+ import type { FieldValidation, ValidationMessages } from '../type';
5
5
  import { type ValidationGroupDefaultSlotProps, type ValidationGroupItemSlotProps } from '../validation-group';
6
6
  export type FormGroupThemeClasses = {
7
7
  root: string;
@@ -10,16 +10,10 @@ export type FormGroupThemeClasses = {
10
10
  validationError: string;
11
11
  validationWarning: string;
12
12
  };
13
- export type FormGroupDefaults = {
14
- validation: boolean;
15
- };
16
13
  declare module '@vuecs/core' {
17
14
  interface ThemeElements {
18
15
  formGroup?: ThemeElementDefinition<FormGroupThemeClasses>;
19
16
  }
20
- interface ComponentDefaults {
21
- formGroup?: ComponentDefaultValues<FormGroupDefaults>;
22
- }
23
17
  }
24
18
  export declare const formGroupThemeDefaults: ComponentThemeDefinition<FormGroupThemeClasses>;
25
19
  declare const formGroupProps: {
@@ -53,17 +47,35 @@ declare const formGroupProps: {
53
47
  type: StringConstructor;
54
48
  default: any;
55
49
  };
56
- /** When `true`, render the validation messages section. Falls back to the global `formGroup.validation` default. */
50
+ /**
51
+ * Bundle prop accepting a `FieldValidation` (`{ severity, messages }`)
52
+ * — wins over `validationSeverity` + `validationMessages` when set.
53
+ *
54
+ * Canonical use is with `@ilingo/validup-vue`'s `useFieldValidation`:
55
+ * `<VCFormGroup :validation="useFieldValidation($v.fields.email)">`.
56
+ * Structural typing — vuecs and `@ilingo/validup-vue` declare matching
57
+ * shapes without either importing the other.
58
+ *
59
+ * Pass `null` / `undefined` to fall through to the legacy props.
60
+ */
57
61
  validation: {
58
- type: BooleanConstructor;
62
+ type: PropType<FieldValidation | null>;
59
63
  default: any;
60
64
  };
61
- /** Severity used to colour the validation messages (`error` / `warning`). */
65
+ /**
66
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
67
+ * Severity used to colour the validation messages (`error` /
68
+ * `warning`). Ignored when `:validation` is set.
69
+ */
62
70
  validationSeverity: {
63
71
  type: PropType<`${ValidationSeverity}` | undefined>;
64
72
  default: any;
65
73
  };
66
- /** Validation messages — keyed object or ordered array of `{ key, value }`. */
74
+ /**
75
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
76
+ * Validation messages — keyed object or ordered array of
77
+ * `{ key, value }`. Ignored when `:validation` is set.
78
+ */
67
79
  validationMessages: {
68
80
  type: PropType<ValidationMessages>;
69
81
  default: any;
@@ -113,17 +125,35 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
113
125
  type: StringConstructor;
114
126
  default: any;
115
127
  };
116
- /** When `true`, render the validation messages section. Falls back to the global `formGroup.validation` default. */
128
+ /**
129
+ * Bundle prop accepting a `FieldValidation` (`{ severity, messages }`)
130
+ * — wins over `validationSeverity` + `validationMessages` when set.
131
+ *
132
+ * Canonical use is with `@ilingo/validup-vue`'s `useFieldValidation`:
133
+ * `<VCFormGroup :validation="useFieldValidation($v.fields.email)">`.
134
+ * Structural typing — vuecs and `@ilingo/validup-vue` declare matching
135
+ * shapes without either importing the other.
136
+ *
137
+ * Pass `null` / `undefined` to fall through to the legacy props.
138
+ */
117
139
  validation: {
118
- type: BooleanConstructor;
140
+ type: PropType<FieldValidation | null>;
119
141
  default: any;
120
142
  };
121
- /** Severity used to colour the validation messages (`error` / `warning`). */
143
+ /**
144
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
145
+ * Severity used to colour the validation messages (`error` /
146
+ * `warning`). Ignored when `:validation` is set.
147
+ */
122
148
  validationSeverity: {
123
149
  type: PropType<`${ValidationSeverity}` | undefined>;
124
150
  default: any;
125
151
  };
126
- /** Validation messages — keyed object or ordered array of `{ key, value }`. */
152
+ /**
153
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
154
+ * Validation messages — keyed object or ordered array of
155
+ * `{ key, value }`. Ignored when `:validation` is set.
156
+ */
127
157
  validationMessages: {
128
158
  type: PropType<ValidationMessages>;
129
159
  default: any;
@@ -171,17 +201,35 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
171
201
  type: StringConstructor;
172
202
  default: any;
173
203
  };
174
- /** When `true`, render the validation messages section. Falls back to the global `formGroup.validation` default. */
204
+ /**
205
+ * Bundle prop accepting a `FieldValidation` (`{ severity, messages }`)
206
+ * — wins over `validationSeverity` + `validationMessages` when set.
207
+ *
208
+ * Canonical use is with `@ilingo/validup-vue`'s `useFieldValidation`:
209
+ * `<VCFormGroup :validation="useFieldValidation($v.fields.email)">`.
210
+ * Structural typing — vuecs and `@ilingo/validup-vue` declare matching
211
+ * shapes without either importing the other.
212
+ *
213
+ * Pass `null` / `undefined` to fall through to the legacy props.
214
+ */
175
215
  validation: {
176
- type: BooleanConstructor;
216
+ type: PropType<FieldValidation | null>;
177
217
  default: any;
178
218
  };
179
- /** Severity used to colour the validation messages (`error` / `warning`). */
219
+ /**
220
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
221
+ * Severity used to colour the validation messages (`error` /
222
+ * `warning`). Ignored when `:validation` is set.
223
+ */
180
224
  validationSeverity: {
181
225
  type: PropType<`${ValidationSeverity}` | undefined>;
182
226
  default: any;
183
227
  };
184
- /** Validation messages — keyed object or ordered array of `{ key, value }`. */
228
+ /**
229
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
230
+ * Validation messages — keyed object or ordered array of
231
+ * `{ key, value }`. Ignored when `:validation` is set.
232
+ */
185
233
  validationMessages: {
186
234
  type: PropType<ValidationMessages>;
187
235
  default: any;
@@ -205,7 +253,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
205
253
  labelTag: string;
206
254
  hintTag: string;
207
255
  hintContent: string;
208
- validation: boolean;
256
+ validation: FieldValidation;
209
257
  validationSeverity: "error" | "warning";
210
258
  validationMessages: ValidationMessages;
211
259
  }, SlotsType<{
@@ -1 +1 @@
1
- {"version":3,"file":"FormGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form-group/FormGroup.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EACR,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACR,sBAAsB,EACtB,QAAQ,EACR,SAAS,EAEZ,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAEH,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACpC,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,UAAU,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,OAAO,QAAQ,aAAa,CAAC;IACzB,UAAU,aAAa;QACnB,SAAS,CAAC,EAAE,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;KAC7D;IACD,UAAU,iBAAiB;QACvB,SAAS,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;KACzD;CACJ;AAED,eAAO,MAAM,sBAAsB,EAAE,wBAAwB,CAAC,qBAAqB,CAQlF,CAAC;AAIF,QAAA,MAAM,cAAc;IAChB,6HAA6H;;;;;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AC;;;IAEnF;;;;OAIG;;cAC4C,QAAQ,CAAC,kBAAkB,CAAC;;;IAE3E,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;;;IACnF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;aAkB1C,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;WACvB,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;UACtB,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;qBACV,+BAA+B;oBAChC,4BAA4B;yEA4GlD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import FormGroup from './FormGroup.vue';
2
2
  export { FormGroup as VCFormGroup };
3
3
  export { formGroupThemeDefaults } from './FormGroup.vue';
4
- export type { FormGroupProps, FormGroupThemeClasses, FormGroupDefaults } from './FormGroup.vue';
4
+ export type { FormGroupProps, FormGroupThemeClasses } from './FormGroup.vue';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -17,9 +17,9 @@ export type FormInputGroupSlotProps = {
17
17
  tag: string;
18
18
  };
19
19
  declare const formInputProps: {
20
- /** Controlled string value (v-model). */
20
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
21
21
  modelValue: {
22
- type: StringConstructor;
22
+ type: PropType<string | null | undefined>;
23
23
  default: string;
24
24
  };
25
25
  /** Native `<input type>` attribute. */
@@ -72,9 +72,9 @@ export type FormInputProps = ExtractPublicPropTypes<typeof formInputProps>;
72
72
  declare const _default: typeof __VLS_export;
73
73
  export default _default;
74
74
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
75
- /** Controlled string value (v-model). */
75
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
76
76
  modelValue: {
77
- type: StringConstructor;
77
+ type: PropType<string | null | undefined>;
78
78
  default: string;
79
79
  };
80
80
  /** Native `<input type>` attribute. */
@@ -125,9 +125,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
125
125
  }>, () => string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
126
126
  [key: string]: any;
127
127
  }> | import("vue").VNodeArrayChildren, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
128
- /** Controlled string value (v-model). */
128
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
129
129
  modelValue: {
130
- type: StringConstructor;
130
+ type: PropType<string | null | undefined>;
131
131
  default: string;
132
132
  };
133
133
  /** Native `<input type>` attribute. */
@@ -1 +1 @@
1
- {"version":3,"file":"FormInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form-input/FormInput.vue"],"names":[],"mappings":"AA6JA,OAAO,KAAK,EACR,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACR,sBAAsB,EACtB,QAAQ,EACR,SAAS,EAEZ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;;;;;IAE1D,4GAA4G;;;;;IAE5G,yDAAyD;;;;;IAEzD,uFAAuF;;;;;IAEvF,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;;;IACnF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;CAC1D,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,sBAAsB,CAAC,OAAO,cAAc,CAAC,CAAC;wBAEtD,OAAO,YAAY;AAAxC,wBAAyC;AAQzC,QAAA,MAAM,YAAY;IAhCd,iFAAiF;;cAC3C,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;;;IACzE,uCAAuC;;;;;IAEvC,gFAAgF;;;;;IAEhF,8GAA8G;;;;;IAE9G,0DAA0D;;;;;IAE1D,4GAA4G;;;;;IAE5G,yDAAyD;;;;;IAEzD,uFAAuF;;;;;IAEvF,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;;;IACnF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;;;IAnBvD,iFAAiF;;cAC3C,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;;;IACzE,uCAAuC;;;;;IAEvC,gFAAgF;;;;;IAEhF,8GAA8G;;;;;IAE9G,0DAA0D;;;;;IAE1D,4GAA4G;;;;;IAE5G,yDAAyD;;;;;IAEzD,uFAAuF;;;;;IAEvF,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;;;IACnF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;iBAuBtC,uBAAuB;kBACtB,uBAAuB;yEAiE3C,CAAC"}
@@ -10,9 +10,9 @@ declare module '@vuecs/core' {
10
10
  }
11
11
  export declare const formTextareaThemeDefaults: ComponentThemeDefinition<FormTextareaThemeClasses>;
12
12
  declare const formTextareaProps: {
13
- /** Controlled string value (v-model). */
13
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
14
14
  modelValue: {
15
- type: StringConstructor;
15
+ type: PropType<string | null | undefined>;
16
16
  default: string;
17
17
  };
18
18
  /** Debounce window (ms) for `update:modelValue` emissions. `0` disables debouncing. */
@@ -35,9 +35,9 @@ export type FormTextareaProps = ExtractPublicPropTypes<typeof formTextareaProps>
35
35
  declare const _default: typeof __VLS_export;
36
36
  export default _default;
37
37
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
38
- /** Controlled string value (v-model). */
38
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
39
39
  modelValue: {
40
- type: StringConstructor;
40
+ type: PropType<string | null | undefined>;
41
41
  default: string;
42
42
  };
43
43
  /** Debounce window (ms) for `update:modelValue` emissions. `0` disables debouncing. */
@@ -58,9 +58,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
58
58
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
59
59
  [key: string]: any;
60
60
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
61
- /** Controlled string value (v-model). */
61
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
62
62
  modelValue: {
63
- type: StringConstructor;
63
+ type: PropType<string | null | undefined>;
64
64
  default: string;
65
65
  };
66
66
  /** Debounce window (ms) for `update:modelValue` emissions. `0` disables debouncing. */
@@ -1 +1 @@
1
- {"version":3,"file":"FormTextarea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form-textarea/FormTextarea.vue"],"names":[],"mappings":"AAqFA,OAAO,KAAK,EACR,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAS5D,MAAM,MAA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GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,OAAO,QAAQ,aAAa,CAAC;IACzB,UAAU,aAAa;QACnB,YAAY,CAAC,EAAE,sBAAsB,CAAC,wBAAwB,CAAC,CAAC;KACnE;CACJ;AAED,eAAO,MAAM,yBAAyB,EAAE,wBAAwB,CAAC,wBAAwB,CAA6B,CAAC;AAEvH,QAAA,MAAM,iBAAiB;IACnB,iFAAiF;;cAC3C,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;;;IACzE,uFAAuF;;;;;IAEvF,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;;;IACtF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;CAC1D,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,OAAO,iBAAiB,CAAC,CAAC;wBAE5D,OAAO,YAAY;AAAxC,wBAAyC;AAQzC,QAAA,MAAM,YAAY;IApBd,iFAAiF;;cAC3C,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;;;IACzE,uFAAuF;;;;;IAEvF,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;;;IACtF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;;;IAPvD,iFAAiF;;cAC3C,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;;;IACzE,uFAAuF;;;;;IAEvF,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;;;IACtF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;4EAiDzD,CAAC"}
@@ -14,4 +14,31 @@ export type ValidationMessagesArrayStyle = {
14
14
  value: string;
15
15
  }[];
16
16
  export type ValidationMessages = ValidationMessagesArrayStyle | ValidationMessagesRecordStyle;
17
+ /**
18
+ * Single-prop bundle a `<VCFormGroup>` host consumes via `:validation`.
19
+ *
20
+ * Structurally identical to `@ilingo/validup-vue`'s exported
21
+ * `FieldValidation` (and the return shape of `useFieldValidation`), so
22
+ * the canonical bridge usage —
23
+ * `<VCFormGroup :validation="useFieldValidation($v.fields.email)">` —
24
+ * type-checks without either package importing the other (cross-package
25
+ * structural compatibility; vuecs stays neutral about validation
26
+ * libraries).
27
+ *
28
+ * `severity` accepts `'success'` for forward compatibility with
29
+ * validation bridges that surface a "passed" state; vuecs currently
30
+ * renders no class for it (the `:validation-success` theme slot is not
31
+ * yet defined), so `'success'` behaves like `undefined` at the DOM
32
+ * level. `error` and `warning` apply the matching `validationError` /
33
+ * `validationWarning` theme class on the root.
34
+ *
35
+ * `messages` is array-style only (the `{ key, value }[]` shape vuecs
36
+ * already renders inside `<VCValidationGroup>`). Producers using the
37
+ * legacy record shape (`Record<string, string>`) keep using
38
+ * `:validation-messages` directly.
39
+ */
40
+ export type FieldValidation = {
41
+ severity?: 'error' | 'warning' | 'success';
42
+ messages: ValidationMessagesArrayStyle;
43
+ };
17
44
  //# sourceMappingURL=type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/components/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,MAAM,EAAE,CAAC,CAAC;IAEV,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACnE,MAAM,MAAM,4BAA4B,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC;AAE5E,MAAM,MAAM,kBAAkB,GAAG,4BAA4B,GAAG,6BAA6B,CAAC"}
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/components/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,MAAM,EAAE,CAAC,CAAC;IAEV,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACnE,MAAM,MAAM,4BAA4B,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC;AAE5E,MAAM,MAAM,kBAAkB,GAAG,4BAA4B,GAAG,6BAA6B,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,QAAQ,EAAE,4BAA4B,CAAC;CAC1C,CAAC"}
@@ -11,9 +11,18 @@ declare module '@vuecs/core' {
11
11
  }
12
12
  }
13
13
  export declare const validationGroupThemeDefaults: ComponentThemeDefinition<ValidationGroupThemeClasses>;
14
+ /**
15
+ * Severity union the slot props expose. Wider than `ValidationSeverity`
16
+ * (`error` / `warning`) so a `<VCFormGroup :validation>` bundle whose
17
+ * `severity` is `'success'` or `undefined` flows through to slot
18
+ * consumers as-is — instead of being collapsed back to `'error'` by
19
+ * the prop default, which would mislead the slot rendering on
20
+ * pristine / valid fields.
21
+ */
22
+ export type ValidationGroupSeverity = `${ValidationSeverity}` | 'success' | undefined;
14
23
  export type ValidationGroupDefaultSlotProps = {
15
24
  data: ValidationMessagesArrayStyle;
16
- severity: `${ValidationSeverity}`;
25
+ severity: ValidationGroupSeverity;
17
26
  itemClass: string;
18
27
  itemTag: string;
19
28
  };
@@ -22,13 +31,25 @@ export type ValidationGroupItemSlotProps = {
22
31
  value: string;
23
32
  class: string;
24
33
  tag: string;
25
- severity: `${ValidationSeverity}`;
34
+ severity: ValidationGroupSeverity;
26
35
  };
27
36
  declare const validationGroupProps: {
28
- /** Severity used to colour the rendered messages (`error` / `warning`). */
37
+ /**
38
+ * Severity used to colour the rendered messages. Accepts
39
+ * `'error' | 'warning'` (the vuecs-native vocabulary) plus
40
+ * `'success'` for forward-compat with validation bridges that
41
+ * surface a "passed" state (see `<VCFormGroup>`'s `:validation`
42
+ * bundle).
43
+ *
44
+ * Default is `undefined` — slot consumers receive the actual
45
+ * value passed by the host. The previous default of
46
+ * `ValidationSeverity.ERROR` is gone; if a slot template needs an
47
+ * error fallback when none is supplied, do it at the call site
48
+ * (`severity ?? 'error'`).
49
+ */
29
50
  severity: {
30
- type: PropType<`${ValidationSeverity}`>;
31
- default: ValidationSeverity;
51
+ type: PropType<ValidationGroupSeverity>;
52
+ default: any;
32
53
  };
33
54
  /** Validation messages — keyed object or ordered array of `{ key, value }`. */
34
55
  messages: {
@@ -55,10 +76,22 @@ export type ValidationGroupProps = ExtractPublicPropTypes<typeof validationGroup
55
76
  declare const _default: typeof __VLS_export;
56
77
  export default _default;
57
78
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
58
- /** Severity used to colour the rendered messages (`error` / `warning`). */
79
+ /**
80
+ * Severity used to colour the rendered messages. Accepts
81
+ * `'error' | 'warning'` (the vuecs-native vocabulary) plus
82
+ * `'success'` for forward-compat with validation bridges that
83
+ * surface a "passed" state (see `<VCFormGroup>`'s `:validation`
84
+ * bundle).
85
+ *
86
+ * Default is `undefined` — slot consumers receive the actual
87
+ * value passed by the host. The previous default of
88
+ * `ValidationSeverity.ERROR` is gone; if a slot template needs an
89
+ * error fallback when none is supplied, do it at the call site
90
+ * (`severity ?? 'error'`).
91
+ */
59
92
  severity: {
60
- type: PropType<`${ValidationSeverity}`>;
61
- default: ValidationSeverity;
93
+ type: PropType<ValidationGroupSeverity>;
94
+ default: any;
62
95
  };
63
96
  /** Validation messages — keyed object or ordered array of `{ key, value }`. */
64
97
  messages: {
@@ -81,10 +114,22 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
114
  default: any;
82
115
  };
83
116
  }>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
84
- /** Severity used to colour the rendered messages (`error` / `warning`). */
117
+ /**
118
+ * Severity used to colour the rendered messages. Accepts
119
+ * `'error' | 'warning'` (the vuecs-native vocabulary) plus
120
+ * `'success'` for forward-compat with validation bridges that
121
+ * surface a "passed" state (see `<VCFormGroup>`'s `:validation`
122
+ * bundle).
123
+ *
124
+ * Default is `undefined` — slot consumers receive the actual
125
+ * value passed by the host. The previous default of
126
+ * `ValidationSeverity.ERROR` is gone; if a slot template needs an
127
+ * error fallback when none is supplied, do it at the call site
128
+ * (`severity ?? 'error'`).
129
+ */
85
130
  severity: {
86
- type: PropType<`${ValidationSeverity}`>;
87
- default: ValidationSeverity;
131
+ type: PropType<ValidationGroupSeverity>;
132
+ default: any;
88
133
  };
89
134
  /** Validation messages — keyed object or ordered array of `{ key, value }`. */
90
135
  messages: {
@@ -109,7 +154,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
109
154
  }>> & Readonly<{}>, {
110
155
  themeClass: ThemeClassesOverride<ValidationGroupThemeClasses>;
111
156
  themeVariant: VariantValues;
112
- severity: "error" | "warning";
157
+ severity: ValidationGroupSeverity;
113
158
  messages: ValidationMessages;
114
159
  itemTag: string;
115
160
  }, SlotsType<{
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/validation-group/ValidationGroup.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EACR,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EAChB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACR,sBAAsB,EACtB,QAAQ,EACR,SAAS,EAET,UAAU,EACb,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAEhF,MAAM,MAAM,2BAA2B,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,OAAO,QAAQ,aAAa,CAAC;IACzB,UAAU,aAAa;QACnB,eAAe,CAAC,EAAE,sBAAsB,CAAC,2BAA2B,CAAC,CAAC;KACzE;CACJ;AAED,eAAO,MAAM,4BAA4B,EAAE,wBAAwB,CAAC,2BAA2B,CAA2D,CAAC;AAE3J,MAAM,MAAM,+BAA+B,GAAG;IAC1C,IAAI,EAAE,4BAA4B,CAAC;IACnC,QAAQ,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GA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,CAAC;;;IACzF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;CAC1D,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,OAAO,oBAAoB,CAAC,CAAC;wBAElE,OAAO,YAAY;AAAxC,wBAAyC;AAQzC,QAAA,MAAM,YAAY;IAlCd;;;;;;;;;;;;OAYG;;cACyB,QAAQ,CAAC,uBAAuB,CAAC;;;IAC7D,+EAA+E;;cAC1C,QAAQ,CAAC,kBAAkB,CAAC;;;IACjE,+CAA+C;;;;;IAE/C,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,CAAC;;;IACzF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;IArBvD;;;;;;;;;;;;OAYG;;cACyB,QAAQ,CAAC,uBAAuB,CAAC;;;IAC7D,+EAA+E;;cAC1C,QAAQ,CAAC,kBAAkB,CAAC;;;IACjE,+CAA+C;;;;;IAE/C,yDAAyD;;cAC3B,QAAQ,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,CAAC;;;IACzF,wDAAwD;;cACxB,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;aAiB1C,+BAA+B;UAClC,4BAA4B;yEA+CxC,CAAC"}
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ const formCheckboxThemeDefaults = { classes: {
9
9
  label: "vc-form-checkbox-label",
10
10
  group: "vc-form-checkbox-wrapper"
11
11
  } };
12
- const behavioralDefaults$4 = { labelContent: "Input" };
12
+ const behavioralDefaults$3 = { labelContent: "Input" };
13
13
  //#endregion
14
14
  //#region src/components/form-checkbox/FormCheckbox.vue
15
15
  var FormCheckbox_default = defineComponent({
@@ -80,7 +80,7 @@ var FormCheckbox_default = defineComponent({
80
80
  slots: Object,
81
81
  setup(props, { attrs, emit, slots }) {
82
82
  const theme = useComponentTheme("formCheckbox", props, formCheckboxThemeDefaults);
83
- const defaults = useComponentDefaults("formCheckbox", props, behavioralDefaults$4);
83
+ const defaults = useComponentDefaults("formCheckbox", props, behavioralDefaults$3);
84
84
  const fallbackId = useId(void 0, "vc-form-checkbox");
85
85
  return () => {
86
86
  const resolved = theme.value;
@@ -194,10 +194,22 @@ const validationGroupThemeDefaults = { classes: { item: "form-group-hint group-r
194
194
  var ValidationGroup_default = defineComponent({
195
195
  name: "VCValidationGroup",
196
196
  props: {
197
- /** Severity used to colour the rendered messages (`error` / `warning`). */
197
+ /**
198
+ * Severity used to colour the rendered messages. Accepts
199
+ * `'error' | 'warning'` (the vuecs-native vocabulary) plus
200
+ * `'success'` for forward-compat with validation bridges that
201
+ * surface a "passed" state (see `<VCFormGroup>`'s `:validation`
202
+ * bundle).
203
+ *
204
+ * Default is `undefined` — slot consumers receive the actual
205
+ * value passed by the host. The previous default of
206
+ * `ValidationSeverity.ERROR` is gone; if a slot template needs an
207
+ * error fallback when none is supplied, do it at the call site
208
+ * (`severity ?? 'error'`).
209
+ */
198
210
  severity: {
199
211
  type: String,
200
- default: "error"
212
+ default: void 0
201
213
  },
202
214
  /** Validation messages — keyed object or ordered array of `{ key, value }`. */
203
215
  messages: {
@@ -263,7 +275,6 @@ const formGroupThemeDefaults = { classes: {
263
275
  validationError: "",
264
276
  validationWarning: ""
265
277
  } };
266
- const behavioralDefaults$3 = { validation: true };
267
278
  //#endregion
268
279
  //#region src/components/form-group/FormGroup.vue
269
280
  var FormGroup_default = defineComponent({
@@ -300,17 +311,35 @@ var FormGroup_default = defineComponent({
300
311
  type: String,
301
312
  default: void 0
302
313
  },
303
- /** When `true`, render the validation messages section. Falls back to the global `formGroup.validation` default. */
314
+ /**
315
+ * Bundle prop accepting a `FieldValidation` (`{ severity, messages }`)
316
+ * — wins over `validationSeverity` + `validationMessages` when set.
317
+ *
318
+ * Canonical use is with `@ilingo/validup-vue`'s `useFieldValidation`:
319
+ * `<VCFormGroup :validation="useFieldValidation($v.fields.email)">`.
320
+ * Structural typing — vuecs and `@ilingo/validup-vue` declare matching
321
+ * shapes without either importing the other.
322
+ *
323
+ * Pass `null` / `undefined` to fall through to the legacy props.
324
+ */
304
325
  validation: {
305
- type: Boolean,
326
+ type: [Object, null],
306
327
  default: void 0
307
328
  },
308
- /** Severity used to colour the validation messages (`error` / `warning`). */
329
+ /**
330
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
331
+ * Severity used to colour the validation messages (`error` /
332
+ * `warning`). Ignored when `:validation` is set.
333
+ */
309
334
  validationSeverity: {
310
335
  type: String,
311
336
  default: void 0
312
337
  },
313
- /** Validation messages — keyed object or ordered array of `{ key, value }`. */
338
+ /**
339
+ * @deprecated Pass a `FieldValidation` via `:validation` instead.
340
+ * Validation messages — keyed object or ordered array of
341
+ * `{ key, value }`. Ignored when `:validation` is set.
342
+ */
314
343
  validationMessages: {
315
344
  type: [Object, Array],
316
345
  default: void 0
@@ -329,19 +358,23 @@ var FormGroup_default = defineComponent({
329
358
  slots: Object,
330
359
  setup(props, { attrs, slots }) {
331
360
  const theme = useComponentTheme("formGroup", props, formGroupThemeDefaults);
332
- const defaults = useComponentDefaults("formGroup", props, behavioralDefaults$3);
333
361
  return () => {
334
362
  const resolved = theme.value;
335
- const resolvedDefaults = defaults.value;
336
363
  const children = [];
337
364
  if (typeof props.label === "boolean" ? props.label : !!props.labelContent || !!slots.label) {
338
365
  if (slots.label) children.push(h(props.labelTag, { class: resolved.label || void 0 }, slots.label({})));
339
366
  else if (props.labelContent) children.push(h(props.labelTag, { class: resolved.label || void 0 }, [props.labelContent]));
340
367
  }
341
368
  if (slots.default) children.push(slots.default({}));
342
- if (resolvedDefaults.validation) children.push(h(ValidationGroup_default, {
343
- severity: props.validationSeverity,
344
- messages: props.validationMessages || {}
369
+ const usingBundle = props.validation != null;
370
+ const bundleSeverity = usingBundle ? props.validation.severity : void 0;
371
+ const effectiveSeverity = usingBundle ? bundleSeverity : props.validationSeverity;
372
+ const effectiveMessages = usingBundle ? props.validation.messages : props.validationMessages;
373
+ const hasMessages = !!effectiveMessages && (Array.isArray(effectiveMessages) ? effectiveMessages.length > 0 : Object.keys(effectiveMessages).length > 0);
374
+ const hasValidationSlot = !!slots.validationGroup || !!slots.validationItem;
375
+ if (hasMessages || hasValidationSlot) children.push(h(ValidationGroup_default, {
376
+ severity: effectiveSeverity,
377
+ messages: effectiveMessages || {}
345
378
  }, {
346
379
  ...slots.validationGroup ? { default: slots.validationGroup } : {},
347
380
  ...slots.validationItem ? { item: slots.validationItem } : {}
@@ -351,8 +384,10 @@ var FormGroup_default = defineComponent({
351
384
  else if (props.hintContent) children.push(h(props.hintTag, { class: resolved.hint || void 0 }, [props.hintContent]));
352
385
  }
353
386
  let validationClass;
354
- if (resolvedDefaults.validation && props.validationMessages) {
355
- if (Array.isArray(props.validationMessages) ? props.validationMessages.length > 0 : Object.keys(props.validationMessages).length > 0) validationClass = props.validationSeverity === "warning" ? resolved.validationWarning : resolved.validationError;
387
+ if (hasMessages) {
388
+ if (effectiveSeverity === "warning") validationClass = resolved.validationWarning;
389
+ else if (effectiveSeverity === "error") validationClass = resolved.validationError;
390
+ else if (!usingBundle) validationClass = resolved.validationError;
356
391
  }
357
392
  return h("div", mergeProps(attrs, { class: [resolved.root || void 0, validationClass || void 0] }), children);
358
393
  };
@@ -372,9 +407,9 @@ var FormInput_default = defineComponent({
372
407
  name: "VCFormInput",
373
408
  inheritAttrs: false,
374
409
  props: {
375
- /** Controlled string value (v-model). */
410
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
376
411
  modelValue: {
377
- type: String,
412
+ type: [String, null],
378
413
  default: ""
379
414
  },
380
415
  /** Native `<input type>` attribute. */
@@ -1636,9 +1671,9 @@ const formTextareaThemeDefaults = { classes: { root: "" } };
1636
1671
  var FormTextarea_default = defineComponent({
1637
1672
  name: "VCFormTextarea",
1638
1673
  props: {
1639
- /** Controlled string value (v-model). */
1674
+ /** Controlled string value (v-model). `null` is the documented "unset" value. */
1640
1675
  modelValue: {
1641
- type: String,
1676
+ type: [String, null],
1642
1677
  default: ""
1643
1678
  },
1644
1679
  /** Debounce window (ms) for `update:modelValue` emissions. `0` disables debouncing. */