@ultraviolet/ui 1.11.2 → 1.14.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 +1 -1
- package/dist/index.d.ts +208 -6
- package/dist/react-datepicker/dist/react-datepicker.min.css.js +1 -1
- package/dist/src/components/ActionBar/index.js +7 -0
- package/dist/src/components/Alert/index.js +3 -0
- package/dist/src/components/Avatar/index.js +4 -0
- package/dist/src/components/Badge/index.js +5 -5
- package/dist/src/components/Banner/index.js +3 -0
- package/dist/src/components/BarChart/index.js +2 -0
- package/dist/src/components/BarStack/index.js +4 -0
- package/dist/src/components/Breadcrumbs/index.js +3 -0
- package/dist/src/components/Bullet/index.js +3 -0
- package/dist/src/components/Button/index.js +8 -1
- package/dist/src/components/Card/index.js +4 -0
- package/dist/src/components/Carousel/index.js +3 -0
- package/dist/src/components/Checkbox/index.js +140 -102
- package/dist/src/components/CheckboxGroup/index.js +3 -0
- package/dist/src/components/CopyButton/index.js +3 -0
- package/dist/src/components/DateInput/index.js +5 -0
- package/dist/src/components/EmptyState/index.js +3 -0
- package/dist/src/components/Expandable/index.js +6 -0
- package/dist/src/components/LineChart/index.js +2 -0
- package/dist/src/components/Link/index.js +4 -0
- package/dist/src/components/List/index.js +4 -0
- package/dist/src/components/Loader/index.js +4 -0
- package/dist/src/components/Menu/index.js +7 -0
- package/dist/src/components/Meter/{Meter.js → index.js} +6 -3
- package/dist/src/components/Modal/Dialog.js +4 -2
- package/dist/src/components/Modal/{Modal.js → index.js} +6 -1
- package/dist/src/components/Notice/index.js +3 -0
- package/dist/src/components/NumberInput/index.js +4 -0
- package/dist/src/components/Pagination/index.js +2 -1
- package/dist/src/components/PasswordCheck/index.js +5 -0
- package/dist/src/components/PasswordStrengthMeter/index.js +1 -0
- package/dist/src/components/PieChart/index.js +2 -0
- package/dist/src/components/Popover/index.js +4 -0
- package/dist/src/components/ProgressBar/index.js +3 -0
- package/dist/src/components/Radio/index.js +44 -36
- package/dist/src/components/RadioGroup/index.js +3 -0
- package/dist/src/components/Row/index.js +4 -0
- package/dist/src/components/SelectInput/index.js +4 -0
- package/dist/src/components/SelectableCard/index.js +4 -0
- package/dist/src/components/Separator/index.js +3 -0
- package/dist/src/components/Skeleton/index.js +5 -0
- package/dist/src/components/Snippet/index.js +4 -0
- package/dist/src/components/Stack/index.js +9 -1
- package/dist/src/components/Status/index.js +3 -0
- package/dist/src/components/StepList/index.js +1 -0
- package/dist/src/components/Stepper/index.js +3 -0
- package/dist/src/components/SwitchButton/index.js +3 -0
- package/dist/src/components/Table/index.js +4 -0
- package/dist/src/components/Tabs/index.js +4 -0
- package/dist/src/components/Tag/index.js +5 -0
- package/dist/src/components/TagInput/index.js +1 -0
- package/dist/src/components/TagList/index.js +4 -0
- package/dist/src/components/Text/index.js +4 -0
- package/dist/src/components/TextInput/index.js +5 -0
- package/dist/src/components/TimeInput/index.js +2 -0
- package/dist/src/components/Toaster/index.js +8 -0
- package/dist/src/components/Toggle/index.js +3 -0
- package/dist/src/components/ToggleGroup/index.js +3 -0
- package/dist/src/components/Tooltip/index.js +4 -0
- package/dist/src/components/VerificationCode/index.js +4 -0
- package/dist/src/index.js +2 -2
- package/dist/src/internalComponents/Popup/index.js +47 -7
- package/package.json +4 -4
|
@@ -6,7 +6,8 @@ import { Loader } from '../Loader/index.js';
|
|
|
6
6
|
import { Row } from '../Row/index.js';
|
|
7
7
|
import { Stack } from '../Stack/index.js';
|
|
8
8
|
import { Text } from '../Text/index.js';
|
|
9
|
-
import {
|
|
9
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
10
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
10
11
|
|
|
11
12
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
12
13
|
const ErrorText = /*#__PURE__*/_styled(Text, {
|
|
@@ -107,7 +108,7 @@ const CheckboxInput = /*#__PURE__*/_styled('input', {
|
|
|
107
108
|
let {
|
|
108
109
|
theme
|
|
109
110
|
} = _ref14;
|
|
110
|
-
return theme.colors.primary.
|
|
111
|
+
return theme.colors.primary.borderStrong;
|
|
111
112
|
}, ";}}&[aria-invalid='true']+", StyledIcon, ",&[aria-invalid='mixed']+", StyledIcon, "{fill:", _ref15 => {
|
|
112
113
|
let {
|
|
113
114
|
theme
|
|
@@ -190,7 +191,7 @@ const CheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
|
190
191
|
let {
|
|
191
192
|
theme
|
|
192
193
|
} = _ref30;
|
|
193
|
-
return theme.colors.neutral.
|
|
194
|
+
return theme.colors.neutral.borderStrongDisabled;
|
|
194
195
|
}, ";fill:", _ref31 => {
|
|
195
196
|
let {
|
|
196
197
|
theme
|
|
@@ -200,17 +201,17 @@ const CheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
|
200
201
|
let {
|
|
201
202
|
theme
|
|
202
203
|
} = _ref32;
|
|
203
|
-
return theme.colors.danger.
|
|
204
|
+
return theme.colors.danger.backgroundStrongDisabled;
|
|
204
205
|
}, ";", InnerCheckbox, "{stroke:", _ref33 => {
|
|
205
206
|
let {
|
|
206
207
|
theme
|
|
207
208
|
} = _ref33;
|
|
208
|
-
return theme.colors.danger.
|
|
209
|
+
return theme.colors.danger.borderStrongDisabled;
|
|
209
210
|
}, ";fill:", _ref34 => {
|
|
210
211
|
let {
|
|
211
212
|
theme
|
|
212
213
|
} = _ref34;
|
|
213
|
-
return theme.colors.danger.
|
|
214
|
+
return theme.colors.danger.backgroundStrongDisabled;
|
|
214
215
|
}, ";}}", CheckboxInput, "[aria-invalid=\"true\"]+", StyledIcon, "{fill:", _ref35 => {
|
|
215
216
|
let {
|
|
216
217
|
theme
|
|
@@ -230,7 +231,7 @@ const CheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
|
230
231
|
let {
|
|
231
232
|
theme
|
|
232
233
|
} = _ref38;
|
|
233
|
-
return theme.colors.primary.
|
|
234
|
+
return theme.colors.primary.backgroundStrongDisabled;
|
|
234
235
|
}, ";", InnerCheckbox, "{stroke:", _ref39 => {
|
|
235
236
|
let {
|
|
236
237
|
theme
|
|
@@ -245,37 +246,37 @@ const CheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
|
245
246
|
let {
|
|
246
247
|
theme
|
|
247
248
|
} = _ref41;
|
|
248
|
-
return theme.colors.primary.
|
|
249
|
+
return theme.colors.primary.backgroundStrongDisabled;
|
|
249
250
|
}, ";", InnerCheckbox, "{stroke:", _ref42 => {
|
|
250
251
|
let {
|
|
251
252
|
theme
|
|
252
253
|
} = _ref42;
|
|
253
|
-
return theme.colors.primary.
|
|
254
|
+
return theme.colors.primary.borderStrongDisabled;
|
|
254
255
|
}, ";fill:", _ref43 => {
|
|
255
256
|
let {
|
|
256
257
|
theme
|
|
257
258
|
} = _ref43;
|
|
258
|
-
return theme.colors.primary.
|
|
259
|
+
return theme.colors.primary.backgroundStrongDisabled;
|
|
259
260
|
}, ";}}}", CheckboxInput, ":checked+", StyledIcon, " path{transform-origin:center;transition:200ms transform ease-in-out;transform:scale(1);transform:translate(2px, 2px);}", CheckboxInput, ":checked+", StyledIcon, " ", InnerCheckbox, "{fill:", _ref44 => {
|
|
260
261
|
let {
|
|
261
262
|
theme
|
|
262
263
|
} = _ref44;
|
|
263
|
-
return theme.colors.primary.
|
|
264
|
+
return theme.colors.primary.backgroundStrong;
|
|
264
265
|
}, ";stroke:", _ref45 => {
|
|
265
266
|
let {
|
|
266
267
|
theme
|
|
267
268
|
} = _ref45;
|
|
268
|
-
return theme.colors.primary.
|
|
269
|
+
return theme.colors.primary.borderStrong;
|
|
269
270
|
}, ";}", CheckboxInput, "[aria-invalid=\"true\"]:checked+", StyledIcon, " ", InnerCheckbox, "{fill:", _ref46 => {
|
|
270
271
|
let {
|
|
271
272
|
theme
|
|
272
273
|
} = _ref46;
|
|
273
|
-
return theme.colors.danger.
|
|
274
|
+
return theme.colors.danger.backgroundStrong;
|
|
274
275
|
}, ";stroke:", _ref47 => {
|
|
275
276
|
let {
|
|
276
277
|
theme
|
|
277
278
|
} = _ref47;
|
|
278
|
-
return theme.colors.danger.
|
|
279
|
+
return theme.colors.danger.borderStrong;
|
|
279
280
|
}, ";}", CheckboxInput, "[aria-checked=\"mixed\"]+", StyledIcon, "{", CheckMixedMark, "{fill:", _ref48 => {
|
|
280
281
|
let {
|
|
281
282
|
theme
|
|
@@ -285,12 +286,12 @@ const CheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
|
285
286
|
let {
|
|
286
287
|
theme
|
|
287
288
|
} = _ref49;
|
|
288
|
-
return theme.colors.primary.
|
|
289
|
+
return theme.colors.primary.backgroundStrong;
|
|
289
290
|
}, ";stroke:", _ref50 => {
|
|
290
291
|
let {
|
|
291
292
|
theme
|
|
292
293
|
} = _ref50;
|
|
293
|
-
return theme.colors.primary.
|
|
294
|
+
return theme.colors.primary.borderStrong;
|
|
294
295
|
}, ";}}&:hover[aria-disabled='false']{", CheckboxInput, "[aria-invalid='false']{&[aria-checked='false']+", StyledIcon, " ", InnerCheckbox, "{stroke:", _ref51 => {
|
|
295
296
|
let {
|
|
296
297
|
theme
|
|
@@ -301,30 +302,60 @@ const CheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
|
301
302
|
theme
|
|
302
303
|
} = _ref52;
|
|
303
304
|
return theme.colors.primary.backgroundHover;
|
|
304
|
-
}, ";}
|
|
305
|
+
}, ";}&[aria-checked='true']+", StyledIcon, " ", InnerCheckbox, "{stroke:", _ref53 => {
|
|
305
306
|
let {
|
|
306
307
|
theme
|
|
307
308
|
} = _ref53;
|
|
308
|
-
return theme.colors.
|
|
309
|
+
return theme.colors.primary.borderStrongHover;
|
|
309
310
|
}, ";fill:", _ref54 => {
|
|
310
311
|
let {
|
|
311
312
|
theme
|
|
312
313
|
} = _ref54;
|
|
313
|
-
return theme.colors.
|
|
314
|
-
}, ";}
|
|
314
|
+
return theme.colors.primary.backgroundStrongHover;
|
|
315
|
+
}, ";}&[aria-checked='mixed']+", StyledIcon, " ", InnerCheckbox, "{stroke:", _ref55 => {
|
|
315
316
|
let {
|
|
316
317
|
theme
|
|
317
318
|
} = _ref55;
|
|
318
|
-
return theme.colors.
|
|
319
|
-
}, ";
|
|
319
|
+
return theme.colors.primary.borderStrongHover;
|
|
320
|
+
}, ";fill:", _ref56 => {
|
|
320
321
|
let {
|
|
321
322
|
theme
|
|
322
323
|
} = _ref56;
|
|
323
|
-
return theme.colors.
|
|
324
|
-
}, ";
|
|
324
|
+
return theme.colors.primary.backgroundStrongHover;
|
|
325
|
+
}, ";}}", CheckboxInput, "[aria-invalid='true']{&[aria-checked='false']+", StyledIcon, " ", InnerCheckbox, "{stroke:", _ref57 => {
|
|
325
326
|
let {
|
|
326
327
|
theme
|
|
327
328
|
} = _ref57;
|
|
329
|
+
return theme.colors.danger.borderHover;
|
|
330
|
+
}, ";fill:", _ref58 => {
|
|
331
|
+
let {
|
|
332
|
+
theme
|
|
333
|
+
} = _ref58;
|
|
334
|
+
return theme.colors.danger.backgroundHover;
|
|
335
|
+
}, ";}&[aria-checked='true']+", StyledIcon, " ", InnerCheckbox, "{stroke:", _ref59 => {
|
|
336
|
+
let {
|
|
337
|
+
theme
|
|
338
|
+
} = _ref59;
|
|
339
|
+
return theme.colors.danger.borderStrongHover;
|
|
340
|
+
}, ";fill:", _ref60 => {
|
|
341
|
+
let {
|
|
342
|
+
theme
|
|
343
|
+
} = _ref60;
|
|
344
|
+
return theme.colors.danger.backgroundStrongHover;
|
|
345
|
+
}, ";}}}", CheckboxInput, "[aria-invalid=\"true\"]+", StyledIcon, "{fill:", _ref61 => {
|
|
346
|
+
let {
|
|
347
|
+
theme
|
|
348
|
+
} = _ref61;
|
|
349
|
+
return theme.colors.danger.backgroundStrong;
|
|
350
|
+
}, ";", InnerCheckbox, "{stroke:", _ref62 => {
|
|
351
|
+
let {
|
|
352
|
+
theme
|
|
353
|
+
} = _ref62;
|
|
354
|
+
return theme.colors.danger.backgroundStrong;
|
|
355
|
+
}, ";fill:", _ref63 => {
|
|
356
|
+
let {
|
|
357
|
+
theme
|
|
358
|
+
} = _ref63;
|
|
328
359
|
return theme.colors.danger.background;
|
|
329
360
|
}, ";}}");
|
|
330
361
|
const StyledActivityContainer = /*#__PURE__*/_styled("div", {
|
|
@@ -337,7 +368,10 @@ const StyledActivityContainer = /*#__PURE__*/_styled("div", {
|
|
|
337
368
|
styles: "display:flex",
|
|
338
369
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
339
370
|
});
|
|
340
|
-
|
|
371
|
+
/**
|
|
372
|
+
* Checkbox is an input component used to select or deselect an option.
|
|
373
|
+
*/
|
|
374
|
+
const Checkbox = /*#__PURE__*/forwardRef((_ref64, ref) => {
|
|
341
375
|
let {
|
|
342
376
|
checked = false,
|
|
343
377
|
onChange,
|
|
@@ -356,8 +390,9 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref58, ref) => {
|
|
|
356
390
|
'data-visibility': dataVisibility,
|
|
357
391
|
'aria-label': ariaLabel,
|
|
358
392
|
required,
|
|
359
|
-
'data-testid': dataTestId
|
|
360
|
-
|
|
393
|
+
'data-testid': dataTestId,
|
|
394
|
+
tooltip
|
|
395
|
+
} = _ref64;
|
|
361
396
|
const [state, setState] = useState(checked);
|
|
362
397
|
const id = useId();
|
|
363
398
|
const computedName = name ?? id;
|
|
@@ -374,84 +409,87 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref58, ref) => {
|
|
|
374
409
|
setState(current => !current);
|
|
375
410
|
}
|
|
376
411
|
}, []);
|
|
377
|
-
return
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
id: computedName,
|
|
391
|
-
type: "checkbox",
|
|
392
|
-
"aria-invalid": !!error,
|
|
393
|
-
"aria-describedby": error ? `${computedName}-hint` : undefined,
|
|
394
|
-
"aria-checked": state === 'indeterminate' ? 'mixed' : state,
|
|
395
|
-
"aria-label": ariaLabel,
|
|
396
|
-
checked: state === 'indeterminate' ? false : state,
|
|
397
|
-
size: size,
|
|
398
|
-
onChange: onLocalChange,
|
|
399
|
-
onKeyDown: onKeyDown,
|
|
400
|
-
onFocus: onFocus,
|
|
401
|
-
onBlur: onBlur,
|
|
402
|
-
disabled: disabled,
|
|
403
|
-
value: value,
|
|
404
|
-
name: computedName,
|
|
405
|
-
autoFocus: autoFocus,
|
|
406
|
-
ref: ref,
|
|
407
|
-
required: required
|
|
408
|
-
}), !progress ? jsx(StyledIcon, {
|
|
409
|
-
size: size,
|
|
410
|
-
viewBox: "0 0 24 24",
|
|
411
|
-
children: jsx(CheckboxIconContainer, {
|
|
412
|
-
children: state !== 'indeterminate' ? jsx("path", {
|
|
413
|
-
fillRule: "evenodd",
|
|
414
|
-
clipRule: "evenodd",
|
|
415
|
-
width: 14,
|
|
416
|
-
height: 14,
|
|
417
|
-
d: "M15.6678 5.26709C16.0849 5.6463 16.113 6.28907 15.7307 6.70276L9.29172 13.6705C9.10291 13.8748 8.83818 13.9937 8.55884 13.9998C8.2795 14.0058 8.0098 13.8984 7.81223 13.7024L4.30004 10.2185C3.89999 9.82169 3.89999 9.17831 4.30004 8.78149C4.70009 8.38467 5.34869 8.38467 5.74874 8.78149L8.50441 11.5149L14.2205 5.32951C14.6028 4.91583 15.2508 4.88788 15.6678 5.26709Z",
|
|
418
|
-
fill: "white"
|
|
419
|
-
}) : jsx(CheckMixedMark, {
|
|
420
|
-
x: "6",
|
|
421
|
-
y: "11",
|
|
422
|
-
rx: "1",
|
|
423
|
-
width: "12",
|
|
424
|
-
height: "2"
|
|
412
|
+
return jsx(Tooltip, {
|
|
413
|
+
text: tooltip,
|
|
414
|
+
children: jsxs(CheckboxContainer, {
|
|
415
|
+
className: className,
|
|
416
|
+
"aria-disabled": disabled,
|
|
417
|
+
"data-visibility": dataVisibility,
|
|
418
|
+
"data-checked": state,
|
|
419
|
+
"data-error": !!error,
|
|
420
|
+
"data-testid": dataTestId,
|
|
421
|
+
children: [progress ? jsx(StyledActivityContainer, {
|
|
422
|
+
children: jsx(Loader, {
|
|
423
|
+
active: true,
|
|
424
|
+
size: size
|
|
425
425
|
})
|
|
426
|
-
})
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
426
|
+
}) : null, jsx(CheckboxInput, {
|
|
427
|
+
id: computedName,
|
|
428
|
+
type: "checkbox",
|
|
429
|
+
"aria-invalid": !!error,
|
|
430
|
+
"aria-describedby": error ? `${computedName}-hint` : undefined,
|
|
431
|
+
"aria-checked": state === 'indeterminate' ? 'mixed' : state,
|
|
432
|
+
"aria-label": ariaLabel,
|
|
433
|
+
checked: state === 'indeterminate' ? false : state,
|
|
434
|
+
size: size,
|
|
435
|
+
onChange: onLocalChange,
|
|
436
|
+
onKeyDown: onKeyDown,
|
|
437
|
+
onFocus: onFocus,
|
|
438
|
+
onBlur: onBlur,
|
|
439
|
+
disabled: disabled,
|
|
440
|
+
value: value,
|
|
441
|
+
name: computedName,
|
|
442
|
+
autoFocus: autoFocus,
|
|
443
|
+
ref: ref,
|
|
444
|
+
required: required
|
|
445
|
+
}), !progress ? jsx(StyledIcon, {
|
|
446
|
+
size: size,
|
|
447
|
+
viewBox: "0 0 24 24",
|
|
448
|
+
children: jsx(CheckboxIconContainer, {
|
|
449
|
+
children: state !== 'indeterminate' ? jsx("path", {
|
|
450
|
+
fillRule: "evenodd",
|
|
451
|
+
clipRule: "evenodd",
|
|
452
|
+
width: 14,
|
|
453
|
+
height: 14,
|
|
454
|
+
d: "M15.6678 5.26709C16.0849 5.6463 16.113 6.28907 15.7307 6.70276L9.29172 13.6705C9.10291 13.8748 8.83818 13.9937 8.55884 13.9998C8.2795 14.0058 8.0098 13.8984 7.81223 13.7024L4.30004 10.2185C3.89999 9.82169 3.89999 9.17831 4.30004 8.78149C4.70009 8.38467 5.34869 8.38467 5.74874 8.78149L8.50441 11.5149L14.2205 5.32951C14.6028 4.91583 15.2508 4.88788 15.6678 5.26709Z",
|
|
455
|
+
fill: "white"
|
|
456
|
+
}) : jsx(CheckMixedMark, {
|
|
457
|
+
x: "6",
|
|
458
|
+
y: "11",
|
|
459
|
+
rx: "1",
|
|
460
|
+
width: "12",
|
|
461
|
+
height: "2"
|
|
440
462
|
})
|
|
463
|
+
})
|
|
464
|
+
}) : null, jsxs(Stack, {
|
|
465
|
+
gap: 0.25,
|
|
466
|
+
children: [jsxs(Row, {
|
|
467
|
+
templateColumns: "11fr 1fr",
|
|
468
|
+
alignItems: "center",
|
|
469
|
+
children: [children ? jsx(StyledLabel, {
|
|
470
|
+
htmlFor: computedName,
|
|
471
|
+
children: children
|
|
472
|
+
}) : null, required ? jsx("sup", {
|
|
473
|
+
children: jsx(Icon, {
|
|
474
|
+
name: "asterisk",
|
|
475
|
+
size: 10,
|
|
476
|
+
color: "danger"
|
|
477
|
+
})
|
|
478
|
+
}) : null]
|
|
479
|
+
}), helper ? jsx(Text, {
|
|
480
|
+
variant: "bodySmall",
|
|
481
|
+
as: "p",
|
|
482
|
+
prominence: "weak",
|
|
483
|
+
color: "neutral",
|
|
484
|
+
children: helper
|
|
485
|
+
}) : null, error ? jsx(ErrorText, {
|
|
486
|
+
variant: "bodySmall",
|
|
487
|
+
as: "p",
|
|
488
|
+
color: "danger",
|
|
489
|
+
children: error
|
|
441
490
|
}) : null]
|
|
442
|
-
})
|
|
443
|
-
|
|
444
|
-
as: "p",
|
|
445
|
-
prominence: "weak",
|
|
446
|
-
color: "neutral",
|
|
447
|
-
children: helper
|
|
448
|
-
}) : null, error ? jsx(ErrorText, {
|
|
449
|
-
variant: "bodySmall",
|
|
450
|
-
as: "p",
|
|
451
|
-
color: "danger",
|
|
452
|
-
children: error
|
|
453
|
-
}) : null]
|
|
454
|
-
})]
|
|
491
|
+
})]
|
|
492
|
+
})
|
|
455
493
|
});
|
|
456
494
|
});
|
|
457
495
|
|
|
@@ -69,6 +69,9 @@ const StyledRequiredIcon = /*#__PURE__*/_styled(Icon, {
|
|
|
69
69
|
styles: "vertical-align:super",
|
|
70
70
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
71
71
|
});
|
|
72
|
+
/**
|
|
73
|
+
* CheckboxGroup is a component that groups a set of checkboxes together with a legend and helper/error text.
|
|
74
|
+
*/
|
|
72
75
|
const CheckboxGroup = _ref2 => {
|
|
73
76
|
let {
|
|
74
77
|
legend,
|
|
@@ -3,6 +3,9 @@ import { Button } from '../Button/index.js';
|
|
|
3
3
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
const COPY_DURATION = 2500;
|
|
6
|
+
/**
|
|
7
|
+
* CopyButton is a button that copies a given value to the clipboard.
|
|
8
|
+
*/
|
|
6
9
|
const CopyButton = _ref => {
|
|
7
10
|
let {
|
|
8
11
|
size = 'small',
|
|
@@ -144,6 +144,11 @@ const StyledText = /*#__PURE__*/_styled(Text, {
|
|
|
144
144
|
return theme.space['1'];
|
|
145
145
|
}, ";");
|
|
146
146
|
const DEFAULT_FORMAT = value => value instanceof Date ? value.toISOString() : value;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* DateInput is a wrapper around react-datepicker that provides a consistent look and feel with the rest of the Ultraviolet UI.
|
|
150
|
+
* See https://reactdatepicker.com/ for more information.
|
|
151
|
+
*/
|
|
147
152
|
const DateInput = _ref24 => {
|
|
148
153
|
let {
|
|
149
154
|
autoFocus = false,
|
|
@@ -19,6 +19,12 @@ const StyledExpandable = /*#__PURE__*/_styled('div', {
|
|
|
19
19
|
} = _ref2;
|
|
20
20
|
return opened ? 'initial' : `${minHeight}px`;
|
|
21
21
|
}, ";");
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The Expandable component is a dynamic React component that allows for the expansion of its children content
|
|
25
|
+
* based on its height. The component comes with a sleek and smooth animation, providing a visually pleasing
|
|
26
|
+
* user experience.
|
|
27
|
+
*/
|
|
22
28
|
const Expandable = _ref3 => {
|
|
23
29
|
let {
|
|
24
30
|
children,
|
|
@@ -26,6 +26,8 @@ const DEFAULT_YSCALE = {
|
|
|
26
26
|
const DEFAULT_CHARTPROPS = {};
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
+
* LineChart component is a wrapper around Nivo's ResponsiveLine component used to display data in a line chart.
|
|
30
|
+
* See https://nivo.rocks/line/ for more information.
|
|
29
31
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
30
32
|
*/
|
|
31
33
|
const LineChart = _ref => {
|
|
@@ -91,6 +91,10 @@ const StyledLink = /*#__PURE__*/_styled('a', {
|
|
|
91
91
|
} = _ref8;
|
|
92
92
|
return theme.colors[sentiment]?.text ?? theme.colors.neutral.text;
|
|
93
93
|
}, ";}&:active{text-decoration-thickness:2px;}");
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Link is a component used to navigate between pages or to external websites.
|
|
97
|
+
*/
|
|
94
98
|
const Link = /*#__PURE__*/forwardRef((_ref9, ref) => {
|
|
95
99
|
let {
|
|
96
100
|
children,
|
|
@@ -67,6 +67,10 @@ const BaseList = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
67
67
|
})
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* List is a component that displays a list of items based on the columns you provide and the data you pass.
|
|
73
|
+
*/
|
|
70
74
|
const List = /*#__PURE__*/Object.assign(BaseList, {
|
|
71
75
|
Row,
|
|
72
76
|
Cell,
|
|
@@ -37,6 +37,10 @@ const Text = /*#__PURE__*/_styled('text', {
|
|
|
37
37
|
} = _ref3;
|
|
38
38
|
return theme.colors[color]?.backgroundStrong || color;
|
|
39
39
|
}, ";font-size:26px;dominant-baseline:middle;text-anchor:middle;");
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Loader is a circular progress indicator that can be used to indicate that an action is being performed.
|
|
43
|
+
*/
|
|
40
44
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
41
45
|
name: "si0mpz",
|
|
42
46
|
styles: "transition:stroke-dashoffset 0.5s ease 0s"
|
|
@@ -139,6 +139,13 @@ const FwdMenu = /*#__PURE__*/forwardRef((_ref9, ref) => {
|
|
|
139
139
|
})]
|
|
140
140
|
});
|
|
141
141
|
});
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* A menu is a widget that offers a list of choices to the user, such as a set of actions or functions.
|
|
145
|
+
* A menu is usually opened, or made visible, by activating a menu button, choosing an item in a menu that opens a
|
|
146
|
+
* sub menu, or by invoking a command, such as `Shift + F10` on Windows, that opens a context specific menu.
|
|
147
|
+
* When a user activates a choice in a menu, the menu usually closes unless the choice opened a submenu.
|
|
148
|
+
*/
|
|
142
149
|
const Menu = /*#__PURE__*/Object.assign(FwdMenu, {
|
|
143
150
|
Item
|
|
144
151
|
});
|
|
@@ -4,7 +4,7 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
4
4
|
|
|
5
5
|
const StyledStrength = /*#__PURE__*/_styled(Text, {
|
|
6
6
|
shouldForwardProp: prop => !['color'].includes(prop),
|
|
7
|
-
target: "
|
|
7
|
+
target: "e157fc5l2"
|
|
8
8
|
})("float:right;vertical-align:top;color:", _ref => {
|
|
9
9
|
let {
|
|
10
10
|
strength
|
|
@@ -12,7 +12,7 @@ const StyledStrength = /*#__PURE__*/_styled(Text, {
|
|
|
12
12
|
return strength.color;
|
|
13
13
|
}, ";");
|
|
14
14
|
const StyledWrapper = /*#__PURE__*/_styled("div", {
|
|
15
|
-
target: "
|
|
15
|
+
target: "e157fc5l1"
|
|
16
16
|
})("background-color:", _ref2 => {
|
|
17
17
|
let {
|
|
18
18
|
theme
|
|
@@ -40,13 +40,16 @@ const StyledWrapper = /*#__PURE__*/_styled("div", {
|
|
|
40
40
|
return theme.space['2'];
|
|
41
41
|
}, ";");
|
|
42
42
|
const StyledMeter = /*#__PURE__*/_styled("div", {
|
|
43
|
-
target: "
|
|
43
|
+
target: "e157fc5l0"
|
|
44
44
|
})("border-radius:", _ref7 => {
|
|
45
45
|
let {
|
|
46
46
|
theme
|
|
47
47
|
} = _ref7;
|
|
48
48
|
return theme.radii.default;
|
|
49
49
|
}, ";height:100%;transition:all 0.5s;");
|
|
50
|
+
/**
|
|
51
|
+
* Show strength of a password based on different criteria.
|
|
52
|
+
*/
|
|
50
53
|
const Meter = _ref8 => {
|
|
51
54
|
let {
|
|
52
55
|
strength,
|
|
@@ -124,11 +124,13 @@ const Dialog = _ref9 => {
|
|
|
124
124
|
|
|
125
125
|
// Handle body scroll
|
|
126
126
|
useEffect(() => {
|
|
127
|
+
const previousOverflow = document.body.style.overflow;
|
|
127
128
|
if (open && preventBodyScroll) {
|
|
128
129
|
document.body.style.overflow = 'hidden';
|
|
129
|
-
} else {
|
|
130
|
-
document.body.style.overflow = 'auto';
|
|
131
130
|
}
|
|
131
|
+
return () => {
|
|
132
|
+
document.body.style.overflow = previousOverflow;
|
|
133
|
+
};
|
|
132
134
|
}, [preventBodyScroll, open]);
|
|
133
135
|
|
|
134
136
|
// Stop focus to prevent unexpected body loose focus
|
|
@@ -6,7 +6,7 @@ import { Disclosure } from './Disclosure.js';
|
|
|
6
6
|
import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
9
|
-
target: "
|
|
9
|
+
target: "ebywm9u0"
|
|
10
10
|
})("position:absolute;top:", _ref => {
|
|
11
11
|
let {
|
|
12
12
|
theme
|
|
@@ -18,6 +18,11 @@ const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
|
18
18
|
} = _ref2;
|
|
19
19
|
return theme.space['2'];
|
|
20
20
|
}, ";");
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Modal is a component that allows you to display content on top of other content.
|
|
24
|
+
* It is often used to display a dialog with additional information or to ask for a confirmation.
|
|
25
|
+
*/
|
|
21
26
|
const Modal = _ref3 => {
|
|
22
27
|
let {
|
|
23
28
|
ariaLabel = 'modal',
|
|
@@ -3,6 +3,9 @@ import { Stack } from '../Stack/index.js';
|
|
|
3
3
|
import { Text } from '../Text/index.js';
|
|
4
4
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* A Notice is used to display a short message to the user.
|
|
8
|
+
*/
|
|
6
9
|
const Notice = _ref => {
|
|
7
10
|
let {
|
|
8
11
|
children,
|
|
@@ -138,6 +138,10 @@ const StyledContainer = /*#__PURE__*/_styled('div', {
|
|
|
138
138
|
} = _ref20;
|
|
139
139
|
return theme.colors.primary.borderHover;
|
|
140
140
|
}, ";}}");
|
|
141
|
+
/**
|
|
142
|
+
* NumberInput component is used to increment / decrement a number value by clicking on + / - buttons or
|
|
143
|
+
* by typing into input.
|
|
144
|
+
*/
|
|
141
145
|
const NumberInput = _ref21 => {
|
|
142
146
|
let {
|
|
143
147
|
disabled = false,
|
|
@@ -37,7 +37,8 @@ const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
|
37
37
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
38
|
});
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Pagination is a component to navigate between pages, it is composed of 2 buttons to go to the previous and next page,
|
|
41
|
+
* and a list of buttons to go to a specific page.
|
|
41
42
|
*/
|
|
42
43
|
const Pagination = _ref4 => {
|
|
43
44
|
let {
|
|
@@ -12,6 +12,11 @@ const PasswordCheckContainer = /*#__PURE__*/_styled("div", {
|
|
|
12
12
|
} = _ref;
|
|
13
13
|
return theme.space['1'];
|
|
14
14
|
}, ";");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* PasswordCheck is a component that display a list of password rules with a check or a cross depending on the validity
|
|
18
|
+
* of the rule.
|
|
19
|
+
*/
|
|
15
20
|
const PasswordCheck = _ref2 => {
|
|
16
21
|
let {
|
|
17
22
|
rules,
|
|
@@ -45,6 +45,8 @@ const DEFAULT_MARGIN = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
+
* PieChart component is a wrapper around the Nivo Pie component to display a pie chart.
|
|
49
|
+
* See https://nivo.rocks/pie/ for more information.
|
|
48
50
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
49
51
|
*/
|
|
50
52
|
const PieChart = _ref2 => {
|
|
@@ -88,6 +88,10 @@ const ContentWrapper = _ref5 => {
|
|
|
88
88
|
}) : children]
|
|
89
89
|
});
|
|
90
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Popover component is used to display additional information or actions on top of the main content of the page.
|
|
93
|
+
* It is usually triggered by clicking on a button. It includes a title, a close button and a content area.
|
|
94
|
+
*/
|
|
91
95
|
const Popover = _ref6 => {
|
|
92
96
|
let {
|
|
93
97
|
visible = false,
|
|
@@ -47,6 +47,9 @@ const StyledFilled = /*#__PURE__*/_styled('div', {
|
|
|
47
47
|
} = _ref5;
|
|
48
48
|
return Math.max(0, Math.min(100, value));
|
|
49
49
|
}, "%;");
|
|
50
|
+
/**
|
|
51
|
+
* Progress bar component to display progress of a task. Can be used to display progress of a form or a loading state.
|
|
52
|
+
*/
|
|
50
53
|
const ProgressBar = _ref6 => {
|
|
51
54
|
let {
|
|
52
55
|
progress = false,
|