@hubspot/ui-extensions 0.10.1 → 0.11.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.
Files changed (129) hide show
  1. package/dist/{pages/home/components.d.ts → __synced__/appHomeRemoteComponents.synced.d.ts} +7 -7
  2. package/dist/{pages/home/components.js → __synced__/appHomeRemoteComponents.synced.js} +1 -0
  3. package/dist/{crm/components.d.ts → __synced__/crmRemoteComponents.synced.d.ts} +40 -41
  4. package/dist/__synced__/crmRemoteComponents.synced.js +15 -0
  5. package/dist/__synced__/experimental/types.synced.d.ts +241 -0
  6. package/dist/__synced__/experimental/types.synced.js +5 -0
  7. package/dist/__synced__/experimentalRemoteComponents.synced.d.ts +94 -0
  8. package/dist/__synced__/experimentalRemoteComponents.synced.js +56 -0
  9. package/dist/__synced__/remoteComponents.synced.d.ts +848 -0
  10. package/dist/__synced__/remoteComponents.synced.js +583 -0
  11. package/dist/__synced__/types/actions.synced.d.ts +57 -0
  12. package/dist/__synced__/types/actions.synced.js +1 -0
  13. package/dist/__synced__/types/components/accordion.synced.d.ts +48 -0
  14. package/dist/__synced__/types/components/accordion.synced.js +1 -0
  15. package/dist/__synced__/types/components/alert.synced.d.ts +24 -0
  16. package/dist/__synced__/types/components/alert.synced.js +1 -0
  17. package/dist/__synced__/types/components/app-home-header-actions.synced.d.ts +39 -0
  18. package/dist/__synced__/types/components/app-home-header-actions.synced.js +1 -0
  19. package/dist/__synced__/types/components/button-row.synced.d.ts +44 -0
  20. package/dist/__synced__/types/components/button-row.synced.js +1 -0
  21. package/dist/__synced__/types/components/button.synced.d.ts +89 -0
  22. package/dist/__synced__/types/components/button.synced.js +1 -0
  23. package/dist/__synced__/types/components/card.synced.d.ts +12 -0
  24. package/dist/__synced__/types/components/card.synced.js +1 -0
  25. package/dist/__synced__/types/components/chart.synced.d.ts +137 -0
  26. package/dist/__synced__/types/components/chart.synced.js +5 -0
  27. package/dist/__synced__/types/components/description-list.synced.d.ts +36 -0
  28. package/dist/__synced__/types/components/description-list.synced.js +1 -0
  29. package/dist/__synced__/types/components/divider.synced.d.ts +14 -0
  30. package/dist/__synced__/types/components/divider.synced.js +1 -0
  31. package/dist/__synced__/types/components/dropdown.synced.d.ts +84 -0
  32. package/dist/__synced__/types/components/dropdown.synced.js +1 -0
  33. package/dist/__synced__/types/components/empty-state.synced.d.ts +51 -0
  34. package/dist/__synced__/types/components/empty-state.synced.js +1 -0
  35. package/dist/__synced__/types/components/error-state.synced.d.ts +24 -0
  36. package/dist/__synced__/types/components/error-state.synced.js +1 -0
  37. package/dist/__synced__/types/components/form.synced.d.ts +29 -0
  38. package/dist/__synced__/types/components/form.synced.js +1 -0
  39. package/dist/__synced__/types/components/heading.synced.d.ts +19 -0
  40. package/dist/__synced__/types/components/heading.synced.js +1 -0
  41. package/dist/__synced__/types/components/icon.synced.d.ts +29 -0
  42. package/dist/__synced__/types/components/icon.synced.js +1 -0
  43. package/dist/__synced__/types/components/iframe.synced.d.ts +20 -0
  44. package/dist/__synced__/types/components/iframe.synced.js +1 -0
  45. package/dist/__synced__/types/components/illustration.synced.d.ts +53 -0
  46. package/dist/__synced__/types/components/illustration.synced.js +43 -0
  47. package/dist/__synced__/types/components/image.synced.d.ts +40 -0
  48. package/dist/__synced__/types/components/image.synced.js +1 -0
  49. package/dist/__synced__/types/components/index.synced.d.ts +38 -0
  50. package/dist/__synced__/types/components/index.synced.js +1 -0
  51. package/dist/__synced__/types/components/inputs.synced.d.ts +350 -0
  52. package/dist/__synced__/types/components/inputs.synced.js +1 -0
  53. package/dist/__synced__/types/components/layouts.synced.d.ts +172 -0
  54. package/dist/__synced__/types/components/layouts.synced.js +1 -0
  55. package/dist/__synced__/types/components/link.synced.d.ts +38 -0
  56. package/dist/__synced__/types/components/link.synced.js +1 -0
  57. package/dist/__synced__/types/components/list.synced.d.ts +18 -0
  58. package/dist/__synced__/types/components/list.synced.js +1 -0
  59. package/dist/__synced__/types/components/loading-spinner.synced.d.ts +31 -0
  60. package/dist/__synced__/types/components/loading-spinner.synced.js +1 -0
  61. package/dist/__synced__/types/components/modal.synced.d.ts +60 -0
  62. package/dist/__synced__/types/components/modal.synced.js +1 -0
  63. package/dist/__synced__/types/components/panel.synced.d.ts +73 -0
  64. package/dist/__synced__/types/components/panel.synced.js +1 -0
  65. package/dist/__synced__/types/components/progress-bar.synced.d.ts +48 -0
  66. package/dist/__synced__/types/components/progress-bar.synced.js +1 -0
  67. package/dist/__synced__/types/components/selects.synced.d.ts +130 -0
  68. package/dist/__synced__/types/components/selects.synced.js +1 -0
  69. package/dist/__synced__/types/components/statistics.synced.d.ts +56 -0
  70. package/dist/__synced__/types/components/statistics.synced.js +1 -0
  71. package/dist/__synced__/types/components/status-tag.synced.d.ts +42 -0
  72. package/dist/__synced__/types/components/status-tag.synced.js +1 -0
  73. package/dist/__synced__/types/components/step-indicator.synced.d.ts +44 -0
  74. package/dist/__synced__/types/components/step-indicator.synced.js +1 -0
  75. package/dist/__synced__/types/components/table.synced.d.ts +138 -0
  76. package/dist/__synced__/types/components/table.synced.js +1 -0
  77. package/dist/__synced__/types/components/tabs.synced.d.ts +55 -0
  78. package/dist/__synced__/types/components/tabs.synced.js +1 -0
  79. package/dist/__synced__/types/components/tag.synced.d.ts +32 -0
  80. package/dist/__synced__/types/components/tag.synced.js +1 -0
  81. package/dist/__synced__/types/components/text.synced.d.ts +93 -0
  82. package/dist/__synced__/types/components/text.synced.js +1 -0
  83. package/dist/__synced__/types/components/tile.synced.d.ts +24 -0
  84. package/dist/__synced__/types/components/tile.synced.js +1 -0
  85. package/dist/__synced__/types/components/toggle.synced.d.ts +60 -0
  86. package/dist/__synced__/types/components/toggle.synced.js +1 -0
  87. package/dist/__synced__/types/components/toggleInputs.synced.d.ts +191 -0
  88. package/dist/__synced__/types/components/toggleInputs.synced.js +1 -0
  89. package/dist/__synced__/types/components/tooltip.synced.d.ts +12 -0
  90. package/dist/__synced__/types/components/tooltip.synced.js +1 -0
  91. package/dist/__synced__/types/context.synced.d.ts +82 -0
  92. package/dist/__synced__/types/context.synced.js +1 -0
  93. package/dist/__synced__/types/crm.synced.d.ts +248 -0
  94. package/dist/__synced__/types/crm.synced.js +1 -0
  95. package/dist/__synced__/types/extension-points.synced.d.ts +122 -0
  96. package/dist/__synced__/types/extension-points.synced.js +9 -0
  97. package/dist/__synced__/types/http-requests.synced.d.ts +106 -0
  98. package/dist/__synced__/types/http-requests.synced.js +8 -0
  99. package/dist/__synced__/types/index.synced.d.ts +8 -0
  100. package/dist/__synced__/types/index.synced.js +9 -0
  101. package/dist/__synced__/types/reactions.synced.d.ts +12 -0
  102. package/dist/__synced__/types/reactions.synced.js +1 -0
  103. package/dist/__synced__/types/shared.synced.d.ts +197 -0
  104. package/dist/__synced__/types/shared.synced.js +179 -0
  105. package/dist/coreComponents.d.ts +9 -5
  106. package/dist/coreComponents.js +15 -1
  107. package/dist/crm/index.d.ts +2 -2
  108. package/dist/crm/index.js +1 -2
  109. package/dist/experimental/index.d.ts +2 -73
  110. package/dist/experimental/index.js +1 -34
  111. package/dist/experimental/testing/internal/types-internal.d.ts +47 -0
  112. package/dist/experimental/testing/internal/types-internal.js +1 -0
  113. package/dist/experimental/testing/type-utils.d.ts +29 -0
  114. package/dist/experimental/testing/type-utils.js +37 -0
  115. package/dist/experimental/testing/types.d.ts +240 -0
  116. package/dist/experimental/testing/types.js +10 -0
  117. package/dist/experimental/types.d.ts +4 -0
  118. package/dist/pages/home/index.d.ts +1 -0
  119. package/dist/pages/home/index.js +1 -0
  120. package/dist/types.d.ts +51 -4
  121. package/dist/types.js +0 -3
  122. package/package.json +4 -7
  123. package/dist/crm/components.js +0 -15
  124. package/dist/experimental/testing/index.d.ts +0 -14
  125. package/dist/experimental/testing/index.js +0 -33
  126. package/dist/experimental/testing/jest/matchers/index.d.ts +0 -6
  127. package/dist/experimental/testing/jest/matchers/index.js +0 -6
  128. package/dist/utils/createExtensionComponent.d.ts +0 -3
  129. package/dist/utils/createExtensionComponent.js +0 -4
