@hubspot/ui-extensions 0.8.38 → 0.8.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,11 @@
1
1
  import { createRemoteReactComponent } from '@remote-ui/react';
2
2
  /**
3
- * @link https://developers.hubspot.com/beta-docs/reference/ui-components/standard-components/alert
3
+ * The `Alert` component renders an alert within a card. Use this component to give usage guidance, notify users of action results, or warn them about potential issues or failures.
4
+ *
5
+ * **Links:**
6
+ *
7
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/alert Docs}
8
+ * - {@link https://app.hubspot.com/docs/48008916/reference/ui-components/standard-components/alert#variants Variants}
4
9
  */
5
10
  export const Alert = createRemoteReactComponent('Alert');
6
11
  /**
@@ -8,78 +13,466 @@ export const Alert = createRemoteReactComponent('Alert');
8
13
  *
9
14
  * **Links:**
10
15
  *
11
- * - {@link https://developers.hubspot.com/beta-docs/reference/ui-components/standard-components/button Docs}
12
- * - {@link https://developers.hubspot.com/beta-docs/reference/ui-components/standard-components/button#usage-examples Examples}
16
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/button Docs}
17
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/button#usage-examples Examples}
13
18
  */
14
19
  export const Button = createRemoteReactComponent('Button', {
15
20
  fragmentProps: ['overlay'],
16
21
  });
22
+ /**
23
+ * The `ButtonRow` component renders a row of specified `Button` components. Use this component when you want to include multiple buttons in a row.
24
+ *
25
+ * **Links:**
26
+ *
27
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/button-row Docs}
28
+ */
17
29
  export const ButtonRow = createRemoteReactComponent('ButtonRow');
18
30
  export const Card = createRemoteReactComponent('Card');
31
+ /**
32
+ * The `DescriptionList` component renders pairs of labels and values. Use this component to display pairs of labels and values in a way that's easy to read at a glance.
33
+ *
34
+ * **Links:**
35
+ *
36
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/description-list Docs}
37
+ */
19
38
  export const DescriptionList = createRemoteReactComponent('DescriptionList');
39
+ /**
40
+ * The `DescriptionListItem` component renders a single set of a label and value. Use this component within a `DescriptionList` component.
41
+ *
42
+ * **Links:**
43
+ *
44
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/description-list Docs}
45
+ */
20
46
  export const DescriptionListItem = createRemoteReactComponent('DescriptionListItem');
47
+ /**
48
+ * The `Divider` component renders a grey, horizontal line for spacing out components vertically or creating sections in an extension. Use this component to space out other components when the content needs more separation than white space.
49
+ *
50
+ * **Links:**
51
+ *
52
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/divider Docs}
53
+ */
21
54
  export const Divider = createRemoteReactComponent('Divider');
55
+ /**
56
+ * The `EmptyState` component sets the content that appears when the extension is in an empty state. Use this component when there's no content or data to help guide users.
57
+ *
58
+ * **Links:**
59
+ *
60
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/empty-state Docs}
61
+ */
22
62
  export const EmptyState = createRemoteReactComponent('EmptyState');
63
+ /**
64
+ * The `ErrorState` component sets the content of an erroring extension. Use this component to guide users through resolving errors that your extension might encounter.
65
+ *
66
+ * **Links:**
67
+ *
68
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/error-state Docs}
69
+ */
23
70
  export const ErrorState = createRemoteReactComponent('ErrorState');
71
+ /**
72
+ * The `Form` component renders a form that can contain other subcomponents, such as `Input`, `Select`, and `Button`. Use this component to enable users to submit data to HubSpot or an external system.
73
+ *
74
+ * **Links:**
75
+ *
76
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/form Docs}
77
+ */
24
78
  export const Form = createRemoteReactComponent('Form');
79
+ /**
80
+ * The `Heading` component renders large heading text. Use this component to introduce or differentiate sections of your component.
81
+ *
82
+ * **Links:**
83
+ *
84
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/heading Docs}
85
+ */
25
86
  export const Heading = createRemoteReactComponent('Heading');
87
+ /**
88
+ * The `Image` component renders an image. Use this component to add a logo or other visual brand identity asset, or to accentuate other content in the extension.
89
+ *
90
+ * **Links:**
91
+ *
92
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/image Docs}
93
+ */
26
94
  export const Image = createRemoteReactComponent('Image', {
27
95
  fragmentProps: ['overlay'],
28
96
  });
