@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
|
@@ -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: {
|
|
@@ -5,212 +5,113 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
5
5
|
|
|
6
6
|
const StyledBarWrapper = /*#__PURE__*/_styled("div", {
|
|
7
7
|
target: "ezikjce2"
|
|
8
|
-
})("width:0px;transition:width 500ms;background-color:",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = _ref;
|
|
12
|
-
return theme.colors.neutral.backgroundWeak;
|
|
13
|
-
}, ";");
|
|
8
|
+
})("width:0px;transition:width 500ms;background-color:", ({
|
|
9
|
+
theme
|
|
10
|
+
}) => theme.colors.neutral.backgroundWeak, ";");
|
|
14
11
|
const StyledBar = /*#__PURE__*/_styled("div", {
|
|
15
12
|
target: "ezikjce1"
|
|
16
|
-
})("height:50px;font-weight:600;color:",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, "
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref4;
|
|
30
|
-
return theme.colors.neutral.backgroundStronger;
|
|
31
|
-
}, "B3,0 1px ", _ref5 => {
|
|
32
|
-
let {
|
|
33
|
-
theme
|
|
34
|
-
} = _ref5;
|
|
35
|
-
return theme.colors.neutral.backgroundStronger;
|
|
36
|
-
}, "B3,1px 0 ", _ref6 => {
|
|
37
|
-
let {
|
|
38
|
-
theme
|
|
39
|
-
} = _ref6;
|
|
40
|
-
return theme.colors.neutral.backgroundStronger;
|
|
41
|
-
}, "B3,0 -1px ", _ref7 => {
|
|
42
|
-
let {
|
|
43
|
-
theme
|
|
44
|
-
} = _ref7;
|
|
45
|
-
return theme.colors.neutral.backgroundStronger;
|
|
46
|
-
}, "B3;");
|
|
13
|
+
})("height:50px;font-weight:600;color:", ({
|
|
14
|
+
theme
|
|
15
|
+
}) => theme.colors.neutral.backgroundWeak, ";font-size:14px;display:flex;align-items:center;padding:", ({
|
|
16
|
+
theme
|
|
17
|
+
}) => theme.space[1], ";width:100%;white-space:nowrap;overflow:hidden;text-shadow:-1px 0 ", ({
|
|
18
|
+
theme
|
|
19
|
+
}) => theme.colors.neutral.backgroundStronger, "B3,0 1px ", ({
|
|
20
|
+
theme
|
|
21
|
+
}) => theme.colors.neutral.backgroundStronger, "B3,1px 0 ", ({
|
|
22
|
+
theme
|
|
23
|
+
}) => theme.colors.neutral.backgroundStronger, "B3,0 -1px ", ({
|
|
24
|
+
theme
|
|
25
|
+
}) => theme.colors.neutral.backgroundStronger, "B3;");
|
|
47
26
|
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
48
27
|
target: "ezikjce0"
|
|
49
|
-
})("width:100%;display:flex;background-color:",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return theme.radii.default;
|
|
59
|
-
}, ";box-shadow:", _ref10 => {
|
|
60
|
-
let {
|
|
61
|
-
theme
|
|
62
|
-
} = _ref10;
|
|
63
|
-
return theme.shadows.defaultShadow;
|
|
64
|
-
}, ";overflow:hidden;", StyledBarWrapper, ":nth-child(5n+1){", _ref11 => {
|
|
65
|
-
let {
|
|
66
|
-
theme
|
|
67
|
-
} = _ref11;
|
|
68
|
-
return `background: linear-gradient(-45deg, ${theme.colors.neutral.backgroundWeak}1A 25%,
|
|
28
|
+
})("width:100%;display:flex;background-color:", ({
|
|
29
|
+
theme
|
|
30
|
+
}) => theme.colors.neutral.backgroundWeak, ";border-radius:", ({
|
|
31
|
+
theme
|
|
32
|
+
}) => theme.radii.default, ";box-shadow:", ({
|
|
33
|
+
theme
|
|
34
|
+
}) => theme.shadows.defaultShadow, ";overflow:hidden;", StyledBarWrapper, ":nth-child(5n+1){", ({
|
|
35
|
+
theme
|
|
36
|
+
}) => `background: linear-gradient(-45deg, ${theme.colors.neutral.backgroundWeak}1A 25%,
|
|
69
37
|
${theme.colors.primary.backgroundStrong} 25%, ${theme.colors.primary.backgroundStrong} 50%,
|
|
70
38
|
${theme.colors.neutral.backgroundWeak}1A 50%, ${theme.colors.neutral.backgroundWeak}1A 75%, ${theme.colors.primary.backgroundStrong}
|
|
71
|
-
75%)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, "
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
let {
|
|
89
|
-
theme
|
|
90
|
-
} = _ref15;
|
|
91
|
-
return theme.colors.neutral.backgroundStrong;
|
|
92
|
-
}, "33 25%,\n transparent 25%\n ),linear-gradient(\n 45deg,\n ", _ref16 => {
|
|
93
|
-
let {
|
|
94
|
-
theme
|
|
95
|
-
} = _ref16;
|
|
96
|
-
return theme.colors.neutral.backgroundStrong;
|
|
97
|
-
}, "33 25%,\n transparent 25%\n ),linear-gradient(\n 315deg,\n ", _ref17 => {
|
|
98
|
-
let {
|
|
99
|
-
theme
|
|
100
|
-
} = _ref17;
|
|
101
|
-
return theme.colors.neutral.backgroundStrong;
|
|
102
|
-
}, "33 25%,\n ", _ref18 => {
|
|
103
|
-
let {
|
|
104
|
-
theme
|
|
105
|
-
} = _ref18;
|
|
106
|
-
return theme.colors.primary.backgroundStrong;
|
|
107
|
-
}, "12 25%\n );background-position:10px 0,10px 0,0 0,0 0;background-size:10px 10px;background-repeat:repeat;}", StyledBarWrapper, ":nth-child(5n+3){", _ref19 => {
|
|
108
|
-
let {
|
|
109
|
-
theme
|
|
110
|
-
} = _ref19;
|
|
111
|
-
return `background: linear-gradient(-45deg, ${theme.colors.neutral.backgroundWeak}1A 25%,
|
|
39
|
+
75%);`, " background-size:30px 30px;background-color:", ({
|
|
40
|
+
theme
|
|
41
|
+
}) => theme.colors.primary.backgroundStrong, ";}", StyledBarWrapper, ":nth-child(5n+2){background-color:", ({
|
|
42
|
+
theme
|
|
43
|
+
}) => theme.colors.primary.backgroundStrong, "D9;background-image:linear-gradient(\n 135deg,\n ", ({
|
|
44
|
+
theme
|
|
45
|
+
}) => theme.colors.neutral.backgroundStrong, "33 25%,\n transparent 25%\n ),linear-gradient(\n 225deg,\n ", ({
|
|
46
|
+
theme
|
|
47
|
+
}) => theme.colors.neutral.backgroundStrong, "33 25%,\n transparent 25%\n ),linear-gradient(\n 45deg,\n ", ({
|
|
48
|
+
theme
|
|
49
|
+
}) => theme.colors.neutral.backgroundStrong, "33 25%,\n transparent 25%\n ),linear-gradient(\n 315deg,\n ", ({
|
|
50
|
+
theme
|
|
51
|
+
}) => theme.colors.neutral.backgroundStrong, "33 25%,\n ", ({
|
|
52
|
+
theme
|
|
53
|
+
}) => theme.colors.primary.backgroundStrong, "12 25%\n );background-position:10px 0,10px 0,0 0,0 0;background-size:10px 10px;background-repeat:repeat;}", StyledBarWrapper, ":nth-child(5n+3){", ({
|
|
54
|
+
theme
|
|
55
|
+
}) => `background: linear-gradient(-45deg, ${theme.colors.neutral.backgroundWeak}1A 25%,
|
|
112
56
|
${theme.colors.primary.backgroundStrong}4D 25%, ${theme.colors.primary.backgroundStrong}4D 50%,
|
|
113
57
|
${theme.colors.neutral.backgroundWeak}1A 50%, ${theme.colors.neutral.backgroundWeak}1A 75%, ${theme.colors.primary.backgroundStrong}4D
|
|
114
|
-
75%)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, "
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
let {
|
|
132
|
-
theme
|
|
133
|
-
} = _ref23;
|
|
134
|
-
return theme.colors.neutral.backgroundWeak;
|
|
135
|
-
}, "33 25%,\n transparent 25%\n ),linear-gradient(\n 45deg,\n ", _ref24 => {
|
|
136
|
-
let {
|
|
137
|
-
theme
|
|
138
|
-
} = _ref24;
|
|
139
|
-
return theme.colors.neutral.backgroundWeak;
|
|
140
|
-
}, "33 25%,\n transparent 25%\n ),linear-gradient(\n 315deg,\n ", _ref25 => {
|
|
141
|
-
let {
|
|
142
|
-
theme
|
|
143
|
-
} = _ref25;
|
|
144
|
-
return theme.colors.neutral.backgroundWeak;
|
|
145
|
-
}, "33 25%,\n ", _ref26 => {
|
|
146
|
-
let {
|
|
147
|
-
theme
|
|
148
|
-
} = _ref26;
|
|
149
|
-
return theme.colors.secondary.backgroundStrong;
|
|
150
|
-
}, " 25%\n );background-position:10px 0,10px 0,0 0,0 0;background-size:10px 10px;background-repeat:repeat;}", StyledBarWrapper, ":nth-child(5n+5){", _ref27 => {
|
|
151
|
-
let {
|
|
152
|
-
theme
|
|
153
|
-
} = _ref27;
|
|
154
|
-
return `background: linear-gradient(-45deg, ${theme.colors.neutral.backgroundWeak}40 25%,
|
|
58
|
+
75%);`, " background-size:30px 30px;background-color:", ({
|
|
59
|
+
theme
|
|
60
|
+
}) => theme.colors.secondary.backgroundStrong, ";}", StyledBarWrapper, ":nth-child(5n+4){background-color:", ({
|
|
61
|
+
theme
|
|
62
|
+
}) => theme.colors.secondary.backgroundStrong, ";background-image:linear-gradient(\n 135deg,\n ", ({
|
|
63
|
+
theme
|
|
64
|
+
}) => theme.colors.neutral.backgroundWeak, "33 25%,\n transparent 25%\n ),linear-gradient(\n 225deg,\n ", ({
|
|
65
|
+
theme
|
|
66
|
+
}) => theme.colors.neutral.backgroundWeak, "33 25%,\n transparent 25%\n ),linear-gradient(\n 45deg,\n ", ({
|
|
67
|
+
theme
|
|
68
|
+
}) => theme.colors.neutral.backgroundWeak, "33 25%,\n transparent 25%\n ),linear-gradient(\n 315deg,\n ", ({
|
|
69
|
+
theme
|
|
70
|
+
}) => theme.colors.neutral.backgroundWeak, "33 25%,\n ", ({
|
|
71
|
+
theme
|
|
72
|
+
}) => theme.colors.secondary.backgroundStrong, " 25%\n );background-position:10px 0,10px 0,0 0,0 0;background-size:10px 10px;background-repeat:repeat;}", StyledBarWrapper, ":nth-child(5n+5){", ({
|
|
73
|
+
theme
|
|
74
|
+
}) => `background: linear-gradient(-45deg, ${theme.colors.neutral.backgroundWeak}40 25%,
|
|
155
75
|
${theme.colors.secondary.backgroundStrong}40 25%, ${theme.colors.secondary.backgroundStrong}40 50%,
|
|
156
76
|
${theme.colors.neutral.backgroundWeak}40 50%, ${theme.colors.neutral.backgroundWeak}40 75%, ${theme.colors.secondary.backgroundStrong}40
|
|
157
|
-
75%)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
theme
|
|
161
|
-
} = _ref28;
|
|
162
|
-
return theme.colors.secondary.backgroundStrong;
|
|
163
|
-
}, "BF;}");
|
|
77
|
+
75%);`, " background-size:30px 30px;background-color:", ({
|
|
78
|
+
theme
|
|
79
|
+
}) => theme.colors.secondary.backgroundStrong, "BF;}");
|
|
164
80
|
|
|
165
81
|
/**
|
|
166
82
|
* BarStack is a graphic component that is used to show data in one dimension.
|
|
167
83
|
*/
|
|
168
|
-
const BarStack =
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
value
|
|
178
|
-
} = _ref30;
|
|
179
|
-
return acc + value;
|
|
180
|
-
}, 0), [total, data]);
|
|
84
|
+
const BarStack = ({
|
|
85
|
+
data,
|
|
86
|
+
total,
|
|
87
|
+
className,
|
|
88
|
+
'data-testid': dataTestId
|
|
89
|
+
}) => {
|
|
90
|
+
const computedTotal = useMemo(() => total ?? data.reduce((acc, {
|
|
91
|
+
value
|
|
92
|
+
}) => acc + value, 0), [total, data]);
|
|
181
93
|
return jsx(StyledContainer, {
|
|
182
94
|
"data-testid": dataTestId,
|
|
183
95
|
className: className,
|
|
184
|
-
children: data.map(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
text: tooltip,
|
|
204
|
-
children: jsx(StyledBar, {
|
|
205
|
-
onMouseDown: onMouseDown,
|
|
206
|
-
onMouseUp: onMouseUp,
|
|
207
|
-
onClick: onClick,
|
|
208
|
-
onDoubleClick: onDoubleClick,
|
|
209
|
-
onMouseEnter: onMouseEnter,
|
|
210
|
-
onMouseLeave: onMouseLeave,
|
|
211
|
-
children: text
|
|
212
|
-
})
|
|
213
|
-
}) : jsx(StyledBar, {
|
|
96
|
+
children: data.map(({
|
|
97
|
+
id,
|
|
98
|
+
value,
|
|
99
|
+
text,
|
|
100
|
+
onClick,
|
|
101
|
+
onDoubleClick,
|
|
102
|
+
onMouseEnter,
|
|
103
|
+
onMouseLeave,
|
|
104
|
+
onMouseDown,
|
|
105
|
+
onMouseUp,
|
|
106
|
+
tooltip
|
|
107
|
+
}) => jsx(StyledBarWrapper, {
|
|
108
|
+
style: {
|
|
109
|
+
width: `${value / computedTotal * 100}%`
|
|
110
|
+
},
|
|
111
|
+
children: tooltip ? jsx(Tooltip, {
|
|
112
|
+
id: `tooltip-${id}`,
|
|
113
|
+
text: tooltip,
|
|
114
|
+
children: jsx(StyledBar, {
|
|
214
115
|
onMouseDown: onMouseDown,
|
|
215
116
|
onMouseUp: onMouseUp,
|
|
216
117
|
onClick: onClick,
|
|
@@ -219,8 +120,16 @@ const BarStack = _ref29 => {
|
|
|
219
120
|
onMouseLeave: onMouseLeave,
|
|
220
121
|
children: text
|
|
221
122
|
})
|
|
222
|
-
},
|
|
223
|
-
|
|
123
|
+
}) : jsx(StyledBar, {
|
|
124
|
+
onMouseDown: onMouseDown,
|
|
125
|
+
onMouseUp: onMouseUp,
|
|
126
|
+
onClick: onClick,
|
|
127
|
+
onDoubleClick: onDoubleClick,
|
|
128
|
+
onMouseEnter: onMouseEnter,
|
|
129
|
+
onMouseLeave: onMouseLeave,
|
|
130
|
+
children: text
|
|
131
|
+
})
|
|
132
|
+
}, id))
|
|
224
133
|
});
|
|
225
134
|
};
|
|
226
135
|
|
|
@@ -22,52 +22,42 @@ const StyledOl = /*#__PURE__*/_styled("ol", {
|
|
|
22
22
|
});
|
|
23
23
|
const ItemContainer = /*#__PURE__*/_styled("li", {
|
|
24
24
|
target: "ej0p0s40"
|
|
25
|
-
})("display:inline;&[aria-current='page']{color:",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, ";}&:not(:last-child)::after{content:'\u203A';margin:0 8px;}", _ref2 => {
|
|
31
|
-
let {
|
|
32
|
-
onClick
|
|
33
|
-
} = _ref2;
|
|
34
|
-
return onClick ? `
|
|
25
|
+
})("display:inline;&[aria-current='page']{color:", ({
|
|
26
|
+
theme
|
|
27
|
+
}) => theme.colors.neutral.textWeak, ";}&:not(:last-child)::after{content:'\u203A';margin:0 8px;}", ({
|
|
28
|
+
onClick
|
|
29
|
+
}) => onClick ? `
|
|
35
30
|
cursor: pointer;
|
|
36
31
|
&[aria-disabled="true"] {
|
|
37
32
|
pointer-events: none;
|
|
38
33
|
}
|
|
39
|
-
` :
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
children:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children: contractString(children)
|
|
58
|
-
}) : contractString(children)
|
|
59
|
-
});
|
|
60
|
-
};
|
|
34
|
+
` : ``, ";");
|
|
35
|
+
const Item = ({
|
|
36
|
+
to,
|
|
37
|
+
children,
|
|
38
|
+
disabled = false,
|
|
39
|
+
'aria-current': ariaCurrent,
|
|
40
|
+
onClick,
|
|
41
|
+
step
|
|
42
|
+
}) => jsx(ItemContainer, {
|
|
43
|
+
"aria-disabled": disabled,
|
|
44
|
+
onClick: onClick ? event => onClick(event, step ?? -1) : undefined,
|
|
45
|
+
"aria-current": ariaCurrent,
|
|
46
|
+
children: to ? jsx(Link, {
|
|
47
|
+
sentiment: "primary",
|
|
48
|
+
href: to,
|
|
49
|
+
children: contractString(children)
|
|
50
|
+
}) : contractString(children)
|
|
51
|
+
});
|
|
61
52
|
/**
|
|
62
53
|
* Breadcrumbs component is used to display a navigation path with links to the parent pages.
|
|
63
54
|
*/
|
|
64
|
-
const Breadcrumbs =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} = _ref4;
|
|
55
|
+
const Breadcrumbs = ({
|
|
56
|
+
children,
|
|
57
|
+
selected: selectedProp,
|
|
58
|
+
className,
|
|
59
|
+
'data-testid': dataTestId
|
|
60
|
+
}) => {
|
|
71
61
|
const selected = selectedProp !== undefined ? selectedProp : Children.count(children) - 1;
|
|
72
62
|
return jsx("nav", {
|
|
73
63
|
"aria-label": "breadcrumb",
|
|
@@ -21,11 +21,10 @@ const sizes = {
|
|
|
21
21
|
font-size: 14px;
|
|
22
22
|
`
|
|
23
23
|
};
|
|
24
|
-
const sentimentStyles =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
24
|
+
const sentimentStyles = ({
|
|
25
|
+
theme,
|
|
26
|
+
prominence
|
|
27
|
+
}) => {
|
|
29
28
|
const definedProminence = prominence === PROMINENCES.strong ? capitalize(PROMINENCES.strong) : '';
|
|
30
29
|
const text = `text${definedProminence}`;
|
|
31
30
|
const background = `background${definedProminence}`;
|
|
@@ -50,60 +49,48 @@ const sentimentStyles = _ref => {
|
|
|
50
49
|
`
|
|
51
50
|
};
|
|
52
51
|
};
|
|
53
|
-
const sizeStyles =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} = _ref2;
|
|
57
|
-
return sizes[size];
|
|
58
|
-
};
|
|
52
|
+
const sizeStyles = ({
|
|
53
|
+
size
|
|
54
|
+
}) => sizes[size];
|
|
59
55
|
const StyledContainer = /*#__PURE__*/_styled('div', {
|
|
60
56
|
target: "e11loam60"
|
|
61
|
-
})("display:inline-flex;border-radius:",
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} = _ref4;
|
|
72
|
-
return sentimentStyles({
|
|
73
|
-
theme,
|
|
74
|
-
prominence
|
|
75
|
-
})[sentiment];
|
|
76
|
-
}, " ", sizeStyles, ";");
|
|
57
|
+
})("display:inline-flex;border-radius:", ({
|
|
58
|
+
theme
|
|
59
|
+
}) => theme.radii.circle, ";justify-content:center;align-items:center;", ({
|
|
60
|
+
theme,
|
|
61
|
+
prominence,
|
|
62
|
+
sentiment
|
|
63
|
+
}) => sentimentStyles({
|
|
64
|
+
theme,
|
|
65
|
+
prominence
|
|
66
|
+
})[sentiment], " ", sizeStyles, ";");
|
|
77
67
|
/**
|
|
78
68
|
* Bullet component is used to display a small icon or text with a colored background in a circle.
|
|
79
69
|
*/
|
|
80
|
-
const Bullet =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
};
|
|
70
|
+
const Bullet = ({
|
|
71
|
+
className,
|
|
72
|
+
sentiment = 'neutral',
|
|
73
|
+
size = 'medium',
|
|
74
|
+
icon,
|
|
75
|
+
text,
|
|
76
|
+
tooltip,
|
|
77
|
+
tooltipBaseId,
|
|
78
|
+
'data-testid': dataTestId,
|
|
79
|
+
prominence = 'default'
|
|
80
|
+
}) => jsx(Tooltip, {
|
|
81
|
+
id: tooltipBaseId,
|
|
82
|
+
text: tooltip,
|
|
83
|
+
children: jsx(StyledContainer, {
|
|
84
|
+
sentiment: sentiment,
|
|
85
|
+
size: size,
|
|
86
|
+
className: className,
|
|
87
|
+
"data-testid": dataTestId,
|
|
88
|
+
prominence: prominence,
|
|
89
|
+
children: icon ? jsx(Icon, {
|
|
90
|
+
name: icon,
|
|
91
|
+
size: "50%"
|
|
92
|
+
}) : text
|
|
93
|
+
})
|
|
94
|
+
});
|
|
108
95
|
|
|
109
96
|
export { Bullet, PROMINENCES };
|