@@ -0,0 +1,48 @@
1
+ import { ReactNode } from 'react';
2
+ import { TShirtSizes } from '../shared.synced';
3
+ /**
4
+ * The props type for {@link !components.Accordion}.
5
+ *
6
+ * @category Component Props
7
+ */
8
+ export interface AccordionProps {
9
+ /**
10
+ * The title text for the accordion.
11
+ *
12
+ */
13
+ title: string;
14
+ /**
15
+ * The main content of the accordion when it opens.
16
+ *
17
+ */
18
+ children: ReactNode;
19
+ /**
20
+ * Defines default open behavior on page load. When set to `true`, the accordion will be open by default on initial load.
21
+ *
22
+ * @defaultValue `false`
23
+ */
24
+ defaultOpen?: boolean;
25
+ /**
26
+ * When set to `true`, the accordion's open state cannot be changed.
27
+ *
28
+ * @defaultValue `false`
29
+ */
30
+ disabled?: boolean;
31
+ /**
32
+ * For controlling the accordion's open state programmatically. When set to `true`, the accordion will open. Takes precedence over `defaultOpen`.
33
+ *
34
+ */
35
+ open?: boolean;
36
+ /**
37
+ * The size of the accordion title.
38
+ *
39
+ * @defaultValue `"small"`
40
+ */
41
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
42
+ /**
43
+ * A function that will be invoked when the title is clicked. It receives no arguments and its return value is ignored.
44
+ *
45
+ * @event
46
+ */
47
+ onClick?: () => void;
48
+ }
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.Alert}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface AlertProps {
8
+ /**
9
+ * The bolded title text of the alert.
10
+ *
11
+ */
12
+ title: string;
13
+ /**
14
+ * The main content of the alert message.
15
+ *
16
+ */
17
+ children?: ReactNode;
18
+ /**
19
+ * The color of the alert.
20
+ *
21
+ * @defaultValue `"info"`
22
+ */
23
+ variant?: 'info' | 'warning' | 'success' | 'error' | 'danger' | 'tip';
24
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ import { ReactNode } from 'react';
2
+ import { ReactionsHandler } from '../reactions.synced';
3
+ import { ExtensionEvent, OverlayComponentProps, HrefProp } from '../shared.synced';
4
+ /**
5
+ * The props type for {@link !components.HeaderActions}.
6
+ *
7
+ * @category Component Props
8
+ */
9
+ export interface HeaderActionsProps {
10
+ /**
11
+ * Sets the content that will render inside the HeaderActions. This prop is passed implicitly by providing sub-components.
12
+ */
13
+ children: ReactNode;
14
+ }
15
+ /**
16
+ * The props type for {@link !components.HeaderActions}.
17
+ *
18
+ * @category Component Props
19
+ */
20
+ export interface HeaderActionButtonProps extends OverlayComponentProps {
21
+ /**
22
+ * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
23
+ *
24
+ * @event
25
+ */
26
+ onClick?: ReactionsHandler<ExtensionEvent>;
27
+ /**
28
+ * A URL that will be opened when the button is clicked. If the value is a URL external to `hubspot.com` it will be opened in a new tab.
29
+ */
30
+ href?: HrefProp;
31
+ /**
32
+ * Determines whether or not the button should be disabled.
33
+ */
34
+ disabled?: boolean;
35
+ /**
36
+ * Sets the content that will render inside the HeaderActionButton. This prop is passed implicitly by providing sub-components.
37
+ */
38
+ children: ReactNode;
39
+ }
@@ -0,0 +1,44 @@
1
+ import { ReactNode } from 'react';
2
+ import { TShirtSizes } from '../shared.synced';
3
+ /**
4
+ * The props type for {@link !components.ButtonRow}.
5
+ *
6
+ * @category Component Props
7
+ */
8
+ export interface ButtonRowProps {
9
+ /**
10
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Disables the dropdown list of buttons that appears when the children expand beyond the horizontal space.
15
+ *
16
+ * @defaultValue `false`
17
+ */
18
+ disableDropdown?: boolean;
19
+ /**
20
+ * Controls the appearance and text content of the dropdown button.
21
+ */
22
+ dropDownButtonOptions?: ButtonRownDropDownButtonOptionsProps;
23
+ }
24
+ /** Configures the Dropdown Button in the ButtonRow component */
25
+ export interface ButtonRownDropDownButtonOptionsProps {
26
+ /**
27
+ * Sets the content for the dropdown button.
28
+ *
29
+ * @defaultValue `"More"`
30
+ */
31
+ text?: string;
32
+ /**
33
+ * Sets the size of the dropdown button.
34
+ *
35
+ * @defaultValue `"md"`
36
+ */
37
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
38
+ /**
39
+ * Controls the appearance of the dropdown button
40
+ *
41
+ * @defaultValue `"secondary"`
42
+ */
43
+ variant?: 'primary' | 'secondary' | 'transparent';
44
+ }
@@ -0,0 +1,89 @@
1
+ import { ReactNode } from 'react';
2
+ import { OverlayComponentProps, HrefProp, TShirtSizes, IconNames, ExtensionEvent } from '../shared.synced';
3
+ import { ReactionsHandler } from '../reactions.synced';
4
+ export interface BaseButtonProps {
5
+ /**
6
+ * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
7
+ *
8
+ * @event
9
+ */
10
+ onClick?: ReactionsHandler<ExtensionEvent>;
11
+ /**
12
+ * A URL that will be opened when the button is clicked. If the value is a URL external to `hubspot.com` it will be opened in a new tab.
13
+ */
14
+ href?: HrefProp;
15
+ /**
16
+ * Determines whether or not the button should be disabled.
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * Sets the color variation of the button.
21
+ *
22
+ * @defaultValue `"secondary"`
23
+ */
24
+ variant?: 'primary' | 'secondary' | 'destructive' | 'transparent';
25
+ /**
26
+ * Sets the HTML attribute "role" of the button.
27
+ *
28
+ * @defaultValue `"button"`
29
+ */
30
+ type?: 'button' | 'reset' | 'submit';
31
+ /**
32
+ * Sets the content that will render inside the Button. This prop is passed implicitly by providing sub-components. Only regular text and Icons are permitted.
33
+ */
34
+ children: ReactNode;
35
+ /**
36
+ * Sets the size of the button.
37
+ *
38
+ * @defaultValue `"md"`
39
+ */
40
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
41
+ }
42
+ /**
43
+ * The props type for {@link !components.Button}.
44
+ *
45
+ * @category Component Props
46
+ */
47
+ export interface ButtonProps extends BaseButtonProps, OverlayComponentProps {
48
+ }
49
+ /**
50
+ * Extra configuration passed to the overlay
51
+ */
52
+ export interface LoadingButtonOverlayOptions {
53
+ /**
54
+ * If `onLoadingFinish`, the overlay will open once the loading operation is done.
55
+ * If `onClick`, the overlay will open as soon as there is a click on the button.
56
+ *
57
+ * @defaultValue `"onClick"`
58
+ */
59
+ openBehavior?: 'onClick' | 'onLoadingFinish';
60
+ }
61
+ /**
62
+ * The props type for {@link !components.LoadingButton}.
63
+ *
64
+ * @category Component Props
65
+ */
66
+ export interface LoadingButtonProps extends BaseButtonProps, OverlayComponentProps {
67
+ /**
68
+ * Sets the color variation of the button.
69
+ *
70
+ * @defaultValue `"secondary"`
71
+ */
72
+ variant?: 'primary' | 'secondary' | 'destructive';
73
+ /**
74
+ * If true, the loading indicator is shown and the button becomes disabled.
75
+ *
76
+ * @defaultValue `false`
77
+ */
78
+ loading?: boolean;
79
+ /**
80
+ * Extra configuration passed to the overlay
81
+ */
82
+ overlayOptions?: LoadingButtonOverlayOptions;
83
+ /**
84
+ * Controls the icon that's shown after loading is done.
85
+ *
86
+ * @defaultValue `"success"`
87
+ */
88
+ resultIconName?: IconNames;
89
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.Card}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface CardProps {
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,137 @@
1
+ /**
2
+ * The props type for {@link !components.BarChart}.
3
+ *
4
+ * @category Component Props
5
+ */
6
+ export type BarChartProps = ChartProps;
7
+ /**
8
+ * The props type for {@link !components.LineChart}.
9
+ *
10
+ * @category Component Props
11
+ */
12
+ export type LineChartProps = ChartProps;
13
+ export interface ChartProps {
14
+ /**
15
+ * The data used to render the chart. You can optionally provide configuration options.
16
+ */
17
+ data: ChartDataRow[] | {
18
+ data: ChartDataRow[];
19
+ options?: ChartDataOptions;
20
+ };
21
+ /**
22
+ * The configuration for the axes of the chart.
23
+ */
24
+ axes: ChartAxisPair;
25
+ /**
26
+ * Configuration options for the chart as a whole.
27
+ */
28
+ options?: ChartOptions;
29
+ }
30
+ export type ChartDataRow = {
31
+ [key: string]: number | string;
32
+ };
33
+ export type ChartDataOptions = {
34
+ /**
35
+ * A mapping of fields to human-readable labels.
36
+ * We recommend pre-formatting your data to be human-readable instead of using this configuration.
37
+ */
38
+ propertyLabels?: {
39
+ [fields: string]: Record<string, string>;
40
+ };
41
+ };
42
+ export type ChartAxisPair = {
43
+ /**
44
+ * The field to use for the horizontal x-axis.
45
+ */
46
+ x: ChartAxis;
47
+ /**
48
+ * The field to use for the vertical y-axis.
49
+ */
50
+ y: ChartAxis;
51
+ /**
52
+ * Configuration options for the pair of axes.
53
+ */
54
+ options?: AxisPairOptions;
55
+ };
56
+ export type ChartAxis = {
57
+ /**
58
+ * The dataset field that should be graphed on this axis.
59
+ */
60
+ field: string;
61
+ /**
62
+ * The type of data in the field property. Please read the documentation for the expected formats for each fieldType.
63
+ */
64
+ fieldType: ChartFieldType;
65
+ /**
66
+ * The axis display label. Note: this will also be used in the legend and the hover tooltips.
67
+ */
68
+ label?: string;
69
+ };
70
+ export type AxisPairOptions = {
71
+ /**
72
+ * If provided, the data will be grouped by color for this field.
73
+ */
74
+ groupFieldByColor?: string;
75
+ /**
76
+ * When set to true, grouped data will be stacked.
77
+ *
78
+ * @defaultValue `false`
79
+ */
80
+ stacking?: boolean;
81
+ /**
82
+ * If provided, assigns a color to each specified values of the field provided in `groupFieldByColor`.
83
+ */
84
+ colors?: {
85
+ [key: string]: ChartColor;
86
+ };
87
+ };
88
+ export declare const chartFieldTypes: {
89
+ readonly datetime: "datetime";
90
+ readonly linear: "linear";
91
+ readonly category: "category";
92
+ };
93
+ /**
94
+ * The type of field for this axis.
95
+ * - `datetime`: Used for time data, such as JavaScript timestamps.
96
+ * - `linear`: Used for numerical data, such as quantities.
97
+ * - `category`: Used for categorical data, such as different types of products.
98
+ *
99
+ * Please read the documentation for recommended usage.
100
+ */
101
+ export type ChartFieldType = keyof typeof chartFieldTypes;
102
+ export type ChartOptions = {
103
+ /**
104
+ * Renders a title above the chart.
105
+ */
106
+ title?: string;
107
+ /**
108
+ * When set to `true`, shows a legend for the chart.
109
+ *
110
+ * @defaultValue `false`
111
+ */
112
+ showLegend?: boolean;
113
+ /**
114
+ * When set to `true`, shows hover tooltips for the charted data.
115
+ *
116
+ * @defaultValue `false`
117
+ */
118
+ showTooltips?: boolean;
119
+ /**
120
+ * When set to `true`, shows labels for the data directly on the chart.
121
+ *
122
+ * @defaultValue `false`
123
+ */
124
+ showDataLabels?: boolean;
125
+ /**
126
+ * Use to choose the order in which our chart colors are assigned to your data. Unspecified colors will be chosen after the ones you've provided here,
127
+ * so you don't need to provide a complete list of all possible colors.
128
+ * Please read the documentation for guidance on color usage.
129
+ */
130
+ colorList?: ChartColor[];
131
+ /** @deprecated use colorList instead */
132
+ colors?: ChartColor[];
133
+ };
134
+ /**
135
+ * The allowed colors for data displayed on the chart.
136
+ */
137
+ export type ChartColor = 'orange' | 'aqua' | 'purple' | 'yellow' | 'pink' | 'blue' | 'green' | 'darkOrange' | 'darkAqua' | 'darkPurple' | 'darkYellow' | 'darkPink' | 'darkBlue' | 'darkGreen';
@@ -0,0 +1,5 @@
1
+ export const chartFieldTypes = {
2
+ datetime: 'datetime',
3
+ linear: 'linear',
4
+ category: 'category',
5
+ };
@@ -0,0 +1,36 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.DescriptionListItem}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface DescriptionListItemProps {
8
+ /**
9
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
10
+ *
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Text to be displayed as the label.
15
+ *
16
+ */
17
+ label: string;
18
+ }
19
+ /**
20
+ * The props type for {@link !components.DescriptionList}.
21
+ *
22
+ * @category Component Props
23
+ */
24
+ export interface DescriptionListProps {
25
+ /**
26
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.DescriptionListItem}.
27
+ *
28
+ */
29
+ children: ReactNode;
30
+ /**
31
+ * The direction the label/value pairs are placed in the description list container.
32
+ *
33
+ * @defaultValue `"column"`
34
+ */
35
+ direction?: 'row' | 'column';
36
+ }
@@ -0,0 +1,14 @@
1
+ import { AllDistances } from '../shared.synced';
2
+ /**
3
+ * The props type for {@link !components.Divider}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface DividerProps {
8
+ /**
9
+ * The space between the divider and the content above and below it.
10
+ *
11
+ * @defaultValue `"small"`
12
+ */
13
+ distance?: AllDistances;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,84 @@
1
+ import type { ReactNode } from 'react';
2
+ import { TShirtSizes } from '../shared.synced';
3
+ import { ExtensionEvent, OverlayComponentProps } from '../shared.synced';
4
+ import { ReactionsHandler } from '../reactions.synced';
5
+ /**
6
+ * @deprecated This type is deprecated and will be removed in a future release. Please use the `DropdownButtonItem` component instead.
7
+ */
8
+ export interface DropdownOption {
9
+ /**
10
+ * Text to be displayed as the menu item text.
11
+ *
12
+ */
13
+ label: string;
14
+ /**
15
+ * A function that will be invoked when the item is clicked.
16
+ * It receives no arguments and its return value is ignored.
17
+ *
18
+ * @event
19
+ */
20
+ onClick?: () => void;
21
+ }
22
+ /**
23
+ * The props type for {@link !components.DropdownButtonItem}.
24
+ *
25
+ * @category Component Props
26
+ */
27
+ export interface DropdownButtonItemProps extends OverlayComponentProps {
28
+ /**
29
+ * Text to be displayed as the menu item text.
30
+ * Can also accept ReactNode for more complex content.
31
+ */
32
+ children: ReactNode;
33
+ /**
34
+ * A function that will be invoked when the item is clicked.
35
+ * It receives no arguments and its return value is ignored.
36
+ *
37
+ * @event
38
+ */
39
+ onClick?: ReactionsHandler<ExtensionEvent>;
40
+ }
41
+ /**
42
+ * The props type for {@link !components.Dropdown}.
43
+ *
44
+ * @category Component Props
45
+ */
46
+ export interface DropdownProps {
47
+ /**
48
+ * The list of options to be rendered within the dropdown menu.
49
+ * Each option represents an entry in the Dropdown.
50
+ *
51
+ * @deprecated This prop is deprecated and will be removed in a future release.
52
+ * Use child components instead to define dropdown menu items. For example,
53
+ * use `<Dropdown.ButtonItem>` to render an action button within a dropdown menu.
54
+ */
55
+ options?: DropdownOption[];
56
+ /**
57
+ * Controls the appearance of the dropdown button
58
+ *
59
+ * @defaultValue `"secondary"`
60
+ */
61
+ variant?: 'primary' | 'secondary' | 'transparent';
62
+ /**
63
+ * Sets the content for the dropdown button.
64
+ *
65
+ * @defaultValue `"More"`
66
+ */
67
+ buttonText?: string;
68
+ /**
69
+ * Sets the size of the dropdown button.
70
+ *
71
+ * @defaultValue `"md"`
72
+ */
73
+ buttonSize?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
74
+ /**
75
+ * Disables the ability to focus and click-to-expand of the dropdown button
76
+ *
77
+ * @defaultValue `false`
78
+ */
79
+ disabled?: boolean;
80
+ /**
81
+ * Sets the content that will render inside the Dropdown. You have to use `DropdownOption` component as a child of the `Dropdown` component.
82
+ */
83
+ children?: ReactNode;
84
+ }
@@ -0,0 +1,51 @@
1
+ import { ReactNode } from 'react';
2
+ export type EmptyStateImageName = 'addOnReporting' | 'announcement' | 'api' | 'automatedTesting' | 'beta' | 'building' | 'callingSetUp' | 'companies' | 'components' | 'cone' | 'contacts' | 'contentStrategy' | 'customObjects' | 'customerExperience' | 'customerSupport' | 'deals' | 'developerSecurityUpdate' | 'electronicSignature' | 'electronicSignatureEmptyState' | 'emailConfirmation' | 'emptyStateCharts' | 'idea' | 'integrations' | 'leads' | 'lock' | 'meetings' | 'missedGoal' | 'multipleObjects' | 'object' | 'productsShoppingCart' | 'registration' | 'sandboxAddOn' | 'social' | 'store' | 'storeDisabled' | 'successfullyConnectedEmail' | 'target' | 'task' | 'tickets' | 'voteAndSearch';
3
+ /**
4
+ * The props type for {@link !components.EmptyState}.
5
+ *
6
+ * @category Component Props
7
+ */
8
+ export interface EmptyStateProps {
9
+ /**
10
+ * When set to `true`, removes the default vertical margins in the component.
11
+ *
12
+ * @defaultValue `false`
13
+ */
14
+ flush?: boolean;
15
+ /**
16
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
17
+ *
18
+ */
19
+ children: ReactNode;
20
+ /**
21
+ * The text for the title header.
22
+ *
23
+ * @defaultValue `"All is not lost."`
24
+ *
25
+ */
26
+ title?: string;
27
+ /**
28
+ * Sets the layout direction for the content. Can be either `horizontal` or `vertical`.
29
+ *
30
+ * @defaultValue `"horizontal"`
31
+ */
32
+ layout?: 'horizontal' | 'vertical';
33
+ /**
34
+ * When set to `true`, swaps the visual order of the text (primary) and image (secondary) content. This ensures the primary content is still presented first to assistive technology.
35
+ *
36
+ * @defaultValue `false`
37
+ */
38
+ reverseOrder?: boolean;
39
+ /**
40
+ * The max-width(in pixels) for the image container.
41
+ *
42
+ * @defaultValue `250`
43
+ */
44
+ imageWidth?: number;
45
+ /**
46
+ * The name of the image to display.
47
+ *
48
+ * @defaultValue `"emptyStateCharts"`
49
+ */
50
+ imageName?: EmptyStateImageName;
51
+ }
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.ErrorState}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface ErrorStateProps {
8
+ /**
9
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
10
+ *
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * The text of the title header.
15
+ *
16
+ */
17
+ title?: string;
18
+ /**
19
+ * The type of error image that will be shown.
20
+ *
21
+ * @defaultValue `"error"`
22
+ */
23
+ type?: 'error' | 'support' | 'lock';
24
+ }