97
+ /**
98
+ * The `Input` component renders a text input field where a user can enter a custom text value. Like other inputs, this component should be used within a `Form` that has a submit button.
99
+ *
100
+ * **Links:**
101
+ *
102
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/input Docs}
103
+ */
29
104
  export const Input = createRemoteReactComponent('Input');
105
+ /**
106
+ * The `Link` component renders a clickable hyperlink. Use links to direct users to an external web page or another part of the HubSpot app.
107
+ *
108
+ * **Links:**
109
+ *
110
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/link Docs}
111
+ */
30
112
  export const Link = createRemoteReactComponent('Link', {
31
113
  fragmentProps: ['overlay'],
32
114
  });
115
+ /**
116
+ * The `TextArea` component renders a fillable text field. Like other inputs, this component should be used within a `Form` that has a submit button.
117
+ *
118
+ * **Links:**
119
+ *
120
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/text-area Docs}
121
+ */
33
122
  export const TextArea = createRemoteReactComponent('TextArea');
34
123
  // Textarea was changed to TextArea
35
124
  // Exporting both for backwards compat
36
125
  /** @deprecated use TextArea instead. With a capital A.*/
37
126
  export const Textarea = createRemoteReactComponent('Textarea');
127
+ /**
128
+ * The `LoadingSpinner` component renders a visual indicator for when an extension is loading or processing data.
129
+ *
130
+ * **Links:**
131
+ *
132
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/loading-spinner Docs}
133
+ */
38
134
  export const LoadingSpinner = createRemoteReactComponent('LoadingSpinner');
135
+ /**
136
+ * The `ProgressBar` component renders a visual indicator showing a numeric and/or percentage-based representation of progress. The percentage is calculated based on the maximum possible value specified in the component.
137
+ *
138
+ * **Links:**
139
+ *
140
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/progress-bar Docs}
141
+ */
39
142
  export const ProgressBar = createRemoteReactComponent('ProgressBar');
143
+ /**
144
+ * The `Select` component renders a dropdown menu select field where a user can select a single value. A search bar will be automatically included when there are more than seven options. Like other inputs, this component should be used within a `Form` that has a submit button.
145
+ *
146
+ * **Links:**
147
+ *
148
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/select Docs}
149
+ */
40
150
  export const Select = createRemoteReactComponent('Select');
151
+ /**
152
+ * The `Tag` component renders a tag to label or categorize information or other components. Tags can be static or clickable for invoking functions.
153
+ *
154
+ * **Links:**
155
+ *
156
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/tag Docs}
157
+ */
41
158
  export const Tag = createRemoteReactComponent('Tag', {
42
159
  fragmentProps: ['overlay'],
43
160
  });
161
+ /**
162
+ * The `Text` component renders text with formatting options.
163
+ *
164
+ * **Links:**
165
+ *
166
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/text Docs}
167
+ */
44
168
  export const Text = createRemoteReactComponent('Text');
169
+ /**
170
+ * The `Tile` component renders a square tile that can contain other components. Use this component to create groups of related components.
171
+ *
172
+ * **Links:**
173
+ *
174
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/tile Docs}
175
+ */
45
176
  export const Tile = createRemoteReactComponent('Tile');
46
177
  /** @deprecated use Flex instead. It will be removed in the next release. */
47
178
  export const Stack = createRemoteReactComponent('Stack');
179
+ /**
180
+ * The `ToggleGroup` component renders a list of selectable options, either in radio button or checkbox form.
181
+ *
182
+ * **Links:**
183
+ *
184
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/toggle-group Docs}
185
+ */
48
186
  export const ToggleGroup = createRemoteReactComponent('ToggleGroup');
187
+ /**
188
+ * The `StatisticsItem` component renders a single data point within a `Statistics` component. Use this component to display a single data point, such as a number or percentage.
189
+ *
190
+ * **Links:**
191
+ *
192
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/statistics Docs}
193
+ */
49
194
  export const StatisticsItem = createRemoteReactComponent('StatisticsItem');
195
+ /**
196
+ * The `Statistics` component renders a visual spotlight of one or more data points. Includes the `StatisticsItem` and `StatisticsTrend` subcomponents.
197
+ *
198
+ * **Links:**
199
+ *
200
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/statistics Docs}
201
+ */
50
202
  export const Statistics = createRemoteReactComponent('Statistics');
203
+ /**
204
+ * The `StatisticsTrend` component renders a percentage trend value and direction alonside a `StatisticsItem` component. Use this component within the `StatisticsItem` component.
205
+ *
206
+ * **Links:**
207
+ *
208
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/statistics Docs}
209
+ */
51
210
  export const StatisticsTrend = createRemoteReactComponent('StatisticsTrend');
