@hubspot/ui-extensions 0.2.0 → 0.3.1
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 +70 -5
- package/dist/coreComponents.d.ts +88 -78
- package/dist/coreComponents.js +5 -1
- package/dist/crm/components.d.ts +7 -2
- package/dist/crm/components.js +2 -1
- package/dist/crm/index.d.ts +2 -2
- package/dist/crm/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +18 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ React components and utilities for extending HubSpot's UI.
|
|
|
20
20
|
- [Input](#input)
|
|
21
21
|
- [Link](#link)
|
|
22
22
|
- [LoadingSpinner](#loadingspinner)
|
|
23
|
+
- [Multiselect](#multiselect)
|
|
23
24
|
- [NumberInput](#numberInput)
|
|
24
25
|
- [ProgressBar](#progressbar)
|
|
25
26
|
- [Select](#select)
|
|
@@ -37,7 +38,7 @@ React components and utilities for extending HubSpot's UI.
|
|
|
37
38
|
- [TableRow](#tablerow)
|
|
38
39
|
- [Tag](#tag)
|
|
39
40
|
- [Text](#text)
|
|
40
|
-
- [
|
|
41
|
+
- [TextArea](#textarea)
|
|
41
42
|
- [Tile](#tile)
|
|
42
43
|
- [ToggleGroup](#togglegroup)
|
|
43
44
|
|
|
@@ -792,6 +793,70 @@ const Extension = () => {
|
|
|
792
793
|
return <LoadingSpinner label="Loading..." />;
|
|
793
794
|
};
|
|
794
795
|
```
|
|
796
|
+
### Multiselect
|
|
797
|
+
|
|
798
|
+
```javascript
|
|
799
|
+
import { Multiselect } from '@hubspot/ui-extensions';
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
### Props
|
|
803
|
+
|
|
804
|
+
```typescript
|
|
805
|
+
interface MultiSelectProps {
|
|
806
|
+
label: string;
|
|
807
|
+
name: string;
|
|
808
|
+
value?: (string | number)[];
|
|
809
|
+
required?: boolean;
|
|
810
|
+
readOnly?: boolean;
|
|
811
|
+
description?: string;
|
|
812
|
+
tooltip?: string;
|
|
813
|
+
placeholder?: string;
|
|
814
|
+
error?: boolean;
|
|
815
|
+
errorMessage?: string;
|
|
816
|
+
onChange: (value: (string | number)[]) => void;
|
|
817
|
+
options: {
|
|
818
|
+
label: string;
|
|
819
|
+
value: string | number;
|
|
820
|
+
}[];
|
|
821
|
+
}
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
| Prop | Type | Default | Description |
|
|
825
|
+
| --- | --- | --- | --- |
|
|
826
|
+
| `label` | `string` | `N/A` | The label text to display for the select element. |
|
|
827
|
+
| `name` | `string` | `N/A` | The unique identifier for the select element. |
|
|
828
|
+
| `value` | `Array<string \| number>` | `N/A` | The value of the select input. |
|
|
829
|
+
| `required` | `boolean` | `false` | Determines if the required indicator should be displayed. |
|
|
830
|
+
| `readOnly` | `boolean` | `false` | Determines if the field is editable or not. |
|
|
831
|
+
| `description` | `string` | `N/A` | Instructional message to display to the user to help understand the purpose of the input. |
|
|
832
|
+
| `tooltip` | `string` | `N/A` | Text that will appear in a tooltip next to the input label. |
|
|
833
|
+
| `placeholder` | `string` | `N/A` | Text that appears in the input when it has no value set. |
|
|
834
|
+
| `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. |
|
|
835
|
+
| `validationMessage` | `string(optional)` | `''` | The text to show if the input has an error. |
|
|
836
|
+
| `onChange` | `(value: Array<string \| number>) => void` | `N/A` | Function that is called with the new value when it is updated. |
|
|
837
|
+
| `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. |
|
|
838
|
+
|
|
839
|
+
##### Usage
|
|
840
|
+
|
|
841
|
+
```javascript
|
|
842
|
+
const Extension = () => {
|
|
843
|
+
const options = [
|
|
844
|
+
{ label: 'Ice cream', value: 'ice-cream' },
|
|
845
|
+
{ label: 'Pizza', value: 'pizza' },
|
|
846
|
+
{ label: 'Burger', value: 'burger' },
|
|
847
|
+
{ label: 'Soda', value: 'soda' },
|
|
848
|
+
];
|
|
849
|
+
|
|
850
|
+
return (
|
|
851
|
+
<MultiSelect
|
|
852
|
+
name="favorite-food"
|
|
853
|
+
label="Favorite Food"
|
|
854
|
+
options={options}
|
|
855
|
+
/>
|
|
856
|
+
);
|
|
857
|
+
};
|
|
858
|
+
```
|
|
859
|
+
|
|
795
860
|
### NumberInput
|
|
796
861
|
|
|
797
862
|
##### Import
|
|
@@ -1726,12 +1791,12 @@ const Extension = () => {
|
|
|
1726
1791
|
};
|
|
1727
1792
|
```
|
|
1728
1793
|
|
|
1729
|
-
###
|
|
1794
|
+
### TextArea
|
|
1730
1795
|
|
|
1731
1796
|
##### Import
|
|
1732
1797
|
|
|
1733
1798
|
```javascript
|
|
1734
|
-
import {
|
|
1799
|
+
import { TextArea } from '@hubspot/ui-extensions';
|
|
1735
1800
|
```
|
|
1736
1801
|
|
|
1737
1802
|
##### Props
|
|
@@ -1762,7 +1827,7 @@ interface TextareaProps {
|
|
|
1762
1827
|
| Prop | Type | Default | Description |
|
|
1763
1828
|
| --- | --- | --- | --- |
|
|
1764
1829
|
| `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 [
|
|
1830
|
+
| `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
1831
|
| `value` | `string(optional)` | `''` | The value of the textarea |
|
|
1767
1832
|
| `required` | `boolean(optional)` | `false` | Determines if the required indicator should be displayed |
|
|
1768
1833
|
| `readOnly` | `boolean(optional)` | `false` | Determines if the field is editable or not. |
|
|
@@ -1792,7 +1857,7 @@ const Extension = () => {
|
|
|
1792
1857
|
|
|
1793
1858
|
return (
|
|
1794
1859
|
<Form>
|
|
1795
|
-
<
|
|
1860
|
+
<TextArea
|
|
1796
1861
|
label="Description"
|
|
1797
1862
|
name="description"
|
|
1798
1863
|
tooltip="Provide as much detail as possible"
|
package/dist/coreComponents.d.ts
CHANGED
|
@@ -1,186 +1,196 @@
|
|
|
1
|
-
import type
|
|
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;
|
|
70
|
+
readonly children?: true | undefined;
|
|
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
75
|
readonly children?: true | undefined;
|
|
76
|
-
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"
|
|
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;
|
|
185
195
|
readonly children?: true | undefined;
|
|
186
|
-
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"
|
|
196
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"MultiSelect", types.MultiSelectProps, true>>;
|
package/dist/coreComponents.js
CHANGED
|
@@ -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,4 @@ 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');
|
package/dist/crm/components.d.ts
CHANGED
|
@@ -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
|
-
|
|
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, };
|
package/dist/crm/components.js
CHANGED
|
@@ -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
|
-
|
|
9
|
+
const CrmStageTracker = createExtensionComponent('CrmStageTracker');
|
|
10
|
+
export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, };
|
package/dist/crm/index.d.ts
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/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, } 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, } 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
|
|
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
|
|
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;
|
|
@@ -325,6 +332,7 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
|
|
|
325
332
|
CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
|
|
326
333
|
CrmObjectProperty?: ComponentType<CrmObjectPropertyProps>;
|
|
327
334
|
CrmAssociationPropertyList?: ComponentType<CrmAssociationPropertyListProps>;
|
|
335
|
+
CrmStageTracker?: ComponentType<CrmStageTrackerProps>;
|
|
328
336
|
};
|
|
329
337
|
}
|
|
330
338
|
export interface CrmDataHighlightProps {
|
|
@@ -363,6 +371,7 @@ export interface CrmAssociationTableProps {
|
|
|
363
371
|
quickFilterProperties?: Array<string>;
|
|
364
372
|
searchable?: boolean;
|
|
365
373
|
pagination?: boolean;
|
|
374
|
+
associationLabelFilter?: boolean;
|
|
366
375
|
pageSize?: number;
|
|
367
376
|
preFilters?: Array<CrmSearchFilter>;
|
|
368
377
|
sort?: Array<CrmSortDescriptor>;
|
|
@@ -381,6 +390,11 @@ export interface CrmAssociationPropertyListProps {
|
|
|
381
390
|
filters?: Array<CrmSearchFilter>;
|
|
382
391
|
sort?: Array<CrmSortDescriptor>;
|
|
383
392
|
}
|
|
393
|
+
export interface CrmStageTrackerProps {
|
|
394
|
+
objectId?: number;
|
|
395
|
+
objectTypeId?: string;
|
|
396
|
+
properties: Array<string>;
|
|
397
|
+
}
|
|
384
398
|
interface CrmSidebarExtensionPoint extends ExtensionPointContract {
|
|
385
399
|
actions: {
|
|
386
400
|
reloadPage: ReloadPageAction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/ui-extensions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
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": "
|
|
51
|
+
"gitHead": "3da4a07183d48528ef431d46a8d327c053c4fe94"
|
|
52
52
|
}
|