@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,154 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { forwardRef, useMemo, useRef } from 'react';
|
|
3
|
+
import { Checkbox } from '../Checkbox/index.js';
|
|
4
|
+
import { Radio } from '../Radio/index.js';
|
|
5
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
6
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
const Container = /*#__PURE__*/_styled("div", {
|
|
9
|
+
target: "e1s5n3hj1"
|
|
10
|
+
})("display:inline-flex;flex-direction:column;align-items:start;padding:", _ref => {
|
|
11
|
+
let {
|
|
12
|
+
theme
|
|
13
|
+
} = _ref;
|
|
14
|
+
return theme.space['2'];
|
|
15
|
+
}, ";border-radius:", _ref2 => {
|
|
16
|
+
let {
|
|
17
|
+
theme
|
|
18
|
+
} = _ref2;
|
|
19
|
+
return theme.radii.default;
|
|
20
|
+
}, ";transition:border-color 200ms ease,box-shadow 200ms ease;cursor:pointer;border:1px solid ", _ref3 => {
|
|
21
|
+
let {
|
|
22
|
+
theme
|
|
23
|
+
} = _ref3;
|
|
24
|
+
return theme.colors.neutral.borderWeak;
|
|
25
|
+
}, ";color:", _ref4 => {
|
|
26
|
+
let {
|
|
27
|
+
theme
|
|
28
|
+
} = _ref4;
|
|
29
|
+
return theme.colors.neutral.text;
|
|
30
|
+
}, ";&[data-checked='true']{border:1px solid ", _ref5 => {
|
|
31
|
+
let {
|
|
32
|
+
theme
|
|
33
|
+
} = _ref5;
|
|
34
|
+
return theme.colors.primary.borderWeak;
|
|
35
|
+
}, ";}&[data-error='true']{border:1px solid ", _ref6 => {
|
|
36
|
+
let {
|
|
37
|
+
theme
|
|
38
|
+
} = _ref6;
|
|
39
|
+
return theme.colors.danger.border;
|
|
40
|
+
}, ";}&[data-disabled='true']{border:1px solid ", _ref7 => {
|
|
41
|
+
let {
|
|
42
|
+
theme
|
|
43
|
+
} = _ref7;
|
|
44
|
+
return theme.colors.neutral.borderWeakDisabled;
|
|
45
|
+
}, ";color:", _ref8 => {
|
|
46
|
+
let {
|
|
47
|
+
theme
|
|
48
|
+
} = _ref8;
|
|
49
|
+
return theme.colors.neutral.textDisabled;
|
|
50
|
+
}, ";background:", _ref9 => {
|
|
51
|
+
let {
|
|
52
|
+
theme
|
|
53
|
+
} = _ref9;
|
|
54
|
+
return theme.colors.neutral.backgroundDisabled;
|
|
55
|
+
}, ";cursor:not-allowed;}&:hover,&:focus-within,&:active{&:not([data-error='true']):not([data-disabled='true']){border:1px solid ", _ref10 => {
|
|
56
|
+
let {
|
|
57
|
+
theme
|
|
58
|
+
} = _ref10;
|
|
59
|
+
return theme.colors.primary.borderWeak;
|
|
60
|
+
}, ";&[data-cheked='false']{box-shadow:", _ref11 => {
|
|
61
|
+
let {
|
|
62
|
+
theme
|
|
63
|
+
} = _ref11;
|
|
64
|
+
return theme.shadows.hoverPrimary;
|
|
65
|
+
}, ";}}}");
|
|
66
|
+
const StyledElement = element => /*#__PURE__*/_styled(element, {
|
|
67
|
+
shouldForwardProp: prop => !['showTick', 'hasLabel'].includes(prop),
|
|
68
|
+
target: "e1s5n3hj0"
|
|
69
|
+
})("display:inline-flex;align-items:start;&[data-checked='true']{color:", _ref12 => {
|
|
70
|
+
let {
|
|
71
|
+
theme
|
|
72
|
+
} = _ref12;
|
|
73
|
+
return theme.colors.primary.textWeak;
|
|
74
|
+
}, ";}&[data-error='true']{color:", _ref13 => {
|
|
75
|
+
let {
|
|
76
|
+
theme
|
|
77
|
+
} = _ref13;
|
|
78
|
+
return theme.colors.danger.text;
|
|
79
|
+
}, ";}&[aria-disabled='true']{color:", _ref14 => {
|
|
80
|
+
let {
|
|
81
|
+
theme
|
|
82
|
+
} = _ref14;
|
|
83
|
+
return theme.colors.neutral.textDisabled;
|
|
84
|
+
}, ";}input+svg{", _ref15 => {
|
|
85
|
+
let {
|
|
86
|
+
showTick
|
|
87
|
+
} = _ref15;
|
|
88
|
+
return !showTick ? `display: none;` : null;
|
|
89
|
+
}, ";}label{", _ref16 => {
|
|
90
|
+
let {
|
|
91
|
+
showTick,
|
|
92
|
+
hasLabel
|
|
93
|
+
} = _ref16;
|
|
94
|
+
return !showTick && !hasLabel ? `display: none;` : null;
|
|
95
|
+
}, ";}");
|
|
96
|
+
const SelectableCard = /*#__PURE__*/forwardRef((_ref17, ref) => {
|
|
97
|
+
let {
|
|
98
|
+
name,
|
|
99
|
+
value,
|
|
100
|
+
onChange,
|
|
101
|
+
showTick = false,
|
|
102
|
+
type = 'radio',
|
|
103
|
+
checked = false,
|
|
104
|
+
disabled = false,
|
|
105
|
+
children,
|
|
106
|
+
className,
|
|
107
|
+
isError,
|
|
108
|
+
onFocus,
|
|
109
|
+
onBlur,
|
|
110
|
+
tooltip,
|
|
111
|
+
id,
|
|
112
|
+
label,
|
|
113
|
+
'data-testid': dataTestId
|
|
114
|
+
} = _ref17;
|
|
115
|
+
const Element = useMemo(() => StyledElement(type === 'radio' ? Radio : Checkbox), [type]);
|
|
116
|
+
const innerRef = useRef(null);
|
|
117
|
+
return jsx(Tooltip, {
|
|
118
|
+
text: tooltip,
|
|
119
|
+
children: jsxs(Container, {
|
|
120
|
+
onClick: () => {
|
|
121
|
+
if (innerRef?.current) {
|
|
122
|
+
innerRef.current.click();
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
className: className,
|
|
126
|
+
"data-checked": checked,
|
|
127
|
+
"data-disabled": disabled,
|
|
128
|
+
"data-error": isError,
|
|
129
|
+
"data-testid": dataTestId,
|
|
130
|
+
ref: ref,
|
|
131
|
+
children: [jsx(Element, {
|
|
132
|
+
name: name,
|
|
133
|
+
value: value,
|
|
134
|
+
onChange: onChange,
|
|
135
|
+
showTick: showTick,
|
|
136
|
+
checked: checked,
|
|
137
|
+
disabled: disabled,
|
|
138
|
+
error: isError,
|
|
139
|
+
onFocus: onFocus,
|
|
140
|
+
onBlur: onBlur,
|
|
141
|
+
hasLabel: !!label,
|
|
142
|
+
id: id,
|
|
143
|
+
ref: innerRef,
|
|
144
|
+
"data-error": isError,
|
|
145
|
+
children: label
|
|
146
|
+
}), typeof children === 'function' ? children({
|
|
147
|
+
checked,
|
|
148
|
+
disabled
|
|
149
|
+
}) : children]
|
|
150
|
+
})
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
export { SelectableCard };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { Icon } from '../Icon/index.js';
|
|
3
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const StyledIconWrapper = /*#__PURE__*/_styled('div', {
|
|
6
|
+
shouldForwardProp: prop => !['direction'].includes(prop),
|
|
7
|
+
target: "e1d1zom92"
|
|
8
|
+
})("display:flex;flex-direction:", _ref => {
|
|
9
|
+
let {
|
|
10
|
+
direction
|
|
11
|
+
} = _ref;
|
|
12
|
+
return direction === 'vertical' ? 'column' : 'row';
|
|
13
|
+
}, ";align-items:center;");
|
|
14
|
+
const StyledIcon = /*#__PURE__*/_styled(Icon, {
|
|
15
|
+
target: "e1d1zom91"
|
|
16
|
+
})("fill:", _ref2 => {
|
|
17
|
+
let {
|
|
18
|
+
color,
|
|
19
|
+
theme
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return theme.colors[color].border;
|
|
22
|
+
}, ";");
|
|
23
|
+
const StyledHr = /*#__PURE__*/_styled('hr', {
|
|
24
|
+
shouldForwardProp: prop => !['direction', 'thickness', 'color', 'hasIcon'].includes(prop),
|
|
25
|
+
target: "e1d1zom90"
|
|
26
|
+
})("margin:0;border:0;width:", _ref3 => {
|
|
27
|
+
let {
|
|
28
|
+
direction,
|
|
29
|
+
thickness = 1
|
|
30
|
+
} = _ref3;
|
|
31
|
+
return direction === 'vertical' ? `${thickness}px` : 'auto';
|
|
32
|
+
}, ";height:", _ref4 => {
|
|
33
|
+
let {
|
|
34
|
+
direction,
|
|
35
|
+
thickness = 1
|
|
36
|
+
} = _ref4;
|
|
37
|
+
return direction === 'horizontal' ? `${thickness}px` : 'auto';
|
|
38
|
+
}, ";flex-shrink:0;background-color:", _ref5 => {
|
|
39
|
+
let {
|
|
40
|
+
theme,
|
|
41
|
+
color
|
|
42
|
+
} = _ref5;
|
|
43
|
+
return theme.colors[color].border;
|
|
44
|
+
}, ";", _ref6 => {
|
|
45
|
+
let {
|
|
46
|
+
hasIcon
|
|
47
|
+
} = _ref6;
|
|
48
|
+
return hasIcon && `flex: 1;`;
|
|
49
|
+
}, ";");
|
|
50
|
+
const Separator = _ref7 => {
|
|
51
|
+
let {
|
|
52
|
+
direction = 'horizontal',
|
|
53
|
+
thickness = 1,
|
|
54
|
+
color = 'neutral',
|
|
55
|
+
icon,
|
|
56
|
+
className,
|
|
57
|
+
'data-testid': dataTestId
|
|
58
|
+
} = _ref7;
|
|
59
|
+
return icon ? jsxs(StyledIconWrapper, {
|
|
60
|
+
role: "separator",
|
|
61
|
+
"aria-orientation": direction,
|
|
62
|
+
direction: direction,
|
|
63
|
+
className: className,
|
|
64
|
+
"data-testid": dataTestId,
|
|
65
|
+
children: [jsx(StyledHr, {
|
|
66
|
+
direction: direction,
|
|
67
|
+
thickness: thickness,
|
|
68
|
+
color: color,
|
|
69
|
+
hasIcon: true
|
|
70
|
+
}), jsx(StyledIcon, {
|
|
71
|
+
name: icon,
|
|
72
|
+
size: 24,
|
|
73
|
+
color: color
|
|
74
|
+
}), jsx(StyledHr, {
|
|
75
|
+
direction: direction,
|
|
76
|
+
thickness: thickness,
|
|
77
|
+
color: color,
|
|
78
|
+
hasIcon: true
|
|
79
|
+
})]
|
|
80
|
+
}) : jsx(StyledHr, {
|
|
81
|
+
role: "separator",
|
|
82
|
+
"aria-orientation": direction,
|
|
83
|
+
direction: direction,
|
|
84
|
+
thickness: thickness,
|
|
85
|
+
color: color,
|
|
86
|
+
className: className,
|
|
87
|
+
"data-testid": dataTestId
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export { Separator };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { IconSkeleton } from './IconSkeleton.js';
|
|
4
|
+
import { Line } from './Line.js';
|
|
5
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
const StyledLine = /*#__PURE__*/_styled("li", {
|
|
8
|
+
target: "ez87ex11"
|
|
9
|
+
})("display:flex;align-items:center;padding:", _ref => {
|
|
10
|
+
let {
|
|
11
|
+
theme
|
|
12
|
+
} = _ref;
|
|
13
|
+
return `${theme.space['3']} ${theme.space['2']}`;
|
|
14
|
+
}, ";");
|
|
15
|
+
const StyledList = /*#__PURE__*/_styled("ul", {
|
|
16
|
+
target: "ez87ex10"
|
|
17
|
+
})("min-height:200px;width:100%;height:100%;padding:", _ref2 => {
|
|
18
|
+
let {
|
|
19
|
+
theme
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return theme.space['2'];
|
|
22
|
+
}, ";border:1px solid ", _ref3 => {
|
|
23
|
+
let {
|
|
24
|
+
theme
|
|
25
|
+
} = _ref3;
|
|
26
|
+
return theme.colors.neutral.borderWeak;
|
|
27
|
+
}, ";border-radius:", _ref4 => {
|
|
28
|
+
let {
|
|
29
|
+
theme
|
|
30
|
+
} = _ref4;
|
|
31
|
+
return theme.radii.default;
|
|
32
|
+
}, ";margin:0;>", StyledLine, ":not(:last-child){border-bottom:1px solid ", _ref5 => {
|
|
33
|
+
let {
|
|
34
|
+
theme
|
|
35
|
+
} = _ref5;
|
|
36
|
+
return theme.colors.neutral.border;
|
|
37
|
+
}, ";}");
|
|
38
|
+
const Block = _ref6 => {
|
|
39
|
+
let {
|
|
40
|
+
length = 3
|
|
41
|
+
} = _ref6;
|
|
42
|
+
return jsx(StyledList, {
|
|
43
|
+
children: Array.from({
|
|
44
|
+
length
|
|
45
|
+
}, (_, i) => jsx(Fragment, {
|
|
46
|
+
children: jsxs(StyledLine, {
|
|
47
|
+
children: [jsx(IconSkeleton, {}), jsx(Line, {})]
|
|
48
|
+
})
|
|
49
|
+
}, `skeleton-block-${i}`))
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { Block };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { IconSkeleton } from './IconSkeleton.js';
|
|
3
|
+
import { Line } from './Line.js';
|
|
4
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
7
|
+
target: "esrnljb1"
|
|
8
|
+
})("display:grid;grid-template-columns:repeat(", _ref => {
|
|
9
|
+
let {
|
|
10
|
+
col
|
|
11
|
+
} = _ref;
|
|
12
|
+
return col;
|
|
13
|
+
}, ", 1fr);gap:", _ref2 => {
|
|
14
|
+
let {
|
|
15
|
+
theme
|
|
16
|
+
} = _ref2;
|
|
17
|
+
return theme.space['2'];
|
|
18
|
+
}, ";");
|
|
19
|
+
const Block = /*#__PURE__*/_styled("div", {
|
|
20
|
+
target: "esrnljb0"
|
|
21
|
+
})("width:100%;display:flex;align-items:center;padding:", _ref3 => {
|
|
22
|
+
let {
|
|
23
|
+
theme
|
|
24
|
+
} = _ref3;
|
|
25
|
+
return `${theme.space['1']} ${theme.space['2']}`;
|
|
26
|
+
}, ";border:1px solid ", _ref4 => {
|
|
27
|
+
let {
|
|
28
|
+
theme
|
|
29
|
+
} = _ref4;
|
|
30
|
+
return theme.colors.neutral.borderWeak;
|
|
31
|
+
}, ";border-radius:", _ref5 => {
|
|
32
|
+
let {
|
|
33
|
+
theme
|
|
34
|
+
} = _ref5;
|
|
35
|
+
return theme.radii.default;
|
|
36
|
+
}, ";overflow:hidden;");
|
|
37
|
+
const Blocks = _ref6 => {
|
|
38
|
+
let {
|
|
39
|
+
col = 4,
|
|
40
|
+
length = 8
|
|
41
|
+
} = _ref6;
|
|
42
|
+
return jsx(StyledContainer, {
|
|
43
|
+
col: col,
|
|
44
|
+
children: Array.from({
|
|
45
|
+
length
|
|
46
|
+
}, (_, i) => jsxs(Block, {
|
|
47
|
+
children: [jsx(IconSkeleton, {}), jsx(Line, {})]
|
|
48
|
+
}, `skeleton-blocks-${i}`))
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { Blocks };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { IconSkeleton } from './IconSkeleton.js';
|
|
3
|
+
import { Line } from './Line.js';
|
|
4
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
7
|
+
target: "e18cng8b1"
|
|
8
|
+
})("display:grid;grid-template-columns:repeat(", _ref => {
|
|
9
|
+
let {
|
|
10
|
+
col
|
|
11
|
+
} = _ref;
|
|
12
|
+
return col;
|
|
13
|
+
}, ", 1fr);gap:", _ref2 => {
|
|
14
|
+
let {
|
|
15
|
+
theme
|
|
16
|
+
} = _ref2;
|
|
17
|
+
return theme.space['2'];
|
|
18
|
+
}, ";");
|
|
19
|
+
const Block = /*#__PURE__*/_styled("div", {
|
|
20
|
+
target: "e18cng8b0"
|
|
21
|
+
})("height:130px;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;border:1px solid ", _ref3 => {
|
|
22
|
+
let {
|
|
23
|
+
theme
|
|
24
|
+
} = _ref3;
|
|
25
|
+
return theme.colors.neutral.borderWeak;
|
|
26
|
+
}, ";border-radius:", _ref4 => {
|
|
27
|
+
let {
|
|
28
|
+
theme
|
|
29
|
+
} = _ref4;
|
|
30
|
+
return theme.radii.default;
|
|
31
|
+
}, ";overflow:hidden;");
|
|
32
|
+
const BoxWithIcon = _ref5 => {
|
|
33
|
+
let {
|
|
34
|
+
col = 4,
|
|
35
|
+
length = 8
|
|
36
|
+
} = _ref5;
|
|
37
|
+
return jsx(StyledContainer, {
|
|
38
|
+
col: col,
|
|
39
|
+
children: Array.from({
|
|
40
|
+
length
|
|
41
|
+
}, (_, i) => jsxs(Block, {
|
|
42
|
+
children: [jsx(IconSkeleton, {}), jsx(Line, {})]
|
|
43
|
+
}, `skeleton-box-${i}`))
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { BoxWithIcon };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { Line } from './Line.js';
|
|
3
|
+
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
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)."; }
|
|
6
|
+
const CIRCLE_SIZE = 206;
|
|
7
|
+
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
8
|
+
target: "e1bu753f3"
|
|
9
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
10
|
+
name: "zjik7",
|
|
11
|
+
styles: "display:flex"
|
|
12
|
+
} : {
|
|
13
|
+
name: "zjik7",
|
|
14
|
+
styles: "display:flex",
|
|
15
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
+
});
|
|
17
|
+
const StyledSVG = /*#__PURE__*/_styled("svg", {
|
|
18
|
+
target: "e1bu753f2"
|
|
19
|
+
})("height:", CIRCLE_SIZE, "px;width:", CIRCLE_SIZE, "px;transform:rotate(-90deg);");
|
|
20
|
+
const StyledCircle = /*#__PURE__*/_styled("circle", {
|
|
21
|
+
target: "e1bu753f1"
|
|
22
|
+
})("transform-origin:50% 50%;stroke:", _ref => {
|
|
23
|
+
let {
|
|
24
|
+
theme
|
|
25
|
+
} = _ref;
|
|
26
|
+
return theme.colors.neutral.borderWeak;
|
|
27
|
+
}, ";stroke-width:18;stroke-linecap:butt;fill:none;");
|
|
28
|
+
const LineList = /*#__PURE__*/_styled("ul", {
|
|
29
|
+
target: "e1bu753f0"
|
|
30
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
31
|
+
name: "pct5nu",
|
|
32
|
+
styles: "display:grid;list-style:none;gap:16px"
|
|
33
|
+
} : {
|
|
34
|
+
name: "pct5nu",
|
|
35
|
+
styles: "display:grid;list-style:none;gap:16px",
|
|
36
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
37
|
+
});
|
|
38
|
+
const Donut = () => jsxs(StyledContainer, {
|
|
39
|
+
children: [jsx(StyledSVG, {
|
|
40
|
+
children: jsx(StyledCircle, {
|
|
41
|
+
cx: CIRCLE_SIZE / 2,
|
|
42
|
+
cy: CIRCLE_SIZE / 2,
|
|
43
|
+
r: "90"
|
|
44
|
+
})
|
|
45
|
+
}), jsxs(LineList, {
|
|
46
|
+
children: [jsx("li", {
|
|
47
|
+
children: jsx(Line, {})
|
|
48
|
+
}), jsx("li", {
|
|
49
|
+
children: jsx(Line, {})
|
|
50
|
+
}), jsx("li", {
|
|
51
|
+
children: jsx(Line, {})
|
|
52
|
+
}), jsx("li", {
|
|
53
|
+
children: jsx(Line, {})
|
|
54
|
+
})]
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export { Donut };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
|
|
3
|
+
const IconSkeleton = /*#__PURE__*/_styled("div", {
|
|
4
|
+
target: "e1kubpd30"
|
|
5
|
+
})("margin-right:", _ref => {
|
|
6
|
+
let {
|
|
7
|
+
theme
|
|
8
|
+
} = _ref;
|
|
9
|
+
return theme.space['1'];
|
|
10
|
+
}, ";width:", _ref2 => {
|
|
11
|
+
let {
|
|
12
|
+
theme
|
|
13
|
+
} = _ref2;
|
|
14
|
+
return theme.space['4'];
|
|
15
|
+
}, ";height:", _ref3 => {
|
|
16
|
+
let {
|
|
17
|
+
theme
|
|
18
|
+
} = _ref3;
|
|
19
|
+
return theme.space['4'];
|
|
20
|
+
}, ";min-width:", _ref4 => {
|
|
21
|
+
let {
|
|
22
|
+
theme
|
|
23
|
+
} = _ref4;
|
|
24
|
+
return theme.space['4'];
|
|
25
|
+
}, ";border-radius:", _ref5 => {
|
|
26
|
+
let {
|
|
27
|
+
theme
|
|
28
|
+
} = _ref5;
|
|
29
|
+
return theme.radii.large;
|
|
30
|
+
}, ";background-color:", _ref6 => {
|
|
31
|
+
let {
|
|
32
|
+
theme
|
|
33
|
+
} = _ref6;
|
|
34
|
+
return theme.colors.neutral.borderWeak;
|
|
35
|
+
}, ";");
|
|
36
|
+
|
|
37
|
+
export { IconSkeleton };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
|
|
3
|
+
const sizes = [80, 120, 160, 200];
|
|
4
|
+
const randomSize = () => sizes[Math.floor(Math.random() * sizes.length)];
|
|
5
|
+
const Line = /*#__PURE__*/_styled("div", {
|
|
6
|
+
target: "e1denkbe0"
|
|
7
|
+
})("height:12px;width:", () => randomSize(), "px;max-width:100%;border-radius:", _ref => {
|
|
8
|
+
let {
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
|
+
return theme.radii.large;
|
|
12
|
+
}, ";background-color:", _ref2 => {
|
|
13
|
+
let {
|
|
14
|
+
theme
|
|
15
|
+
} = _ref2;
|
|
16
|
+
return theme.colors.neutral.borderWeak;
|
|
17
|
+
}, ";");
|
|
18
|
+
|
|
19
|
+
export { Line };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { Line } from './Line.js';
|
|
3
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
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)."; }
|
|
6
|
+
const StyledItem = /*#__PURE__*/_styled("li", {
|
|
7
|
+
target: "e639qnr2"
|
|
8
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
9
|
+
name: "1t7ed8m",
|
|
10
|
+
styles: "display:flex;align-items:center;height:48px;padding:4px 8px"
|
|
11
|
+
} : {
|
|
12
|
+
name: "1t7ed8m",
|
|
13
|
+
styles: "display:flex;align-items:center;height:48px;padding:4px 8px",
|
|
14
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
15
|
+
});
|
|
16
|
+
const StyledLine = /*#__PURE__*/_styled("div", {
|
|
17
|
+
target: "e639qnr1"
|
|
18
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
19
|
+
name: "82a6rk",
|
|
20
|
+
styles: "flex:1"
|
|
21
|
+
} : {
|
|
22
|
+
name: "82a6rk",
|
|
23
|
+
styles: "flex:1",
|
|
24
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
+
});
|
|
26
|
+
const StyledList = /*#__PURE__*/_styled("ul", {
|
|
27
|
+
target: "e639qnr0"
|
|
28
|
+
})("list-style:none;padding:0;margin:0;>", StyledItem, ":nth-of-type(even){background-color:", _ref => {
|
|
29
|
+
let {
|
|
30
|
+
theme
|
|
31
|
+
} = _ref;
|
|
32
|
+
return theme.colors.neutral.backgroundDisabled;
|
|
33
|
+
}, ";}");
|
|
34
|
+
const Item = _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
col = 3
|
|
37
|
+
} = _ref2;
|
|
38
|
+
return jsx(StyledItem, {
|
|
39
|
+
children: Array.from({
|
|
40
|
+
length: col
|
|
41
|
+
}, (_, i) => jsx(StyledLine, {
|
|
42
|
+
children: jsx(Line, {})
|
|
43
|
+
}, `skeleton-list-col-${i}`))
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const List = _ref3 => {
|
|
47
|
+
let {
|
|
48
|
+
length = 3,
|
|
49
|
+
col = 3
|
|
50
|
+
} = _ref3;
|
|
51
|
+
return jsx(StyledList, {
|
|
52
|
+
children: Array.from({
|
|
53
|
+
length
|
|
54
|
+
}, (_, i) => jsx(Item, {
|
|
55
|
+
col: col
|
|
56
|
+
}, `skeleton-list-${i}`))
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { List };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
5
|
+
target: "e1yrvvrg2"
|
|
6
|
+
})("height:277px;display:grid;grid-template-columns:repeat(", _ref => {
|
|
7
|
+
let {
|
|
8
|
+
length
|
|
9
|
+
} = _ref;
|
|
10
|
+
return length;
|
|
11
|
+
}, ", 1fr);gap:", _ref2 => {
|
|
12
|
+
let {
|
|
13
|
+
theme
|
|
14
|
+
} = _ref2;
|
|
15
|
+
return theme.space['2'];
|
|
16
|
+
}, ";overflow:auto;");
|
|
17
|
+
const StyledCard = /*#__PURE__*/_styled("div", {
|
|
18
|
+
target: "e1yrvvrg1"
|
|
19
|
+
})("border:1px solid ", _ref3 => {
|
|
20
|
+
let {
|
|
21
|
+
theme
|
|
22
|
+
} = _ref3;
|
|
23
|
+
return theme.colors.neutral.borderWeak;
|
|
24
|
+
}, ";border-radius:", _ref4 => {
|
|
25
|
+
let {
|
|
26
|
+
theme
|
|
27
|
+
} = _ref4;
|
|
28
|
+
return theme.radii.default;
|
|
29
|
+
}, ";width:239px;height:261px;overflow:hidden;");
|
|
30
|
+
const StyledBanner = /*#__PURE__*/_styled("div", {
|
|
31
|
+
target: "e1yrvvrg0"
|
|
32
|
+
})("border:1px solid ", _ref5 => {
|
|
33
|
+
let {
|
|
34
|
+
theme
|
|
35
|
+
} = _ref5;
|
|
36
|
+
return theme.colors.neutral.borderWeak;
|
|
37
|
+
}, ";background-color:", _ref6 => {
|
|
38
|
+
let {
|
|
39
|
+
theme
|
|
40
|
+
} = _ref6;
|
|
41
|
+
return theme.colors.neutral.borderWeak;
|
|
42
|
+
}, ";width:100%;height:33%;");
|
|
43
|
+
const Slider = _ref7 => {
|
|
44
|
+
let {
|
|
45
|
+
length = 4
|
|
46
|
+
} = _ref7;
|
|
47
|
+
return jsx(StyledContainer, {
|
|
48
|
+
length: length,
|
|
49
|
+
children: Array.from({
|
|
50
|
+
length
|
|
51
|
+
}, (_, i) => jsx(StyledCard, {
|
|
52
|
+
children: jsx(StyledBanner, {})
|
|
53
|
+
}, `skeleton-slider-card-${i}`))
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { Slider };
|