@ultraviolet/ui 1.28.0 → 1.29.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 (111) hide show
  1. package/README.md +14 -7
  2. package/dist/index.d.ts +51 -2
  3. package/dist/src/components/ActionBar/index.js +22 -37
  4. package/dist/src/components/Alert/index.js +27 -41
  5. package/dist/src/components/Avatar/index.js +48 -69
  6. package/dist/src/components/Badge/index.js +29 -49
  7. package/dist/src/components/Banner/index.js +42 -62
  8. package/dist/src/components/BarChart/Tooltip.js +35 -50
  9. package/dist/src/components/BarChart/index.js +13 -14
  10. package/dist/src/components/BarStack/index.js +100 -191
  11. package/dist/src/components/Breadcrumbs/index.js +29 -39
  12. package/dist/src/components/Bullet/index.js +42 -55
  13. package/dist/src/components/Button/index.js +73 -99
  14. package/dist/src/components/Card/index.js +39 -57
  15. package/dist/src/components/Carousel/index.js +32 -60
  16. package/dist/src/components/Checkbox/index.js +153 -341
  17. package/dist/src/components/CheckboxGroup/index.js +25 -27
  18. package/dist/src/components/CopyButton/index.js +11 -12
  19. package/dist/src/components/DateInput/index.js +141 -268
  20. package/dist/src/components/EmptyState/index.js +68 -83
  21. package/dist/src/components/Expandable/index.js +13 -20
  22. package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
  23. package/dist/src/components/GlobalAlert/index.js +19 -32
  24. package/dist/src/components/LineChart/CustomLegend.js +80 -89
  25. package/dist/src/components/LineChart/Tooltip.js +32 -47
  26. package/dist/src/components/LineChart/helpers.js +15 -50
  27. package/dist/src/components/LineChart/index.js +23 -33
  28. package/dist/src/components/Link/index.js +46 -65
  29. package/dist/src/components/List/Body.js +9 -15
  30. package/dist/src/components/List/Cell.js +6 -7
  31. package/dist/src/components/List/HeaderCell.js +28 -56
  32. package/dist/src/components/List/HeaderRow.js +9 -16
  33. package/dist/src/components/List/ListContext.js +5 -6
  34. package/dist/src/components/List/Row.js +44 -90
  35. package/dist/src/components/List/SelectBar.js +9 -13
  36. package/dist/src/components/List/SkeletonRows.js +5 -6
  37. package/dist/src/components/List/index.js +15 -25
  38. package/dist/src/components/Loader/index.js +18 -25
  39. package/dist/src/components/Menu/Item.js +39 -49
  40. package/dist/src/components/Menu/index.js +31 -56
  41. package/dist/src/components/MenuV2/Item.js +39 -49
  42. package/dist/src/components/MenuV2/index.js +28 -47
  43. package/dist/src/components/Meter/index.js +25 -47
  44. package/dist/src/components/Modal/Dialog.js +33 -58
  45. package/dist/src/components/Modal/Disclosure.js +8 -9
  46. package/dist/src/components/Modal/index.js +26 -33
  47. package/dist/src/components/Notice/index.js +21 -27
  48. package/dist/src/components/NumberInput/index.js +73 -137
  49. package/dist/src/components/Pagination/getPageNumbers.js +1 -4
  50. package/dist/src/components/Pagination/index.js +17 -27
  51. package/dist/src/components/PasswordCheck/index.js +26 -32
  52. package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
  53. package/dist/src/components/PieChart/Legends.js +71 -107
  54. package/dist/src/components/PieChart/Tooltip.js +33 -36
  55. package/dist/src/components/PieChart/index.js +13 -17
  56. package/dist/src/components/Popover/index.js +58 -75
  57. package/dist/src/components/Popup/helpers.js +13 -15
  58. package/dist/src/components/Popup/index.js +55 -98
  59. package/dist/src/components/ProgressBar/index.js +31 -49
  60. package/dist/src/components/Radio/index.js +58 -113
  61. package/dist/src/components/RadioGroup/index.js +26 -28
  62. package/dist/src/components/Row/index.js +25 -31
  63. package/dist/src/components/SelectInput/index.js +357 -410
  64. package/dist/src/components/SelectableCard/index.js +73 -115
  65. package/dist/src/components/Separator/index.js +52 -73
  66. package/dist/src/components/Skeleton/Block.js +23 -41
  67. package/dist/src/components/Skeleton/Blocks.js +23 -41
  68. package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
  69. package/dist/src/components/Skeleton/Donut.js +3 -6
  70. package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
  71. package/dist/src/components/Skeleton/Line.js +5 -11
  72. package/dist/src/components/Skeleton/List.js +22 -31
  73. package/dist/src/components/Skeleton/Slider.js +25 -46
  74. package/dist/src/components/Skeleton/Square.js +3 -6
  75. package/dist/src/components/Skeleton/index.js +17 -33
  76. package/dist/src/components/Snippet/index.js +82 -137
  77. package/dist/src/components/Stack/index.js +11 -14
  78. package/dist/src/components/Status/index.js +48 -78
  79. package/dist/src/components/StepList/index.js +45 -63
  80. package/dist/src/components/Stepper/index.js +74 -129
  81. package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
  82. package/dist/src/components/SwitchButton/index.js +36 -62
  83. package/dist/src/components/Table/Body.js +5 -8
  84. package/dist/src/components/Table/Cell.js +14 -20
  85. package/dist/src/components/Table/Header.js +8 -14
  86. package/dist/src/components/Table/HeaderCell.js +40 -56
  87. package/dist/src/components/Table/HeaderRow.js +4 -5
  88. package/dist/src/components/Table/Row.js +10 -14
  89. package/dist/src/components/Table/SelectBar.js +9 -13
  90. package/dist/src/components/Table/SkeletonRows.js +5 -6
  91. package/dist/src/components/Table/TableContext.js +6 -7
  92. package/dist/src/components/Table/index.js +44 -50
  93. package/dist/src/components/Tabs/Tab.js +57 -118
  94. package/dist/src/components/Tabs/TabMenu.js +32 -38
  95. package/dist/src/components/Tabs/TabMenuItem.js +9 -13
  96. package/dist/src/components/Tabs/index.js +24 -43
  97. package/dist/src/components/Tag/index.js +57 -74
  98. package/dist/src/components/TagInput/index.js +63 -94
  99. package/dist/src/components/TagList/index.js +22 -35
  100. package/dist/src/components/Text/index.js +29 -31
  101. package/dist/src/components/TextArea/index.js +240 -0
  102. package/dist/src/components/TextInput/index.js +166 -260
  103. package/dist/src/components/TimeInput/index.js +10 -13
  104. package/dist/src/components/Toaster/index.js +51 -67
  105. package/dist/src/components/Toggle/index.js +62 -129
  106. package/dist/src/components/ToggleGroup/index.js +21 -23
  107. package/dist/src/components/Tooltip/index.js +28 -31
  108. package/dist/src/components/VerificationCode/index.js +55 -90
  109. package/dist/src/index.js +1 -0
  110. package/dist/src/utils/ids.js +1 -6
  111. package/package.json +3 -3
