nuance-ui 0.2.11 → 0.2.14
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/module.mjs +12 -0
- package/dist/runtime/components/app-shell/app-shell.d.vue.ts +8 -0
- package/dist/runtime/components/app-shell/app-shell.vue +9 -5
- package/dist/runtime/components/app-shell/app-shell.vue.d.ts +8 -0
- package/dist/runtime/components/checkbox/checkbox.vue +1 -1
- package/dist/runtime/components/input/number-input.vue +1 -1
- package/dist/runtime/components/input/text-input.vue +4 -1
- package/dist/runtime/components/textarea.d.vue.ts +5 -3
- package/dist/runtime/components/textarea.vue +27 -14
- package/dist/runtime/components/textarea.vue.d.ts +5 -3
- package/dist/runtime/form/checkbox-field.d.vue.ts +38 -0
- package/dist/runtime/form/checkbox-field.vue +68 -0
- package/dist/runtime/form/checkbox-field.vue.d.ts +38 -0
- package/dist/runtime/form/checkbox-group-field.d.vue.ts +35 -0
- package/dist/runtime/form/checkbox-group-field.vue +62 -0
- package/dist/runtime/form/checkbox-group-field.vue.d.ts +35 -0
- package/dist/runtime/form/date-field.d.vue.ts +45 -0
- package/dist/runtime/form/date-field.vue +88 -0
- package/dist/runtime/form/date-field.vue.d.ts +45 -0
- package/dist/runtime/form/date-time-field.d.vue.ts +37 -0
- package/dist/runtime/form/date-time-field.vue +76 -0
- package/dist/runtime/form/date-time-field.vue.d.ts +37 -0
- package/dist/runtime/form/email-field.d.vue.ts +37 -0
- package/dist/runtime/form/email-field.vue +76 -0
- package/dist/runtime/form/email-field.vue.d.ts +37 -0
- package/dist/runtime/form/number-field.d.vue.ts +37 -0
- package/dist/runtime/form/number-field.vue +79 -0
- package/dist/runtime/form/number-field.vue.d.ts +37 -0
- package/dist/runtime/form/password-field.d.vue.ts +37 -0
- package/dist/runtime/form/password-field.vue +76 -0
- package/dist/runtime/form/password-field.vue.d.ts +37 -0
- package/dist/runtime/form/select-field.d.vue.ts +50 -0
- package/dist/runtime/form/select-field.vue +86 -0
- package/dist/runtime/form/select-field.vue.d.ts +50 -0
- package/dist/runtime/form/switch-field.d.vue.ts +33 -0
- package/dist/runtime/form/switch-field.vue +66 -0
- package/dist/runtime/form/switch-field.vue.d.ts +33 -0
- package/dist/runtime/form/switch-group-field.d.vue.ts +35 -0
- package/dist/runtime/form/switch-group-field.vue +62 -0
- package/dist/runtime/form/switch-group-field.vue.d.ts +35 -0
- package/dist/runtime/form/text-field.d.vue.ts +37 -0
- package/dist/runtime/form/text-field.vue +76 -0
- package/dist/runtime/form/text-field.vue.d.ts +37 -0
- package/dist/runtime/form/textarea-field.d.vue.ts +37 -0
- package/dist/runtime/form/textarea-field.vue +75 -0
- package/dist/runtime/form/textarea-field.vue.d.ts +37 -0
- package/dist/runtime/form/time-field.d.vue.ts +37 -0
- package/dist/runtime/form/time-field.vue +84 -0
- package/dist/runtime/form/time-field.vue.d.ts +37 -0
- package/package.json +2 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useField } from "vee-validate";
|
|
3
|
+
import TextInput from "../components/input/text-input.vue";
|
|
4
|
+
const {
|
|
5
|
+
name,
|
|
6
|
+
rules,
|
|
7
|
+
validateOn = "blur",
|
|
8
|
+
initialValue,
|
|
9
|
+
controlled = true,
|
|
10
|
+
...props
|
|
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
|
+
multiline: { type: Boolean, required: false },
|
|
18
|
+
withAria: { type: Boolean, required: false },
|
|
19
|
+
classes: { type: Object, required: false },
|
|
20
|
+
icon: { type: String, required: false },
|
|
21
|
+
description: { type: String, required: false },
|
|
22
|
+
label: { type: String, required: false },
|
|
23
|
+
required: { type: Boolean, required: false },
|
|
24
|
+
id: { type: [String, null], required: false },
|
|
25
|
+
radius: { type: [String, Number, Object], required: false },
|
|
26
|
+
size: { type: [String, Object], required: false },
|
|
27
|
+
variant: { type: String, required: false },
|
|
28
|
+
resize: { type: void 0, required: false },
|
|
29
|
+
leftSectionPE: { type: void 0, required: false },
|
|
30
|
+
rightSectionPE: { type: void 0, required: false },
|
|
31
|
+
readonly: { type: Boolean, required: false },
|
|
32
|
+
disabled: { type: Boolean, required: false }
|
|
33
|
+
});
|
|
34
|
+
const {
|
|
35
|
+
value,
|
|
36
|
+
errorMessage,
|
|
37
|
+
handleBlur,
|
|
38
|
+
handleChange
|
|
39
|
+
} = useField(() => name, rules, {
|
|
40
|
+
validateOnValueUpdate: false,
|
|
41
|
+
validateOnMount: false,
|
|
42
|
+
initialValue,
|
|
43
|
+
controlled
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<TextInput
|
|
49
|
+
v-bind='props'
|
|
50
|
+
:model-value='value'
|
|
51
|
+
:error='errorMessage'
|
|
52
|
+
:name
|
|
53
|
+
@update:model-value='handleChange($event, !!errorMessage)'
|
|
54
|
+
@blur='handleBlur($event, validateOn === "blur")'
|
|
55
|
+
>
|
|
56
|
+
<template v-if='$slots.leftSection' #leftSection>
|
|
57
|
+
<slot name='leftSection' />
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<template v-if='$slots.rightSection' #rightSection>
|
|
61
|
+
<slot name='rightSection' />
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<template v-if='$slots.label' #label>
|
|
65
|
+
<slot name='label' />
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<template v-if='$slots.description' #description>
|
|
69
|
+
<slot name='description' />
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<template v-if='$slots.error' #error>
|
|
73
|
+
<slot name='error' :error='errorMessage' />
|
|
74
|
+
</template>
|
|
75
|
+
</TextInput>
|
|
76
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { TextInputProps } from '../components/input/text-input.vue.js';
|
|
3
|
+
export interface TextFieldProps extends Omit<TextInputProps, 'error'> {
|
|
4
|
+
/** Field name used by vee-validate */
|
|
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 `'blur'` */
|
|
9
|
+
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
|
+
}
|
|
15
|
+
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
|
+
error: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
leftSection?: (props: typeof __VLS_12) => any;
|
|
20
|
+
} & {
|
|
21
|
+
rightSection?: (props: typeof __VLS_15) => any;
|
|
22
|
+
} & {
|
|
23
|
+
label?: (props: typeof __VLS_18) => any;
|
|
24
|
+
} & {
|
|
25
|
+
description?: (props: typeof __VLS_21) => any;
|
|
26
|
+
} & {
|
|
27
|
+
error?: (props: typeof __VLS_24) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<TextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { TextareaProps } from '../components/textarea.vue.js';
|
|
3
|
+
export interface TextareaFieldProps extends Omit<TextareaProps, 'error'> {
|
|
4
|
+
/** Field name used by vee-validate */
|
|
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 `'blur'` */
|
|
9
|
+
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
|
+
}
|
|
15
|
+
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
|
+
error: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
leftSection?: (props: typeof __VLS_12) => any;
|
|
20
|
+
} & {
|
|
21
|
+
rightSection?: (props: typeof __VLS_15) => any;
|
|
22
|
+
} & {
|
|
23
|
+
label?: (props: typeof __VLS_18) => any;
|
|
24
|
+
} & {
|
|
25
|
+
description?: (props: typeof __VLS_21) => any;
|
|
26
|
+
} & {
|
|
27
|
+
error?: (props: typeof __VLS_24) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<TextareaFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextareaFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useField } from "vee-validate";
|
|
3
|
+
import Textarea from "../components/textarea.vue";
|
|
4
|
+
const {
|
|
5
|
+
name,
|
|
6
|
+
rules,
|
|
7
|
+
validateOn = "blur",
|
|
8
|
+
initialValue,
|
|
9
|
+
controlled = true,
|
|
10
|
+
...props
|
|
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
|
+
icon: { type: String, required: false },
|
|
18
|
+
autosize: { type: Boolean, required: false },
|
|
19
|
+
description: { type: String, required: false },
|
|
20
|
+
label: { type: String, required: false },
|
|
21
|
+
required: { type: Boolean, required: false },
|
|
22
|
+
id: { type: [String, null], required: false },
|
|
23
|
+
radius: { type: [String, Number, Object], required: false },
|
|
24
|
+
size: { type: [String, Object], required: false },
|
|
25
|
+
variant: { type: String, required: false },
|
|
26
|
+
multiline: { type: Boolean, required: false },
|
|
27
|
+
resize: { type: void 0, required: false },
|
|
28
|
+
leftSectionPE: { type: void 0, required: false },
|
|
29
|
+
rightSectionPE: { type: void 0, required: false },
|
|
30
|
+
readonly: { type: Boolean, required: false },
|
|
31
|
+
disabled: { type: Boolean, required: false }
|
|
32
|
+
});
|
|
33
|
+
const {
|
|
34
|
+
value,
|
|
35
|
+
errorMessage,
|
|
36
|
+
handleBlur,
|
|
37
|
+
handleChange
|
|
38
|
+
} = useField(() => name, rules, {
|
|
39
|
+
validateOnValueUpdate: false,
|
|
40
|
+
validateOnMount: false,
|
|
41
|
+
initialValue,
|
|
42
|
+
controlled
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<Textarea
|
|
48
|
+
v-bind='props'
|
|
49
|
+
:model-value='value'
|
|
50
|
+
:error='errorMessage'
|
|
51
|
+
:name
|
|
52
|
+
@update:model-value='handleChange($event, !!errorMessage)'
|
|
53
|
+
@blur='handleBlur($event, validateOn === "blur")'
|
|
54
|
+
>
|
|
55
|
+
<template v-if='$slots.leftSection' #leftSection>
|
|
56
|
+
<slot name='leftSection' />
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<template v-if='$slots.rightSection' #rightSection>
|
|
60
|
+
<slot name='rightSection' />
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<template v-if='$slots.label' #label>
|
|
64
|
+
<slot name='label' />
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<template v-if='$slots.description' #description>
|
|
68
|
+
<slot name='description' />
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<template v-if='$slots.error' #error>
|
|
72
|
+
<slot name='error' :error='errorMessage' />
|
|
73
|
+
</template>
|
|
74
|
+
</Textarea>
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { TextareaProps } from '../components/textarea.vue.js';
|
|
3
|
+
export interface TextareaFieldProps extends Omit<TextareaProps, 'error'> {
|
|
4
|
+
/** Field name used by vee-validate */
|
|
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 `'blur'` */
|
|
9
|
+
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
|
+
}
|
|
15
|
+
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {
|
|
16
|
+
error: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
leftSection?: (props: typeof __VLS_12) => any;
|
|
20
|
+
} & {
|
|
21
|
+
rightSection?: (props: typeof __VLS_15) => any;
|
|
22
|
+
} & {
|
|
23
|
+
label?: (props: typeof __VLS_18) => any;
|
|
24
|
+
} & {
|
|
25
|
+
description?: (props: typeof __VLS_21) => any;
|
|
26
|
+
} & {
|
|
27
|
+
error?: (props: typeof __VLS_24) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<TextareaFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextareaFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { TimePickerProps } from '../components/time-picker/time-picker.vue.js';
|
|
3
|
+
export interface TimeFieldProps extends Omit<TimePickerProps, 'error'> {
|
|
4
|
+
/** Field name used by vee-validate */
|
|
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;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {
|
|
16
|
+
error: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
leftSection?: (props: typeof __VLS_11) => any;
|
|
20
|
+
} & {
|
|
21
|
+
rightSection?: (props: typeof __VLS_14) => any;
|
|
22
|
+
} & {
|
|
23
|
+
label?: (props: typeof __VLS_17) => any;
|
|
24
|
+
} & {
|
|
25
|
+
description?: (props: typeof __VLS_20) => any;
|
|
26
|
+
} & {
|
|
27
|
+
error?: (props: typeof __VLS_23) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<TimeFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TimeFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useField } from "vee-validate";
|
|
3
|
+
import TimePicker from "../components/time-picker/time-picker.vue";
|
|
4
|
+
const {
|
|
5
|
+
name,
|
|
6
|
+
rules,
|
|
7
|
+
validateOn = "change",
|
|
8
|
+
initialValue,
|
|
9
|
+
controlled = true,
|
|
10
|
+
...props
|
|
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
|
+
clearable: { type: Boolean, required: false },
|
|
18
|
+
min: { type: String, required: false },
|
|
19
|
+
max: { type: String, required: false },
|
|
20
|
+
format: { type: String, required: false },
|
|
21
|
+
step: { type: [Number, Object], required: false },
|
|
22
|
+
placeholder: { type: [String, Object], required: false },
|
|
23
|
+
withSeconds: { type: Boolean, required: false },
|
|
24
|
+
hoursInputLabel: { type: String, required: false },
|
|
25
|
+
minutesInputLabel: { type: String, required: false },
|
|
26
|
+
secondsInputLabel: { type: String, required: false },
|
|
27
|
+
amPmInputLabel: { type: String, required: false },
|
|
28
|
+
amPmLabels: { type: Object, required: false },
|
|
29
|
+
pasteSplit: { type: Function, required: false },
|
|
30
|
+
classes: { type: Object, required: false },
|
|
31
|
+
description: { type: String, required: false },
|
|
32
|
+
label: { type: String, required: false },
|
|
33
|
+
required: { type: Boolean, required: false },
|
|
34
|
+
id: { type: [String, null], required: false },
|
|
35
|
+
radius: { type: [String, Number, Object], required: false },
|
|
36
|
+
size: { type: [String, Object], required: false },
|
|
37
|
+
variant: { type: String, required: false },
|
|
38
|
+
multiline: { type: Boolean, required: false },
|
|
39
|
+
resize: { type: void 0, required: false },
|
|
40
|
+
leftSectionPE: { type: void 0, required: false },
|
|
41
|
+
rightSectionPE: { type: void 0, required: false },
|
|
42
|
+
readonly: { type: Boolean, required: false },
|
|
43
|
+
disabled: { type: Boolean, required: false }
|
|
44
|
+
});
|
|
45
|
+
const {
|
|
46
|
+
value,
|
|
47
|
+
errorMessage,
|
|
48
|
+
handleChange
|
|
49
|
+
} = useField(() => name, rules, {
|
|
50
|
+
validateOnValueUpdate: false,
|
|
51
|
+
validateOnMount: false,
|
|
52
|
+
initialValue,
|
|
53
|
+
controlled
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<TimePicker
|
|
59
|
+
v-bind='props'
|
|
60
|
+
:model-value='value'
|
|
61
|
+
:error='errorMessage'
|
|
62
|
+
@update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
|
|
63
|
+
>
|
|
64
|
+
<template v-if='$slots.leftSection' #leftSection>
|
|
65
|
+
<slot name='leftSection' />
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<template v-if='$slots.rightSection' #rightSection>
|
|
69
|
+
<slot name='rightSection' />
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<template v-if='$slots.label' #label>
|
|
73
|
+
<slot name='label' />
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<template v-if='$slots.description' #description>
|
|
77
|
+
<slot name='description' />
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<template v-if='$slots.error' #error>
|
|
81
|
+
<slot name='error' :error='errorMessage' />
|
|
82
|
+
</template>
|
|
83
|
+
</TimePicker>
|
|
84
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { TimePickerProps } from '../components/time-picker/time-picker.vue.js';
|
|
3
|
+
export interface TimeFieldProps extends Omit<TimePickerProps, 'error'> {
|
|
4
|
+
/** Field name used by vee-validate */
|
|
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;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {
|
|
16
|
+
error: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
leftSection?: (props: typeof __VLS_11) => any;
|
|
20
|
+
} & {
|
|
21
|
+
rightSection?: (props: typeof __VLS_14) => any;
|
|
22
|
+
} & {
|
|
23
|
+
label?: (props: typeof __VLS_17) => any;
|
|
24
|
+
} & {
|
|
25
|
+
description?: (props: typeof __VLS_20) => any;
|
|
26
|
+
} & {
|
|
27
|
+
error?: (props: typeof __VLS_23) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<TimeFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TimeFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuance-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "A modern Vue UI library inspired by the best of the React ecosystem.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"@nuxtjs/color-mode": "^4.0.0",
|
|
88
88
|
"@nuxtjs/stylelint-module": "^5.2.1",
|
|
89
89
|
"@types/node": "latest",
|
|
90
|
+
"@vee-validate/nuxt": "^4.15.1",
|
|
90
91
|
"changelogen": "^0.6.2",
|
|
91
92
|
"eslint": "^9.39.2",
|
|
92
93
|
"nuxt": "^4.4.2",
|