@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
|
@@ -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:",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
})(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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:",
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
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:",
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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:",
|
|
149
|
-
|
|
150
|
-
|
|
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:",
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}, ";
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
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
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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:",
|
|
324
|
-
|
|
325
|
-
|
|
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((
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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 =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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:",
|
|
25
|
-
|
|
26
|
-
|
|
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:",
|
|
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
|
-
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 =
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
};
|