@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
@@ -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 {};
@@ -51,7 +51,7 @@ export interface FlexProps extends BaseComponentProps {
51
51
  */
52
52
  children?: ReactNode;
53
53
  /**
54
- * Arranges components `horizontally` or `vertically` by setting the main axis.
54
+ * Arranges the components horizontally or vertically by setting the main axis.
55
55
  *
56
56
  * @defaultValue `"row"`
57
57
  */
@@ -69,12 +69,11 @@ export interface FlexProps extends BaseComponentProps {
69
69
  */
70
70
  align?: FlexAlign;
71
71
  /**
72
- * Overrides Flex's `alignItem` value for this element.
73
- *
72
+ * Distributes a child component along the cross-axis using the available free space. Use this prop for nested `Flex` and `Box` components to align them differently from other child components in the `Flex` group.
74
73
  */
75
74
  alignSelf?: FlexAlign;
76
75
  /**
77
- * Whether components will wrap instead of trying to fit on one line.
76
+ * Whether components will wrap rather than trying to fit on one line.
78
77
  *
79
78
  * @defaultValue `"nowrap"`
80
79
  */
@@ -92,21 +91,19 @@ export interface BoxProps extends BaseComponentProps {
92
91
  */
93
92
  children: ReactNode;
94
93
  /**
95
- * Overrides Flex's `alignItem` value for this element.
94
+ * Distributes a child component along the cross-axis using the available free space. Use this prop for nested `Box` components to align them differently from other child components in the `Flex` group.
96
95
  *
97
96
  * @defaultValue `"auto"`
98
97
  */
99
98
  alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch' | 'auto';
100
99
  /**
101
- * Sets how the item will grow or shrink when it's a direct ancestor of the Flex component.
102
- * ##### Options in detail
103
- *
104
- *- `initial`: The item is sized according to its width and height properties. It shrinks to its minimum size to fit the container, but does not grow to absorb any extra free space in the flex container.
105
- *- `auto`: The item is sized according to its width and height properties, but grows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container.
106
- *- `none`: The item is sized according to its width and height properties. It is fully inflexible: it neither shrinks nor grows in relation to the flex container.
107
- *- `number`: Tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.
100
+ * Distributes components based on the available empty space around them. Options are as follows:
101
+ * - `initial`: The item is sized according to its width and height properties. It shrinks to its minimum size to fit the container, but does not grow to absorb any extra free space in the flex container.
102
+ * - `auto`: The item is sized according to its width and height properties, but grows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container.
103
+ * - `none`: The item is sized according to its width and height properties. It is fully inflexible: it neither shrinks nor grows in relation to the flex container.
104
+ * - Number: tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.
108
105
  *
109
- * @defaultValue `"initial"`
106
+ * @defaultValue `"auto"`
110
107
  */
111
108
  flex?: 'initial' | 'auto' | 'none' | number;
112
109
  }
@@ -118,21 +115,22 @@ export interface BoxProps extends BaseComponentProps {
118
115
  export interface InlineProps extends BaseComponentProps {
119
116
  /**
120
117
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
121
- *
122
118
  */
123
119
  children?: ReactNode;
124
120
  /**
125
121
  * Distributes components along the main axis using the available free space.
122
+ *
126
123
  * @defaultValue `"start"`
127
124
  */
128
125
  justify?: FlexJustify;
129
126
  /**
130
127
  * Distributes components along the cross-axis using the available free space.
131
- * @defaultValue `"center"`
128
+ *
129
+ * @defaultValue `"stretch"`
132
130
  */
133
131
  align?: FlexAlign;
134
132
  /**
135
- * Sets the spacing between components.
133
+ * The amount of spacing between components.
136
134
  *
137
135
  * @defaultValue `"flush"`
138
136
  */
@@ -145,26 +143,21 @@ export interface InlineProps extends BaseComponentProps {
145
143
  */
146
144
  export interface AutoGridProps extends BaseComponentProps {
147
145
  /**
148
- * Sets the width of each column in the grid.
149
- * When `flexible` is true, columns will be at least this width (or collapse to container width if smaller), then expand equally to fill available space.
150
- * When `flexible` is false, columns are exactly this width.
146
+ * Sets width of each column in pixels. When `flexible` is `true`, acts as minimum width before expanding.
151
147
  */
152
148
  columnWidth: number;
153
149
  /**
154
- * Sets the spacing between grid items.
150
+ * Sets spacing between grid items.
155
151
  *
156
152
  * @defaultValue `"flush"`
157
153
  */
158
154
  gap?: AllDistances;
159
155
  /**
160
156
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
161
- *
162
157
  */
163
158
  children?: ReactNode;
164
159
  /**
165
- * Whether columns should expand to fill available space.
166
- * When true, columns will be at least `columnWidth` but grow equally to fill the container.
167
- * When false, columns are exactly `columnWidth`.
160
+ * When `false`, columns have exact `columnWidth`. When `true`, columns expand equally to fill available space with `columnWidth` as the minimum.
168
161
  *
169
162
  * @defaultValue `false`
170
163
  */
@@ -13,24 +13,27 @@ export interface LinkProps extends OverlayComponentProps, BaseComponentProps {
13
13
  */
14
14
  children: ReactNode;
15
15
  /**
16
- * The URL that will be opened on click. Links to pages in the HubSpot account will open in the same tab, while non-HubSpot links will open in a new tab.
17
- *
16
+ * Sets the link's URL and open behavior. Contains the following fields:
17
+ * - `url` (string): the URL that will open on click.
18
+ * - `external` (boolean): set to `true` to open the URL in a new tab and display an external link icon. By default:
19
+ * - Links to HubSpot app pages will open in the same tab and will not include an icon.
20
+ * - Links to non-HubSpot app pages will open in a new tab and include the icon.
18
21
  */
19
22
  href: HrefProp;
20
23
  /**
21
- * The color variation of the link.
24
+ * The color of the link.
22
25
  *
23
26
  * @defaultValue `"primary"`
24
27
  */
25
28
  variant?: 'primary' | 'destructive' | 'light' | 'dark';
26
29
  /**
27
- * A function that will be invoked with the link is clicked.
30
+ * A function that is invoked when the link is clicked. The function receives no arguments and its return value is ignored.
28
31
  *
29
32
  * @event
30
33
  */
31
34
  onClick?: ReactionsHandler<ExtensionEvent>;
32
35
  /**
33
- * When set to true, `event.preventDefault()` will be invoked before the `onClick` function is called, preventing automatic navigation to the href URL.
36
+ * When set to `true`, `event.preventDefault()` will be invoked before the `onClick` function is called, preventing automatic navigation to the href URL.
34
37
  *
35
38
  * @defaultValue `false`
36
39
  */
@@ -6,12 +6,12 @@ import { TShirtSizes, BaseComponentProps } from '../shared.ts';
6
6
  */
7
7
  export interface LoadingSpinnerProps extends BaseComponentProps {
8
8
  /**
9
- * The text that displays next to the spinner. Note: the label is not shown by default, you must set `showLabel` to `true` to display the label.
9
+ * The text that displays next to the spinner.
10
10
  *
11
11
  */
12
12
  label: string;
13
13
  /**
14
- * When set to `true`, the label will appear next to the spinner.
14
+ * When set to `true`, the `label` will appear next to the spinner.
15
15
  *
16
16
  * @defaultValue `false`
17
17
  */
@@ -23,7 +23,7 @@ export interface LoadingSpinnerProps extends BaseComponentProps {
23
23
  */
24
24
  size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
25
25
  /**
26
- * The position of the spinner. Can be one of `inline` or `centered`.
26
+ * The position of the spinner.
27
27
  *
28
28
  * @defaultValue `"inline"`
29
29
  */
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { TShirtSizes, BaseComponentProps } from '../shared.ts';
3
3
  export interface ModalProps extends BaseComponentProps {
4
4
  /**
5
- * Accessibility label.
5
+ * The modal's accessibility label.
6
6
  *
7
7
  */
8
8
  'aria-label'?: string;
@@ -12,7 +12,7 @@ export interface ModalProps extends BaseComponentProps {
12
12
  */
13
13
  children?: ReactNode;
14
14
  /**
15
- * A unique ID for the modal
15
+ * The unique identifier for the modal.
16
16
  *
17
17
  */
18
18
  id: string;
@@ -27,18 +27,18 @@ export interface ModalProps extends BaseComponentProps {
27
27
  */
28
28
  onClose?: () => void;
29
29
  /**
30
- * The width of the modal
30
+ * The width of the modal.
31
31
  *
32
32
  * @defaultValue `"sm"`
33
33
  */
34
34
  width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
35
35
  /**
36
- * The title of the modal
36
+ * The title of the modal, displayed at in the modal's top bar.
37
37
  *
38
38
  */
39
39
  title?: string;
40
40
  /**
41
- * The variant of the modal
41
+ * The type of modal. See the [variants section](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/modal#variants) for more information.
42
42
  *
43
43
  * @defaultValue `"default"`
44
44
  */
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { TShirtSizes, BaseComponentProps } from '../shared.ts';
3
3
  export interface PanelProps extends BaseComponentProps {
4
4
  /**
5
- * Accessibility label.
5
+ * The panel's accessibility label.
6
6
  *
7
7
  */
8
8
  'aria-label'?: string;
@@ -12,7 +12,7 @@ export interface PanelProps extends BaseComponentProps {
12
12
  */
13
13
  children?: ReactNode;
14
14
  /**
15
- * A unique ID for the panel
15
+ * A unique ID for the panel.
16
16
  *
17
17
  */
18
18
  id: string;
@@ -27,18 +27,18 @@ export interface PanelProps extends BaseComponentProps {
27
27
  */
28
28
  onClose?: () => void;
29
29
  /**
30
- * The width of the panel
30
+ * The width of the panel.
31
31
  *
32
32
  * @defaultValue `"sm"`
33
33
  */
34
34
  width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
35
35
  /**
36
- * The title of the panel
36
+ * The text that displays at the top of the panel.
37
37
  *
38
38
  */
39
39
  title?: string;
40
40
  /**
41
- * The variant of the panel
41
+ * The panel variant. The `modal` variant includes better screen reader focus on the panel and is recommended for visual and motor accessibility and tab navigation. See [variants](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/panel#variants) for more information.
42
42
  *
43
43
  * @defaultValue `"default"`
44
44
  */
@@ -46,13 +46,13 @@ export interface PanelProps extends BaseComponentProps {
46
46
  }
47
47
  export interface PanelSectionProps extends BaseComponentProps {
48
48
  /**
49
- * When set to `true`, the section will have no bottom margin
49
+ * When set to `true`, the section will have no bottom margin.
50
50
  *
51
51
  * @defaultValue `false`
52
52
  */
53
53
  flush?: boolean;
54
54
  /**
55
- * The main content of the section
55
+ * The main content of the section.
56
56
  *
57
57
  */
58
58
  children: ReactNode;
@@ -11,12 +11,12 @@ export interface ProgressBarProps extends BaseComponentProps {
11
11
  */
12
12
  title?: string;
13
13
  /**
14
- * Accessibility label.
14
+ * The accessibility label.
15
15
  *
16
16
  */
17
17
  'aria-label'?: string;
18
18
  /**
19
- * Whether the progress bar displays the completion percentage.
19
+ * When set to `true`, the progress bar will display the completion percentage.
20
20
  *
21
21
  * @defaultValue `false`
22
22
  */
@@ -34,12 +34,12 @@ export interface ProgressBarProps extends BaseComponentProps {
34
34
  */
35
35
  maxValue?: number;
36
36
  /**
37
- * The text that explains the current state of the value property. For example, "150 out of 250". Displays above the progress bar on the right side.
37
+ * The text that explains the current state of the `value` property. For example, `"150 out of 250"`.
38
38
  *
39
39
  */
40
40
  valueDescription?: string;
41
41
  /**
42
- * The color that indicates the type of progress bar.
42
+ * The color to indicate progress sentiment.
43
43
  *
44
44
  * @defaultValue `"success"`
45
45
  */