@ultraviolet/ui 1.28.0 → 1.29.1
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 +61 -12
- package/dist/react-datepicker/dist/react-datepicker.min.css.js +1 -1
- 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 +60 -111
- 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 +6 -6
|
@@ -26,11 +26,10 @@ const PROMINENCES = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Generate all styles available for badge based on prominence and sentiments
|
|
28
28
|
*/
|
|
29
|
-
const generateStyles =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref;
|
|
29
|
+
const generateStyles = ({
|
|
30
|
+
prominence,
|
|
31
|
+
theme
|
|
32
|
+
}) => {
|
|
34
33
|
const definedProminence = prominence === PROMINENCES.strong ? capitalize(PROMINENCES.strong) : '';
|
|
35
34
|
const text = `text${definedProminence}`;
|
|
36
35
|
const background = `background${definedProminence}`;
|
|
@@ -58,53 +57,34 @@ const generateStyles = _ref => {
|
|
|
58
57
|
const StyledSpan = /*#__PURE__*/_styled(Text, {
|
|
59
58
|
shouldForwardProp: prop => !['sentimentStyles', 'size', 'fontSize'].includes(prop),
|
|
60
59
|
target: "ej33bna0"
|
|
61
|
-
})("display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:",
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, ";
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
} = _ref4;
|
|
77
|
-
return size === SIZES.small ? theme.space['0.5'] : theme.space['1'];
|
|
78
|
-
}, ";width:fit-content;height:", _ref5 => {
|
|
79
|
-
let {
|
|
80
|
-
size
|
|
81
|
-
} = _ref5;
|
|
82
|
-
return size;
|
|
83
|
-
}, "px;text-transform:uppercase;font-size:", _ref6 => {
|
|
84
|
-
let {
|
|
85
|
-
fontSize
|
|
86
|
-
} = _ref6;
|
|
87
|
-
return fontSize;
|
|
88
|
-
}, "px;color:inherit;", _ref7 => {
|
|
89
|
-
let {
|
|
90
|
-
sentimentStyles
|
|
91
|
-
} = _ref7;
|
|
92
|
-
return sentimentStyles;
|
|
93
|
-
}, ";");
|
|
60
|
+
})("display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:", ({
|
|
61
|
+
theme
|
|
62
|
+
}) => theme.radii.xlarge, ";padding:0 ", ({
|
|
63
|
+
theme,
|
|
64
|
+
size
|
|
65
|
+
}) => size === SIZES.small ? theme.space['1'] : theme.space['2'], ";gap:", ({
|
|
66
|
+
theme,
|
|
67
|
+
size
|
|
68
|
+
}) => size === SIZES.small ? theme.space['0.5'] : theme.space['1'], ";width:fit-content;height:", ({
|
|
69
|
+
size
|
|
70
|
+
}) => size, "px;text-transform:uppercase;font-size:", ({
|
|
71
|
+
fontSize
|
|
72
|
+
}) => fontSize, "px;color:inherit;", ({
|
|
73
|
+
sentimentStyles
|
|
74
|
+
}) => sentimentStyles, ";");
|
|
94
75
|
/**
|
|
95
76
|
* Badge component is used to display a status or a label in a small container.
|
|
96
77
|
*/
|
|
97
|
-
const Badge =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} = _ref8;
|
|
78
|
+
const Badge = ({
|
|
79
|
+
sentiment = 'neutral',
|
|
80
|
+
size = 'medium',
|
|
81
|
+
prominence = 'default',
|
|
82
|
+
icon,
|
|
83
|
+
disabled = false,
|
|
84
|
+
className,
|
|
85
|
+
children,
|
|
86
|
+
'data-testid': dataTestId
|
|
87
|
+
}) => {
|
|
108
88
|
const theme = useTheme();
|
|
109
89
|
|
|
110
90
|
/**
|
|
@@ -9,12 +9,11 @@ import defaultIllustrationSmall from './assets/default-image-small.svg.js';
|
|
|
9
9
|
import defaultIllustration from './assets/default-image.svg.js';
|
|
10
10
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
11
11
|
|
|
12
|
-
const styles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
const styles = ({
|
|
13
|
+
theme,
|
|
14
|
+
variant,
|
|
15
|
+
size
|
|
16
|
+
}) => {
|
|
18
17
|
if (size === 'small') {
|
|
19
18
|
if (variant === 'intro') {
|
|
20
19
|
return /*#__PURE__*/css("background:", theme.colors.primary.background, ";background-position:left,right;background-repeat:no-repeat,no-repeat;background-size:contain,contain;");
|
|
@@ -36,68 +35,49 @@ const styles = _ref => {
|
|
|
36
35
|
const Container = /*#__PURE__*/_styled('div', {
|
|
37
36
|
shouldForwardProp: prop => !['variant', 'size', 'padding'].includes(prop),
|
|
38
37
|
target: "e1kdwp5x1"
|
|
39
|
-
})("padding:",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
theme,
|
|
58
|
-
variant,
|
|
59
|
-
size
|
|
60
|
-
} = _ref5;
|
|
61
|
-
return styles({
|
|
62
|
-
theme,
|
|
63
|
-
variant,
|
|
64
|
-
size
|
|
65
|
-
});
|
|
66
|
-
}, ";>svg:first-child,>img{height:", _ref6 => {
|
|
67
|
-
let {
|
|
68
|
-
size
|
|
69
|
-
} = _ref6;
|
|
70
|
-
return size === 'medium' ? '140px' : '100px';
|
|
71
|
-
}, ";align-self:center;}button[name='close']{background:none;&:hover{background:none;}}");
|
|
38
|
+
})("padding:", ({
|
|
39
|
+
theme,
|
|
40
|
+
size
|
|
41
|
+
}) => theme.space[size === 'small' ? '2' : '3'], ";border-radius:", ({
|
|
42
|
+
theme
|
|
43
|
+
}) => theme.radii.large, ";display:flex;flex-direction:row;justify-content:space-between;gap:", ({
|
|
44
|
+
theme
|
|
45
|
+
}) => theme.space['2'], ";", ({
|
|
46
|
+
theme,
|
|
47
|
+
variant,
|
|
48
|
+
size
|
|
49
|
+
}) => styles({
|
|
50
|
+
theme,
|
|
51
|
+
variant,
|
|
52
|
+
size
|
|
53
|
+
}), ";>svg:first-child,>img{height:", ({
|
|
54
|
+
size
|
|
55
|
+
}) => size === 'medium' ? '140px' : '100px', ";align-self:center;}button[name='close']{background:none;&:hover{background:none;}}");
|
|
72
56
|
const ImageStack = /*#__PURE__*/_styled(Stack, {
|
|
73
57
|
shouldForwardProp: prop => !['size'].includes(prop),
|
|
74
58
|
target: "e1kdwp5x0"
|
|
75
|
-
})("width:",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
} = _ref7;
|
|
79
|
-
return size === 'medium' ? '140px' : '74px';
|
|
80
|
-
}, ";");
|
|
59
|
+
})("width:", ({
|
|
60
|
+
size
|
|
61
|
+
}) => size === 'medium' ? '140px' : '74px', ";");
|
|
81
62
|
/**
|
|
82
63
|
* Banner component is used to display an informative message to the user with style.
|
|
83
64
|
*/
|
|
84
|
-
const Banner =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
} = _ref8;
|
|
65
|
+
const Banner = ({
|
|
66
|
+
variant = 'intro',
|
|
67
|
+
size = 'medium',
|
|
68
|
+
title,
|
|
69
|
+
children,
|
|
70
|
+
direction = 'column',
|
|
71
|
+
onClose,
|
|
72
|
+
buttonText,
|
|
73
|
+
onClickButton,
|
|
74
|
+
linkText,
|
|
75
|
+
linkHref,
|
|
76
|
+
image,
|
|
77
|
+
className,
|
|
78
|
+
closable = true,
|
|
79
|
+
'data-testid': dataTestId
|
|
80
|
+
}) => {
|
|
101
81
|
const {
|
|
102
82
|
theme
|
|
103
83
|
} = useTheme();
|
|
@@ -4,60 +4,45 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
4
4
|
|
|
5
5
|
const BarToolTipContainer = /*#__PURE__*/_styled("div", {
|
|
6
6
|
target: "e1ilr3nn1"
|
|
7
|
-
})("display:flex;background:",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
theme
|
|
15
|
-
} = _ref2;
|
|
16
|
-
return theme.radii.small;
|
|
17
|
-
}, ";box-shadow:", _ref3 => {
|
|
18
|
-
let {
|
|
19
|
-
theme
|
|
20
|
-
} = _ref3;
|
|
21
|
-
return theme.shadows.tooltip;
|
|
22
|
-
}, ";padding:5px 9px;align-items:center;");
|
|
7
|
+
})("display:flex;background:", ({
|
|
8
|
+
theme
|
|
9
|
+
}) => theme.colors.neutral.backgroundWeakElevated, ";border-radius:", ({
|
|
10
|
+
theme
|
|
11
|
+
}) => theme.radii.small, ";box-shadow:", ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.shadows.tooltip, ";padding:5px 9px;align-items:center;");
|
|
23
14
|
const BarColorSquare = /*#__PURE__*/_styled('span', {
|
|
24
15
|
shouldForwardProp: prop => !['color'].includes(prop),
|
|
25
16
|
target: "e1ilr3nn0"
|
|
26
|
-
})("display:block;width:12px;height:12px;background:",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
children: [jsx(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
children: formattedValue
|
|
53
|
-
}), jsx(Text, {
|
|
54
|
-
variant: "bodySmall",
|
|
55
|
-
as: "p",
|
|
56
|
-
children: indexValue
|
|
57
|
-
})]
|
|
17
|
+
})("display:block;width:12px;height:12px;background:", ({
|
|
18
|
+
color
|
|
19
|
+
}) => color, ";margin-right:12px;");
|
|
20
|
+
const BarChartToolTip = ({
|
|
21
|
+
formattedValue,
|
|
22
|
+
indexValue,
|
|
23
|
+
color,
|
|
24
|
+
className,
|
|
25
|
+
'data-testid': dataTestId
|
|
26
|
+
}) => jsxs(BarToolTipContainer, {
|
|
27
|
+
className: className,
|
|
28
|
+
"data-testid": dataTestId,
|
|
29
|
+
children: [jsx("div", {
|
|
30
|
+
children: jsx(BarColorSquare, {
|
|
31
|
+
color: color
|
|
32
|
+
})
|
|
33
|
+
}), jsxs("div", {
|
|
34
|
+
children: [jsx(Text, {
|
|
35
|
+
variant: "bodyStronger",
|
|
36
|
+
as: "p",
|
|
37
|
+
sentiment: "primary",
|
|
38
|
+
children: formattedValue
|
|
39
|
+
}), jsx(Text, {
|
|
40
|
+
variant: "bodySmall",
|
|
41
|
+
as: "p",
|
|
42
|
+
children: indexValue
|
|
58
43
|
})]
|
|
59
|
-
})
|
|
60
|
-
};
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
61
46
|
var BarChartTooltip = BarChartToolTip;
|
|
62
47
|
|
|
63
48
|
export { BarChartTooltip as default };
|
|
@@ -20,20 +20,19 @@ const DEFAULT_KEYS = ['value'];
|
|
|
20
20
|
* See https://nivo.rocks/bar/ for more information.
|
|
21
21
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
22
22
|
*/
|
|
23
|
-
const BarChart =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = _ref;
|
|
23
|
+
const BarChart = ({
|
|
24
|
+
height = '537px',
|
|
25
|
+
// to maintain aspect ratio based on our standard 1074px width,
|
|
26
|
+
margin = DEFAULT_MARGIN,
|
|
27
|
+
data = DEFAULT_DATA,
|
|
28
|
+
axisFormatters = DEFAULT_AXISFORMATTER,
|
|
29
|
+
tickValues,
|
|
30
|
+
keys = DEFAULT_KEYS,
|
|
31
|
+
tooltipFunction,
|
|
32
|
+
chartProps,
|
|
33
|
+
className,
|
|
34
|
+
'data-testid': dataTestId
|
|
35
|
+
}) => {
|
|
37
36
|
const theme = useTheme();
|
|
38
37
|
const chartTheme = {
|
|
39
38
|
axis: {
|