@speckle/ui-components 2.22.6 → 2.23.1

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,15 +1,9 @@
1
- import type { PropAnyComponent } from '../../helpers/common/components';
2
- type AlertColor = 'success' | 'danger' | 'warning' | 'info';
1
+ import type { PropAnyComponent, AlertAction, AlertColor } from '../../helpers/common/components';
3
2
  type Size = 'default' | 'xs';
4
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
4
  color?: AlertColor | undefined;
6
5
  withDismiss?: boolean | undefined;
7
- actions?: {
8
- title: string;
9
- url?: string | undefined;
10
- onClick?: (() => void) | undefined;
11
- externalUrl?: boolean | undefined;
12
- }[] | undefined;
6
+ actions?: AlertAction[] | undefined;
13
7
  customIcon?: PropAnyComponent | undefined;
14
8
  hideIcon?: boolean | undefined;
15
9
  size?: Size | undefined;
@@ -21,12 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
21
15
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
22
16
  color?: AlertColor | undefined;
23
17
  withDismiss?: boolean | undefined;
24
- actions?: {
25
- title: string;
26
- url?: string | undefined;
27
- onClick?: (() => void) | undefined;
28
- externalUrl?: boolean | undefined;
29
- }[] | undefined;
18
+ actions?: AlertAction[] | undefined;
30
19
  customIcon?: PropAnyComponent | undefined;
31
20
  hideIcon?: boolean | undefined;
32
21
  size?: Size | undefined;
@@ -1,6 +1,7 @@
1
1
  type Props = {
2
2
  value: string;
3
3
  isMultiline?: boolean;
4
+ isIconButton?: boolean;
4
5
  rows?: number;
5
6
  };
6
7
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -170,6 +170,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
170
170
  type: StringConstructor;
171
171
  default: undefined;
172
172
  };
173
+ tooltipText: {
174
+ type: StringConstructor;
175
+ default: undefined;
176
+ };
177
+ customHelpClass: {
178
+ type: StringConstructor;
179
+ default: undefined;
180
+ };
173
181
  }, {
174
182
  focus: () => void;
175
183
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -351,6 +359,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
351
359
  type: StringConstructor;
352
360
  default: undefined;
353
361
  };
362
+ tooltipText: {
363
+ type: StringConstructor;
364
+ default: undefined;
365
+ };
366
+ customHelpClass: {
367
+ type: StringConstructor;
368
+ default: undefined;
369
+ };
354
370
  }>> & {
355
371
  onFocus?: (() => any) | undefined;
356
372
  onBlur?: (() => any) | undefined;
@@ -384,6 +400,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
384
400
  useLabelInErrors: boolean;
385
401
  customErrorMessage: string;
386
402
  hideErrorMessage: boolean;
403
+ customHelpClass: string;
387
404
  placeholder: Optional<string>;
388
405
  fullWidth: boolean;
389
406
  showOptional: boolean;
@@ -394,6 +411,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
394
411
  wrapperClasses: string;
395
412
  rightIcon: Optional<PropAnyComponent>;
396
413
  rightIconTitle: string;
414
+ tooltipText: string;
397
415
  }, {}>, {
398
416
  "input-right"?(_: {}): any;
399
417
  }>;
@@ -1,6 +1,7 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { MaybeAsync, Optional } from '@speckle/shared';
3
3
  import type { RuleExpression } from 'vee-validate';
