@hubspot/ui-extensions 0.11.5 → 0.11.6

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.
Files changed (47) hide show
  1. package/dist/__tests__/crm/hooks/useAssociations.spec.js +96 -0
  2. package/dist/__tests__/crm/hooks/useCrmProperties.spec.js +170 -1
  3. package/dist/crm/hooks/useAssociations.d.ts +2 -0
  4. package/dist/crm/hooks/useAssociations.js +87 -0
  5. package/dist/crm/hooks/useCrmProperties.d.ts +5 -1
  6. package/dist/crm/hooks/useCrmProperties.js +81 -2
  7. package/dist/shared/types/components/accordion.d.ts +5 -5
  8. package/dist/shared/types/components/alert.d.ts +2 -2
  9. package/dist/shared/types/components/button-row.d.ts +5 -2
  10. package/dist/shared/types/components/button.d.ts +16 -10
  11. package/dist/shared/types/components/chart.d.ts +3 -3
  12. package/dist/shared/types/components/description-list.d.ts +2 -2
  13. package/dist/shared/types/components/dropdown.d.ts +8 -8
  14. package/dist/shared/types/components/empty-state.d.ts +5 -7
  15. package/dist/shared/types/components/error-state.d.ts +2 -2
  16. package/dist/shared/types/components/form.d.ts +2 -2
  17. package/dist/shared/types/components/heading.d.ts +1 -1
  18. package/dist/shared/types/components/icon.d.ts +4 -5
  19. package/dist/shared/types/components/illustration.d.ts +12 -0
  20. package/dist/shared/types/components/image.d.ts +9 -4
  21. package/dist/shared/types/components/inputs.d.ts +51 -64
  22. package/dist/shared/types/components/layouts.d.ts +17 -24
  23. package/dist/shared/types/components/link.d.ts +8 -5
  24. package/dist/shared/types/components/loading-spinner.d.ts +3 -3
  25. package/dist/shared/types/components/modal.d.ts +5 -5
  26. package/dist/shared/types/components/panel.d.ts +7 -7
  27. package/dist/shared/types/components/progress-bar.d.ts +4 -4
  28. package/dist/shared/types/components/selects.d.ts +11 -20
  29. package/dist/shared/types/components/statistics.d.ts +2 -2
  30. package/dist/shared/types/components/status-tag.d.ts +5 -5
  31. package/dist/shared/types/components/step-indicator.d.ts +5 -7
  32. package/dist/shared/types/components/table.d.ts +22 -12
  33. package/dist/shared/types/components/tabs.d.ts +10 -10
  34. package/dist/shared/types/components/tag.d.ts +2 -2
  35. package/dist/shared/types/components/text.d.ts +15 -21
  36. package/dist/shared/types/components/tile.d.ts +2 -2
  37. package/dist/shared/types/components/toggle.d.ts +12 -14
  38. package/dist/shared/types/components/toggleInputs.d.ts +26 -19
  39. package/dist/shared/types/components/tooltip.d.ts +1 -1
  40. package/dist/shared/types/crm.d.ts +52 -0
  41. package/dist/shared/types/http-requests.d.ts +2 -2
  42. package/dist/shared/types/shared.d.ts +123 -78
  43. package/dist/shared/types/shared.js +123 -78
  44. package/dist/testing/__tests__/mocks.useAssociations.spec.js +92 -4
  45. package/dist/testing/__tests__/mocks.useCrmProperties.spec.js +55 -7
  46. package/dist/testing/internal/mocks/mock-hooks.js +4 -0
  47. package/package.json +2 -2
