@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
@@ -14,218 +14,95 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
14
14
  const PREFIX = '.react-datepicker';
15
15
  const StyledSeparator = /*#__PURE__*/_styled(Separator, {
16
16
  target: "e1bm75lk3"
17
- })("margin:0 ", _ref => {
18
- let {
19
- theme
20
- } = _ref;
21
- return theme.space['1'];
22
- }, ";height:100%;");
17
+ })("margin:0 ", ({
18
+ theme
19
+ }) => theme.space['1'], ";height:100%;");
23
20
  const StyledWrapper = /*#__PURE__*/_styled("div", {
24
21
  target: "e1bm75lk2"
25
- })("width:100%;div", PREFIX, "-wrapper{display:block;}div", PREFIX, "__input-container{display:block;}div", PREFIX, "__triangle{display:none;}div", PREFIX, "__month-container{padding:16px;}", PREFIX, "-popper{z-index:1000;}.calendar{font-family:", _ref2 => {
26
- let {
27
- theme
28
- } = _ref2;
29
- return theme.typography.body.fontFamily;
30
- }, ";border-color:", _ref3 => {
31
- let {
32
- theme
33
- } = _ref3;
34
- return theme.colors.neutral.borderWeak;
35
- }, ";background-color:", _ref4 => {
36
- let {
37
- theme
38
- } = _ref4;
39
- return theme.colors.neutral.backgroundWeakElevated;
40
- }, ";", PREFIX, "__header{color:", _ref5 => {
41
- let {
42
- theme
43
- } = _ref5;
44
- return theme.colors.neutral.text;
45
- }, ";background-color:", _ref6 => {
46
- let {
47
- theme
48
- } = _ref6;
49
- return theme.colors.neutral.backgroundWeakElevated;
50
- }, ";border-bottom:none;text-align:inherit;display:block;padding-top:0;position:inherit;}", PREFIX, "__triangle{border-bottom-color:", _ref7 => {
51
- let {
52
- theme
53
- } = _ref7;
54
- return theme.colors.neutral.backgroundWeak;
55
- }, ";}", PREFIX, "__month{margin:0;}", PREFIX, "__day-names{margin-top:8px;}", PREFIX, "__day-name{font-family:", _ref8 => {
56
- let {
57
- theme
58
- } = _ref8;
59
- return theme.typography.bodySmallStrong.fontFamily;
60
- }, ";color:", _ref9 => {
61
- let {
62
- theme
63
- } = _ref9;
64
- return theme.colors.neutral.text;
65
- }, ";font-weight:", _ref10 => {
66
- let {
67
- theme
68
- } = _ref10;
69
- return theme.typography.bodySmallStrong.weight;
70
- }, ";font-size:", _ref11 => {
71
- let {
72
- theme
73
- } = _ref11;
74
- return theme.typography.bodySmallStrong.fontSize;
75
- }, ";line-height:", _ref12 => {
76
- let {
77
- theme
78
- } = _ref12;
79
- return theme.typography.bodySmallStrong.lineHeight;
80
- }, ";text-align:center;margin:3px;text-transform:capitalize;}", PREFIX, "__day{color:", _ref13 => {
81
- let {
82
- theme
83
- } = _ref13;
84
- return theme.colors.neutral.textWeak;
85
- }, ";font-size:", _ref14 => {
86
- let {
87
- theme
88
- } = _ref14;
89
- return theme.typography.body.fontSize;
90
- }, ";width:1.7rem;height:1.7rem;margin-left:3px;margin-right:3px;}", PREFIX, "__day--selected{color:", _ref15 => {
91
- let {
92
- theme
93
- } = _ref15;
94
- return theme.colors.primary.textStrong;
95
- }, ";background-color:", _ref16 => {
96
- let {
97
- theme
98
- } = _ref16;
99
- return theme.colors.primary.backgroundStrong;
100
- }, ";&[aria-disabled='true'],&:disabled{color:", _ref17 => {
101
- let {
102
- theme
103
- } = _ref17;
104
- return theme.colors.primary.textStrongDisabled;
105
- }, ";background-color:", _ref18 => {
106
- let {
107
- theme
108
- } = _ref18;
109
- return theme.colors.primary.backgroundStrongDisabled;
110
- }, ";}}", PREFIX, "__day--in-selecting-range{color:", _ref19 => {
111
- let {
112
- theme
113
- } = _ref19;
114
- return theme.colors.primary.text;
115
- }, ";background-color:", _ref20 => {
116
- let {
117
- theme
118
- } = _ref20;
119
- return theme.colors.primary.background;
120
- }, ";&[aria-disabled='true'],&:disabled{color:", _ref21 => {
121
- let {
122
- theme
123
- } = _ref21;
124
- return theme.colors.primary.textDisabled;
125
- }, ";background-color:", _ref22 => {
126
- let {
127
- theme
128
- } = _ref22;
129
- return theme.colors.primary.backgroundDisabled;
130
- }, ";}}", PREFIX, "__day--in-range{color:", _ref23 => {
131
- let {
132
- theme
133
- } = _ref23;
134
- return theme.colors.primary.text;
135
- }, ";background-color:", _ref24 => {
136
- let {
137
- theme
138
- } = _ref24;
139
- return theme.colors.primary.background;
140
- }, ";&[aria-disabled='true'],&:disabled{color:", _ref25 => {
141
- let {
142
- theme
143
- } = _ref25;
144
- return theme.colors.primary.textDisabled;
145
- }, ";background-color:", _ref26 => {
146
- let {
147
- theme
148
- } = _ref26;
149
- return theme.colors.primary.backgroundDisabled;
150
- }, ";}}", PREFIX, "__day--range-start{color:", _ref27 => {
151
- let {
152
- theme
153
- } = _ref27;
154
- return theme.colors.primary.textStrong;
155
- }, ";background-color:", _ref28 => {
156
- let {
157
- theme
158
- } = _ref28;
159
- return theme.colors.primary.backgroundStrong;
160
- }, ";&[aria-disabled='true'],&:disabled{color:", _ref29 => {
161
- let {
162
- theme
163
- } = _ref29;
164
- return theme.colors.primary.textStrongDisabled;
165
- }, ";background-color:", _ref30 => {
166
- let {
167
- theme
168
- } = _ref30;
169
- return theme.colors.primary.backgroundStrongDisabled;
170
- }, ";}}", PREFIX, "__day--range-end{color:", _ref31 => {
171
- let {
172
- theme
173
- } = _ref31;
174
- return theme.colors.primary.textStrong;
175
- }, ";background-color:", _ref32 => {
176
- let {
177
- theme
178
- } = _ref32;
179
- return theme.colors.primary.backgroundStrong;
180
- }, ";&[aria-disabled='true'],&:disabled{color:", _ref33 => {
181
- let {
182
- theme
183
- } = _ref33;
184
- return theme.colors.primary.textStrongDisabled;
185
- }, ";background-color:", _ref34 => {
186
- let {
187
- theme
188
- } = _ref34;
189
- return theme.colors.primary.backgroundStrongDisabled;
190
- }, ";}}", PREFIX, "__day--keyboard-selected{color:", _ref35 => {
191
- let {
192
- theme
193
- } = _ref35;
194
- return theme.colors.primary.textStrong;
195
- }, ";background-color:", _ref36 => {
196
- let {
197
- theme
198
- } = _ref36;
199
- return theme.colors.primary.backgroundStrong;
200
- }, ";}", PREFIX, "__day:hover{color:", _ref37 => {
201
- let {
202
- theme
203
- } = _ref37;
204
- return theme.colors.neutral.textHover;
205
- }, ";background-color:", _ref38 => {
206
- let {
207
- theme
208
- } = _ref38;
209
- return theme.colors.neutral.backgroundHover;
210
- }, ";}", PREFIX, "__day--disabled{color:", _ref39 => {
211
- let {
212
- theme
213
- } = _ref39;
214
- return theme.colors.neutral.textDisabled;
215
- }, ";}", PREFIX, "__day--disabled:hover{color:", _ref40 => {
216
- let {
217
- theme
218
- } = _ref40;
219
- return theme.colors.neutral.textDisabled;
220
- }, ";background-color:transparent;}}");
22
+ })("width:100%;div", PREFIX, "-wrapper{display:block;}div", PREFIX, "__input-container{display:block;}div", PREFIX, "__triangle{display:none;}div", PREFIX, "__month-container{padding:16px;}", PREFIX, "-popper{z-index:1000;}.calendar{font-family:", ({
23
+ theme
24
+ }) => theme.typography.body.fontFamily, ";border-color:", ({
25
+ theme
26
+ }) => theme.colors.neutral.borderWeak, ";background-color:", ({
27
+ theme
28
+ }) => theme.colors.neutral.backgroundWeakElevated, ";", PREFIX, "__header{color:", ({
29
+ theme
30
+ }) => theme.colors.neutral.text, ";background-color:", ({
31
+ theme
32
+ }) => theme.colors.neutral.backgroundWeakElevated, ";border-bottom:none;text-align:inherit;display:block;padding-top:0;position:inherit;}", PREFIX, "__triangle{border-bottom-color:", ({
33
+ theme
34
+ }) => theme.colors.neutral.backgroundWeak, ";}", PREFIX, "__month{margin:0;}", PREFIX, "__day-names{margin-top:8px;}", PREFIX, "__day-name{font-family:", ({
35
+ theme
36
+ }) => theme.typography.bodySmallStrong.fontFamily, ";color:", ({
37
+ theme
38
+ }) => theme.colors.neutral.text, ";font-weight:", ({
39
+ theme
40
+ }) => theme.typography.bodySmallStrong.weight, ";font-size:", ({
41
+ theme
42
+ }) => theme.typography.bodySmallStrong.fontSize, ";line-height:", ({
43
+ theme
44
+ }) => theme.typography.bodySmallStrong.lineHeight, ";text-align:center;margin:3px;text-transform:capitalize;}", PREFIX, "__day{color:", ({
45
+ theme
46
+ }) => theme.colors.neutral.textWeak, ";font-size:", ({
47
+ theme
48
+ }) => theme.typography.body.fontSize, ";width:1.7rem;height:1.7rem;margin-left:3px;margin-right:3px;}", PREFIX, "__day--selected{color:", ({
49
+ theme
50
+ }) => theme.colors.primary.textStrong, ";background-color:", ({
51
+ theme
52
+ }) => theme.colors.primary.backgroundStrong, ";&[aria-disabled='true'],&:disabled{color:", ({
53
+ theme
54
+ }) => theme.colors.primary.textStrongDisabled, ";background-color:", ({
55
+ theme
56
+ }) => theme.colors.primary.backgroundStrongDisabled, ";}}", PREFIX, "__day--in-selecting-range{color:", ({
57
+ theme
58
+ }) => theme.colors.primary.text, ";background-color:", ({
59
+ theme
60
+ }) => theme.colors.primary.background, ";&[aria-disabled='true'],&:disabled{color:", ({
61
+ theme
62
+ }) => theme.colors.primary.textDisabled, ";background-color:", ({
63
+ theme
64
+ }) => theme.colors.primary.backgroundDisabled, ";}}", PREFIX, "__day--in-range{color:", ({
65
+ theme
66
+ }) => theme.colors.primary.text, ";background-color:", ({
67
+ theme
68
+ }) => theme.colors.primary.background, ";&[aria-disabled='true'],&:disabled{color:", ({
69
+ theme
70
+ }) => theme.colors.primary.textDisabled, ";background-color:", ({
71
+ theme
72
+ }) => theme.colors.primary.backgroundDisabled, ";}}", PREFIX, "__day--range-start{color:", ({
73
+ theme
74
+ }) => theme.colors.primary.textStrong, ";background-color:", ({
75
+ theme
76
+ }) => theme.colors.primary.backgroundStrong, ";&[aria-disabled='true'],&:disabled{color:", ({
77
+ theme
78
+ }) => theme.colors.primary.textStrongDisabled, ";background-color:", ({
79
+ theme
80
+ }) => theme.colors.primary.backgroundStrongDisabled, ";}}", PREFIX, "__day--range-end{color:", ({
81
+ theme
82
+ }) => theme.colors.primary.textStrong, ";background-color:", ({
83
+ theme
84
+ }) => theme.colors.primary.backgroundStrong, ";&[aria-disabled='true'],&:disabled{color:", ({
85
+ theme
86
+ }) => theme.colors.primary.textStrongDisabled, ";background-color:", ({
87
+ theme
88
+ }) => theme.colors.primary.backgroundStrongDisabled, ";}}", PREFIX, "__day--keyboard-selected{color:", ({
89
+ theme
90
+ }) => theme.colors.primary.textStrong, ";background-color:", ({
91
+ theme
92
+ }) => theme.colors.primary.backgroundStrong, ";}", PREFIX, "__day:hover{color:", ({
93
+ theme
94
+ }) => theme.colors.neutral.textHover, ";background-color:", ({
95
+ theme
96
+ }) => theme.colors.neutral.backgroundHover, ";}", PREFIX, "__day--disabled{color:", ({
97
+ theme
98
+ }) => theme.colors.neutral.textDisabled, ";}", PREFIX, "__day--disabled:hover{color:", ({
99
+ theme
100
+ }) => theme.colors.neutral.textDisabled, ";background-color:transparent;}}");
221
101
  const StyledIconContainer = /*#__PURE__*/_styled("div", {
222
102
  target: "e1bm75lk1"
223
- })("padding:", _ref41 => {
224
- let {
225
- theme
226
- } = _ref41;
227
- return theme.space['1'];
228
- }, ";position:absolute;display:flex;align-items:center;right:0;top:0;height:48px;");
103
+ })("padding:", ({
104
+ theme
105
+ }) => theme.space['1'], ";position:absolute;display:flex;align-items:center;right:0;top:0;height:48px;");
229
106
  const StyledText = /*#__PURE__*/_styled(Text, {
230
107
  target: "e1bm75lk0"
231
108
  })(process.env.NODE_ENV === "production" ? {
@@ -242,29 +119,28 @@ const DEFAULT_FORMAT = value => value instanceof Date ? value.toISOString() : va
242
119
  * DateInput is a wrapper around react-datepicker that provides a consistent look and feel with the rest of the Ultraviolet UI.
243
120
  * See https://reactdatepicker.com/ for more information.
244
121
  */
245
- const DateInput = _ref42 => {
246
- let {
247
- autoFocus = false,
248
- disabled = false,
249
- error,
250
- format = DEFAULT_FORMAT,
251
- label,
252
- locale,
253
- maxDate,
254
- minDate,
255
- startDate,
256
- endDate,
257
- name,
258
- onBlur,
259
- onChange,
260
- onFocus,
261
- required = false,
262
- excludeDates,
263
- value,
264
- selectsRange,
265
- className,
266
- 'data-testid': dataTestId
267
- } = _ref42;
122
+ const DateInput = ({
123
+ autoFocus = false,
124
+ disabled = false,
125
+ error,
126
+ format = DEFAULT_FORMAT,
127
+ label,
128
+ locale,
129
+ maxDate,
130
+ minDate,
131
+ startDate,
132
+ endDate,
133
+ name,
134
+ onBlur,
135
+ onChange,
136
+ onFocus,
137
+ required = false,
138
+ excludeDates,
139
+ value,
140
+ selectsRange,
141
+ className,
142
+ 'data-testid': dataTestId
143
+ }) => {
268
144
  // Linked to: https://github.com/Hacker0x01/react-datepicker/issues/3834
269
145
  const ReactDatePicker = DatePicker.default ?? DatePicker;
270
146
  const localeCode = (typeof locale === 'string' ? locale : locale?.code) ?? 'en-GB';
@@ -318,43 +194,40 @@ const DateInput = _ref42 => {
318
194
  maxDate: maxDate,
319
195
  startDate: startDate,
320
196
  endDate: endDate,
321
- renderCustomHeader: _ref43 => {
322
- let {
323
- date,
324
- decreaseMonth,
325
- increaseMonth,
326
- prevMonthButtonDisabled,
327
- nextMonthButtonDisabled
328
- } = _ref43;
329
- return jsxs(Stack, {
330
- direction: "row",
331
- alignItems: "center",
332
- justifyContent: "space-between",
333
- gap: 3,
334
- children: [jsx(Button, {
335
- size: "small",
336
- icon: "arrow-left",
337
- sentiment: "neutral",
338
- variant: "ghost",
339
- onClick: decreaseMonth,
340
- disabled: prevMonthButtonDisabled
341
- }), jsx(StyledText, {
342
- variant: "bodyStrong",
343
- as: "p",
344
- children: new Date(date).toLocaleString(localeCode, {
345
- month: 'long',
346
- year: 'numeric'
347
- })
348
- }), jsx(Button, {
349
- size: "small",
350
- icon: "arrow-right",
351
- sentiment: "neutral",
352
- variant: "ghost",
353
- onClick: increaseMonth,
354
- disabled: nextMonthButtonDisabled
355
- })]
356
- });
357
- }
197
+ renderCustomHeader: ({
198
+ date,
199
+ decreaseMonth,
200
+ increaseMonth,
201
+ prevMonthButtonDisabled,
202
+ nextMonthButtonDisabled
203
+ }) => jsxs(Stack, {
204
+ direction: "row",
205
+ alignItems: "center",
206
+ justifyContent: "space-between",
207
+ gap: 3,
208
+ children: [jsx(Button, {
209
+ size: "small",
210
+ icon: "arrow-left",
211
+ sentiment: "neutral",
212
+ variant: "ghost",
213
+ onClick: decreaseMonth,
214
+ disabled: prevMonthButtonDisabled
215
+ }), jsx(StyledText, {
216
+ variant: "bodyStrong",
217
+ as: "p",
218
+ children: new Date(date).toLocaleString(localeCode, {
219
+ month: 'long',
220
+ year: 'numeric'
221
+ })
222
+ }), jsx(Button, {
223
+ size: "small",
224
+ icon: "arrow-right",
225
+ sentiment: "neutral",
226
+ variant: "ghost",
227
+ onClick: increaseMonth,
228
+ disabled: nextMonthButtonDisabled
229
+ })]
230
+ })
358
231
  })
359
232
  })]
