@hazelcast/ui 1.0.1-next.9 → 1.2.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 (200) hide show
  1. package/lib/Alert.d.ts +3 -2
  2. package/lib/Alert.js +23 -23
  3. package/lib/Alert.js.map +1 -1
  4. package/lib/Alert.module.scss +14 -6
  5. package/lib/AutocompleteField.d.ts +2 -1
  6. package/lib/AutocompleteField.js +41 -19
  7. package/lib/AutocompleteField.js.map +1 -1
  8. package/lib/AutocompleteField.module.scss +2 -4
  9. package/lib/AutocompleteFieldFormik.d.ts +2 -1
  10. package/lib/AutocompleteFieldFormik.js +11 -5
  11. package/lib/AutocompleteFieldFormik.js.map +1 -1
  12. package/lib/Button.d.ts +80 -41
  13. package/lib/Button.js +42 -13
  14. package/lib/Button.js.map +1 -1
  15. package/lib/Button.module.scss +119 -87
  16. package/lib/Calendar/Calendar.d.ts +1 -1
  17. package/lib/Calendar/Calendar.js +6 -1
  18. package/lib/Calendar/Calendar.js.map +1 -1
  19. package/lib/Calendar/Calendar.module.scss +132 -124
  20. package/lib/Calendar/components/CalendarTime.js +1 -1
  21. package/lib/Calendar/components/CalendarTime.js.map +1 -1
  22. package/lib/Card.d.ts +1 -0
  23. package/lib/Card.js +4 -3
  24. package/lib/Card.js.map +1 -1
  25. package/lib/Card.module.scss +15 -3
  26. package/lib/Checkbox.js +4 -3
  27. package/lib/Checkbox.js.map +1 -1
  28. package/lib/Checkbox.module.scss +15 -6
  29. package/lib/CheckboxFormik.d.ts +2 -1
  30. package/lib/CheckboxFormik.js +9 -4
  31. package/lib/CheckboxFormik.js.map +1 -1
  32. package/lib/CodeEditor.d.ts +3 -2
  33. package/lib/CodeEditor.js +3 -2
  34. package/lib/CodeEditor.js.map +1 -1
  35. package/lib/EmptyState.d.ts +6 -4
  36. package/lib/EmptyState.js +4 -6
  37. package/lib/EmptyState.js.map +1 -1
  38. package/lib/EmptyState.module.scss +0 -1
  39. package/lib/Error.d.ts +1 -0
  40. package/lib/Error.js +2 -1
  41. package/lib/Error.js.map +1 -1
  42. package/lib/FieldHeader.d.ts +20 -0
  43. package/lib/FieldHeader.js +15 -0
  44. package/lib/FieldHeader.js.map +1 -0
  45. package/lib/FieldHeader.module.scss +20 -0
  46. package/lib/Icon.d.ts +2 -2
  47. package/lib/IconButton.d.ts +13 -3
  48. package/lib/IconButton.js +2 -2
  49. package/lib/IconButton.js.map +1 -1
  50. package/lib/InteractiveList.d.ts +2 -1
  51. package/lib/InteractiveList.js.map +1 -1
  52. package/lib/Link.js +2 -3
  53. package/lib/Link.js.map +1 -1
  54. package/lib/Link.module.scss +6 -0
  55. package/lib/Loader.module.scss +3 -1
  56. package/lib/Modal.d.ts +2 -0
  57. package/lib/Modal.js +2 -2
  58. package/lib/Modal.js.map +1 -1
  59. package/lib/NumberField.js +11 -5
  60. package/lib/NumberField.js.map +1 -1
  61. package/lib/NumberFieldFormik.d.ts +2 -1
  62. package/lib/NumberFieldFormik.js +7 -4
  63. package/lib/NumberFieldFormik.js.map +1 -1
  64. package/lib/Overlay.d.ts +2 -1
  65. package/lib/Overlay.js +7 -5
  66. package/lib/Overlay.js.map +1 -1
  67. package/lib/Overlay.module.scss +16 -3
  68. package/lib/Pagination.d.ts +0 -4
  69. package/lib/Pagination.js +19 -17
  70. package/lib/Pagination.js.map +1 -1
  71. package/lib/Pagination.module.scss +6 -4
  72. package/lib/PasswordFieldFormik.d.ts +2 -1
  73. package/lib/PasswordFieldFormik.js +9 -4
  74. package/lib/PasswordFieldFormik.js.map +1 -1
  75. package/lib/Popover.d.ts +1 -0
  76. package/lib/Popover.js +2 -0
  77. package/lib/Popover.js.map +1 -0
  78. package/lib/RadioGroup.js +4 -3
  79. package/lib/RadioGroup.js.map +1 -1
  80. package/lib/RadioGroup.module.scss +2 -4
  81. package/lib/RadioGroupFormik.d.ts +2 -1
  82. package/lib/RadioGroupFormik.js +9 -4
  83. package/lib/RadioGroupFormik.js.map +1 -1
  84. package/lib/SegmentedControl.d.ts +8 -8
  85. package/lib/SegmentedControl.js.map +1 -1
  86. package/lib/SegmentedControl.module.scss +4 -2
  87. package/lib/SegmentedControlFormik.d.ts +4 -4
  88. package/lib/SegmentedControlFormik.js.map +1 -1
  89. package/lib/Select/CheckableSelectField.d.ts +31 -0
  90. package/lib/Select/CheckableSelectField.js +89 -0
  91. package/lib/Select/CheckableSelectField.js.map +1 -0
  92. package/lib/Select/CheckableSelectField.module.scss +79 -0
  93. package/lib/Select/CheckableSelectFieldFormik.d.ts +10 -0
  94. package/lib/Select/CheckableSelectFieldFormik.js +19 -0
  95. package/lib/Select/CheckableSelectFieldFormik.js.map +1 -0
  96. package/lib/Select/Common.d.ts +9 -0
  97. package/lib/Select/Common.js +37 -0
  98. package/lib/Select/Common.js.map +1 -0
  99. package/lib/Select/Common.module.scss +54 -0
  100. package/lib/Select/MultiSelectField.d.ts +28 -0
  101. package/lib/Select/MultiSelectField.js +111 -0
  102. package/lib/Select/MultiSelectField.js.map +1 -0
  103. package/lib/Select/MultiSelectField.module.scss +72 -0
  104. package/lib/Select/MultiSelectFieldFormik.d.ts +10 -0
  105. package/lib/Select/MultiSelectFieldFormik.js +19 -0
  106. package/lib/Select/MultiSelectFieldFormik.js.map +1 -0
  107. package/lib/Select/SelectField.d.ts +42 -0
  108. package/lib/Select/SelectField.js +87 -0
  109. package/lib/Select/SelectField.js.map +1 -0
  110. package/lib/Select/SelectField.module.scss +191 -0
  111. package/lib/Select/SelectFieldFormik.d.ts +10 -0
  112. package/lib/Select/SelectFieldFormik.js +19 -0
  113. package/lib/Select/SelectFieldFormik.js.map +1 -0
  114. package/lib/Select/helpers.d.ts +11 -0
  115. package/lib/Select/helpers.js +29 -0
  116. package/lib/Select/helpers.js.map +1 -0
  117. package/lib/Select/index.d.ts +7 -0
  118. package/lib/Select/index.js +8 -0
  119. package/lib/Select/index.js.map +1 -0
  120. package/lib/SimpleTable.d.ts +11 -0
  121. package/lib/SimpleTable.js +26 -0
  122. package/lib/SimpleTable.js.map +1 -0
  123. package/lib/SimpleTable.module.scss +28 -0
  124. package/lib/Slider.d.ts +6 -5
  125. package/lib/Slider.js +35 -17
  126. package/lib/Slider.js.map +1 -1
  127. package/lib/Slider.module.scss +8 -8
  128. package/lib/Table/Cell.module.scss +11 -4
  129. package/lib/Table/EnhancedRenderers.d.ts +0 -7
  130. package/lib/Table/EnhancedRenderers.js +3 -14
  131. package/lib/Table/EnhancedRenderers.js.map +1 -1
  132. package/lib/Table/Header.js +9 -3
  133. package/lib/Table/Header.js.map +1 -1
  134. package/lib/Table/Header.module.scss +26 -35
  135. package/lib/Table/Row.js +2 -3
  136. package/lib/Table/Row.js.map +1 -1
  137. package/lib/Table/Row.module.scss +4 -10
  138. package/lib/Table/Table.d.ts +11 -4
  139. package/lib/Table/Table.js +70 -29
  140. package/lib/Table/Table.js.map +1 -1
  141. package/lib/Table/Table.module.scss +5 -5
  142. package/lib/Tabs/Tab.d.ts +9 -1
  143. package/lib/Tabs/Tab.js +5 -2
  144. package/lib/Tabs/Tab.js.map +1 -1
  145. package/lib/Tabs/Tab.module.scss +4 -0
  146. package/lib/TextArea.d.ts +4 -5
  147. package/lib/TextArea.js +7 -7
  148. package/lib/TextArea.js.map +1 -1
  149. package/lib/TextArea.module.scss +6 -4
  150. package/lib/TextField.d.ts +4 -7
  151. package/lib/TextField.js +9 -8
  152. package/lib/TextField.js.map +1 -1
  153. package/lib/TextField.module.scss +4 -18
  154. package/lib/TextFieldFormik.d.ts +4 -2
  155. package/lib/TextFieldFormik.js +15 -4
  156. package/lib/TextFieldFormik.js.map +1 -1
  157. package/lib/TimeField.d.ts +2 -11
  158. package/lib/TimeField.js +7 -6
  159. package/lib/TimeField.js.map +1 -1
  160. package/lib/TimeField.module.scss +6 -6
  161. package/lib/Toggle.js +4 -3
  162. package/lib/Toggle.js.map +1 -1
  163. package/lib/Toggle.module.scss +15 -14
  164. package/lib/Tooltip.d.ts +7 -1
  165. package/lib/Tooltip.js +38 -23
  166. package/lib/Tooltip.js.map +1 -1
  167. package/lib/Tooltip.module.scss +10 -5
  168. package/lib/TruncatedText.d.ts +1 -1
  169. package/lib/TruncatedText.js +1 -1
  170. package/lib/TruncatedText.js.map +1 -1
  171. package/lib/hooks/index.d.ts +1 -0
  172. package/lib/hooks/index.js +3 -0
  173. package/lib/hooks/index.js.map +1 -0
  174. package/lib/hooks/usePrevious.d.ts +1 -0
  175. package/lib/hooks/usePrevious.js +9 -0
  176. package/lib/hooks/usePrevious.js.map +1 -0
  177. package/lib/hooks/useTableCustomizableColumns.d.ts +9 -0
  178. package/lib/hooks/useTableCustomizableColumns.js +23 -0
  179. package/lib/hooks/useTableCustomizableColumns.js.map +1 -0
  180. package/lib/index.d.ts +4 -2
  181. package/lib/index.js +4 -2
  182. package/lib/index.js.map +1 -1
  183. package/package.json +13 -13
  184. package/styles/constants/_sizes.scss +7 -6
  185. package/styles/constants/_typography.scss +3 -3
  186. package/styles/fonts.css +29 -65
  187. package/styles/helpers/_a11y.scss +4 -0
  188. package/styles/helpers/_error.scss +17 -0
  189. package/styles/helpers/_index.scss +1 -0
  190. package/lib/Calendar/components/CalendarHeader.tsx +0 -45
  191. package/lib/Calendar/components/CalendarInput.tsx +0 -50
  192. package/lib/Calendar/components/CalendarTime.tsx +0 -116
  193. package/lib/Calendar/helpers/consts.ts +0 -99
  194. package/lib/SelectField.d.ts +0 -81
  195. package/lib/SelectField.js +0 -196
  196. package/lib/SelectField.js.map +0 -1
  197. package/lib/SelectField.module.scss +0 -251
  198. package/lib/SelectFieldFormik.d.ts +0 -20
  199. package/lib/SelectFieldFormik.js +0 -19
  200. package/lib/SelectFieldFormik.js.map +0 -1
