@hubspot/ui-extensions 0.11.4 → 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 (155) 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/hooks/useExtensionActions.d.ts +4 -0
  8. package/dist/hooks/useExtensionActions.js +6 -0
  9. package/dist/hooks/useExtensionContext.d.ts +4 -0
  10. package/dist/hooks/useExtensionContext.js +6 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.js +2 -0
  13. package/dist/internal/global-utils.js +4 -0
  14. package/dist/internal/hook-utils.d.ts +10 -3
  15. package/dist/internal/hook-utils.js +10 -1
  16. package/dist/shared/types/components/accordion.d.ts +5 -5
  17. package/dist/shared/types/components/alert.d.ts +2 -2
  18. package/dist/shared/types/components/button-row.d.ts +5 -2
  19. package/dist/shared/types/components/button.d.ts +16 -10
  20. package/dist/shared/types/components/chart.d.ts +3 -3
  21. package/dist/shared/types/components/description-list.d.ts +2 -2
  22. package/dist/shared/types/components/dropdown.d.ts +8 -8
  23. package/dist/shared/types/components/empty-state.d.ts +5 -7
  24. package/dist/shared/types/components/error-state.d.ts +2 -2
  25. package/dist/shared/types/components/form.d.ts +2 -2
  26. package/dist/shared/types/components/heading.d.ts +1 -1
  27. package/dist/shared/types/components/icon.d.ts +4 -5
  28. package/dist/shared/types/components/illustration.d.ts +12 -0
  29. package/dist/shared/types/components/image.d.ts +9 -4
  30. package/dist/shared/types/components/inputs.d.ts +51 -64
  31. package/dist/shared/types/components/layouts.d.ts +17 -24
  32. package/dist/shared/types/components/link.d.ts +8 -5
  33. package/dist/shared/types/components/loading-spinner.d.ts +3 -3
  34. package/dist/shared/types/components/modal.d.ts +5 -5
  35. package/dist/shared/types/components/panel.d.ts +7 -7
  36. package/dist/shared/types/components/progress-bar.d.ts +4 -4
  37. package/dist/shared/types/components/selects.d.ts +11 -20
  38. package/dist/shared/types/components/statistics.d.ts +2 -2
  39. package/dist/shared/types/components/status-tag.d.ts +5 -5
  40. package/dist/shared/types/components/step-indicator.d.ts +5 -7
  41. package/dist/shared/types/components/table.d.ts +22 -12
  42. package/dist/shared/types/components/tabs.d.ts +10 -10
  43. package/dist/shared/types/components/tag.d.ts +2 -2
  44. package/dist/shared/types/components/text.d.ts +15 -21
  45. package/dist/shared/types/components/tile.d.ts +2 -2
  46. package/dist/shared/types/components/toggle.d.ts +12 -14
  47. package/dist/shared/types/components/toggleInputs.d.ts +26 -19
  48. package/dist/shared/types/components/tooltip.d.ts +1 -1
  49. package/dist/shared/types/crm.d.ts +52 -0
  50. package/dist/shared/types/http-requests.d.ts +2 -2
  51. package/dist/shared/types/shared.d.ts +123 -78
  52. package/dist/shared/types/shared.js +123 -78
  53. package/dist/shared/types/worker-globals.d.ts +15 -0
  54. package/dist/{experimental/testing → testing}/__tests__/debug.spec.js +1 -1
  55. package/dist/{experimental/testing → testing}/__tests__/find.spec.js +1 -1
  56. package/dist/{experimental/testing → testing}/__tests__/findAll.spec.js +1 -1
  57. package/dist/{experimental/testing → testing}/__tests__/findAllChildren.spec.js +1 -1
  58. package/dist/{experimental/testing → testing}/__tests__/findByTestId.spec.js +1 -1
  59. package/dist/{experimental/testing → testing}/__tests__/findChild.spec.js +1 -1
  60. package/dist/{experimental/testing → testing}/__tests__/fragments.spec.js +1 -1
  61. package/dist/{experimental/testing → testing}/__tests__/invalid-components.spec.js +1 -1
  62. package/dist/{experimental/testing → testing}/__tests__/isMatch.spec.js +1 -1
  63. package/dist/{experimental/testing → testing}/__tests__/logger.spec.js +1 -1
  64. package/dist/{experimental/testing → testing}/__tests__/maybeFind.spec.js +1 -1
  65. package/dist/{experimental/testing → testing}/__tests__/maybeFindByTestId.spec.js +1 -1
  66. package/dist/{experimental/testing → testing}/__tests__/maybeFindChild.spec.js +1 -1
  67. package/dist/{experimental/testing → testing}/__tests__/mocks.runServerlessFunction.spec.js +1 -1
  68. package/dist/testing/__tests__/mocks.useAssociations.spec.js +135 -0
  69. package/dist/testing/__tests__/mocks.useCrmProperties.spec.js +106 -0
  70. package/dist/testing/__tests__/mocks.useExtensionActions.spec.js +32 -0
  71. package/dist/testing/__tests__/mocks.useExtensionContext.spec.js +46 -0
  72. package/dist/{experimental/testing → testing}/__tests__/props.spec.js +1 -1
  73. package/dist/{experimental/testing → testing}/__tests__/testId.spec.js +1 -1
  74. package/dist/{experimental/testing → testing}/__tests__/trigger.spec.js +1 -1
  75. package/dist/{experimental/testing → testing}/__tests__/type-utils.spec.js +1 -1
  76. package/dist/testing/__tests__/waitFor.spec.d.ts +1 -0
  77. package/dist/{experimental/testing → testing}/__tests__/waitFor.spec.js +1 -1
  78. package/dist/{experimental/testing → testing}/internal/convert.js +1 -1
  79. package/dist/{experimental/testing → testing}/internal/element.d.ts +1 -1
  80. package/dist/{experimental/testing → testing}/internal/errors.js +1 -1
  81. package/dist/{experimental/testing → testing}/internal/match.d.ts +1 -1
  82. package/dist/{experimental/testing → testing}/internal/mocks/index.d.ts +1 -1
  83. package/dist/{experimental/testing → testing}/internal/mocks/mock-extension-point-api.d.ts +1 -1
  84. package/dist/{experimental/testing → testing}/internal/mocks/mock-extension-point-api.js +1 -1
  85. package/dist/testing/internal/mocks/mock-hooks.d.ts +3 -0
  86. package/dist/{experimental/testing → testing}/internal/mocks/mock-hooks.js +14 -0
  87. package/dist/{experimental/testing → testing}/internal/print.js +1 -1
  88. package/dist/{experimental/testing → testing}/internal/query.d.ts +1 -1
  89. package/dist/{experimental/testing → testing}/internal/query.js +1 -1
  90. package/dist/{experimental/testing → testing}/internal/types-internal.d.ts +7 -3
  91. package/dist/testing/internal/types-internal.js +1 -0
  92. package/dist/{experimental/testing → testing}/render.d.ts +1 -1
  93. package/dist/{experimental/testing → testing}/render.js +7 -7
  94. package/dist/{experimental/testing → testing}/types.d.ts +25 -5
  95. package/dist/{experimental/testing → testing}/utils.d.ts +1 -1
  96. package/dist/{experimental/testing → testing}/utils.js +1 -1
  97. package/package.json +3 -3
  98. package/dist/experimental/testing/__tests__/mocks.useAssociations.spec.js +0 -47
  99. package/dist/experimental/testing/__tests__/mocks.useCrmProperties.spec.js +0 -58
  100. package/dist/experimental/testing/internal/mocks/mock-hooks.d.ts +0 -2
  101. /package/dist/{experimental/testing → testing}/__tests__/createRenderer.spec.d.ts +0 -0
  102. /package/dist/{experimental/testing → testing}/__tests__/createRenderer.spec.js +0 -0
  103. /package/dist/{experimental/testing → testing}/__tests__/debug.spec.d.ts +0 -0
  104. /package/dist/{experimental/testing → testing}/__tests__/find.spec.d.ts +0 -0
  105. /package/dist/{experimental/testing → testing}/__tests__/findAll.spec.d.ts +0 -0
  106. /package/dist/{experimental/testing → testing}/__tests__/findAllChildren.spec.d.ts +0 -0
  107. /package/dist/{experimental/testing → testing}/__tests__/findByTestId.spec.d.ts +0 -0
  108. /package/dist/{experimental/testing → testing}/__tests__/findChild.spec.d.ts +0 -0
  109. /package/dist/{experimental/testing → testing}/__tests__/fragments.spec.d.ts +0 -0
  110. /package/dist/{experimental/testing → testing}/__tests__/invalid-components.spec.d.ts +0 -0
  111. /package/dist/{experimental/testing → testing}/__tests__/isMatch.spec.d.ts +0 -0
  112. /package/dist/{experimental/testing → testing}/__tests__/logger.spec.d.ts +0 -0
  113. /package/dist/{experimental/testing → testing}/__tests__/maybeFind.spec.d.ts +0 -0
  114. /package/dist/{experimental/testing → testing}/__tests__/maybeFindByTestId.spec.d.ts +0 -0
  115. /package/dist/{experimental/testing → testing}/__tests__/maybeFindChild.spec.d.ts +0 -0
  116. /package/dist/{experimental/testing → testing}/__tests__/mocks.actions.spec.d.ts +0 -0
  117. /package/dist/{experimental/testing → testing}/__tests__/mocks.actions.spec.js +0 -0
  118. /package/dist/{experimental/testing → testing}/__tests__/mocks.context.spec.d.ts +0 -0
  119. /package/dist/{experimental/testing → testing}/__tests__/mocks.context.spec.js +0 -0
  120. /package/dist/{experimental/testing → testing}/__tests__/mocks.runServerlessFunction.spec.d.ts +0 -0
  121. /package/dist/{experimental/testing → testing}/__tests__/mocks.useAssociations.spec.d.ts +0 -0
  122. /package/dist/{experimental/testing → testing}/__tests__/mocks.useCrmProperties.spec.d.ts +0 -0
  123. /package/dist/{experimental/testing/__tests__/props.spec.d.ts → testing/__tests__/mocks.useExtensionActions.spec.d.ts} +0 -0
  124. /package/dist/{experimental/testing/__tests__/testId.spec.d.ts → testing/__tests__/mocks.useExtensionContext.spec.d.ts} +0 -0
  125. /package/dist/{experimental/testing/__tests__/trigger.spec.d.ts → testing/__tests__/props.spec.d.ts} +0 -0
  126. /package/dist/{experimental/testing/__tests__/type-utils.spec.d.ts → testing/__tests__/testId.spec.d.ts} +0 -0
  127. /package/dist/{experimental/testing/__tests__/waitFor.spec.d.ts → testing/__tests__/trigger.spec.d.ts} +0 -0
  128. /package/dist/{experimental/testing/internal/types-internal.js → testing/__tests__/type-utils.spec.d.ts} +0 -0
  129. /package/dist/{experimental/testing → testing}/index.d.ts +0 -0
  130. /package/dist/{experimental/testing → testing}/index.js +0 -0
  131. /package/dist/{experimental/testing → testing}/internal/constants.d.ts +0 -0
  132. /package/dist/{experimental/testing → testing}/internal/constants.js +0 -0
  133. /package/dist/{experimental/testing → testing}/internal/convert.d.ts +0 -0
  134. /package/dist/{experimental/testing → testing}/internal/debug.d.ts +0 -0
  135. /package/dist/{experimental/testing → testing}/internal/debug.js +0 -0
  136. /package/dist/{experimental/testing → testing}/internal/document.d.ts +0 -0
  137. /package/dist/{experimental/testing → testing}/internal/document.js +0 -0
  138. /package/dist/{experimental/testing → testing}/internal/element.js +0 -0
  139. /package/dist/{experimental/testing → testing}/internal/errors.d.ts +0 -0
  140. /package/dist/{experimental/testing → testing}/internal/fragment.d.ts +0 -0
  141. /package/dist/{experimental/testing → testing}/internal/fragment.js +0 -0
  142. /package/dist/{experimental/testing → testing}/internal/match.js +0 -0
  143. /package/dist/{experimental/testing → testing}/internal/mocks/index.js +0 -0
  144. /package/dist/{experimental/testing → testing}/internal/print.d.ts +0 -0
  145. /package/dist/{experimental/testing → testing}/internal/root.d.ts +0 -0
  146. /package/dist/{experimental/testing → testing}/internal/root.js +0 -0
  147. /package/dist/{experimental/testing → testing}/internal/text.d.ts +0 -0
  148. /package/dist/{experimental/testing → testing}/internal/text.js +0 -0
  149. /package/dist/{experimental/testing → testing}/internal/type-utils-internal.d.ts +0 -0
  150. /package/dist/{experimental/testing → testing}/internal/type-utils-internal.js +0 -0
  151. /package/dist/{experimental/testing → testing}/internal/utils/promise-utils.d.ts +0 -0
  152. /package/dist/{experimental/testing → testing}/internal/utils/promise-utils.js +0 -0
  153. /package/dist/{experimental/testing → testing}/type-utils.d.ts +0 -0
  154. /package/dist/{experimental/testing → testing}/type-utils.js +0 -0
  155. /package/dist/{experimental/testing → testing}/types.js +0 -0
