@maltjoy/core-vue 1.0.0-alpha.6 → 1.0.0-alpha.8
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/README.md +1 -1
- package/dist/components/JoyButton/JoyButton.vue.d.ts +3 -3
- package/dist/components/JoyCheckbox/JoyCheckbox.vue.d.ts +15 -14
- package/dist/components/JoyCounter/JoyCounter.vue.d.ts +36 -7
- 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 +22 -4
- package/dist/components/JoyMultiCheckbox/JoyMultiCheckbox.vue.d.ts +86 -0
- package/dist/components/JoyPanel/JoyPanel.types.d.ts +3 -0
- package/dist/components/JoyPanel/JoyPanel.vue.d.ts +43 -0
- package/dist/components/JoyPanelSection/JoyPanelSection.vue.d.ts +10 -0
- package/dist/components/JoyRadio/JoyRadio.vue.d.ts +7 -3
- package/dist/components/JoySelect/JoySelect.vue.d.ts +6 -4
- package/dist/components/JoySelectableItem/JoySelectableItem.types.d.ts +2 -0
- package/dist/components/JoySelectableItem/JoySelectableItem.vue.d.ts +84 -0
- package/dist/components/JoySelectableItemGroup/JoySelectableItemGroup.vue.d.ts +95 -0
- package/dist/components/JoyTextarea/JoyTextarea.vue.d.ts +6 -4
- package/dist/components/JoyToggle/JoyToggle.vue.d.ts +2 -2
- package/dist/components/JoyWrapper/JoyWrapper.vue.d.ts +9 -9
- package/dist/components/index.d.ts +6 -1
- package/dist/joy-vue.js +827 -413
- 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 +17 -15
- 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
package/README.md
CHANGED
|
@@ -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
|
}>, {
|
|
@@ -4,17 +4,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
4
4
|
type: BooleanConstructor;
|
|
5
5
|
default: boolean;
|
|
6
6
|
};
|
|
7
|
+
/** Use it to replace the default slot */
|
|
7
8
|
label: {
|
|
8
9
|
type: StringConstructor;
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
/** Checked state of the component */
|
|
12
|
+
checked: {
|
|
11
13
|
type: BooleanConstructor;
|
|
12
14
|
default: boolean;
|
|
13
15
|
};
|
|
16
|
+
/** The value is used in multiselection context in order to build array of values. */
|
|
14
17
|
value: {
|
|
15
18
|
type: StringConstructor;
|
|
16
19
|
default: string;
|
|
17
20
|
};
|
|
21
|
+
/** Removes any interactivity if disabled */
|
|
18
22
|
disabled: {
|
|
19
23
|
type: BooleanConstructor;
|
|
20
24
|
default: boolean;
|
|
@@ -22,10 +26,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
22
26
|
id: {
|
|
23
27
|
type: StringConstructor;
|
|
24
28
|
};
|
|
25
|
-
invalid: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
29
|
name: {
|
|
30
30
|
type: StringConstructor;
|
|
31
31
|
};
|
|
@@ -35,23 +35,29 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
};
|
|
36
36
|
}, {
|
|
37
37
|
isIndeterminate: import("vue").Ref<boolean>;
|
|
38
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
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<{
|
|
39
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 */
|
|
40
42
|
indeterminate: {
|
|
41
43
|
type: BooleanConstructor;
|
|
42
44
|
default: boolean;
|
|
43
45
|
};
|
|
46
|
+
/** Use it to replace the default slot */
|
|
44
47
|
label: {
|
|
45
48
|
type: StringConstructor;
|
|
46
49
|
};
|
|
47
|
-
|
|
50
|
+
/** Checked state of the component */
|
|
51
|
+
checked: {
|
|
48
52
|
type: BooleanConstructor;
|
|
49
53
|
default: boolean;
|
|
50
54
|
};
|
|
55
|
+
/** The value is used in multiselection context in order to build array of values. */
|
|
51
56
|
value: {
|
|
52
57
|
type: StringConstructor;
|
|
53
58
|
default: string;
|
|
54
59
|
};
|
|
60
|
+
/** Removes any interactivity if disabled */
|
|
55
61
|
disabled: {
|
|
56
62
|
type: BooleanConstructor;
|
|
57
63
|
default: boolean;
|
|
@@ -59,10 +65,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
59
65
|
id: {
|
|
60
66
|
type: StringConstructor;
|
|
61
67
|
};
|
|
62
|
-
invalid: {
|
|
63
|
-
type: BooleanConstructor;
|
|
64
|
-
default: boolean;
|
|
65
|
-
};
|
|
66
68
|
name: {
|
|
67
69
|
type: StringConstructor;
|
|
68
70
|
};
|
|
@@ -71,13 +73,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
71
73
|
default: boolean;
|
|
72
74
|
};
|
|
73
75
|
}>> & {
|
|
74
|
-
"onUpdate:
|
|
76
|
+
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
|
75
77
|
}, {
|
|
76
78
|
disabled: boolean;
|
|
77
79
|
indeterminate: boolean;
|
|
78
|
-
|
|
80
|
+
checked: boolean;
|
|
79
81
|
value: string;
|
|
80
|
-
invalid: boolean;
|
|
81
82
|
required: boolean;
|
|
82
83
|
}>, {
|
|
83
84
|
default: (_: {}) => any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
+
/** Removes any interactivity */
|
|
3
4
|
disabled: {
|
|
4
5
|
type: BooleanConstructor;
|
|
5
6
|
default: boolean;
|
|
@@ -18,19 +19,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
18
19
|
type: BooleanConstructor;
|
|
19
20
|
default: boolean;
|
|
20
21
|
};
|
|
22
|
+
/** Display a label on top of the element. */
|
|
21
23
|
label: StringConstructor;
|
|
24
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
22
25
|
labelSize: {
|
|
23
26
|
type: PropType<"small" | "large" | "medium">;
|
|
24
27
|
default: string;
|
|
25
28
|
};
|
|
29
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
26
30
|
optionalLabel: StringConstructor;
|
|
31
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
27
32
|
requiredMark: {
|
|
28
33
|
type: BooleanConstructor;
|
|
29
34
|
default: boolean;
|
|
30
35
|
};
|
|
36
|
+
/** Used for aria-label. */
|
|
31
37
|
labelDecrement: {
|
|
32
38
|
type: StringConstructor;
|
|
33
39
|
};
|
|
40
|
+
/** Used for aria-label. */
|
|
34
41
|
labelIncrement: {
|
|
35
42
|
type: StringConstructor;
|
|
36
43
|
};
|
|
@@ -45,15 +52,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
45
52
|
type: NumberConstructor;
|
|
46
53
|
default: number;
|
|
47
54
|
};
|
|
55
|
+
/** In order to increment or decrement by given steps. For non-integer values, don't use comma */
|
|
48
56
|
step: {
|
|
49
57
|
type: NumberConstructor;
|
|
50
58
|
default: number;
|
|
51
59
|
};
|
|
52
|
-
|
|
60
|
+
/** When given, it renders a JoyFormError element */
|
|
61
|
+
errorMessage: {
|
|
53
62
|
type: StringConstructor;
|
|
54
63
|
};
|
|
55
64
|
}, {
|
|
56
65
|
props: Readonly<import("vue").ExtractPropTypes<{
|
|
66
|
+
/** Removes any interactivity */
|
|
57
67
|
disabled: {
|
|
58
68
|
type: BooleanConstructor;
|
|
59
69
|
default: boolean;
|
|
@@ -72,19 +82,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
72
82
|
type: BooleanConstructor;
|
|
73
83
|
default: boolean;
|
|
74
84
|
};
|
|
85
|
+
/** Display a label on top of the element. */
|
|
75
86
|
label: StringConstructor;
|
|
87
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
76
88
|
labelSize: {
|
|
77
89
|
type: PropType<"small" | "large" | "medium">;
|
|
78
90
|
default: string;
|
|
79
91
|
};
|
|
92
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
80
93
|
optionalLabel: StringConstructor;
|
|
94
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
81
95
|
requiredMark: {
|
|
82
96
|
type: BooleanConstructor;
|
|
83
97
|
default: boolean;
|
|
84
98
|
};
|
|
99
|
+
/** Used for aria-label. */
|
|
85
100
|
labelDecrement: {
|
|
86
101
|
type: StringConstructor;
|
|
87
102
|
};
|
|
103
|
+
/** Used for aria-label. */
|
|
88
104
|
labelIncrement: {
|
|
89
105
|
type: StringConstructor;
|
|
90
106
|
};
|
|
@@ -99,15 +115,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
99
115
|
type: NumberConstructor;
|
|
100
116
|
default: number;
|
|
101
117
|
};
|
|
118
|
+
/** In order to increment or decrement by given steps. For non-integer values, don't use comma */
|
|
102
119
|
step: {
|
|
103
120
|
type: NumberConstructor;
|
|
104
121
|
default: number;
|
|
105
122
|
};
|
|
106
|
-
|
|
123
|
+
/** When given, it renders a JoyFormError element */
|
|
124
|
+
errorMessage: {
|
|
107
125
|
type: StringConstructor;
|
|
108
126
|
};
|
|
109
127
|
}>>;
|
|
110
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
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 */
|
|
111
132
|
disabled: {
|
|
112
133
|
type: BooleanConstructor;
|
|
113
134
|
default: boolean;
|
|
@@ -126,19 +147,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
126
147
|
type: BooleanConstructor;
|
|
127
148
|
default: boolean;
|
|
128
149
|
};
|
|
150
|
+
/** Display a label on top of the element. */
|
|
129
151
|
label: StringConstructor;
|
|
152
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
130
153
|
labelSize: {
|
|
131
154
|
type: PropType<"small" | "large" | "medium">;
|
|
132
155
|
default: string;
|
|
133
156
|
};
|
|
157
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
134
158
|
optionalLabel: StringConstructor;
|
|
159
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
135
160
|
requiredMark: {
|
|
136
161
|
type: BooleanConstructor;
|
|
137
162
|
default: boolean;
|
|
138
163
|
};
|
|
164
|
+
/** Used for aria-label. */
|
|
139
165
|
labelDecrement: {
|
|
140
166
|
type: StringConstructor;
|
|
141
167
|
};
|
|
168
|
+
/** Used for aria-label. */
|
|
142
169
|
labelIncrement: {
|
|
143
170
|
type: StringConstructor;
|
|
144
171
|
};
|
|
@@ -153,23 +180,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
153
180
|
type: NumberConstructor;
|
|
154
181
|
default: number;
|
|
155
182
|
};
|
|
183
|
+
/** In order to increment or decrement by given steps. For non-integer values, don't use comma */
|
|
156
184
|
step: {
|
|
157
185
|
type: NumberConstructor;
|
|
158
186
|
default: number;
|
|
159
187
|
};
|
|
160
|
-
|
|
188
|
+
/** When given, it renders a JoyFormError element */
|
|
189
|
+
errorMessage: {
|
|
161
190
|
type: StringConstructor;
|
|
162
191
|
};
|
|
163
192
|
}>> & {
|
|
164
|
-
"onUpdate:modelValue"?: ((
|
|
193
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
165
194
|
}, {
|
|
166
195
|
disabled: boolean;
|
|
167
|
-
modelValue: number;
|
|
168
|
-
invalid: boolean;
|
|
169
196
|
required: boolean;
|
|
197
|
+
invalid: boolean;
|
|
170
198
|
labelSize: "small" | "large" | "medium";
|
|
171
199
|
requiredMark: boolean;
|
|
172
200
|
min: number;
|
|
201
|
+
modelValue: number;
|
|
173
202
|
step: number;
|
|
174
203
|
}>, {
|
|
175
204
|
default: (_: {}) => any;
|
|
@@ -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;
|
|
@@ -14,17 +14,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
name: {
|
|
16
16
|
type: StringConstructor;
|
|
17
|
+
required: true;
|
|
17
18
|
};
|
|
18
19
|
required: {
|
|
19
20
|
type: BooleanConstructor;
|
|
20
21
|
default: boolean;
|
|
21
22
|
};
|
|
23
|
+
/** Display a label on top of the element. */
|
|
22
24
|
label: StringConstructor;
|
|
25
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
23
26
|
labelSize: {
|
|
24
27
|
type: PropType<"small" | "large" | "medium">;
|
|
25
28
|
default: string;
|
|
26
29
|
};
|
|
30
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
27
31
|
optionalLabel: StringConstructor;
|
|
32
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
28
33
|
requiredMark: {
|
|
29
34
|
type: BooleanConstructor;
|
|
30
35
|
default: boolean;
|
|
@@ -33,10 +38,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
33
38
|
type: StringConstructor;
|
|
34
39
|
default: string;
|
|
35
40
|
};
|
|
41
|
+
/** Display a cross icon on the right that enables to clear the field */
|
|
36
42
|
clearable: {
|
|
37
43
|
type: BooleanConstructor;
|
|
38
44
|
default: boolean;
|
|
39
45
|
};
|
|
46
|
+
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
40
47
|
icon: StringConstructor;
|
|
41
48
|
size: {
|
|
42
49
|
type: PropType<InputSizes>;
|
|
@@ -44,8 +51,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
44
51
|
validator(size: InputSizes): boolean;
|
|
45
52
|
};
|
|
46
53
|
type: StringConstructor;
|
|
54
|
+
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
47
55
|
unit: StringConstructor;
|
|
48
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
56
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
|
+
"update:modelValue": (value: string) => void;
|
|
58
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
59
|
disabled: {
|
|
50
60
|
type: BooleanConstructor;
|
|
51
61
|
default: boolean;
|
|
@@ -59,17 +69,22 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
59
69
|
};
|
|
60
70
|
name: {
|
|
61
71
|
type: StringConstructor;
|
|
72
|
+
required: true;
|
|
62
73
|
};
|
|
63
74
|
required: {
|
|
64
75
|
type: BooleanConstructor;
|
|
65
76
|
default: boolean;
|
|
66
77
|
};
|
|
78
|
+
/** Display a label on top of the element. */
|
|
67
79
|
label: StringConstructor;
|
|
80
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
68
81
|
labelSize: {
|
|
69
82
|
type: PropType<"small" | "large" | "medium">;
|
|
70
83
|
default: string;
|
|
71
84
|
};
|
|
85
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
72
86
|
optionalLabel: StringConstructor;
|
|
87
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
73
88
|
requiredMark: {
|
|
74
89
|
type: BooleanConstructor;
|
|
75
90
|
default: boolean;
|
|
@@ -78,10 +93,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
78
93
|
type: StringConstructor;
|
|
79
94
|
default: string;
|
|
80
95
|
};
|
|
96
|
+
/** Display a cross icon on the right that enables to clear the field */
|
|
81
97
|
clearable: {
|
|
82
98
|
type: BooleanConstructor;
|
|
83
99
|
default: boolean;
|
|
84
100
|
};
|
|
101
|
+
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
85
102
|
icon: StringConstructor;
|
|
86
103
|
size: {
|
|
87
104
|
type: PropType<InputSizes>;
|
|
@@ -89,17 +106,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
89
106
|
validator(size: InputSizes): boolean;
|
|
90
107
|
};
|
|
91
108
|
type: StringConstructor;
|
|
109
|
+
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
92
110
|
unit: StringConstructor;
|
|
93
111
|
}>> & {
|
|
94
|
-
"onUpdate:modelValue"?: ((
|
|
112
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
95
113
|
}, {
|
|
96
114
|
size: InputSizes;
|
|
97
115
|
disabled: boolean;
|
|
98
|
-
modelValue: string;
|
|
99
|
-
invalid: boolean;
|
|
100
116
|
required: boolean;
|
|
117
|
+
invalid: boolean;
|
|
101
118
|
labelSize: "small" | "large" | "medium";
|
|
102
119
|
requiredMark: boolean;
|
|
120
|
+
modelValue: string;
|
|
103
121
|
clearable: boolean;
|
|
104
122
|
}>, {
|
|
105
123
|
default: (_: {}) => any;
|
|
@@ -0,0 +1,86 @@
|
|
|
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, {
|
|
47
|
+
"update:value": (value: any[]) => void;
|
|
48
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
options: {
|
|
50
|
+
type: PropType<Option[]>;
|
|
51
|
+
required: true;
|
|
52
|
+
validator(value: Array<Option>): boolean;
|
|
53
|
+
};
|
|
54
|
+
id: StringConstructor;
|
|
55
|
+
value: {
|
|
56
|
+
type: PropType<any[]>;
|
|
57
|
+
default(): never[];
|
|
58
|
+
};
|
|
59
|
+
fullWidth: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
required: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
label: StringConstructor;
|
|
68
|
+
labelSize: {
|
|
69
|
+
type: PropType<"small" | "large" | "medium">;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
optionalLabel: StringConstructor;
|
|
73
|
+
requiredMark: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
}>> & {
|
|
78
|
+
"onUpdate:value"?: ((value: any[]) => any) | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
value: any[];
|
|
81
|
+
required: boolean;
|
|
82
|
+
labelSize: "small" | "large" | "medium";
|
|
83
|
+
requiredMark: boolean;
|
|
84
|
+
fullWidth: boolean;
|
|
85
|
+
}>;
|
|
86
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { PanelSizes } from './JoyPanel.types';
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
|
+
flex: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
noMargin: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
padding: {
|
|
12
|
+
type: PropType<PanelSizes>;
|
|
13
|
+
defaut: string;
|
|
14
|
+
validator(size: PanelSizes): boolean;
|
|
15
|
+
};
|
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
flex: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
noMargin: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
padding: {
|
|
25
|
+
type: PropType<PanelSizes>;
|
|
26
|
+
defaut: string;
|
|
27
|
+
validator(size: PanelSizes): boolean;
|
|
28
|
+
};
|
|
29
|
+
}>>, {
|
|
30
|
+
noMargin: boolean;
|
|
31
|
+
}>, {
|
|
32
|
+
'panel-title': (_: {}) => any;
|
|
33
|
+
'panel-title-action': (_: {}) => any;
|
|
34
|
+
'panel-subtitle': (_: {}) => any;
|
|
35
|
+
'panel-body': (_: {}) => any;
|
|
36
|
+
'panel-action': (_: {}) => any;
|
|
37
|
+
}>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, {
|
|
2
|
+
'panel-section-title': (_: {}) => any;
|
|
3
|
+
'panel-section-content': (_: {}) => any;
|
|
4
|
+
}>;
|
|
5
|
+
export default _default;
|
|
6
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
7
|
+
new (): {
|
|
8
|
+
$slots: S;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -27,11 +27,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
27
27
|
};
|
|
28
28
|
value: {
|
|
29
29
|
type: StringConstructor;
|
|
30
|
+
required: true;
|
|
30
31
|
};
|
|
31
32
|
}, {
|
|
32
33
|
checked: import("vue").ComputedRef<boolean>;
|
|
33
34
|
isExpanded: import("vue").Ref<boolean>;
|
|
34
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
35
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
"update:modelValue": (value: string) => void;
|
|
37
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
38
|
disabled: {
|
|
36
39
|
type: BooleanConstructor;
|
|
37
40
|
default: boolean;
|
|
@@ -59,13 +62,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
59
62
|
};
|
|
60
63
|
value: {
|
|
61
64
|
type: StringConstructor;
|
|
65
|
+
required: true;
|
|
62
66
|
};
|
|
63
67
|
}>> & {
|
|
64
|
-
"onUpdate:modelValue"?: ((
|
|
68
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
65
69
|
}, {
|
|
66
70
|
disabled: boolean;
|
|
67
|
-
invalid: boolean;
|
|
68
71
|
required: boolean;
|
|
72
|
+
invalid: boolean;
|
|
69
73
|
theme: "default" | "outline";
|
|
70
74
|
}>, {
|
|
71
75
|
default: (_: {}) => any;
|
|
@@ -32,7 +32,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
32
32
|
type: StringConstructor;
|
|
33
33
|
default: string;
|
|
34
34
|
};
|
|
35
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
35
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
"update:modelValue": (value: string) => void;
|
|
37
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
38
|
disabled: {
|
|
37
39
|
type: BooleanConstructor;
|
|
38
40
|
default: boolean;
|
|
@@ -66,14 +68,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
66
68
|
default: string;
|
|
67
69
|
};
|
|
68
70
|
}>> & {
|
|
69
|
-
"onUpdate:modelValue"?: ((
|
|
71
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
70
72
|
}, {
|
|
71
73
|
disabled: boolean;
|
|
72
|
-
modelValue: string;
|
|
73
|
-
invalid: boolean;
|
|
74
74
|
required: boolean;
|
|
75
|
+
invalid: boolean;
|
|
75
76
|
labelSize: "small" | "large" | "medium";
|
|
76
77
|
requiredMark: boolean;
|
|
78
|
+
modelValue: string;
|
|
77
79
|
}>, {
|
|
78
80
|
label: (_: {}) => any;
|
|
79
81
|
default: (_: {}) => any;
|