package/lib/Button.d.ts CHANGED
@@ -3,30 +3,28 @@ import { IconProps } from './Icon';
3
3
  import { TooltipProps } from './Tooltip';
4
4
  import { LinkRel, LinkTarget } from './Link';
5
5
  export declare type ButtonKind = 'primary' | 'secondary' | 'danger' | 'transparent';
6
+ export declare type ButtonVariant = 'contained' | 'outlined' | 'text';
7
+ export declare type ButtonColor = 'primary' | 'secondary' | 'warning';
6
8
  export declare type ButtonSize = 'medium' | 'small';
7
9
  export declare type ButtonAccessibleIconLeftProps = {
8
10
  iconLeft: IconProps['icon'];
9
11
  iconLeftAriaLabel: string;
10
- iconLeftSize?: IconProps['size'];
11
12
  iconLeftColor?: IconProps['color'];
12
13
  iconLeftClassName?: string;
13
14
  } | {
14
15
  iconLeft?: never;
15
16
  iconLeftAriaLabel?: never;
16
- iconLeftSize?: never;
17
17
  iconLeftColor?: never;
18
18
  iconLeftClassName?: never;
19
19
  };
20
20
  export declare type ButtonAccessibleIconRightProps = {
21
21
  iconRight: IconProps['icon'];
22
22
  iconRightAriaLabel: string;
23
- iconRightSize?: IconProps['size'];
24
23
  iconRightColor?: IconProps['color'];
25
24
  iconRightClassName?: string;
26
25
  } | {
27
26
  iconRight?: never;
28
27
  iconRightAriaLabel?: never;
29
- iconRightSize?: never;
30
28
  iconRightColor?: never;
31
29
  iconRightClassName?: never;
32
30
  };
