sit-onyx 1.0.0-alpha.46 → 1.0.0-alpha.48
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/OnyxButton/OnyxButton.stories.d.ts +9 -0
- package/dist/components/OnyxButton/OnyxButton.vue.d.ts +3 -0
- package/dist/components/OnyxButton/types.d.ts +4 -0
- package/dist/components/OnyxCheckbox/OnyxCheckbox.vue.d.ts +3 -0
- package/dist/components/OnyxCheckbox/types.d.ts +4 -3
- package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.stories.d.ts +45 -0
- package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue.d.ts +3 -3
- package/dist/components/OnyxInput/OnyxInput.vue.d.ts +2 -2
- package/dist/components/OnyxInput/types.d.ts +2 -5
- package/dist/components/OnyxRadioButton/OnyxRadioButton.vue.d.ts +6 -0
- package/dist/components/OnyxRadioButton/types.d.ts +6 -1
- package/dist/components/OnyxRadioButtonGroup/OnyxRadioButtonGroup.vue.d.ts +15 -9
- package/dist/components/OnyxRadioButtonGroup/types.d.ts +3 -6
- package/dist/components/OnyxSkeleton/OnyxSkeleton.stories.d.ts +1 -1
- package/dist/components/OnyxSwitch/OnyxSwitch.stories.d.ts +12 -2
- package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +3 -3
- package/dist/components/OnyxSwitch/types.d.ts +4 -3
- package/dist/composables/density.d.ts +15 -0
- package/dist/composables/required.d.ts +27 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +448 -404
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/utils/playwright.d.ts +6 -9
- package/package.json +5 -3
- package/src/styles/density.scss +61 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/required.scss +34 -23
- package/src/types/colors.ts +10 -0
- package/src/types/dom.ts +10 -0
- package/src/types/fonts.ts +7 -0
- package/src/types/i18n.ts +68 -0
- package/src/types/index.ts +5 -0
- package/src/types/utils.ts +4 -0
|
@@ -37,6 +37,15 @@ export declare const Danger: {
|
|
|
37
37
|
variation: "danger";
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* This example shows the button in loading state
|
|
42
|
+
*/
|
|
43
|
+
export declare const Loading: {
|
|
44
|
+
args: {
|
|
45
|
+
label: string;
|
|
46
|
+
loading: true;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
40
49
|
/**
|
|
41
50
|
* This example shows the button with icon
|
|
42
51
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { OnyxButtonProps } from "./types";
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxButtonProps>, {
|
|
3
3
|
disabled: boolean;
|
|
4
|
+
loading: boolean;
|
|
4
5
|
type: string;
|
|
5
6
|
variation: string;
|
|
6
7
|
mode: string;
|
|
@@ -9,6 +10,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
9
10
|
click: () => void;
|
|
10
11
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxButtonProps>, {
|
|
11
12
|
disabled: boolean;
|
|
13
|
+
loading: boolean;
|
|
12
14
|
type: string;
|
|
13
15
|
variation: string;
|
|
14
16
|
mode: string;
|
|
@@ -18,6 +20,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
18
20
|
}, {
|
|
19
21
|
type: "button" | "submit" | "reset";
|
|
20
22
|
disabled: boolean;
|
|
23
|
+
loading: boolean;
|
|
21
24
|
variation: "primary" | "secondary" | "danger";
|
|
22
25
|
mode: "default" | "outline" | "plain";
|
|
23
26
|
skeleton: boolean;
|
|
@@ -3,6 +3,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
3
3
|
modelValue: boolean;
|
|
4
4
|
indeterminate: boolean;
|
|
5
5
|
disabled: boolean;
|
|
6
|
+
loading: boolean;
|
|
6
7
|
required: boolean;
|
|
7
8
|
truncation: string;
|
|
8
9
|
skeleton: boolean;
|
|
@@ -12,6 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
12
13
|
modelValue: boolean;
|
|
13
14
|
indeterminate: boolean;
|
|
14
15
|
disabled: boolean;
|
|
16
|
+
loading: boolean;
|
|
15
17
|
required: boolean;
|
|
16
18
|
truncation: string;
|
|
17
19
|
skeleton: boolean;
|
|
@@ -20,6 +22,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
20
22
|
}, {
|
|
21
23
|
required: boolean;
|
|
22
24
|
disabled: boolean;
|
|
25
|
+
loading: boolean;
|
|
23
26
|
skeleton: boolean;
|
|
24
27
|
modelValue: boolean;
|
|
25
28
|
indeterminate: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { RequiredMarkerProp } from "../../composables/required";
|
|
1
2
|
import type { TruncationType } from "../../types/fonts";
|
|
2
|
-
export type OnyxCheckboxProps = {
|
|
3
|
+
export type OnyxCheckboxProps = RequiredMarkerProp & {
|
|
3
4
|
/**
|
|
4
5
|
* Whether the checkbox is checked.
|
|
5
6
|
*/
|
|
@@ -18,9 +19,9 @@ export type OnyxCheckboxProps = {
|
|
|
18
19
|
*/
|
|
19
20
|
disabled?: boolean;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Shows a loading indicator.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
loading?: boolean;
|
|
24
25
|
/**
|
|
25
26
|
* If `true`, the label will be visually hidden.
|
|
26
27
|
* For accessibility / screen readers, the aria-label will still be set.
|
|
@@ -18,16 +18,25 @@ export declare const Default: {
|
|
|
18
18
|
id: string;
|
|
19
19
|
required?: undefined;
|
|
20
20
|
disabled?: undefined;
|
|
21
|
+
loading?: undefined;
|
|
21
22
|
} | {
|
|
22
23
|
label: string;
|
|
23
24
|
id: string;
|
|
24
25
|
required: true;
|
|
25
26
|
disabled?: undefined;
|
|
27
|
+
loading?: undefined;
|
|
26
28
|
} | {
|
|
27
29
|
label: string;
|
|
28
30
|
id: string;
|
|
29
31
|
disabled: true;
|
|
30
32
|
required?: undefined;
|
|
33
|
+
loading?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
label: string;
|
|
36
|
+
id: string;
|
|
37
|
+
loading: true;
|
|
38
|
+
required?: undefined;
|
|
39
|
+
disabled?: undefined;
|
|
31
40
|
})[];
|
|
32
41
|
};
|
|
33
42
|
};
|
|
@@ -44,16 +53,25 @@ export declare const Horizontal: {
|
|
|
44
53
|
id: string;
|
|
45
54
|
required?: undefined;
|
|
46
55
|
disabled?: undefined;
|
|
56
|
+
loading?: undefined;
|
|
47
57
|
} | {
|
|
48
58
|
label: string;
|
|
49
59
|
id: string;
|
|
50
60
|
required: true;
|
|
51
61
|
disabled?: undefined;
|
|
62
|
+
loading?: undefined;
|
|
52
63
|
} | {
|
|
53
64
|
label: string;
|
|
54
65
|
id: string;
|
|
55
66
|
disabled: true;
|
|
56
67
|
required?: undefined;
|
|
68
|
+
loading?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
label: string;
|
|
71
|
+
id: string;
|
|
72
|
+
loading: true;
|
|
73
|
+
required?: undefined;
|
|
74
|
+
disabled?: undefined;
|
|
57
75
|
})[];
|
|
58
76
|
};
|
|
59
77
|
};
|
|
@@ -70,16 +88,25 @@ export declare const WithCheckAll: {
|
|
|
70
88
|
id: string;
|
|
71
89
|
required?: undefined;
|
|
72
90
|
disabled?: undefined;
|
|
91
|
+
loading?: undefined;
|
|
73
92
|
} | {
|
|
74
93
|
label: string;
|
|
75
94
|
id: string;
|
|
76
95
|
required: true;
|
|
77
96
|
disabled?: undefined;
|
|
97
|
+
loading?: undefined;
|
|
78
98
|
} | {
|
|
79
99
|
label: string;
|
|
80
100
|
id: string;
|
|
81
101
|
disabled: true;
|
|
82
102
|
required?: undefined;
|
|
103
|
+
loading?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
label: string;
|
|
106
|
+
id: string;
|
|
107
|
+
loading: true;
|
|
108
|
+
required?: undefined;
|
|
109
|
+
disabled?: undefined;
|
|
83
110
|
})[];
|
|
84
111
|
};
|
|
85
112
|
};
|
|
@@ -96,16 +123,25 @@ export declare const Disabled: {
|
|
|
96
123
|
id: string;
|
|
97
124
|
required?: undefined;
|
|
98
125
|
disabled?: undefined;
|
|
126
|
+
loading?: undefined;
|
|
99
127
|
} | {
|
|
100
128
|
label: string;
|
|
101
129
|
id: string;
|
|
102
130
|
required: true;
|
|
103
131
|
disabled?: undefined;
|
|
132
|
+
loading?: undefined;
|
|
104
133
|
} | {
|
|
105
134
|
label: string;
|
|
106
135
|
id: string;
|
|
107
136
|
disabled: true;
|
|
108
137
|
required?: undefined;
|
|
138
|
+
loading?: undefined;
|
|
139
|
+
} | {
|
|
140
|
+
label: string;
|
|
141
|
+
id: string;
|
|
142
|
+
loading: true;
|
|
143
|
+
required?: undefined;
|
|
144
|
+
disabled?: undefined;
|
|
109
145
|
})[];
|
|
110
146
|
};
|
|
111
147
|
};
|
|
@@ -150,16 +186,25 @@ export declare const Skeleton: {
|
|
|
150
186
|
id: string;
|
|
151
187
|
required?: undefined;
|
|
152
188
|
disabled?: undefined;
|
|
189
|
+
loading?: undefined;
|
|
153
190
|
} | {
|
|
154
191
|
label: string;
|
|
155
192
|
id: string;
|
|
156
193
|
required: true;
|
|
157
194
|
disabled?: undefined;
|
|
195
|
+
loading?: undefined;
|
|
158
196
|
} | {
|
|
159
197
|
label: string;
|
|
160
198
|
id: string;
|
|
161
199
|
disabled: true;
|
|
162
200
|
required?: undefined;
|
|
201
|
+
loading?: undefined;
|
|
202
|
+
} | {
|
|
203
|
+
label: string;
|
|
204
|
+
id: string;
|
|
205
|
+
loading: true;
|
|
206
|
+
required?: undefined;
|
|
207
|
+
disabled?: undefined;
|
|
163
208
|
})[];
|
|
164
209
|
};
|
|
165
210
|
};
|
|
@@ -3,9 +3,9 @@ declare const _default: <TValue extends string | number | boolean>(__VLS_props:
|
|
|
3
3
|
skeleton?: number | undefined;
|
|
4
4
|
modelValue?: TValue[] | undefined;
|
|
5
5
|
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
6
|
+
options: import('../../index').CheckboxGroupOption<TValue>[];
|
|
6
7
|
headline?: string | undefined;
|
|
7
8
|
direction?: "horizontal" | "vertical" | undefined;
|
|
8
|
-
options: import('../../index').CheckboxGroupOption<TValue>[];
|
|
9
9
|
withCheckAll?: boolean | undefined;
|
|
10
10
|
checkAllLabel?: string | undefined;
|
|
11
11
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
|
@@ -18,9 +18,9 @@ declare const _default: <TValue extends string | number | boolean>(__VLS_props:
|
|
|
18
18
|
skeleton?: number | undefined;
|
|
19
19
|
modelValue?: TValue[] | undefined;
|
|
20
20
|
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
21
|
+
options: import('../../index').CheckboxGroupOption<TValue>[];
|
|
21
22
|
headline?: string | undefined;
|
|
22
23
|
direction?: "horizontal" | "vertical" | undefined;
|
|
23
|
-
options: import('../../index').CheckboxGroupOption<TValue>[];
|
|
24
24
|
withCheckAll?: boolean | undefined;
|
|
25
25
|
checkAllLabel?: string | undefined;
|
|
26
26
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
@@ -37,9 +37,9 @@ declare const _default: <TValue extends string | number | boolean>(__VLS_props:
|
|
|
37
37
|
skeleton?: number | undefined;
|
|
38
38
|
modelValue?: TValue[] | undefined;
|
|
39
39
|
"onUpdate:modelValue"?: ((value: TValue[]) => any) | undefined;
|
|
40
|
+
options: import('../../index').CheckboxGroupOption<TValue>[];
|
|
40
41
|
headline?: string | undefined;
|
|
41
42
|
direction?: "horizontal" | "vertical" | undefined;
|
|
42
|
-
options: import('../../index').CheckboxGroupOption<TValue>[];
|
|
43
43
|
withCheckAll?: boolean | undefined;
|
|
44
44
|
checkAllLabel?: string | undefined;
|
|
45
45
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
@@ -9,9 +9,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
9
9
|
loading: boolean;
|
|
10
10
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
11
|
"update:modelValue": (value: string) => void;
|
|
12
|
-
blur: () => void;
|
|
13
12
|
change: (value: string) => void;
|
|
14
13
|
focus: () => void;
|
|
14
|
+
blur: () => void;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxInputProps>, {
|
|
16
16
|
modelValue: string;
|
|
17
17
|
type: string;
|
|
@@ -29,8 +29,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
29
29
|
type: "search" | "text" | "email" | "password" | "tel" | "url";
|
|
30
30
|
required: boolean;
|
|
31
31
|
disabled: boolean;
|
|
32
|
-
modelValue: string;
|
|
33
32
|
loading: boolean;
|
|
33
|
+
modelValue: string;
|
|
34
34
|
autocapitalize: "none" | "sentences" | "words" | "characters";
|
|
35
35
|
readonly: boolean;
|
|
36
36
|
}, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { RequiredMarkerProp } from "../../composables/required";
|
|
2
|
+
export type OnyxInputProps = RequiredMarkerProp & {
|
|
2
3
|
/**
|
|
3
4
|
* Label to show above the input. Required due to accessibility / screen readers.
|
|
4
5
|
* If you want to visually hide the label, use the `hideLabel` property.
|
|
@@ -16,10 +17,6 @@ export type OnyxInputProps = {
|
|
|
16
17
|
* Placeholder to show when the value is empty.
|
|
17
18
|
*/
|
|
18
19
|
placeholder?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the input is required.
|
|
21
|
-
*/
|
|
22
|
-
required?: boolean;
|
|
23
20
|
/**
|
|
24
21
|
* If and how text should be automatically be capitalized when using non-physical keyboards
|
|
25
22
|
* (such as virtual keyboard on mobile devices or voice input).
|
|
@@ -5,9 +5,11 @@ declare const _default: <TValue>(__VLS_props: {
|
|
|
5
5
|
value?: TValue | undefined;
|
|
6
6
|
id: string;
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
|
+
loading?: boolean | undefined;
|
|
8
9
|
skeleton?: boolean | undefined;
|
|
9
10
|
truncation?: "ellipsis" | "multiline" | undefined;
|
|
10
11
|
name: string;
|
|
12
|
+
density?: "default" | "cozy" | "compact" | undefined;
|
|
11
13
|
errorMessage?: string | undefined;
|
|
12
14
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
|
13
15
|
attrs: any;
|
|
@@ -21,9 +23,11 @@ declare const _default: <TValue>(__VLS_props: {
|
|
|
21
23
|
value?: TValue | undefined;
|
|
22
24
|
id: string;
|
|
23
25
|
disabled?: boolean | undefined;
|
|
26
|
+
loading?: boolean | undefined;
|
|
24
27
|
skeleton?: boolean | undefined;
|
|
25
28
|
truncation?: "ellipsis" | "multiline" | undefined;
|
|
26
29
|
name: string;
|
|
30
|
+
density?: "default" | "cozy" | "compact" | undefined;
|
|
27
31
|
errorMessage?: string | undefined;
|
|
28
32
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
29
33
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
@@ -41,9 +45,11 @@ declare const _default: <TValue>(__VLS_props: {
|
|
|
41
45
|
value?: TValue | undefined;
|
|
42
46
|
id: string;
|
|
43
47
|
disabled?: boolean | undefined;
|
|
48
|
+
loading?: boolean | undefined;
|
|
44
49
|
skeleton?: boolean | undefined;
|
|
45
50
|
truncation?: "ellipsis" | "multiline" | undefined;
|
|
46
51
|
name: string;
|
|
52
|
+
density?: "default" | "cozy" | "compact" | undefined;
|
|
47
53
|
errorMessage?: string | undefined;
|
|
48
54
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
49
55
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DensityProp } from "../../composables/density";
|
|
1
2
|
import type { TruncationType } from "../../types/fonts";
|
|
2
3
|
/**
|
|
3
4
|
* TODO: move to dedicated file
|
|
@@ -14,6 +15,10 @@ export type SelectionOption<T = unknown> = {
|
|
|
14
15
|
*/
|
|
15
16
|
value?: T;
|
|
16
17
|
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Shows a loading indicator.
|
|
20
|
+
*/
|
|
21
|
+
loading?: boolean;
|
|
17
22
|
/**
|
|
18
23
|
* How to truncate the label if it exceeds the max width.
|
|
19
24
|
*/
|
|
@@ -26,7 +31,7 @@ export type SelectionOption<T = unknown> = {
|
|
|
26
31
|
export type SelectionProps<T> = SelectionOption<T> & {
|
|
27
32
|
selected?: boolean;
|
|
28
33
|
};
|
|
29
|
-
export type RadioButtonProps<TValue> = SelectionProps<TValue> & {
|
|
34
|
+
export type RadioButtonProps<TValue> = SelectionProps<TValue> & DensityProp & {
|
|
30
35
|
/**
|
|
31
36
|
* Identifier for the radio buttons in the group.
|
|
32
37
|
* All radio buttons that should belong to the same radio group must have the same name.
|
|
@@ -4,12 +4,14 @@ declare const _default: <TValue>(__VLS_props: {
|
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
5
|
skeleton?: number | undefined;
|
|
6
6
|
modelValue?: SelectionOption<TValue> | undefined;
|
|
7
|
+
requiredMarker?: "required" | "optional" | undefined;
|
|
7
8
|
"onUpdate:modelValue"?: ((selected: SelectionOption<TValue>) => any) | undefined;
|
|
8
|
-
|
|
9
|
-
errorMessage?: string | undefined;
|
|
9
|
+
options: SelectionOption<TValue>[];
|
|
10
10
|
headline?: string | undefined;
|
|
11
11
|
direction?: "horizontal" | "vertical" | undefined;
|
|
12
|
-
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
density?: "default" | "cozy" | "compact" | undefined;
|
|
14
|
+
errorMessage?: string | undefined;
|
|
13
15
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
|
14
16
|
attrs: any;
|
|
15
17
|
slots: {};
|
|
@@ -20,12 +22,14 @@ declare const _default: <TValue>(__VLS_props: {
|
|
|
20
22
|
disabled?: boolean | undefined;
|
|
21
23
|
skeleton?: number | undefined;
|
|
22
24
|
modelValue?: SelectionOption<TValue> | undefined;
|
|
25
|
+
requiredMarker?: "required" | "optional" | undefined;
|
|
23
26
|
"onUpdate:modelValue"?: ((selected: SelectionOption<TValue>) => any) | undefined;
|
|
24
|
-
|
|
25
|
-
errorMessage?: string | undefined;
|
|
27
|
+
options: SelectionOption<TValue>[];
|
|
26
28
|
headline?: string | undefined;
|
|
27
29
|
direction?: "horizontal" | "vertical" | undefined;
|
|
28
|
-
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
density?: "default" | "cozy" | "compact" | undefined;
|
|
32
|
+
errorMessage?: string | undefined;
|
|
29
33
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
30
34
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
31
35
|
attrs: any;
|
|
@@ -40,12 +44,14 @@ declare const _default: <TValue>(__VLS_props: {
|
|
|
40
44
|
disabled?: boolean | undefined;
|
|
41
45
|
skeleton?: number | undefined;
|
|
42
46
|
modelValue?: SelectionOption<TValue> | undefined;
|
|
47
|
+
requiredMarker?: "required" | "optional" | undefined;
|
|
43
48
|
"onUpdate:modelValue"?: ((selected: SelectionOption<TValue>) => any) | undefined;
|
|
44
|
-
|
|
45
|
-
errorMessage?: string | undefined;
|
|
49
|
+
options: SelectionOption<TValue>[];
|
|
46
50
|
headline?: string | undefined;
|
|
47
51
|
direction?: "horizontal" | "vertical" | undefined;
|
|
48
|
-
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
density?: "default" | "cozy" | "compact" | undefined;
|
|
54
|
+
errorMessage?: string | undefined;
|
|
49
55
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
50
56
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
51
57
|
attrs: any;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { RequiredMarkerProp } from "../../composables/required";
|
|
2
|
+
import type { DensityProp } from "../../composables/density";
|
|
1
3
|
import type { SelectionOption } from "../OnyxRadioButton/types";
|
|
2
|
-
export type OnyxRadioButtonGroupProps<TValue> = {
|
|
4
|
+
export type OnyxRadioButtonGroupProps<TValue> = DensityProp & RequiredMarkerProp & {
|
|
3
5
|
/**
|
|
4
6
|
* Unique name for the radio button group form element.
|
|
5
7
|
* Will automatically filled, when it is not given.
|
|
@@ -15,11 +17,6 @@ export type OnyxRadioButtonGroupProps<TValue> = {
|
|
|
15
17
|
* It will also show the required indicator, if `require` is set to `true`
|
|
16
18
|
*/
|
|
17
19
|
headline?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Set the radio button group to be required.
|
|
20
|
-
* If no `headline` is defined then no required indicator will be visible.
|
|
21
|
-
*/
|
|
22
|
-
required?: boolean;
|
|
23
20
|
/**
|
|
24
21
|
* Disable the radio button group.
|
|
25
22
|
*/
|
|
@@ -3,7 +3,7 @@ import OnyxSkeleton from "./OnyxSkeleton.vue";
|
|
|
3
3
|
/**
|
|
4
4
|
* The skeleton can be used during the process of building up / loading the initial page.
|
|
5
5
|
*
|
|
6
|
-
* **Note**:
|
|
6
|
+
* **Note**: Apply height/width via CSS.
|
|
7
7
|
*/
|
|
8
8
|
declare const meta: Meta<typeof OnyxSkeleton>;
|
|
9
9
|
export default meta;
|
|
@@ -7,7 +7,7 @@ import OnyxSwitch from "./OnyxSwitch.vue";
|
|
|
7
7
|
declare const meta: Meta<typeof OnyxSwitch>;
|
|
8
8
|
export default meta;
|
|
9
9
|
/**
|
|
10
|
-
* This example shows the default
|
|
10
|
+
* This example shows the default unchecked state of the switch.
|
|
11
11
|
*/
|
|
12
12
|
export declare const Default: {
|
|
13
13
|
args: {
|
|
@@ -15,7 +15,7 @@ export declare const Default: {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* This example shows the
|
|
18
|
+
* This example shows the checked state of the switch.
|
|
19
19
|
*/
|
|
20
20
|
export declare const Checked: {
|
|
21
21
|
args: {
|
|
@@ -32,6 +32,16 @@ export declare const Invalid: {
|
|
|
32
32
|
label: string;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* This example shows checked and loading state of the switch.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CheckedLoading: {
|
|
39
|
+
args: {
|
|
40
|
+
label: string;
|
|
41
|
+
modelValue: true;
|
|
42
|
+
loading: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
35
45
|
/**
|
|
36
46
|
* A switch with truncation. You can set the "truncation" property to choose between the different truncation types.
|
|
37
47
|
*/
|
|
@@ -2,7 +2,7 @@ import type { OnyxSwitchProps } from "./types";
|
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxSwitchProps>, {
|
|
3
3
|
modelValue: boolean;
|
|
4
4
|
disabled: boolean;
|
|
5
|
-
|
|
5
|
+
loading: boolean;
|
|
6
6
|
truncation: string;
|
|
7
7
|
skeleton: boolean;
|
|
8
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -11,15 +11,15 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
11
11
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OnyxSwitchProps>, {
|
|
12
12
|
modelValue: boolean;
|
|
13
13
|
disabled: boolean;
|
|
14
|
-
|
|
14
|
+
loading: boolean;
|
|
15
15
|
truncation: string;
|
|
16
16
|
skeleton: boolean;
|
|
17
17
|
}>>> & {
|
|
18
18
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
19
19
|
onValidityChange?: ((state: ValidityState) => any) | undefined;
|
|
20
20
|
}, {
|
|
21
|
-
required: boolean;
|
|
22
21
|
disabled: boolean;
|
|
22
|
+
loading: boolean;
|
|
23
23
|
skeleton: boolean;
|
|
24
24
|
modelValue: boolean;
|
|
25
25
|
truncation: "ellipsis" | "multiline";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { RequiredMarkerProp } from "../../composables/required";
|
|
1
2
|
import type { TruncationType } from "../../types/fonts";
|
|
2
|
-
export type OnyxSwitchProps = {
|
|
3
|
+
export type OnyxSwitchProps = RequiredMarkerProp & {
|
|
3
4
|
/**
|
|
4
5
|
* Whether the switch should be checked or not.
|
|
5
6
|
*/
|
|
@@ -13,9 +14,9 @@ export type OnyxSwitchProps = {
|
|
|
13
14
|
*/
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Shows a loading indicator.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
loading?: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* The error message will set switch to invalid state.
|
|
21
22
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const DENSITY: readonly ["cozy", "default", "compact"];
|
|
2
|
+
export type DensityType = (typeof DENSITY)[number];
|
|
3
|
+
export type DensityProp = {
|
|
4
|
+
/**
|
|
5
|
+
* Density defines the amount of vertical white space a component has and the height of the main (interactive) element of a component.
|
|
6
|
+
* @default undefined By default the parents setting is used, if none is defined on any parent `default` is the default.
|
|
7
|
+
*/
|
|
8
|
+
density?: DensityType;
|
|
9
|
+
};
|
|
10
|
+
export declare const useDensity: (props: DensityProp) => {
|
|
11
|
+
densityClass: import("vue").ComputedRef<{
|
|
12
|
+
[x: string]: "default" | "cozy" | "compact" | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const REQUIRED_MARKER: readonly ["optional", "required"];
|
|
2
|
+
export type RequiredMarkerType = (typeof REQUIRED_MARKER)[number];
|
|
3
|
+
export type RequiredMarkerProp = {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the a value for this form element is required.
|
|
6
|
+
*/
|
|
7
|
+
required?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Required mode: `optional` will show an `(optional)` text after the label for optional inputs.
|
|
10
|
+
* `required` will show an `*` indicator for required inputs after the label instead.
|
|
11
|
+
* @default undefined By default the parents setting is used, if none is defined on any `required` is the default.
|
|
12
|
+
*/
|
|
13
|
+
requiredMarker?: RequiredMarkerType;
|
|
14
|
+
};
|
|
15
|
+
export declare const useRequired: (props: RequiredMarkerProp) => {
|
|
16
|
+
/**
|
|
17
|
+
* Class that configures which type of required marker is used.
|
|
18
|
+
*/
|
|
19
|
+
requiredTypeClass: import("vue").ComputedRef<{
|
|
20
|
+
[x: string]: "required" | "optional" | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
requiredMarkerClass: import("vue").ComputedRef<{
|
|
23
|
+
"onyx-required-marker": boolean | undefined;
|
|
24
|
+
"onyx-optional-marker": boolean;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
export {};
|