nuance-ui 0.2.15 → 0.2.17
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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox.vue +1 -1
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/switch/switch.d.vue.ts +2 -2
- package/dist/runtime/components/switch/switch.vue +1 -1
- package/dist/runtime/components/switch/switch.vue.d.ts +2 -2
- package/dist/runtime/form/checkbox-field.d.vue.ts +3 -12
- package/dist/runtime/form/checkbox-field.vue +12 -10
- package/dist/runtime/form/checkbox-field.vue.d.ts +3 -12
- package/dist/runtime/form/checkbox-group-field.d.vue.ts +2 -12
- package/dist/runtime/form/checkbox-group-field.vue +7 -7
- package/dist/runtime/form/checkbox-group-field.vue.d.ts +2 -12
- package/dist/runtime/form/date-field.d.vue.ts +2 -12
- package/dist/runtime/form/date-field.vue +7 -7
- package/dist/runtime/form/date-field.vue.d.ts +2 -12
- package/dist/runtime/form/date-time-field.d.vue.ts +2 -12
- package/dist/runtime/form/date-time-field.vue +8 -8
- package/dist/runtime/form/date-time-field.vue.d.ts +2 -12
- package/dist/runtime/form/email-field.d.vue.ts +2 -10
- package/dist/runtime/form/email-field.vue +6 -6
- package/dist/runtime/form/email-field.vue.d.ts +2 -10
- package/dist/runtime/form/number-field.d.vue.ts +2 -10
- package/dist/runtime/form/number-field.vue +6 -6
- package/dist/runtime/form/number-field.vue.d.ts +2 -10
- package/dist/runtime/form/password-field.d.vue.ts +2 -10
- package/dist/runtime/form/password-field.vue +6 -6
- package/dist/runtime/form/password-field.vue.d.ts +2 -10
- package/dist/runtime/form/select-field.d.vue.ts +2 -10
- package/dist/runtime/form/select-field.vue +7 -7
- package/dist/runtime/form/select-field.vue.d.ts +2 -10
- package/dist/runtime/form/switch-field.d.vue.ts +3 -12
- package/dist/runtime/form/switch-field.vue +12 -10
- package/dist/runtime/form/switch-field.vue.d.ts +3 -12
- package/dist/runtime/form/switch-group-field.d.vue.ts +2 -12
- package/dist/runtime/form/switch-group-field.vue +7 -7
- package/dist/runtime/form/switch-group-field.vue.d.ts +2 -12
- package/dist/runtime/form/text-field.d.vue.ts +2 -10
- package/dist/runtime/form/text-field.vue +6 -6
- package/dist/runtime/form/text-field.vue.d.ts +2 -10
- package/dist/runtime/form/textarea-field.d.vue.ts +2 -10
- package/dist/runtime/form/textarea-field.vue +6 -6
- package/dist/runtime/form/textarea-field.vue.d.ts +2 -10
- package/dist/runtime/form/time-field.d.vue.ts +2 -12
- package/dist/runtime/form/time-field.vue +7 -7
- package/dist/runtime/form/time-field.vue.d.ts +2 -12
- package/dist/runtime/form/types.d.ts +15 -0
- package/dist/runtime/form/types.js +0 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -33,9 +33,9 @@ type __VLS_Slots = {} & {
|
|
|
33
33
|
icon?: (props: typeof __VLS_14) => any;
|
|
34
34
|
};
|
|
35
35
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
-
"update:modelValue": (value: boolean | "indeterminate") => any;
|
|
36
|
+
"update:modelValue": (value: boolean | "indeterminate" | undefined) => any;
|
|
37
37
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
38
|
-
"onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((value: boolean | "indeterminate" | undefined) => any) | undefined;
|
|
39
39
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -33,7 +33,7 @@ const {
|
|
|
33
33
|
is: { type: null, required: false },
|
|
34
34
|
mod: { type: [Object, Array, null], required: false }
|
|
35
35
|
});
|
|
36
|
-
const modelValue = defineModel({ type: [Boolean, String]
|
|
36
|
+
const modelValue = defineModel({ type: [Boolean, String] });
|
|
37
37
|
const ctx = useCheckboxGroupState();
|
|
38
38
|
const checked = computed({
|
|
39
39
|
get: () => {
|
|
@@ -33,9 +33,9 @@ type __VLS_Slots = {} & {
|
|
|
33
33
|
icon?: (props: typeof __VLS_14) => any;
|
|
34
34
|
};
|
|
35
35
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
-
"update:modelValue": (value: boolean | "indeterminate") => any;
|
|
36
|
+
"update:modelValue": (value: boolean | "indeterminate" | undefined) => any;
|
|
37
37
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
38
|
-
"onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((value: boolean | "indeterminate" | undefined) => any) | undefined;
|
|
39
39
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -39,9 +39,9 @@ type __VLS_Slots = {} & {
|
|
|
39
39
|
description?: (props: typeof __VLS_32) => any;
|
|
40
40
|
};
|
|
41
41
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
-
"update:modelValue": (value: boolean) => any;
|
|
42
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
43
43
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
44
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
44
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
45
45
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
46
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
47
47
|
declare const _default: typeof __VLS_export;
|
|
@@ -46,7 +46,7 @@ const {
|
|
|
46
46
|
const uuid = computed(() => id ?? useId());
|
|
47
47
|
const ctx = useSwitchGroupState();
|
|
48
48
|
const size = computed(() => _size ?? ctx?.size);
|
|
49
|
-
const modelValue = defineModel({ type: Boolean
|
|
49
|
+
const modelValue = defineModel({ type: Boolean });
|
|
50
50
|
const checked = computed({
|
|
51
51
|
get: () => {
|
|
52
52
|
if (ctx && value !== void 0)
|
|
@@ -39,9 +39,9 @@ type __VLS_Slots = {} & {
|
|
|
39
39
|
description?: (props: typeof __VLS_32) => any;
|
|
40
40
|
};
|
|
41
41
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
-
"update:modelValue": (value: boolean) => any;
|
|
42
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
43
43
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
44
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
44
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
45
45
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
46
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
47
47
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { CheckboxProps } from '../components/checkbox/checkbox.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<boolean>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value @default `false` */
|
|
11
|
-
initialValue?: boolean;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
14
5
|
}
|
|
15
6
|
declare var __VLS_11: {
|
|
16
7
|
class: string;
|
|
@@ -5,15 +5,11 @@ const {
|
|
|
5
5
|
name,
|
|
6
6
|
rules,
|
|
7
7
|
validateOn = "change",
|
|
8
|
-
initialValue
|
|
8
|
+
checked: initialValue,
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: Boolean, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
12
|
+
checked: { type: Boolean, required: false },
|
|
17
13
|
id: { type: String, required: false },
|
|
18
14
|
color: { type: null, required: false },
|
|
19
15
|
iconColor: { type: null, required: false },
|
|
@@ -28,16 +24,22 @@ const {
|
|
|
28
24
|
bodyElement: { type: null, required: false },
|
|
29
25
|
labelElement: { type: null, required: false },
|
|
30
26
|
is: { type: null, required: false },
|
|
31
|
-
mod: { type: [Object, Array, null], required: false }
|
|
27
|
+
mod: { type: [Object, Array, null], required: false },
|
|
28
|
+
name: { type: String, required: true },
|
|
29
|
+
controlled: { type: Boolean, required: false },
|
|
30
|
+
rules: { type: null, required: false },
|
|
31
|
+
validateOn: { type: String, required: false }
|
|
32
32
|
});
|
|
33
33
|
const {
|
|
34
|
-
|
|
34
|
+
checked,
|
|
35
35
|
errorMessage,
|
|
36
36
|
handleChange
|
|
37
37
|
} = useField(() => name, rules, {
|
|
38
|
+
type: "checkbox",
|
|
38
39
|
validateOnValueUpdate: false,
|
|
39
40
|
validateOnMount: false,
|
|
40
|
-
|
|
41
|
+
checkedValue: true,
|
|
42
|
+
initialValue: initialValue || void 0,
|
|
41
43
|
controlled
|
|
42
44
|
});
|
|
43
45
|
</script>
|
|
@@ -45,7 +47,7 @@ const {
|
|
|
45
47
|
<template>
|
|
46
48
|
<Checkbox
|
|
47
49
|
v-bind='props'
|
|
48
|
-
|
|
50
|
+
v-model='checked'
|
|
49
51
|
:error='errorMessage'
|
|
50
52
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
51
53
|
>
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { CheckboxProps } from '../components/checkbox/checkbox.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<boolean>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value @default `false` */
|
|
11
|
-
initialValue?: boolean;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
14
5
|
}
|
|
15
6
|
declare var __VLS_11: {
|
|
16
7
|
class: string;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { CheckboxGroupProps } from '../components/checkbox/checkbox-group.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string[]>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string[];
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface CheckboxGroupFieldProps extends Omit<CheckboxGroupProps, 'error' | 'name'>, FieldBaseProps<string[]> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_10: {}, __VLS_13: {}, __VLS_16: {}, __VLS_19: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -9,11 +9,6 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: Array, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
12
|
size: { type: String, required: false },
|
|
18
13
|
readOnly: { type: Boolean, required: false },
|
|
19
14
|
disabled: { type: Boolean, required: false },
|
|
@@ -24,7 +19,12 @@ const {
|
|
|
24
19
|
radius: { type: [String, Number, Object], required: false },
|
|
25
20
|
variant: { type: String, required: false },
|
|
26
21
|
leftSectionPE: { type: void 0, required: false },
|
|
27
|
-
rightSectionPE: { type: void 0, required: false }
|
|
22
|
+
rightSectionPE: { type: void 0, required: false },
|
|
23
|
+
name: { type: String, required: true },
|
|
24
|
+
controlled: { type: Boolean, required: false },
|
|
25
|
+
rules: { type: null, required: false },
|
|
26
|
+
validateOn: { type: String, required: false },
|
|
27
|
+
initialValue: { type: Array, required: false }
|
|
28
28
|
});
|
|
29
29
|
const {
|
|
30
30
|
value,
|
|
@@ -41,7 +41,7 @@ const {
|
|
|
41
41
|
<template>
|
|
42
42
|
<CheckboxGroup
|
|
43
43
|
v-bind='props'
|
|
44
|
-
|
|
44
|
+
v-model='value'
|
|
45
45
|
:error='errorMessage'
|
|
46
46
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
47
47
|
>
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { CheckboxGroupProps } from '../components/checkbox/checkbox-group.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string[]>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string[];
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface CheckboxGroupFieldProps extends Omit<CheckboxGroupProps, 'error' | 'name'>, FieldBaseProps<string[]> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_10: {}, __VLS_13: {}, __VLS_16: {}, __VLS_19: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { DateSelection, SelectionMode } from '../components/calendar/index.js';
|
|
3
2
|
import type { DatePickerProps } from '../components/input/date-picker.vue.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
8
|
-
rules?: RuleExpression<DateSelection<Mode>>;
|
|
9
|
-
/** When to trigger validation @default `'change'` */
|
|
10
|
-
validateOn?: 'change' | 'submit';
|
|
11
|
-
/** Pre-fills the field value */
|
|
12
|
-
initialValue?: DateSelection<Mode>;
|
|
13
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
14
|
-
controlled?: boolean;
|
|
3
|
+
import type { FieldBaseProps } from './types.js';
|
|
4
|
+
export interface DateFieldProps<Mode extends SelectionMode = 'single'> extends Omit<DatePickerProps<Mode>, 'error' | 'name'>, FieldBaseProps<DateSelection<Mode>> {
|
|
15
5
|
}
|
|
16
6
|
declare const __VLS_export: <Mode extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
17
7
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<DateFieldProps<Mode>> & (typeof globalThis extends {
|
|
@@ -9,11 +9,6 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: null, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
12
|
valueFormat: { type: [String, Object], required: false },
|
|
18
13
|
size: { type: [String, Object], required: false },
|
|
19
14
|
withWeekNumbers: { type: Boolean, required: false },
|
|
@@ -44,7 +39,12 @@ const {
|
|
|
44
39
|
variant: { type: String, required: false },
|
|
45
40
|
resize: { type: void 0, required: false },
|
|
46
41
|
leftSectionPE: { type: void 0, required: false },
|
|
47
|
-
rightSectionPE: { type: void 0, required: false }
|
|
42
|
+
rightSectionPE: { type: void 0, required: false },
|
|
43
|
+
name: { type: String, required: true },
|
|
44
|
+
controlled: { type: Boolean, required: false },
|
|
45
|
+
rules: { type: null, required: false },
|
|
46
|
+
validateOn: { type: String, required: false },
|
|
47
|
+
initialValue: { type: null, required: false }
|
|
48
48
|
});
|
|
49
49
|
const {
|
|
50
50
|
value,
|
|
@@ -61,7 +61,7 @@ const {
|
|
|
61
61
|
<template>
|
|
62
62
|
<DatePicker
|
|
63
63
|
v-bind='props'
|
|
64
|
-
|
|
64
|
+
v-model='value'
|
|
65
65
|
:error='errorMessage'
|
|
66
66
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
67
67
|
>
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { DateSelection, SelectionMode } from '../components/calendar/index.js';
|
|
3
2
|
import type { DatePickerProps } from '../components/input/date-picker.vue.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
8
|
-
rules?: RuleExpression<DateSelection<Mode>>;
|
|
9
|
-
/** When to trigger validation @default `'change'` */
|
|
10
|
-
validateOn?: 'change' | 'submit';
|
|
11
|
-
/** Pre-fills the field value */
|
|
12
|
-
initialValue?: DateSelection<Mode>;
|
|
13
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
14
|
-
controlled?: boolean;
|
|
3
|
+
import type { FieldBaseProps } from './types.js';
|
|
4
|
+
export interface DateFieldProps<Mode extends SelectionMode = 'single'> extends Omit<DatePickerProps<Mode>, 'error' | 'name'>, FieldBaseProps<DateSelection<Mode>> {
|
|
15
5
|
}
|
|
16
6
|
declare const __VLS_export: <Mode extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
17
7
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<DateFieldProps<Mode>> & (typeof globalThis extends {
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { DatePickerProps } from '../components/date-time-picker.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string | Date | null>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string | Date | null;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface DateTimeFieldProps extends Omit<DatePickerProps, 'error' | 'name'>, FieldBaseProps<string | Date | null> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -5,15 +5,10 @@ const {
|
|
|
5
5
|
name,
|
|
6
6
|
rules,
|
|
7
7
|
validateOn = "change",
|
|
8
|
-
initialValue
|
|
8
|
+
initialValue,
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: [String, Date, null], required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
12
|
format: { type: [String, Object], required: false },
|
|
18
13
|
calendarProps: { type: Object, required: false },
|
|
19
14
|
timePickerProps: { type: Object, required: false },
|
|
@@ -32,7 +27,12 @@ const {
|
|
|
32
27
|
rightSectionPE: { type: void 0, required: false },
|
|
33
28
|
readonly: { type: Boolean, required: false },
|
|
34
29
|
disabled: { type: Boolean, required: false },
|
|
35
|
-
withSeconds: { type: Boolean, required: false }
|
|
30
|
+
withSeconds: { type: Boolean, required: false },
|
|
31
|
+
name: { type: String, required: true },
|
|
32
|
+
controlled: { type: Boolean, required: false },
|
|
33
|
+
rules: { type: null, required: false },
|
|
34
|
+
validateOn: { type: String, required: false },
|
|
35
|
+
initialValue: { type: [String, Date, null], required: false }
|
|
36
36
|
});
|
|
37
37
|
const {
|
|
38
38
|
value,
|
|
@@ -49,7 +49,7 @@ const {
|
|
|
49
49
|
<template>
|
|
50
50
|
<DateTimePicker
|
|
51
51
|
v-bind='props'
|
|
52
|
-
|
|
52
|
+
v-model='value'
|
|
53
53
|
:error='errorMessage'
|
|
54
54
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
55
55
|
>
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { DatePickerProps } from '../components/date-time-picker.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string | Date | null>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string | Date | null;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface DateTimeFieldProps extends Omit<DatePickerProps, 'error' | 'name'>, FieldBaseProps<string | Date | null> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface EmailFieldProps extends Omit<TextInputProps, 'error' | 'name'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -9,11 +9,7 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
12
|
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: String, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
13
|
multiline: { type: Boolean, required: false },
|
|
18
14
|
withAria: { type: Boolean, required: false },
|
|
19
15
|
classes: { type: Object, required: false },
|
|
@@ -29,7 +25,11 @@ const {
|
|
|
29
25
|
leftSectionPE: { type: void 0, required: false },
|
|
30
26
|
rightSectionPE: { type: void 0, required: false },
|
|
31
27
|
readonly: { type: Boolean, required: false },
|
|
32
|
-
disabled: { type: Boolean, required: false }
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
name: { type: String, required: true },
|
|
30
|
+
controlled: { type: Boolean, required: false },
|
|
31
|
+
rules: { type: null, required: false },
|
|
32
|
+
initialValue: { type: String, required: false }
|
|
33
33
|
});
|
|
34
34
|
const {
|
|
35
35
|
value,
|
|
@@ -47,7 +47,7 @@ const {
|
|
|
47
47
|
<template>
|
|
48
48
|
<EmailInput
|
|
49
49
|
v-bind='props'
|
|
50
|
-
|
|
50
|
+
v-model='value'
|
|
51
51
|
:error='errorMessage'
|
|
52
52
|
:name
|
|
53
53
|
@update:model-value='handleChange($event, !!errorMessage)'
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface EmailFieldProps extends Omit<TextInputProps, 'error' | 'name'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { NumberInputProps } from '../components/input/number-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<number>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface NumberFieldProps extends Omit<NumberInputProps, 'error'>, Omit<FieldBaseProps<number>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: number;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -11,11 +11,7 @@ const {
|
|
|
11
11
|
max = Number.MAX_SAFE_INTEGER,
|
|
12
12
|
...props
|
|
13
13
|
} = defineProps({
|
|
14
|
-
name: { type: String, required: true },
|
|
15
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
16
14
|
validateOn: { type: String, required: false },
|
|
17
|
-
initialValue: { type: Number, required: false },
|
|
18
|
-
controlled: { type: Boolean, required: false },
|
|
19
15
|
min: { type: Number, required: false },
|
|
20
16
|
max: { type: Number, required: false },
|
|
21
17
|
step: { type: Number, required: false },
|
|
@@ -30,7 +26,11 @@ const {
|
|
|
30
26
|
size: { type: [String, Object], required: false },
|
|
31
27
|
variant: { type: String, required: false },
|
|
32
28
|
leftSectionPE: { type: void 0, required: false },
|
|
33
|
-
rightSectionPE: { type: void 0, required: false }
|
|
29
|
+
rightSectionPE: { type: void 0, required: false },
|
|
30
|
+
name: { type: String, required: true },
|
|
31
|
+
controlled: { type: Boolean, required: false },
|
|
32
|
+
rules: { type: null, required: false },
|
|
33
|
+
initialValue: { type: Number, required: false }
|
|
34
34
|
});
|
|
35
35
|
const {
|
|
36
36
|
value,
|
|
@@ -48,7 +48,7 @@ const {
|
|
|
48
48
|
<template>
|
|
49
49
|
<NumberInput
|
|
50
50
|
v-bind='props'
|
|
51
|
-
|
|
51
|
+
v-model='value'
|
|
52
52
|
:error='errorMessage'
|
|
53
53
|
:name
|
|
54
54
|
:min
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { NumberInputProps } from '../components/input/number-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<number>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface NumberFieldProps extends Omit<NumberInputProps, 'error'>, Omit<FieldBaseProps<number>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: number;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface PasswordFieldProps extends Omit<TextInputProps, 'error'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -9,11 +9,7 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
12
|
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: String, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
13
|
multiline: { type: Boolean, required: false },
|
|
18
14
|
withAria: { type: Boolean, required: false },
|
|
19
15
|
classes: { type: Object, required: false },
|
|
@@ -29,7 +25,11 @@ const {
|
|
|
29
25
|
leftSectionPE: { type: void 0, required: false },
|
|
30
26
|
rightSectionPE: { type: void 0, required: false },
|
|
31
27
|
readonly: { type: Boolean, required: false },
|
|
32
|
-
disabled: { type: Boolean, required: false }
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
name: { type: String, required: true },
|
|
30
|
+
controlled: { type: Boolean, required: false },
|
|
31
|
+
rules: { type: null, required: false },
|
|
32
|
+
initialValue: { type: String, required: false }
|
|
33
33
|
});
|
|
34
34
|
const {
|
|
35
35
|
value,
|
|
@@ -47,7 +47,7 @@ const {
|
|
|
47
47
|
<template>
|
|
48
48
|
<PasswordInput
|
|
49
49
|
v-bind='props'
|
|
50
|
-
|
|
50
|
+
v-model='value'
|
|
51
51
|
:error='errorMessage'
|
|
52
52
|
:name
|
|
53
53
|
@update:model-value='handleChange($event, !!errorMessage)'
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface PasswordFieldProps extends Omit<TextInputProps, 'error'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { ComboboxItemExt } from '../components/combobox/index.js';
|
|
3
2
|
import type { SelectProps } from '../components/select.vue.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
8
|
-
rules?: RuleExpression<string | string[] | null>;
|
|
3
|
+
import type { FieldBaseProps } from './types.js';
|
|
4
|
+
export interface SelectFieldProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<SelectProps<Value, Ext>, 'error'>, Omit<FieldBaseProps<string | string[] | null>, 'validateOn'> {
|
|
9
5
|
/** When to trigger validation @default `'blur'` */
|
|
10
6
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
11
|
-
/** Pre-fills the field value */
|
|
12
|
-
initialValue?: string | string[] | null;
|
|
13
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
14
|
-
controlled?: boolean;
|
|
15
7
|
}
|
|
16
8
|
declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
17
9
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectFieldProps<Value, Ext>> & (typeof globalThis extends {
|
|
@@ -5,15 +5,11 @@ const {
|
|
|
5
5
|
name,
|
|
6
6
|
rules,
|
|
7
7
|
validateOn = "blur",
|
|
8
|
-
initialValue
|
|
8
|
+
initialValue,
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
12
|
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: [String, Array, null], required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
13
|
options: { type: Array, required: true },
|
|
18
14
|
searchable: { type: Boolean, required: false },
|
|
19
15
|
multiple: { type: Boolean, required: false },
|
|
@@ -36,7 +32,11 @@ const {
|
|
|
36
32
|
leftSectionPE: { type: void 0, required: false },
|
|
37
33
|
rightSectionPE: { type: void 0, required: false },
|
|
38
34
|
readonly: { type: Boolean, required: false },
|
|
39
|
-
disabled: { type: Boolean, required: false }
|
|
35
|
+
disabled: { type: Boolean, required: false },
|
|
36
|
+
name: { type: String, required: true },
|
|
37
|
+
controlled: { type: Boolean, required: false },
|
|
38
|
+
rules: { type: null, required: false },
|
|
39
|
+
initialValue: { type: [String, Array, null], required: false }
|
|
40
40
|
});
|
|
41
41
|
const {
|
|
42
42
|
value,
|
|
@@ -54,7 +54,7 @@ const {
|
|
|
54
54
|
<template>
|
|
55
55
|
<Select
|
|
56
56
|
v-bind='props'
|
|
57
|
-
|
|
57
|
+
v-model='value'
|
|
58
58
|
:error='errorMessage'
|
|
59
59
|
@update:model-value='handleChange($event, !!errorMessage)'
|
|
60
60
|
@blur='handleBlur($event, validateOn === "blur")'
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { ComboboxItemExt } from '../components/combobox/index.js';
|
|
3
2
|
import type { SelectProps } from '../components/select.vue.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
8
|
-
rules?: RuleExpression<string | string[] | null>;
|
|
3
|
+
import type { FieldBaseProps } from './types.js';
|
|
4
|
+
export interface SelectFieldProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<SelectProps<Value, Ext>, 'error'>, Omit<FieldBaseProps<string | string[] | null>, 'validateOn'> {
|
|
9
5
|
/** When to trigger validation @default `'blur'` */
|
|
10
6
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
11
|
-
/** Pre-fills the field value */
|
|
12
|
-
initialValue?: string | string[] | null;
|
|
13
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
14
|
-
controlled?: boolean;
|
|
15
7
|
}
|
|
16
8
|
declare const __VLS_export: <Value extends string = string, Ext extends ComboboxItemExt = object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
17
9
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<SelectFieldProps<Value, Ext>> & (typeof globalThis extends {
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { SwitchProps } from '../components/switch/switch.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<boolean>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value @default `false` */
|
|
11
|
-
initialValue?: boolean;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
14
5
|
}
|
|
15
6
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {
|
|
16
7
|
error: string | undefined;
|
|
@@ -5,15 +5,11 @@ const {
|
|
|
5
5
|
name,
|
|
6
6
|
rules,
|
|
7
7
|
validateOn = "change",
|
|
8
|
-
initialValue = false,
|
|
9
8
|
controlled = true,
|
|
9
|
+
checked: initialValue,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: Boolean, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
12
|
+
checked: { type: Boolean, required: false },
|
|
17
13
|
id: { type: String, required: false },
|
|
18
14
|
value: { type: String, required: false },
|
|
19
15
|
offLabel: { type: String, required: false },
|
|
@@ -30,16 +26,22 @@ const {
|
|
|
30
26
|
bodyElement: { type: null, required: false },
|
|
31
27
|
labelElement: { type: null, required: false },
|
|
32
28
|
is: { type: null, required: false },
|
|
33
|
-
mod: { type: [Object, Array, null], required: false }
|
|
29
|
+
mod: { type: [Object, Array, null], required: false },
|
|
30
|
+
name: { type: String, required: true },
|
|
31
|
+
controlled: { type: Boolean, required: false },
|
|
32
|
+
rules: { type: null, required: false },
|
|
33
|
+
validateOn: { type: String, required: false }
|
|
34
34
|
});
|
|
35
35
|
const {
|
|
36
|
-
|
|
36
|
+
checked,
|
|
37
37
|
errorMessage,
|
|
38
38
|
handleChange
|
|
39
39
|
} = useField(() => name, rules, {
|
|
40
|
+
type: "checkbox",
|
|
40
41
|
validateOnValueUpdate: false,
|
|
41
42
|
validateOnMount: false,
|
|
42
|
-
|
|
43
|
+
checkedValue: true,
|
|
44
|
+
initialValue: initialValue || void 0,
|
|
43
45
|
controlled
|
|
44
46
|
});
|
|
45
47
|
</script>
|
|
@@ -47,7 +49,7 @@ const {
|
|
|
47
49
|
<template>
|
|
48
50
|
<Switch
|
|
49
51
|
v-bind='props'
|
|
50
|
-
|
|
52
|
+
v-model='checked'
|
|
51
53
|
:error='errorMessage'
|
|
52
54
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
53
55
|
>
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { SwitchProps } from '../components/switch/switch.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<boolean>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value @default `false` */
|
|
11
|
-
initialValue?: boolean;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
14
5
|
}
|
|
15
6
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {
|
|
16
7
|
error: string | undefined;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { SwitchGroupProps } from '../components/switch/switch-group.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string[]>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string[];
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface SwitchGroupFieldProps extends Omit<SwitchGroupProps, 'error' | 'name'>, FieldBaseProps<string[]> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_10: {}, __VLS_13: {}, __VLS_16: {}, __VLS_19: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -9,11 +9,6 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: Array, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
12
|
size: { type: String, required: false },
|
|
18
13
|
readOnly: { type: Boolean, required: false },
|
|
19
14
|
disabled: { type: Boolean, required: false },
|
|
@@ -24,7 +19,12 @@ const {
|
|
|
24
19
|
radius: { type: [String, Number, Object], required: false },
|
|
25
20
|
variant: { type: String, required: false },
|
|
26
21
|
leftSectionPE: { type: void 0, required: false },
|
|
27
|
-
rightSectionPE: { type: void 0, required: false }
|
|
22
|
+
rightSectionPE: { type: void 0, required: false },
|
|
23
|
+
name: { type: String, required: true },
|
|
24
|
+
controlled: { type: Boolean, required: false },
|
|
25
|
+
rules: { type: null, required: false },
|
|
26
|
+
validateOn: { type: String, required: false },
|
|
27
|
+
initialValue: { type: Array, required: false }
|
|
28
28
|
});
|
|
29
29
|
const {
|
|
30
30
|
value,
|
|
@@ -41,7 +41,7 @@ const {
|
|
|
41
41
|
<template>
|
|
42
42
|
<SwitchGroup
|
|
43
43
|
v-bind='props'
|
|
44
|
-
|
|
44
|
+
v-model='value'
|
|
45
45
|
:error='errorMessage'
|
|
46
46
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
47
47
|
>
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { SwitchGroupProps } from '../components/switch/switch-group.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string[]>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string[];
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface SwitchGroupFieldProps extends Omit<SwitchGroupProps, 'error' | 'name'>, FieldBaseProps<string[]> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_10: {}, __VLS_13: {}, __VLS_16: {}, __VLS_19: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface TextFieldProps extends Omit<TextInputProps, 'error'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -9,11 +9,7 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
12
|
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: String, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
13
|
multiline: { type: Boolean, required: false },
|
|
18
14
|
withAria: { type: Boolean, required: false },
|
|
19
15
|
classes: { type: Object, required: false },
|
|
@@ -29,7 +25,11 @@ const {
|
|
|
29
25
|
leftSectionPE: { type: void 0, required: false },
|
|
30
26
|
rightSectionPE: { type: void 0, required: false },
|
|
31
27
|
readonly: { type: Boolean, required: false },
|
|
32
|
-
disabled: { type: Boolean, required: false }
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
name: { type: String, required: true },
|
|
30
|
+
controlled: { type: Boolean, required: false },
|
|
31
|
+
rules: { type: null, required: false },
|
|
32
|
+
initialValue: { type: String, required: false }
|
|
33
33
|
});
|
|
34
34
|
const {
|
|
35
35
|
value,
|
|
@@ -47,7 +47,7 @@ const {
|
|
|
47
47
|
<template>
|
|
48
48
|
<TextInput
|
|
49
49
|
v-bind='props'
|
|
50
|
-
|
|
50
|
+
v-model='value'
|
|
51
51
|
:error='errorMessage'
|
|
52
52
|
:name
|
|
53
53
|
@update:model-value='handleChange($event, !!errorMessage)'
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface TextFieldProps extends Omit<TextInputProps, 'error'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextareaProps } from '../components/textarea.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface TextareaFieldProps extends Omit<TextareaProps, 'error'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -9,11 +9,7 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
12
|
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: String, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
13
|
icon: { type: String, required: false },
|
|
18
14
|
autosize: { type: Boolean, required: false },
|
|
19
15
|
description: { type: String, required: false },
|
|
@@ -28,7 +24,11 @@ const {
|
|
|
28
24
|
leftSectionPE: { type: void 0, required: false },
|
|
29
25
|
rightSectionPE: { type: void 0, required: false },
|
|
30
26
|
readonly: { type: Boolean, required: false },
|
|
31
|
-
disabled: { type: Boolean, required: false }
|
|
27
|
+
disabled: { type: Boolean, required: false },
|
|
28
|
+
name: { type: String, required: true },
|
|
29
|
+
controlled: { type: Boolean, required: false },
|
|
30
|
+
rules: { type: null, required: false },
|
|
31
|
+
initialValue: { type: String, required: false }
|
|
32
32
|
});
|
|
33
33
|
const {
|
|
34
34
|
value,
|
|
@@ -46,7 +46,7 @@ const {
|
|
|
46
46
|
<template>
|
|
47
47
|
<Textarea
|
|
48
48
|
v-bind='props'
|
|
49
|
-
|
|
49
|
+
v-model='value'
|
|
50
50
|
:error='errorMessage'
|
|
51
51
|
:name
|
|
52
52
|
@update:model-value='handleChange($event, !!errorMessage)'
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TextareaProps } from '../components/textarea.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface TextareaFieldProps extends Omit<TextareaProps, 'error'>, Omit<FieldBaseProps<string>, 'validateOn'> {
|
|
8
4
|
/** When to trigger validation @default `'blur'` */
|
|
9
5
|
validateOn?: 'blur' | 'submit' | 'change';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
14
6
|
}
|
|
15
7
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
8
|
error: string | undefined;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TimePickerProps } from '../components/time-picker/time-picker.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface TimeFieldProps extends Omit<TimePickerProps, 'error' | 'name'>, FieldBaseProps<string> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -9,11 +9,6 @@ const {
|
|
|
9
9
|
controlled = true,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
-
name: { type: String, required: true },
|
|
13
|
-
rules: { type: [String, Object, Function, Array], required: false, skipCheck: true },
|
|
14
|
-
validateOn: { type: String, required: false },
|
|
15
|
-
initialValue: { type: String, required: false },
|
|
16
|
-
controlled: { type: Boolean, required: false },
|
|
17
12
|
clearable: { type: Boolean, required: false },
|
|
18
13
|
min: { type: String, required: false },
|
|
19
14
|
max: { type: String, required: false },
|
|
@@ -40,7 +35,12 @@ const {
|
|
|
40
35
|
leftSectionPE: { type: void 0, required: false },
|
|
41
36
|
rightSectionPE: { type: void 0, required: false },
|
|
42
37
|
readonly: { type: Boolean, required: false },
|
|
43
|
-
disabled: { type: Boolean, required: false }
|
|
38
|
+
disabled: { type: Boolean, required: false },
|
|
39
|
+
name: { type: String, required: true },
|
|
40
|
+
controlled: { type: Boolean, required: false },
|
|
41
|
+
rules: { type: null, required: false },
|
|
42
|
+
validateOn: { type: String, required: false },
|
|
43
|
+
initialValue: { type: String, required: false }
|
|
44
44
|
});
|
|
45
45
|
const {
|
|
46
46
|
value,
|
|
@@ -57,7 +57,7 @@ const {
|
|
|
57
57
|
<template>
|
|
58
58
|
<TimePicker
|
|
59
59
|
v-bind='props'
|
|
60
|
-
|
|
60
|
+
v-model='value'
|
|
61
61
|
:error='errorMessage'
|
|
62
62
|
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
63
63
|
>
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import type { RuleExpression } from 'vee-validate';
|
|
2
1
|
import type { TimePickerProps } from '../components/time-picker/time-picker.vue.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
7
|
-
rules?: RuleExpression<string>;
|
|
8
|
-
/** When to trigger validation @default `'change'` */
|
|
9
|
-
validateOn?: 'change' | 'submit';
|
|
10
|
-
/** Pre-fills the field value */
|
|
11
|
-
initialValue?: string;
|
|
12
|
-
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
13
|
-
controlled?: boolean;
|
|
2
|
+
import type { FieldBaseProps } from './types.js';
|
|
3
|
+
export interface TimeFieldProps extends Omit<TimePickerProps, 'error' | 'name'>, FieldBaseProps<string> {
|
|
14
4
|
}
|
|
15
5
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {
|
|
16
6
|
error: string | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { MaybeRef } from 'vue';
|
|
3
|
+
/** Common props shared by all field wrappers */
|
|
4
|
+
export interface FieldBaseProps<Value> {
|
|
5
|
+
/** Field name used by vee-validate */
|
|
6
|
+
name: string;
|
|
7
|
+
/** If `false`, disconnects the field from the parent form context @default `true` */
|
|
8
|
+
controlled?: boolean;
|
|
9
|
+
/** Validation rules, applied when `controlled: false` or as field-level override */
|
|
10
|
+
rules?: MaybeRef<RuleExpression<Value>>;
|
|
11
|
+
/** When to trigger validation @default `'change'` */
|
|
12
|
+
validateOn?: 'change' | 'submit';
|
|
13
|
+
/** Pre-fills the field value */
|
|
14
|
+
initialValue?: Value;
|
|
15
|
+
}
|
|
File without changes
|