@@ -44,13 +42,18 @@ export declare type ButtonDisabledProps = {
44
42
  };
45
43
  export declare type ButtonOutlineType = 'outline' | 'inset';
46
44
  export declare type ButtonCommonProps = {
45
+ /**
46
+ * @deprecated Use variant + color instead
47
+ */
47
48
  kind?: ButtonKind;
48
- size?: ButtonSize;
49
49
  children: string;
50
+ color?: ButtonColor;
50
51
  capitalize?: boolean;
51
52
  bodyClassName?: string;
53
+ variant?: ButtonVariant;
52
54
  outlineClassName?: string;
53
55
  outline?: ButtonOutlineType;
56
+ tooltip?: string;
54
57
  } & Pick<HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, 'className' | 'onClick' | 'tabIndex' | 'style'>;
55
58
  export declare type ButtonTypeAnchorProps = {
56
59
  component: 'a';
@@ -90,23 +93,26 @@ export declare type ButtonProps<T = ButtonTypeProps> = ButtonCommonProps & Butto
90
93
  * - **Transparent**: Use for IconButton and similar use-cases.
91
94
  */
92
95
  export declare const Button: React.ForwardRefExoticComponent<({
96
+ /**
97
+ * @deprecated Use variant + color instead
98
+ */
93
99
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
94
- size?: "medium" | "small" | undefined;
95
100
  children: string;
101
+ color?: "primary" | "secondary" | "warning" | undefined;
96
102
  capitalize?: boolean | undefined;
97
103
  bodyClassName?: string | undefined;
104
+ variant?: "text" | "contained" | "outlined" | undefined;
98
105
  outlineClassName?: string | undefined;
99
106
  outline?: "inset" | "outline" | undefined;
107
+ tooltip?: string | undefined;
100
108
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
101
109
  iconLeft: IconProps['icon'];
102
110
  iconLeftAriaLabel: string;
103
- iconLeftSize?: IconProps['size'];
104
111
  iconLeftColor?: IconProps['color'];
105
112
  iconLeftClassName?: string | undefined;
106
113
  } & {
107
114
  iconRight: IconProps['icon'];
108
115
  iconRightAriaLabel: string;
109
- iconRightSize?: IconProps['size'];
110
116
  iconRightColor?: IconProps['color'];
111
117
  iconRightClassName?: string | undefined;
112
118
  } & {
@@ -117,23 +123,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
117
123
  type?: undefined;
118
124
  loading?: undefined;
119
125
  } & ButtonNotDisabledProps & React.RefAttributes<HTMLElement>) | ({
126
+ /**
127
+ * @deprecated Use variant + color instead
128
+ */
120
129
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
121
- size?: "medium" | "small" | undefined;
122
130
  children: string;
131
+ color?: "primary" | "secondary" | "warning" | undefined;
123
132
  capitalize?: boolean | undefined;
124
133
  bodyClassName?: string | undefined;
134
+ variant?: "text" | "contained" | "outlined" | undefined;
125
135
  outlineClassName?: string | undefined;
126
136
  outline?: "inset" | "outline" | undefined;
137
+ tooltip?: string | undefined;
127
138
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
128
139
  iconLeft: IconProps['icon'];
129
140
  iconLeftAriaLabel: string;
130
- iconLeftSize?: IconProps['size'];
131
141
  iconLeftColor?: IconProps['color'];
132
142
  iconLeftClassName?: string | undefined;
133
143
  } & {
134
144
  iconRight: IconProps['icon'];
135
145
  iconRightAriaLabel: string;
136
- iconRightSize?: IconProps['size'];
137
146
  iconRightColor?: IconProps['color'];
138
147
  iconRightClassName?: string | undefined;
139
148
  } & {
@@ -143,23 +152,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
143
152
  rel?: undefined;
144
153
  loading?: boolean | undefined;
145
154
  } & ButtonNotDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
155
+ /**
156
+ * @deprecated Use variant + color instead
157
+ */
146
158
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
147
- size?: "medium" | "small" | undefined;
148
159
  children: string;
160
+ color?: "primary" | "secondary" | "warning" | undefined;
149
161
  capitalize?: boolean | undefined;
150
162
  bodyClassName?: string | undefined;
163
+ variant?: "text" | "contained" | "outlined" | undefined;
151
164
  outlineClassName?: string | undefined;
152
165
  outline?: "inset" | "outline" | undefined;
166
+ tooltip?: string | undefined;
153
167
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
154
168
  iconLeft: IconProps['icon'];
155
169
  iconLeftAriaLabel: string;
156
- iconLeftSize?: IconProps['size'];
157
170
  iconLeftColor?: IconProps['color'];
158
171
  iconLeftClassName?: string | undefined;
159
172
  } & {
160
173
  iconRight: IconProps['icon'];
161
174
  iconRightAriaLabel: string;
162
- iconRightSize?: IconProps['size'];
163
175
  iconRightColor?: IconProps['color'];
164
176
  iconRightClassName?: string | undefined;
165
177
  } & {
@@ -169,23 +181,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
169
181
  rel?: undefined;
170
182
  loading?: boolean | undefined;
171
183
  } & ButtonDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
184
+ /**
185
+ * @deprecated Use variant + color instead
186
+ */
172
187
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
173
- size?: "medium" | "small" | undefined;
174
188
  children: string;
189
+ color?: "primary" | "secondary" | "warning" | undefined;
175
190
  capitalize?: boolean | undefined;
176
191
  bodyClassName?: string | undefined;
192
+ variant?: "text" | "contained" | "outlined" | undefined;
177
193
  outlineClassName?: string | undefined;
178
194
  outline?: "inset" | "outline" | undefined;
195
+ tooltip?: string | undefined;
179
196
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
180
197
  iconLeft: IconProps['icon'];
181
198
  iconLeftAriaLabel: string;
182
- iconLeftSize?: IconProps['size'];
183
199
  iconLeftColor?: IconProps['color'];
184
200
  iconLeftClassName?: string | undefined;
185
201
  } & {
186
202
  iconRight?: undefined;
187
203
  iconRightAriaLabel?: undefined;
188
- iconRightSize?: undefined;
189
204
  iconRightColor?: undefined;
190
205
  iconRightClassName?: undefined;
191
206
  } & {
@@ -196,23 +211,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
196
211
  type?: undefined;
197
212
  loading?: undefined;
198
213
  } & ButtonNotDisabledProps & React.RefAttributes<HTMLElement>) | ({
214
+ /**
215
+ * @deprecated Use variant + color instead
216
+ */
199
217
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
200
- size?: "medium" | "small" | undefined;
201
218
  children: string;
219
+ color?: "primary" | "secondary" | "warning" | undefined;
202
220
  capitalize?: boolean | undefined;
203
221
  bodyClassName?: string | undefined;
222
+ variant?: "text" | "contained" | "outlined" | undefined;
204
223
  outlineClassName?: string | undefined;
205
224
  outline?: "inset" | "outline" | undefined;
225
+ tooltip?: string | undefined;
206
226
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
207
227
  iconLeft: IconProps['icon'];
208
228
  iconLeftAriaLabel: string;
209
- iconLeftSize?: IconProps['size'];
210
229
  iconLeftColor?: IconProps['color'];
211
230
  iconLeftClassName?: string | undefined;
212
231
  } & {
213
232
  iconRight?: undefined;
214
233
  iconRightAriaLabel?: undefined;
215
- iconRightSize?: undefined;
216
234
  iconRightColor?: undefined;
217
235
  iconRightClassName?: undefined;
218
236
  } & {
@@ -222,23 +240,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
222
240
  rel?: undefined;
223
241
  loading?: boolean | undefined;
224
242
  } & ButtonNotDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
243
+ /**
244
+ * @deprecated Use variant + color instead
245
+ */
225
246
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
226
- size?: "medium" | "small" | undefined;
227
247
  children: string;
248
+ color?: "primary" | "secondary" | "warning" | undefined;
228
249
  capitalize?: boolean | undefined;
229
250
  bodyClassName?: string | undefined;
251
+ variant?: "text" | "contained" | "outlined" | undefined;
230
252
  outlineClassName?: string | undefined;
231
253
  outline?: "inset" | "outline" | undefined;
254
+ tooltip?: string | undefined;
232
255
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
233
256
  iconLeft: IconProps['icon'];
234
257
  iconLeftAriaLabel: string;
235
- iconLeftSize?: IconProps['size'];
236
258
  iconLeftColor?: IconProps['color'];
237
259
  iconLeftClassName?: string | undefined;
238
260
  } & {
239
261
  iconRight?: undefined;
240
262
  iconRightAriaLabel?: undefined;
241
- iconRightSize?: undefined;
242
263
  iconRightColor?: undefined;
243
264
  iconRightClassName?: undefined;
244
265
  } & {
@@ -248,23 +269,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
248
269
  rel?: undefined;
249
270
  loading?: boolean | undefined;
250
271
  } & ButtonDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
