@hubspot/ui-extensions 0.1.0 → 0.3.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 +121 -0
- package/dist/coreComponents.d.ts +54 -45
- package/dist/coreComponents.js +37 -36
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +20 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@ React components and utilities for extending HubSpot's UI.
|
|
|
4
4
|
|
|
5
5
|
## TOC
|
|
6
6
|
|
|
7
|
+
- [Accordion](#accordion)
|
|
7
8
|
- [Alert](#alert)
|
|
8
9
|
- [Button](#button)
|
|
9
10
|
- [ButtonRow](#buttonrow)
|
|
@@ -26,6 +27,7 @@ React components and utilities for extending HubSpot's UI.
|
|
|
26
27
|
- [Statistics](#statistics)
|
|
27
28
|
- [StatisticsItem](#statisticsitem)
|
|
28
29
|
- [StatisticsTrend](#statisticstrend)
|
|
30
|
+
- [StepIndicator](#StepIndicator)
|
|
29
31
|
- [Table](#table)
|
|
30
32
|
- [TableBody](#tablebody)
|
|
31
33
|
- [TableCell](#tablecell)
|
|
@@ -41,6 +43,64 @@ React components and utilities for extending HubSpot's UI.
|
|
|
41
43
|
|
|
42
44
|
## Components
|
|
43
45
|
|
|
46
|
+
### Accordion
|
|
47
|
+
|
|
48
|
+
##### Import
|
|
49
|
+
|
|
50
|
+
```javascript
|
|
51
|
+
import { Accordion } from '@hubspot/ui-extensions';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
##### Props
|
|
55
|
+
|
|
56
|
+
The Accordion component accepts the following props:
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
export interface AccordionProps {
|
|
60
|
+
title: string;
|
|
61
|
+
children: ReactNode;
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
open?: boolean;
|
|
65
|
+
onClick?: () => void;
|
|
66
|
+
size?:
|
|
67
|
+
| 'small'
|
|
68
|
+
| 'extra-small'
|
|
69
|
+
| 'medium'
|
|
70
|
+
| 'xs'
|
|
71
|
+
| 'sm'
|
|
72
|
+
| 'md';
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Prop | Type | Default | Description |
|
|
77
|
+
| --- | --- | --- | --- |
|
|
78
|
+
| `title` | `string` | `N/A` | The title text for the accordion. |
|
|
79
|
+
| `children` | `ReactNode(optional)` | `N/A` | The main content of the accordion when it opens. |
|
|
80
|
+
| `defaultOpen` | `boolean(optional)` | `false` | If `true`, the accordion will be open by default. |
|
|
81
|
+
| `disabled` | `boolean(optional)` | `false` | If `true`, users cannot change the open state of the accordion. |
|
|
82
|
+
| `open` | `boolean(optional)` | `N/A` | Use it when you want to control the open state programatically. If true, the accordion will open. |
|
|
83
|
+
| `onClick` | `() => void` `(optional)` | `N/A` | A function that will be invoked when the title is clicked. It receives no arguments and it's return value is ignored. |
|
|
84
|
+
| `size` | `'extra-small' \| 'small' \| 'medium' \| 'xs' \| 'sm' \| 'md'` | `'small'` | The size of the accordion title.|
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
##### Usage
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
function Extension() {
|
|
91
|
+
return (
|
|
92
|
+
<>
|
|
93
|
+
<Accordion title="Item One">
|
|
94
|
+
<Text>first inner text</Text>
|
|
95
|
+
</Accordion>
|
|
96
|
+
<Accordion title="Item Two">
|
|
97
|
+
<Text>second inner text</Text>
|
|
98
|
+
</Accordion>
|
|
99
|
+
</>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
44
104
|
### Alert
|
|
45
105
|
|
|
46
106
|
##### Import
|
|
@@ -679,6 +739,7 @@ export interface LinkProps {
|
|
|
679
739
|
variant?: 'primary' | 'destructive' | 'light' | 'dark';
|
|
680
740
|
children: ReactNode;
|
|
681
741
|
onClick?: () => void;
|
|
742
|
+
preventDefault?: boolean;
|
|
682
743
|
}
|
|
683
744
|
```
|
|
684
745
|
|
|
@@ -688,6 +749,7 @@ export interface LinkProps {
|
|
|
688
749
|
| `variant` | `'primary' \| 'light' \| 'dark' \| 'destructive'` `(optional)` | `'primary'` | Sets the color variation of the link |
|
|
689
750
|
| `children` | `ReactNode` | `N/A` | Sets the content that will render inside the component. |
|
|
690
751
|
| `onClick` | `() => void` `(optional)` | `N/A` | A function that will be invoked when the link is clicked. It receives no arguments and it's return value is ignored |
|
|
752
|
+
| `preventDefault` | `boolean(optional)` | `false` | If set to `true` `event.preventDefault()` will be invoked before your `onClick` function is called, preventing automatic navigation to the anchor's href url. |
|
|
691
753
|
|
|
692
754
|
##### Usage
|
|
693
755
|
|
|
@@ -817,6 +879,7 @@ import { ProgressBar } from '@hubspot/ui-extensions';
|
|
|
817
879
|
```typescript
|
|
818
880
|
export interface ProgressBarProps {
|
|
819
881
|
title?: string;
|
|
882
|
+
aria-label?: string;
|
|
820
883
|
showPercentage?: boolean;
|
|
821
884
|
value?: number;
|
|
822
885
|
valueMax?: number;
|
|
@@ -833,6 +896,7 @@ export interface ProgressBarProps {
|
|
|
833
896
|
| `valueMax` | `number(optional)` | `100` | The maximum value of the progress. |
|
|
834
897
|
| `valueDescription` | `string(optional)` | `N/A` | Text that explains the current state of the `value` prop. Renders to the right of `title`. **Example: "10,000 of 7,500"** |
|
|
835
898
|
| `variant` | `'success' \| 'danger' \| 'warning'` | `'success'` | The type of progressbar to display. Defaults to success. |
|
|
899
|
+
| `aria-label` | `string(optional)` | `N/A` | Indicates the content of the ProgressBar to screen readers. Should be used if there's no title. |
|
|
836
900
|
|
|
837
901
|
##### Usage
|
|
838
902
|
|
|
@@ -1095,6 +1159,63 @@ const Extension = () => {
|
|
|
1095
1159
|
};
|
|
1096
1160
|
```
|
|
1097
1161
|
|
|
1162
|
+
|
|
1163
|
+
### StepIndicator
|
|
1164
|
+
|
|
1165
|
+
##### Import
|
|
1166
|
+
|
|
1167
|
+
```javascript
|
|
1168
|
+
import { StepIndicator } from '@hubspot/ui-extensions';
|
|
1169
|
+
```
|
|
1170
|
+
|
|
1171
|
+
##### Props
|
|
1172
|
+
|
|
1173
|
+
```typescript
|
|
1174
|
+
export interface StepIndicatorProps {
|
|
1175
|
+
stepNames: string[];
|
|
1176
|
+
direction?: 'horizontal' | 'vertical';
|
|
1177
|
+
onClick?: (stepIndex: number) => void;
|
|
1178
|
+
circleSize?: AllSizes;
|
|
1179
|
+
currentStep?: number;
|
|
1180
|
+
variant?: 'default' | 'compact' | 'flush';
|
|
1181
|
+
}
|
|
1182
|
+
```
|
|
1183
|
+
|
|
1184
|
+
| Prop | Type | Default | Description |
|
|
1185
|
+
| --- | --- | --- | --- |
|
|
1186
|
+
| `stepNames` | `Array<string>` | `N/A` | Sets the name of the available steps. |
|
|
1187
|
+
| `direction` | `'horizontal' \| 'vertical'` `(optional)` | `N/A` | Determines whether the step indicator is laid out on a horizontal or vertical axis. |
|
|
1188
|
+
| `onClick` | `() => void` `(optional)` | `N/A` | A function that will be invoked when a step is clicked. It receives the current step index as an argument(zero based). Use this to update the active step.|
|
|
1189
|
+
| `circleSize` | `'extra-small' \| 'small' \| 'medium' \| 'large'\| 'extra-large'` `(optional)` | `'small'` | Determines the size of the circle of an individual step. |
|
|
1190
|
+
| `currentStep` | `number(optional)` | `N/A` | Determines which step is visually active in the step indicator. |
|
|
1191
|
+
| `variant` | `'default' \| 'compact' \| 'flush'` `(optional)` | `'default'` | Changes the visual styling of the component. compact only shows the title of the active step. flush does the same thing, but also removes the left and right margins. |
|
|
1192
|
+
|
|
1193
|
+
##### Usage
|
|
1194
|
+
|
|
1195
|
+
```javascript
|
|
1196
|
+
function Extension() {
|
|
1197
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
1198
|
+
|
|
1199
|
+
return (
|
|
1200
|
+
<Stack>
|
|
1201
|
+
<StepIndicator
|
|
1202
|
+
currentStep={currentStep}
|
|
1203
|
+
stepNames={['First', 'Second', 'Third']}
|
|
1204
|
+
/>
|
|
1205
|
+
<Stack>
|
|
1206
|
+
<Button onClick={() => setCurrentStep(currentStep - 1)}>
|
|
1207
|
+
Previous
|
|
1208
|
+
</Button>
|
|
1209
|
+
<Button onClick={() => setCurrentStep(currentStep + 1)}>
|
|
1210
|
+
Next
|
|
1211
|
+
</Button>
|
|
1212
|
+
</Stack>
|
|
1213
|
+
</Stack>
|
|
1214
|
+
);
|
|
1215
|
+
}
|
|
1216
|
+
```
|
|
1217
|
+
|
|
1218
|
+
|
|
1098
1219
|
### Table
|
|
1099
1220
|
|
|
1100
1221
|
##### Import
|
package/dist/coreComponents.d.ts
CHANGED
|
@@ -1,177 +1,186 @@
|
|
|
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 } from './types';
|
|
2
|
-
declare const Alert: "Alert" & {
|
|
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';
|
|
2
|
+
export declare const Alert: "Alert" & {
|
|
3
3
|
readonly type?: "Alert" | undefined;
|
|
4
4
|
readonly props?: AlertProps | undefined;
|
|
5
5
|
readonly children?: true | undefined;
|
|
6
6
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Alert", AlertProps, true>>;
|
|
7
|
-
declare const Button: "Button" & {
|
|
7
|
+
export declare const Button: "Button" & {
|
|
8
8
|
readonly type?: "Button" | undefined;
|
|
9
9
|
readonly props?: ButtonProps | undefined;
|
|
10
10
|
readonly children?: true | undefined;
|
|
11
11
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Button", ButtonProps, true>>;
|
|
12
|
-
declare const ButtonRow: "ButtonRow" & {
|
|
12
|
+
export declare const ButtonRow: "ButtonRow" & {
|
|
13
13
|
readonly type?: "ButtonRow" | undefined;
|
|
14
14
|
readonly props?: ButtonRowProps | undefined;
|
|
15
15
|
readonly children?: true | undefined;
|
|
16
16
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ButtonRow", ButtonRowProps, true>>;
|
|
17
|
-
declare const Card: "Card" & {
|
|
17
|
+
export declare const Card: "Card" & {
|
|
18
18
|
readonly type?: "Card" | undefined;
|
|
19
19
|
readonly props?: CardProps | undefined;
|
|
20
20
|
readonly children?: true | undefined;
|
|
21
21
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Card", CardProps, true>>;
|
|
22
|
-
declare const DescriptionList: "DescriptionList" & {
|
|
22
|
+
export declare const DescriptionList: "DescriptionList" & {
|
|
23
23
|
readonly type?: "DescriptionList" | undefined;
|
|
24
24
|
readonly props?: DescriptionListProps | undefined;
|
|
25
25
|
readonly children?: true | undefined;
|
|
26
26
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DescriptionList", DescriptionListProps, true>>;
|
|
27
|
-
declare const DescriptionListItem: "DescriptionListItem" & {
|
|
27
|
+
export declare const DescriptionListItem: "DescriptionListItem" & {
|
|
28
28
|
readonly type?: "DescriptionListItem" | undefined;
|
|
29
29
|
readonly props?: DescriptionListItemProps | undefined;
|
|
30
30
|
readonly children?: true | undefined;
|
|
31
31
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DescriptionListItem", DescriptionListItemProps, true>>;
|
|
32
|
-
declare const Divider: "Divider" & {
|
|
32
|
+
export declare const Divider: "Divider" & {
|
|
33
33
|
readonly type?: "Divider" | undefined;
|
|
34
34
|
readonly props?: DividerProps | undefined;
|
|
35
35
|
readonly children?: true | undefined;
|
|
36
36
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Divider", DividerProps, true>>;
|
|
37
|
-
declare const EmptyState: "EmptyState" & {
|
|
37
|
+
export declare const EmptyState: "EmptyState" & {
|
|
38
38
|
readonly type?: "EmptyState" | undefined;
|
|
39
39
|
readonly props?: EmptyStateProps | undefined;
|
|
40
40
|
readonly children?: true | undefined;
|
|
41
41
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"EmptyState", EmptyStateProps, true>>;
|
|
42
|
-
declare const ErrorState: "ErrorState" & {
|
|
42
|
+
export declare const ErrorState: "ErrorState" & {
|
|
43
43
|
readonly type?: "ErrorState" | undefined;
|
|
44
44
|
readonly props?: ErrorStateProps | undefined;
|
|
45
45
|
readonly children?: true | undefined;
|
|
46
46
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ErrorState", ErrorStateProps, true>>;
|
|
47
|
-
declare const Form: "Form" & {
|
|
47
|
+
export declare const Form: "Form" & {
|
|
48
48
|
readonly type?: "Form" | undefined;
|
|
49
49
|
readonly props?: FormProps | undefined;
|
|
50
50
|
readonly children?: true | undefined;
|
|
51
51
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Form", FormProps, true>>;
|
|
52
|
-
declare const Heading: "Heading" & {
|
|
52
|
+
export declare const Heading: "Heading" & {
|
|
53
53
|
readonly type?: "Heading" | undefined;
|
|
54
54
|
readonly props?: HeadingProps | undefined;
|
|
55
55
|
readonly children?: true | undefined;
|
|
56
56
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Heading", HeadingProps, true>>;
|
|
57
|
-
declare const Image: "Image" & {
|
|
57
|
+
export declare const Image: "Image" & {
|
|
58
58
|
readonly type?: "Image" | undefined;
|
|
59
59
|
readonly props?: ImageProps | undefined;
|
|
60
60
|
readonly children?: true | undefined;
|
|
61
61
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Image", ImageProps, true>>;
|
|
62
|
-
declare const Input: "Input" & {
|
|
62
|
+
export declare const Input: "Input" & {
|
|
63
63
|
readonly type?: "Input" | undefined;
|
|
64
64
|
readonly props?: InputProps<string> | undefined;
|
|
65
65
|
readonly children?: true | undefined;
|
|
66
66
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Input", InputProps<string>, true>>;
|
|
67
|
-
declare const Textarea: "Textarea" & {
|
|
67
|
+
export declare const Textarea: "Textarea" & {
|
|
68
68
|
readonly type?: "Textarea" | undefined;
|
|
69
69
|
readonly props?: TextareaProps | undefined;
|
|
70
70
|
readonly children?: true | undefined;
|
|
71
71
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Textarea", TextareaProps, true>>;
|
|
72
|
-
declare const
|
|
72
|
+
export declare const Link: "Link" & {
|
|
73
|
+
readonly type?: "Link" | undefined;
|
|
74
|
+
readonly props?: LinkProps | undefined;
|
|
75
|
+
readonly children?: true | undefined;
|
|
76
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Link", LinkProps, true>>;
|
|
77
|
+
export declare const LoadingSpinner: "LoadingSpinner" & {
|
|
73
78
|
readonly type?: "LoadingSpinner" | undefined;
|
|
74
79
|
readonly props?: LoadingSpinnerProps | undefined;
|
|
75
80
|
readonly children?: true | undefined;
|
|
76
81
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"LoadingSpinner", LoadingSpinnerProps, true>>;
|
|
77
|
-
declare const ProgressBar: "ProgressBar" & {
|
|
82
|
+
export declare const ProgressBar: "ProgressBar" & {
|
|
78
83
|
readonly type?: "ProgressBar" | undefined;
|
|
79
84
|
readonly props?: ProgressBarProps | undefined;
|
|
80
85
|
readonly children?: true | undefined;
|
|
81
86
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ProgressBar", ProgressBarProps, true>>;
|
|
82
|
-
declare const Select: "Select" & {
|
|
87
|
+
export declare const Select: "Select" & {
|
|
83
88
|
readonly type?: "Select" | undefined;
|
|
84
89
|
readonly props?: SelectProps | undefined;
|
|
85
90
|
readonly children?: true | undefined;
|
|
86
91
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Select", SelectProps, true>>;
|
|
87
|
-
declare const Tag: "Tag" & {
|
|
92
|
+
export declare const Tag: "Tag" & {
|
|
88
93
|
readonly type?: "Tag" | undefined;
|
|
89
94
|
readonly props?: TagProps | undefined;
|
|
90
95
|
readonly children?: true | undefined;
|
|
91
96
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tag", TagProps, true>>;
|
|
92
|
-
declare const Text: "Text" & {
|
|
97
|
+
export declare const Text: "Text" & {
|
|
93
98
|
readonly type?: "Text" | undefined;
|
|
94
99
|
readonly props?: TextProps | undefined;
|
|
95
100
|
readonly children?: true | undefined;
|
|
96
101
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Text", TextProps, true>>;
|
|
97
|
-
declare const Tile: "Tile" & {
|
|
102
|
+
export declare const Tile: "Tile" & {
|
|
98
103
|
readonly type?: "Tile" | undefined;
|
|
99
104
|
readonly props?: TileProps | undefined;
|
|
100
105
|
readonly children?: true | undefined;
|
|
101
106
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tile", TileProps, true>>;
|
|
102
|
-
declare const
|
|
103
|
-
readonly type?: "ToggleGroup" | undefined;
|
|
104
|
-
readonly props?: ToggleGroupProps | undefined;
|
|
105
|
-
readonly children?: true | undefined;
|
|
106
|
-
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ToggleGroup", ToggleGroupProps, true>>;
|
|
107
|
-
declare const Stack: "Stack" & {
|
|
107
|
+
export declare const Stack: "Stack" & {
|
|
108
108
|
readonly type?: "Stack" | undefined;
|
|
109
109
|
readonly props?: StackProps | undefined;
|
|
110
110
|
readonly children?: true | undefined;
|
|
111
111
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Stack", StackProps, true>>;
|
|
112
|
-
declare const
|
|
112
|
+
export declare const ToggleGroup: "ToggleGroup" & {
|
|
113
|
+
readonly type?: "ToggleGroup" | undefined;
|
|
114
|
+
readonly props?: ToggleGroupProps | undefined;
|
|
115
|
+
readonly children?: true | undefined;
|
|
116
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ToggleGroup", ToggleGroupProps, true>>;
|
|
117
|
+
export declare const StatisticsItem: "StatisticsItem" & {
|
|
113
118
|
readonly type?: "StatisticsItem" | undefined;
|
|
114
119
|
readonly props?: StatisticsItemProps | undefined;
|
|
115
120
|
readonly children?: true | undefined;
|
|
116
121
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatisticsItem", StatisticsItemProps, true>>;
|
|
117
|
-
declare const Statistics: "Statistics" & {
|
|
122
|
+
export declare const Statistics: "Statistics" & {
|
|
118
123
|
readonly type?: "Statistics" | undefined;
|
|
119
124
|
readonly props?: StatisticsProps | undefined;
|
|
120
125
|
readonly children?: true | undefined;
|
|
121
126
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Statistics", StatisticsProps, true>>;
|
|
122
|
-
declare const StatisticsTrend: "StatisticsTrend" & {
|
|
127
|
+
export declare const StatisticsTrend: "StatisticsTrend" & {
|
|
123
128
|
readonly type?: "StatisticsTrend" | undefined;
|
|
124
129
|
readonly props?: StatisticsTrendProps | undefined;
|
|
125
130
|
readonly children?: true | undefined;
|
|
126
131
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatisticsTrend", StatisticsTrendProps, true>>;
|
|
127
|
-
declare const Table: "Table" & {
|
|
132
|
+
export declare const Table: "Table" & {
|
|
128
133
|
readonly type?: "Table" | undefined;
|
|
129
134
|
readonly props?: TableProps | undefined;
|
|
130
135
|
readonly children?: true | undefined;
|
|
131
136
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Table", TableProps, true>>;
|
|
132
|
-
declare const TableFooter: "TableFooter" & {
|
|
137
|
+
export declare const TableFooter: "TableFooter" & {
|
|
133
138
|
readonly type?: "TableFooter" | undefined;
|
|
134
139
|
readonly props?: TableElementProps | undefined;
|
|
135
140
|
readonly children?: true | undefined;
|
|
136
141
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableFooter", TableElementProps, true>>;
|
|
137
|
-
declare const TableCell: "TableCell" & {
|
|
142
|
+
export declare const TableCell: "TableCell" & {
|
|
138
143
|
readonly type?: "TableCell" | undefined;
|
|
139
144
|
readonly props?: TableElementProps | undefined;
|
|
140
145
|
readonly children?: true | undefined;
|
|
141
146
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableCell", TableElementProps, true>>;
|
|
142
|
-
declare const TableRow: "TableRow" & {
|
|
147
|
+
export declare const TableRow: "TableRow" & {
|
|
143
148
|
readonly type?: "TableRow" | undefined;
|
|
144
149
|
readonly props?: TableElementProps | undefined;
|
|
145
150
|
readonly children?: true | undefined;
|
|
146
151
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableRow", TableElementProps, true>>;
|
|
147
|
-
declare const TableBody: "TableBody" & {
|
|
152
|
+
export declare const TableBody: "TableBody" & {
|
|
148
153
|
readonly type?: "TableBody" | undefined;
|
|
149
154
|
readonly props?: TableElementProps | undefined;
|
|
150
155
|
readonly children?: true | undefined;
|
|
151
156
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableBody", TableElementProps, true>>;
|
|
152
|
-
declare const TableHeader: "TableHeader" & {
|
|
157
|
+
export declare const TableHeader: "TableHeader" & {
|
|
153
158
|
readonly type?: "TableHeader" | undefined;
|
|
154
159
|
readonly props?: TableElementProps | undefined;
|
|
155
160
|
readonly children?: true | undefined;
|
|
156
161
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableHeader", TableElementProps, true>>;
|
|
157
|
-
declare const TableHead: "TableHead" & {
|
|
162
|
+
export declare const TableHead: "TableHead" & {
|
|
158
163
|
readonly type?: "TableHead" | undefined;
|
|
159
164
|
readonly props?: TableElementProps | undefined;
|
|
160
165
|
readonly children?: true | undefined;
|
|
161
166
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"TableHead", TableElementProps, true>>;
|
|
162
|
-
declare const
|
|
163
|
-
readonly type?: "Link" | undefined;
|
|
164
|
-
readonly props?: LinkProps | undefined;
|
|
165
|
-
readonly children?: true | undefined;
|
|
166
|
-
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Link", LinkProps, true>>;
|
|
167
|
-
declare const NumberInput: "NumberInput" & {
|
|
167
|
+
export declare const NumberInput: "NumberInput" & {
|
|
168
168
|
readonly type?: "NumberInput" | undefined;
|
|
169
169
|
readonly props?: NumberInputProps | undefined;
|
|
170
170
|
readonly children?: true | undefined;
|
|
171
171
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"NumberInput", NumberInputProps, true>>;
|
|
172
|
-
declare const Box: "Box" & {
|
|
172
|
+
export declare const Box: "Box" & {
|
|
173
173
|
readonly type?: "Box" | undefined;
|
|
174
174
|
readonly props?: BoxProps | undefined;
|
|
175
175
|
readonly children?: true | undefined;
|
|
176
176
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Box", BoxProps, true>>;
|
|
177
|
-
export
|
|
177
|
+
export declare const StepIndicator: "StepIndicator" & {
|
|
178
|
+
readonly type?: "StepIndicator" | undefined;
|
|
179
|
+
readonly props?: StepIndicatorProps | undefined;
|
|
180
|
+
readonly children?: true | undefined;
|
|
181
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StepIndicator", StepIndicatorProps, true>>;
|
|
182
|
+
export declare const Accordion: "Accordion" & {
|
|
183
|
+
readonly type?: "Accordion" | undefined;
|
|
184
|
+
readonly props?: AccordionProps | undefined;
|
|
185
|
+
readonly children?: true | undefined;
|
|
186
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Accordion", AccordionProps, true>>;
|
package/dist/coreComponents.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { createRemoteReactComponent } from '@remote-ui/react';
|
|
2
|
-
const Alert = createRemoteReactComponent('Alert');
|
|
3
|
-
const Button = createRemoteReactComponent('Button');
|
|
4
|
-
const ButtonRow = createRemoteReactComponent('ButtonRow');
|
|
5
|
-
const Card = createRemoteReactComponent('Card');
|
|
6
|
-
const DescriptionList = createRemoteReactComponent('DescriptionList');
|
|
7
|
-
const DescriptionListItem = createRemoteReactComponent('DescriptionListItem');
|
|
8
|
-
const Divider = createRemoteReactComponent('Divider');
|
|
9
|
-
const EmptyState = createRemoteReactComponent('EmptyState');
|
|
10
|
-
const ErrorState = createRemoteReactComponent('ErrorState');
|
|
11
|
-
const Form = createRemoteReactComponent('Form');
|
|
12
|
-
const Heading = createRemoteReactComponent('Heading');
|
|
13
|
-
const Image = createRemoteReactComponent('Image');
|
|
14
|
-
const Input = createRemoteReactComponent('Input');
|
|
15
|
-
const Textarea = createRemoteReactComponent('Textarea');
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const Stack = createRemoteReactComponent('Stack');
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const NumberInput = createRemoteReactComponent('NumberInput');
|
|
36
|
-
const Box = createRemoteReactComponent('Box');
|
|
37
|
-
export
|
|
2
|
+
export const Alert = createRemoteReactComponent('Alert');
|
|
3
|
+
export const Button = createRemoteReactComponent('Button');
|
|
4
|
+
export const ButtonRow = createRemoteReactComponent('ButtonRow');
|
|
5
|
+
export const Card = createRemoteReactComponent('Card');
|
|
6
|
+
export const DescriptionList = createRemoteReactComponent('DescriptionList');
|
|
7
|
+
export const DescriptionListItem = createRemoteReactComponent('DescriptionListItem');
|
|
8
|
+
export const Divider = createRemoteReactComponent('Divider');
|
|
9
|
+
export const EmptyState = createRemoteReactComponent('EmptyState');
|
|
10
|
+
export const ErrorState = createRemoteReactComponent('ErrorState');
|
|
11
|
+
export const Form = createRemoteReactComponent('Form');
|
|
12
|
+
export const Heading = createRemoteReactComponent('Heading');
|
|
13
|
+
export const Image = createRemoteReactComponent('Image');
|
|
14
|
+
export const Input = createRemoteReactComponent('Input');
|
|
15
|
+
export const Textarea = createRemoteReactComponent('Textarea');
|
|
16
|
+
export const Link = createRemoteReactComponent('Link');
|
|
17
|
+
export const LoadingSpinner = createRemoteReactComponent('LoadingSpinner');
|
|
18
|
+
export const ProgressBar = createRemoteReactComponent('ProgressBar');
|
|
19
|
+
export const Select = createRemoteReactComponent('Select');
|
|
20
|
+
export const Tag = createRemoteReactComponent('Tag');
|
|
21
|
+
export const Text = createRemoteReactComponent('Text');
|
|
22
|
+
export const Tile = createRemoteReactComponent('Tile');
|
|
23
|
+
export const Stack = createRemoteReactComponent('Stack');
|
|
24
|
+
export const ToggleGroup = createRemoteReactComponent('ToggleGroup');
|
|
25
|
+
export const StatisticsItem = createRemoteReactComponent('StatisticsItem');
|
|
26
|
+
export const Statistics = createRemoteReactComponent('Statistics');
|
|
27
|
+
export const StatisticsTrend = createRemoteReactComponent('StatisticsTrend');
|
|
28
|
+
export const Table = createRemoteReactComponent('Table');
|
|
29
|
+
export const TableFooter = createRemoteReactComponent('TableFooter');
|
|
30
|
+
export const TableCell = createRemoteReactComponent('TableCell');
|
|
31
|
+
export const TableRow = createRemoteReactComponent('TableRow');
|
|
32
|
+
export const TableBody = createRemoteReactComponent('TableBody');
|
|
33
|
+
export const TableHeader = createRemoteReactComponent('TableHeader');
|
|
34
|
+
export const TableHead = createRemoteReactComponent('TableHead');
|
|
35
|
+
export const NumberInput = createRemoteReactComponent('NumberInput');
|
|
36
|
+
export const Box = createRemoteReactComponent('Box');
|
|
37
|
+
export const StepIndicator = createRemoteReactComponent('StepIndicator');
|
|
38
|
+
export const Accordion = createRemoteReactComponent('Accordion');
|
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, } from './coreComponents';
|
|
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
2
|
export { hubspot } from './hubspot';
|
|
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, } from './coreComponents';
|
|
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
2
|
export { hubspot } from './hubspot';
|
|
3
3
|
export * from './types';
|
package/dist/types.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export interface NumberInputProps extends InputProps<number> {
|
|
|
92
92
|
}
|
|
93
93
|
export interface ProgressBarProps {
|
|
94
94
|
title?: string;
|
|
95
|
+
'aria-label'?: string;
|
|
95
96
|
showPercentage?: boolean;
|
|
96
97
|
value?: number;
|
|
97
98
|
valueMax?: number;
|
|
@@ -362,6 +363,7 @@ export interface CrmAssociationTableProps {
|
|
|
362
363
|
quickFilterProperties?: Array<string>;
|
|
363
364
|
searchable?: boolean;
|
|
364
365
|
pagination?: boolean;
|
|
366
|
+
associationLabelFilter?: boolean;
|
|
365
367
|
pageSize?: number;
|
|
366
368
|
preFilters?: Array<CrmSearchFilter>;
|
|
367
369
|
sort?: Array<CrmSortDescriptor>;
|
|
@@ -453,6 +455,7 @@ export interface LinkProps {
|
|
|
453
455
|
href: string;
|
|
454
456
|
variant?: 'primary' | 'destructive' | 'light' | 'dark';
|
|
455
457
|
onClick?: () => void;
|
|
458
|
+
preventDefault?: boolean;
|
|
456
459
|
}
|
|
457
460
|
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
458
461
|
[key: string]: JsonValue;
|
|
@@ -471,4 +474,21 @@ interface TShirtSizes {
|
|
|
471
474
|
}
|
|
472
475
|
export type AllSizes = TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'] | TShirtSizes['xl'];
|
|
473
476
|
export type AllDistances = 'flush' | AllSizes;
|
|
477
|
+
export interface StepIndicatorProps {
|
|
478
|
+
stepNames: string[];
|
|
479
|
+
direction?: 'horizontal' | 'vertical';
|
|
480
|
+
onClick?: (stepIndex: number) => void;
|
|
481
|
+
circleSize?: AllSizes;
|
|
482
|
+
currentStep?: number;
|
|
483
|
+
variant?: 'default' | 'compact' | 'flush';
|
|
484
|
+
}
|
|
485
|
+
export interface AccordionProps {
|
|
486
|
+
title: string;
|
|
487
|
+
children: ReactNode;
|
|
488
|
+
defaultOpen?: boolean;
|
|
489
|
+
disabled?: boolean;
|
|
490
|
+
open?: boolean;
|
|
491
|
+
size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
|
|
492
|
+
onClick?: () => void;
|
|
493
|
+
}
|
|
474
494
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/ui-extensions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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": "
|
|
51
|
+
"gitHead": "0b20c005a9564bbde58c22ce21959c713f354607"
|
|
52
52
|
}
|