@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.
- package/README.md +14 -7
- package/dist/index.d.ts +51 -2
- package/dist/src/components/ActionBar/index.js +22 -37
- package/dist/src/components/Alert/index.js +27 -41
- package/dist/src/components/Avatar/index.js +48 -69
- package/dist/src/components/Badge/index.js +29 -49
- package/dist/src/components/Banner/index.js +42 -62
- package/dist/src/components/BarChart/Tooltip.js +35 -50
- package/dist/src/components/BarChart/index.js +13 -14
- package/dist/src/components/BarStack/index.js +100 -191
- package/dist/src/components/Breadcrumbs/index.js +29 -39
- package/dist/src/components/Bullet/index.js +42 -55
- package/dist/src/components/Button/index.js +73 -99
- package/dist/src/components/Card/index.js +39 -57
- package/dist/src/components/Carousel/index.js +32 -60
- package/dist/src/components/Checkbox/index.js +153 -341
- package/dist/src/components/CheckboxGroup/index.js +25 -27
- package/dist/src/components/CopyButton/index.js +11 -12
- package/dist/src/components/DateInput/index.js +141 -268
- package/dist/src/components/EmptyState/index.js +68 -83
- package/dist/src/components/Expandable/index.js +13 -20
- package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
- package/dist/src/components/GlobalAlert/index.js +19 -32
- package/dist/src/components/LineChart/CustomLegend.js +80 -89
- package/dist/src/components/LineChart/Tooltip.js +32 -47
- package/dist/src/components/LineChart/helpers.js +15 -50
- package/dist/src/components/LineChart/index.js +23 -33
- package/dist/src/components/Link/index.js +46 -65
- package/dist/src/components/List/Body.js +9 -15
- package/dist/src/components/List/Cell.js +6 -7
- package/dist/src/components/List/HeaderCell.js +28 -56
- package/dist/src/components/List/HeaderRow.js +9 -16
- package/dist/src/components/List/ListContext.js +5 -6
- package/dist/src/components/List/Row.js +44 -90
- package/dist/src/components/List/SelectBar.js +9 -13
- package/dist/src/components/List/SkeletonRows.js +5 -6
- package/dist/src/components/List/index.js +15 -25
- package/dist/src/components/Loader/index.js +18 -25
- package/dist/src/components/Menu/Item.js +39 -49
- package/dist/src/components/Menu/index.js +31 -56
- package/dist/src/components/MenuV2/Item.js +39 -49
- package/dist/src/components/MenuV2/index.js +28 -47
- package/dist/src/components/Meter/index.js +25 -47
- package/dist/src/components/Modal/Dialog.js +33 -58
- package/dist/src/components/Modal/Disclosure.js +8 -9
- package/dist/src/components/Modal/index.js +26 -33
- package/dist/src/components/Notice/index.js +21 -27
- package/dist/src/components/NumberInput/index.js +73 -137
- package/dist/src/components/Pagination/getPageNumbers.js +1 -4
- package/dist/src/components/Pagination/index.js +17 -27
- package/dist/src/components/PasswordCheck/index.js +26 -32
- package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
- package/dist/src/components/PieChart/Legends.js +71 -107
- package/dist/src/components/PieChart/Tooltip.js +33 -36
- package/dist/src/components/PieChart/index.js +13 -17
- package/dist/src/components/Popover/index.js +58 -75
- package/dist/src/components/Popup/helpers.js +13 -15
- package/dist/src/components/Popup/index.js +55 -98
- package/dist/src/components/ProgressBar/index.js +31 -49
- package/dist/src/components/Radio/index.js +58 -113
- package/dist/src/components/RadioGroup/index.js +26 -28
- package/dist/src/components/Row/index.js +25 -31
- package/dist/src/components/SelectInput/index.js +357 -410
- package/dist/src/components/SelectableCard/index.js +73 -115
- package/dist/src/components/Separator/index.js +52 -73
- package/dist/src/components/Skeleton/Block.js +23 -41
- package/dist/src/components/Skeleton/Blocks.js +23 -41
- package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
- package/dist/src/components/Skeleton/Donut.js +3 -6
- package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
- package/dist/src/components/Skeleton/Line.js +5 -11
- package/dist/src/components/Skeleton/List.js +22 -31
- package/dist/src/components/Skeleton/Slider.js +25 -46
- package/dist/src/components/Skeleton/Square.js +3 -6
- package/dist/src/components/Skeleton/index.js +17 -33
- package/dist/src/components/Snippet/index.js +82 -137
- package/dist/src/components/Stack/index.js +11 -14
- package/dist/src/components/Status/index.js +48 -78
- package/dist/src/components/StepList/index.js +45 -63
- package/dist/src/components/Stepper/index.js +74 -129
- package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
- package/dist/src/components/SwitchButton/index.js +36 -62
- package/dist/src/components/Table/Body.js +5 -8
- package/dist/src/components/Table/Cell.js +14 -20
- package/dist/src/components/Table/Header.js +8 -14
- package/dist/src/components/Table/HeaderCell.js +40 -56
- package/dist/src/components/Table/HeaderRow.js +4 -5
- package/dist/src/components/Table/Row.js +10 -14
- package/dist/src/components/Table/SelectBar.js +9 -13
- package/dist/src/components/Table/SkeletonRows.js +5 -6
- package/dist/src/components/Table/TableContext.js +6 -7
- package/dist/src/components/Table/index.js +44 -50
- package/dist/src/components/Tabs/Tab.js +57 -118
- package/dist/src/components/Tabs/TabMenu.js +32 -38
- package/dist/src/components/Tabs/TabMenuItem.js +9 -13
- package/dist/src/components/Tabs/index.js +24 -43
- package/dist/src/components/Tag/index.js +57 -74
- package/dist/src/components/TagInput/index.js +63 -94
- package/dist/src/components/TagList/index.js +22 -35
- package/dist/src/components/Text/index.js +29 -31
- package/dist/src/components/TextArea/index.js +240 -0
- package/dist/src/components/TextInput/index.js +166 -260
- package/dist/src/components/TimeInput/index.js +10 -13
- package/dist/src/components/Toaster/index.js +51 -67
- package/dist/src/components/Toggle/index.js +62 -129
- package/dist/src/components/ToggleGroup/index.js +21 -23
- package/dist/src/components/Tooltip/index.js +28 -31
- package/dist/src/components/VerificationCode/index.js +55 -90
- package/dist/src/index.js +1 -0
- package/dist/src/utils/ids.js +1 -6
- 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 ",
|
|
18
|
-
|
|
19
|
-
|
|
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:",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, ";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, ";
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, ";
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, ";
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, ";
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, ";
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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:",
|
|
224
|
-
|
|
225
|
-
|
|
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 =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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:",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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:",
|
|
54
|
-
|
|
55
|
-
|
|
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 =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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: [
|
|
86
|
-
|
|
87
|
-
|
|
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: [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
})
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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:",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
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 =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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);
|