@soul-refiner/design-system 1.7.13 → 1.7.14
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/dist/components/card/audio/audio.d.ts +2 -1
- package/dist/components/card/audio/audio.js +16 -2
- package/dist/components/card/card.d.ts +1 -0
- package/dist/components/card/card.js +10 -0
- package/dist/components/card/video/video.d.ts +2 -1
- package/dist/components/card/video/video.js +16 -3
- package/dist/components/card/written/written.d.ts +2 -1
- package/dist/components/card/written/written.js +17 -4
- package/package.json +1 -1
|
@@ -8,10 +8,11 @@ export interface AudioEpisodeCardProps {
|
|
|
8
8
|
image: string;
|
|
9
9
|
logo?: React.ReactElement;
|
|
10
10
|
numRating: number;
|
|
11
|
+
purchaseText?: string;
|
|
11
12
|
rating: number;
|
|
12
13
|
subtitle: string;
|
|
13
14
|
supportLabel?: string;
|
|
14
15
|
sx?: string;
|
|
15
16
|
title: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const AudioEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, rating, subtitle, supportLabel, sx, title, }: AudioEpisodeCardProps) => React.JSX.Element;
|
|
18
|
+
export declare const AudioEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }: AudioEpisodeCardProps) => React.JSX.Element;
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { PurchaseTextWrapper } from '../card';
|
|
5
6
|
import { Box, H, P, Rate } from '../../';
|
|
6
|
-
|
|
7
|
+
import { CartFilled } from '../../../icons/shopping/cart_filled';
|
|
8
|
+
export const AudioEpisodeCard = ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }) => {
|
|
7
9
|
const hasLogo = !!logo;
|
|
8
10
|
return (React.createElement(Wrapper, { "$sx": sx, href: href },
|
|
9
11
|
React.createElement(Figure, null,
|
|
10
12
|
actionDropdown && React.createElement(DropdownWrapper, null, actionDropdown),
|
|
13
|
+
purchaseText && (React.createElement(PurchaseTextWrapper, { className: "not-hover" },
|
|
14
|
+
React.createElement(CartFilled, { color: "yellow-5", size: 24 }),
|
|
15
|
+
React.createElement(P, { "$bold": true, "$color": "white" }, purchaseText))),
|
|
11
16
|
React.createElement(Image, { alt: "", className: "thumbnail", height: 228, quality: 100, src: image, width: 228 }),
|
|
12
17
|
React.createElement(Figcaption, null,
|
|
13
18
|
React.createElement(Box, { "$display": "block", className: "hidden" }, cta),
|
|
14
19
|
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 16 },
|
|
15
20
|
logo,
|
|
16
|
-
React.createElement(Box, { "$dir": "column" },
|
|
21
|
+
React.createElement(Box, { "$dir": "column", "$gap": 4 },
|
|
17
22
|
React.createElement(H, { "$color": "grey-2", "$semiBold": true, "$fontSize": hasLogo ? 18 : 16 }, title),
|
|
18
23
|
React.createElement(P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16 }, subtitle)),
|
|
19
24
|
supportLabel && (React.createElement(P, { className: "not-hover", "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16, sx: "margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;" }, supportLabel))),
|
|
@@ -39,6 +44,10 @@ const Wrapper = styled.a `
|
|
|
39
44
|
figure {
|
|
40
45
|
transition: width 0.3s;
|
|
41
46
|
width: 213px;
|
|
47
|
+
|
|
48
|
+
img {
|
|
49
|
+
box-shadow: var(--elevation-3);
|
|
50
|
+
}
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
.hidden {
|
|
@@ -77,6 +86,10 @@ const Wrapper = styled.a `
|
|
|
77
86
|
rgba(255, 255, 255, 0.85) 55%,
|
|
78
87
|
rgba(255, 255, 255, 0.1) 80%
|
|
79
88
|
);
|
|
89
|
+
|
|
90
|
+
img {
|
|
91
|
+
box-shadow: none;
|
|
92
|
+
}
|
|
80
93
|
}
|
|
81
94
|
|
|
82
95
|
figcaption {
|
|
@@ -97,6 +110,7 @@ const Figure = styled.figure `
|
|
|
97
110
|
position: relative;
|
|
98
111
|
z-index: -1;
|
|
99
112
|
width: 100%;
|
|
113
|
+
height: 225px;
|
|
100
114
|
aspect-ratio: 228 / 228;
|
|
101
115
|
}
|
|
102
116
|
`;
|
|
@@ -13,4 +13,5 @@ export type CardProps = (ActionCardProps | AudioEpisodeCardProps | FeatureCardPr
|
|
|
13
13
|
type: CardType;
|
|
14
14
|
};
|
|
15
15
|
export declare const Card: ({ type, ...rest }: CardProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
export declare const PurchaseTextWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("../atoms/box").BoxProps, never>> & Omit<({ $display, sx, ...args }: import("../atoms/box").BoxProps) => React.JSX.Element, keyof React.Component<any, {}, any>>;
|
|
16
17
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { Box } from '../atoms/box';
|
|
3
5
|
import { ActionCard } from './action';
|
|
4
6
|
import { AudioEpisodeCard } from './audio';
|
|
5
7
|
import { FeatureCard } from './feature';
|
|
@@ -23,3 +25,11 @@ export const Card = ({ type = 'regular', ...rest }) => {
|
|
|
23
25
|
};
|
|
24
26
|
return lookup[type];
|
|
25
27
|
};
|
|
28
|
+
export const PurchaseTextWrapper = styled(Box) `
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 16px;
|
|
31
|
+
left: 16px;
|
|
32
|
+
width: calc(100% - 32px);
|
|
33
|
+
gap: 8px;
|
|
34
|
+
align-items: center;
|
|
35
|
+
`;
|
|
@@ -8,10 +8,11 @@ export interface VideoEpisodeCardProps {
|
|
|
8
8
|
image: string;
|
|
9
9
|
logo?: React.ReactElement;
|
|
10
10
|
numRating: number;
|
|
11
|
+
purchaseText?: string;
|
|
11
12
|
rating: number;
|
|
12
13
|
subtitle: string;
|
|
13
14
|
supportLabel?: string;
|
|
14
15
|
sx?: string;
|
|
15
16
|
title: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const VideoEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, rating, subtitle, supportLabel, sx, title, }: VideoEpisodeCardProps) => React.JSX.Element;
|
|
18
|
+
export declare const VideoEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }: VideoEpisodeCardProps) => React.JSX.Element;
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { PurchaseTextWrapper } from '../card';
|
|
5
6
|
import { Box, H, P, Rate } from '../../';
|
|
6
|
-
|
|
7
|
+
import { CartFilled } from '../../../icons/shopping/cart_filled';
|
|
8
|
+
export const VideoEpisodeCard = ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }) => {
|
|
7
9
|
const hasLogo = !!logo;
|
|
8
10
|
return (React.createElement(Wrapper, { "$sx": sx, href: href },
|
|
9
11
|
React.createElement(Figure, null,
|
|
10
12
|
actionDropdown && React.createElement(DropdownWrapper, null, actionDropdown),
|
|
13
|
+
purchaseText && (React.createElement(PurchaseTextWrapper, { className: "not-hover" },
|
|
14
|
+
React.createElement(CartFilled, { color: "yellow-5", size: 24 }),
|
|
15
|
+
React.createElement(P, { "$bold": true, "$color": "white" }, purchaseText))),
|
|
11
16
|
React.createElement(Image, { alt: "", className: "thumbnail", height: 213, quality: 100, src: image, width: 379 }),
|
|
12
17
|
React.createElement(Figcaption, null,
|
|
13
18
|
React.createElement(Box, { "$display": "block", className: "hidden" }, cta),
|
|
14
19
|
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 16 },
|
|
15
20
|
logo,
|
|
16
|
-
React.createElement(Box, { "$dir": "column" },
|
|
21
|
+
React.createElement(Box, { "$dir": "column", "$gap": 4 },
|
|
17
22
|
React.createElement(H, { "$color": "grey-2", "$semiBold": true, "$fontSize": hasLogo ? 18 : 16 }, title),
|
|
18
23
|
React.createElement(P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16 }, subtitle)),
|
|
19
24
|
supportLabel && (React.createElement(P, { className: "not-hover", "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16, sx: "margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;" }, supportLabel))),
|
|
@@ -40,6 +45,10 @@ const Wrapper = styled.a `
|
|
|
40
45
|
figure {
|
|
41
46
|
transition: width 0.3s;
|
|
42
47
|
width: 379px;
|
|
48
|
+
|
|
49
|
+
img {
|
|
50
|
+
box-shadow: var(--elevation-3);
|
|
51
|
+
}
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
.hidden {
|
|
@@ -72,6 +81,10 @@ const Wrapper = styled.a `
|
|
|
72
81
|
rgba(255, 255, 255, 0.85) 55%,
|
|
73
82
|
rgba(255, 255, 255, 0.1) 80%
|
|
74
83
|
);
|
|
84
|
+
|
|
85
|
+
img {
|
|
86
|
+
box-shadow: none;
|
|
87
|
+
}
|
|
75
88
|
}
|
|
76
89
|
|
|
77
90
|
figcaption {
|
|
@@ -94,7 +107,7 @@ const Figure = styled.figure `
|
|
|
94
107
|
z-index: -1;
|
|
95
108
|
width: 100%;
|
|
96
109
|
aspect-ratio: 379 / 213;
|
|
97
|
-
height:
|
|
110
|
+
height: 225px;
|
|
98
111
|
border-radius: 16px;
|
|
99
112
|
}
|
|
100
113
|
`;
|
|
@@ -8,10 +8,11 @@ export interface WrittenEpisodeCardProps {
|
|
|
8
8
|
image: string;
|
|
9
9
|
logo?: React.ReactElement;
|
|
10
10
|
numRating: number;
|
|
11
|
+
purchaseText?: string;
|
|
11
12
|
rating: number;
|
|
12
13
|
subtitle: string;
|
|
13
14
|
supportLabel?: string;
|
|
14
15
|
sx?: string;
|
|
15
16
|
title: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const WrittenEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, rating, subtitle, supportLabel, sx, title, }: WrittenEpisodeCardProps) => React.JSX.Element;
|
|
18
|
+
export declare const WrittenEpisodeCard: ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }: WrittenEpisodeCardProps) => React.JSX.Element;
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { PurchaseTextWrapper } from '../card';
|
|
5
6
|
import { Box, H, P, Rate } from '../../';
|
|
6
|
-
|
|
7
|
+
import { CartFilled } from '../../../icons/shopping/cart_filled';
|
|
8
|
+
export const WrittenEpisodeCard = ({ actions, actionDropdown, content, cta, href, image, logo, numRating, purchaseText, rating, subtitle, supportLabel, sx, title, }) => {
|
|
7
9
|
const hasLogo = !!logo;
|
|
8
10
|
return (React.createElement(Wrapper, { "$sx": sx, href: href },
|
|
9
11
|
React.createElement(Figure, null,
|
|
10
12
|
actionDropdown && React.createElement(DropdownWrapper, null, actionDropdown),
|
|
13
|
+
purchaseText && (React.createElement(PurchaseTextWrapper, { className: "not-hover" },
|
|
14
|
+
React.createElement(CartFilled, { color: "yellow-5", size: 24, sx: "flex-shrink: 0;" }),
|
|
15
|
+
React.createElement(P, { "$bold": true, "$color": "white" }, purchaseText))),
|
|
11
16
|
React.createElement(Image, { alt: "", className: "thumbnail", height: 228, quality: 100, src: image, width: 176 }),
|
|
12
17
|
React.createElement(Figcaption, null,
|
|
13
18
|
React.createElement(Box, { "$display": "block", className: "hidden" }, cta),
|
|
14
19
|
React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 16 },
|
|
15
20
|
logo,
|
|
16
|
-
React.createElement(Box, { "$dir": "column" },
|
|
21
|
+
React.createElement(Box, { "$dir": "column", "$gap": 4 },
|
|
17
22
|
React.createElement(H, { "$color": "grey-2", "$semiBold": true, "$fontSize": hasLogo ? 18 : 16 }, title),
|
|
18
23
|
React.createElement(P, { "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16 }, subtitle)),
|
|
19
24
|
supportLabel && (React.createElement(P, { className: "not-hover", "$color": "grey-4", "$fontSize": 12, "$lineHeight": 16, sx: "margin-left: auto; align-self: flex-end; margin-bottom: 2.5px;" }, supportLabel))),
|
|
@@ -32,13 +37,17 @@ const Wrapper = styled.a `
|
|
|
32
37
|
position: relative;
|
|
33
38
|
z-index: 1;
|
|
34
39
|
user-select: none;
|
|
35
|
-
|
|
40
|
+
aspect-ratio: 149 / 275;
|
|
36
41
|
height: 288px;
|
|
37
42
|
transition: transform 0.3s;
|
|
38
43
|
|
|
39
44
|
figure {
|
|
40
45
|
transition: width 0.3s;
|
|
41
46
|
width: 149px;
|
|
47
|
+
|
|
48
|
+
img {
|
|
49
|
+
box-shadow: var(--elevation-3);
|
|
50
|
+
}
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
.hidden {
|
|
@@ -77,6 +86,10 @@ const Wrapper = styled.a `
|
|
|
77
86
|
rgba(255, 255, 255, 0.85) 55%,
|
|
78
87
|
rgba(255, 255, 255, 0.1) 80%
|
|
79
88
|
);
|
|
89
|
+
|
|
90
|
+
img {
|
|
91
|
+
box-shadow: none;
|
|
92
|
+
}
|
|
80
93
|
}
|
|
81
94
|
|
|
82
95
|
figcaption {
|
|
@@ -97,7 +110,7 @@ const Figure = styled.figure `
|
|
|
97
110
|
position: relative;
|
|
98
111
|
z-index: -1;
|
|
99
112
|
width: 100%;
|
|
100
|
-
height:
|
|
113
|
+
height: 225px;
|
|
101
114
|
aspect-ratio: 228 / 326;
|
|
102
115
|
}
|
|
103
116
|
`;
|