nuance-ui 0.2.10 → 0.2.12
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/action-icon/action-icon-section.d.vue.ts +11 -10
- package/dist/runtime/components/action-icon/action-icon-section.vue +17 -20
- package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +11 -10
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +17 -14
- package/dist/runtime/components/action-icon/action-icon.vue +18 -17
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +17 -14
- package/dist/runtime/components/alert.d.vue.ts +8 -6
- package/dist/runtime/components/alert.vue +15 -101
- package/dist/runtime/components/alert.vue.d.ts +8 -6
- package/dist/runtime/components/app-shell/app-shell-aside.vue +2 -28
- package/dist/runtime/components/app-shell/app-shell-footer.vue +2 -27
- package/dist/runtime/components/app-shell/app-shell-header.vue +2 -28
- package/dist/runtime/components/app-shell/app-shell-main.vue +2 -16
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +2 -32
- package/dist/runtime/components/app-shell/app-shell-section.vue +2 -8
- package/dist/runtime/components/app-shell/app-shell.vue +20 -44
- package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
- package/dist/runtime/components/avatar/avatar-group.vue +1 -1
- package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
- package/dist/runtime/components/avatar/avatar.d.vue.ts +9 -5
- package/dist/runtime/components/avatar/avatar.vue +26 -26
- package/dist/runtime/components/avatar/avatar.vue.d.ts +9 -5
- package/dist/runtime/components/background-image.d.vue.ts +2 -2
- package/dist/runtime/components/background-image.vue +3 -19
- package/dist/runtime/components/background-image.vue.d.ts +2 -2
- package/dist/runtime/components/badge.d.vue.ts +9 -8
- package/dist/runtime/components/badge.vue +18 -154
- package/dist/runtime/components/badge.vue.d.ts +9 -8
- package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
- package/dist/runtime/components/breadcrumbs.vue +2 -48
- package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
- package/dist/runtime/components/button/button.d.vue.ts +21 -31
- package/dist/runtime/components/button/button.vue +36 -45
- package/dist/runtime/components/button/button.vue.d.ts +21 -31
- package/dist/runtime/components/button/unstyled-button.vue +2 -21
- package/dist/runtime/components/calendar/calendar.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/calendar.vue +3 -10
- package/dist/runtime/components/calendar/calendar.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +3 -114
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +2 -67
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +3 -25
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +9 -34
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +3 -25
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-card.vue +2 -28
- package/dist/runtime/components/checkbox/checkbox-group.vue +3 -3
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +5 -4
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +15 -123
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +5 -4
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +5 -7
- package/dist/runtime/components/checkbox/checkbox.vue +30 -136
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +5 -7
- package/dist/runtime/components/chip/chip.d.vue.ts +3 -2
- package/dist/runtime/components/chip/chip.vue +29 -212
- package/dist/runtime/components/chip/chip.vue.d.ts +3 -2
- package/dist/runtime/components/combobox/combobox-dropdown.vue +2 -4
- package/dist/runtime/components/container.d.vue.ts +2 -2
- package/dist/runtime/components/container.vue +1 -1
- package/dist/runtime/components/container.vue.d.ts +2 -2
- package/dist/runtime/components/date-time-picker.vue +6 -10
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -7
- package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +11 -9
- package/dist/runtime/components/dialog/ui/dialog-root.vue +5 -5
- package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +11 -9
- package/dist/runtime/components/dialog/ui/dialog-title.vue +2 -2
- package/dist/runtime/components/drawer/drawer-close-button.vue +6 -6
- package/dist/runtime/components/drawer/drawer-root.vue +4 -4
- package/dist/runtime/components/drawer/drawer-title.vue +2 -2
- package/dist/runtime/components/files/file-upload-button.vue +8 -8
- package/dist/runtime/components/files/file-upload-icon.vue +5 -5
- package/dist/runtime/components/input/date-picker.vue +6 -10
- package/dist/runtime/components/input/email-input.vue +4 -4
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +5 -5
- package/dist/runtime/components/input/number-input.vue +7 -85
- package/dist/runtime/components/input/password-input.vue +4 -4
- package/dist/runtime/components/input/text-input.vue +8 -5
- package/dist/runtime/components/input/ui/button-input.vue +6 -25
- package/dist/runtime/components/input/ui/input-base.vue +6 -265
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +2 -2
- package/dist/runtime/components/input/ui/input-inline.vue +3 -82
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +2 -2
- package/dist/runtime/components/input/ui/input-label.d.vue.ts +2 -2
- package/dist/runtime/components/input/ui/input-label.vue +1 -1
- package/dist/runtime/components/input/ui/input-label.vue.d.ts +2 -2
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +5 -1
- package/dist/runtime/components/input/ui/input-wrapper.vue +13 -65
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +5 -1
- package/dist/runtime/components/input/ui/spin-input.vue +2 -53
- package/dist/runtime/components/link/link-button.vue +9 -9
- package/dist/runtime/components/link/link.vue +2 -2
- package/dist/runtime/components/loader/loader.d.vue.ts +7 -7
- package/dist/runtime/components/loader/loader.vue +8 -7
- package/dist/runtime/components/loader/loader.vue.d.ts +7 -7
- package/dist/runtime/components/modal/modal-close-button.vue +6 -6
- package/dist/runtime/components/modal/modal-root.vue +4 -4
- package/dist/runtime/components/modal/modal-title.vue +2 -2
- package/dist/runtime/components/nav-link/nav-icon-link.vue +4 -4
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -5
- package/dist/runtime/components/nav-link/nav-link.vue +30 -113
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -5
- package/dist/runtime/components/paper.vue +2 -31
- package/dist/runtime/components/popover/popover-dropdown.vue +2 -54
- package/dist/runtime/components/progress/progress-root.d.vue.ts +3 -3
- package/dist/runtime/components/progress/progress-root.vue +2 -2
- package/dist/runtime/components/progress/progress-root.vue.d.ts +3 -3
- package/dist/runtime/components/progress/progress-section.d.vue.ts +3 -0
- package/dist/runtime/components/progress/progress-section.vue +8 -6
- package/dist/runtime/components/progress/progress-section.vue.d.ts +3 -0
- package/dist/runtime/components/progress/progress.vue +2 -2
- package/dist/runtime/components/select.vue +6 -10
- package/dist/runtime/components/switch/switch-group.vue +3 -3
- package/dist/runtime/components/switch/switch.d.vue.ts +3 -0
- package/dist/runtime/components/switch/switch.vue +15 -205
- package/dist/runtime/components/switch/switch.vue.d.ts +3 -0
- package/dist/runtime/components/table/types.d.ts +4 -3
- package/dist/runtime/components/table/ui/table-sortable-header.vue +9 -9
- package/dist/runtime/components/table/ui/table.vue +9 -174
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +14 -16
- package/dist/runtime/components/tabs/tabs-root.vue +14 -12
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +14 -16
- package/dist/runtime/components/text.d.vue.ts +10 -9
- package/dist/runtime/components/text.vue +16 -77
- package/dist/runtime/components/text.vue.d.ts +10 -9
- package/dist/runtime/components/textarea.d.vue.ts +5 -3
- package/dist/runtime/components/textarea.vue +31 -18
- package/dist/runtime/components/textarea.vue.d.ts +5 -3
- package/dist/runtime/components/time-picker/time-picker.vue +6 -132
- package/dist/runtime/components/title.vue +4 -8
- package/dist/runtime/components/tree/_ui/tree-item.vue +2 -62
- package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +7 -6
- package/dist/runtime/components/tree/_ui/tree-root.vue +13 -19
- package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +7 -6
- package/dist/runtime/components/tree/tree.vue +5 -5
- package/dist/runtime/composables/index.d.ts +1 -1
- package/dist/runtime/composables/index.js +1 -1
- package/dist/runtime/composables/use-vars-resolver.d.ts +4 -0
- package/dist/runtime/composables/use-vars-resolver.js +6 -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/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/dist/runtime/types/index.d.ts +1 -2
- package/dist/runtime/types/styling.d.ts +3 -1
- package/dist/runtime/types/theme.d.ts +10 -15
- package/dist/runtime/utils/style/create-variant-color-resolver.d.ts +2 -2
- package/package.json +12 -3
- package/dist/runtime/composables/use-style-resolver.d.ts +0 -5
- package/dist/runtime/composables/use-style-resolver.js +0 -5
|
@@ -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
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type * from './styling';
|
|
2
2
|
export type * from './theme';
|
|
3
|
-
/** Map of component part names to user-provided class names. */
|
|
4
|
-
export type Classes<Key extends string, Value = string | string[]> = Partial<Record<Key, Value>>;
|
|
5
3
|
/** Value that may be synchronous or wrapped in a promise. */
|
|
6
4
|
export type MaybePromise<T = unknown> = T | Promise<T>;
|
|
5
|
+
export type AnyString = string & {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type CssVariable = `--${string}`;
|
|
2
2
|
export type TransformVars<V> = {
|
|
3
|
-
[Key in keyof V]: V[Key] extends CssVariable ? Record<V[Key], string | undefined> : never;
|
|
3
|
+
[Key in keyof V]: V[Key] extends CssVariable ? Record<V[Key], string | number | undefined> : never;
|
|
4
4
|
};
|
|
5
|
+
/** Map of component part names to user-provided class names. */
|
|
6
|
+
export type Classes<Key extends string, Value = string | string[]> = Partial<Record<Key, Value>>;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
+
import type { AnyString } from '.';
|
|
1
2
|
/** Standard Nuance size token. */
|
|
2
3
|
export type NuanceSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type NuanceBreakpoint = keyof NuanceBreakpointsValues;
|
|
10
|
-
export type NuanceFontSize = keyof NuanceFontSizesValues;
|
|
11
|
-
export type NuanceRadius = keyof NuanceRadiusValues | number;
|
|
12
|
-
export type NuanceSpacing = keyof NuanceSpacingValues | number;
|
|
13
|
-
export type NuanceShadow = keyof NuanceShadowsValues;
|
|
14
|
-
export type NuanceLineHeight = keyof NuanceLineHeightValues;
|
|
4
|
+
export type NuanceBreakpoint = NuanceSize | 'base';
|
|
5
|
+
export type NuanceFontSize = NuanceSize;
|
|
6
|
+
export type NuanceRadius = NuanceSize | 'full' | number;
|
|
7
|
+
export type NuanceSpacing = NuanceSize | number;
|
|
8
|
+
export type NuanceShadow = NuanceSize;
|
|
9
|
+
export type NuanceLineHeight = NuanceSize;
|
|
15
10
|
/** Numeric shade index within a color palette, from lightest (0) to darkest (9). */
|
|
16
11
|
export type NuanceColorShade = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
17
12
|
type ShadedColor = `dark.${NuanceColorShade}` | `slate.${NuanceColorShade}` | `gray.${NuanceColorShade}` | `red.${NuanceColorShade}` | `pink.${NuanceColorShade}` | `grape.${NuanceColorShade}` | `violet.${NuanceColorShade}` | `indigo.${NuanceColorShade}` | `blue.${NuanceColorShade}` | `cyan.${NuanceColorShade}` | `green.${NuanceColorShade}` | `lime.${NuanceColorShade}` | `yellow.${NuanceColorShade}` | `orange.${NuanceColorShade}` | `teal.${NuanceColorShade}` | `primary.${NuanceColorShade}`;
|
|
@@ -23,11 +18,11 @@ export type NuanceTheme = 'light' | 'dark';
|
|
|
23
18
|
/** Linear gradient definition. */
|
|
24
19
|
export interface NuanceGradient {
|
|
25
20
|
/** Fallback background color rendered behind the gradient. */
|
|
26
|
-
bg?: NuanceColor |
|
|
21
|
+
bg?: NuanceColor | AnyString;
|
|
27
22
|
/** Start color. */
|
|
28
|
-
from: NuanceColor |
|
|
23
|
+
from: NuanceColor | AnyString;
|
|
29
24
|
/** End color. */
|
|
30
|
-
to: NuanceColor |
|
|
25
|
+
to: NuanceColor | AnyString;
|
|
31
26
|
/** Gradient angle in degrees. */
|
|
32
27
|
deg?: number;
|
|
33
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NuanceColor, NuanceGradient, NuanceTheme } from '@nui/types';
|
|
1
|
+
import type { AnyString, NuanceColor, NuanceGradient, NuanceTheme } from '@nui/types';
|
|
2
2
|
interface VariantColorResolverResult {
|
|
3
3
|
/** Base background CSS value. */
|
|
4
4
|
background: string;
|
|
@@ -18,7 +18,7 @@ interface VariantColorResolverResult {
|
|
|
18
18
|
* default `--color-*` tokens when no explicit shade is provided.
|
|
19
19
|
*/
|
|
20
20
|
export declare function createVariantColorResolver({ color, variant, gradient, theme, }: {
|
|
21
|
-
color: NuanceColor |
|
|
21
|
+
color: NuanceColor | AnyString | undefined;
|
|
22
22
|
variant: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline' | 'dot';
|
|
23
23
|
gradient?: NuanceGradient;
|
|
24
24
|
theme: NuanceTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuance-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "A modern Vue UI library inspired by the best of the React ecosystem.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
47
47
|
"dev:build": "nuxi build playground",
|
|
48
48
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
49
|
-
"release": "npm
|
|
49
|
+
"release": "npm publish && git push --follow-tags",
|
|
50
50
|
"lint": "eslint ./src",
|
|
51
51
|
"test": "vitest run",
|
|
52
52
|
"test:watch": "vitest watch",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@antfu/eslint-config": "^
|
|
80
|
+
"@antfu/eslint-config": "^8.2.0",
|
|
81
81
|
"@nuxt/devtools": "^3.1.1",
|
|
82
82
|
"@nuxt/eslint": "1.10.0",
|
|
83
83
|
"@nuxt/eslint-config": "^1.13.0",
|
|
@@ -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",
|
|
@@ -102,6 +103,14 @@
|
|
|
102
103
|
"vitest": "^4.0.18",
|
|
103
104
|
"vue-tsc": "^3.2.4"
|
|
104
105
|
},
|
|
106
|
+
"pnpm": {
|
|
107
|
+
"onlyBuiltDependencies": [
|
|
108
|
+
"@parcel/watcher",
|
|
109
|
+
"esbuild",
|
|
110
|
+
"unrs-resolver",
|
|
111
|
+
"vue-demi"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
105
114
|
"keywords": [
|
|
106
115
|
"nuance-ui",
|
|
107
116
|
"nuxt",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { NuanceTheme, TransformVars } from '@nui/types';
|
|
2
|
-
/**
|
|
3
|
-
* Builds a style object from a factory that receives the current theme.
|
|
4
|
-
*/
|
|
5
|
-
export declare function useStyleResolver<T extends object>(factory: (theme: NuanceTheme) => TransformVars<T>): TransformVars<T>;
|