@soul-refiner/design-system 0.1.18 → 0.1.20
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/common/date.ts +30 -0
- package/src/common/index.ts +7 -0
- package/src/common/styles.ts +2 -2
- package/src/components/actions/rate/rate.tsx +1 -1
- package/src/components/atoms/box/box.tsx +1 -0
- package/src/components/atoms/typography/heading.tsx +1 -1
- package/src/components/atoms/typography/paragraph.tsx +0 -1
- package/src/components/card/action/action.tsx +106 -0
- package/src/components/card/action/index.ts +2 -0
- package/src/components/card/audio/audio.tsx +175 -0
- package/src/components/card/audio/index.ts +2 -0
- package/src/components/card/card.tsx +49 -0
- package/src/components/card/feature/feature.tsx +248 -0
- package/src/components/card/feature/index.ts +2 -0
- package/src/components/card/index.ts +2 -0
- package/src/components/card/person/index.ts +2 -0
- package/src/components/card/person/person.tsx +96 -0
- package/src/components/card/price/index.ts +2 -0
- package/src/components/card/price/price.tsx +110 -0
- package/src/components/card/regular/index.ts +2 -0
- package/src/components/card/regular/regular.tsx +52 -0
- package/src/components/card/video/index.ts +2 -0
- package/src/components/card/video/video.tsx +167 -0
- package/src/components/card/written/index.ts +2 -0
- package/src/components/card/written/written.tsx +176 -0
- package/src/components/iconography/avatar/avatar.tsx +4 -1
- package/src/components/index.ts +1 -0
- package/src/components/input/date/date.tsx +694 -0
- package/src/components/input/date/index.ts +2 -0
- package/src/components/input/index.ts +2 -0
- package/src/utils/date.ts +118 -0
- package/src/utils/index.ts +13 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Box, H, P } from 'components';
|
|
4
|
+
|
|
5
|
+
export interface PersonCardProps {
|
|
6
|
+
actions?: React.ReactElement | React.ReactElement[];
|
|
7
|
+
href: string;
|
|
8
|
+
image: string;
|
|
9
|
+
subtitle: string;
|
|
10
|
+
sx?: string;
|
|
11
|
+
title: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const PersonCard = ({
|
|
15
|
+
actions,
|
|
16
|
+
href,
|
|
17
|
+
image,
|
|
18
|
+
subtitle,
|
|
19
|
+
sx,
|
|
20
|
+
title,
|
|
21
|
+
}: PersonCardProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<Wrapper $image={image} as={href ? 'a' : 'div'}>
|
|
24
|
+
<Person $sx={sx}>
|
|
25
|
+
<Shadow>
|
|
26
|
+
<img src={image} alt="" />
|
|
27
|
+
</Shadow>
|
|
28
|
+
<Figcaption>
|
|
29
|
+
<H as="span" $bold $color="white" $fontSize={24} $lineHeight={36}>
|
|
30
|
+
{title}
|
|
31
|
+
</H>
|
|
32
|
+
<P as="span" $color="white" $fontSize={14} $lineHeight={20}>
|
|
33
|
+
{subtitle}
|
|
34
|
+
</P>
|
|
35
|
+
{actions && (
|
|
36
|
+
<Box $display="flex" $dir="row" $gap={8} sx="margin-top: 16px;">
|
|
37
|
+
{React.Children.toArray(actions)}
|
|
38
|
+
</Box>
|
|
39
|
+
)}
|
|
40
|
+
</Figcaption>
|
|
41
|
+
</Person>
|
|
42
|
+
</Wrapper>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const Wrapper = styled.div<{
|
|
47
|
+
$image: string;
|
|
48
|
+
}>`
|
|
49
|
+
width: 312px;
|
|
50
|
+
height: 400px;
|
|
51
|
+
display: block;
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
|
|
55
|
+
img {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
border-radius: 16px;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
const Shadow = styled.div`
|
|
63
|
+
border-radius: 16px;
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0px;
|
|
66
|
+
left: 0px;
|
|
67
|
+
right: 0px;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 66.67%, #000 98.25%),
|
|
71
|
+
transparent 50% / cover no-repeat;
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
const Person = styled.figure<{
|
|
75
|
+
$sx?: string;
|
|
76
|
+
}>`
|
|
77
|
+
position: relative;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
margin: 0px;
|
|
81
|
+
border-radius: 16px;
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: flex-end;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
|
|
86
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
const Figcaption = styled.figcaption`
|
|
90
|
+
position: relative;
|
|
91
|
+
width: 100%;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
padding: 16px 24px;
|
|
96
|
+
`;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Box, H, P } from 'components';
|
|
4
|
+
import { Checkmark } from 'icons';
|
|
5
|
+
|
|
6
|
+
export interface PriceCardProps {
|
|
7
|
+
actions: React.ReactElement;
|
|
8
|
+
content: string;
|
|
9
|
+
features: string[];
|
|
10
|
+
featureTitle: string;
|
|
11
|
+
price: string;
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const PriceCard = ({
|
|
16
|
+
actions,
|
|
17
|
+
content,
|
|
18
|
+
featureTitle,
|
|
19
|
+
features,
|
|
20
|
+
price,
|
|
21
|
+
title,
|
|
22
|
+
}: PriceCardProps) => {
|
|
23
|
+
const id = React.useId();
|
|
24
|
+
return (
|
|
25
|
+
<Price>
|
|
26
|
+
<Box
|
|
27
|
+
$align="stretch"
|
|
28
|
+
$display="flex"
|
|
29
|
+
$dir="column"
|
|
30
|
+
$gap={24}
|
|
31
|
+
sx={`
|
|
32
|
+
padding: 24px 48px;
|
|
33
|
+
background-color: var(--color-grey-10);
|
|
34
|
+
border-radius: 16px 16px 0px 0px;
|
|
35
|
+
`}
|
|
36
|
+
>
|
|
37
|
+
<H
|
|
38
|
+
as="h6"
|
|
39
|
+
$fontSize={24}
|
|
40
|
+
$lineHeight={36}
|
|
41
|
+
$semiBold
|
|
42
|
+
$textAlign="center"
|
|
43
|
+
>
|
|
44
|
+
{title}
|
|
45
|
+
</H>
|
|
46
|
+
<Box $dir="column">
|
|
47
|
+
<H
|
|
48
|
+
as="p"
|
|
49
|
+
$bold
|
|
50
|
+
$fontSize={32}
|
|
51
|
+
$lineHeight={48}
|
|
52
|
+
$textClampLines={5}
|
|
53
|
+
$textAlign="center"
|
|
54
|
+
>
|
|
55
|
+
{price}
|
|
56
|
+
</H>
|
|
57
|
+
<P as="span" $color="grey-4" $textAlign="center">
|
|
58
|
+
/month
|
|
59
|
+
</P>
|
|
60
|
+
</Box>
|
|
61
|
+
{actions}
|
|
62
|
+
</Box>
|
|
63
|
+
<Box
|
|
64
|
+
sx="padding: 16px 24px; position: relative;"
|
|
65
|
+
$display="flex"
|
|
66
|
+
$dir="column"
|
|
67
|
+
>
|
|
68
|
+
<P sx="padding: 16px 0px;">{content}</P>
|
|
69
|
+
<Divider />
|
|
70
|
+
<Box sx="padding: 16px 0px;" $dir="column" $gap={8}>
|
|
71
|
+
<P $color="grey-2" $mediumBold>
|
|
72
|
+
{featureTitle}
|
|
73
|
+
</P>
|
|
74
|
+
{features.map((item, index) => (
|
|
75
|
+
<Box key={id + index.toString(36)} $align="center" $gap={12}>
|
|
76
|
+
<Checkmark
|
|
77
|
+
color="green-5"
|
|
78
|
+
sx="padding: 2px; border-radius: 50%; background-color: var(--color-green-9);"
|
|
79
|
+
/>
|
|
80
|
+
<P $fontSize={14} $lineHeight={20}>
|
|
81
|
+
{item}
|
|
82
|
+
</P>
|
|
83
|
+
</Box>
|
|
84
|
+
))}
|
|
85
|
+
</Box>
|
|
86
|
+
</Box>
|
|
87
|
+
</Price>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const Price = styled.figure`
|
|
92
|
+
margin: 0px;
|
|
93
|
+
padding: 0px;
|
|
94
|
+
width: 280px;
|
|
95
|
+
height: fit-content;
|
|
96
|
+
border-radius: 16px;
|
|
97
|
+
box-shadow: var(--elevation-2);
|
|
98
|
+
user-select: none;
|
|
99
|
+
|
|
100
|
+
&:hover {
|
|
101
|
+
border: 1px solid var(--color-primary-blue-3);
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
const Divider = styled.div`
|
|
106
|
+
height: 1px;
|
|
107
|
+
width: 100%;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
background-color: var(--color-grey-9);
|
|
110
|
+
`;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Box } from 'components';
|
|
4
|
+
|
|
5
|
+
export interface RegularCardProps extends React.PropsWithChildren {
|
|
6
|
+
href?: string;
|
|
7
|
+
image: string;
|
|
8
|
+
sx?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const RegularCard = ({
|
|
12
|
+
children,
|
|
13
|
+
href,
|
|
14
|
+
image,
|
|
15
|
+
sx,
|
|
16
|
+
}: RegularCardProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<Wrapper $isLink={!!href} $sx={sx} as={href ? 'a' : 'div'} href={href}>
|
|
19
|
+
<img src={image} alt="" />
|
|
20
|
+
<Box $dir="column" $padding={24}>
|
|
21
|
+
{children}
|
|
22
|
+
</Box>
|
|
23
|
+
</Wrapper>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const Wrapper = styled.div<{
|
|
28
|
+
$isLink: boolean;
|
|
29
|
+
$sx?: string;
|
|
30
|
+
}>`
|
|
31
|
+
position: relative;
|
|
32
|
+
display: block;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
box-shadow: var(--elevation-1);
|
|
36
|
+
border-radius: 16px;
|
|
37
|
+
background-color: var(--color-white);
|
|
38
|
+
|
|
39
|
+
${({ $isLink }) =>
|
|
40
|
+
$isLink
|
|
41
|
+
? `
|
|
42
|
+
&:hover {
|
|
43
|
+
border: 1px solid var(--color-primary-blue-3);
|
|
44
|
+
}`
|
|
45
|
+
: ''}
|
|
46
|
+
|
|
47
|
+
img {
|
|
48
|
+
border-radius: 16px 16px 0px 0px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
52
|
+
`;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Box, H, P, Rate } from 'components';
|
|
4
|
+
|
|
5
|
+
export interface VideoEpisodeCardProps {
|
|
6
|
+
actions: React.ReactElement[];
|
|
7
|
+
actionDropdown?: React.ReactElement;
|
|
8
|
+
content: string;
|
|
9
|
+
cta: React.ReactElement;
|
|
10
|
+
href: string;
|
|
11
|
+
image: string;
|
|
12
|
+
logo?: React.ReactElement;
|
|
13
|
+
numRating: number;
|
|
14
|
+
rating: number;
|
|
15
|
+
subtitle: string;
|
|
16
|
+
supportLabel?: string;
|
|
17
|
+
sx?: string;
|
|
18
|
+
title: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const VideoEpisodeCard = ({
|
|
22
|
+
actions,
|
|
23
|
+
actionDropdown,
|
|
24
|
+
content,
|
|
25
|
+
cta,
|
|
26
|
+
href,
|
|
27
|
+
image,
|
|
28
|
+
logo,
|
|
29
|
+
numRating,
|
|
30
|
+
rating,
|
|
31
|
+
subtitle,
|
|
32
|
+
supportLabel,
|
|
33
|
+
sx,
|
|
34
|
+
title,
|
|
35
|
+
}: VideoEpisodeCardProps) => {
|
|
36
|
+
const hasLogo = !!logo;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Wrapper $sx={sx} href={href}>
|
|
40
|
+
<Figure>
|
|
41
|
+
{actionDropdown && <DropdownWrapper>{actionDropdown}</DropdownWrapper>}
|
|
42
|
+
<img className="thumbnail" src={image} alt="" />
|
|
43
|
+
<Figcaption>
|
|
44
|
+
<Box $display="block" className="hidden">
|
|
45
|
+
{cta}
|
|
46
|
+
</Box>
|
|
47
|
+
<Box $align="center" $dir="row" $gap={16}>
|
|
48
|
+
{logo}
|
|
49
|
+
<Box $dir="column">
|
|
50
|
+
<H $color="grey-2" $semiBold $fontSize={hasLogo ? 18 : 16}>
|
|
51
|
+
{title}
|
|
52
|
+
</H>
|
|
53
|
+
<P $color="grey-4" $fontSize={12} $lineHeight={16}>
|
|
54
|
+
{subtitle}
|
|
55
|
+
</P>
|
|
56
|
+
</Box>
|
|
57
|
+
{supportLabel && (
|
|
58
|
+
<P
|
|
59
|
+
className="not-hover"
|
|
60
|
+
$color="grey-4"
|
|
61
|
+
$fontSize={12}
|
|
62
|
+
$lineHeight={16}
|
|
63
|
+
sx="margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;"
|
|
64
|
+
>
|
|
65
|
+
{supportLabel}
|
|
66
|
+
</P>
|
|
67
|
+
)}
|
|
68
|
+
</Box>
|
|
69
|
+
<P
|
|
70
|
+
$color="grey-5"
|
|
71
|
+
$fontSize={14}
|
|
72
|
+
$lineHeight={20}
|
|
73
|
+
$mediumBold
|
|
74
|
+
$textClampLines={4}
|
|
75
|
+
className="hidden"
|
|
76
|
+
>
|
|
77
|
+
{content}
|
|
78
|
+
</P>
|
|
79
|
+
<Box className="hidden" $align="center" $dir="row">
|
|
80
|
+
<Rate isRateable={false} percent={rating} size="small" />
|
|
81
|
+
<P
|
|
82
|
+
$color="grey-4"
|
|
83
|
+
$fontSize={12}
|
|
84
|
+
$lineHeight={16}
|
|
85
|
+
sx="margin: 0px auto 0px 4px;"
|
|
86
|
+
>
|
|
87
|
+
({numRating})
|
|
88
|
+
</P>
|
|
89
|
+
<Box $align="center" $dir="row" $gap={8}>
|
|
90
|
+
{React.Children.toArray(actions)}
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
</Figcaption>
|
|
94
|
+
</Figure>
|
|
95
|
+
</Wrapper>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const Wrapper = styled.a<{ $sx?: string }>`
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
display: block;
|
|
102
|
+
position: relative;
|
|
103
|
+
user-select: none;
|
|
104
|
+
|
|
105
|
+
.hidden {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
.hidden {
|
|
111
|
+
display: flex;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.not-hover {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.thumbnail {
|
|
119
|
+
border-radius: 16px 16px 0px 0px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
figure {
|
|
123
|
+
aspect-ratio: 410 / 414;
|
|
124
|
+
box-shadow: var(--elevation-3);
|
|
125
|
+
background: linear-gradient(
|
|
126
|
+
0deg,
|
|
127
|
+
#ffffff 50%,
|
|
128
|
+
rgba(255, 255, 255, 0.85) 55%,
|
|
129
|
+
rgba(255, 255, 255, 0.1) 80%
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
figcaption {
|
|
134
|
+
margin-top: -40px;
|
|
135
|
+
padding: 24px;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
140
|
+
`;
|
|
141
|
+
|
|
142
|
+
const Figure = styled.figure`
|
|
143
|
+
max-width: 410px;
|
|
144
|
+
margin: 0px;
|
|
145
|
+
border-radius: 16px;
|
|
146
|
+
|
|
147
|
+
.thumbnail {
|
|
148
|
+
position: relative;
|
|
149
|
+
z-index: -1;
|
|
150
|
+
width: 100%;
|
|
151
|
+
aspect-ratio: 410 / 239;
|
|
152
|
+
border-radius: 16px;
|
|
153
|
+
}
|
|
154
|
+
`;
|
|
155
|
+
|
|
156
|
+
const Figcaption = styled.figcaption`
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-flow: column nowrap;
|
|
159
|
+
gap: 8px;
|
|
160
|
+
padding: 8px;
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
const DropdownWrapper = styled.div`
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 8px;
|
|
166
|
+
right: 8px;
|
|
167
|
+
`;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Box, H, P, Rate } from 'components';
|
|
4
|
+
|
|
5
|
+
export interface WrittenEpisodeCardProps {
|
|
6
|
+
actions: React.ReactElement[];
|
|
7
|
+
actionDropdown?: React.ReactElement;
|
|
8
|
+
content: string;
|
|
9
|
+
cta: React.ReactElement;
|
|
10
|
+
href: string;
|
|
11
|
+
image: string;
|
|
12
|
+
logo?: React.ReactElement;
|
|
13
|
+
numRating: number;
|
|
14
|
+
rating: number;
|
|
15
|
+
subtitle: string;
|
|
16
|
+
supportLabel?: string;
|
|
17
|
+
sx?: string;
|
|
18
|
+
title: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const WrittenEpisodeCard = ({
|
|
22
|
+
actions,
|
|
23
|
+
actionDropdown,
|
|
24
|
+
content,
|
|
25
|
+
cta,
|
|
26
|
+
href,
|
|
27
|
+
image,
|
|
28
|
+
logo,
|
|
29
|
+
numRating,
|
|
30
|
+
rating,
|
|
31
|
+
subtitle,
|
|
32
|
+
supportLabel,
|
|
33
|
+
sx,
|
|
34
|
+
title,
|
|
35
|
+
}: WrittenEpisodeCardProps) => {
|
|
36
|
+
const hasLogo = !!logo;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Wrapper $sx={sx} href={href}>
|
|
40
|
+
<Figure>
|
|
41
|
+
{actionDropdown && <DropdownWrapper>{actionDropdown}</DropdownWrapper>}
|
|
42
|
+
<img className="thumbnail" src={image} alt="" />
|
|
43
|
+
<Figcaption>
|
|
44
|
+
<Box $display="block" className="hidden">
|
|
45
|
+
{cta}
|
|
46
|
+
</Box>
|
|
47
|
+
<Box $align="center" $dir="row" $gap={16}>
|
|
48
|
+
{logo}
|
|
49
|
+
<Box $dir="column">
|
|
50
|
+
<H $color="grey-2" $semiBold $fontSize={hasLogo ? 18 : 16}>
|
|
51
|
+
{title}
|
|
52
|
+
</H>
|
|
53
|
+
<P $color="grey-4" $fontSize={12} $lineHeight={16}>
|
|
54
|
+
{subtitle}
|
|
55
|
+
</P>
|
|
56
|
+
</Box>
|
|
57
|
+
{supportLabel && (
|
|
58
|
+
<P
|
|
59
|
+
className="not-hover"
|
|
60
|
+
$color="grey-4"
|
|
61
|
+
$fontSize={12}
|
|
62
|
+
$lineHeight={16}
|
|
63
|
+
sx="margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;"
|
|
64
|
+
>
|
|
65
|
+
{supportLabel}
|
|
66
|
+
</P>
|
|
67
|
+
)}
|
|
68
|
+
</Box>
|
|
69
|
+
<P
|
|
70
|
+
$color="grey-5"
|
|
71
|
+
$fontSize={14}
|
|
72
|
+
$lineHeight={20}
|
|
73
|
+
$mediumBold
|
|
74
|
+
$textClampLines={6}
|
|
75
|
+
className="hidden inline"
|
|
76
|
+
>
|
|
77
|
+
{content}
|
|
78
|
+
</P>
|
|
79
|
+
<Box className="hidden" $align="center" $dir="row">
|
|
80
|
+
<Rate isRateable={false} percent={rating} size="small" />
|
|
81
|
+
<P
|
|
82
|
+
$color="grey-4"
|
|
83
|
+
$fontSize={12}
|
|
84
|
+
$lineHeight={16}
|
|
85
|
+
sx="margin: 0px auto 0px 4px;"
|
|
86
|
+
>
|
|
87
|
+
({numRating})
|
|
88
|
+
</P>
|
|
89
|
+
<Box $align="center" $dir="row" $gap={8}>
|
|
90
|
+
{React.Children.toArray(actions)}
|
|
91
|
+
</Box>
|
|
92
|
+
</Box>
|
|
93
|
+
</Figcaption>
|
|
94
|
+
</Figure>
|
|
95
|
+
</Wrapper>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const Wrapper = styled.a<{ $sx?: string }>`
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
display: block;
|
|
102
|
+
position: relative;
|
|
103
|
+
user-select: none;
|
|
104
|
+
|
|
105
|
+
figure {
|
|
106
|
+
max-width: 228px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.hidden {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:hover {
|
|
114
|
+
.hidden {
|
|
115
|
+
display: flex;
|
|
116
|
+
|
|
117
|
+
&.inline {
|
|
118
|
+
display: -webkit-box;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.not-hover {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.thumbnail {
|
|
127
|
+
border-radius: 16px 16px 0px 0px;
|
|
128
|
+
aspect-ratio: 228 / 228;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
figure {
|
|
132
|
+
max-width: 280px;
|
|
133
|
+
aspect-ratio: 280 / 434;
|
|
134
|
+
box-shadow: var(--elevation-3);
|
|
135
|
+
background: linear-gradient(
|
|
136
|
+
0deg,
|
|
137
|
+
#ffffff 50%,
|
|
138
|
+
rgba(255, 255, 255, 0.85) 55%,
|
|
139
|
+
rgba(255, 255, 255, 0.1) 80%
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
figcaption {
|
|
144
|
+
margin-top: -80px;
|
|
145
|
+
padding: 24px;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
${({ $sx }) => ($sx ? $sx : '')};
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
const Figure = styled.figure`
|
|
153
|
+
margin: 0px;
|
|
154
|
+
border-radius: 16px;
|
|
155
|
+
|
|
156
|
+
.thumbnail {
|
|
157
|
+
border-radius: 16px;
|
|
158
|
+
position: relative;
|
|
159
|
+
z-index: -1;
|
|
160
|
+
width: 100%;
|
|
161
|
+
aspect-ratio: 228 / 326;
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
|
|
165
|
+
const Figcaption = styled.figcaption`
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-flow: column nowrap;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
padding: 8px;
|
|
170
|
+
`;
|
|
171
|
+
|
|
172
|
+
const DropdownWrapper = styled.div`
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 8px;
|
|
175
|
+
right: 8px;
|
|
176
|
+
`;
|
|
@@ -186,9 +186,11 @@ const Container = styled.div<{
|
|
|
186
186
|
$size: number;
|
|
187
187
|
href?: string;
|
|
188
188
|
}>`
|
|
189
|
+
flex-shrink: 0;
|
|
189
190
|
display: flex;
|
|
190
191
|
flex-flow: row nowrap;
|
|
191
|
-
cursor:
|
|
192
|
+
cursor: ${({ as }) =>
|
|
193
|
+
as && (as === 'a' || as === 'button') ? 'pointer' : 'initial'};
|
|
192
194
|
padding: 0px;
|
|
193
195
|
border: 0px;
|
|
194
196
|
position: relative;
|
|
@@ -196,6 +198,7 @@ const Container = styled.div<{
|
|
|
196
198
|
|
|
197
199
|
> img,
|
|
198
200
|
> svg {
|
|
201
|
+
flex-shrink: 0;
|
|
199
202
|
border-radius: 50%;
|
|
200
203
|
overflow: hidden;
|
|
201
204
|
object-fit: cover;
|