@soul-refiner/design-system 0.1.4 → 0.1.5
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/package.json +1 -1
- package/src/components/actions/button/button.tsx +46 -3
- package/src/components/atoms/typography/paragraph.tsx +11 -2
- package/src/components/atoms/typography/typography.tsx +1 -1
- package/src/components/feedback/banner/banner.tsx +116 -0
- package/src/components/feedback/banner/index.ts +2 -0
- package/src/components/feedback/index.ts +4 -0
- package/src/components/feedback/notification/index.ts +0 -0
- package/src/components/feedback/notification/notification.tsx +127 -0
- package/src/components/feedback/toast/index.ts +2 -0
- package/src/components/feedback/toast/toast.tsx +101 -0
- package/src/components/index.ts +4 -14
- package/src/components/surfaces/modal/modal.tsx +9 -12
- package/src/icons/basic/checkmark_filled.tsx +10 -0
- package/src/icons/basic/close_filled.tsx +10 -0
- package/src/icons/basic/index.ts +3 -0
- package/src/icons/basic/move_item.tsx +10 -0
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { Styles } from 'common';
|
|
4
|
-
import {
|
|
4
|
+
import { P } from 'components';
|
|
5
|
+
import { Box } from '../../atoms/box/box';
|
|
5
6
|
import { ChevronDown, ChevronUp } from 'icons';
|
|
6
7
|
|
|
7
8
|
const LG_ICON_SIZE = 20;
|
|
@@ -15,6 +16,18 @@ const SM_FONT_SIZE = 14;
|
|
|
15
16
|
const SM_PADDING = '5px 15px';
|
|
16
17
|
const SM_PADDING_WO_CHILDREN = '7px';
|
|
17
18
|
|
|
19
|
+
type NativeProps = Pick<
|
|
20
|
+
React.HTMLAttributes<HTMLButtonElement>,
|
|
21
|
+
| 'dangerouslySetInnerHTML'
|
|
22
|
+
| 'onClick'
|
|
23
|
+
| 'onMouseDown'
|
|
24
|
+
| 'onMouseDownCapture'
|
|
25
|
+
| 'onMouseEnter'
|
|
26
|
+
| 'onMouseLeave'
|
|
27
|
+
| 'onMouseOut'
|
|
28
|
+
| 'onMouseOver'
|
|
29
|
+
> & { value?: string };
|
|
30
|
+
|
|
18
31
|
type ButtonTypes =
|
|
19
32
|
| 'primary'
|
|
20
33
|
| 'secondary'
|
|
@@ -26,13 +39,15 @@ type ButtonTypes =
|
|
|
26
39
|
type ButtonSize = 'small' | 'large';
|
|
27
40
|
type ButtonShape = 'none' | 'small' | 'medium-small' | 'large';
|
|
28
41
|
|
|
29
|
-
export interface ButtonProps extends React.PropsWithChildren {
|
|
42
|
+
export interface ButtonProps extends NativeProps, React.PropsWithChildren {
|
|
30
43
|
as?: React.ElementType;
|
|
31
44
|
disabled?: boolean;
|
|
45
|
+
fluid?: boolean;
|
|
32
46
|
icon?: React.ReactElement | undefined;
|
|
33
47
|
isDropdownOpen?: boolean;
|
|
34
48
|
roundness?: ButtonShape;
|
|
35
49
|
size?: ButtonSize;
|
|
50
|
+
sx?: string;
|
|
36
51
|
type?: ButtonTypes;
|
|
37
52
|
}
|
|
38
53
|
|
|
@@ -40,10 +55,12 @@ export const Button = ({
|
|
|
40
55
|
as = 'button',
|
|
41
56
|
children,
|
|
42
57
|
disabled,
|
|
58
|
+
fluid = false,
|
|
43
59
|
icon,
|
|
44
60
|
isDropdownOpen,
|
|
45
|
-
size = 'large',
|
|
46
61
|
roundness = 'large',
|
|
62
|
+
size = 'large',
|
|
63
|
+
sx,
|
|
47
64
|
type = 'primary',
|
|
48
65
|
...props
|
|
49
66
|
}: ButtonProps) => {
|
|
@@ -85,12 +102,14 @@ export const Button = ({
|
|
|
85
102
|
disabled={disabled}
|
|
86
103
|
$align="center"
|
|
87
104
|
$display="flex"
|
|
105
|
+
$fluid={fluid}
|
|
88
106
|
$gap={size === 'large' ? 12 : 8}
|
|
89
107
|
$hasChildren={!!children}
|
|
90
108
|
$justify="center"
|
|
91
109
|
$padding={padding}
|
|
92
110
|
$roundness={roundness}
|
|
93
111
|
$size={size}
|
|
112
|
+
$sx={sx}
|
|
94
113
|
{...props}
|
|
95
114
|
>
|
|
96
115
|
{buttonIcon}
|
|
@@ -120,7 +139,9 @@ const Components = (): Record<ButtonTypes, any> => ({
|
|
|
120
139
|
});
|
|
121
140
|
|
|
122
141
|
const base = css<{
|
|
142
|
+
$fluid: boolean;
|
|
123
143
|
$roundness: ButtonShape;
|
|
144
|
+
$sx?: string;
|
|
124
145
|
}>`
|
|
125
146
|
display: flex;
|
|
126
147
|
border-radius: ${({ $roundness }) =>
|
|
@@ -135,6 +156,12 @@ const base = css<{
|
|
|
135
156
|
user-select: none;
|
|
136
157
|
box-sizing: border-box;
|
|
137
158
|
outline: none;
|
|
159
|
+
${({ $fluid }) =>
|
|
160
|
+
$fluid
|
|
161
|
+
? `flex-basis: max-content;
|
|
162
|
+
flex: 1 !important;
|
|
163
|
+
width: max-content`
|
|
164
|
+
: ''}
|
|
138
165
|
|
|
139
166
|
svg {
|
|
140
167
|
fill: currentColor;
|
|
@@ -146,10 +173,14 @@ const base = css<{
|
|
|
146
173
|
color: var(--color-grey-7) !important;
|
|
147
174
|
cursor: unset !important;
|
|
148
175
|
}
|
|
176
|
+
|
|
177
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
149
178
|
`;
|
|
150
179
|
|
|
151
180
|
const Primary = styled(Box)<{
|
|
181
|
+
$fluid: boolean;
|
|
152
182
|
$roundness: ButtonShape;
|
|
183
|
+
$sx?: string;
|
|
153
184
|
}>`
|
|
154
185
|
background-color: var(--color-primary-blue-2);
|
|
155
186
|
color: var(--color-white);
|
|
@@ -171,7 +202,9 @@ const Primary = styled(Box)<{
|
|
|
171
202
|
`;
|
|
172
203
|
|
|
173
204
|
const Secondary = styled(Box)<{
|
|
205
|
+
$fluid: boolean;
|
|
174
206
|
$roundness: ButtonShape;
|
|
207
|
+
$sx?: string;
|
|
175
208
|
}>`
|
|
176
209
|
background-color: var(--color-primary-blue-4);
|
|
177
210
|
color: var(--color-primary-blue-2);
|
|
@@ -192,7 +225,9 @@ const Secondary = styled(Box)<{
|
|
|
192
225
|
`;
|
|
193
226
|
|
|
194
227
|
const Outlined = styled(Box)<{
|
|
228
|
+
$fluid: boolean;
|
|
195
229
|
$roundness: ButtonShape;
|
|
230
|
+
$sx?: string;
|
|
196
231
|
}>`
|
|
197
232
|
background-color: var(--color-white);
|
|
198
233
|
color: var(--color-grey-3);
|
|
@@ -208,7 +243,9 @@ const Outlined = styled(Box)<{
|
|
|
208
243
|
`;
|
|
209
244
|
|
|
210
245
|
const Danger = styled(Box)<{
|
|
246
|
+
$fluid: boolean;
|
|
211
247
|
$roundness: ButtonShape;
|
|
248
|
+
$sx?: string;
|
|
212
249
|
}>`
|
|
213
250
|
background-color: var(--color-red-4);
|
|
214
251
|
color: var(--color-white);
|
|
@@ -230,7 +267,9 @@ const Danger = styled(Box)<{
|
|
|
230
267
|
`;
|
|
231
268
|
|
|
232
269
|
const Text = styled(Box)<{
|
|
270
|
+
$fluid: boolean;
|
|
233
271
|
$roundness: ButtonShape;
|
|
272
|
+
$sx?: string;
|
|
234
273
|
}>`
|
|
235
274
|
background-color: transparent;
|
|
236
275
|
border: 1px solid transparent;
|
|
@@ -255,7 +294,9 @@ const Text = styled(Box)<{
|
|
|
255
294
|
`;
|
|
256
295
|
|
|
257
296
|
const Raised = styled(Box)<{
|
|
297
|
+
$fluid: boolean;
|
|
258
298
|
$roundness: ButtonShape;
|
|
299
|
+
$sx?: string;
|
|
259
300
|
}>`
|
|
260
301
|
background-color: var(--color-white);
|
|
261
302
|
color: var(--color-grey-3);
|
|
@@ -282,7 +323,9 @@ const Raised = styled(Box)<{
|
|
|
282
323
|
`;
|
|
283
324
|
|
|
284
325
|
const Special = styled(Box)<{
|
|
326
|
+
$fluid: boolean;
|
|
285
327
|
$roundness: ButtonShape;
|
|
328
|
+
$sx?: string;
|
|
286
329
|
}>`
|
|
287
330
|
background-color: transparent;
|
|
288
331
|
border: 1px solid transparent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { TypographyProps } from './typography';
|
|
4
|
+
import { Styles } from 'common';
|
|
4
5
|
|
|
5
6
|
export interface CommonProps extends TypographyProps {
|
|
6
7
|
as?: React.ElementType;
|
|
@@ -18,6 +19,7 @@ export const P = ({
|
|
|
18
19
|
$fontSize = 16,
|
|
19
20
|
$lineHeight = 24,
|
|
20
21
|
$textAlign = 'left',
|
|
22
|
+
|
|
21
23
|
...rest
|
|
22
24
|
}: ParagraphProps) => (
|
|
23
25
|
<StyledP
|
|
@@ -31,8 +33,15 @@ export const P = ({
|
|
|
31
33
|
</StyledP>
|
|
32
34
|
);
|
|
33
35
|
|
|
34
|
-
const StyledP = styled
|
|
36
|
+
const StyledP = styled.p<ParagraphProps>`
|
|
37
|
+
margin: 0px;
|
|
38
|
+
font-family: Inter;
|
|
35
39
|
font-size: ${({ $fontSize }) => $fontSize + 'px'};
|
|
36
40
|
line-height: ${({ $lineHeight }) => $lineHeight + 'px'};
|
|
37
41
|
text-align: ${({ $textAlign }) => $textAlign || 'left'};
|
|
42
|
+
${Styles.color}
|
|
43
|
+
${Styles.weight}
|
|
44
|
+
${Styles.typography}
|
|
45
|
+
${Styles.styleable}
|
|
46
|
+
${({ $textClampLines }) => ($textClampLines ? Styles.textClamp : '')}
|
|
38
47
|
`;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Styles } from 'common';
|
|
4
|
+
import { Box, BoxProps, Button, P } from 'components';
|
|
5
|
+
import {
|
|
6
|
+
AlertCircle,
|
|
7
|
+
AlertOctogon,
|
|
8
|
+
AlertTriangle,
|
|
9
|
+
Close,
|
|
10
|
+
Information,
|
|
11
|
+
} from 'icons';
|
|
12
|
+
|
|
13
|
+
type BannerTypes = 'error' | 'info' | 'success' | 'warning';
|
|
14
|
+
|
|
15
|
+
export interface BannerProps {
|
|
16
|
+
content: string;
|
|
17
|
+
href: string;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
title: string;
|
|
20
|
+
type: BannerTypes;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const Banner = ({
|
|
24
|
+
content,
|
|
25
|
+
href,
|
|
26
|
+
onClose,
|
|
27
|
+
title,
|
|
28
|
+
type,
|
|
29
|
+
}: BannerProps) => {
|
|
30
|
+
const iconLookup: Record<BannerTypes, React.ReactElement> = {
|
|
31
|
+
error: <AlertOctogon size={24} />,
|
|
32
|
+
info: <Information size={24} />,
|
|
33
|
+
success: <AlertCircle size={24} />,
|
|
34
|
+
warning: <AlertTriangle size={24} />,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Wrapper as="output" $align="center" $dir="row" $gap={8} $type={type}>
|
|
39
|
+
{iconLookup[type]}
|
|
40
|
+
<Box $dir="row" $gap={4} $align="center">
|
|
41
|
+
<P as="span" $semiBold>
|
|
42
|
+
{title}
|
|
43
|
+
</P>
|
|
44
|
+
<P as="span">{content}</P>
|
|
45
|
+
<P as="a" href={href} $color="primary-blue-2">
|
|
46
|
+
Read more
|
|
47
|
+
</P>
|
|
48
|
+
</Box>
|
|
49
|
+
<Button icon={<Close size={24} />} onClick={onClose} type="special" />
|
|
50
|
+
</Wrapper>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const Wrapper = styled.output<
|
|
55
|
+
BoxProps & {
|
|
56
|
+
$type: BannerTypes;
|
|
57
|
+
}
|
|
58
|
+
>`
|
|
59
|
+
width: 100%;
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
padding: 12px 16px;
|
|
62
|
+
display: flex;
|
|
63
|
+
background-color: ${({ $type }) =>
|
|
64
|
+
$type === 'error'
|
|
65
|
+
? 'var(--color-red-9)'
|
|
66
|
+
: $type === 'info'
|
|
67
|
+
? 'var(--color-blue-9)'
|
|
68
|
+
: $type === 'success'
|
|
69
|
+
? 'var(--color-green-9)'
|
|
70
|
+
: 'var(--color-orange-9)'};
|
|
71
|
+
border-bottom: 1px solid
|
|
72
|
+
${({ $type }) =>
|
|
73
|
+
$type === 'error'
|
|
74
|
+
? 'var(--color-red-4)'
|
|
75
|
+
: $type === 'info'
|
|
76
|
+
? 'var(--color-blue-4)'
|
|
77
|
+
: $type === 'success'
|
|
78
|
+
? 'var(--color-green-3)'
|
|
79
|
+
: 'var(--color-orange-5)'};
|
|
80
|
+
box-shadow: var(--elevation-2);
|
|
81
|
+
border-radius: var(--small);
|
|
82
|
+
|
|
83
|
+
& > svg {
|
|
84
|
+
fill: ${({ $type }) =>
|
|
85
|
+
$type === 'error'
|
|
86
|
+
? 'var(--color-red-4)'
|
|
87
|
+
: $type === 'info'
|
|
88
|
+
? 'var(--color-blue-4)'
|
|
89
|
+
: $type === 'success'
|
|
90
|
+
? 'var(--color-green-3)'
|
|
91
|
+
: 'var(--color-orange-5)'};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
a {
|
|
95
|
+
position: relative;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
|
|
98
|
+
&::after {
|
|
99
|
+
position: absolute;
|
|
100
|
+
content: '';
|
|
101
|
+
width: 100%;
|
|
102
|
+
height: 1px;
|
|
103
|
+
right: 0px;
|
|
104
|
+
left: 0px;
|
|
105
|
+
bottom: 0px;
|
|
106
|
+
background-color: var(--color-primary-blue-2);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
button {
|
|
111
|
+
padding: 0px;
|
|
112
|
+
margin-left: auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
${Styles.flex}
|
|
116
|
+
`;
|
|
File without changes
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Styles } from 'common';
|
|
4
|
+
import { Box, BoxProps, Button, P } from 'components';
|
|
5
|
+
import {
|
|
6
|
+
AlertCircle,
|
|
7
|
+
AlertOctogon,
|
|
8
|
+
AlertTriangle,
|
|
9
|
+
Close,
|
|
10
|
+
Information,
|
|
11
|
+
} from 'icons';
|
|
12
|
+
|
|
13
|
+
type NotificationTypes = 'error' | 'info' | 'success' | 'warning';
|
|
14
|
+
|
|
15
|
+
export interface NotificationProps {
|
|
16
|
+
content: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
sx?: string;
|
|
20
|
+
title: string;
|
|
21
|
+
type: NotificationTypes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const Notification = ({
|
|
25
|
+
content,
|
|
26
|
+
href,
|
|
27
|
+
onClose,
|
|
28
|
+
sx,
|
|
29
|
+
title,
|
|
30
|
+
type,
|
|
31
|
+
}: NotificationProps) => {
|
|
32
|
+
const iconLookup: Record<NotificationTypes, React.ReactElement> = {
|
|
33
|
+
error: <AlertOctogon size={24} />,
|
|
34
|
+
info: <Information size={24} />,
|
|
35
|
+
success: <AlertCircle size={24} />,
|
|
36
|
+
warning: <AlertTriangle size={24} />,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Wrapper
|
|
41
|
+
as={href ? 'a' : 'output'}
|
|
42
|
+
href={href}
|
|
43
|
+
$dir="column"
|
|
44
|
+
$gap={8}
|
|
45
|
+
$sx={sx}
|
|
46
|
+
$type={type}
|
|
47
|
+
>
|
|
48
|
+
<Box $dir="row" $gap={8} $flex={1}>
|
|
49
|
+
{iconLookup[type]}
|
|
50
|
+
<P as="span" $semiBold>
|
|
51
|
+
{title}
|
|
52
|
+
</P>
|
|
53
|
+
<Button
|
|
54
|
+
icon={<Close size={24} />}
|
|
55
|
+
onClick={onClose}
|
|
56
|
+
sx="margin-left: auto;"
|
|
57
|
+
type="special"
|
|
58
|
+
/>
|
|
59
|
+
</Box>
|
|
60
|
+
<Box $align="center" $dir="row" $gap={4}>
|
|
61
|
+
<P as="span" sx="padding-left: 32px;">
|
|
62
|
+
{content}
|
|
63
|
+
</P>
|
|
64
|
+
</Box>
|
|
65
|
+
</Wrapper>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const Wrapper = styled.output<
|
|
70
|
+
BoxProps & {
|
|
71
|
+
$sx?: string;
|
|
72
|
+
$type: NotificationTypes;
|
|
73
|
+
}
|
|
74
|
+
>`
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
width: 100%;
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
padding: 16px;
|
|
79
|
+
display: flex;
|
|
80
|
+
background-color: ${({ $type }) =>
|
|
81
|
+
$type === 'error'
|
|
82
|
+
? 'var(--color-red-9)'
|
|
83
|
+
: $type === 'info'
|
|
84
|
+
? 'var(--color-blue-9)'
|
|
85
|
+
: $type === 'success'
|
|
86
|
+
? 'var(--color-green-9)'
|
|
87
|
+
: 'var(--color-orange-9)'};
|
|
88
|
+
border: 1px solid
|
|
89
|
+
${({ $type }) =>
|
|
90
|
+
$type === 'error'
|
|
91
|
+
? 'var(--color-red-8)'
|
|
92
|
+
: $type === 'info'
|
|
93
|
+
? 'var(--color-blue-8)'
|
|
94
|
+
: $type === 'success'
|
|
95
|
+
? 'var(--color-green-8)'
|
|
96
|
+
: 'var(--color-orange-8)'};
|
|
97
|
+
box-shadow: var(--elevation-2);
|
|
98
|
+
border-radius: var(--small);
|
|
99
|
+
|
|
100
|
+
& > div > svg {
|
|
101
|
+
fill: ${({ $type }) =>
|
|
102
|
+
$type === 'error'
|
|
103
|
+
? 'var(--color-red-4)'
|
|
104
|
+
: $type === 'info'
|
|
105
|
+
? 'var(--color-blue-4)'
|
|
106
|
+
: $type === 'success'
|
|
107
|
+
? 'var(--color-green-3)'
|
|
108
|
+
: 'var(--color-orange-5)'};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
button > svg {
|
|
112
|
+
fill: unset;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
a {
|
|
116
|
+
position: relative;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
button {
|
|
121
|
+
padding: 0px;
|
|
122
|
+
margin-left: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
${Styles.flex}
|
|
126
|
+
${({ $sx }) => ($sx ? $sx : '')}
|
|
127
|
+
`;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Styles } from 'common';
|
|
4
|
+
import { BoxProps, Button, P } from 'components';
|
|
5
|
+
import {
|
|
6
|
+
AlertCircle,
|
|
7
|
+
AlertOctogon,
|
|
8
|
+
AlertTriangle,
|
|
9
|
+
Close,
|
|
10
|
+
Information,
|
|
11
|
+
} from 'icons';
|
|
12
|
+
|
|
13
|
+
type ToastTypes = 'error' | 'info' | 'success' | 'warning';
|
|
14
|
+
|
|
15
|
+
export interface ToastProps {
|
|
16
|
+
content: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
type: ToastTypes;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const Toast = ({ content, href, onClose, type }: ToastProps) => {
|
|
23
|
+
const iconLookup: Record<ToastTypes, React.ReactElement> = {
|
|
24
|
+
error: <AlertOctogon size={24} />,
|
|
25
|
+
info: <Information size={24} />,
|
|
26
|
+
success: <AlertCircle size={24} />,
|
|
27
|
+
warning: <AlertTriangle size={24} />,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Wrapper as="output" $align="center" $dir="row" $gap={8} $type={type}>
|
|
32
|
+
{iconLookup[type]}
|
|
33
|
+
<P as="span">{content}</P>
|
|
34
|
+
{href && (
|
|
35
|
+
<P sx="padding-left: 8px;" as="a" href={href} $color="primary-blue-2">
|
|
36
|
+
View
|
|
37
|
+
</P>
|
|
38
|
+
)}
|
|
39
|
+
<Button icon={<Close size={24} />} onClick={onClose} type="special" />
|
|
40
|
+
</Wrapper>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const Wrapper = styled.output<
|
|
45
|
+
BoxProps & {
|
|
46
|
+
$type: ToastTypes;
|
|
47
|
+
}
|
|
48
|
+
>`
|
|
49
|
+
position: fixed;
|
|
50
|
+
bottom: 24px;
|
|
51
|
+
right: 24px;
|
|
52
|
+
width: 99vw;
|
|
53
|
+
max-width: 476px;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
padding: 12px 16px;
|
|
56
|
+
display: flex;
|
|
57
|
+
box-shadow: var(--elevation-2);
|
|
58
|
+
border-radius: var(--small);
|
|
59
|
+
|
|
60
|
+
&::before {
|
|
61
|
+
position: absolute;
|
|
62
|
+
content: '';
|
|
63
|
+
left: 0px;
|
|
64
|
+
width: 4px;
|
|
65
|
+
height: 100%;
|
|
66
|
+
background-color: ${({ $type }) =>
|
|
67
|
+
$type === 'error'
|
|
68
|
+
? 'var(--color-red-4)'
|
|
69
|
+
: $type === 'info'
|
|
70
|
+
? 'var(--color-blue-4)'
|
|
71
|
+
: $type === 'success'
|
|
72
|
+
? 'var(--color-green-3)'
|
|
73
|
+
: 'var(--color-orange-5)'};
|
|
74
|
+
border-radius: 8px 0px 0px 8px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
& > svg {
|
|
78
|
+
fill: ${({ $type }) =>
|
|
79
|
+
$type === 'error'
|
|
80
|
+
? 'var(--color-red-4)'
|
|
81
|
+
: $type === 'info'
|
|
82
|
+
? 'var(--color-blue-4)'
|
|
83
|
+
: $type === 'success'
|
|
84
|
+
? 'var(--color-green-3)'
|
|
85
|
+
: 'var(--color-orange-5)'};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
a {
|
|
89
|
+
&:hover {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
text-decoration: underline;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
button {
|
|
96
|
+
padding: 0px;
|
|
97
|
+
margin-left: auto;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
${Styles.flex}
|
|
101
|
+
`;
|
package/src/components/index.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export { Box, Display, H, P, Typography } from './atoms';
|
|
4
|
-
export type {
|
|
5
|
-
BoxProps,
|
|
6
|
-
DisplayProps,
|
|
7
|
-
HeadingProps,
|
|
8
|
-
ParagraphProps,
|
|
9
|
-
TypographyProps,
|
|
10
|
-
} from './atoms';
|
|
1
|
+
export * from './actions';
|
|
2
|
+
export * from './atoms';
|
|
11
3
|
export * from './feedback';
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export { Modal } from './surfaces';
|
|
15
|
-
export type { ModalContentProps, ModalProps } from './surfaces';
|
|
4
|
+
export * from './iconography';
|
|
5
|
+
export * from './surfaces';
|
|
@@ -134,12 +134,7 @@ const Wrapper = styled.div<{
|
|
|
134
134
|
: 'display: none;'}
|
|
135
135
|
${({ $backgroundDark }) =>
|
|
136
136
|
$backgroundDark
|
|
137
|
-
? `background:
|
|
138
|
-
79.02% 79.02% at 50% 0%,
|
|
139
|
-
rgba(0, 27, 58, 0.8) 0%,
|
|
140
|
-
rgba(0, 0, 0, 0.8) 100%
|
|
141
|
-
);
|
|
142
|
-
backdrop-filter: blur(5px);
|
|
137
|
+
? `background: rgba(0, 0, 0, 0.5);
|
|
143
138
|
cursor: pointer;`
|
|
144
139
|
: ''}
|
|
145
140
|
position: fixed;
|
|
@@ -160,20 +155,22 @@ const Content = styled.div`
|
|
|
160
155
|
box-shadow: var(--elevation-2);
|
|
161
156
|
border-radius: var(--small);
|
|
162
157
|
cursor: initial;
|
|
158
|
+
padding: 24px;
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
gap: 24px;
|
|
163
162
|
|
|
164
163
|
[class~='header'] {
|
|
165
164
|
display: flex;
|
|
166
165
|
align-items: center;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
> *:first-child {
|
|
166
|
+
|
|
167
|
+
div:first-child {
|
|
170
168
|
flex: 1;
|
|
171
|
-
display: block;
|
|
172
169
|
}
|
|
173
170
|
}
|
|
174
171
|
|
|
175
172
|
[class~='footer'] {
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
position: relative;
|
|
174
|
+
padding-top: 16px;
|
|
178
175
|
}
|
|
179
176
|
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon, IconProps } from 'components';
|
|
3
|
+
|
|
4
|
+
export const CheckmarkFilled = (props: IconProps) => {
|
|
5
|
+
return (
|
|
6
|
+
<Icon {...props}>
|
|
7
|
+
<path d="M10.6 16.6L17.65 9.55L16.25 8.15L10.6 13.8L7.75 10.95L6.35 12.35L10.6 16.6ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />
|
|
8
|
+
</Icon>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon, IconProps } from 'components';
|
|
3
|
+
|
|
4
|
+
export const CloseFilled = (props: IconProps) => {
|
|
5
|
+
return (
|
|
6
|
+
<Icon {...props}>
|
|
7
|
+
<path d="M8.4 17L12 13.4L15.6 17L17 15.6L13.4 12L17 8.4L15.6 7L12 10.6L8.4 7L7 8.4L10.6 12L7 15.6L8.4 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" />
|
|
8
|
+
</Icon>
|
|
9
|
+
);
|
|
10
|
+
};
|
package/src/icons/basic/index.ts
CHANGED
|
@@ -21,12 +21,14 @@ export { CameraAdd } from './camera_add';
|
|
|
21
21
|
export { CameraSlash } from './camera_slash';
|
|
22
22
|
export { Checkmark } from './checkmark';
|
|
23
23
|
export { CheckmarkCircle } from './checkmark_circle';
|
|
24
|
+
export { CheckmarkFilled } from './checkmark_filled';
|
|
24
25
|
export { Checkmarks } from './checkmarks';
|
|
25
26
|
export { Circle } from './circle';
|
|
26
27
|
export { CircleSlash } from './circle_slash';
|
|
27
28
|
export { ClearTextStyle } from './clear_text_style';
|
|
28
29
|
export { Close } from './close';
|
|
29
30
|
export { CloseCircle } from './close_circle';
|
|
31
|
+
export { CloseFilled } from './close_filled';
|
|
30
32
|
export { Copy } from './copy';
|
|
31
33
|
export { Delete } from './delete';
|
|
32
34
|
export { Detail } from './detail';
|
|
@@ -70,6 +72,7 @@ export { Minimize } from './minimize';
|
|
|
70
72
|
export { MicrophoneSlash } from './microphone_slash';
|
|
71
73
|
export { Minus } from './minus';
|
|
72
74
|
export { MinusCircle } from './minus_circle';
|
|
75
|
+
export { MoveItem } from './move_item';
|
|
73
76
|
export { New } from './new';
|
|
74
77
|
export { Newspaper } from './newspaper';
|
|
75
78
|
export { NotePad } from './note_pad';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon, IconProps } from 'components';
|
|
3
|
+
|
|
4
|
+
export const MoveItem = (props: IconProps) => {
|
|
5
|
+
return (
|
|
6
|
+
<Icon {...props}>
|
|
7
|
+
<path d="M8 11H20.15L18.6 9.45L20 8L24 12L20 16L18.6 14.55L20.15 13H8V11ZM15 9V5H5V19H15V15H17V19C17 19.55 16.8042 20.0208 16.4125 20.4125C16.0208 20.8042 15.55 21 15 21H5C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H15C15.55 3 16.0208 3.19583 16.4125 3.5875C16.8042 3.97917 17 4.45 17 5V9H15Z" />
|
|
8
|
+
</Icon>
|
|
9
|
+
);
|
|
10
|
+
};
|