4
+ import type { LabelPosition } from '../../../composables/form/input';
4
5
  declare const _default: <SingleItem extends string | number | Record<string, unknown>>(__VLS_props: {
5
6
  size?: Optional<"sm" | "base" | "lg" | "xl">;
6
7
  readonly label: string;
@@ -17,6 +18,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
17
18
  rules?: RuleExpression<SingleItem | SingleItem[] | undefined>;
18
19
  validateOnMount?: boolean | undefined;
19
20
  showRequired?: boolean | undefined;
21
+ labelPosition?: LabelPosition | undefined;
20
22
  validateOnValueUpdate?: boolean | undefined;
21
23
  search?: boolean | undefined;
22
24
  help?: Optional<string>;
@@ -24,6 +26,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
24
26
  useLabelInErrors?: boolean | undefined;
25
27
  readonly placeholder?: string | undefined;
26
28
  showOptional?: boolean | undefined;
29
+ tooltipText?: string | undefined;
27
30
  multiple?: boolean | undefined;
28
31
  items?: SingleItem[] | undefined;
29
32
  filterPredicate?: Optional<(item: SingleItem, searchString: string) => boolean>;
@@ -77,6 +80,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
77
80
  rules?: RuleExpression<SingleItem | SingleItem[] | undefined>;
78
81
  validateOnMount?: boolean | undefined;
79
82
  showRequired?: boolean | undefined;
83
+ labelPosition?: LabelPosition | undefined;
80
84
  validateOnValueUpdate?: boolean | undefined;
81
85
  search?: boolean | undefined;
82
86
  help?: Optional<string>;
@@ -84,6 +88,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
84
88
  useLabelInErrors?: boolean | undefined;
85
89
  readonly placeholder?: string | undefined;
86
90
  showOptional?: boolean | undefined;
91
+ tooltipText?: string | undefined;
87
92
  multiple?: boolean | undefined;
88
93
  items?: SingleItem[] | undefined;
89
94
  filterPredicate?: Optional<(item: SingleItem, searchString: string) => boolean>;
@@ -141,6 +146,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
141
146
  rules?: RuleExpression<SingleItem | SingleItem[] | undefined>;
142
147
  validateOnMount?: boolean | undefined;
143
148
  showRequired?: boolean | undefined;
149
+ labelPosition?: LabelPosition | undefined;
144
150
  validateOnValueUpdate?: boolean | undefined;
145
151
  search?: boolean | undefined;
146
152
  help?: Optional<string>;
@@ -148,6 +154,7 @@ declare const _default: <SingleItem extends string | number | Record<string, unk
148
154
  useLabelInErrors?: boolean | undefined;
149
155
  readonly placeholder?: string | undefined;
150
156
  showOptional?: boolean | undefined;
157
+ tooltipText?: string | undefined;
151
158
  multiple?: boolean | undefined;
152
159
  items?: SingleItem[] | undefined;
153
160
  filterPredicate?: Optional<(item: SingleItem, searchString: string) => boolean>;
@@ -1,5 +1,8 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  collapsed: import("vue").PropType<boolean>;
3
+ tag: {
4
+ type: import("vue").PropType<string>;
5
+ };
3
6
  title: {
4
7
  type: import("vue").PropType<string>;
5
8
  };
@@ -14,6 +17,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
14
17
  };
15
18
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
19
  collapsed: import("vue").PropType<boolean>;
20
+ tag: {
21
+ type: import("vue").PropType<string>;
22
+ };
17
23
  title: {
18
24
  type: import("vue").PropType<string>;
19
25
  };
@@ -23,6 +23,7 @@ export declare function useTextInputCore<V extends string | string[] = string>(p
23
23
  hideErrorMessage?: boolean;
24
24
  color?: InputColor;
25
25
  labelPosition?: LabelPosition;
26
+ customHelpClass?: string;
26
27
  }>;
27
28
  emit: {
28
29
  (e: 'change', val: {
@@ -11,3 +11,11 @@ export interface BulletStepType extends StepCoreType {
11
11
  export interface NumberStepType extends BulletStepType {
12
12
  description?: string;
13
13
  }
14
+ export type AlertColor = 'success' | 'danger' | 'warning' | 'info' | 'neutral';
15
+ export type AlertAction = {
16
+ title: string;
17
+ url?: string;
18
+ onClick?: () => void;
19
+ externalUrl?: boolean;
20
+ disabled?: boolean;
21
+ };
@@ -10,6 +10,10 @@ export declare const VALID_EMAIL: RegExp;
10
10
  * E-mail validation rule (not perfect, but e-mails should be validated by sending out confirmation e-mails anyway)
11
11
  */
12
12
  export declare const isEmail: GenericValidateFunction<string>;
13
+ /**
14
+ * Used for placeholders inputs where the user can leave the field empty
15
+ */
16
+ export declare const isEmailOrEmpty: GenericValidateFunction<string>;
13
17
  export declare const isOneOrMultipleEmails: GenericValidateFunction<string>;
14
18
  export declare const isRequired: GenericValidateFunction<unknown>;
15
19
  export declare const isSameAs: (otherFieldName: string, otherFieldDisplayName?: string) => GenericValidateFunction<unknown>;
@@ -32,6 +32,7 @@ export type LayoutDialogButton = {
32
32
  props?: Record<string, unknown> & FormButtonProps;
33
33
  onClick?: (e: MouseEvent) => void;
34
34
  disabled?: boolean;
35
+ disabledMessage?: string;
35
36
  submit?: boolean;
36
37
  /**
37
38
  * This should uniquely identify the button within the form. Even if you have different sets