@speckle/ui-components 2.16.1-alpha8 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,74 @@
1
- import { Nullable } from '@speckle/shared';
2
- import { AvatarUser } from '../../composables/user/avatar';
1
+ import { MaybeNullOrUndefined } from '@speckle/shared';
2
+ import { UserAvatarSize } from '../../composables/user/avatar';
3
+ type ModelType = MaybeNullOrUndefined<string>;
3
4
  declare const _default: import("vue").DefineComponent<{
4
- user: {
5
- type: import("vue").PropType<AvatarUser>;
5
+ editMode: import("vue").PropType<boolean>;
6
+ modelValue: {
7
+ type: import("vue").PropType<string | null>;
8
+ };
9
+ placeholder: {
10
+ type: import("vue").PropType<string>;
11
+ required: true;
12
+ };
13
+ name: {
14
+ type: import("vue").PropType<string>;
6
15
  required: true;
7
16
  };
17
+ rules: {
18
+ type: import("vue").PropType<string | Record<string, unknown> | import("vee-validate").GenericValidateFunction<ModelType> | import("vee-validate").GenericValidateFunction<ModelType>[] | {
19
+ validate(value: ModelType, options: Record<string, any>): Promise<ModelType>;
20
+ }>;
21
+ };
22
+ validateOnMount: {
23
+ type: import("vue").PropType<boolean>;
24
+ };
25
+ validateOnValueUpdate: {
26
+ type: import("vue").PropType<boolean>;
27
+ };
28
+ disabled: {
29
+ type: import("vue").PropType<boolean>;
30
+ };
31
+ size: {
32
+ type: import("vue").PropType<UserAvatarSize>;
33
+ };
8
34
  }, {
9
35
  open: () => boolean;
10
36
  close: () => boolean;
11
37
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- save: (newUrl: Nullable<string>) => void;
38
+ save: (newUrl: ModelType) => void;
39
+ "update:modelValue": (value: ModelType) => void;
13
40
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
- user: {
15
- type: import("vue").PropType<AvatarUser>;
41
+ editMode: import("vue").PropType<boolean>;
42
+ modelValue: {
43
+ type: import("vue").PropType<string | null>;
44
+ };
45
+ placeholder: {
46
+ type: import("vue").PropType<string>;
47
+ required: true;
48
+ };
49
+ name: {
50
+ type: import("vue").PropType<string>;
16
51
  required: true;
17
52
  };
53
+ rules: {
54
+ type: import("vue").PropType<string | Record<string, unknown> | import("vee-validate").GenericValidateFunction<ModelType> | import("vee-validate").GenericValidateFunction<ModelType>[] | {
55
+ validate(value: ModelType, options: Record<string, any>): Promise<ModelType>;
56
+ }>;
57
+ };
58
+ validateOnMount: {
59
+ type: import("vue").PropType<boolean>;
60
+ };
61
+ validateOnValueUpdate: {
62
+ type: import("vue").PropType<boolean>;
63
+ };
64
+ disabled: {
65
+ type: import("vue").PropType<boolean>;
66
+ };
67
+ size: {
68
+ type: import("vue").PropType<UserAvatarSize>;
69
+ };
18
70
  }>> & {
19
- onSave?: ((newUrl: Nullable<string>) => any) | undefined;
71
+ "onUpdate:modelValue"?: ((value: ModelType) => any) | undefined;
72
+ onSave?: ((newUrl: ModelType) => any) | undefined;
20
73
  }, {}, {}>;
21
74
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { Nullable } from '@speckle/shared';
2
- import { AvatarUser } from '../../composables/user/avatar';
2
+ import { AvatarUser, UserAvatarSize } from '../../composables/user/avatar';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  user: {
5
5
  type: import("vue").PropType<AvatarUser>;
@@ -8,6 +8,9 @@ declare const _default: import("vue").DefineComponent<{
8
8
  disabled: {
9
9
  type: import("vue").PropType<boolean>;
10
10
  };
11
+ size: {
12
+ type: import("vue").PropType<UserAvatarSize>;
13
+ };
11
14
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
15
  cancel: () => void;
13
16
  save: (val: Nullable<string>) => void;
@@ -19,6 +22,9 @@ declare const _default: import("vue").DefineComponent<{
19
22
  disabled: {
20
23
  type: import("vue").PropType<boolean>;
21
24
  };
25
+ size: {
26
+ type: import("vue").PropType<UserAvatarSize>;
27
+ };
22
28
  }>> & {
23
29
  onCancel?: (() => any) | undefined;
24
30
  onSave?: ((val: Nullable<string>) => any) | undefined;
@@ -1,7 +1,7 @@
1
1
  import { RuleExpression } from 'vee-validate';
2
2
  import { Ref, ToRefs } from 'vue';
3
3
  import { Nullable } from '@speckle/shared';
4
- export type InputColor = 'page' | 'foundation';
4
+ export type InputColor = 'page' | 'foundation' | 'transparent';
5
5
  /**
6
6
  * Common setup for text input & textarea fields
7
7
  */
@@ -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' | 'editable';
9
+ export type UserAvatarSize = '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-6" | "h-10" | "h-14" | "h-8" | "h-5" | "h-60">;
16
- widthClasses: import("vue").ComputedRef<"w-5" | "w-6" | "w-10" | "w-14" | "w-60" | "w-8">;
15
+ heightClasses: import("vue").ComputedRef<"h-10" | "h-14" | "h-8" | "h-6" | "h-5" | "h-32" | "h-60">;
16
+ widthClasses: import("vue").ComputedRef<"w-5" | "w-6" | "w-10" | "w-14" | "w-32" | "w-60" | "w-8">;
17
17
  sizeClasses: import("vue").ComputedRef<string>;
18
- iconClasses: import("vue").ComputedRef<"w-5 h-5" | "w-3 h-3" | "w-8 h-8" | "w-20 h-20" | "w-4 h-4">;
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
  };
@@ -0,0 +1 @@
1
+ export declare const isSSR: boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Visible, non-interactive elements with click handlers must have at least one keyboard listener for accessibility.
3
+ * You can wrap your click handler with this in @keypress, to run it when enter is pressed on the selected component
4
+ * See more: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/blob/main/docs/click-events-have-key-events.md
5
+ */
6
+ export declare function keyboardClick(cb: (e: KeyboardEvent) => void): (e: KeyboardEvent) => void;