211
+ /**
212
+ * The `Table` component renders a table. To format the table, use the subcomponents `TableHead`, `TableRow`, `TableHeader`, `TableBody`, `TableCell`and `TableFooter`.
213
+ *
214
+ * **Links:**
215
+ *
216
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
217
+ */
52
218
  export const Table = createRemoteReactComponent('Table');
219
+ /**
220
+ * The `TableFooter` component renders a footer within a `Table` component. Use this component to display totals or other summary information.
221
+ *
222
+ * **Links:**
223
+ *
224
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
225
+ */
53
226
  export const TableFooter = createRemoteReactComponent('TableFooter');
227
+ /**
228
+ * The `TableCell` component renders individual cells within the `TableBody` component.
229
+ *
230
+ * **Links:**
231
+ *
232
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
233
+ */
54
234
  export const TableCell = createRemoteReactComponent('TableCell');
235
+ /**
236
+ * The `TableRow` component renders a row within the `TableBody` or `TableHead` component.
237
+ *
238
+ * **Links:**
239
+ *
240
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
241
+ */
55
242
  export const TableRow = createRemoteReactComponent('TableRow');
243
+ /**
244
+ * The `TableBody` component renders the body (rows and cells) of a table within the `Table` component.
245
+ *
246
+ * **Links:**
247
+ *
248
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
249
+ */
56
250
  export const TableBody = createRemoteReactComponent('TableBody');
251
+ /**
252
+ * The `TableHeader` component renders individual cells containing bolded column labels, within `TableHead`.
253
+ *
254
+ * **Links:**
255
+ *
256
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
257
+ */
57
258
  export const TableHeader = createRemoteReactComponent('TableHeader');
259
+ /**
260
+ * The `TableHead` component renders the header section of the `Table` component, containing column labels.
261
+ *
262
+ * **Links:**
263
+ *
264
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/table Docs}
265
+ */
58
266
  export const TableHead = createRemoteReactComponent('TableHead');
267
+ /**
268
+ * The `NumberInput` component renders a number input field. Like other inputs, this component should be used within a `Form` that has a submit button.
269
+ *
270
+ * **Links:**
271
+ *
272
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/number-input Docs}
273
+ */
59
274
  export const NumberInput = createRemoteReactComponent('NumberInput');
275
+ /**
276
+ * The `Box` component renders an empty div container for fine tuning the spacing of components. Commonly used with the `Flex` component.
277
+ *
278
+ * **Links:**
279
+ *
280
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/box Docs}
281
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/flex-and-box Flex and Box Example}
282
+ */
60
283
  export const Box = createRemoteReactComponent('Box');
284
+ /**
285
+ * The `StepIndicator` component renders an indicator to show the current step of a multi-step process.
286
+ *
287
+ * **Links:**
288
+ *
289
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/step-indicator Docs}
290
+ */
61
291
  export const StepIndicator = createRemoteReactComponent('StepIndicator');
292
+ /**
293
+ * The `Accordion` component renders an expandable and collapsable section that can contain other components. This component can be helpful for saving space and breaking up extension content.
294
+ *
295
+ * **Links:**
296
+ *
297
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/accordion Docs}
298
+ */
62
299
  export const Accordion = createRemoteReactComponent('Accordion');
300
+ /**
301
+ * The MultiSelect component renders a dropdown menu select field where a user can select multiple values. Commonly used within the `Form` component.
302
+ *
303
+ * **Links:**
304
+ *
305
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/multi-select Docs}
306
+ */
63
307
  export const MultiSelect = createRemoteReactComponent('MultiSelect');
308
+ /**
309
+ * The `Flex` component renders a flex container that can contain other components, and arrange them with props. Use this component to create a flexible and responsive layout.
310
+ *
311
+ * **Links:**
312
+ *
313
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/flex Docs}
314
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/flex-and-box Flex and Box Example}
315
+ */
64
316
  export const Flex = createRemoteReactComponent('Flex');
317
+ /**
318
+ * The `DateInput` component renders an input field where a user can select a date. Commonly used within the `Form` component.
319
+ *
320
+ * **Links:**
321
+ *
322
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/date-input Docs}
323
+ */
65
324
  export const DateInput = createRemoteReactComponent('DateInput');
