@speckle/ui-components 2.21.0 → 2.21.2
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/form/Checkbox.vue.d.ts +10 -0
- package/dist/components/form/Switch.vue.d.ts +0 -6
- package/dist/components/form/TextArea.vue.d.ts +2 -0
- package/dist/components/form/TextInput.vue.d.ts +18 -2
- package/dist/components/form/select/Base.vue.d.ts +6 -0
- package/dist/components/layout/Dialog.vue.d.ts +1 -1
- package/dist/components/layout/Menu.vue.d.ts +4 -0
- package/dist/composables/form/input.d.ts +1 -0
- package/dist/composables/form/textInput.d.ts +1 -1
- package/dist/composables/user/avatar.d.ts +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.js +1799 -1736
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RuleExpression } from 'vee-validate';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { Optional } from '@speckle/shared';
|
|
4
|
+
import type { LabelPosition } from '../../composables/form/input';
|
|
4
5
|
/**
|
|
5
6
|
* Troubleshooting:
|
|
6
7
|
* - If clicking on the checkbox doesn't do anything, check if any of its ancestor elements
|
|
@@ -93,6 +94,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
94
|
type: BooleanConstructor;
|
|
94
95
|
default: boolean;
|
|
95
96
|
};
|
|
97
|
+
labelPosition: {
|
|
98
|
+
type: PropType<LabelPosition>;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
96
101
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
97
102
|
"update:modelValue": (val: ValueType) => void;
|
|
98
103
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -178,6 +183,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
178
183
|
type: BooleanConstructor;
|
|
179
184
|
default: boolean;
|
|
180
185
|
};
|
|
186
|
+
labelPosition: {
|
|
187
|
+
type: PropType<LabelPosition>;
|
|
188
|
+
default: string;
|
|
189
|
+
};
|
|
181
190
|
}>> & {
|
|
182
191
|
"onUpdate:modelValue"?: ((val: ValueType) => any) | undefined;
|
|
183
192
|
}, {
|
|
@@ -192,5 +201,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
192
201
|
validateOnMount: boolean;
|
|
193
202
|
showRequired: boolean;
|
|
194
203
|
hideLabel: boolean;
|
|
204
|
+
labelPosition: LabelPosition;
|
|
195
205
|
}, {}>;
|
|
196
206
|
export default _default;
|
|
@@ -17,9 +17,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
17
|
type: import("vue").PropType<boolean>;
|
|
18
18
|
default: boolean;
|
|
19
19
|
};
|
|
20
|
-
icons: {
|
|
21
|
-
type: import("vue").PropType<boolean>;
|
|
22
|
-
};
|
|
23
20
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
21
|
modelValue: import("vue").PropType<boolean>;
|
|
25
22
|
disabled: {
|
|
@@ -39,9 +36,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
36
|
type: import("vue").PropType<boolean>;
|
|
40
37
|
default: boolean;
|
|
41
38
|
};
|
|
42
|
-
icons: {
|
|
43
|
-
type: import("vue").PropType<boolean>;
|
|
44
|
-
};
|
|
45
39
|
}>>, {
|
|
46
40
|
showLabel: boolean;
|
|
47
41
|
}, {}>;
|
|
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
19
19
|
showClear?: boolean | undefined;
|
|
20
20
|
fullWidth?: boolean | undefined;
|
|
21
21
|
showRequired?: boolean | undefined;
|
|
22
|
+
showOptional?: boolean | undefined;
|
|
22
23
|
color?: InputColor | undefined;
|
|
23
24
|
textareaClasses?: string | undefined;
|
|
24
25
|
}>, {
|
|
@@ -57,6 +58,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
57
58
|
showClear?: boolean | undefined;
|
|
58
59
|
fullWidth?: boolean | undefined;
|
|
59
60
|
showRequired?: boolean | undefined;
|
|
61
|
+
showOptional?: boolean | undefined;
|
|
60
62
|
color?: InputColor | undefined;
|
|
61
63
|
textareaClasses?: string | undefined;
|
|
62
64
|
}>, {
|
|
@@ -2,7 +2,8 @@ import type { RuleExpression } from 'vee-validate';
|
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { Optional } from '@speckle/shared';
|
|
4
4
|
import type { PropAnyComponent } from '../../helpers/common/components';
|
|
5
|
-
import type {
|
|
5
|
+
import type { InputColor } from '../../composables/form/textInput';
|
|
6
|
+
import type { LabelPosition } from '../../composables/form/input';
|
|
6
7
|
type InputSize = 'sm' | 'base' | 'lg' | 'xl';
|
|
7
8
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
8
9
|
/**
|
|
@@ -54,6 +55,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
54
55
|
type: BooleanConstructor;
|
|
55
56
|
default: boolean;
|
|
56
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Whether to show the "optional" text
|
|
60
|
+
*/
|
|
61
|
+
showOptional: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
57
65
|
/**
|
|
58
66
|
* Whether to disable the component, blocking it from user input
|
|
59
67
|
*/
|
|
@@ -204,6 +212,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
204
212
|
type: BooleanConstructor;
|
|
205
213
|
default: boolean;
|
|
206
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* Whether to show the "optional" text
|
|
217
|
+
*/
|
|
218
|
+
showOptional: {
|
|
219
|
+
type: BooleanConstructor;
|
|
220
|
+
default: boolean;
|
|
221
|
+
};
|
|
207
222
|
/**
|
|
208
223
|
* Whether to disable the component, blocking it from user input
|
|
209
224
|
*/
|
|
@@ -315,6 +330,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
315
330
|
rules: RuleExpression<string>;
|
|
316
331
|
validateOnMount: boolean;
|
|
317
332
|
showRequired: boolean;
|
|
333
|
+
labelPosition: LabelPosition;
|
|
318
334
|
validateOnValueUpdate: boolean;
|
|
319
335
|
help: Optional<string>;
|
|
320
336
|
showLabel: boolean;
|
|
@@ -322,7 +338,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
322
338
|
showClear: boolean;
|
|
323
339
|
useLabelInErrors: boolean;
|
|
324
340
|
hideErrorMessage: boolean;
|
|
325
|
-
|
|
341
|
+
showOptional: boolean;
|
|
326
342
|
inputClasses: string;
|
|
327
343
|
wrapperClasses: string;
|
|
328
344
|
}, {}>, {
|
|
@@ -23,6 +23,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
23
23
|
help?: Optional<string>;
|
|
24
24
|
showLabel?: boolean | undefined;
|
|
25
25
|
useLabelInErrors?: boolean | undefined;
|
|
26
|
+
showOptional?: boolean | undefined;
|
|
26
27
|
multiple?: boolean | undefined;
|
|
27
28
|
items?: SingleItem[] | undefined;
|
|
28
29
|
filterPredicate?: Optional<(item: SingleItem, searchString: string) => boolean>;
|
|
@@ -39,6 +40,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
39
40
|
mountMenuOnBody?: boolean | undefined;
|
|
40
41
|
labelId?: string | undefined;
|
|
41
42
|
buttonId?: string | undefined;
|
|
43
|
+
readonly disabledItemTooltip?: string | undefined;
|
|
42
44
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
|
43
45
|
attrs: any;
|
|
44
46
|
slots: {
|
|
@@ -80,6 +82,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
80
82
|
help?: Optional<string>;
|
|
81
83
|
showLabel?: boolean | undefined;
|
|
82
84
|
useLabelInErrors?: boolean | undefined;
|
|
85
|
+
showOptional?: boolean | undefined;
|
|
83
86
|
multiple?: boolean | undefined;
|
|
84
87
|
items?: SingleItem[] | undefined;
|
|
85
88
|
filterPredicate?: Optional<(item: SingleItem, searchString: string) => boolean>;
|
|
@@ -96,6 +99,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
96
99
|
mountMenuOnBody?: boolean | undefined;
|
|
97
100
|
labelId?: string | undefined;
|
|
98
101
|
buttonId?: string | undefined;
|
|
102
|
+
readonly disabledItemTooltip?: string | undefined;
|
|
99
103
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
100
104
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
101
105
|
triggerSearch: () => Promise<void>;
|
|
@@ -141,6 +145,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
141
145
|
help?: Optional<string>;
|
|
142
146
|
showLabel?: boolean | undefined;
|
|
143
147
|
useLabelInErrors?: boolean | undefined;
|
|
148
|
+
showOptional?: boolean | undefined;
|
|
144
149
|
multiple?: boolean | undefined;
|
|
145
150
|
items?: SingleItem[] | undefined;
|
|
146
151
|
filterPredicate?: Optional<(item: SingleItem, searchString: string) => boolean>;
|
|
@@ -157,6 +162,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
|
|
|
157
162
|
mountMenuOnBody?: boolean | undefined;
|
|
158
163
|
labelId?: string | undefined;
|
|
159
164
|
buttonId?: string | undefined;
|
|
165
|
+
readonly disabledItemTooltip?: string | undefined;
|
|
160
166
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
161
167
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
162
168
|
triggerSearch: () => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LayoutDialogButton } from '../../lib';
|
|
2
|
-
type MaxWidthValue = 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
type MaxWidthValue = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
3
|
type FullscreenValues = 'mobile' | 'desktop' | 'all' | 'none';
|
|
4
4
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
5
5
|
open: boolean;
|
|
@@ -6,8 +6,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
6
6
|
* 2D array so that items can be grouped with dividers between them
|
|
7
7
|
*/
|
|
8
8
|
items: LayoutMenuItem[][];
|
|
9
|
+
size?: "base" | "lg" | undefined;
|
|
9
10
|
menuId?: string | undefined;
|
|
10
11
|
menuPosition?: HorizontalDirection | undefined;
|
|
12
|
+
mountMenuOnBody?: boolean | undefined;
|
|
11
13
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
14
|
"update:open": (val: boolean) => void;
|
|
13
15
|
chosen: (val: {
|
|
@@ -20,8 +22,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
20
22
|
* 2D array so that items can be grouped with dividers between them
|
|
21
23
|
*/
|
|
22
24
|
items: LayoutMenuItem[][];
|
|
25
|
+
size?: "base" | "lg" | undefined;
|
|
23
26
|
menuId?: string | undefined;
|
|
24
27
|
menuPosition?: HorizontalDirection | undefined;
|
|
28
|
+
mountMenuOnBody?: boolean | undefined;
|
|
25
29
|
}>>> & {
|
|
26
30
|
"onUpdate:open"?: ((val: boolean) => any) | undefined;
|
|
27
31
|
onChosen?: ((val: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RuleExpression } from 'vee-validate';
|
|
2
2
|
import type { Ref, ToRefs } from 'vue';
|
|
3
3
|
import type { MaybeNullOrUndefined, Nullable } from '@speckle/shared';
|
|
4
|
+
import type { LabelPosition } from './input';
|
|
4
5
|
export type InputColor = 'page' | 'foundation' | 'transparent';
|
|
5
|
-
export type LabelPosition = 'top' | 'left';
|
|
6
6
|
/**
|
|
7
7
|
* Common setup for text input & textarea fields
|
|
8
8
|
*/
|
|
@@ -6,14 +6,14 @@ export type AvatarUser = {
|
|
|
6
6
|
export type AvatarUserWithId = AvatarUser & {
|
|
7
7
|
id: string;
|
|
8
8
|
};
|
|
9
|
-
export type UserAvatarSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | 'xxl' | 'editable';
|
|
9
|
+
export type UserAvatarSize = '2xs' | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | 'xxl' | 'editable';
|
|
10
10
|
export declare function useAvatarSizeClasses(params: {
|
|
11
11
|
props: ToRefs<{
|
|
12
12
|
size?: UserAvatarSize;
|
|
13
13
|
}>;
|
|
14
14
|
}): {
|
|
15
|
-
heightClasses: import("vue").ComputedRef<"h-8" | "h-6" | "h-10" | "h-14" | "h-5" | "h-32" | "h-60">;
|
|
16
|
-
widthClasses: import("vue").ComputedRef<"w-6" | "w-10" | "w-8" | "w-5" | "w-14" | "w-32" | "w-60">;
|
|
15
|
+
heightClasses: import("vue").ComputedRef<"h-8" | "h-6" | "h-10" | "h-14" | "h-4" | "h-5" | "h-32" | "h-60">;
|
|
16
|
+
widthClasses: import("vue").ComputedRef<"w-6" | "w-10" | "w-8" | "w-4" | "w-5" | "w-14" | "w-32" | "w-60">;
|
|
17
17
|
sizeClasses: import("vue").ComputedRef<string>;
|
|
18
18
|
iconClasses: import("vue").ComputedRef<"w-5 h-5" | "w-3 h-3" | "w-8 h-8" | "w-10 h-10" | "w-20 h-20" | "w-4 h-4">;
|
|
19
19
|
};
|