@maltjoy/core-vue 1.0.0-alpha.5 → 1.0.0-alpha.7
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/components/JoyButton/JoyButton.vue.d.ts +3 -3
- package/dist/components/JoyCheckbox/JoyCheckbox.vue.d.ts +38 -37
- package/dist/components/JoyCounter/JoyCounter.vue.d.ts +211 -0
- package/dist/components/JoyFormError/JoyFormError.vue.d.ts +4 -0
- package/dist/components/JoyHighlight/JoyHighlight.types.d.ts +1 -1
- package/dist/components/JoyHighlight/JoyHighlight.vue.d.ts +3 -3
- package/dist/components/JoyInput/JoyInput.vue.d.ts +59 -43
- package/dist/components/JoyMultiCheckbox/JoyMultiCheckbox.vue.d.ts +84 -0
- package/dist/components/JoyRadio/JoyRadio.vue.d.ts +15 -15
- package/dist/components/JoySelect/JoySelect.vue.d.ts +23 -22
- package/dist/components/JoySelectableItem/JoySelectableItem.types.d.ts +2 -0
- package/dist/components/JoySelectableItem/JoySelectableItem.vue.d.ts +80 -0
- package/dist/components/JoySelectableItemGroup/JoySelectableItemGroup.vue.d.ts +93 -0
- package/dist/components/JoyTextarea/JoyTextarea.vue.d.ts +43 -42
- package/dist/components/JoyToggle/JoyToggle.vue.d.ts +13 -13
- package/dist/components/JoyWrapper/JoyWrapper.vue.d.ts +9 -9
- package/dist/components/index.d.ts +5 -1
- package/dist/composables/props.d.ts +5 -0
- package/dist/joy-vue.js +1056 -459
- package/dist/joy-vue.umd.cjs +1 -1
- package/dist/stories/fixtures/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/tests/composables/test-components/CheckboxFormProps.vue.d.ts +2 -2
- package/dist/tests/composables/test-components/GenericFormProps.vue.d.ts +1 -1
- package/dist/tests/composables/test-components/GenericFormPropsWithLabel.vue.d.ts +1 -1
- package/joy-components.d.ts +6 -1
- package/package.json +19 -16
- package/dist/components/JoyButton/tests/JoyButton.spec.d.ts +0 -1
- package/dist/components/JoyCheckbox/tests/JoyCheckbox.spec.d.ts +0 -1
- package/dist/components/JoyFormError/tests/JoyFormError.spec.d.ts +0 -1
- package/dist/components/JoyHighlight/tests/JoyHighlight.spec.d.ts +0 -1
- package/dist/components/JoyLabel/tests/JoyLabel.spec.d.ts +0 -1
- package/dist/components/JoyRadio/tests/JoyRadio.spec.d.ts +0 -1
- package/dist/components/JoySelect/tests/JoySelect.spec.d.ts +0 -1
- package/dist/components/JoyToggle/tests/JoyToggle.spec.d.ts +0 -1
- package/dist/tests/composables/prop.spec.d.ts +0 -1
- package/dist/tests/helpers.spec.d.ts +0 -1
|
@@ -18,7 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
18
18
|
};
|
|
19
19
|
/** Button or Link color variant */
|
|
20
20
|
variant: {
|
|
21
|
-
type: PropType<"main" | "
|
|
21
|
+
type: PropType<"main" | "primary" | "secondary" | "admin" | "ghost">;
|
|
22
22
|
default: string;
|
|
23
23
|
validator(variant: ButtonVariants): boolean;
|
|
24
24
|
};
|
|
@@ -52,7 +52,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
52
52
|
};
|
|
53
53
|
/** Button or Link color variant */
|
|
54
54
|
variant: {
|
|
55
|
-
type: PropType<"main" | "
|
|
55
|
+
type: PropType<"main" | "primary" | "secondary" | "admin" | "ghost">;
|
|
56
56
|
default: string;
|
|
57
57
|
validator(variant: ButtonVariants): boolean;
|
|
58
58
|
};
|
|
@@ -71,7 +71,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
71
71
|
}>>, {
|
|
72
72
|
circle: boolean;
|
|
73
73
|
loading: boolean;
|
|
74
|
-
variant: "main" | "
|
|
74
|
+
variant: "main" | "primary" | "secondary" | "admin" | "ghost";
|
|
75
75
|
size: ButtonSizes;
|
|
76
76
|
iconSize: "small" | "xsmall" | "xxsmall";
|
|
77
77
|
}>, {
|
|
@@ -1,51 +1,30 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
default: boolean;
|
|
5
|
-
};
|
|
6
|
-
id: {
|
|
7
|
-
type: StringConstructor;
|
|
8
|
-
}; /** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
|
|
9
|
-
invalid: {
|
|
2
|
+
/** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
|
|
3
|
+
indeterminate: {
|
|
10
4
|
type: BooleanConstructor;
|
|
11
5
|
default: boolean;
|
|
12
6
|
};
|
|
13
|
-
|
|
7
|
+
/** Use it to replace the default slot */
|
|
8
|
+
label: {
|
|
14
9
|
type: StringConstructor;
|
|
15
10
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
default: boolean;
|
|
19
|
-
};
|
|
20
|
-
modelValue: {
|
|
11
|
+
/** Checked state of the component */
|
|
12
|
+
checked: {
|
|
21
13
|
type: BooleanConstructor;
|
|
22
14
|
default: boolean;
|
|
23
15
|
};
|
|
16
|
+
/** The value is used in multiselection context in order to build array of values. */
|
|
24
17
|
value: {
|
|
25
18
|
type: StringConstructor;
|
|
26
19
|
default: string;
|
|
27
20
|
};
|
|
28
|
-
/**
|
|
29
|
-
indeterminate: {
|
|
30
|
-
type: BooleanConstructor;
|
|
31
|
-
default: boolean;
|
|
32
|
-
};
|
|
33
|
-
label: {
|
|
34
|
-
type: StringConstructor;
|
|
35
|
-
};
|
|
36
|
-
}, {
|
|
37
|
-
isIndeterminate: import("vue").Ref<boolean>;
|
|
38
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
/** Removes any interactivity if disabled */
|
|
39
22
|
disabled: {
|
|
40
23
|
type: BooleanConstructor;
|
|
41
24
|
default: boolean;
|
|
42
25
|
};
|
|
43
26
|
id: {
|
|
44
27
|
type: StringConstructor;
|
|
45
|
-
}; /** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
|
|
46
|
-
invalid: {
|
|
47
|
-
type: BooleanConstructor;
|
|
48
|
-
default: boolean;
|
|
49
28
|
};
|
|
50
29
|
name: {
|
|
51
30
|
type: StringConstructor;
|
|
@@ -54,31 +33,53 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
54
33
|
type: BooleanConstructor;
|
|
55
34
|
default: boolean;
|
|
56
35
|
};
|
|
57
|
-
|
|
36
|
+
}, {
|
|
37
|
+
isIndeterminate: import("vue").Ref<boolean>;
|
|
38
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
"update:checked": (value: boolean) => void;
|
|
40
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
/** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
|
|
42
|
+
indeterminate: {
|
|
58
43
|
type: BooleanConstructor;
|
|
59
44
|
default: boolean;
|
|
60
45
|
};
|
|
46
|
+
/** Use it to replace the default slot */
|
|
47
|
+
label: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
};
|
|
50
|
+
/** Checked state of the component */
|
|
51
|
+
checked: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
/** The value is used in multiselection context in order to build array of values. */
|
|
61
56
|
value: {
|
|
62
57
|
type: StringConstructor;
|
|
63
58
|
default: string;
|
|
64
59
|
};
|
|
65
|
-
/**
|
|
66
|
-
|
|
60
|
+
/** Removes any interactivity if disabled */
|
|
61
|
+
disabled: {
|
|
67
62
|
type: BooleanConstructor;
|
|
68
63
|
default: boolean;
|
|
69
64
|
};
|
|
70
|
-
|
|
65
|
+
id: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
};
|
|
68
|
+
name: {
|
|
71
69
|
type: StringConstructor;
|
|
72
70
|
};
|
|
71
|
+
required: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
73
75
|
}>> & {
|
|
74
|
-
"onUpdate:
|
|
76
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
75
77
|
}, {
|
|
76
78
|
disabled: boolean;
|
|
77
79
|
indeterminate: boolean;
|
|
78
|
-
|
|
79
|
-
required: boolean;
|
|
80
|
-
modelValue: boolean;
|
|
80
|
+
checked: boolean;
|
|
81
81
|
value: string;
|
|
82
|
+
required: boolean;
|
|
82
83
|
}>, {
|
|
83
84
|
default: (_: {}) => any;
|
|
84
85
|
'checkbox-content': (_: {}) => any;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
+
/** Removes any interactivity */
|
|
4
|
+
disabled: {
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
default: boolean;
|
|
7
|
+
};
|
|
8
|
+
id: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
invalid: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
name: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
required: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
/** Display a label on top of the element. */
|
|
23
|
+
label: StringConstructor;
|
|
24
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
25
|
+
labelSize: {
|
|
26
|
+
type: PropType<"small" | "large" | "medium">;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
30
|
+
optionalLabel: StringConstructor;
|
|
31
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
32
|
+
requiredMark: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
/** Used for aria-label. */
|
|
37
|
+
labelDecrement: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
/** Used for aria-label. */
|
|
41
|
+
labelIncrement: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
max: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
};
|
|
47
|
+
min: {
|
|
48
|
+
type: NumberConstructor;
|
|
49
|
+
default: number;
|
|
50
|
+
};
|
|
51
|
+
modelValue: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
/** In order to increment or decrement by given steps. For non-integer values, don't use comma */
|
|
56
|
+
step: {
|
|
57
|
+
type: NumberConstructor;
|
|
58
|
+
default: number;
|
|
59
|
+
};
|
|
60
|
+
/** When given, it renders a JoyFormError element */
|
|
61
|
+
errorMessage: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
props: Readonly<import("vue").ExtractPropTypes<{
|
|
66
|
+
/** Removes any interactivity */
|
|
67
|
+
disabled: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
id: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
};
|
|
74
|
+
invalid: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
name: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
};
|
|
81
|
+
required: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
/** Display a label on top of the element. */
|
|
86
|
+
label: StringConstructor;
|
|
87
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
88
|
+
labelSize: {
|
|
89
|
+
type: PropType<"small" | "large" | "medium">;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
93
|
+
optionalLabel: StringConstructor;
|
|
94
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
95
|
+
requiredMark: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: boolean;
|
|
98
|
+
};
|
|
99
|
+
/** Used for aria-label. */
|
|
100
|
+
labelDecrement: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
};
|
|
103
|
+
/** Used for aria-label. */
|
|
104
|
+
labelIncrement: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
};
|
|
107
|
+
max: {
|
|
108
|
+
type: NumberConstructor;
|
|
109
|
+
};
|
|
110
|
+
min: {
|
|
111
|
+
type: NumberConstructor;
|
|
112
|
+
default: number;
|
|
113
|
+
};
|
|
114
|
+
modelValue: {
|
|
115
|
+
type: NumberConstructor;
|
|
116
|
+
default: number;
|
|
117
|
+
};
|
|
118
|
+
/** In order to increment or decrement by given steps. For non-integer values, don't use comma */
|
|
119
|
+
step: {
|
|
120
|
+
type: NumberConstructor;
|
|
121
|
+
default: number;
|
|
122
|
+
};
|
|
123
|
+
/** When given, it renders a JoyFormError element */
|
|
124
|
+
errorMessage: {
|
|
125
|
+
type: StringConstructor;
|
|
126
|
+
};
|
|
127
|
+
}>>;
|
|
128
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
129
|
+
"update:modelValue": (value: number) => void;
|
|
130
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
131
|
+
/** Removes any interactivity */
|
|
132
|
+
disabled: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
id: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
};
|
|
139
|
+
invalid: {
|
|
140
|
+
type: BooleanConstructor;
|
|
141
|
+
default: boolean;
|
|
142
|
+
};
|
|
143
|
+
name: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
};
|
|
146
|
+
required: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
150
|
+
/** Display a label on top of the element. */
|
|
151
|
+
label: StringConstructor;
|
|
152
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
153
|
+
labelSize: {
|
|
154
|
+
type: PropType<"small" | "large" | "medium">;
|
|
155
|
+
default: string;
|
|
156
|
+
};
|
|
157
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
158
|
+
optionalLabel: StringConstructor;
|
|
159
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
160
|
+
requiredMark: {
|
|
161
|
+
type: BooleanConstructor;
|
|
162
|
+
default: boolean;
|
|
163
|
+
};
|
|
164
|
+
/** Used for aria-label. */
|
|
165
|
+
labelDecrement: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
};
|
|
168
|
+
/** Used for aria-label. */
|
|
169
|
+
labelIncrement: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
};
|
|
172
|
+
max: {
|
|
173
|
+
type: NumberConstructor;
|
|
174
|
+
};
|
|
175
|
+
min: {
|
|
176
|
+
type: NumberConstructor;
|
|
177
|
+
default: number;
|
|
178
|
+
};
|
|
179
|
+
modelValue: {
|
|
180
|
+
type: NumberConstructor;
|
|
181
|
+
default: number;
|
|
182
|
+
};
|
|
183
|
+
/** In order to increment or decrement by given steps. For non-integer values, don't use comma */
|
|
184
|
+
step: {
|
|
185
|
+
type: NumberConstructor;
|
|
186
|
+
default: number;
|
|
187
|
+
};
|
|
188
|
+
/** When given, it renders a JoyFormError element */
|
|
189
|
+
errorMessage: {
|
|
190
|
+
type: StringConstructor;
|
|
191
|
+
};
|
|
192
|
+
}>> & {
|
|
193
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
194
|
+
}, {
|
|
195
|
+
disabled: boolean;
|
|
196
|
+
required: boolean;
|
|
197
|
+
invalid: boolean;
|
|
198
|
+
labelSize: "small" | "large" | "medium";
|
|
199
|
+
requiredMark: boolean;
|
|
200
|
+
min: number;
|
|
201
|
+
modelValue: number;
|
|
202
|
+
step: number;
|
|
203
|
+
}>, {
|
|
204
|
+
default: (_: {}) => any;
|
|
205
|
+
}>;
|
|
206
|
+
export default _default;
|
|
207
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
208
|
+
new (): {
|
|
209
|
+
$slots: S;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
/** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
|
|
2
3
|
visible: {
|
|
3
4
|
type: BooleanConstructor;
|
|
4
5
|
default: boolean;
|
|
5
6
|
};
|
|
7
|
+
/** Error message to display. If you need a list of errors, use the slot instead */
|
|
6
8
|
noHtmlErrorText: StringConstructor;
|
|
7
9
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
/** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
|
|
8
11
|
visible: {
|
|
9
12
|
type: BooleanConstructor;
|
|
10
13
|
default: boolean;
|
|
11
14
|
};
|
|
15
|
+
/** Error message to display. If you need a list of errors, use the slot instead */
|
|
12
16
|
noHtmlErrorText: StringConstructor;
|
|
13
17
|
}>>, {
|
|
14
18
|
visible: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LEVELS } from '@/types';
|
|
2
2
|
export type HighlightLevels = (typeof LEVELS)[number];
|
|
3
|
-
export declare const HIGHLIGHT_LEVELS: ("
|
|
3
|
+
export declare const HIGHLIGHT_LEVELS: ("neutral" | "success" | "info" | "warning" | "error")[];
|
|
@@ -11,7 +11,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
icon: StringConstructor;
|
|
13
13
|
level: {
|
|
14
|
-
type: PropType<"
|
|
14
|
+
type: PropType<"neutral" | "success" | "info" | "warning" | "error">;
|
|
15
15
|
default: string;
|
|
16
16
|
validator(level: HighlightLevels): boolean;
|
|
17
17
|
};
|
|
@@ -28,14 +28,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
28
28
|
};
|
|
29
29
|
icon: StringConstructor;
|
|
30
30
|
level: {
|
|
31
|
-
type: PropType<"
|
|
31
|
+
type: PropType<"neutral" | "success" | "info" | "warning" | "error">;
|
|
32
32
|
default: string;
|
|
33
33
|
validator(level: HighlightLevels): boolean;
|
|
34
34
|
};
|
|
35
35
|
}>>, {
|
|
36
36
|
accent: boolean;
|
|
37
37
|
displayIcon: boolean;
|
|
38
|
-
level: "
|
|
38
|
+
level: "neutral" | "success" | "info" | "warning" | "error";
|
|
39
39
|
}>, {
|
|
40
40
|
'highlight-title': (_: {}) => any;
|
|
41
41
|
default: (_: {}) => any;
|
|
@@ -1,32 +1,60 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { InputSizes } from './JoyInput.types';
|
|
3
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
|
-
|
|
4
|
+
disabled: {
|
|
5
5
|
type: BooleanConstructor;
|
|
6
6
|
default: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type: PropType<InputSizes>;
|
|
11
|
-
default: string;
|
|
12
|
-
validator(size: InputSizes): boolean;
|
|
8
|
+
id: {
|
|
9
|
+
type: StringConstructor;
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
invalid: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
name: {
|
|
17
16
|
type: StringConstructor;
|
|
18
|
-
default: string;
|
|
19
17
|
};
|
|
18
|
+
required: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
/** Display a label on top of the element. */
|
|
20
23
|
label: StringConstructor;
|
|
24
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
21
25
|
labelSize: {
|
|
22
26
|
type: PropType<"small" | "large" | "medium">;
|
|
23
27
|
default: string;
|
|
24
28
|
};
|
|
29
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
25
30
|
optionalLabel: StringConstructor;
|
|
31
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
26
32
|
requiredMark: {
|
|
27
33
|
type: BooleanConstructor;
|
|
28
34
|
default: boolean;
|
|
29
35
|
};
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
/** Display a cross icon on the right that enables to clear the field */
|
|
41
|
+
clearable: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
46
|
+
icon: StringConstructor;
|
|
47
|
+
size: {
|
|
48
|
+
type: PropType<InputSizes>;
|
|
49
|
+
default: string;
|
|
50
|
+
validator(size: InputSizes): boolean;
|
|
51
|
+
};
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
54
|
+
unit: StringConstructor;
|
|
55
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
+
"update:modelValue": (value: string) => void;
|
|
57
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
58
|
disabled: {
|
|
31
59
|
type: BooleanConstructor;
|
|
32
60
|
default: boolean;
|
|
@@ -45,62 +73,50 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
45
73
|
type: BooleanConstructor;
|
|
46
74
|
default: boolean;
|
|
47
75
|
};
|
|
48
|
-
|
|
49
|
-
clearable: {
|
|
50
|
-
type: BooleanConstructor;
|
|
51
|
-
default: boolean;
|
|
52
|
-
};
|
|
53
|
-
icon: StringConstructor;
|
|
54
|
-
size: {
|
|
55
|
-
type: PropType<InputSizes>;
|
|
56
|
-
default: string;
|
|
57
|
-
validator(size: InputSizes): boolean;
|
|
58
|
-
};
|
|
59
|
-
type: StringConstructor;
|
|
60
|
-
unit: StringConstructor;
|
|
61
|
-
modelValue: {
|
|
62
|
-
type: StringConstructor;
|
|
63
|
-
default: string;
|
|
64
|
-
};
|
|
76
|
+
/** Display a label on top of the element. */
|
|
65
77
|
label: StringConstructor;
|
|
78
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
66
79
|
labelSize: {
|
|
67
80
|
type: PropType<"small" | "large" | "medium">;
|
|
68
81
|
default: string;
|
|
69
82
|
};
|
|
83
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
70
84
|
optionalLabel: StringConstructor;
|
|
85
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
71
86
|
requiredMark: {
|
|
72
87
|
type: BooleanConstructor;
|
|
73
88
|
default: boolean;
|
|
74
89
|
};
|
|
75
|
-
|
|
76
|
-
type: BooleanConstructor;
|
|
77
|
-
default: boolean;
|
|
78
|
-
};
|
|
79
|
-
id: {
|
|
90
|
+
modelValue: {
|
|
80
91
|
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
81
93
|
};
|
|
82
|
-
|
|
94
|
+
/** Display a cross icon on the right that enables to clear the field */
|
|
95
|
+
clearable: {
|
|
83
96
|
type: BooleanConstructor;
|
|
84
97
|
default: boolean;
|
|
85
98
|
};
|
|
86
|
-
name
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
100
|
+
icon: StringConstructor;
|
|
101
|
+
size: {
|
|
102
|
+
type: PropType<InputSizes>;
|
|
103
|
+
default: string;
|
|
104
|
+
validator(size: InputSizes): boolean;
|
|
92
105
|
};
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
108
|
+
unit: StringConstructor;
|
|
93
109
|
}>> & {
|
|
94
|
-
"onUpdate:modelValue"?: ((
|
|
110
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
95
111
|
}, {
|
|
96
112
|
size: InputSizes;
|
|
97
113
|
disabled: boolean;
|
|
98
|
-
invalid: boolean;
|
|
99
114
|
required: boolean;
|
|
100
|
-
|
|
101
|
-
clearable: boolean;
|
|
115
|
+
invalid: boolean;
|
|
102
116
|
labelSize: "small" | "large" | "medium";
|
|
103
117
|
requiredMark: boolean;
|
|
118
|
+
modelValue: string;
|
|
119
|
+
clearable: boolean;
|
|
104
120
|
}>, {
|
|
105
121
|
default: (_: {}) => any;
|
|
106
122
|
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export interface Option {
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
subLabel?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
required?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("vue").DefineComponent<{
|
|
18
|
+
options: {
|
|
19
|
+
type: PropType<Option[]>;
|
|
20
|
+
required: true;
|
|
21
|
+
validator(value: Array<Option>): boolean;
|
|
22
|
+
};
|
|
23
|
+
id: StringConstructor;
|
|
24
|
+
value: {
|
|
25
|
+
type: PropType<any[]>;
|
|
26
|
+
default(): never[];
|
|
27
|
+
};
|
|
28
|
+
fullWidth: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
required: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
label: StringConstructor;
|
|
37
|
+
labelSize: {
|
|
38
|
+
type: PropType<"small" | "large" | "medium">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
optionalLabel: StringConstructor;
|
|
42
|
+
requiredMark: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
options: {
|
|
48
|
+
type: PropType<Option[]>;
|
|
49
|
+
required: true;
|
|
50
|
+
validator(value: Array<Option>): boolean;
|
|
51
|
+
};
|
|
52
|
+
id: StringConstructor;
|
|
53
|
+
value: {
|
|
54
|
+
type: PropType<any[]>;
|
|
55
|
+
default(): never[];
|
|
56
|
+
};
|
|
57
|
+
fullWidth: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
required: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
label: StringConstructor;
|
|
66
|
+
labelSize: {
|
|
67
|
+
type: PropType<"small" | "large" | "medium">;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
optionalLabel: StringConstructor;
|
|
71
|
+
requiredMark: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
}>> & {
|
|
76
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
value: any[];
|
|
79
|
+
required: boolean;
|
|
80
|
+
labelSize: "small" | "large" | "medium";
|
|
81
|
+
requiredMark: boolean;
|
|
82
|
+
fullWidth: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
export default _default;
|