@hubspot/ui-extensions 0.3.0 → 0.4.0

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.
package/README.md CHANGED
@@ -6,12 +6,14 @@ React components and utilities for extending HubSpot's UI.
6
6
 
7
7
  - [Accordion](#accordion)
8
8
  - [Alert](#alert)
9
+ - [Box](#box)
9
10
  - [Button](#button)
10
11
  - [ButtonRow](#buttonrow)
11
12
  - [Card](#card)
12
13
  - [DescriptionList](#descriptionlist)
13
14
  - [DescriptionListItem](#descriptionlistitem)
14
15
  - [Divider](#divider)
16
+ - [Flex](#flex)
15
17
  - [Form](#form)
16
18
  - [EmptyState](#emptystate)
17
19
  - [ErrorState](#errorstate)
@@ -20,6 +22,7 @@ React components and utilities for extending HubSpot's UI.
20
22
  - [Input](#input)
21
23
  - [Link](#link)
22
24
  - [LoadingSpinner](#loadingspinner)
25
+ - [Multiselect](#multiselect)
23
26
  - [NumberInput](#numberInput)
24
27
  - [ProgressBar](#progressbar)
25
28
  - [Select](#select)
@@ -37,7 +40,7 @@ React components and utilities for extending HubSpot's UI.
37
40
  - [TableRow](#tablerow)
38
41
  - [Tag](#tag)
39
42
  - [Text](#text)
40
- - [Textarea](#textarea)
43
+ - [TextArea](#textarea)
41
44
  - [Tile](#tile)
42
45
  - [ToggleGroup](#togglegroup)
43
46
 
@@ -153,6 +156,51 @@ const Extension = () => {
153
156
  };
154
157
  ```
155
158
 
159
+ ### Box
160
+
161
+ ##### Import
162
+
163
+ ```javascript
164
+ import { Box } from '@hubspot/ui-extensions';
165
+ ```
166
+
167
+ ##### Props
168
+
169
+ ```typescript
170
+ export interface BoxProps {
171
+ children: ReactNode;
172
+ alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch' | 'auto';
173
+ flex?: 'initial' | 'auto' | 'none' | number;
174
+ }
175
+ ```
176
+
177
+ | Prop | Type | Default | Description |
178
+ | --- | --- | --- | --- |
179
+ | `children` | `ReactNode` | `N/A` | Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. |
180
+ | `alignSelf` | `'start' \| 'center' \| 'baseline' \| 'end' \| 'stretch' \| 'auto'` `(optional)` | `'auto'` | Overrides flex's align item value for this element. |
181
+ | `flex` | `'initial' \| 'auto' \| 'none' \| number` `(optional)` | `'initial'` | Sets how the item will grow or shrink when it's a direct ancestor of the Flex component. |
182
+
183
+
184
+ #### flex prop Options
185
+
186
+ - `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.
187
+ - `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.
188
+ - `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.
189
+ - `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.
190
+
191
+ ##### Usage
192
+
193
+ ```javascript
194
+ const Extension = () => {
195
+ return (
196
+ <Box>
197
+ <Text>Hello</Text>
198
+ </Box>
199
+ );
200
+ };
201
+ ```
202
+
203
+
156
204
  ### Button
157
205
 
158
206
  ##### Import
@@ -410,6 +458,63 @@ const Extension = () => {
410
458
  };
411
459
  ```
412
460
 
461
+ ### Flex
462
+
463
+ ##### Import
464
+
465
+ ```javascript
466
+ import { Flex } from '@hubspot/ui-extensions';
467
+ ```
468
+
469
+ ##### Props
470
+
471
+ ```typescript
472
+ export interface FlexProps {
473
+ children?: React.ReactNode;
474
+ direction?: 'row' | 'column';
475
+ justify?: 'center' | 'end' | 'start' | 'around' | 'between';
476
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
477
+ alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
478
+ wrap?: boolean;
479
+ gap?:
480
+ | 'flush'
481
+ | 'small'
482
+ | 'extra-small'
483
+ | 'medium'
484
+ | 'large'
485
+ | 'extra-large'
486
+ | 'xs'
487
+ | 'sm'
488
+ | 'md'
489
+ | 'lg'
490
+ | 'xl';
491
+ }
492
+ ```
493
+
494
+ | Prop | Type | Default | Description |
495
+ | --- | --- | --- | --- |
496
+ | `direction` | `'row' \| 'column'` | `'column'` | Sets the direction in which elements are placed. |
497
+ | `justify` | `'start' \| 'center' \|'end' \|'around' \| 'between'` | `'start'` | Defines how to distribute space between and around children on main axis. |
498
+ | `align` | `'start' \| 'center' \|'baseline' \| 'end' \| 'stretch' \|'between'` | `'start'` | Controls the aligment of children in the cross axis. |
499
+ | `alignSelf` | `'start' \| 'center' \| 'baseline' \| 'end' \| 'stretch' \| 'auto'` `(optional)` | `'auto'` | Overrides flex's align item value for this element. Useful when `Flex` is the child of another `Flex` component. |
500
+ | `wrap` | `boolean(optional)` | `false` | If set to `false`, children are forced onto one line. If set to `true`, they can wrap into multiple lines. |
501
+ | `children` | `ReactNode` | `N/A` | Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. |
502
+ | `gap` | `'flush' \| 'extra-small' \| 'small' \| 'medium' \| 'large' \| 'extra-large' \| 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'small'` | Amount of space between each child component passed as children. |
503
+
504
+ ##### Usage
505
+
506
+ ```javascript
507
+ const Extension = () => {
508
+ return (
509
+ <Flex direction="column" distance="large">
510
+ <Tile>Tile 1</Tile>
511
+ <Tile>Tile 2</Tile>
512
+ <Tile>Tile 3</Tile>
513
+ </Flex>
514
+ );
515
+ };
516
+ ```
517
+
413
518
  ### Form
414
519
 
415
520
  ##### Import
@@ -792,6 +897,70 @@ const Extension = () => {
792
897
  return <LoadingSpinner label="Loading..." />;
793
898
  };
794
899
  ```
900
+ ### Multiselect
901
+
902
+ ```javascript
903
+ import { Multiselect } from '@hubspot/ui-extensions';
904
+ ```
905
+
906
+ ### Props
907
+
908
+ ```typescript
909
+ interface MultiSelectProps {
910
+ label: string;
911
+ name: string;
912
+ value?: (string | number)[];
913
+ required?: boolean;
914
+ readOnly?: boolean;
915
+ description?: string;
916
+ tooltip?: string;
917
+ placeholder?: string;
918
+ error?: boolean;
919
+ errorMessage?: string;
920
+ onChange: (value: (string | number)[]) => void;
921
+ options: {
922
+ label: string;
923
+ value: string | number;
924
+ }[];
925
+ }
926
+ ```
927
+
928
+ | Prop | Type | Default | Description |
929
+ | --- | --- | --- | --- |
930
+ | `label` | `string` | `N/A` | The label text to display for the select element. |
931
+ | `name` | `string` | `N/A` | The unique identifier for the select element. |
932
+ | `value` | `Array<string \| number>` | `N/A` | The value of the select input. |
933
+ | `required` | `boolean` | `false` | Determines if the required indicator should be displayed. |
934
+ | `readOnly` | `boolean` | `false` | Determines if the field is editable or not. |
935
+ | `description` | `string` | `N/A` | Instructional message to display to the user to help understand the purpose of the input. |
936
+ | `tooltip` | `string` | `N/A` | Text that will appear in a tooltip next to the input label. |
937
+ | `placeholder` | `string` | `N/A` | Text that appears in the input when it has no value set. |
938
+ | `error` | `boolean(optional)` | `false` | If set to true, `validationMessage` is displayed as an error message, if it was provided. The input will also render it's error state to let the user know there is an error. If false, `validationMessage` is displayed as a success message. |
939
+ | `validationMessage` | `string(optional)` | `''` | The text to show if the input has an error. |
940
+ | `onChange` | `(value: Array<string \| number>) => void` | `N/A` | Function that is called with the new value when it is updated. |
941
+ | `options` | `Array<{label: string; value: string \| number}>` | `N/A` | Array of options to be displayed in the select. `label` will be used as the display text in the dropdown list and `value` should be a **unique** identifier. `value` is the data that will be submitted with the form. |
942
+
943
+ ##### Usage
944
+
945
+ ```javascript
946
+ const Extension = () => {
947
+ const options = [
948
+ { label: 'Ice cream', value: 'ice-cream' },
949
+ { label: 'Pizza', value: 'pizza' },
950
+ { label: 'Burger', value: 'burger' },
951
+ { label: 'Soda', value: 'soda' },
952
+ ];
953
+
954
+ return (
955
+ <MultiSelect
956
+ name="favorite-food"
957
+ label="Favorite Food"
958
+ options={options}
959
+ />
960
+ );
961
+ };
962
+ ```
963
+
795
964
  ### NumberInput
796
965
 
797
966
  ##### Import
@@ -1726,12 +1895,12 @@ const Extension = () => {
1726
1895
  };
1727
1896
  ```
1728
1897
 
1729
- ### Textarea
1898
+ ### TextArea
1730
1899
 
1731
1900
  ##### Import
1732
1901
 
1733
1902
  ```javascript
1734
- import { Textarea } from '@hubspot/ui-extensions';
1903
+ import { TextArea } from '@hubspot/ui-extensions';
1735
1904
  ```
1736
1905
 
1737
1906
  ##### Props
@@ -1762,7 +1931,7 @@ interface TextareaProps {
1762
1931
  | Prop | Type | Default | Description |
1763
1932
  | --- | --- | --- | --- |
1764
1933
  | `label` | `string` | `N/A` | The label text to display for the textarea element |
1765
- | `name` | `string` | `N/A` | The unique identifier for the textarea element, this could be thought of as the HTML5 [Textarea element's name attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#name) |
1934
+ | `name` | `string` | `N/A` | The unique identifier for the textarea element, this could be thought of as the HTML5 [textarea element's name attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#name) |
1766
1935
  | `value` | `string(optional)` | `''` | The value of the textarea |
1767
1936
  | `required` | `boolean(optional)` | `false` | Determines if the required indicator should be displayed |
1768
1937
  | `readOnly` | `boolean(optional)` | `false` | Determines if the field is editable or not. |
@@ -1792,7 +1961,7 @@ const Extension = () => {
1792
1961
 
1793
1962
  return (
1794
1963
  <Form>
1795
- <Textarea
1964
+ <TextArea
1796
1965
  label="Description"
1797
1966
  name="description"
1798
1967
  tooltip="Provide as much detail as possible"
@@ -1,186 +1,201 @@
1
- import type { AlertProps, ButtonProps, ButtonRowProps, CardProps, DescriptionListProps, DescriptionListItemProps, DividerProps, EmptyStateProps, ErrorStateProps, FormProps, HeadingProps, ImageProps, InputProps, TextareaProps, LoadingSpinnerProps, ProgressBarProps, SelectProps, TagProps, TextProps, TileProps, StackProps, StatisticsProps, StatisticsItemProps, StatisticsTrendProps, TableProps, TableElementProps, ToggleGroupProps, LinkProps, NumberInputProps, BoxProps, StepIndicatorProps, AccordionProps } from './types';
1
+ import type * as types from './types';
2
2
  export declare const Alert: "Alert" & {
3
3
  readonly type?: "Alert" | undefined;
4
- readonly props?: AlertProps | undefined;
4
+ readonly props?: types.AlertProps | undefined;
5
5
  readonly children?: true | undefined;
6
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Alert", AlertProps, true>>;
6
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Alert", types.AlertProps, true>>;
7
7
  export declare const Button: "Button" & {
8
8
  readonly type?: "Button" | undefined;
9
- readonly props?: ButtonProps | undefined;
9
+ readonly props?: types.ButtonProps | undefined;
10
10
  readonly children?: true | undefined;
11
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Button", ButtonProps, true>>;
11
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Button", types.ButtonProps, true>>;
12
12
  export declare const ButtonRow: "ButtonRow" & {
13
13
  readonly type?: "ButtonRow" | undefined;
14
- readonly props?: ButtonRowProps | undefined;
14
+ readonly props?: types.ButtonRowProps | undefined;
15
15
  readonly children?: true | undefined;
16
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ButtonRow", ButtonRowProps, true>>;
16
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ButtonRow", types.ButtonRowProps, true>>;
17
17
  export declare const Card: "Card" & {
18
18
  readonly type?: "Card" | undefined;
19
- readonly props?: CardProps | undefined;
19
+ readonly props?: types.CardProps | undefined;
20
20
  readonly children?: true | undefined;
21
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Card", CardProps, true>>;
21
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Card", types.CardProps, true>>;
22
22
  export declare const DescriptionList: "DescriptionList" & {
23
23
  readonly type?: "DescriptionList" | undefined;
24
- readonly props?: DescriptionListProps | undefined;
24
+ readonly props?: types.DescriptionListProps | undefined;
25
25
  readonly children?: true | undefined;
26
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DescriptionList", DescriptionListProps, true>>;
26
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DescriptionList", types.DescriptionListProps, true>>;
27
27
  export declare const DescriptionListItem: "DescriptionListItem" & {
28
28
  readonly type?: "DescriptionListItem" | undefined;
29
- readonly props?: DescriptionListItemProps | undefined;
29
+ readonly props?: types.DescriptionListItemProps | undefined;
30
30
  readonly children?: true | undefined;
31
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DescriptionListItem", DescriptionListItemProps, true>>;
31
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DescriptionListItem", types.DescriptionListItemProps, true>>;
32
32
  export declare const Divider: "Divider" & {
33
33
  readonly type?: "Divider" | undefined;
34
- readonly props?: DividerProps | undefined;
34
+ readonly props?: types.DividerProps | undefined;
35
35
  readonly children?: true | undefined;
36
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Divider", DividerProps, true>>;
36
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Divider", types.DividerProps, true>>;
37
37
  export declare const EmptyState: "EmptyState" & {
38
38
  readonly type?: "EmptyState" | undefined;
39
- readonly props?: EmptyStateProps | undefined;
39
+ readonly props?: types.EmptyStateProps | undefined;
40
40
  readonly children?: true | undefined;
41
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"EmptyState", EmptyStateProps, true>>;
41
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"EmptyState", types.EmptyStateProps, true>>;
42
42
  export declare const ErrorState: "ErrorState" & {
43
43
  readonly type?: "ErrorState" | undefined;
44
- readonly props?: ErrorStateProps | undefined;
44
+ readonly props?: types.ErrorStateProps | undefined;
45
45
  readonly children?: true | undefined;
46
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ErrorState", ErrorStateProps, true>>;
46
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ErrorState", types.ErrorStateProps, true>>;
47
47
  export declare const Form: "Form" & {
48
48
  readonly type?: "Form" | undefined;
49
- readonly props?: FormProps | undefined;
49
+ readonly props?: types.FormProps | undefined;
50
50
  readonly children?: true | undefined;
51
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Form", FormProps, true>>;
51
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Form", types.FormProps, true>>;
52
52
  export declare const Heading: "Heading" & {
53
53
  readonly type?: "Heading" | undefined;
54
- readonly props?: HeadingProps | undefined;
54
+ readonly props?: types.HeadingProps | undefined;
55
55
  readonly children?: true | undefined;
56
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Heading", HeadingProps, true>>;
56
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Heading", types.HeadingProps, true>>;
57
57
  export declare const Image: "Image" & {
58
58
  readonly type?: "Image" | undefined;
59
- readonly props?: ImageProps | undefined;
59
+ readonly props?: types.ImageProps | undefined;
60
60
  readonly children?: true | undefined;
61
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Image", ImageProps, true>>;
61
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Image", types.ImageProps, true>>;
62
62
  export declare const Input: "Input" & {
63
63
  readonly type?: "Input" | undefined;
64
- readonly props?: InputProps<string> | undefined;
64
+ readonly props?: types.InputProps<string> | undefined;
65
65
  readonly children?: true | undefined;
66
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Input", InputProps<string>, true>>;
67
- export declare const Textarea: "Textarea" & {
68
- readonly type?: "Textarea" | undefined;
69
- readonly props?: TextareaProps | undefined;
70
- readonly children?: true | undefined;
71
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Textarea", TextareaProps, true>>;
66
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Input", types.InputProps<string>, true>>;
72
67
  export declare const Link: "Link" & {
73
68
  readonly type?: "Link" | undefined;
74
- readonly props?: LinkProps | undefined;
69
+ readonly props?: types.LinkProps | undefined;
75
70
  readonly children?: true | undefined;
76
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Link", LinkProps, true>>;
71
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Link", types.LinkProps, true>>;
72
+ export declare const TextArea: "TextArea" & {
73
+ readonly type?: "TextArea" | undefined;
74
+ readonly props?: types.TextAreaProps | undefined;
75
+ readonly children?: true | undefined;
76
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TextArea", types.TextAreaProps, true>>;
77
+ export declare const Textarea: "Textarea" & {
78
+ readonly type?: "Textarea" | undefined;
79
+ readonly props?: types.TextAreaProps | undefined;
80
+ readonly children?: true | undefined;
81
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Textarea", types.TextAreaProps, true>>;
77
82
  export declare const LoadingSpinner: "LoadingSpinner" & {
78
83
  readonly type?: "LoadingSpinner" | undefined;
79
- readonly props?: LoadingSpinnerProps | undefined;
84
+ readonly props?: types.LoadingSpinnerProps | undefined;
80
85
  readonly children?: true | undefined;
81
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"LoadingSpinner", LoadingSpinnerProps, true>>;
86
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"LoadingSpinner", types.LoadingSpinnerProps, true>>;
82
87
  export declare const ProgressBar: "ProgressBar" & {
83
88
  readonly type?: "ProgressBar" | undefined;
84
- readonly props?: ProgressBarProps | undefined;
89
+ readonly props?: types.ProgressBarProps | undefined;
85
90
  readonly children?: true | undefined;
86
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ProgressBar", ProgressBarProps, true>>;
91
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ProgressBar", types.ProgressBarProps, true>>;
87
92
  export declare const Select: "Select" & {
88
93
  readonly type?: "Select" | undefined;
89
- readonly props?: SelectProps | undefined;
94
+ readonly props?: types.SelectProps | undefined;
90
95
  readonly children?: true | undefined;
91
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Select", SelectProps, true>>;
96
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Select", types.SelectProps, true>>;
92
97
  export declare const Tag: "Tag" & {
93
98
  readonly type?: "Tag" | undefined;
94
- readonly props?: TagProps | undefined;
99
+ readonly props?: types.TagProps | undefined;
95
100
  readonly children?: true | undefined;
96
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tag", TagProps, true>>;
101
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tag", types.TagProps, true>>;
97
102
  export declare const Text: "Text" & {
98
103
  readonly type?: "Text" | undefined;
99
- readonly props?: TextProps | undefined;
104
+ readonly props?: types.TextProps | undefined;
100
105
  readonly children?: true | undefined;
101
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Text", TextProps, true>>;
106
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Text", types.TextProps, true>>;
102
107
  export declare const Tile: "Tile" & {
103
108
  readonly type?: "Tile" | undefined;
104
- readonly props?: TileProps | undefined;
109
+ readonly props?: types.TileProps | undefined;
105
110
  readonly children?: true | undefined;
106
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tile", TileProps, true>>;
111
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tile", types.TileProps, true>>;
107
112
  export declare const Stack: "Stack" & {
108
113
  readonly type?: "Stack" | undefined;
109
- readonly props?: StackProps | undefined;
114
+ readonly props?: types.StackProps | undefined;
110
115
  readonly children?: true | undefined;
111
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Stack", StackProps, true>>;
116
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Stack", types.StackProps, true>>;
112
117
  export declare const ToggleGroup: "ToggleGroup" & {
113
118
  readonly type?: "ToggleGroup" | undefined;
114
- readonly props?: ToggleGroupProps | undefined;
119
+ readonly props?: types.ToggleGroupProps | undefined;
115
120
  readonly children?: true | undefined;
116
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ToggleGroup", ToggleGroupProps, true>>;
121
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ToggleGroup", types.ToggleGroupProps, true>>;
117
122
  export declare const StatisticsItem: "StatisticsItem" & {
118
123
  readonly type?: "StatisticsItem" | undefined;
119
- readonly props?: StatisticsItemProps | undefined;
124
+ readonly props?: types.StatisticsItemProps | undefined;
120
125
  readonly children?: true | undefined;
121
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatisticsItem", StatisticsItemProps, true>>;
126
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatisticsItem", types.StatisticsItemProps, true>>;
122
127
  export declare const Statistics: "Statistics" & {
123
128
  readonly type?: "Statistics" | undefined;
124
- readonly props?: StatisticsProps | undefined;
129
+ readonly props?: types.StatisticsProps | undefined;
125
130
  readonly children?: true | undefined;
126
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Statistics", StatisticsProps, true>>;
131
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Statistics", types.StatisticsProps, true>>;
127
132
  export declare const StatisticsTrend: "StatisticsTrend" & {
128
133
  readonly type?: "StatisticsTrend" | undefined;
129
- readonly props?: StatisticsTrendProps | undefined;
134
+ readonly props?: types.StatisticsTrendProps | undefined;
130
135
  readonly children?: true | undefined;
131
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatisticsTrend", StatisticsTrendProps, true>>;
136
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatisticsTrend", types.StatisticsTrendProps, true>>;
132
137
  export declare const Table: "Table" & {
133
138
  readonly type?: "Table" | undefined;
134
- readonly props?: TableProps | undefined;
139
+ readonly props?: types.TableProps | undefined;
135
140
  readonly children?: true | undefined;
136
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Table", TableProps, true>>;
141
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Table", types.TableProps, true>>;
137
142
  export declare const TableFooter: "TableFooter" & {
138
143
  readonly type?: "TableFooter" | undefined;
139
- readonly props?: TableElementProps | undefined;
144
+ readonly props?: types.TableElementProps | undefined;
140
145
  readonly children?: true | undefined;
141
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableFooter", TableElementProps, true>>;
146
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableFooter", types.TableElementProps, true>>;
142
147
  export declare const TableCell: "TableCell" & {
143
148
  readonly type?: "TableCell" | undefined;
144
- readonly props?: TableElementProps | undefined;
149
+ readonly props?: types.TableElementProps | undefined;
145
150
  readonly children?: true | undefined;
146
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableCell", TableElementProps, true>>;
151
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableCell", types.TableElementProps, true>>;
147
152
  export declare const TableRow: "TableRow" & {
148
153
  readonly type?: "TableRow" | undefined;
149
- readonly props?: TableElementProps | undefined;
154
+ readonly props?: types.TableElementProps | undefined;
150
155
  readonly children?: true | undefined;
151
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableRow", TableElementProps, true>>;
156
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableRow", types.TableElementProps, true>>;
152
157
  export declare const TableBody: "TableBody" & {
153
158
  readonly type?: "TableBody" | undefined;
154
- readonly props?: TableElementProps | undefined;
159
+ readonly props?: types.TableElementProps | undefined;
155
160
  readonly children?: true | undefined;
156
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableBody", TableElementProps, true>>;
161
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableBody", types.TableElementProps, true>>;
157
162
  export declare const TableHeader: "TableHeader" & {
158
163
  readonly type?: "TableHeader" | undefined;
159
- readonly props?: TableElementProps | undefined;
164
+ readonly props?: types.TableElementProps | undefined;
160
165
  readonly children?: true | undefined;
161
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableHeader", TableElementProps, true>>;
166
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableHeader", types.TableElementProps, true>>;
162
167
  export declare const TableHead: "TableHead" & {
163
168
  readonly type?: "TableHead" | undefined;
164
- readonly props?: TableElementProps | undefined;
169
+ readonly props?: types.TableElementProps | undefined;
165
170
  readonly children?: true | undefined;
166
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableHead", TableElementProps, true>>;
171
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableHead", types.TableElementProps, true>>;
167
172
  export declare const NumberInput: "NumberInput" & {
168
173
  readonly type?: "NumberInput" | undefined;
169
- readonly props?: NumberInputProps | undefined;
174
+ readonly props?: types.NumberInputProps | undefined;
170
175
  readonly children?: true | undefined;
171
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"NumberInput", NumberInputProps, true>>;
176
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"NumberInput", types.NumberInputProps, true>>;
172
177
  export declare const Box: "Box" & {
173
178
  readonly type?: "Box" | undefined;
174
- readonly props?: BoxProps | undefined;
179
+ readonly props?: types.BoxProps | undefined;
175
180
  readonly children?: true | undefined;
176
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Box", BoxProps, true>>;
181
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Box", types.BoxProps, true>>;
177
182
  export declare const StepIndicator: "StepIndicator" & {
178
183
  readonly type?: "StepIndicator" | undefined;
179
- readonly props?: StepIndicatorProps | undefined;
184
+ readonly props?: types.StepIndicatorProps | undefined;
180
185
  readonly children?: true | undefined;
181
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StepIndicator", StepIndicatorProps, true>>;
186
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StepIndicator", types.StepIndicatorProps, true>>;
182
187
  export declare const Accordion: "Accordion" & {
183
188
  readonly type?: "Accordion" | undefined;
184
- readonly props?: AccordionProps | undefined;
189
+ readonly props?: types.AccordionProps | undefined;
190
+ readonly children?: true | undefined;
191
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Accordion", types.AccordionProps, true>>;
192
+ export declare const MultiSelect: "MultiSelect" & {
193
+ readonly type?: "MultiSelect" | undefined;
194
+ readonly props?: types.MultiSelectProps | undefined;
195
+ readonly children?: true | undefined;
196
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"MultiSelect", types.MultiSelectProps, true>>;
197
+ export declare const Flex: "Flex" & {
198
+ readonly type?: "Flex" | undefined;
199
+ readonly props?: types.FlexProps | undefined;
185
200
  readonly children?: true | undefined;
186
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Accordion", AccordionProps, true>>;
201
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Flex", types.FlexProps, true>>;
@@ -12,8 +12,11 @@ export const Form = createRemoteReactComponent('Form');
12
12
  export const Heading = createRemoteReactComponent('Heading');
13
13
  export const Image = createRemoteReactComponent('Image');
14
14
  export const Input = createRemoteReactComponent('Input');
15
- export const Textarea = createRemoteReactComponent('Textarea');
16
15
  export const Link = createRemoteReactComponent('Link');
16
+ export const TextArea = createRemoteReactComponent('TextArea');
17
+ // Textarea was changed to TextArea
18
+ // Exporting both for backwards compat
19
+ export const Textarea = createRemoteReactComponent('Textarea');
17
20
  export const LoadingSpinner = createRemoteReactComponent('LoadingSpinner');
18
21
  export const ProgressBar = createRemoteReactComponent('ProgressBar');
19
22
  export const Select = createRemoteReactComponent('Select');
@@ -36,3 +39,5 @@ export const NumberInput = createRemoteReactComponent('NumberInput');
36
39
  export const Box = createRemoteReactComponent('Box');
37
40
  export const StepIndicator = createRemoteReactComponent('StepIndicator');
38
41
  export const Accordion = createRemoteReactComponent('Accordion');
42
+ export const MultiSelect = createRemoteReactComponent('MultiSelect');
43
+ export const Flex = createRemoteReactComponent('Flex');
@@ -1,4 +1,4 @@
1
- import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmObjectPropertyProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps } from '../types';
1
+ import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmObjectPropertyProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmStageTrackerProps } from '../types';
2
2
  declare const CrmObjectProperty: "CrmObjectProperty" & {
3
3
  readonly type?: "CrmObjectProperty" | undefined;
4
4
  readonly props?: CrmObjectPropertyProps | undefined;
@@ -34,4 +34,9 @@ declare const CrmAssociationPropertyList: "CrmAssociationPropertyList" & {
34
34
  readonly props?: CrmAssociationPropertyListProps | undefined;
35
35
  readonly children?: true | undefined;
36
36
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmAssociationPropertyList", CrmAssociationPropertyListProps, true>>;
37
- export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, };
37
+ declare const CrmStageTracker: "CrmStageTracker" & {
38
+ readonly type?: "CrmStageTracker" | undefined;
39
+ readonly props?: CrmStageTrackerProps | undefined;
40
+ readonly children?: true | undefined;
41
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmStageTracker", CrmStageTrackerProps, true>>;
42
+ export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, };
@@ -6,4 +6,5 @@ const CrmDataHighlight = createExtensionComponent('CrmDataHighlight');
6
6
  const CrmReport = createExtensionComponent('CrmReport');
7
7
  const CrmAssociationPivot = createExtensionComponent('CrmAssociationPivot');
8
8
  const CrmAssociationPropertyList = createExtensionComponent('CrmAssociationPropertyList');
9
- export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, };
9
+ const CrmStageTracker = createExtensionComponent('CrmStageTracker');
10
+ export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, };
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, };
1
+ import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker } from './components';
2
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, };
package/dist/crm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, };
1
+ import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, } from './components';
2
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { Alert, Button, ButtonRow, Card, DescriptionList, DescriptionListItem, Divider, EmptyState, ErrorState, Form, Heading, Image, Input, LoadingSpinner, ProgressBar, Select, Stack, Statistics, StatisticsItem, StatisticsTrend, Table, TableFooter, TableCell, TableRow, TableBody, TableHeader, TableHead, Tag, Text, Textarea, Tile, ToggleGroup, Link, NumberInput, Box, Accordion, StepIndicator, } from './coreComponents';
2
1
  export { hubspot } from './hubspot';
2
+ export * from './coreComponents';
3
3
  export * from './types';
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Alert, Button, ButtonRow, Card, DescriptionList, DescriptionListItem, Divider, EmptyState, ErrorState, Form, Heading, Image, Input, LoadingSpinner, ProgressBar, Select, Stack, Statistics, StatisticsItem, StatisticsTrend, Table, TableFooter, TableCell, TableRow, TableBody, TableHeader, TableHead, Tag, Text, Textarea, Tile, ToggleGroup, Link, NumberInput, Box, Accordion, StepIndicator, } from './coreComponents';
2
1
  export { hubspot } from './hubspot';
2
+ export * from './coreComponents';
3
3
  export * from './types';
package/dist/types.d.ts CHANGED
@@ -78,12 +78,13 @@ export interface InputProps<T = string> {
78
78
  onBlur?: (value: T) => void;
79
79
  onFocus?: (value: T) => void;
80
80
  }
81
- export interface TextareaProps extends InputProps {
81
+ export interface TextAreaProps extends InputProps {
82
82
  cols?: number;
83
83
  maxLength?: number;
84
84
  rows?: number;
85
85
  resize?: 'vertical' | 'horizontal' | 'both' | 'none';
86
86
  }
87
+ export type TextareaProps = TextAreaProps;
87
88
  export interface NumberInputProps extends InputProps<number> {
88
89
  min?: number;
89
90
  max?: number;
@@ -99,10 +100,9 @@ export interface ProgressBarProps {
99
100
  valueDescription?: string;
100
101
  variant?: 'success' | 'danger' | 'warning';
101
102
  }
102
- export interface SelectProps {
103
+ export interface BaseSelectProps {
103
104
  label: string;
104
105
  name: string;
105
- value?: string | number;
106
106
  required?: boolean;
107
107
  readOnly?: boolean;
108
108
  description?: string;
@@ -110,12 +110,19 @@ export interface SelectProps {
110
110
  placeholder?: string;
111
111
  error?: boolean;
112
112
  validationMessage?: string;
113
- onChange?: (value: SelectProps['value']) => void;
114
113
  options: {
115
114
  label: string;
116
115
  value: string | number;
117
116
  }[];
118
117
  }
118
+ export interface SelectProps extends BaseSelectProps {
119
+ value?: string | number;
120
+ onChange?: (value: SelectProps['value']) => void;
121
+ }
122
+ export interface MultiSelectProps extends BaseSelectProps {
123
+ value?: (string | number)[];
124
+ onChange?: (value: MultiSelectProps['value']) => void;
125
+ }
119
126
  export interface TagProps {
120
127
  children: ReactNode;
121
128
  onClick?: () => void;
@@ -209,6 +216,15 @@ export interface StackProps {
209
216
  align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
210
217
  width?: 'auto' | '100%';
211
218
  }
219
+ export interface FlexProps {
220
+ gap?: AllDistances;
221
+ children?: ReactNode;
222
+ direction?: 'row' | 'column';
223
+ justify?: 'center' | 'end' | 'start' | 'around' | 'between';
224
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
225
+ alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
226
+ wrap?: boolean;
227
+ }
212
228
  export interface StatisticsTrendProps {
213
229
  value: string;
214
230
  direction: 'increase' | 'decrease';
@@ -325,6 +341,7 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
325
341
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
326
342
  CrmObjectProperty?: ComponentType<CrmObjectPropertyProps>;
327
343
  CrmAssociationPropertyList?: ComponentType<CrmAssociationPropertyListProps>;
344
+ CrmStageTracker?: ComponentType<CrmStageTrackerProps>;
328
345
  };
329
346
  }
330
347
  export interface CrmDataHighlightProps {
@@ -382,6 +399,11 @@ export interface CrmAssociationPropertyListProps {
382
399
  filters?: Array<CrmSearchFilter>;
383
400
  sort?: Array<CrmSortDescriptor>;
384
401
  }
402
+ export interface CrmStageTrackerProps {
403
+ objectId?: number;
404
+ objectTypeId?: string;
405
+ properties: Array<string>;
406
+ }
385
407
  interface CrmSidebarExtensionPoint extends ExtensionPointContract {
386
408
  actions: {
387
409
  reloadPage: ReloadPageAction;
@@ -462,8 +484,8 @@ export type JsonValue = string | number | boolean | null | JsonValue[] | {
462
484
  };
463
485
  export interface BoxProps {
464
486
  children: ReactNode;
465
- grow?: boolean;
466
487
  alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch' | 'auto';
488
+ flex?: 'initial' | 'auto' | 'none' | number;
467
489
  }
468
490
  interface TShirtSizes {
469
491
  xs: 'extra-small' | 'xs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -48,5 +48,5 @@
48
48
  "devDependencies": {
49
49
  "typescript": "5.0.4"
50
50
  },
51
- "gitHead": "0b20c005a9564bbde58c22ce21959c713f354607"
51
+ "gitHead": "1269fb86282dd5f6b9686d064b6c652f00cb863f"
52
52
  }