325
+ /**
326
+ * The `Checkbox` component renders a single checkbox input. Commonly used within the `Form` component. If you want to display multiple checkboxes, you should use `ToggleGroup` instead, as it comes with extra logic for handling multiple checkboxes.
327
+ *
328
+ * **Links:**
329
+ *
330
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/checkbox Docs}
331
+ */
66
332
  export const Checkbox = createRemoteReactComponent('Checkbox');
333
+ /**
334
+ * The `RadioButton` component renders a single radio input. Commonly used within the `Form` component. If you want to display multiple radio inputs, you should use `ToggleGroup` instead, as it comes with extra logic for handling multiple inputs.
335
+ */
67
336
  export const RadioButton = createRemoteReactComponent('RadioButton');
337
+ /**
338
+ * The `List` component renders a list of items. Use this component to display a list of items, such as a list of contacts, tasks, or other data. A list can be styled as a bulleted list or a numbered list.
339
+ *
340
+ * **Links:**
341
+ *
342
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/list Docs}
343
+ */
68
344
  export const List = createRemoteReactComponent('List');
345
+ /**
346
+ * The `Toggle` component renders a boolean toggle switch that can be configured with sizing, label position, read-only, and more.
347
+ *
348
+ * **Links:**
349
+ *
350
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/toggle Docs}
351
+ */
69
352
  export const Toggle = createRemoteReactComponent('Toggle');
353
+ /**
354
+ * The `Dropdown` component renders a dropdown menu that can appear as a button or hyperlink. Use this component to enable users to select from multiple options in a compact list.
355
+ *
356
+ * **Links:**
357
+ *
358
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/dropdown Docs}
359
+ */
70
360
  export const Dropdown = createRemoteReactComponent('Dropdown');
361
+ /**
362
+ * The Panel component renders a panel overlay on the right side of the page and contains other components.
363
+ *
364
+ * **Links:**
365
+ *
366
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/panel Docs}
367
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
368
+ */
71
369
  export const Panel = createRemoteReactComponent('Panel');
370
+ /**
371
+ * The `PanelFooter` is a sticky footer component displayed at the bottom of a `Panel` component. Use this component to display actions or other content that should be visible at all times. Include only one `PanelFooter` component per `Panel`.
372
+ *
373
+ * **Links:**
374
+ *
375
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/panel-footer Docs}
376
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
377
+ */
72
378
  export const PanelFooter = createRemoteReactComponent('PanelFooter');
379
+ /**
380
+ * The `PanelBody` component is a container that wraps the panel's content and makes it scrollable. Include only one `PanelBody` component per `Panel`.
381
+ *
382
+ * **Links:**
383
+ *
384
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/panel-footer Docs}
385
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
386
+ */
73
387
  export const PanelBody = createRemoteReactComponent('PanelBody');
388
+ /**
389
+ * The `PanelSection` component is a container that adds padding and bottom margin to provide spacing between content. Use the `PanelSection` component to separate content within a `PanelBody`.
390
+ *
391
+ * **Links:**
392
+ *
393
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/panel-footer Docs}
394
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
395
+ */
74
396
  export const PanelSection = createRemoteReactComponent('PanelSection');
397
+ /**
398
+ * The `StepperInput` component renders a number input field that can be increased or decreased by a set number. Commonly used within the `Form` component.
399
+ *
400
+ * **Links:**
401
+ *
402
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/stepper-input Docs}
403
+ */
75
404
  export const StepperInput = createRemoteReactComponent('StepperInput');
405
+ /**
406
+ * The Modal component renders a pop-up overlay that can contain other components.
407
+ *
408
+ * **Links:**
409
+ *
410
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/modal Docs}
411
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
412
+ */
76
413
  export const Modal = createRemoteReactComponent('Modal');
414
+ /**
415
+ * The `ModalBody` component contains the main content of the modal. One `ModalBody` is required per `Modal`.
416
+ *
417
+ * **Links:**
418
+ *
419
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/modal Docs}
420
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
421
+ */
77
422
  export const ModalBody = createRemoteReactComponent('ModalBody');
423
+ /**
424
+ * The `ModalFooter` component is an optional component to format the footer section of the modal. Use one `ModalFooter` per `Modal`.
425
+ *
426
+ * **Links:**
427
+ *
428
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/modal Docs}
429
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/overlay-example Overlay Example}
430
+ */
78
431
  export const ModalFooter = createRemoteReactComponent('ModalFooter');