272
+ /**
273
+ * @deprecated Use variant + color instead
274
+ */
251
275
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
252
- size?: "medium" | "small" | undefined;
253
276
  children: string;
277
+ color?: "primary" | "secondary" | "warning" | undefined;
254
278
  capitalize?: boolean | undefined;
255
279
  bodyClassName?: string | undefined;
280
+ variant?: "text" | "contained" | "outlined" | undefined;
256
281
  outlineClassName?: string | undefined;
257
282
  outline?: "inset" | "outline" | undefined;
283
+ tooltip?: string | undefined;
258
284
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
259
285
  iconLeft?: undefined;
260
286
  iconLeftAriaLabel?: undefined;
261
- iconLeftSize?: undefined;
262
287
  iconLeftColor?: undefined;
263
288
  iconLeftClassName?: undefined;
264
289
  } & {
265
290
  iconRight: IconProps['icon'];
266
291
  iconRightAriaLabel: string;
267
- iconRightSize?: IconProps['size'];
268
292
  iconRightColor?: IconProps['color'];
269
293
  iconRightClassName?: string | undefined;
270
294
  } & {
@@ -275,23 +299,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
275
299
  type?: undefined;
276
300
  loading?: undefined;
277
301
  } & ButtonNotDisabledProps & React.RefAttributes<HTMLElement>) | ({
302
+ /**
303
+ * @deprecated Use variant + color instead
304
+ */
278
305
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
279
- size?: "medium" | "small" | undefined;
280
306
  children: string;
307
+ color?: "primary" | "secondary" | "warning" | undefined;
281
308
  capitalize?: boolean | undefined;
282
309
  bodyClassName?: string | undefined;
310
+ variant?: "text" | "contained" | "outlined" | undefined;
283
311
  outlineClassName?: string | undefined;
284
312
  outline?: "inset" | "outline" | undefined;
313
+ tooltip?: string | undefined;
285
314
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
286
315
  iconLeft?: undefined;
287
316
  iconLeftAriaLabel?: undefined;
288
- iconLeftSize?: undefined;
289
317
  iconLeftColor?: undefined;
290
318
  iconLeftClassName?: undefined;
291
319
  } & {
292
320
  iconRight: IconProps['icon'];
293
321
  iconRightAriaLabel: string;
294
- iconRightSize?: IconProps['size'];
295
322
  iconRightColor?: IconProps['color'];
296
323
  iconRightClassName?: string | undefined;
297
324
  } & {
@@ -301,23 +328,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
301
328
  rel?: undefined;
302
329
  loading?: boolean | undefined;
303
330
  } & ButtonNotDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
331
+ /**
332
+ * @deprecated Use variant + color instead
333
+ */
304
334
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
305
- size?: "medium" | "small" | undefined;
306
335
  children: string;
336
+ color?: "primary" | "secondary" | "warning" | undefined;
307
337
  capitalize?: boolean | undefined;
308
338
  bodyClassName?: string | undefined;
339
+ variant?: "text" | "contained" | "outlined" | undefined;
309
340
  outlineClassName?: string | undefined;
310
341
  outline?: "inset" | "outline" | undefined;
342
+ tooltip?: string | undefined;
311
343
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
312
344
  iconLeft?: undefined;
313
345
  iconLeftAriaLabel?: undefined;
314
- iconLeftSize?: undefined;
315
346
  iconLeftColor?: undefined;
316
347
  iconLeftClassName?: undefined;
317
348
  } & {
318
349
  iconRight: IconProps['icon'];
319
350
  iconRightAriaLabel: string;
320
- iconRightSize?: IconProps['size'];
321
351
  iconRightColor?: IconProps['color'];
322
352
  iconRightClassName?: string | undefined;
323
353
  } & {
@@ -327,23 +357,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
327
357
  rel?: undefined;
328
358
  loading?: boolean | undefined;
329
359
  } & ButtonDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