@@ -3,27 +3,33 @@ import { OverlayComponentProps, HrefProp, TShirtSizes, IconNames, ExtensionEvent
3
3
  import { ReactionsHandler } from '../reactions.ts';
4
4
  export interface BaseButtonProps extends BaseComponentProps {
5
5
  /**
6
- * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
6
+ * A function that will be invoked when the button is clicked. It receives no arguments and its return value is ignored.
7
7
  *
8
8
  * @event
9
9
  */
10
10
  onClick?: ReactionsHandler<ExtensionEvent>;
11
11
  /**
12
- * A URL that will be opened when the button is clicked. If the value is a URL external to `hubspot.com` it will be opened in a new tab.
12
+ * Include this prop to open a URL on click. Contains the following fields:
13
+ * - `url` (string): the URL that will open on click.
14
+ * - `external` (boolean): set to `true` to open the URL in a new tab and display an external link icon. By default:
15
+ * - Links to HubSpot app pages will open in the same tab and will not include an icon.
16
+ * - Links to non-HubSpot app pages will open in a new tab and include the icon.
17
+ *
18
+ * When a button includes both `href` and an `onClick` action, both will be executed on button click.
13
19
  */
14
20
  href?: HrefProp;
15
21
  /**
16
- * Determines whether or not the button should be disabled.
22
+ * When set to `true`, the button will render in a greyed-out state and cannot be clicked.
17
23
  */
18
24
  disabled?: boolean;
19
25
  /**
20
- * Sets the color variation of the button.
26
+ * Sets the color of the button.
21
27
  *
22
28
  * @defaultValue `"secondary"`
23
29
  */
24
30
  variant?: 'primary' | 'secondary' | 'destructive' | 'transparent';
25
31
  /**
26
- * Sets the HTML attribute "role" of the button.
32
+ * Sets the `role` HTML attribute of the button.
27
33
  *
28
34
  * @defaultValue `"button"`
29
35
  */
@@ -33,13 +39,13 @@ export interface BaseButtonProps extends BaseComponentProps {
33
39
  */
34
40
  children: ReactNode;
35
41
  /**
36
- * Sets the size of the button.
42
+ * The size of the button.
37
43
  *
38
44
  * @defaultValue `"md"`
39
45
  */
40
46
  size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
41
47
  /**
42
- * When set to `true`, long button text will be truncated with an ellipsis (`...`) and the full text will appear in a tooltip on hover.
48
+ * When set to `true`, long button text will be truncated with an ellipsis (`...`), with the full text displayed in a tooltip on hover.
43
49
  *
44
50
  * @defaultValue `false`
45
51
  */
@@ -71,13 +77,13 @@ export interface LoadingButtonOverlayOptions {
71
77
  */
72
78
  export interface LoadingButtonProps extends BaseButtonProps, OverlayComponentProps {
73
79
  /**
74
- * Sets the color variation of the button.
80
+ * Sets the color of the button.
75
81
  *
76
82
  * @defaultValue `"secondary"`
77
83
  */
78
84
  variant?: 'primary' | 'secondary' | 'destructive';
79
85
  /**
80
- * If true, the loading indicator is shown and the button becomes disabled.
86
+ * Set to `true` to display the loading indicator and disable the button. Default is `false`.
81
87
  *
82
88
  * @defaultValue `false`
83
89
  */
@@ -87,7 +93,7 @@ export interface LoadingButtonProps extends BaseButtonProps, OverlayComponentPro
87
93
  */
88
94
  overlayOptions?: LoadingButtonOverlayOptions;
89
95
  /**
90
- * Controls the icon that's shown after loading is done.
96
+ * Set to an icon name to display an icon after loading. By default, will display a check mark.
91
97
  *
92
98
  * @defaultValue `"success"`
93
99
  */
@@ -13,18 +13,18 @@ export type BarChartProps = ChartProps;
13
13
  export type LineChartProps = ChartProps;
14
14
  export interface ChartProps extends BaseComponentProps {
15
15
  /**
16
- * The data used to render the chart. You can optionally provide configuration options.
16
+ * An object containing the chart's data in an array.
17
17
  */
18
18
  data: ChartDataRow[] | {
19
19
  data: ChartDataRow[];
20
20
  options?: ChartDataOptions;
21
21
  };
22
22
  /**
23
- * The configuration for the axes of the chart.
23
+ * Configures the chart's axes.
24
24
  */
25
25
  axes: ChartAxisPair;
26
26
  /**
27
- * Configuration options for the chart as a whole.
27
+ * Additional chart configuration options.
28
28
  */
29
29
  options?: ChartOptions;
30
30
  }
@@ -12,7 +12,7 @@ export interface DescriptionListItemProps extends BaseComponentProps {
12
12
  */
13
13
  children: ReactNode;
14
14
  /**
15
- * Text to be displayed as the label.
15
+ * Text to display as the label.
16
16
  *
17
17
  */
18
18
  label: string;
@@ -29,7 +29,7 @@ export interface DescriptionListProps extends BaseComponentProps {
29
29
  */
30
30
  children: ReactNode;
31
31
  /**
32
- * The direction the label/value pairs are placed in the description list container.
32
+ * The direction that the label and value pairs are displayed.
33
33
  *
34
34
  * @defaultValue `"column"`
35
35
  */
@@ -31,8 +31,7 @@ export interface DropdownButtonItemProps extends OverlayComponentProps, BaseComp
31
31
  */
32
32
  children: ReactNode;
33
33
  /**
34
- * A function that will be invoked when the item is clicked.
35
- * It receives no arguments and its return value is ignored.
34
+ * The function invoked when the item is clicked.
36
35
  *
37
36
  * @event
38
37
  */
@@ -45,8 +44,9 @@ export interface DropdownButtonItemProps extends OverlayComponentProps, BaseComp
45
44
  */
46
45
  export interface DropdownProps extends BaseComponentProps {
47
46
  /**
48
- * The list of options to be rendered within the dropdown menu.
49
- * Each option represents an entry in the Dropdown.
47
+ * The options included in the dropdown menu. Each option includes:
48
+ * - `label`: the text label for the option.
49
+ * - `onClick`: the function that gets invoked when the option is selected.
50
50
  *
51
51
  * @deprecated This prop is deprecated and will be removed in a future release.
52
52
  * Use child components instead to define dropdown menu items. For example,
@@ -54,25 +54,25 @@ export interface DropdownProps extends BaseComponentProps {
54
54
  */
55
55
  options?: DropdownOption[];
56
56
  /**
57
- * Controls the appearance of the dropdown button
57
+ * The type of dropdown button to display. `'primary'` and `'secondary'` will display a blue and grey button, respectively, while `'transparent'` will display a blue hyperlink.
58
58
  *
59
59
  * @defaultValue `"secondary"`
60
60
  */
61
61
  variant?: 'primary' | 'secondary' | 'transparent';
62
62
  /**
63
- * Sets the content for the dropdown button.
63
+ * The button text.
64
64
  *
65
65
  * @defaultValue `"More"`
66
66
  */
67
67
  buttonText?: string;
68
68
  /**
69
- * Sets the size of the dropdown button.
69
+ * The size of the button.
70
70
  *
71
71
  * @defaultValue `"md"`
72
72
  */
73
73
  buttonSize?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
74
74
  /**
75
- * Disables the ability to focus and click-to-expand of the dropdown button
75
+ * When set to `true`, the dropdown button cannot be focused or clicked.
76
76
  *
77
77
  * @defaultValue `false`
78
78
  */
@@ -8,7 +8,7 @@ export type EmptyStateImageName = 'addOnReporting' | 'announcement' | 'api' | 'a
8
8
  */
9
9
  export interface EmptyStateProps extends BaseComponentProps {
10
10
  /**
11
- * When set to `true`, removes the default vertical margins in the component.
11
+ * When set to `true`, removes the default vertical margins for the component.
12
12
  *
13
13
  * @defaultValue `false`
14
14
  */
@@ -21,30 +21,28 @@ export interface EmptyStateProps extends BaseComponentProps {
21
21
  /**
22
22
  * The text for the title header.
23
23
  *
24
- * @defaultValue `"All is not lost."`
25
- *
26
24
  */
27
25
  title?: string;
28
26
  /**
29
- * Sets the layout direction for the content. Can be either `horizontal` or `vertical`.
27
+ * The layout direction of the content.
30
28
  *
31
29
  * @defaultValue `"horizontal"`
32
30
  */
33
31
  layout?: 'horizontal' | 'vertical';
34
32
  /**
35
- * When set to `true`, swaps the visual order of the text (primary) and image (secondary) content. This ensures the primary content is still presented first to assistive technology.
33
+ * When set to `true`, swaps out the visual order of the text (primary) and image (secondary) content. This ensures that the primary content is presented first to screen readers.
36
34
  *
37
35
  * @defaultValue `false`
38
36
  */
39
37
  reverseOrder?: boolean;
40
38
  /**
41
- * The max-width(in pixels) for the image container.
39
+ * The max-width for the image container.
42
40
  *
43
41
  * @defaultValue `250`
44
42
  */
45
43
  imageWidth?: number;
46
44
  /**
47
- * The name of the image to display.
45
+ * The name of the image.
48
46
  *
49
47
  * @defaultValue `"emptyStateCharts"`
50
48
  */
@@ -12,12 +12,12 @@ export interface ErrorStateProps extends BaseComponentProps {
12
12
  */
13
13
  children: ReactNode;
14
14
  /**
15
- * The text of the title header.
15
+ * The text of the component header.
16
16
  *
17
17
  */
18
18
  title?: string;
19
19
  /**
20
- * The type of error image that will be shown.
20
+ * The type of image that will be displayed.
21
21
  *
22
22
  * @defaultValue `"error"`
23
23
  */
@@ -14,7 +14,7 @@ export interface FormProps extends BaseComponentProps {
14
14
  */
15
15
  children: ReactNode;
16
16
  /**
17
- * The function that is called when the form is submitted. It will receive a FormSubmitExtensionEvent as an argument and its return value will be ignored. This function should be used instead of Button's `onClick` for the Form's submit button.
17
+ * The function that is called when the form is submitted. It will receive a `RemoteEvent` as an argument and its return value will be ignored.
18
18
  *
19
19
  * @event
20
20
  */
@@ -22,7 +22,7 @@ export interface FormProps extends BaseComponentProps {
22
22
  /** @deprecated the value for `preventDefault` is now always `true`, use `onSubmit` to handle all form submission behavior */
23
23
  preventDefault?: boolean;
24
24
  /**
25
- * Specifies how autcomplete behaves in the entire form.
25
+ * Set this field to `'off'` to prevent autocompletion software (e.g., browser, password managers) from auto-filling form fields.
26
26
  * @defaultValue `"on"`
27
27
  */
28
28
  autoComplete?: 'off' | 'on';
@@ -12,7 +12,7 @@ export interface HeadingProps extends BaseComponentProps {
12
12
  */
13
13
  children: ReactNode;
14
14
  /**
15
- * When set to true, text will not line break.
15
+ * When set to `true`, text will not line break.
16
16
  *
17
17
  * @defaultValue `false`
18
18
  */
@@ -7,23 +7,22 @@ export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
7
7
  */
8
8
  export interface IconProps extends BaseComponentProps {
9
9
  /**
10
- * Sets the icon color. By default, the icon will use `inherit`, which inherits the color from its parent element.
10
+ * The color of the icon.
11
11
  *
12
12
  * @defaultValue `"inherit"`
13
13
  */
14
14
  color?: IconColor;
15
15
  /**
16
- * Sets the specific icon to display.
16
+ * Sets the icon to display.
17
17
  */
18
18
  name: IconNames;
19
19
  /**
20
- * Sets the size of the icon. If this prop is not provided, the icon will default to the size of its parent.
20
+ * By default, the size of the icon is set automatically based on the parent component. If you need to override the default size, you can specify one to use instead.
21
21
  *
22
- * @defaultValue `"medium"`
23
22
  */
24
23
  size?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
25
24
  /**
26
- * Sets the text that a screenreader will read for this icon.
25
+ * Sets the text that screen readers will read for the icon.
27
26
  */
28
27
  screenReaderText?: string;
29
28
  }
@@ -5,9 +5,21 @@ import { BaseComponentProps } from '../shared.ts';
5
5
  * @category Component Props
6
6
  */
7
7
  export interface IllustrationProps extends BaseComponentProps {
8
+ /**
9
+ * The name of the illustration.
10
+ */
8
11
  name: IllustrationNames;
12
+ /**
13
+ * The illustration's alt text for accessibility.
14
+ */
9
15
  alt: string;
16
+ /**
17
+ * The width of the illustration in pixels.
18
+ */
10
19
  width?: number;
20
+ /**
21
+ * The height of the illustration in pixels.
22
+ */
11
23
  height?: number;
12
24
  }
13
25
  export declare const illustrationNames: {
@@ -7,23 +7,28 @@ import { ReactionsHandler } from '../reactions.ts';
7
7
  */
8
8
  export interface ImageProps extends OverlayComponentProps, BaseComponentProps {
9
9
  /**
10
- * The alt text for the image.
10
+ * The alt text for the image, similar to the `alt` attribute for the HTML img tag.
11
11
  *
12
12
  */
13
13
  alt?: string;
14
14
  /**
15
- * If provided, will be used as the href that will be opened in a new browser tab on click.
15
+ * When provided, sets the URL that will open when the image is clicked. Contains the following fields:
16
+ * - `url` (string): the URL that will open on click.
17
+ * - `external` (boolean): set to `true` to open the URL in a new tab. By default:
18
+ * - Links to HubSpot app pages will open in the same tab.
19
+ * - Links to non-HubSpot app pages will open in a new tab.
16
20
  *
21
+ * When an image includes both `href` and an `onClick` action, both will be executed on button click.
17
22
  */
18
23
  href?: HrefProp;
19
24
  /**
20
- * A function that will be called when the image is clicked.
25
+ * A function that will be called when the image is clicked. This function will receive no arguments and any returned values will be ignored.
21
26
  *
22
27
  * @event
23
28
  */
24
29
  onClick?: ReactionsHandler<ExtensionEvent>;
25
30
  /**
26
- * The URL of the image to display.
31
+ * The source of the image display. You can specify a URL or you can import the image directly if it's within your project.
27
32
  *
28
33
  */
29
34
  src: string;
@@ -5,11 +5,11 @@ import { BaseComponentProps } from '../shared.ts';
5
5
  * */
6
6
  interface BaseInputProps<T = string, V = string> extends BaseComponentProps {
7
7
  /**
8
- * The label text to display for the form input element.
8
+ * The text that displays above the input. Required if `inputType` is not set to `hidden`.
9
9
  */
10
10
  label: string;
11
11
  /**
12
- * The unique identifier for the input element, this could be thought of as the HTML5 [Input element's name attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name).
12
+ * The input's unique identifier, similar to the HTML input element name attribute.
13
13
  */
14
14
  name: string;
15
15
  /**
@@ -17,31 +17,31 @@ interface BaseInputProps<T = string, V = string> extends BaseComponentProps {
17
17
  */
18
18
  value?: T;
19
19
  /**
20
- * Determines if the required indicator should be displayed.
20
+ * When set to `true`, displays a required field indicator.
21
21
  *
22
22
  * @defaultValue `false`
23
23
  */
24
24
  required?: boolean;
25
25
  /**
26
- * Determines if the field is editable or not.
26
+ * When set to `true`, users will not be able to enter a value into the field.
27
27
  *
28
28
  * @defaultValue `false`
29
29
  */
30
30
  readOnly?: boolean;
31
31
  /**
32
- * Instructional message to display to the user to help understand the purpose of the input.
32
+ * Displayed text that describes the field's purpose.
33
33
  */
34
34
  description?: string;
35
35
  /**
36
- * Text that will appear in a tooltip next to the input label.
36
+ * The text that displays in a tooltip next to the input label.
37
37
  */
38
38
  tooltip?: string;
39
39
  /**
40
- * Text that appears in the input when it has no value set.
40
+ * The text that appears in the input before a value is set.
41
41
  */
42
42
  placeholder?: string;
43
43
  /**
44
- * If set to `true`, `validationMessage` is displayed as an error message, if it was provided. The input will also render its error state to let the user know there is an error. If set to `false`, `validationMessage` is displayed as a success message.
44
+ * When set to `true`, `validationMessage` is displayed as an error message if provided. The input will also render in an error state so that users are aware. If left `false`, `validationMessage` is displayed as a success message.
45
45
  *
46
46
  * @defaultValue `false`
47
47
  */
@@ -51,29 +51,29 @@ interface BaseInputProps<T = string, V = string> extends BaseComponentProps {
51
51
  */
52
52
  defaultValue?: T;
53
53
  /**
54
- * The text to show under the input for error or success validations.
54
+ * The text to show if the input has an error.
55
55
  */
56
56
  validationMessage?: string;
57
57
  /**
58
- * A callback function that is invoked when the value is committed. Currently these times are `onBlur` of the input and when the user submits the form.
58
+ * A callback function that is invoked when the value is committed. Currently, these are `onBlur` of the input and when the user submits the form.
59
59
  *
60
60
  * @event
61
61
  */
62
62
  onChange?: (value: V) => void;
63
63
  /**
64
- * A function that is called and passed the value every time the field is edited by the user. It is recommended that you do not use this value to update state, that is what `onChange` should be used for. Instead this should be used for validation.
64
+ * A function that is called and passes the value when the field is edited by the user. Should be used for validation. It's recommended that you don't use this value to update state (use `onChange` instead).
65
65
  *
66
66
  * @event
67
67
  */
68
68
  onInput?: (value: V) => void;
69
69
  /**
70
- * A function that is called and passed the value every time the field loses focus.
70
+ * A function that is called and passes the value when the field loses focus.
71
71
  *
72
72
  * @event
73
73
  */
74
74
  onBlur?: (value: V) => void;
75
75
  /**
76
- * A function that is called and passed the value every time the field gets focused.
76
+ * A function that is called and passed the value when the field gets focused.
77
77
  *
78
78
  * @event
79
79
  */
@@ -86,7 +86,7 @@ interface BaseInputProps<T = string, V = string> extends BaseComponentProps {
86
86
  */
87
87
  export interface InputProps extends BaseInputProps {
88
88
  /**
89
- * Sets the type of input to render.
89
+ * The type of input. An input with the `'password'` type will hide the characters that the user types.
90
90
  *
91
91
  * @defaultValue `"text"`
92
92
  */
@@ -103,7 +103,7 @@ export interface TextAreaProps extends BaseInputProps {
103
103
  */
104
104
  cols?: number;
105
105
  /**
106
- * The maximum number of characters (UTF-16 code units) that the user can enter. If not specified, the max length is unlimited.
106
+ * The maximum number of characters (UTF-16 code units) that the user can enter. If not specified, maximum length is unlimited.
107
107
  */
108
108
  maxLength?: number;
109
109
  /**
@@ -111,7 +111,7 @@ export interface TextAreaProps extends BaseInputProps {
111
111
  */
112
112
  rows?: number;
113
113
  /**
114
- * Sets whether the element is resizable, and if so in which directions.
114
+ * Sets whether the text field is resizable, and if so, in which directions.
115
115
  *
116
116
  * @defaultValue `"both"`
117
117
  */
@@ -137,21 +137,18 @@ type BaseInputForNumber = Omit<BaseInputProps<number, number>, 'onInput'>;
137
137
  export interface NumberInputProps extends BaseInputForNumber {
138
138
  /**
139
139
  * Sets the lower bound of the input.
140
- *
141
140
  */
142
141
  min?: number;
143
142
  /**
144
143
  * Sets the upper bound of the input.
145
- *
146
144
  */
147
145
  max?: number;
148
146
  /**
149
147
  * Sets the number of digits to the right of the decimal point.
150
- *
151
148
  */
152
149
  precision?: number;
153
150
  /**
154
- * Formats the input as a decimal point (decimal) or percentage (percentage).
151
+ * Formats the input as a decimal or percentage.
155
152
  *
156
153
  * @defaultValue `"decimal"`
157
154
  */
@@ -171,16 +168,15 @@ export interface CurrencyInputProps extends BaseInputForNumber {
171
168
  */
172
169
  currency?: string;
173
170
  /**
174
- * Sets the number of decimal places for the currency
175
- * If not provided, defaults to currency-specific precision
171
+ * Sets the number of decimal places for the currency. If not provided, defaults to currency-specific precision.
176
172
  */
177
173
  precision?: number;
178
174
  /**
179
- * Sets the lower bound of the input
175
+ * Sets the lower bound of the input (handled by underlying component).
180
176
  */
181
177
  min?: number;
182
178
  /**
183
- * Sets the upper bound of the input
179
+ * Sets the upper bound of the input (handled by underlying component).
184
180
  */
185
181
  max?: number;
186
182
  }
@@ -190,20 +186,18 @@ export interface CurrencyInputProps extends BaseInputForNumber {
190
186
  * @category Component Props
191
187
  */
192
188
  export interface StepperInputProps extends Omit<NumberInputProps, 'onInput'> {
193
- /** The amount that the current value will increase or decrease on each step button click.
189
+ /** The amount that the current value will increase or decrease by. Default is `1`.
194
190
  * @defaultValue `1`
195
191
  */
196
192
  stepSize?: number;
197
193
  /**
198
- * Text that will appear in a tooltip next to the step up button when users
199
- * can't increase the current value.
194
+ * Text that will appear in a tooltip when the user has reached the minimum value.
200
195
  */
201
- maxValueReachedTooltip?: string;
196
+ minValueReachedTooltip?: string;
202
197
  /**
203
- * Text that will appear in a tooltip next to the step down button when users
204
- * can't decrease the current value.
198
+ * Text that will appear in a tooltip when the user has reached the maximum value.
205
199
  */
206
- minValueReachedTooltip?: string;
200
+ maxValueReachedTooltip?: string;
207
201
  }
208
202
  /** Object that represents dates. */
209
203
  export interface BaseDate {
@@ -231,60 +225,53 @@ type BaseDateInputForDate = Omit<BaseInputProps<BaseDate | null, DateInputEvents
231
225
  */
232
226
  export interface DateInputProps extends BaseDateInputForDate {
233
227
  /**
234
- * Sets the earliest date that will be valid.
228
+ * Sets the earliest valid date available using the following format: `{ year: number; month: number; date: number }`
235
229
  */
236
230
  min?: BaseDate;
237
231
  /**
238
- * Sets the latest date that will be valid.
232
+ * Sets the latest valid date available using the following format: `{ year: number; month: number; date: number }`
239
233
  */
240
234
  max?: BaseDate;
241
235
  /**
242
236
  * Sets the message that users will see when they hover over dates before the min date.
243
- *
244
- * @defaultValue `"You must choose a newer date"`
245
237
  */
246
238
  minValidationMessage?: string;
247
239
  /**
248
240
  * Sets the message that users will see when the hover over dates after the max date.
249
- *
250
- * @defaultValue `"You must choose an older date"`
251
241
  */
252
242
  maxValidationMessage?: string;
253
243
  /**
254
- * Sets the date format that input will display to users.
255
- *
256
- * @defaultValue `short`
244
+ * The date format.
257
245
  *
258
- * #### Format Options
246
+ * - `short`: 09/04/1986
247
+ * - `long`: September 4, 1986
248
+ * - `medium`: Sep 4, 1986
249
+ * - `standard`: 1986-09-04
250
+ * - `YYYY-MM-DD`: 1986-09-04
251
+ * - `L`: 09/04/1986
252
+ * - `LL`: September 4, 1986
253
+ * - `ll`: Sep 4, 1986
259
254
  *
260
- * - short: `09/04/1986`
261
- * - long: `September 4, 1986`
262
- * - medium : `Sep 4, 1986`
263
- * - standard: `1986-09-04`
264
- * - L: `09/04/1986`
265
- * - LL: `September 4, 1986`
266
- * - ll : `Sep 4, 1986`
267
- * - YYYY-MM-DD: `1986-09-04`
255
+ * @defaultValue `'short'`
268
256
  */
269
257
  format?: 'YYYY-MM-DD' | 'L' | 'LL' | 'll' | 'short' | 'long' | 'medium' | 'standard';
270
258
  /**
271
- * Sets the timezone that the component will use to calculate valid dates.
272
- *
273
- * @defaultValue `"userTz"`
259
+ * Sets the label of the button that clears the date.
274
260
  */
275
- timezone?: 'userTz' | 'portalTz';
261
+ clearButtonLabel?: string;
276
262
  /**
277
- * Sets the label of the clear button.
278
- *
279
- * @defaultValue `"Clear"`
263
+ * Sets the label of the button that inserts today's date.
280
264
  */
281
- clearButtonLabel?: string;
265
+ todayButtonLabel?: string;
282
266
  /**
283
- * Sets the label of the today button.
267
+ * Sets the timezone that the component will user to calculate valid dates.
268
+ *
269
+ * - `userTz` (default): the user's time zone.
270
+ * - `portalTz`: the portal's default time zone.
284
271
  *
285
- * @defaultValue `"Today"`
272
+ * @defaultValue `'userTz'`
286
273
  */
287
- todayButtonLabel?: string;
274
+ timezone?: 'userTz' | 'portalTz';
288
275
  }
289
276
  /**
290
277
  * Object that represents times.
@@ -320,11 +307,11 @@ export interface TimeInputProps extends BaseTimeInputForTime {
320
307
  */
321
308
  onChange?: (value: TimeInputEventsPayload) => void;
322
309
  /**
323
- * Sets the earliest time that will be valid.
310
+ * Sets the earliest valid time available.
324
311
  */
325
312
  min?: BaseTime;
326
313
  /**
327
- * Sets the latest time that will be valid.
314
+ * Sets the latest valid time available.
328
315
  */
329
316
  max?: BaseTime;
330
317
  /**
@@ -334,7 +321,7 @@ export interface TimeInputProps extends BaseTimeInputForTime {
334
321
  */
335
322
  interval?: number;
336
323
  /**
337
- * Sets the timezone that the component will display alongside times in the TimeInput. This will not modify the available valid inputs.
324
+ * Sets the timezone that the component will use to calculate valid times.
338
325
  *
339
326
  */
340
327
  timezone?: 'userTz' | 'portalTz';
@@ -345,7 +332,7 @@ export interface TimeInputProps extends BaseTimeInputForTime {
345
332
  * @category Component Props
346
333
  */
347
334
  export interface SearchInputProps extends BaseInputProps {
348
- /** Shows a clear button to clear the input. Default is true. */
335
+ /** When set to `true`, shows a clear button to clear the input. Default is `true`. */
349
336
  clearable?: boolean;
350
337
  }
351
338
  export {};