@ultraviolet/ui 1.0.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/LICENSE +189 -0
- package/README.md +64 -0
- package/dist/index.d.ts +2427 -0
- package/dist/react-datepicker/dist/react-datepicker.min.css.js +3 -0
- package/dist/react-toastify/dist/ReactToastify.min.css.js +3 -0
- package/dist/src/components/ActionBar/index.js +55 -0
- package/dist/src/components/Alert/index.js +144 -0
- package/dist/src/components/Avatar/index.js +90 -0
- package/dist/src/components/Badge/index.js +143 -0
- package/dist/src/components/Banner/index.js +117 -0
- package/dist/src/components/BarChart/Tooltip.js +63 -0
- package/dist/src/components/BarChart/index.js +94 -0
- package/dist/src/components/BarStack/index.js +223 -0
- package/dist/src/components/Breadcrumbs/index.js +89 -0
- package/dist/src/components/Bullet/index.js +137 -0
- package/dist/src/components/Button/index.js +303 -0
- package/dist/src/components/Card/index.js +81 -0
- package/dist/src/components/Carousel/index.js +162 -0
- package/dist/src/components/Checkbox/index.js +338 -0
- package/dist/src/components/CopyButton/index.js +92 -0
- package/dist/src/components/DateInput/index.js +250 -0
- package/dist/src/components/EmptyState/index.js +124 -0
- package/dist/src/components/Expandable/index.js +84 -0
- package/dist/src/components/Icon/index.js +350 -0
- package/dist/src/components/LineChart/CustomLegend.js +147 -0
- package/dist/src/components/LineChart/Tooltip.js +58 -0
- package/dist/src/components/LineChart/helpers.js +75 -0
- package/dist/src/components/LineChart/index.js +139 -0
- package/dist/src/components/Link/index.js +159 -0
- package/dist/src/components/List/Body.js +22 -0
- package/dist/src/components/List/Cell.js +38 -0
- package/dist/src/components/List/HeaderCell.js +118 -0
- package/dist/src/components/List/HeaderRow.js +47 -0
- package/dist/src/components/List/ListContext.js +120 -0
- package/dist/src/components/List/Row.js +211 -0
- package/dist/src/components/List/SelectBar.js +52 -0
- package/dist/src/components/List/SkeletonRows.js +54 -0
- package/dist/src/components/List/constants.js +3 -0
- package/dist/src/components/List/index.js +77 -0
- package/dist/src/components/Loader/index.js +87 -0
- package/dist/src/components/Menu/Item.js +122 -0
- package/dist/src/components/Menu/index.js +143 -0
- package/dist/src/components/Modal/index.js +279 -0
- package/dist/src/components/Notice/index.js +33 -0
- package/dist/src/components/NumberInput/helpers.js +6 -0
- package/dist/src/components/NumberInput/index.js +366 -0
- package/dist/src/components/Pagination/getPageNumbers.js +32 -0
- package/dist/src/components/Pagination/index.js +118 -0
- package/dist/src/components/PasswordCheck/index.js +42 -0
- package/dist/src/components/PasswordStrengthMeter/index.js +116 -0
- package/dist/src/components/PieChart/Legends.js +183 -0
- package/dist/src/components/PieChart/Tooltip.js +64 -0
- package/dist/src/components/PieChart/index.js +133 -0
- package/dist/src/components/PieChart/patterns.js +9 -0
- package/dist/src/components/Popover/index.js +131 -0
- package/dist/src/components/ProgressBar/index.js +72 -0
- package/dist/src/components/Radio/index.js +231 -0
- package/dist/src/components/Row/index.js +43 -0
- package/dist/src/components/SelectInput/index.js +662 -0
- package/dist/src/components/SelectableCard/index.js +154 -0
- package/dist/src/components/Separator/index.js +91 -0
- package/dist/src/components/Skeleton/Block.js +53 -0
- package/dist/src/components/Skeleton/Blocks.js +52 -0
- package/dist/src/components/Skeleton/BoxWithIcon.js +47 -0
- package/dist/src/components/Skeleton/Donut.js +58 -0
- package/dist/src/components/Skeleton/IconSkeleton.js +37 -0
- package/dist/src/components/Skeleton/Line.js +19 -0
- package/dist/src/components/Skeleton/List.js +60 -0
- package/dist/src/components/Skeleton/Slider.js +57 -0
- package/dist/src/components/Skeleton/index.js +85 -0
- package/dist/src/components/Snippet/index.js +250 -0
- package/dist/src/components/Stack/index.js +24 -0
- package/dist/src/components/Status/index.js +101 -0
- package/dist/src/components/StepList/index.js +81 -0
- package/dist/src/components/Stepper/index.js +217 -0
- package/dist/src/components/SwitchButton/FocusOverlay.js +47 -0
- package/dist/src/components/SwitchButton/index.js +131 -0
- package/dist/src/components/Table/Body.js +12 -0
- package/dist/src/components/Table/Cell.js +27 -0
- package/dist/src/components/Table/Header.js +21 -0
- package/dist/src/components/Table/HeaderCell.js +119 -0
- package/dist/src/components/Table/HeaderRow.js +35 -0
- package/dist/src/components/Table/Row.js +70 -0
- package/dist/src/components/Table/SelectBar.js +52 -0
- package/dist/src/components/Table/SkeletonRows.js +52 -0
- package/dist/src/components/Table/TableContext.js +91 -0
- package/dist/src/components/Table/index.js +84 -0
- package/dist/src/components/Tabs/Tab.js +165 -0
- package/dist/src/components/Tabs/TabMenu.js +46 -0
- package/dist/src/components/Tabs/TabMenuItem.js +40 -0
- package/dist/src/components/Tabs/TabsContext.js +6 -0
- package/dist/src/components/Tabs/index.js +117 -0
- package/dist/src/components/Tag/index.js +177 -0
- package/dist/src/components/TagInput/index.js +277 -0
- package/dist/src/components/TagList/index.js +110 -0
- package/dist/src/components/Text/index.js +106 -0
- package/dist/src/components/TextInput/index.js +529 -0
- package/dist/src/components/TimeInput/index.js +38 -0
- package/dist/src/components/Toaster/index.js +116 -0
- package/dist/src/components/Toggle/index.js +192 -0
- package/dist/src/components/Tooltip/helpers.js +131 -0
- package/dist/src/components/Tooltip/index.js +275 -0
- package/dist/src/components/VerificationCode/index.js +203 -0
- package/dist/src/helpers/isJSON.js +11 -0
- package/dist/src/helpers/legend.js +13 -0
- package/dist/src/helpers/recursivelyGetChildrenString.js +12 -0
- package/dist/src/index.js +63 -0
- package/dist/src/theme/index.js +25 -0
- package/dist/src/utils/animations.js +250 -0
- package/dist/src/utils/capitalize.js +4 -0
- package/dist/src/utils/ids.js +12 -0
- package/dist/src/utils/normalize.js +36 -0
- package/dist/src/utils/responsive/Breakpoint.js +12 -0
- package/dist/src/utils/responsive/utilities.js +12 -0
- package/package.json +70 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { keyframes } from '@emotion/react';
|
|
3
|
+
import { Block } from './Block.js';
|
|
4
|
+
import { Blocks } from './Blocks.js';
|
|
5
|
+
import { BoxWithIcon } from './BoxWithIcon.js';
|
|
6
|
+
import { Donut } from './Donut.js';
|
|
7
|
+
import { Line } from './Line.js';
|
|
8
|
+
import { List } from './List.js';
|
|
9
|
+
import { Slider } from './Slider.js';
|
|
10
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
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)."; }
|
|
13
|
+
const shineAnimation = keyframes`
|
|
14
|
+
from {
|
|
15
|
+
left: -25%;
|
|
16
|
+
}
|
|
17
|
+
to {
|
|
18
|
+
left: 100%;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
22
|
+
target: "e183x2r81"
|
|
23
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
24
|
+
name: "po0r11",
|
|
25
|
+
styles: "position:relative;display:block;width:100%;overflow:hidden;cursor:progress"
|
|
26
|
+
} : {
|
|
27
|
+
name: "po0r11",
|
|
28
|
+
styles: "position:relative;display:block;width:100%;overflow:hidden;cursor:progress",
|
|
29
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
+
});
|
|
31
|
+
const StyledDiv = /*#__PURE__*/_styled("div", {
|
|
32
|
+
target: "e183x2r80"
|
|
33
|
+
})("position:absolute;top:0;height:100%;width:25%;opacity:0.8;background:linear-gradient(\n 90deg,\n ", _ref => {
|
|
34
|
+
let {
|
|
35
|
+
theme
|
|
36
|
+
} = _ref;
|
|
37
|
+
return theme.colors.neutral.backgroundWeak;
|
|
38
|
+
}, "00,\n ", _ref2 => {
|
|
39
|
+
let {
|
|
40
|
+
theme
|
|
41
|
+
} = _ref2;
|
|
42
|
+
return theme.colors.neutral.backgroundWeak;
|
|
43
|
+
}, "4D,\n ", _ref3 => {
|
|
44
|
+
let {
|
|
45
|
+
theme
|
|
46
|
+
} = _ref3;
|
|
47
|
+
return theme.colors.neutral.backgroundWeak;
|
|
48
|
+
}, "66,\n ", _ref4 => {
|
|
49
|
+
let {
|
|
50
|
+
theme
|
|
51
|
+
} = _ref4;
|
|
52
|
+
return theme.colors.neutral.backgroundWeak;
|
|
53
|
+
}, "4D,\n ", _ref5 => {
|
|
54
|
+
let {
|
|
55
|
+
theme
|
|
56
|
+
} = _ref5;
|
|
57
|
+
return theme.colors.neutral.backgroundWeak;
|
|
58
|
+
}, "00\n );animation:", shineAnimation, " 1s linear infinite;animation-direction:alternate;@media (prefers-reduced-motion: reduce){animation:unset;}");
|
|
59
|
+
const variants = {
|
|
60
|
+
block: Block,
|
|
61
|
+
blocks: Blocks,
|
|
62
|
+
box: BoxWithIcon,
|
|
63
|
+
donut: Donut,
|
|
64
|
+
line: Line,
|
|
65
|
+
list: List,
|
|
66
|
+
slider: Slider
|
|
67
|
+
};
|
|
68
|
+
const Skeleton = _ref6 => {
|
|
69
|
+
let {
|
|
70
|
+
variant = 'blocks',
|
|
71
|
+
length,
|
|
72
|
+
col,
|
|
73
|
+
className
|
|
74
|
+
} = _ref6;
|
|
75
|
+
const Component = variants[variant];
|
|
76
|
+
return jsxs(StyledContainer, {
|
|
77
|
+
className: className,
|
|
78
|
+
children: [jsx(Component, {
|
|
79
|
+
length: length,
|
|
80
|
+
col: col
|
|
81
|
+
}), jsx(StyledDiv, {})]
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export { Skeleton };
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { useState, Children } from 'react';
|
|
3
|
+
import { CopyButton } from '../CopyButton/index.js';
|
|
4
|
+
import { Expandable } from '../Expandable/index.js';
|
|
5
|
+
import { Icon } from '../Icon/index.js';
|
|
6
|
+
import { Stack } from '../Stack/index.js';
|
|
7
|
+
import { Text } from '../Text/index.js';
|
|
8
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
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)."; }
|
|
11
|
+
const LINES_BREAK_REGEX = /\r\n|\r|\n/;
|
|
12
|
+
const PreText = /*#__PURE__*/_styled(Text, {
|
|
13
|
+
shouldForwardProp: prop => !['multiline', 'hasShowMoreButton', 'showMore'].includes(prop),
|
|
14
|
+
target: "e1q0gj908"
|
|
15
|
+
})("margin:0;padding:", _ref => {
|
|
16
|
+
let {
|
|
17
|
+
theme
|
|
18
|
+
} = _ref;
|
|
19
|
+
return theme.space['2'];
|
|
20
|
+
}, ";padding-right:", _ref2 => {
|
|
21
|
+
let {
|
|
22
|
+
theme
|
|
23
|
+
} = _ref2;
|
|
24
|
+
return theme.space['9'];
|
|
25
|
+
}, ";overflow-x:", _ref3 => {
|
|
26
|
+
let {
|
|
27
|
+
hasShowMoreButton,
|
|
28
|
+
showMore
|
|
29
|
+
} = _ref3;
|
|
30
|
+
return hasShowMoreButton && !showMore ? 'hidden' : 'auto';
|
|
31
|
+
}, ";overflow-y:hidden;", _ref4 => {
|
|
32
|
+
let {
|
|
33
|
+
multiline
|
|
34
|
+
} = _ref4;
|
|
35
|
+
return !multiline ? 'white-space: nowrap;' : '';
|
|
36
|
+
}, " height:auto;counter-reset:section;");
|
|
37
|
+
const StyledSpan = /*#__PURE__*/_styled('span', {
|
|
38
|
+
shouldForwardProp: prop => !['linePrefix', 'multiline', 'prefix'].includes(prop),
|
|
39
|
+
target: "e1q0gj907"
|
|
40
|
+
})("display:block;&:after{content:'';", _ref5 => {
|
|
41
|
+
let {
|
|
42
|
+
theme,
|
|
43
|
+
multiline
|
|
44
|
+
} = _ref5;
|
|
45
|
+
return multiline ? `padding: ${theme.space['4']}` : `padding-right: ${theme.space['8']}`;
|
|
46
|
+
}, ";}", _ref6 => {
|
|
47
|
+
let {
|
|
48
|
+
prefix,
|
|
49
|
+
theme
|
|
50
|
+
} = _ref6;
|
|
51
|
+
return prefix ? `
|
|
52
|
+
&:before {
|
|
53
|
+
color: ${theme.colors.neutral.textWeak};
|
|
54
|
+
width: ${prefix === 'lines' ? '35px' : ''};
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
justify-content: flex-end;
|
|
57
|
+
counter-increment: section;
|
|
58
|
+
content: ${prefix === 'lines' ? 'counter(section)' : "'$'"};
|
|
59
|
+
padding-right: ${theme.space['1']};
|
|
60
|
+
}
|
|
61
|
+
` : null;
|
|
62
|
+
}, ";");
|
|
63
|
+
const Container = /*#__PURE__*/_styled('div', {
|
|
64
|
+
shouldForwardProp: prop => !['multiline'].includes(prop),
|
|
65
|
+
target: "e1q0gj906"
|
|
66
|
+
})("position:relative;display:flex;justify-content:start;max-width:100%;", _ref7 => {
|
|
67
|
+
let {
|
|
68
|
+
multiline
|
|
69
|
+
} = _ref7;
|
|
70
|
+
return multiline ? 'width: 100%;' : '';
|
|
71
|
+
}, " background:", _ref8 => {
|
|
72
|
+
let {
|
|
73
|
+
theme
|
|
74
|
+
} = _ref8;
|
|
75
|
+
return theme.colors.neutral.backgroundStrong;
|
|
76
|
+
}, ";border-radius:", _ref9 => {
|
|
77
|
+
let {
|
|
78
|
+
theme
|
|
79
|
+
} = _ref9;
|
|
80
|
+
return theme.radii.default;
|
|
81
|
+
}, ";");
|
|
82
|
+
const StyledStack = /*#__PURE__*/_styled(Stack, {
|
|
83
|
+
target: "e1q0gj905"
|
|
84
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
85
|
+
name: "1d3w5wq",
|
|
86
|
+
styles: "width:100%"
|
|
87
|
+
} : {
|
|
88
|
+
name: "1d3w5wq",
|
|
89
|
+
styles: "width:100%",
|
|
90
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
91
|
+
});
|
|
92
|
+
const ButtonContainer = /*#__PURE__*/_styled('div', {
|
|
93
|
+
shouldForwardProp: prop => !['multiline'].includes(prop),
|
|
94
|
+
target: "e1q0gj904"
|
|
95
|
+
})("position:absolute;top:0;right:0;padding:", _ref10 => {
|
|
96
|
+
let {
|
|
97
|
+
theme,
|
|
98
|
+
multiline
|
|
99
|
+
} = _ref10;
|
|
100
|
+
return `${theme.space[multiline ? '2' : '1']} ${theme.space['2']} 0 0`;
|
|
101
|
+
}, ";background:", _ref11 => {
|
|
102
|
+
let {
|
|
103
|
+
theme
|
|
104
|
+
} = _ref11;
|
|
105
|
+
return theme.colors.neutral.backgroundStrong;
|
|
106
|
+
}, ";border-radius:", _ref12 => {
|
|
107
|
+
let {
|
|
108
|
+
theme
|
|
109
|
+
} = _ref12;
|
|
110
|
+
return theme.radii.default;
|
|
111
|
+
}, ";border:2px solid transparent;", _ref13 => {
|
|
112
|
+
let {
|
|
113
|
+
multiline,
|
|
114
|
+
theme
|
|
115
|
+
} = _ref13;
|
|
116
|
+
return !multiline ? `box-shadow: -27px 0 19px -11px ${theme.colors.neutral.backgroundStrong}` : '';
|
|
117
|
+
}, ";");
|
|
118
|
+
const ShowMoreContainer = /*#__PURE__*/_styled('div', {
|
|
119
|
+
shouldForwardProp: prop => !['showMore'].includes(prop),
|
|
120
|
+
target: "e1q0gj903"
|
|
121
|
+
})("width:100%;box-shadow:", _ref14 => {
|
|
122
|
+
let {
|
|
123
|
+
theme,
|
|
124
|
+
showMore
|
|
125
|
+
} = _ref14;
|
|
126
|
+
return !showMore ? `0px -22px 19px -6px
|
|
127
|
+
${theme.colors.neutral.backgroundStrong}` : 'none';
|
|
128
|
+
}, ";");
|
|
129
|
+
const StyledButton = /*#__PURE__*/_styled("button", {
|
|
130
|
+
target: "e1q0gj902"
|
|
131
|
+
})("width:100%;background:none;border:none;padding:", _ref15 => {
|
|
132
|
+
let {
|
|
133
|
+
theme
|
|
134
|
+
} = _ref15;
|
|
135
|
+
return theme.space['2'];
|
|
136
|
+
}, ";padding-top:", _ref16 => {
|
|
137
|
+
let {
|
|
138
|
+
theme
|
|
139
|
+
} = _ref16;
|
|
140
|
+
return theme.space['1'];
|
|
141
|
+
}, ";cursor:pointer;");
|
|
142
|
+
const AlignCenterText = /*#__PURE__*/_styled(Text, {
|
|
143
|
+
target: "e1q0gj901"
|
|
144
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
145
|
+
name: "1vcob1d",
|
|
146
|
+
styles: "display:flex;justify-content:center;align-items:center"
|
|
147
|
+
} : {
|
|
148
|
+
name: "1vcob1d",
|
|
149
|
+
styles: "display:flex;justify-content:center;align-items:center",
|
|
150
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
151
|
+
});
|
|
152
|
+
const AnimatedArrowIcon = /*#__PURE__*/_styled(Icon, {
|
|
153
|
+
shouldForwardProp: prop => !['showMore'].includes(prop),
|
|
154
|
+
target: "e1q0gj900"
|
|
155
|
+
})("transform:", _ref17 => {
|
|
156
|
+
let {
|
|
157
|
+
showMore
|
|
158
|
+
} = _ref17;
|
|
159
|
+
return showMore ? 'rotate(180deg)' : 'rotate(0deg)';
|
|
160
|
+
}, ";transform-origin:center;transition:transform 300ms ease-in-out;");
|
|
161
|
+
const CodeContent = _ref18 => {
|
|
162
|
+
let {
|
|
163
|
+
children,
|
|
164
|
+
prefix,
|
|
165
|
+
multiline,
|
|
166
|
+
showMore,
|
|
167
|
+
hasShowMoreButton,
|
|
168
|
+
lines
|
|
169
|
+
} = _ref18;
|
|
170
|
+
return jsx(PreText, {
|
|
171
|
+
as: "pre",
|
|
172
|
+
variant: "code",
|
|
173
|
+
multiline: multiline,
|
|
174
|
+
hasShowMoreButton: hasShowMoreButton,
|
|
175
|
+
showMore: showMore,
|
|
176
|
+
children: multiline ? Children.map(lines, child => jsx(StyledSpan, {
|
|
177
|
+
multiline: true,
|
|
178
|
+
prefix: prefix,
|
|
179
|
+
children: child
|
|
180
|
+
})) : jsx(StyledSpan, {
|
|
181
|
+
prefix: prefix,
|
|
182
|
+
children: children
|
|
183
|
+
})
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
const Snippet = _ref19 => {
|
|
187
|
+
let {
|
|
188
|
+
children,
|
|
189
|
+
copyText,
|
|
190
|
+
copiedText,
|
|
191
|
+
showText = 'Show',
|
|
192
|
+
hideText = 'Hide',
|
|
193
|
+
prefix,
|
|
194
|
+
className,
|
|
195
|
+
'data-testid': dataTestId
|
|
196
|
+
} = _ref19;
|
|
197
|
+
const [showMore, setShowMore] = useState(false);
|
|
198
|
+
const lines = children.split(LINES_BREAK_REGEX).filter(Boolean);
|
|
199
|
+
const numberOfLines = lines.length;
|
|
200
|
+
const multiline = numberOfLines > 1;
|
|
201
|
+
const hasShowMoreButton = numberOfLines > 4 && multiline;
|
|
202
|
+
return jsx(Container, {
|
|
203
|
+
multiline: multiline,
|
|
204
|
+
className: className,
|
|
205
|
+
"data-testid": dataTestId,
|
|
206
|
+
children: jsxs(StyledStack, {
|
|
207
|
+
children: [hasShowMoreButton ? jsx(Expandable, {
|
|
208
|
+
minHeight: 120,
|
|
209
|
+
opened: showMore,
|
|
210
|
+
children: jsx(CodeContent, {
|
|
211
|
+
prefix: prefix,
|
|
212
|
+
multiline: multiline,
|
|
213
|
+
lines: lines,
|
|
214
|
+
children: children
|
|
215
|
+
})
|
|
216
|
+
}) : jsx(CodeContent, {
|
|
217
|
+
prefix: prefix,
|
|
218
|
+
multiline: multiline,
|
|
219
|
+
lines: lines,
|
|
220
|
+
children: children
|
|
221
|
+
}), jsx(ButtonContainer, {
|
|
222
|
+
multiline: multiline && numberOfLines > 1,
|
|
223
|
+
children: jsx(CopyButton, {
|
|
224
|
+
value: children,
|
|
225
|
+
copyText: copyText,
|
|
226
|
+
copiedText: copiedText,
|
|
227
|
+
noBorder: true,
|
|
228
|
+
sentiment: "neutral"
|
|
229
|
+
})
|
|
230
|
+
}), hasShowMoreButton ? jsx(ShowMoreContainer, {
|
|
231
|
+
showMore: showMore,
|
|
232
|
+
children: jsx(StyledButton, {
|
|
233
|
+
type: "button",
|
|
234
|
+
onClick: () => setShowMore(!showMore),
|
|
235
|
+
"aria-expanded": showMore,
|
|
236
|
+
children: jsxs(AlignCenterText, {
|
|
237
|
+
as: "span",
|
|
238
|
+
variant: "bodySmallStrong",
|
|
239
|
+
children: [showMore ? hideText : showText, "\xA0", jsx(AnimatedArrowIcon, {
|
|
240
|
+
name: "arrow-down",
|
|
241
|
+
showMore: showMore
|
|
242
|
+
})]
|
|
243
|
+
})
|
|
244
|
+
})
|
|
245
|
+
}) : null]
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
export { Snippet };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
|
|
3
|
+
const Stack = /*#__PURE__*/_styled('div', {
|
|
4
|
+
shouldForwardProp: prop => !['gap', 'direction', 'alignItems', 'justifyContent', 'wrap'].includes(prop),
|
|
5
|
+
target: "ehpbis70"
|
|
6
|
+
})("display:flex;", _ref => {
|
|
7
|
+
let {
|
|
8
|
+
theme,
|
|
9
|
+
gap = 0,
|
|
10
|
+
direction = 'column',
|
|
11
|
+
alignItems = 'normal',
|
|
12
|
+
justifyContent = 'normal',
|
|
13
|
+
wrap = 'nowrap'
|
|
14
|
+
} = _ref;
|
|
15
|
+
return `
|
|
16
|
+
gap: ${theme.space[gap]};
|
|
17
|
+
flex-direction: ${direction};
|
|
18
|
+
align-items: ${alignItems};
|
|
19
|
+
justify-content: ${justifyContent};
|
|
20
|
+
flex-wrap: ${typeof wrap === 'boolean' ? 'wrap' : wrap};
|
|
21
|
+
`;
|
|
22
|
+
}, ";");
|
|
23
|
+
|
|
24
|
+
export { Stack };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
3
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
4
|
+
import { ping } from '../../utils/animations.js';
|
|
5
|
+
|
|
6
|
+
const HEIGHT = '10px';
|
|
7
|
+
const WIDTH = '10px';
|
|
8
|
+
const sentiments = {
|
|
9
|
+
danger: _ref => {
|
|
10
|
+
let {
|
|
11
|
+
theme
|
|
12
|
+
} = _ref;
|
|
13
|
+
return `
|
|
14
|
+
background-color: ${theme.colors.danger.backgroundStrong};
|
|
15
|
+
`;
|
|
16
|
+
},
|
|
17
|
+
info: _ref2 => {
|
|
18
|
+
let {
|
|
19
|
+
theme
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return `
|
|
22
|
+
background-color: ${theme.colors.info.backgroundStrong};
|
|
23
|
+
`;
|
|
24
|
+
},
|
|
25
|
+
neutral: _ref3 => {
|
|
26
|
+
let {
|
|
27
|
+
theme
|
|
28
|
+
} = _ref3;
|
|
29
|
+
return `
|
|
30
|
+
background-color: ${theme.colors.neutral.backgroundStronger};
|
|
31
|
+
`;
|
|
32
|
+
},
|
|
33
|
+
success: _ref4 => {
|
|
34
|
+
let {
|
|
35
|
+
theme
|
|
36
|
+
} = _ref4;
|
|
37
|
+
return `
|
|
38
|
+
background-color: ${theme.colors.success.backgroundStrong};
|
|
39
|
+
`;
|
|
40
|
+
},
|
|
41
|
+
warning: _ref5 => {
|
|
42
|
+
let {
|
|
43
|
+
theme
|
|
44
|
+
} = _ref5;
|
|
45
|
+
return `
|
|
46
|
+
background-color: ${theme.colors.warning.backgroundStrong};
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const StyledCircle = /*#__PURE__*/_styled("span", {
|
|
51
|
+
target: "eny0xmn2"
|
|
52
|
+
})("display:inline-block;width:", WIDTH, ";height:", HEIGHT, ";border-radius:", _ref6 => {
|
|
53
|
+
let {
|
|
54
|
+
theme
|
|
55
|
+
} = _ref6;
|
|
56
|
+
return theme.radii.circle;
|
|
57
|
+
}, ";", _ref7 => {
|
|
58
|
+
let {
|
|
59
|
+
sentiment
|
|
60
|
+
} = _ref7;
|
|
61
|
+
return sentiments[sentiment];
|
|
62
|
+
}, ";");
|
|
63
|
+
const StyledAnimatedCircle = /*#__PURE__*/_styled("span", {
|
|
64
|
+
target: "eny0xmn1"
|
|
65
|
+
})("position:absolute;width:", WIDTH, ";height:", HEIGHT, ";opacity:0.75;border-radius:", _ref8 => {
|
|
66
|
+
let {
|
|
67
|
+
theme
|
|
68
|
+
} = _ref8;
|
|
69
|
+
return theme.radii.circle;
|
|
70
|
+
}, ";animation:", ping, " 1.1s cubic-bezier(0, 0, 0.2, 1) infinite;", _ref9 => {
|
|
71
|
+
let {
|
|
72
|
+
sentiment
|
|
73
|
+
} = _ref9;
|
|
74
|
+
return sentiments[sentiment];
|
|
75
|
+
}, ";");
|
|
76
|
+
const Container = /*#__PURE__*/_styled("span", {
|
|
77
|
+
target: "eny0xmn0"
|
|
78
|
+
})("display:flex;width:", WIDTH, ";height:", HEIGHT, ";");
|
|
79
|
+
const Status = _ref10 => {
|
|
80
|
+
let {
|
|
81
|
+
animated = false,
|
|
82
|
+
className,
|
|
83
|
+
tooltip,
|
|
84
|
+
sentiment,
|
|
85
|
+
'data-testid': dataTestId
|
|
86
|
+
} = _ref10;
|
|
87
|
+
return jsx(Tooltip, {
|
|
88
|
+
text: tooltip,
|
|
89
|
+
children: jsxs(Container, {
|
|
90
|
+
className: className,
|
|
91
|
+
"data-testid": dataTestId,
|
|
92
|
+
children: [animated ? jsx(StyledAnimatedCircle, {
|
|
93
|
+
sentiment: sentiment
|
|
94
|
+
}) : null, jsx(StyledCircle, {
|
|
95
|
+
sentiment: sentiment
|
|
96
|
+
})]
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export { Status };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { Bullet } from '../Bullet/index.js';
|
|
3
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const Steps = /*#__PURE__*/_styled("ul", {
|
|
6
|
+
target: "ewuati22"
|
|
7
|
+
})("list-style:none;padding-left:0;text-align:left;display:flex;flex-direction:column;gap:", _ref => {
|
|
8
|
+
let {
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
|
+
return theme.space['3'];
|
|
12
|
+
}, ";font-size:16px;");
|
|
13
|
+
const Step = /*#__PURE__*/_styled('li', {
|
|
14
|
+
shouldForwardProp: prop => !['disabled'].includes(prop),
|
|
15
|
+
target: "ewuati21"
|
|
16
|
+
})("display:flex;align-items:flex-start;gap:1rem;justify-content:center;color:", _ref2 => {
|
|
17
|
+
let {
|
|
18
|
+
theme,
|
|
19
|
+
disabled
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong;
|
|
22
|
+
}, ";");
|
|
23
|
+
const StyledDiv = /*#__PURE__*/_styled('div', {
|
|
24
|
+
shouldForwardProp: prop => !['size'].includes(prop),
|
|
25
|
+
target: "ewuati20"
|
|
26
|
+
})("flex:1;margin:auto;line-height:", _ref3 => {
|
|
27
|
+
let {
|
|
28
|
+
size
|
|
29
|
+
} = _ref3;
|
|
30
|
+
return size === 'medium' ? '32px' : '24px';
|
|
31
|
+
}, ";font-size:", _ref4 => {
|
|
32
|
+
let {
|
|
33
|
+
size
|
|
34
|
+
} = _ref4;
|
|
35
|
+
return size === 'medium' ? '24px' : '16px';
|
|
36
|
+
}, ";");
|
|
37
|
+
const Item = _ref5 => {
|
|
38
|
+
let {
|
|
39
|
+
bulletText,
|
|
40
|
+
bulletIcon,
|
|
41
|
+
sentiment,
|
|
42
|
+
children,
|
|
43
|
+
size = 'medium',
|
|
44
|
+
disabled = false,
|
|
45
|
+
className
|
|
46
|
+
} = _ref5;
|
|
47
|
+
return jsxs(Step, {
|
|
48
|
+
disabled: disabled,
|
|
49
|
+
className: className,
|
|
50
|
+
children: [bulletIcon ? jsx(Bullet, {
|
|
51
|
+
icon: bulletIcon,
|
|
52
|
+
size: size,
|
|
53
|
+
sentiment: disabled ? 'disabled' : sentiment
|
|
54
|
+
}) : null, bulletText ? jsx(Bullet, {
|
|
55
|
+
text: bulletText,
|
|
56
|
+
size: size,
|
|
57
|
+
sentiment: disabled ? 'disabled' : sentiment
|
|
58
|
+
}) : null, jsx(StyledDiv, {
|
|
59
|
+
size: size,
|
|
60
|
+
children: children
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
66
|
+
*/
|
|
67
|
+
const StepList = _ref6 => {
|
|
68
|
+
let {
|
|
69
|
+
children,
|
|
70
|
+
className,
|
|
71
|
+
'data-testid': dataTestId
|
|
72
|
+
} = _ref6;
|
|
73
|
+
return jsx(Steps, {
|
|
74
|
+
className: className,
|
|
75
|
+
"data-testid": dataTestId,
|
|
76
|
+
children: children
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
StepList.Item = Item;
|
|
80
|
+
|
|
81
|
+
export { StepList };
|