360
+ /**
361
+ * @deprecated Use variant + color instead
362
+ */
330
363
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
331
- size?: "medium" | "small" | undefined;
332
364
  children: string;
365
+ color?: "primary" | "secondary" | "warning" | undefined;
333
366
  capitalize?: boolean | undefined;
334
367
  bodyClassName?: string | undefined;
368
+ variant?: "text" | "contained" | "outlined" | undefined;
335
369
  outlineClassName?: string | undefined;
336
370
  outline?: "inset" | "outline" | undefined;
371
+ tooltip?: string | undefined;
337
372
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
338
373
  iconLeft?: undefined;
339
374
  iconLeftAriaLabel?: undefined;
340
- iconLeftSize?: undefined;
341
375
  iconLeftColor?: undefined;
342
376
  iconLeftClassName?: undefined;
343
377
  } & {
344
378
  iconRight?: undefined;
345
379
  iconRightAriaLabel?: undefined;
346
- iconRightSize?: undefined;
347
380
  iconRightColor?: undefined;
348
381
  iconRightClassName?: undefined;
349
382
  } & {
@@ -354,23 +387,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
354
387
  type?: undefined;
355
388
  loading?: undefined;
356
389
  } & ButtonNotDisabledProps & React.RefAttributes<HTMLElement>) | ({
390
+ /**
391
+ * @deprecated Use variant + color instead
392
+ */
357
393
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
358
- size?: "medium" | "small" | undefined;
359
394
  children: string;
395
+ color?: "primary" | "secondary" | "warning" | undefined;
360
396
  capitalize?: boolean | undefined;
361
397
  bodyClassName?: string | undefined;
398
+ variant?: "text" | "contained" | "outlined" | undefined;
362
399
  outlineClassName?: string | undefined;
363
400
  outline?: "inset" | "outline" | undefined;
401
+ tooltip?: string | undefined;
364
402
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
365
403
  iconLeft?: undefined;
366
404
  iconLeftAriaLabel?: undefined;
367
- iconLeftSize?: undefined;
368
405
  iconLeftColor?: undefined;
369
406
  iconLeftClassName?: undefined;
370
407
  } & {
371
408
  iconRight?: undefined;
372
409
  iconRightAriaLabel?: undefined;
373
- iconRightSize?: undefined;
374
410
  iconRightColor?: undefined;
375
411
  iconRightClassName?: undefined;
376
412
  } & {
@@ -380,23 +416,26 @@ export declare const Button: React.ForwardRefExoticComponent<({
380
416
  rel?: undefined;
381
417
  loading?: boolean | undefined;
382
418
  } & ButtonNotDisabledProps & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "autoFocus"> & React.RefAttributes<HTMLElement>) | ({
419
+ /**
420
+ * @deprecated Use variant + color instead
421
+ */
383
422
  kind?: "transparent" | "primary" | "secondary" | "danger" | undefined;
384
- size?: "medium" | "small" | undefined;
385
423
  children: string;
424
+ color?: "primary" | "secondary" | "warning" | undefined;
386
425
  capitalize?: boolean | undefined;
387
426
  bodyClassName?: string | undefined;
427
+ variant?: "text" | "contained" | "outlined" | undefined;
388
428
  outlineClassName?: string | undefined;
389
429
  outline?: "inset" | "outline" | undefined;
430
+ tooltip?: string | undefined;
390
431
  } & Pick<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, "style" | "className" | "tabIndex" | "onClick"> & {
391
432
  iconLeft?: undefined;
392
433
  iconLeftAriaLabel?: undefined;
393
- iconLeftSize?: undefined;
394
434
  iconLeftColor?: undefined;
395
435
  iconLeftClassName?: undefined;
396
436
  } & {
397
437
  iconRight?: undefined;
398
438
  iconRightAriaLabel?: undefined;
399
- iconRightSize?: undefined;
400
439
  iconRightColor?: undefined;
401
440
  iconRightClassName?: undefined;
402
441
  } & {
package/lib/Button.js CHANGED
@@ -5,8 +5,34 @@ import { useUID } from 'react-uid';
5
5
  import { Icon } from './Icon';
6
6
  import { TruncatedText } from './TruncatedText';
7
7
  import { Tooltip } from './Tooltip';
8
- import styles from './Button.module.scss';
9
8
  import { Loader } from './Loader';
9
+ import styles from './Button.module.scss';
10
+ const capitalizeFirstCharacter = (str) => `${str[0].toUpperCase()}${str.slice(1)}`;
11
+ const resolveButtonKindStyles = (kind) => {
12
+ switch (kind) {
13
+ case 'secondary':
14
+ return {
15
+ [styles.colorPrimary]: true,
16
+ [styles.variantOutlined]: true,
17
+ };
18
+ case 'transparent':
19
+ return {
20
+ [styles.colorPrimary]: true,
21
+ [styles.variantText]: true,
22
+ };
23
+ case 'danger': {
24
+ return {
25
+ [styles.colorSecondary]: true,
26
+ [styles.variantContained]: true,
27
+ };
28
+ }
29
+ default:
30
+ return {
31
+ [styles.colorPrimary]: true,
32
+ [styles.variantContained]: true,
33
+ };
34
+ }
35
+ };
10
36
  /**
11
37
  * ### Purpose
12
38
  * Make it clear what users should do to continue with their main flow by using buttons to highlight the main actions they can take.
@@ -27,26 +53,28 @@ import { Loader } from './Loader';
27
53
  * - **Danger**: Use danger button for potentially destructive actions.
28
54
  * - **Transparent**: Use for IconButton and similar use-cases.
29
55
  */
30
- export const Button = forwardRef(({ kind = 'primary', size = 'medium', component: Component = 'button', className, bodyClassName, outlineClassName, outline = 'outline', children, capitalize = true,
56
+ export const Button = forwardRef(({ kind, component: Component = 'button', className, bodyClassName, outlineClassName, outline = 'outline', children, capitalize = true,
31
57
  // Disabled tooltip
32
58
  disabled, disabledTooltip, disabledTooltipVisible, disabledTooltipPlacement,
33
59
  // Left icon
34
- iconLeft, iconLeftAriaLabel, iconLeftSize, iconLeftColor, iconLeftClassName,
60
+ iconLeft, iconLeftAriaLabel, iconLeftColor, iconLeftClassName,
35
61
  // Right icon
36
- iconRight, iconRightAriaLabel, iconRightSize, iconRightColor, iconRightClassName, rel = 'noopener', target, type = 'button', loading, ...rest }, ref) => {
62
+ iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopener', target, type = 'button', loading, variant = 'contained', color = 'primary', tooltip, ...rest }, ref) => {
37
63
  const tooltipId = useUID();
38
64
  const relFinal = Array.isArray(rel) ? rel.join(' ') : rel;
39
- return (React.createElement(Tooltip, { id: tooltipId, content: disabled ? disabledTooltip : undefined, visible: disabledTooltipVisible, placement: disabledTooltipPlacement }, (tooltipRef) => (React.createElement(Component, Object.assign({ "data-test": "button", className: cn(styles.button, {
40
- [styles.small]: size === 'small',
41
- [styles.primary]: kind === 'primary',
42
- [styles.secondary]: kind === 'secondary',
43
- [styles.danger]: kind === 'danger',
44
- [styles.transparent]: kind === 'transparent',
65
+ const loadingAnimationOnRight = loading && iconRight && iconRightAriaLabel && !(iconLeft && iconLeftAriaLabel);
66
+ return (React.createElement(Tooltip, { id: tooltipId, content: disabled ? disabledTooltip : tooltip, visible: disabled && disabledTooltipVisible, placement: disabledTooltipPlacement }, (tooltipRef) => (React.createElement(Component, Object.assign({ "data-test": "button", className: cn(styles.button, {
67
+ ...(kind !== undefined
68
+ ? resolveButtonKindStyles(kind)
69
+ : {
70
+ [styles[`color${capitalizeFirstCharacter(color)}`]]: true,
71
+ [styles[`variant${capitalizeFirstCharacter(variant)}`]]: true,
72
+ }),
45
73
  }, className), "aria-describedby": disabled ? tooltipId : undefined, disabled: disabled !== null && disabled !== void 0 ? disabled : loading, rel: Component === 'a' ? relFinal : undefined, target: Component === 'a' ? target : undefined, type: Component === 'button' ? type : undefined }, rest),
46
74
  React.createElement("span", { "data-test": "button-outline", className: cn(styles.outline, { [styles.inset]: outline === 'inset' }, outlineClassName) }),
47
75
  React.createElement("span", { className: cn(styles.body, bodyClassName), ref: mergeRefs([ref, tooltipRef]) },
48
- loading && React.createElement(Loader, { className: styles.iconLeft, size: size }),
49
- iconLeft && iconLeftAriaLabel && !loading && (React.createElement(Icon, { icon: iconLeft, ariaLabel: iconLeftAriaLabel, "data-test": "button-icon-left", className: cn(styles.iconLeft, iconLeftClassName), size: iconLeftSize, color: iconLeftColor })),
76
+ loading && !loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconLeft, size: 'small' }),
77
+ iconLeft && iconLeftAriaLabel && !loading && (React.createElement(Icon, { icon: iconLeft, ariaLabel: iconLeftAriaLabel, "data-test": "button-icon-left", className: cn(styles.iconLeft, iconLeftClassName), size: "small", color: iconLeftColor })),
50
78
  React.createElement(TruncatedText, { text: capitalize ? children.toUpperCase() : children,
51
79
  /*
52
80
  If a button is disabled and text is long we don't want to show 2 popups.
@@ -55,7 +83,8 @@ iconRight, iconRightAriaLabel, iconRightSize, iconRightColor, iconRightClassName
55
83
  the truncated popup -> setting it to undefined will leave the default behaviour.
56
84
  */
57
85
  tooltipVisible: disabled && disabledTooltipVisible !== false ? false : undefined }),
58
- iconRight && iconRightAriaLabel && (React.createElement(Icon, { icon: iconRight, ariaLabel: iconRightAriaLabel, "data-test": "button-icon-right", className: cn(styles.iconRight, iconRightClassName), size: iconRightSize, color: iconRightColor })))))));
86
+ loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconRight, size: "small" }),
87
+ !loadingAnimationOnRight && iconRight && iconRightAriaLabel && (React.createElement(Icon, { icon: iconRight, ariaLabel: iconRightAriaLabel, "data-test": "button-icon-right", className: cn(styles.iconRight, iconRightClassName), size: "small", color: iconRightColor })))))));
59
88
  });
60
89
  Button.displayName = 'Button';
61
90
  //# sourceMappingURL=Button.js.map
package/lib/Button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAwB,UAAU,EAAkB,MAAM,OAAO,CAAA;AAC/E,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAA;AAEjD,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAyFjC;;;;;;;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