@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,172 @@
1
+ import { ReactNode } from 'react';
2
+ import { AllDistances } from '../shared.synced';
3
+ /**
4
+ * The props type for {@link !components.Stack}.
5
+ *
6
+ * @category Component Props
7
+ */
8
+ export interface StackProps {
9
+ /**
10
+ * Sets the spacing between components.
11
+ */
12
+ distance?: AllDistances;
13
+ /**
14
+ * Sets the content that will render inside the component.
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * Arranges components `horizontally` or `vertically` by setting the main axis.
19
+ */
20
+ direction?: 'row' | 'column';
21
+ /**
22
+ * Distributes components along the main axis using the available free space.
23
+ */
24
+ justify?: 'center' | 'end' | 'start';
25
+ /**
26
+ * Distributes components along the cross-axis using the available free space.
27
+ */
28
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
29
+ /**
30
+ * Sets the width of the stack.
31
+ */
32
+ width?: 'auto' | '100%';
33
+ }
34
+ export type FlexJustify = 'center' | 'end' | 'start' | 'around' | 'between';
35
+ export type FlexAlign = 'start' | 'center' | 'baseline' | 'end' | 'stretch';
36
+ /**
37
+ * The props type for {@link !components.Flex}.
38
+ *
39
+ * @category Component Props
40
+ */
41
+ export interface FlexProps {
42
+ /**
43
+ * Sets the spacing between components.
44
+ *
45
+ * @defaultValue `"flush"`
46
+ */
47
+ gap?: AllDistances;
48
+ /**
49
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
50
+ *
51
+ */
52
+ children?: ReactNode;
53
+ /**
54
+ * Arranges components `horizontally` or `vertically` by setting the main axis.
55
+ *
56
+ * @defaultValue `"row"`
57
+ */
58
+ direction?: 'row' | 'column';
59
+ /**
60
+ * Distributes components along the main axis using the available free space.
61
+ *
62
+ * @defaultValue `"start"`
63
+ */
64
+ justify?: FlexJustify;
65
+ /**
66
+ * Distributes components along the cross-axis using the available free space.
67
+ *
68
+ * @defaultValue `"stretch"`
69
+ */
70
+ align?: FlexAlign;
71
+ /**
72
+ * Overrides Flex's `alignItem` value for this element.
73
+ *
74
+ */
75
+ alignSelf?: FlexAlign;
76
+ /**
77
+ * Whether components will wrap instead of trying to fit on one line.
78
+ *
79
+ * @defaultValue `"nowrap"`
80
+ */
81
+ wrap?: boolean | 'wrap' | 'nowrap';
82
+ }
83
+ /**
84
+ * The props type for {@link !components.Box}.
85
+ *
86
+ * @category Component Props
87
+ */
88
+ export interface BoxProps {
89
+ /**
90
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
91
+ *
92
+ */
93
+ children: ReactNode;
94
+ /**
95
+ * Overrides Flex's `alignItem` value for this element.
96
+ *
97
+ * @defaultValue `"auto"`
98
+ */
99
+ alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch' | 'auto';
100
+ /**
101
+ * Sets how the item will grow or shrink when it's a direct ancestor of the Flex component.
102
+ * ##### Options in detail
103
+ *
104
+ *- `initial`: The item is sized according to its width and height properties. It shrinks to its minimum size to fit the container, but does not grow to absorb any extra free space in the flex container.
105
+ *- `auto`: The item is sized according to its width and height properties, but grows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container.
106
+ *- `none`: The item is sized according to its width and height properties. It is fully inflexible: it neither shrinks nor grows in relation to the flex container.
107
+ *- `number`: Tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.
108
+ *
109
+ * @defaultValue `"initial"`
110
+ */
111
+ flex?: 'initial' | 'auto' | 'none' | number;
112
+ }
113
+ /**
114
+ * The props type for {@link !components.Inline}.
115
+ *
116
+ * @category Component Props
117
+ */
118
+ export interface InlineProps {
119
+ /**
120
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
121
+ *
122
+ */
123
+ children?: ReactNode;
124
+ /**
125
+ * Distributes components along the main axis using the available free space.
126
+ * @defaultValue `"start"`
127
+ */
128
+ justify?: FlexJustify;
129
+ /**
130
+ * Distributes components along the cross-axis using the available free space.
131
+ * @defaultValue `"center"`
132
+ */
133
+ align?: FlexAlign;
134
+ /**
135
+ * Sets the spacing between components.
136
+ *
137
+ * @defaultValue `"flush"`
138
+ */
139
+ gap?: AllDistances;
140
+ }
141
+ /**
142
+ * The props type for {@link !components.AutoGrid}.
143
+ *
144
+ * @category Component Props
145
+ */
146
+ export interface AutoGridProps {
147
+ /**
148
+ * Sets the width of each column in the grid.
149
+ * When `flexible` is true, columns will be at least this width (or collapse to container width if smaller), then expand equally to fill available space.
150
+ * When `flexible` is false, columns are exactly this width.
151
+ */
152
+ columnWidth: number;
153
+ /**
154
+ * Sets the spacing between grid items.
155
+ *
156
+ * @defaultValue `"flush"`
157
+ */
158
+ gap?: AllDistances;
159
+ /**
160
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
161
+ *
162
+ */
163
+ children?: ReactNode;
164
+ /**
165
+ * Whether columns should expand to fill available space.
166
+ * When true, columns will be at least `columnWidth` but grow equally to fill the container.
167
+ * When false, columns are exactly `columnWidth`.
168
+ *
169
+ * @defaultValue `false`
170
+ */
171
+ flexible?: boolean;
172
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { OverlayComponentProps, ExtensionEvent, HrefProp } from '../shared.synced';
3
+ import { ReactionsHandler } from '../reactions.synced';
4
+ /**
5
+ * The props type for {@link !components.Link}.
6
+ *
7
+ * @category Component Props
8
+ */
9
+ export interface LinkProps extends OverlayComponentProps {
10
+ /**
11
+ * Sets the content that will render inside the component.
12
+ *
13
+ */
14
+ children: ReactNode;
15
+ /**
16
+ * The URL that will be opened on click. Links to pages in the HubSpot account will open in the same tab, while non-HubSpot links will open in a new tab.
17
+ *
18
+ */
19
+ href: HrefProp;
20
+ /**
21
+ * The color variation of the link.
22
+ *
23
+ * @defaultValue `"primary"`
24
+ */
25
+ variant?: 'primary' | 'destructive' | 'light' | 'dark';
26
+ /**
27
+ * A function that will be invoked with the link is clicked.
28
+ *
29
+ * @event
30
+ */
31
+ onClick?: ReactionsHandler<ExtensionEvent>;
32
+ /**
33
+ * When set to true, `event.preventDefault()` will be invoked before the `onClick` function is called, preventing automatic navigation to the href URL.
34
+ *
35
+ * @defaultValue `false`
36
+ */
37
+ preventDefault?: boolean;
38
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.List}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface ListProps {
8
+ /**
9
+ * The content of the list. Each child will be wrapped in an `li` tag.
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * The type of list to render.
14
+ *
15
+ * @defaultValue `"unordered"`
16
+ */
17
+ variant?: 'unordered' | 'unordered-styled' | 'ordered' | 'ordered-styled' | 'inline' | 'inline-divided';
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ import { TShirtSizes } from '../shared.synced';
2
+ /**
3
+ * The props type for {@link !components.LoadingSpinner}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface LoadingSpinnerProps {
8
+ /**
9
+ * The text that displays next to the spinner. Note: the label is not shown by default, you must set `showLabel` to `true` to display the label.
10
+ *
11
+ */
12
+ label: string;
13
+ /**
14
+ * When set to `true`, the label will appear next to the spinner.
15
+ *
16
+ * @defaultValue `false`
17
+ */
18
+ showLabel?: boolean;
19
+ /**
20
+ * The size of the spinner.
21
+ *
22
+ * @defaultValue `"sm"`
23
+ */
24
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
25
+ /**
26
+ * The position of the spinner. Can be one of `inline` or `centered`.
27
+ *
28
+ * @defaultValue `"inline"`
29
+ */
30
+ layout?: 'inline' | 'centered';
31
+ }
@@ -0,0 +1,60 @@
1
+ import { ReactNode } from 'react';
2
+ import { TShirtSizes } from '../shared.synced';
3
+ export interface ModalProps {
4
+ /**
5
+ * Accessibility label.
6
+ *
7
+ */
8
+ 'aria-label'?: string;
9
+ /**
10
+ * The main content of the modal when it opens.
11
+ *
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * A unique ID for the modal
16
+ *
17
+ */
18
+ id: string;
19
+ /**
20
+ * A function that will be invoked when the modal has finished opening.
21
+ *
22
+ */
23
+ onOpen?: () => void;
24
+ /**
25
+ * A function that will be invoked when the modal has finished closing.
26
+ *
27
+ */
28
+ onClose?: () => void;
29
+ /**
30
+ * The width of the modal
31
+ *
32
+ * @defaultValue `"sm"`
33
+ */
34
+ width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
35
+ /**
36
+ * The title of the modal
37
+ *
38
+ */
39
+ title?: string;
40
+ /**
41
+ * The variant of the modal
42
+ *
43
+ * @defaultValue `"default"`
44
+ */
45
+ variant?: 'danger' | 'default';
46
+ }
47
+ export interface ModalBodyProps {
48
+ /**
49
+ * The main content of the modal
50
+ *
51
+ */
52
+ children: ReactNode;
53
+ }
54
+ export interface ModalFooterProps {
55
+ /**
56
+ * The footer of the modal
57
+ *
58
+ */
59
+ children: ReactNode;
60
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,73 @@
1
+ import { ReactNode } from 'react';
2
+ import { TShirtSizes } from '../shared.synced';
3
+ export interface PanelProps {
4
+ /**
5
+ * Accessibility label.
6
+ *
7
+ */
8
+ 'aria-label'?: string;
9
+ /**
10
+ * The main content of the panel when it opens.
11
+ *
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * A unique ID for the panel
16
+ *
17
+ */
18
+ id: string;
19
+ /**
20
+ * A function that will be invoked when the panel has finished opening.
21
+ *
22
+ */
23
+ onOpen?: () => void;
24
+ /**
25
+ * A function that will be invoked when the panel has finished closing.
26
+ *
27
+ */
28
+ onClose?: () => void;
29
+ /**
30
+ * The width of the panel
31
+ *
32
+ * @defaultValue `"sm"`
33
+ */
34
+ width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
35
+ /**
36
+ * The title of the panel
37
+ *
38
+ */
39
+ title?: string;
40
+ /**
41
+ * The variant of the panel
42
+ *
43
+ * @defaultValue `"default"`
44
+ */
45
+ variant?: 'modal' | 'default';
46
+ }
47
+ export interface PanelSectionProps {
48
+ /**
49
+ * When set to `true`, the section will have no bottom margin
50
+ *
51
+ * @defaultValue `false`
52
+ */
53
+ flush?: boolean;
54
+ /**
55
+ * The main content of the section
56
+ *
57
+ */
58
+ children: ReactNode;
59
+ }
60
+ export interface PanelBodyProps {
61
+ /**
62
+ * The main content of the body
63
+ *
64
+ */
65
+ children: ReactNode;
66
+ }
67
+ export interface PanelFooterProps {
68
+ /**
69
+ * The main content of the footer
70
+ *
71
+ */
72
+ children: ReactNode;
73
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The props type for {@link !components.ProgressBar}.
3
+ *
4
+ * @category Component Props
5
+ */
6
+ export interface ProgressBarProps {
7
+ /**
8
+ * The text that displays above the progress bar.
9
+ *
10
+ */
11
+ title?: string;
12
+ /**
13
+ * Accessibility label.
14
+ *
15
+ */
16
+ 'aria-label'?: string;
17
+ /**
18
+ * Whether the progress bar displays the completion percentage.
19
+ *
20
+ * @defaultValue `false`
21
+ */
22
+ showPercentage?: boolean;
23
+ /**
24
+ * The number representing the progress so far.
25
+ *
26
+ * @defaultValue `0`
27
+ */
28
+ value?: number;
29
+ /**
30
+ * The maximum value of the progress bar.
31
+ *
32
+ * @defaultValue `100`
33
+ */
34
+ maxValue?: number;
35
+ /**
36
+ * The text that explains the current state of the value property. For example, "150 out of 250". Displays above the progress bar on the right side.
37
+ *
38
+ */
39
+ valueDescription?: string;
40
+ /**
41
+ * The color that indicates the type of progress bar.
42
+ *
43
+ * @defaultValue `"success"`
44
+ */
45
+ variant?: 'success' | 'danger' | 'warning';
46
+ /** @deprecated use maxValue instead */
47
+ valueMax?: number;
48
+ }
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Generic collection of props for select components
3
+ * @internal
4
+ * */
5
+ export interface BaseSelectProps {
6
+ /**
7
+ * The text that displays above to the dropdown menu.
8
+ *
9
+ */
10
+ label?: string;
11
+ /**
12
+ * The unique identifier for the select element.
13
+ *
14
+ */
15
+ name?: string;
16
+ /**
17
+ * When set to `true`, displays a required field indicator.
18
+ *
19
+ * @defaultValue `false`
20
+ */
21
+ required?: boolean;
22
+ /**
23
+ * When set to `true`, sets the field as read-only on the CRM record, and users will not be able to fill the input field.
24
+ *
25
+ * @defaultValue `false`
26
+ */
27
+ readOnly?: boolean;
28
+ /**
29
+ * Displayed text that describes the field's purpose.
30
+ *
31
+ */
32
+ description?: string;
33
+ /**
34
+ * The text that displays in a tooltip next to the label.
35
+ *
36
+ */
37
+ tooltip?: string;
38
+ /**
39
+ * Text that appears in the input when no value is set.
40
+ *
41
+ */
42
+ placeholder?: string;
43
+ /**
44
+ * When set to `true`, `validationMessage` is displayed as an error message if provided.
45
+ * The input will also render its error state to let the user know there's an error.
46
+ * If left `false` (default), `validationMessage` is displayed as a success message.
47
+ *
48
+ * @defaultValue `false`
49
+ */
50
+ error?: boolean;
51
+ /**
52
+ * The text to show if the input has an error.
53
+ *
54
+ */
55
+ validationMessage?: string;
56
+ /**
57
+ * The variant type for the select.
58
+ *
59
+ * @defaultValue `"input"`
60
+ */
61
+ variant?: 'transparent' | 'input';
62
+ }
63
+ /**
64
+ * The props type for {@link !components.Select}.
65
+ *
66
+ * @category Component Props
67
+ */
68
+ export interface SelectProps extends BaseSelectProps {
69
+ /**
70
+ * The value of the select input.
71
+ *
72
+ */
73
+ value?: string | number | boolean;
74
+ /**
75
+ * A callback function that is invoked when the value is committed.
76
+ *
77
+ * @event
78
+ */
79
+ onChange?: (value: NonNullable<SelectProps['value']>) => void;
80
+ /**
81
+ * The variant type for the select.
82
+ *
83
+ * @defaultValue `"input"`
84
+ */
85
+ variant?: 'transparent' | 'input';
86
+ /**
87
+ * A function that is called and passed the value every time the search field is
88
+ * edited by the user. Prefer updating state in onChange as it fires less
89
+ * frequently, and if you need to update state here, consider debouncing your function.
90
+ *
91
+ * @event
92
+ */
93
+ onInput?: (value: string) => void;
94
+ /**
95
+ * The options to display in the dropdown menu.
96
+ */
97
+ options: {
98
+ /** Will be used as the display text. **/
99
+ label: string;
100
+ /** Should be the option's unique identifier, which is submitted with the form. **/
101
+ value: string | number | boolean;
102
+ }[];
103
+ }
104
+ /**
105
+ * The props type for {@link !components.MultiSelect}.
106
+ *
107
+ * @category Component Props
108
+ */
109
+ export interface MultiSelectProps extends BaseSelectProps {
110
+ /**
111
+ * The value of the select input.
112
+ *
113
+ */
114
+ value?: (string | number | boolean)[];
115
+ /**
116
+ * A callback function that is invoked when the value is committed.
117
+ *
118
+ * @event
119
+ */
120
+ onChange?: (value: NonNullable<MultiSelectProps['value']>) => void;
121
+ /**
122
+ * The options to display in the dropdown menu.
123
+ */
124
+ options: {
125
+ /** Will be used as the display text. **/
126
+ label: string;
127
+ /** Should be the option's unique identifier, which is submitted with the form. **/
128
+ value: string | number | boolean;
129
+ }[];
130
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.StatisticsTrend}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface StatisticsTrendProps {
8
+ /**
9
+ * The text to be displayed as the trend value.
10
+ */
11
+ value: string;
12
+ /**
13
+ * The direction of the trend arrow.
14
+ *
15
+ * @defaultValue `"increase"`
16
+ */
17
+ direction: 'increase' | 'decrease';
18
+ /**
19
+ * The color of the trend arrow.
20
+ */
21
+ color?: 'red' | 'green';
22
+ }
23
+ /**
24
+ * The props type for {@link !components.StatisticsItem}.
25
+ *
26
+ * @category Component Props
27
+ */
28
+ export interface StatisticsItemProps {
29
+ /**
30
+ * The unique identifier.
31
+ */
32
+ id?: string;
33
+ /**
34
+ * The item's label text.
35
+ */
36
+ label: string;
37
+ /**
38
+ * The string to be displayed as the item's primary number.
39
+ */
40
+ number: string | number;
41
+ /**
42
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsTrend} or {@link !components.Text}.
43
+ */
44
+ children?: ReactNode;
45
+ }
46
+ /**
47
+ * The props type for {@link !components.Statistics}.
48
+ *
49
+ * @category Component Props
50
+ */
51
+ export interface StatisticsProps {
52
+ /**
53
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsItem}.
54
+ */
55
+ children: ReactNode;
56
+ }