360
233
  });
@@ -28,100 +28,85 @@ const CenteredText = /*#__PURE__*/_styled(Text, {
28
28
  const Container = /*#__PURE__*/_styled(Stack, {
29
29
  shouldForwardProp: prop => !['size', 'bordered'].includes(prop),
30
30
  target: "e1m66ceh1"
31
- })("max-width:", _ref => {
32
- let {
33
- size
34
- } = _ref;
35
- return CONTAINER_SIZES[size];
36
- }, "px;margin:0 auto;", _ref2 => {
37
- let {
38
- size
39
- } = _ref2;
40
- return size === 'large' ? 'padding: 0 140px' : null;
41
- }, ";", _ref3 => {
42
- let {
43
- theme,
44
- bordered
45
- } = _ref3;
46
- return bordered ? `
31
+ })("max-width:", ({
32
+ size
33
+ }) => CONTAINER_SIZES[size], "px;margin:0 auto;", ({
34
+ size
35
+ }) => size === 'large' ? 'padding: 0 140px' : null, ";", ({
36
+ theme,
37
+ bordered
38
+ }) => bordered ? `
47
39
  border: 1px solid ${theme.colors.neutral.border};
48
40
  border-radius: ${theme.radii.default};
49
- ` : null;
50
- }, ";");
41
+ ` : null, ";");
51
42
  const StyledStack = /*#__PURE__*/_styled(Stack, {
52
43
  target: "e1m66ceh0"
53
- })("padding:", _ref4 => {
54
- let {
55
- theme
56
- } = _ref4;
57
- return theme.space['5'];
58
- }, ";");
44
+ })("padding:", ({
45
+ theme
46
+ }) => theme.space['5'], ";");
59
47
  /**
60
48
  * EmptyState component is used to display a message when there is no data to show.
61
49
  */
62
- const EmptyState = _ref5 => {
63
- let {
64
- image,
65
- title,
66
- size = 'large',
67
- description,
68
- primaryButton,
69
- secondaryButton,
70
- learnMore,
71
- className,
72
- bordered,
73
- children,
74
- 'data-testid': dataTestId
75
- } = _ref5;
76
- return jsx(Container, {
77
- size: size,
78
- bordered: bordered,
79
- className: className,
80
- "data-testid": dataTestId,
81
- children: jsxs(StyledStack, {
82
- gap: 3,
50
+ const EmptyState = ({
51
+ image,
52
+ title,
53
+ size = 'large',
54
+ description,
55
+ primaryButton,
56
+ secondaryButton,
57
+ learnMore,
58
+ className,
59
+ bordered,
60
+ children,
61
+ 'data-testid': dataTestId
62
+ }) => jsx(Container, {
63
+ size: size,
64
+ bordered: bordered,
65
+ className: className,
66
+ "data-testid": dataTestId,
67
+ children: jsxs(StyledStack, {
68
+ gap: 3,
69
+ justifyContent: "center",
70
+ alignItems: "center",
71
+ children: [jsxs(Stack, {
72
+ gap: 2,
83
73
  justifyContent: "center",
84
74
  alignItems: "center",
85
- children: [jsxs(Stack, {
86
- gap: 2,
87
- justifyContent: "center",
75
+ children: [image && typeof image === 'string' ? jsx("img", {
76
+ width: IMAGE_SIZES[size],
77
+ alt: "",
78
+ src: image
79
+ }) : image, jsxs(Stack, {
80
+ gap: 0.5,
88
81
  alignItems: "center",
89
- children: [image && typeof image === 'string' ? jsx("img", {
90
- width: IMAGE_SIZES[size],
91
- alt: "",
92
- src: image
93
- }) : image, jsxs(Stack, {
94
- gap: 0.5,
95
- alignItems: "center",
96
- children: [title ? jsx(CenteredText, {
97
- as: "h2",
98
- variant: "headingSmall",
99
- prominence: "strong",
100
- children: title
101
- }) : null, jsx(CenteredText, {
102
- as: "p",
103
- variant: "body",
104
- children: description
105
- })]
82
+ children: [title ? jsx(CenteredText, {
83
+ as: "h2",
84
+ variant: "headingSmall",
85
+ prominence: "strong",
86
+ children: title
87
+ }) : null, jsx(CenteredText, {
88
+ as: "p",
89
+ variant: "body",
90
+ children: description
106
91
  })]
107
- }), jsxs(Stack, {
92
+ })]
93
+ }), jsxs(Stack, {
94
+ gap: 2,
95
+ justifyContent: "center",
96
+ alignItems: "center",
97
+ children: [jsxs(Stack, {
98
+ direction: "row",
108
99
  gap: 2,
109
- justifyContent: "center",
110
- alignItems: "center",
111
- children: [jsxs(Stack, {
112
- direction: "row",
113
- gap: 2,
114
- children: [secondaryButton, primaryButton]
115
- }), learnMore?.text ? jsx(Link, {
116
- href: learnMore.link,
117
- target: learnMore.target,
118
- sentiment: "info",
119
- iconPosition: "right",
120
- children: learnMore.text
121
- }) : null]
122
- }), children]
123
- })
124
- });
125
- };
100
+ children: [secondaryButton, primaryButton]
101
+ }), learnMore?.text ? jsx(Link, {
102
+ href: learnMore.link,
103
+ target: learnMore.target,
104
+ sentiment: "info",
105
+ iconPosition: "right",
106
+ children: learnMore.text
107
+ }) : null]
108
+ }), children]
109
+ })
110
+ });
126
111
 
127
112
  export { EmptyState };
@@ -7,32 +7,25 @@ const ANIMATION_DURATION = 300; // in ms
7
7
  const StyledExpandable = /*#__PURE__*/_styled('div', {
8
8
  shouldForwardProp: prop => !['opened', 'minHeight'].includes(prop),
9
9
  target: "e5hc7t70"
10
- })("transition:max-height ", ANIMATION_DURATION, "ms ease-out,opacity ", ANIMATION_DURATION, "ms ease-out;overflow:", _ref => {
11
- let {
12
- opened
13
- } = _ref;
14
- return opened ? 'visible' : 'hidden';
15
- }, ";height:auto;max-height:", _ref2 => {
16
- let {
17
- opened,
18
- minHeight
19
- } = _ref2;
20
- return opened ? 'initial' : `${minHeight}px`;
21
- }, ";");
10
+ })("transition:max-height ", ANIMATION_DURATION, "ms ease-out,opacity ", ANIMATION_DURATION, "ms ease-out;overflow:", ({
11
+ opened
12
+ }) => opened ? 'visible' : 'hidden', ";height:auto;max-height:", ({
13
+ opened,
14
+ minHeight
15
+ }) => opened ? 'initial' : `${minHeight}px`, ";");
22
16
 
23
17
  /**
24
18
  * The Expandable component is a dynamic React component that allows for the expansion of its children content
25
19
  * based on its height. The component comes with a sleek and smooth animation, providing a visually pleasing
26
20
  * user experience.
27
21
  */
28
- const Expandable = _ref3 => {
29
- let {
30
- children,
31
- opened,
32
- minHeight = 0,
33
- className,
34
- 'data-testid': dataTestId
35
- } = _ref3;
22
+ const Expandable = ({
23
+ children,
24
+ opened,
25
+ minHeight = 0,
26
+ className,
27
+ 'data-testid': dataTestId
28
+ }) => {
36
29
  const [height, setHeight] = useState(null);
37
30
  const transitionTimer = useRef();
38
31
  const ref = useRef(null);