432
+ /**
433
+ * Use the `Icon` component to render a visual icon within other components. It can generally be used inside most components, excluding ones that don't support child components.
434
+ *
435
+ * **Links:**
436
+ *
437
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/icon Docs}
438
+ */
79
439
  export const Icon = createRemoteReactComponent('Icon');
440
+ /**
441
+ * The `StatusTag` component renders a visual indicator to display the current status of an item. Status tags can be static or clickable.
442
+ *
443
+ * **Links:**
444
+ *
445
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/status-tag Docs}
446
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/status-tag#variants Variants}
447
+ */
80
448
  export const StatusTag = createRemoteReactComponent('StatusTag');
449
+ /**
450
+ * The `LoadingButton` component renders a button with loading state options.
451
+ *
452
+ * **Links:**
453
+ *
454
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/loading-button Docs}
455
+ */
81
456
  export const LoadingButton = createRemoteReactComponent('LoadingButton', {
82
457
  fragmentProps: ['overlay'],
83
458
  });
459
+ /**
460
+ * The `BarChart` component renders a bar chart for visualizing data. This type of chart is best suited for comparing categorical data.
461
+ *
462
+ * **Links:**
463
+ *
464
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/bar-chart BarChart Docs}
465
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/charts Charts Docs}
466
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/charts-example Charts Example}
467
+ */
84
468
  export const BarChart = createRemoteReactComponent('BarChart');
469
+ /**
470
+ * The `LineChart` component renders a line chart for visualizing data. This type of chart is best suited for time series plots or trend data.
471
+ *
472
+ * **Links:**
473
+ *
474
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/line-chart LineChart Docs}
475
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/charts Charts Docs}
476
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/charts-example Charts Example}
477
+ */
85
478
  export const LineChart = createRemoteReactComponent('LineChart');
@@ -1,4 +1,5 @@
1
1
  import type * as types from '../types';
2
+ import type * as experimentalTypes from './types';
2
3
  /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