@@ -39,14 +39,11 @@ const inputSizes = {
39
39
  };
40
40
  const StyledSeparator = /*#__PURE__*/_styled(Separator, {
41
41
  target: "el3h3g98"
42
- })("margin:1px 0px;height:calc(100% - 2px);background-color:", _ref3 => {
43
- let {
44
- theme: {
45
- colors
46
- }
47
- } = _ref3;
48
- return colors.neutral.backgroundStrong;
49
- }, ";");
42
+ })("margin:1px 0px;height:calc(100% - 2px);background-color:", ({
43
+ theme: {
44
+ colors
45
+ }
46
+ }) => colors.neutral.backgroundStrong, ";");
50
47
  var _ref2 = process.env.NODE_ENV === "production" ? {
51
48
  name: "176jwhy",
52
49
  styles: "pointer-events:auto;>button{box-shadow:none!important;}"
@@ -58,20 +55,14 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
58
55
  const StyledRightElement = /*#__PURE__*/_styled('div', {
59
56
  shouldForwardProp: prop => !['edit', 'touchable'].includes(prop),
60
57
  target: "el3h3g97"
61
- })(_ref4 => {
62
- let {
63
- theme: {
64
- colors,
65
- space
66
- }
67
- } = _ref4;
68
- return /*#__PURE__*/css("pointer-events:none;position:absolute;right:0;bottom:0;top:0;padding:0 ", space['1'], ";display:flex;gap:", space['1'], ";align-items:center;transition:transform 150ms,color 150ms;color:", colors.neutral.textWeak, ";&:hover,&:focus-within{color:", colors.neutral.textWeakHover, ";}");
69
- }, " ", _ref5 => {
70
- let {
71
- touchable
72
- } = _ref5;
73
- return touchable && _ref2;
74
- }, ";");
58
+ })(({
59
+ theme: {
60
+ colors,
61
+ space
62
+ }
63
+ }) => /*#__PURE__*/css("pointer-events:none;position:absolute;right:0;bottom:0;top:0;padding:0 ", space['1'], ";display:flex;gap:", space['1'], ";align-items:center;transition:transform 150ms,color 150ms;color:", colors.neutral.textWeak, ";&:hover,&:focus-within{color:", colors.neutral.textWeakHover, ";}"), " ", ({
64
+ touchable
65
+ }) => touchable && _ref2, ";");
75
66
  var _ref = process.env.NODE_ENV === "production" ? {
76
67
  name: "z8qxmc",
77
68
  styles: "transform:translate(-9.6%, -3px) scale(0.8)"
@@ -83,43 +74,28 @@ var _ref = process.env.NODE_ENV === "production" ? {
83
74
  const StyledLabel = /*#__PURE__*/_styled('label', {
84
75
  shouldForwardProp: prop => !['edit', 'error', 'resizable', 'fillAvailable'].includes(prop),
85
76
  target: "el3h3g96"
86
- })("display:block;position:absolute;left:0;top:0;padding-left:8px;padding-right:8px;pointer-events:none;color:", _ref6 => {
87
- let {
88
- theme: {
89
- colors
90
- }
91
- } = _ref6;
92
- return colors.neutral.textWeak;
93
- }, ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;height:48px;font-size:16px;transition:transform 150ms;transform:translate(0, 12px) scale(1);", _ref7 => {
94
- let {
95
- edit
96
- } = _ref7;
97
- return edit && _ref;
98
- }, " ", _ref8 => {
99
- let {
100
- disabled,
101
- theme: {
102
- colors
103
- }
104
- } = _ref8;
105
- return disabled && /*#__PURE__*/css("color:", colors.neutral.textDisabled, ";");
106
- }, " ", _ref9 => {
107
- let {
108
- readOnly,
109
- theme: {
110
- colors
111
- }
112
- } = _ref9;
113
- return readOnly && /*#__PURE__*/css("color:", colors.neutral.textDisabled, ";");
114
- }, " ", _ref10 => {
115
- let {
116
- error,
117
- theme: {
118
- colors
119
- }
120
- } = _ref10;
121
- return error && /*#__PURE__*/css("color:", colors.danger.text, ";");
122
- }, ";");
77
+ })("display:block;position:absolute;left:0;top:0;padding-left:8px;padding-right:8px;pointer-events:none;color:", ({
78
+ theme: {
79
+ colors
80
+ }
81
+ }) => colors.neutral.textWeak, ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;height:48px;font-size:16px;transition:transform 150ms;transform:translate(0, 12px) scale(1);", ({
82
+ edit
83
+ }) => edit && _ref, " ", ({
84
+ disabled,
85
+ theme: {
86
+ colors
87
+ }
88
+ }) => disabled && /*#__PURE__*/css("color:", colors.neutral.textDisabled, ";"), " ", ({
89
+ readOnly,
90
+ theme: {
91
+ colors
92
+ }
93
+ }) => readOnly && /*#__PURE__*/css("color:", colors.neutral.textDisabled, ";"), " ", ({
94
+ error,
95
+ theme: {
96
+ colors
97
+ }
98
+ }) => error && /*#__PURE__*/css("color:", colors.danger.text, ";"), ";");
123
99
  const StyledRelativeDiv = /*#__PURE__*/_styled("div", {
124
100
  target: "el3h3g95"
125
101
  })(process.env.NODE_ENV === "production" ? {
@@ -132,143 +108,87 @@ const StyledRelativeDiv = /*#__PURE__*/_styled("div", {
132
108
  });
133
109
  const StyledError = /*#__PURE__*/_styled("div", {
134
110
  target: "el3h3g94"
135
- })("font-size:12px;color:", _ref11 => {
136
- let {
137
- theme
138
- } = _ref11;
139
- return theme.colors.danger.text;
140
- }, ";padding-top:", _ref12 => {
141
- let {
142
- theme
143
- } = _ref12;
144
- return theme.space['0.25'];
145
- }, ";");
111
+ })("font-size:12px;color:", ({
112
+ theme
113
+ }) => theme.colors.danger.text, ";padding-top:", ({
114
+ theme
115
+ }) => theme.space['0.25'], ";");
146
116
  const StyledNotice = /*#__PURE__*/_styled(Notice, {
147
117
  target: "el3h3g93"
148
- })("margin-top:", _ref13 => {
149
- let {
150
- theme
151
- } = _ref13;
152
- return theme.space['0.5'];
153
- }, ";");
118
+ })("margin-top:", ({
119
+ theme
120
+ }) => theme.space['0.5'], ";");
154
121
  const StyledInput = /*#__PURE__*/_styled('input', {
155
122
  shouldForwardProp: prop => !['as', 'error', 'fillAvailable', 'hasLabel', 'isPlaceholderVisible', 'multiline', 'resizable', 'inputSize', 'paddingRightFactor'].includes(prop),
156
123
  target: "el3h3g92"
157
- })("transition:border-color 0.2s ease,box-shadow 0.2s ease;appearance:none;background-color:", _ref14 => {
158
- let {
159
- theme: {
160
- colors
161
- }
162
- } = _ref14;
163
- return colors.neutral.background;
164
- }, ";background-image:none;border:1px solid ", _ref15 => {
165
- let {
166
- theme: {
167
- colors
168
- }
169
- } = _ref15;
170
- return colors.neutral.border;
171
- }, ";border-radius:", _ref16 => {
172
- let {
173
- theme: {
174
- radii
175
- }
176
- } = _ref16;
177
- return radii.default;
178
- }, ";color:", _ref17 => {
179
- let {
180
- theme: {
181
- colors
182
- }
183
- } = _ref17;
184
- return colors.neutral.text;
185
- }, ";display:block;max-width:100%;outline:none;position:relative;width:100%;padding-left:", _ref18 => {
186
- let {
187
- theme
188
- } = _ref18;
189
- return theme.space['1'];
190
- }, ";padding-right:", _ref19 => {
191
- let {
192
- theme
193
- } = _ref19;
194
- return theme.space['1'];
195
- }, ";padding-top:14px;font-size:16px;line-height:24px;&::placeholder{color:", _ref20 => {
196
- let {
197
- theme: {
198
- colors
199
- }
200
- } = _ref20;
201
- return colors.neutral.textWeak;
202
- }, ";opacity:0;}&:hover,&:focus{border-color:", _ref21 => {
203
- let {
204
- theme: {
205
- colors
206
- }
207
- } = _ref21;
208
- return colors.primary.borderHover;
209
- }, ";}&:focus{box-shadow:", _ref22 => {
210
- let {
211
- theme: {
212
- shadows
213
- }
214
- } = _ref22;
215
- return shadows.focusPrimary;
216
- }, ";border-color:", _ref23 => {
217
- let {
218
- theme: {
219
- colors
220
- }
221
- } = _ref23;
222
- return colors.primary.borderHover;
223
- }, ";}", _ref24 => {
224
- let {
225
- isPlaceholderVisible
226
- } = _ref24;
227
- return isPlaceholderVisible && `&::placeholder {
124
+ })("transition:border-color 0.2s ease,box-shadow 0.2s ease;appearance:none;background-color:", ({
125
+ theme: {
126
+ colors
127
+ }
128
+ }) => colors.neutral.background, ";background-image:none;border:1px solid ", ({
129
+ theme: {
130
+ colors
131
+ }
132
+ }) => colors.neutral.border, ";border-radius:", ({
133
+ theme: {
134
+ radii
135
+ }
136
+ }) => radii.default, ";color:", ({
137
+ theme: {
138
+ colors
139
+ }
140
+ }) => colors.neutral.text, ";display:block;max-width:100%;outline:none;position:relative;width:100%;padding-left:", ({
141
+ theme
142
+ }) => theme.space['1'], ";padding-right:", ({
143
+ theme
144
+ }) => theme.space['1'], ";padding-top:14px;font-size:16px;line-height:24px;&::placeholder{color:", ({
145
+ theme: {
146
+ colors
147
+ }
148
+ }) => colors.neutral.textWeak, ";opacity:0;}&:hover,&:focus{border-color:", ({
149
+ theme: {
150
+ colors
151
+ }
152
+ }) => colors.primary.borderHover, ";}&:focus{box-shadow:", ({
153
+ theme: {
154
+ shadows
155
+ }
156
+ }) => shadows.focusPrimary, ";border-color:", ({
157
+ theme: {
158
+ colors
159
+ }
160
+ }) => colors.primary.borderHover, ";}", ({
161
+ isPlaceholderVisible
162
+ }) => isPlaceholderVisible && `&::placeholder {
228
163
  opacity: 1;
229
- }`;
230
- }, " ", _ref25 => {
231
- let {
232
- disabled,
233
- theme: {
234
- colors
235
- }
236
- } = _ref25;
237
- return disabled && `cursor: default;
164
+ }`, " ", ({
165
+ disabled,
166
+ theme: {
167
+ colors
168
+ }
169
+ }) => disabled && `cursor: default;
238
170
  pointer-events: none;
239
171
  background-color: ${colors.neutral.backgroundDisabled};
240
172
  border-color: ${colors.neutral.borderDisabled};
241
- color: ${colors.neutral.textDisabled};`;
242
- }, " ", _ref26 => {
243
- let {
244
- readOnly,
245
- theme: {
246
- colors
247
- }
248
- } = _ref26;
249
- return readOnly && `background-color: ${colors.neutral.backgroundDisabled};
173
+ color: ${colors.neutral.textDisabled};`, " ", ({
174
+ readOnly,
175
+ theme: {
176
+ colors
177
+ }
178
+ }) => readOnly && `background-color: ${colors.neutral.backgroundDisabled};
250
179
  border-color: ${colors.neutral.borderDisabled};
251
- color: ${colors.neutral.text};`;
252
- }, " ", _ref27 => {
253
- let {
254
- inputSize
255
- } = _ref27;
256
- return inputSizes[inputSize]?.default;
257
- }, " ", _ref28 => {
258
- let {
259
- inputSize,
260
- hasLabel
261
- } = _ref28;
262
- return !!inputSize && !hasLabel && inputSizes[inputSize]?.full;
263
- }, " ", _ref29 => {
264
- let {
265
- error,
266
- theme: {
267
- colors,
268
- shadows
269
- }
270
- } = _ref29;
271
- return error && `border-color: ${colors.danger.border};
180
+ color: ${colors.neutral.text};`, " ", ({
181
+ inputSize
182
+ }) => inputSizes[inputSize]?.default, " ", ({
183
+ inputSize,
184
+ hasLabel
185
+ }) => !!inputSize && !hasLabel && inputSizes[inputSize]?.full, " ", ({
186
+ error,
187
+ theme: {
188
+ colors,
189
+ shadows
190
+ }
191
+ }) => error && `border-color: ${colors.danger.border};
272
192
 
273
193
  &:hover,
274
194
  &:focus {
@@ -278,36 +198,26 @@ const StyledInput = /*#__PURE__*/_styled('input', {
278
198
  &:focus {
279
199
  box-shadow: ${shadows.focusDanger};
280
200
  border-color: ${colors.danger.borderHover};
281
- }`;
282
- }, " ", _ref30 => {
283
- let {
284
- multiline,
285
- resizable,
286
- fillAvailable
287
- } = _ref30;
288
- return multiline && `
201
+ }`, " ", ({
202
+ multiline,
203
+ resizable,
204
+ fillAvailable
205
+ }) => multiline && `
289
206
  padding-top: 20px;
290
207
  height: ${fillAvailable ? '100%' : 'initial'};
291
208
  resize: ${resizable === false ? 'none' : 'vertical'};
292
- `;
293
- }, " ", _ref31 => {
294
- let {
295
- multiline,
296
- hasLabel,
297
- theme
298
- } = _ref31;
299
- return multiline && !hasLabel && `
209
+ `, " ", ({
210
+ multiline,
211
+ hasLabel,
212
+ theme
213
+ }) => multiline && !hasLabel && `
300
214
  padding-top: ${theme.space['1']};
301
- `;
302
- }, " ", _ref32 => {
303
- let {
304
- paddingRightFactor,
305
- theme
306
- } = _ref32;
307
- return paddingRightFactor > 0 && `
215
+ `, " ", ({
216
+ paddingRightFactor,
217
+ theme
218
+ }) => paddingRightFactor > 0 && `
308
219
  padding-right: calc(${paddingRightFactor} * ${theme.space['4']});
309
- `;
310
- }, ";");
220
+ `, ";");
311
221
  const RightComponent = /*#__PURE__*/_styled(Stack, {
312
222
  target: "el3h3g91"
313
223
  })(process.env.NODE_ENV === "production" ? {
@@ -320,60 +230,56 @@ const RightComponent = /*#__PURE__*/_styled(Stack, {
320
230
  });
321
231
  const UnitLabel = /*#__PURE__*/_styled(Text, {
322
232
  target: "el3h3g90"
323
- })("padding:", _ref33 => {
324
- let {
325
- theme
326
- } = _ref33;
327
- return theme.space['1'];
328
- }, " 0;line-height:18px;");
233
+ })("padding:", ({
234
+ theme
235
+ }) => theme.space['1'], " 0;line-height:18px;");
329
236
 
330
237
  /**
331
238
  * TextInput component allows users to input text, with options for customization and validation.
332
239
  * It supports various input types and should be appropriately sized with clear labeling.
333
240
  */
334
- const TextInput = /*#__PURE__*/forwardRef((_ref34, ref) => {
335
- let {
336
- 'data-testid': dataTestId,
337
- ariaControls,
338
- autoComplete = 'on',
339
- autoFocus,
340
- className,
341
- cols,
342
- defaultValue,
343
- disabled,
344
- edit: forceEdit,
345
- error,
346
- fillAvailable,
347
- generated,
348
- height,
349
- id,
350
- label,
351
- multiline,
352
- name,
353
- notice,
354
- noTopLabel = false,
355
- onBlur,
356
- onChange,
357
- onFocus,
358
- onKeyUp,
359
- onKeyDown,
360
- placeholder,
361
- random,
362
- readOnly,
363
- required,
364
- resizable,
365
- rows,
366
- size = 'medium',
367
- tabIndex,
368
- type = 'text',
369
- unit,
370
- valid,
371
- value,
372
- wrap,
373
- inputProps,
374
- min,
375
- max
376
- } = _ref34;
241
+ const TextInput = /*#__PURE__*/forwardRef(({
242
+ 'data-testid': dataTestId,
243
+ ariaControls,
244
+ autoComplete = 'on',
245
+ autoFocus,
246
+ className,
247
+ cols,
248
+ defaultValue,
249
+ disabled,
250
+ edit: forceEdit,
251
+ error,
252
+ fillAvailable,
253
+ generated,
254
+ height,
255
+ id,
256
+ label,
257
+ multiline,
258
+ name,
259
+ notice,
260
+ noTopLabel = false,
261
+ onBlur,
262
+ onChange,
263
+ onFocus,
264
+ onKeyUp,
265
+ onKeyDown,
266
+ placeholder,
267
+ random,
268
+ readOnly,
269
+ required,
270
+ resizable,
271
+ rows,
272
+ size = 'medium',
273
+ tabIndex,
274
+ type = 'text',
275
+ unit,
276
+ valid,
277
+ value,
278
+ wrap,
279
+ inputProps,
280
+ min,
281
+ max
282
+ }, ref) => {
377
283
  const controlRef = useRef(null);
378
284
  const [visited, setVisited] = useState(false);
379
285
  const [passwordVisible, setPasswordVisible] = useState(false);
@@ -22,19 +22,16 @@ const defaultValue = {
22
22
  * `SelectInput` component.
23
23
  * @experimental This component is experimental and may be subject to breaking changes in the future.
24
24
  */
25
- const TimeInput = function (_temp) {
26
- let {
27
- value = defaultValue,
28
- schedule = 'hours',
29
- ...props
30
- } = _temp === void 0 ? {} : _temp;
31
- return jsx(SelectInput, {
32
- ...props,
33
- time: true,
34
- value: value,
35
- options: options(schedule)
36
- });
37
- };
25
+ const TimeInput = ({
26
+ value = defaultValue,
27
+ schedule = 'hours',
28
+ ...props
29
+ } = {}) => jsx(SelectInput, {
30
+ ...props,
31
+ time: true,
32
+ value: value,
33
+ options: options(schedule)
34
+ });
38
35
  TimeInput.options = options;
39
36
 
40
37
  export { TimeInput, schedules };
@@ -21,52 +21,40 @@ const styles = {
21
21
  };
22
22
  const CloseButtonWrapper = /*#__PURE__*/_styled("button", {
23
23
  target: "e1eb63991"
24
- })("background:none;border:none;cursor:pointer;color:inherit;padding:0;margin:0;margin-bottom:", _ref => {
25
- let {
26
- theme
27
- } = _ref;
28
- return theme.space['2'];
29
- }, ";");
24
+ })("background:none;border:none;cursor:pointer;color:inherit;padding:0;margin:0;margin-bottom:", ({
25
+ theme
26
+ }) => theme.space['2'], ";");
30
27
  const IconWithLeftMargin = /*#__PURE__*/_styled(Icon, {
31
28
  target: "e1eb63990"
32
- })("margin-left:", _ref2 => {
33
- let {
34
- theme
35
- } = _ref2;
36
- return theme.space['1'];
37
- }, ";");
38
- const CloseButton = _ref3 => {
39
- let {
40
- closeToast
41
- } = _ref3;
42
- return jsx(CloseButtonWrapper, {
43
- type: "button",
44
- onClick: closeToast,
45
- children: jsx(IconWithLeftMargin, {
46
- name: "close",
47
- size: 18
48
- })
49
- });
50
- };
51
- const Content = _ref4 => {
52
- let {
53
- sentiment,
54
- children
55
- } = _ref4;
56
- return jsxs(Stack, {
57
- gap: 2,
58
- direction: "row",
59
- children: [jsx(Icon, {
60
- name: TOAST_ICONS[sentiment],
61
- size: 24
62
- }), jsx(Text, {
63
- variant: "body",
64
- as: "span",
65
- sentiment: sentiment,
66
- children: children
67
- })]
68
- });
69
- };
29
+ })("margin-left:", ({
30
+ theme
31
+ }) => theme.space['1'], ";");
32
+ const CloseButton = ({
33
+ closeToast
34
+ }) => jsx(CloseButtonWrapper, {
35
+ type: "button",
36
+ onClick: closeToast,
37
+ children: jsx(IconWithLeftMargin, {
38
+ name: "close",
39
+ size: 18
40
+ })
41
+ });
42
+ const Content = ({
43
+ sentiment,
44
+ children
45
+ }) => jsxs(Stack, {
46
+ gap: 2,
47
+ direction: "row",
48
+ children: [jsx(Icon, {
49
+ name: TOAST_ICONS[sentiment],
50
+ size: 24
51
+ }), jsx(Text, {
52
+ variant: "body",
53
+ as: "span",
54
+ sentiment: sentiment,
55
+ children: children
56
+ })]
57
+ });
70
58
  const toast = {
71
59
  error: (children, options) => toast$1.error(jsx(Content, {
72
60
  sentiment: "danger",
@@ -89,34 +77,30 @@ const toast = {
89
77
  * Toaster is separated in two parts, first the `ToastContainer` which is where the div of the toast will be rendered,
90
78
  * and second the `toast()` function which is used to display the toast.
91
79
  */
92
- const ToastContainer = _ref5 => {
93
- let {
94
- newestOnTop,
95
- limit,
96
- position,
97
- 'data-testid': dataTestId
98
- } = _ref5;
80
+ const ToastContainer = ({
81
+ newestOnTop,
82
+ limit,
83
+ position,
84
+ 'data-testid': dataTestId
85
+ }) => {
99
86
  const theme = useTheme();
100
87
  return jsxs(Fragment, {
101
88
  children: [jsx(Global, {
102
89
  styles: css_248z
103
90
  }), jsx(ClassNames, {
104
- children: _ref6 => {
105
- let {
106
- css: localCss
107
- } = _ref6;
108
- return jsx(ToastContainer$1, {
109
- "data-testid": dataTestId,
110
- closeButton: jsx(CloseButton, {}),
111
- toastClassName: localCss(styles.toast(theme)),
112
- autoClose: AUTOCLOSE_DELAY,
113
- icon: false,
114
- newestOnTop: newestOnTop,
115
- limit: limit,
116
- position: position,
117
- css: /*#__PURE__*/css("top:100px;right:calc(0% + ", theme.space['2'], ");")
118
- });
119
- }
91
+ children: ({
92
+ css: localCss
93
+ }) => jsx(ToastContainer$1, {
94
+ "data-testid": dataTestId,
95
+ closeButton: jsx(CloseButton, {}),
96
+ toastClassName: localCss(styles.toast(theme)),
97
+ autoClose: AUTOCLOSE_DELAY,
98
+ icon: false,
99
+ newestOnTop: newestOnTop,
100
+ limit: limit,
101
+ position: position,
102
+ css: /*#__PURE__*/css("top:100px;right:calc(0% + ", theme.space['2'], ");")
103
+ })
120
104
  })]
121
105
  });
122
106
  };