@@ -7,7 +7,7 @@ import { TShirtSizes, BaseComponentProps } from '../shared.ts';
7
7
  */
8
8
  export interface AccordionProps extends BaseComponentProps {
9
9
  /**
10
- * The title text for the accordion.
10
+ * The accordion's title text.
11
11
  *
12
12
  */
13
13
  title: string;
@@ -17,19 +17,19 @@ export interface AccordionProps extends BaseComponentProps {
17
17
  */
18
18
  children: ReactNode;
19
19
  /**
20
- * Defines default open behavior on page load. When set to `true`, the accordion will be open by default on initial load.
20
+ * When set to `true`, the accordion will be open on initial page load. The `open` prop takes precedence over this prop.
21
21
  *
22
22
  * @defaultValue `false`
23
23
  */
24
24
  defaultOpen?: boolean;
25
25
  /**
26
- * When set to `true`, the accordion's open state cannot be changed.
26
+ * When set to `true`, the accordion's state cannot be changed.
27
27
  *
28
28
  * @defaultValue `false`
29
29
  */
30
30
  disabled?: boolean;
31
31
  /**
32
- * For controlling the accordion's open state programmatically. When set to `true`, the accordion will open. Takes precedence over `defaultOpen`.
32
+ * Controls the accordion's open state programmatically. When set to `true`, the accordion will open. Takes precedence over `defaultOpen`.
33
33
  *
34
34
  */
35
35
  open?: boolean;
@@ -40,7 +40,7 @@ export interface AccordionProps extends BaseComponentProps {
40
40
  */
41
41
  size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
42
42
  /**
43
- * A function that will be invoked when the title is clicked. It receives no arguments and its return value is ignored.
43
+ * A function that will be invoked when the accordion title is clicked. This function receives no arguments and its returned value is ignored.
44
44
  *
45
45
  * @event
46
46
  */
@@ -7,7 +7,7 @@ import { BaseComponentProps } from '../shared.ts';
7
7
  */
8
8
  export interface AlertProps extends BaseComponentProps {
9
9
  /**
10
- * The bolded title text of the alert.
10
+ * The bolded text of the alert.
11
11
  *
12
12
  */
13
13
  title: string;
@@ -17,7 +17,7 @@ export interface AlertProps extends BaseComponentProps {
17
17
  */
18
18
  children?: ReactNode;
19
19
  /**
20
- * The color of the alert.
20
+ * The color of the alert. See [variants](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/alert#variants) for more information.
21
21
  *
22
22
  * @defaultValue `"info"`
23
23
  */
@@ -11,13 +11,16 @@ export interface ButtonRowProps extends BaseComponentProps {
11
11
  */
12
12
  children: ReactNode;
13
13
  /**
14
- * Disables the dropdown list of buttons that appears when the children expand beyond the horizontal space.
14
+ * By default, when the number of buttons exceeds the available horizontal space, the extra buttons will collapse into a single dropdown menu button. Set this prop to `true` to prevent the dropdown button from being interacted with.
15
15
  *
16
16
  * @defaultValue `false`
17
17
  */
18
18
  disableDropdown?: boolean;
19
19
  /**
20
- * Controls the appearance and text content of the dropdown button.
20
+ * When the included buttons exceed the available space, use this prop to customize the dropdown button. This prop takes an object containing the following `key: 'value'` pairs:
21
+ * - `size`: the size of the button. Can be `'xs'`, `'sm'`, or `'md'` (default).
22
+ * - `text`: the button's text. By default, is set to `More`. If set to an empty value, will display a gear icon.
23
+ * - `variant`: the button variation. Can be `'primary'`, `'secondary'` (default), or `'transparent'`.
21
24
  */
22
25
  dropDownButtonOptions?: ButtonRownDropDownButtonOptionsProps;
23
26
  }
@@ -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;