3
4
  declare const Iframe: "Iframe" & {
4
5
  readonly type?: "Iframe" | undefined;
@@ -8,7 +9,25 @@ declare const Iframe: "Iframe" & {
8
9
  /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
9
10
  declare const MediaObject: "MediaObject" & {
10
11
  readonly type?: "MediaObject" | undefined;
11
- readonly props?: types.MediaObjectProps | undefined;
12
+ readonly props?: experimentalTypes.MediaObjectProps | undefined;
12
13
  readonly children?: true | undefined;
13
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"MediaObject", types.MediaObjectProps, true>>;
14
- export { Iframe, MediaObject };
14
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"MediaObject", experimentalTypes.MediaObjectProps, true>>;
15
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
16
+ declare const Inline: "Inline" & {
17
+ readonly type?: "Inline" | undefined;
18
+ readonly props?: experimentalTypes.InlineProps | undefined;
19
+ readonly children?: true | undefined;
20
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Inline", experimentalTypes.InlineProps, true>>;
21
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
22
+ declare const Stack2: "Stack2" & {
23
+ readonly type?: "Stack2" | undefined;
24
+ readonly props?: experimentalTypes.Stack2Props | undefined;
25
+ readonly children?: true | undefined;
26
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Stack2", experimentalTypes.Stack2Props, true>>;
27
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
28
+ declare const Center: "Center" & {
29
+ readonly type?: "Center" | undefined;
30
+ readonly props?: experimentalTypes.CenterProps | undefined;
31
+ readonly children?: true | undefined;
32
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Center", experimentalTypes.CenterProps, true>>;
33
+ export { Iframe, MediaObject, Inline, Stack2, Center };
@@ -5,4 +5,10 @@ const Iframe = createRemoteReactComponent('Iframe');
5
5
  const MediaObject = createRemoteReactComponent('MediaObject', {
6
6
  fragmentProps: ['itemRight', 'itemLeft'],
7
7
  });
8
- export { Iframe, MediaObject };
8
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
9
+ const Inline = createRemoteReactComponent('Inline');
10
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
11
+ const Stack2 = createRemoteReactComponent('Stack2');
12
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
13
+ const Center = createRemoteReactComponent('Center');
14
+ export { Iframe, MediaObject, Inline, Stack2, Center };
@@ -0,0 +1,14 @@
1
+ import { type RootNode, type Node } from '@remote-ui/testing';
2
+ import type { ReactNode } from 'react';
3
+ type CoreComponentName = keyof typeof import('../../coreComponents');
4
+ type CrmComponentName = keyof typeof import('../../crm');
5
+ interface HubSpotRoot extends RootNode<unknown> {
6
+ findByName: (name: CoreComponentName | CrmComponentName) => ReturnType<Node<unknown>['find']>;
7
+ }
8
+ interface RenderReturn {
9
+ extension: HubSpotRoot;
10
+ flushAsync: () => Promise<void>;
11
+ }
12
+ /** @experimental This function is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
13
+ export declare function render(ui: ReactNode): RenderReturn;
14
+ export {};
@@ -0,0 +1,33 @@
1
+ import { createRoot } from '@remote-ui/react';
2
+ import { mount } from '@remote-ui/testing';
3
+ /** @experimental This function is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
4
+ export function render(ui) {
5
+ const mountedExtension = mount((coreRemoteRoot) => {
6
+ // create the react appliction to render remote react component
7
+ createRoot(coreRemoteRoot).render(ui);
8
+ });
9
+ function findByName(name) {
10
+ return mountedExtension.find(name);
11
+ }
12
+ // @ts-expect-error ts doesn't know the type of object that we are forwarding to
13
+ const extension = new Proxy({ findByName }, //target object
14
+ {
15
+ // traps and modifies calls to target object
16
+ get(target, key, receiver) {
17
+ // if target object has the key, invoke.
18
+ if (Reflect.ownKeys(target).includes(key)) {
19
+ return Reflect.get(target, key, receiver);
20
+ }
21
+ // if our target object doesn't have the key, pass to the extension
22
+ return Reflect.get(mountedExtension, key);
23
+ },
24
+ });
25
+ function flushAsync() {
26
+ // the promise with the setTimeout is what flushes the promise stack
27
+ return new Promise((resolve) => setTimeout(resolve, 0)).then(() => {
28
+ // the act call on the extension forces the UI to update
29
+ mountedExtension.act(() => null);
30
+ });
31
+ }
32
+ return { extension, flushAsync };
33
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Direct re-export of shopify matchers. This is a great way
3
+ * to enable internal testing but I don't think it's how we should ship to
4
+ * customers because error messages make reference to shopify internals.
5
+ */
6
+ export * from '@remote-ui/testing/matchers';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Direct re-export of shopify matchers. This is a great way
3
+ * to enable internal testing but I don't think it's how we should ship to
4
+ * customers because error messages make reference to shopify internals.
5
+ */
6
+ export * from '@remote-ui/testing/matchers';
@@ -0,0 +1,61 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { RemoteFragment } from '@remote-ui/core';
3
+ import type { AllDistances } from '../types';
4
+ /**
5
+ * @ignore
6
+ * @experimental do not use in production
7
+ */
8
+ interface BaseLayout {
9
+ fullWidth?: boolean;
10
+ fullHeight?: boolean;
11
+ }
12
+ /**
13
+ * @ignore
14
+ * @experimental do not use in production
15
+ */
16
+ export type FlexJustify = 'center' | 'end' | 'start' | 'around' | 'between';
17
+ /**
18
+ * @ignore
19
+ * @experimental do not use in production
20
+ */
21
+ export type FlexAlign = 'start' | 'center' | 'baseline' | 'end' | 'stretch';
22
+ /**
23
+ * @ignore
24
+ * @experimental do not use in production
25
+ */
26
+ export interface InlineProps extends BaseLayout {
27
+ justify?: FlexJustify;
28
+ align?: FlexAlign;
29
+ gap?: AllDistances;
30
+ children?: ReactNode;
31
+ }
32
+ /**
33
+ * @ignore
34
+ * @experimental do not use in production
35
+ */
36
+ export interface Stack2Props extends BaseLayout {
37
+ align?: FlexAlign;
38
+ gap?: AllDistances;
39
+ children?: ReactNode;
40
+ }
41
+ /**
42
+ * @ignore
43
+ * @experimental do not use in production
44
+ */
45
+ export interface CenterProps extends BaseLayout {
46
+ maxContentSize?: number | string;
47
+ gutter?: AllDistances;
48
+ children?: ReactNode;
49
+ }
50
+ /**
51
+ * @ignore
52
+ * @experimental
53
+ */
54
+ export interface MediaObjectProps {
55
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
56
+ spacing?: 'none' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
57
+ children?: ReactNode;
58
+ itemLeft?: RemoteFragment;
59
+ itemRight?: RemoteFragment;
60
+ }
61
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './clientTypes';
1
2
  export { hubspot } from './hubspot';
2
3
  export { logger } from './logger';
3
4
  export * from './coreComponents';