@hubspot/ui-extensions 0.10.1 → 0.11.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/dist/{pages/home/components.d.ts → __synced__/appHomeRemoteComponents.synced.d.ts} +7 -7
- package/dist/{pages/home/components.js → __synced__/appHomeRemoteComponents.synced.js} +1 -0
- package/dist/{crm/components.d.ts → __synced__/crmRemoteComponents.synced.d.ts} +40 -41
- package/dist/__synced__/crmRemoteComponents.synced.js +15 -0
- package/dist/{experimental/types.d.ts → __synced__/experimental/types.synced.d.ts} +6 -1
- package/dist/__synced__/experimentalRemoteComponents.synced.d.ts +94 -0
- package/dist/__synced__/experimentalRemoteComponents.synced.js +56 -0
- package/dist/__synced__/remoteComponents.synced.d.ts +579 -0
- package/dist/{coreComponents.js → __synced__/remoteComponents.synced.js} +89 -69
- package/dist/__synced__/types/actions.synced.d.ts +57 -0
- package/dist/__synced__/types/actions.synced.js +1 -0
- package/dist/__synced__/types/components/accordion.synced.d.ts +48 -0
- package/dist/__synced__/types/components/accordion.synced.js +1 -0
- package/dist/__synced__/types/components/alert.synced.d.ts +24 -0
- package/dist/__synced__/types/components/alert.synced.js +1 -0
- package/dist/__synced__/types/components/app-home-header-actions.synced.d.ts +39 -0
- package/dist/__synced__/types/components/app-home-header-actions.synced.js +1 -0
- package/dist/__synced__/types/components/button-row.synced.d.ts +44 -0
- package/dist/__synced__/types/components/button-row.synced.js +1 -0
- package/dist/__synced__/types/components/button.synced.d.ts +89 -0
- package/dist/__synced__/types/components/button.synced.js +1 -0
- package/dist/__synced__/types/components/card.synced.d.ts +12 -0
- package/dist/__synced__/types/components/card.synced.js +1 -0
- package/dist/__synced__/types/components/chart.synced.d.ts +137 -0
- package/dist/__synced__/types/components/chart.synced.js +5 -0
- package/dist/__synced__/types/components/description-list.synced.d.ts +36 -0
- package/dist/__synced__/types/components/description-list.synced.js +1 -0
- package/dist/__synced__/types/components/divider.synced.d.ts +14 -0
- package/dist/__synced__/types/components/divider.synced.js +1 -0
- package/dist/__synced__/types/components/dropdown.synced.d.ts +84 -0
- package/dist/__synced__/types/components/dropdown.synced.js +1 -0
- package/dist/__synced__/types/components/empty-state.synced.d.ts +51 -0
- package/dist/__synced__/types/components/empty-state.synced.js +1 -0
- package/dist/__synced__/types/components/error-state.synced.d.ts +24 -0
- package/dist/__synced__/types/components/error-state.synced.js +1 -0
- package/dist/__synced__/types/components/form.synced.d.ts +29 -0
- package/dist/__synced__/types/components/form.synced.js +1 -0
- package/dist/__synced__/types/components/heading.synced.d.ts +19 -0
- package/dist/__synced__/types/components/heading.synced.js +1 -0
- package/dist/__synced__/types/components/icon.synced.d.ts +29 -0
- package/dist/__synced__/types/components/icon.synced.js +1 -0
- package/dist/__synced__/types/components/iframe.synced.d.ts +20 -0
- package/dist/__synced__/types/components/iframe.synced.js +1 -0
- package/dist/__synced__/types/components/illustration.synced.d.ts +53 -0
- package/dist/__synced__/types/components/illustration.synced.js +43 -0
- package/dist/__synced__/types/components/image.synced.d.ts +40 -0
- package/dist/__synced__/types/components/image.synced.js +1 -0
- package/dist/__synced__/types/components/index.synced.d.ts +38 -0
- package/dist/__synced__/types/components/index.synced.js +1 -0
- package/dist/__synced__/types/components/inputs.synced.d.ts +350 -0
- package/dist/__synced__/types/components/inputs.synced.js +1 -0
- package/dist/__synced__/types/components/layouts.synced.d.ts +172 -0
- package/dist/__synced__/types/components/layouts.synced.js +1 -0
- package/dist/__synced__/types/components/link.synced.d.ts +38 -0
- package/dist/__synced__/types/components/link.synced.js +1 -0
- package/dist/__synced__/types/components/list.synced.d.ts +18 -0
- package/dist/__synced__/types/components/list.synced.js +1 -0
- package/dist/__synced__/types/components/loading-spinner.synced.d.ts +31 -0
- package/dist/__synced__/types/components/loading-spinner.synced.js +1 -0
- package/dist/__synced__/types/components/modal.synced.d.ts +60 -0
- package/dist/__synced__/types/components/modal.synced.js +1 -0
- package/dist/__synced__/types/components/panel.synced.d.ts +73 -0
- package/dist/__synced__/types/components/panel.synced.js +1 -0
- package/dist/__synced__/types/components/progress-bar.synced.d.ts +48 -0
- package/dist/__synced__/types/components/progress-bar.synced.js +1 -0
- package/dist/__synced__/types/components/selects.synced.d.ts +130 -0
- package/dist/__synced__/types/components/selects.synced.js +1 -0
- package/dist/__synced__/types/components/statistics.synced.d.ts +56 -0
- package/dist/__synced__/types/components/statistics.synced.js +1 -0
- package/dist/__synced__/types/components/status-tag.synced.d.ts +42 -0
- package/dist/__synced__/types/components/status-tag.synced.js +1 -0
- package/dist/__synced__/types/components/step-indicator.synced.d.ts +44 -0
- package/dist/__synced__/types/components/step-indicator.synced.js +1 -0
- package/dist/__synced__/types/components/table.synced.d.ts +138 -0
- package/dist/__synced__/types/components/table.synced.js +1 -0
- package/dist/__synced__/types/components/tabs.synced.d.ts +55 -0
- package/dist/__synced__/types/components/tabs.synced.js +1 -0
- package/dist/__synced__/types/components/tag.synced.d.ts +32 -0
- package/dist/__synced__/types/components/tag.synced.js +1 -0
- package/dist/__synced__/types/components/text.synced.d.ts +93 -0
- package/dist/__synced__/types/components/text.synced.js +1 -0
- package/dist/__synced__/types/components/tile.synced.d.ts +24 -0
- package/dist/__synced__/types/components/tile.synced.js +1 -0
- package/dist/__synced__/types/components/toggle.synced.d.ts +60 -0
- package/dist/__synced__/types/components/toggle.synced.js +1 -0
- package/dist/__synced__/types/components/toggleInputs.synced.d.ts +191 -0
- package/dist/__synced__/types/components/toggleInputs.synced.js +1 -0
- package/dist/__synced__/types/components/tooltip.synced.d.ts +12 -0
- package/dist/__synced__/types/components/tooltip.synced.js +1 -0
- package/dist/__synced__/types/context.synced.d.ts +82 -0
- package/dist/__synced__/types/context.synced.js +1 -0
- package/dist/__synced__/types/crm.synced.d.ts +248 -0
- package/dist/__synced__/types/crm.synced.js +1 -0
- package/dist/__synced__/types/extension-points.synced.d.ts +122 -0
- package/dist/__synced__/types/extension-points.synced.js +9 -0
- package/dist/__synced__/types/http-requests.synced.d.ts +106 -0
- package/dist/__synced__/types/http-requests.synced.js +8 -0
- package/dist/__synced__/types/index.synced.d.ts +8 -0
- package/dist/__synced__/types/index.synced.js +1 -0
- package/dist/__synced__/types/reactions.synced.d.ts +12 -0
- package/dist/__synced__/types/reactions.synced.js +1 -0
- package/dist/__synced__/types/shared.synced.d.ts +196 -0
- package/dist/{types.js → __synced__/types/shared.synced.js} +0 -68
- package/dist/__synced__/utils/remote-component-registry.synced.d.ts +80 -0
- package/dist/__synced__/utils/remote-component-registry.synced.js +64 -0
- package/dist/crm/index.d.ts +2 -2
- package/dist/crm/index.js +1 -2
- package/dist/experimental/index.d.ts +2 -73
- package/dist/experimental/index.js +1 -34
- package/dist/experimental/testing/internal/constants.d.ts +2 -0
- package/dist/experimental/testing/internal/constants.js +1 -0
- package/dist/experimental/testing/internal/debug.d.ts +8 -0
- package/dist/experimental/testing/internal/debug.js +10 -0
- package/dist/experimental/testing/internal/element.d.ts +11 -0
- package/dist/experimental/testing/internal/element.js +67 -0
- package/dist/experimental/testing/internal/errors.d.ts +44 -0
- package/dist/experimental/testing/internal/errors.js +52 -0
- package/dist/experimental/testing/internal/fragment.d.ts +8 -0
- package/dist/experimental/testing/internal/fragment.js +44 -0
- package/dist/experimental/testing/internal/print.d.ts +6 -0
- package/dist/experimental/testing/internal/print.js +114 -0
- package/dist/experimental/testing/internal/query.d.ts +57 -0
- package/dist/experimental/testing/internal/query.js +231 -0
- package/dist/experimental/testing/internal/root.d.ts +8 -0
- package/dist/experimental/testing/internal/root.js +44 -0
- package/dist/experimental/testing/internal/text.d.ts +9 -0
- package/dist/experimental/testing/internal/text.js +16 -0
- package/dist/experimental/testing/internal/types-internal.d.ts +47 -0
- package/dist/experimental/testing/internal/types-internal.js +1 -0
- package/dist/experimental/testing/type-utils.d.ts +29 -0
- package/dist/experimental/testing/type-utils.js +37 -0
- package/dist/experimental/testing/types.d.ts +240 -0
- package/dist/experimental/testing/types.js +10 -0
- package/dist/hubspot.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/pages/home/index.d.ts +1 -0
- package/dist/pages/home/index.js +1 -0
- package/package.json +12 -10
- package/dist/coreComponents.d.ts +0 -844
- package/dist/crm/components.js +0 -15
- package/dist/experimental/testing/index.d.ts +0 -14
- package/dist/experimental/testing/index.js +0 -33
- package/dist/experimental/testing/jest/matchers/index.d.ts +0 -6
- package/dist/experimental/testing/jest/matchers/index.js +0 -6
- package/dist/types.d.ts +0 -3167
- package/dist/utils/createExtensionComponent.d.ts +0 -3
- package/dist/utils/createExtensionComponent.js +0 -4
- /package/dist/{experimental/types.js → __synced__/experimental/types.synced.js} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The props type for {@link !components.StatusTag}.
|
|
4
|
+
*
|
|
5
|
+
* @category Component Props
|
|
6
|
+
*/
|
|
7
|
+
export interface StatusTagProps {
|
|
8
|
+
/**
|
|
9
|
+
* The status tag's indicator color.
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue `"default"`
|
|
12
|
+
*/
|
|
13
|
+
variant?: 'danger' | 'warning' | 'info' | 'success' | 'default';
|
|
14
|
+
/**
|
|
15
|
+
* When set to true, the status tag's dot will be a ring instead.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `false `
|
|
18
|
+
*/
|
|
19
|
+
hollow?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A function that will be invoked when the status tag is clicked. It receives no arguments and its return value is ignored.
|
|
22
|
+
*
|
|
23
|
+
* @event
|
|
24
|
+
*/
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* When set to true, the status tag will show a small clickable 'x' icon.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue `false`
|
|
30
|
+
*/
|
|
31
|
+
showRemoveIcon?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A function that will be invoked when the 'x' icon is clicked. It receives no arguments and its return value is ignored.
|
|
34
|
+
*
|
|
35
|
+
* @event
|
|
36
|
+
*/
|
|
37
|
+
onRemoveClick?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the content that will render inside the StatusTag. This prop is passed implicitly by providing sub-components. We recommend only using a small amount of text.
|
|
40
|
+
*/
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AllSizes } from '../shared.synced';
|
|
2
|
+
/**
|
|
3
|
+
* The props type for {@link !components.StepIndicator}.
|
|
4
|
+
*
|
|
5
|
+
* @category Component Props
|
|
6
|
+
*/
|
|
7
|
+
export interface StepIndicatorProps {
|
|
8
|
+
/**
|
|
9
|
+
* An array containing the name of each step.
|
|
10
|
+
*/
|
|
11
|
+
stepNames: string[];
|
|
12
|
+
/**
|
|
13
|
+
* The orientation of the indicator.
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue `"horizontal"`
|
|
16
|
+
*/
|
|
17
|
+
direction?: 'horizontal' | 'vertical';
|
|
18
|
+
/**
|
|
19
|
+
* The size of the indicator circles.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue `"small"`
|
|
22
|
+
*/
|
|
23
|
+
circleSize?: AllSizes;
|
|
24
|
+
/**
|
|
25
|
+
* The currently active step. Steps are 0-based.
|
|
26
|
+
*/
|
|
27
|
+
currentStep?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The visual style of the component.
|
|
30
|
+
*
|
|
31
|
+
* - default: default spacing.
|
|
32
|
+
* - compact: only shows the title of the currently active step.
|
|
33
|
+
* - flush: only shows the title of the currently active step and removes left and right margins.
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue `"default"`
|
|
36
|
+
*/
|
|
37
|
+
variant?: 'default' | 'compact' | 'flush';
|
|
38
|
+
/**
|
|
39
|
+
* A function that will be invoked when a step in the indicator is clicked. The function receives the current step index as an argument (zero-based). Use this to update the currently active step.
|
|
40
|
+
*
|
|
41
|
+
* @event
|
|
42
|
+
*/
|
|
43
|
+
onClick?: (stepIndex: number) => void;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface AlignmentProps {
|
|
3
|
+
align?: 'left' | 'center' | 'right';
|
|
4
|
+
}
|
|
5
|
+
export interface WidthProps {
|
|
6
|
+
width?: 'min' | 'max' | 'auto' | number;
|
|
7
|
+
}
|
|
8
|
+
export interface TableElementProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @property align Sets the alignment of a table header.
|
|
13
|
+
* @property width Sets the width of a table header.
|
|
14
|
+
*
|
|
15
|
+
* @interface
|
|
16
|
+
*/
|
|
17
|
+
export type BaseTableHeaderProps = TableElementProps & AlignmentProps & WidthProps;
|
|
18
|
+
export type TableCellProps = TableElementProps & AlignmentProps & WidthProps & {
|
|
19
|
+
colSpan?: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The props type for {@link !components.TableHeader} when sorted === never.
|
|
23
|
+
*
|
|
24
|
+
* @category Component Props
|
|
25
|
+
*/
|
|
26
|
+
export interface UnSortedTableHeaderProps extends BaseTableHeaderProps {
|
|
27
|
+
sortDirection?: 'never';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The props type for {@link !components.TableHeader} when sorted !== never.
|
|
31
|
+
*
|
|
32
|
+
* @category Component Props
|
|
33
|
+
*/
|
|
34
|
+
export interface SortedTableHeaderProps extends BaseTableHeaderProps {
|
|
35
|
+
/**
|
|
36
|
+
* Sets the current direction in which the column is sorted (if any). It's a visual indicator, it doesn't modify the data.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue `"none"`
|
|
39
|
+
*/
|
|
40
|
+
sortDirection: 'ascending' | 'descending' | 'none';
|
|
41
|
+
/**
|
|
42
|
+
* A callback function that is invoked when the header is clicked. It recieves the new `sortDirection` as an argument.
|
|
43
|
+
* It's required when sort = `ascending`, `descending` or `none`.
|
|
44
|
+
*
|
|
45
|
+
* @event
|
|
46
|
+
* @defaultValue `"none"`
|
|
47
|
+
*/
|
|
48
|
+
onSortChange: (value: NonNullable<SortedTableHeaderProps['sortDirection']>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* If `true`, users cannot change the sort ordering. It has no effect if sort=`never` or `undefined`.
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue `false`
|
|
53
|
+
*/
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The props type for {@link !components.TableHeader}.
|
|
58
|
+
*
|
|
59
|
+
* @category Component Props
|
|
60
|
+
*/
|
|
61
|
+
export type TableHeaderProps = SortedTableHeaderProps | UnSortedTableHeaderProps;
|
|
62
|
+
interface BaseTableProps {
|
|
63
|
+
/**
|
|
64
|
+
* When set to false, the table will not have borders.
|
|
65
|
+
*
|
|
66
|
+
* @defaultValue `true`
|
|
67
|
+
*/
|
|
68
|
+
bordered?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* When set to `true`, the table will not have bottom margin.
|
|
71
|
+
*
|
|
72
|
+
* @defaultValue `false`
|
|
73
|
+
*/
|
|
74
|
+
flush?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be one of Table's subcomponents.
|
|
77
|
+
*/
|
|
78
|
+
children: ReactNode;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
export interface TableNoPaginatedProps extends BaseTableProps {
|
|
84
|
+
/**
|
|
85
|
+
* When set to `true`, the table will include pagination navigation. Take a look at {@link !types.TablePaginatedProps} for pagination props.
|
|
86
|
+
*
|
|
87
|
+
* @defaultValue `false`
|
|
88
|
+
*/
|
|
89
|
+
paginated?: false;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
export interface TablePaginatedProps extends BaseTableProps {
|
|
95
|
+
/**
|
|
96
|
+
* When set to `true`, the table will include pagination navigation. Take a look at {@link !types.TablePaginatedProps} for pagination props.
|
|
97
|
+
*
|
|
98
|
+
* @defaultValue `false`
|
|
99
|
+
*/
|
|
100
|
+
paginated: true;
|
|
101
|
+
/**
|
|
102
|
+
* The total number of pages available.
|
|
103
|
+
*/
|
|
104
|
+
pageCount: number;
|
|
105
|
+
/**
|
|
106
|
+
* When set to `false`, hides the text labels for the First/Prev/Next buttons. The button labels will still be accessible to screen readers.
|
|
107
|
+
*
|
|
108
|
+
* @defaultValue `true`
|
|
109
|
+
*/
|
|
110
|
+
showButtonLabels?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* When set to `true`, displays the **First/Last** page buttons.
|
|
113
|
+
*
|
|
114
|
+
* @defaultValue `false`
|
|
115
|
+
*/
|
|
116
|
+
showFirstLastButtons?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Sets how many page buttons are displayed.
|
|
119
|
+
*/
|
|
120
|
+
maxVisiblePageButtons?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Denotes the current page.
|
|
123
|
+
*/
|
|
124
|
+
page?: number;
|
|
125
|
+
/**
|
|
126
|
+
* A function that will be invoked when the pagination button is clicked. It receives the new page number as argument.
|
|
127
|
+
*
|
|
128
|
+
* @event
|
|
129
|
+
*/
|
|
130
|
+
onPageChange: (pageNumber: number) => void;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The props type for {@link !components.Table}.
|
|
134
|
+
*
|
|
135
|
+
* @category Component Props
|
|
136
|
+
*/
|
|
137
|
+
export type TableProps = TableNoPaginatedProps | TablePaginatedProps;
|
|
138
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TabsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Sets the content that will render inside the component.
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Callback when the selected tab changes.
|
|
9
|
+
*/
|
|
10
|
+
onSelectedChange?: ((selectedId: string) => void) | ((selectedId: number) => void) | ((selectedId: number | string) => void);
|
|
11
|
+
/**
|
|
12
|
+
* The initially selected tab ID.
|
|
13
|
+
*/
|
|
14
|
+
defaultSelected?: string | number;
|
|
15
|
+
/**
|
|
16
|
+
* The currently selected tab ID (controlled component).
|
|
17
|
+
*/
|
|
18
|
+
selected?: string | number;
|
|
19
|
+
/**
|
|
20
|
+
* Visual style variant of the tabs.
|
|
21
|
+
* @defaultValue 'default'
|
|
22
|
+
*/
|
|
23
|
+
variant?: 'default' | 'enclosed';
|
|
24
|
+
/**
|
|
25
|
+
* Whether the tab should fill available space.
|
|
26
|
+
*/
|
|
27
|
+
fill?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface TabProps {
|
|
30
|
+
/**
|
|
31
|
+
* Whether the tab is disabled.
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Unique identifier for the tab.
|
|
36
|
+
*/
|
|
37
|
+
tabId?: string | number;
|
|
38
|
+
/**
|
|
39
|
+
* The title text of the tab.
|
|
40
|
+
*/
|
|
41
|
+
title?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The content to display when this tab is selected.
|
|
44
|
+
*/
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* The tooltip text of the tab.
|
|
48
|
+
*/
|
|
49
|
+
tooltip?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The tab's tooltip placement
|
|
52
|
+
* @defaultValue 'top'
|
|
53
|
+
*/
|
|
54
|
+
tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { OverlayComponentProps, ExtensionEvent } from '../shared.synced';
|
|
3
|
+
import { ReactionsHandler } from '../reactions.synced';
|
|
4
|
+
/**
|
|
5
|
+
* The props type for {@link !components.Tag}.
|
|
6
|
+
*
|
|
7
|
+
* @category Component Props
|
|
8
|
+
*/
|
|
9
|
+
export interface TagProps extends OverlayComponentProps {
|
|
10
|
+
/**
|
|
11
|
+
* Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The tag's color. The following variants are available.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `"default"`
|
|
18
|
+
*/
|
|
19
|
+
variant?: 'default' | 'warning' | 'success' | 'error' | 'info';
|
|
20
|
+
/**
|
|
21
|
+
* A function that will be invoked when the tag is clicked.
|
|
22
|
+
*
|
|
23
|
+
* @event
|
|
24
|
+
*/
|
|
25
|
+
onClick?: ReactionsHandler<ExtensionEvent>;
|
|
26
|
+
/**
|
|
27
|
+
* When set to true, this component can be aligned side-by-side with text.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue `false`
|
|
30
|
+
*/
|
|
31
|
+
inline?: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Format options for text component.
|
|
5
|
+
*/
|
|
6
|
+
export interface TextFormatOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Weight of the font.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue `"regular"`
|
|
11
|
+
*/
|
|
12
|
+
fontWeight?: 'regular' | 'bold' | 'demibold';
|
|
13
|
+
/**
|
|
14
|
+
* If `true`, font will be in italicized.
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue `false`
|
|
17
|
+
*/
|
|
18
|
+
italic?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Line decoration of the font.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue `"none"`
|
|
23
|
+
*/
|
|
24
|
+
lineDecoration?: 'none' | 'underline' | 'strikethrough';
|
|
25
|
+
/**
|
|
26
|
+
* Controls the capitalization of text.
|
|
27
|
+
*
|
|
28
|
+
* - `none`: No capitalization changes (default)
|
|
29
|
+
* - `uppercase`: Transforms all characters to uppercase
|
|
30
|
+
* - `lowercase`: Transforms all characters to lowercase
|
|
31
|
+
* - `capitalize`: Capitalizes the first letter of each word
|
|
32
|
+
* - `sentenceCase`: Capitalizes the first letter of the text and makes the rest lowercase
|
|
33
|
+
*
|
|
34
|
+
* @defaultValue `"none"`
|
|
35
|
+
*/
|
|
36
|
+
textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize' | 'sentenceCase';
|
|
37
|
+
}
|
|
38
|
+
export interface TruncateOptions {
|
|
39
|
+
maxWidth?: number;
|
|
40
|
+
tooltipText?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The props type for {@link !components.Text}.
|
|
44
|
+
*
|
|
45
|
+
* @interface
|
|
46
|
+
* @category Component Props
|
|
47
|
+
*/
|
|
48
|
+
export type TextProps = {
|
|
49
|
+
/**
|
|
50
|
+
* The style of text to display. Can be either of:
|
|
51
|
+
*
|
|
52
|
+
* - bodytext: the default value which renders the standard text size.
|
|
53
|
+
* - microcopy: smaller text used for adding context.
|
|
54
|
+
*
|
|
55
|
+
* @defaultValue `"bodytext"`
|
|
56
|
+
*/
|
|
57
|
+
variant?: 'bodytext' | 'microcopy';
|
|
58
|
+
/**
|
|
59
|
+
* When set to `true`, inserts a line break.
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue `false`
|
|
62
|
+
*/
|
|
63
|
+
inline?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
|
|
66
|
+
*/
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* @interface
|
|
70
|
+
* The style of text to display. Can be any of:
|
|
71
|
+
*
|
|
72
|
+
* - { fontWeight: 'bold' }
|
|
73
|
+
* - { fontWeight: 'demibold' }
|
|
74
|
+
* - { italic: true }
|
|
75
|
+
* - { lineDecoration: 'strikethrough' }
|
|
76
|
+
* - { lineDecoration: 'underline' }
|
|
77
|
+
* - <Text inline={true}>
|
|
78
|
+
*/
|
|
79
|
+
format?: TextFormatOptions;
|
|
80
|
+
/**
|
|
81
|
+
* @interface
|
|
82
|
+
* truncates long strings to a single line. If the full string doesn't fit in one line,
|
|
83
|
+
* it's shown in a tooltip on hover.
|
|
84
|
+
*
|
|
85
|
+
* - `false` => no truncation(default).
|
|
86
|
+
* - `true` => truncates the string to a single line. Full-text will show inside the tooltip.
|
|
87
|
+
* - { tooltipText: 'some text' } => truncates the string and lets you control the contents of the tooltip.
|
|
88
|
+
* - { maxWidth: 150 } => sets the width(in pixel) of the line.
|
|
89
|
+
*
|
|
90
|
+
* @defaultValue `false`
|
|
91
|
+
*/
|
|
92
|
+
truncate?: boolean | TruncateOptions;
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The props type for {@link !components.Tile}.
|
|
4
|
+
*
|
|
5
|
+
* @category Component Props
|
|
6
|
+
*/
|
|
7
|
+
export interface TileProps {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
|
|
10
|
+
*/
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* When set to `true`, reduces the default amount of padding around the contents of the Tile.
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue `false`
|
|
16
|
+
*/
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When set to `true`, removes left and right padding from tile contents.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue `false`
|
|
22
|
+
*/
|
|
23
|
+
flush?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { TShirtSizes } from '../shared.synced';
|
|
2
|
+
/**
|
|
3
|
+
* The props type for {@link !components.Toggle}.
|
|
4
|
+
*
|
|
5
|
+
* @category Component Props
|
|
6
|
+
*/
|
|
7
|
+
export interface ToggleProps {
|
|
8
|
+
/**
|
|
9
|
+
* The current status of the input.
|
|
10
|
+
*/
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* When set to `true`, the option cannot be selected.
|
|
14
|
+
*/
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The unique identifier for the toggle element.
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The size variation of the toggle.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue `"medium"`
|
|
24
|
+
*/
|
|
25
|
+
size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | 'default';
|
|
26
|
+
/**
|
|
27
|
+
* A function that is called when the `checked` input status changes.
|
|
28
|
+
*
|
|
29
|
+
* @event
|
|
30
|
+
*/
|
|
31
|
+
onChange?: (checked: boolean) => void;
|
|
32
|
+
/**
|
|
33
|
+
* When set to `true`, the option will be selected by default. Use it to
|
|
34
|
+
* set the default `checked` state when the component is **uncontrolled**.
|
|
35
|
+
*/
|
|
36
|
+
initialIsChecked?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The companion text of for Toggle. It can be displayed on top,
|
|
39
|
+
* inline, or hidden. When hidden, it will remain usable for screen readers.
|
|
40
|
+
*/
|
|
41
|
+
label: string;
|
|
42
|
+
/**
|
|
43
|
+
* Controls the display setting of the label prop.
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue `"inline"`
|
|
46
|
+
*/
|
|
47
|
+
labelDisplay?: 'inline' | 'top' | 'hidden';
|
|
48
|
+
/**
|
|
49
|
+
* The text that appears on the Toggle when `checked={true}`.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue `"ON"`
|
|
52
|
+
*/
|
|
53
|
+
textChecked?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The text that appears on the Toggle when `checked={false}`.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue `"ON"`
|
|
58
|
+
*/
|
|
59
|
+
textUnchecked?: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|