nuance-ui 0.2.16 → 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 +2 -1
- package/dist/runtime/form/checkbox-field.vue +8 -6
- package/dist/runtime/form/checkbox-field.vue.d.ts +2 -1
- package/dist/runtime/form/checkbox-group-field.vue +1 -1
- package/dist/runtime/form/date-field.vue +1 -1
- package/dist/runtime/form/date-time-field.vue +1 -1
- package/dist/runtime/form/email-field.vue +1 -1
- package/dist/runtime/form/number-field.vue +1 -1
- package/dist/runtime/form/password-field.vue +1 -1
- package/dist/runtime/form/select-field.vue +1 -1
- package/dist/runtime/form/switch-field.d.vue.ts +2 -1
- package/dist/runtime/form/switch-field.vue +8 -6
- package/dist/runtime/form/switch-field.vue.d.ts +2 -1
- package/dist/runtime/form/switch-group-field.vue +1 -1
- package/dist/runtime/form/text-field.vue +1 -1
- package/dist/runtime/form/textarea-field.vue +1 -1
- package/dist/runtime/form/time-field.vue +1 -1
- 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,6 +1,7 @@
|
|
|
1
1
|
import type { CheckboxProps } from '../components/checkbox/checkbox.vue.js';
|
|
2
2
|
import type { FieldBaseProps } from './types.js';
|
|
3
|
-
export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, FieldBaseProps<boolean> {
|
|
3
|
+
export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
4
5
|
}
|
|
5
6
|
declare var __VLS_11: {
|
|
6
7
|
class: string;
|
|
@@ -5,10 +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
|
+
checked: { type: Boolean, required: false },
|
|
12
13
|
id: { type: String, required: false },
|
|
13
14
|
color: { type: null, required: false },
|
|
14
15
|
iconColor: { type: null, required: false },
|
|
@@ -27,17 +28,18 @@ const {
|
|
|
27
28
|
name: { type: String, required: true },
|
|
28
29
|
controlled: { type: Boolean, required: false },
|
|
29
30
|
rules: { type: null, required: false },
|
|
30
|
-
validateOn: { type: String, required: false }
|
|
31
|
-
initialValue: { type: Boolean, 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,6 +1,7 @@
|
|
|
1
1
|
import type { CheckboxProps } from '../components/checkbox/checkbox.vue.js';
|
|
2
2
|
import type { FieldBaseProps } from './types.js';
|
|
3
|
-
export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, FieldBaseProps<boolean> {
|
|
3
|
+
export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
4
5
|
}
|
|
5
6
|
declare var __VLS_11: {
|
|
6
7
|
class: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SwitchProps } from '../components/switch/switch.vue.js';
|
|
2
2
|
import type { FieldBaseProps } from './types.js';
|
|
3
|
-
export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, FieldBaseProps<boolean> {
|
|
3
|
+
export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
4
5
|
}
|
|
5
6
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {
|
|
6
7
|
error: string | undefined;
|
|
@@ -5,10 +5,11 @@ const {
|
|
|
5
5
|
name,
|
|
6
6
|
rules,
|
|
7
7
|
validateOn = "change",
|
|
8
|
-
initialValue,
|
|
9
8
|
controlled = true,
|
|
9
|
+
checked: initialValue,
|
|
10
10
|
...props
|
|
11
11
|
} = defineProps({
|
|
12
|
+
checked: { type: Boolean, required: false },
|
|
12
13
|
id: { type: String, required: false },
|
|
13
14
|
value: { type: String, required: false },
|
|
14
15
|
offLabel: { type: String, required: false },
|
|
@@ -29,17 +30,18 @@ const {
|
|
|
29
30
|
name: { type: String, required: true },
|
|
30
31
|
controlled: { type: Boolean, required: false },
|
|
31
32
|
rules: { type: null, required: false },
|
|
32
|
-
validateOn: { type: String, required: false }
|
|
33
|
-
initialValue: { type: Boolean, 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,6 +1,7 @@
|
|
|
1
1
|
import type { SwitchProps } from '../components/switch/switch.vue.js';
|
|
2
2
|
import type { FieldBaseProps } from './types.js';
|
|
3
|
-
export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, FieldBaseProps<boolean> {
|
|
3
|
+
export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
|
|
4
|
+
checked?: true;
|
|
4
5
|
}
|
|
5
6
|
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {
|
|
6
7
|
error: string | undefined;
|