@maltjoy/core-vue 5.3.2 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,32 @@
|
|
|
1
1
|
import { TSizes } from '../../types';
|
|
2
|
+
import { TJoyIconsNames } from '../JoyIcon/JoyIcon.types';
|
|
3
|
+
import { TJoyLabelSizes } from '../JoyLabel/JoyLabel.types';
|
|
2
4
|
export type TJoyInputSizes = Extract<TSizes, 'small' | 'medium' | 'large'>;
|
|
5
|
+
export interface VJoyInputProps {
|
|
6
|
+
autofocus?: boolean;
|
|
7
|
+
modelValue?: string | number | null;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
id?: string;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
name: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
/** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
16
|
+
labelSize?: TJoyLabelSizes;
|
|
17
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
18
|
+
optionalLabel?: string;
|
|
19
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
20
|
+
requiredMark?: boolean;
|
|
21
|
+
modelModifiers?: Partial<Record<'number' | 'trim' | 'lazy', boolean>>;
|
|
22
|
+
/** Display a cross icon on the right that enables to clear the field */
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
25
|
+
icon?: TJoyIconsNames;
|
|
26
|
+
size?: TJoyInputSizes;
|
|
27
|
+
type?: string;
|
|
28
|
+
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
29
|
+
unit?: string;
|
|
30
|
+
/** Activates the readonly mode for the input */
|
|
31
|
+
readonly?: boolean;
|
|
32
|
+
}
|
|
@@ -1,168 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TJoyInputSizes } from './JoyInput.types';
|
|
3
|
-
import { TJoyLabelSizes } from '../JoyLabel/JoyLabel.types';
|
|
1
|
+
import { VJoyInputProps } from './JoyInput.types';
|
|
4
2
|
declare function focus(): void;
|
|
5
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<
|
|
6
|
-
autofocus: {
|
|
7
|
-
type: BooleanConstructor;
|
|
8
|
-
default: boolean;
|
|
9
|
-
};
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: PropType<string | number | null>;
|
|
12
|
-
};
|
|
13
|
-
disabled: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
id: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
};
|
|
20
|
-
invalid: {
|
|
21
|
-
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
23
|
-
};
|
|
24
|
-
name: {
|
|
25
|
-
type: StringConstructor;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
required: {
|
|
29
|
-
type: BooleanConstructor;
|
|
30
|
-
default: boolean;
|
|
31
|
-
};
|
|
32
|
-
/** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
|
|
33
|
-
label: StringConstructor;
|
|
34
|
-
/** Overrides the default label size. See JoyLabel stories */
|
|
35
|
-
labelSize: {
|
|
36
|
-
type: PropType<TJoyLabelSizes>;
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
|
-
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
40
|
-
optionalLabel: StringConstructor;
|
|
41
|
-
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
42
|
-
requiredMark: {
|
|
43
|
-
type: BooleanConstructor;
|
|
44
|
-
default: boolean;
|
|
45
|
-
};
|
|
46
|
-
modelModifiers: {
|
|
47
|
-
type: PropType<Partial<Record<"number" | "trim" | "lazy", boolean>>>;
|
|
48
|
-
default: () => {
|
|
49
|
-
lazy: boolean;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
/** Display a cross icon on the right that enables to clear the field */
|
|
53
|
-
clearable: {
|
|
54
|
-
type: BooleanConstructor;
|
|
55
|
-
default: boolean;
|
|
56
|
-
};
|
|
57
|
-
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
58
|
-
icon: {
|
|
59
|
-
type: PropType<import("@maltjoy/icons").JoyIconsId>;
|
|
60
|
-
};
|
|
61
|
-
size: {
|
|
62
|
-
type: PropType<TJoyInputSizes>;
|
|
63
|
-
default: string;
|
|
64
|
-
};
|
|
65
|
-
type: {
|
|
66
|
-
type: StringConstructor;
|
|
67
|
-
default: string;
|
|
68
|
-
};
|
|
69
|
-
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
70
|
-
unit: StringConstructor;
|
|
71
|
-
/** Activates the readonly mode for the input */
|
|
72
|
-
readonly: {
|
|
73
|
-
type: BooleanConstructor;
|
|
74
|
-
default: boolean;
|
|
75
|
-
};
|
|
76
|
-
}>, {
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJoyInputProps, {
|
|
77
4
|
focus: typeof focus;
|
|
78
5
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
79
6
|
"update:modelValue": (value: string) => any;
|
|
80
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
81
|
-
autofocus: {
|
|
82
|
-
type: BooleanConstructor;
|
|
83
|
-
default: boolean;
|
|
84
|
-
};
|
|
85
|
-
modelValue: {
|
|
86
|
-
type: PropType<string | number | null>;
|
|
87
|
-
};
|
|
88
|
-
disabled: {
|
|
89
|
-
type: BooleanConstructor;
|
|
90
|
-
default: boolean;
|
|
91
|
-
};
|
|
92
|
-
id: {
|
|
93
|
-
type: StringConstructor;
|
|
94
|
-
};
|
|
95
|
-
invalid: {
|
|
96
|
-
type: BooleanConstructor;
|
|
97
|
-
default: boolean;
|
|
98
|
-
};
|
|
99
|
-
name: {
|
|
100
|
-
type: StringConstructor;
|
|
101
|
-
required: true;
|
|
102
|
-
};
|
|
103
|
-
required: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
107
|
-
/** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
|
|
108
|
-
label: StringConstructor;
|
|
109
|
-
/** Overrides the default label size. See JoyLabel stories */
|
|
110
|
-
labelSize: {
|
|
111
|
-
type: PropType<TJoyLabelSizes>;
|
|
112
|
-
default: string;
|
|
113
|
-
};
|
|
114
|
-
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
115
|
-
optionalLabel: StringConstructor;
|
|
116
|
-
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
117
|
-
requiredMark: {
|
|
118
|
-
type: BooleanConstructor;
|
|
119
|
-
default: boolean;
|
|
120
|
-
};
|
|
121
|
-
modelModifiers: {
|
|
122
|
-
type: PropType<Partial<Record<"number" | "trim" | "lazy", boolean>>>;
|
|
123
|
-
default: () => {
|
|
124
|
-
lazy: boolean;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
/** Display a cross icon on the right that enables to clear the field */
|
|
128
|
-
clearable: {
|
|
129
|
-
type: BooleanConstructor;
|
|
130
|
-
default: boolean;
|
|
131
|
-
};
|
|
132
|
-
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
133
|
-
icon: {
|
|
134
|
-
type: PropType<import("@maltjoy/icons").JoyIconsId>;
|
|
135
|
-
};
|
|
136
|
-
size: {
|
|
137
|
-
type: PropType<TJoyInputSizes>;
|
|
138
|
-
default: string;
|
|
139
|
-
};
|
|
140
|
-
type: {
|
|
141
|
-
type: StringConstructor;
|
|
142
|
-
default: string;
|
|
143
|
-
};
|
|
144
|
-
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
145
|
-
unit: StringConstructor;
|
|
146
|
-
/** Activates the readonly mode for the input */
|
|
147
|
-
readonly: {
|
|
148
|
-
type: BooleanConstructor;
|
|
149
|
-
default: boolean;
|
|
150
|
-
};
|
|
151
|
-
}>> & Readonly<{
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<VJoyInputProps> & Readonly<{
|
|
152
8
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
153
9
|
}>, {
|
|
154
10
|
invalid: boolean;
|
|
155
11
|
type: string;
|
|
156
|
-
size: TJoyInputSizes;
|
|
12
|
+
size: import("./JoyInput.types").TJoyInputSizes;
|
|
157
13
|
required: boolean;
|
|
158
14
|
disabled: boolean;
|
|
159
15
|
autofocus: boolean;
|
|
160
|
-
labelSize: TJoyLabelSizes;
|
|
16
|
+
labelSize: import("../components.types.js").TJoyLabelSizes;
|
|
161
17
|
requiredMark: boolean;
|
|
162
18
|
modelModifiers: Partial<Record<"number" | "trim" | "lazy", boolean>>;
|
|
163
19
|
clearable: boolean;
|
|
164
20
|
readonly: boolean;
|
|
165
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
166
22
|
/** DEPRECATED. Default slot to display a label on top of the element. You can use label property as well */
|
|
167
23
|
default?: (() => any) | undefined;
|
|
168
24
|
}> & {
|