@soul-refiner/design-system 2.14.89 → 2.14.90

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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),r=require("./action/action.js"),s=require("./audio/audio.js"),i=require("./feature/feature.js"),a=require("./person/person.js"),t=require("./price/price.js"),u=require("./regular/regular.js"),o=require("./video/video.js"),d=require("./written/written.js"),j=require("./meeting/meeting.js"),n=require("./course-seats/course-seats.js");exports.Card=({type:p="regular",...c})=>({action:e.jsx(r.ActionCard,{...c}),"audio-episode":e.jsx(s.AudioEpisodeCard,{...c}),feature:e.jsx(i.FeatureCard,{...c}),person:e.jsx(a.PersonCard,{...c}),price:e.jsx(t.PriceCard,{...c}),regular:e.jsx(u.RegularCard,{...c}),"video-episode":e.jsx(o.VideoEpisodeCard,{...c}),"written-episode":e.jsx(d.WrittenEpisodeCard,{...c}),meeting:e.jsx(j.MeetingCard,{...c}),"course-seats":e.jsx(n.CourseSeatsCard,{...c})}[p]);
2
+ "use strict";var e=require("react/jsx-runtime"),r=require("./action/action.js"),s=require("./audio/audio.js"),i=require("./feature/feature.js"),u=require("./person/person.js"),a=require("./price/price.js"),o=require("./regular/regular.js"),t=require("./video/video.js"),d=require("./written/written.js"),j=require("./meeting/meeting.js"),p=require("./course-seats/course-seats.js"),n=require("./simple-course/simple-course.js");exports.Card=({type:c="regular",...C})=>({action:e.jsx(r.ActionCard,{...C}),"audio-episode":e.jsx(s.AudioEpisodeCard,{...C}),feature:e.jsx(i.FeatureCard,{...C}),person:e.jsx(u.PersonCard,{...C}),price:e.jsx(a.PriceCard,{...C}),regular:e.jsx(o.RegularCard,{...C}),"video-episode":e.jsx(t.VideoEpisodeCard,{...C}),"written-episode":e.jsx(d.WrittenEpisodeCard,{...C}),meeting:e.jsx(j.MeetingCard,{...C}),"course-seats":e.jsx(p.CourseSeatsCard,{...C}),"simple-course":e.jsx(n.SimpleCourseCard,{...C})}[c]);
@@ -0,0 +1,158 @@
1
+ "use client";
2
+ "use strict";var e=require("react/jsx-runtime"),i=require("react"),r=require("next/image"),o=require("styled-components"),n=require("../../atoms/box/box.js"),t=require("../../atoms/typography/heading.js"),s=require("../../atoms/typography/paragraph.js"),a=require("../../actions/rate/rate.js"),l=require("../../feedback/tooltip/tooltip.js"),d=require("../../../icons/basic/video.js");require("../../iconography/icon/icon.js");var c=require("../../../icons/arrow/forward_bold.js"),p=require("../../../icons/audio_video/play_display.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/basic/subtask.js"),require("../../../common/colors.js");var x=h(i),u=h(r);const g=o.styled.div`
3
+ cursor: pointer;
4
+ display: inline-block;
5
+ position: relative;
6
+ z-index: 1;
7
+ user-select: none;
8
+ text-decoration: none;
9
+ width: 312px;
10
+ vertical-align: top;
11
+ background-color: var(--color-white);
12
+ border-radius: 16px;
13
+
14
+ &[href] {
15
+ cursor: pointer;
16
+ }
17
+
18
+ &:not([href]) {
19
+ cursor: default;
20
+ }
21
+
22
+ &::after {
23
+ content: '';
24
+ display: block;
25
+ height: 288px;
26
+ visibility: hidden;
27
+ }
28
+
29
+ figure {
30
+ width: 312px;
31
+ background-color: var(--color-white);
32
+ border-radius: 16px;
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ transition: transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;
37
+ }
38
+
39
+ .normal-card {
40
+ opacity: 1;
41
+ visibility: visible;
42
+ box-shadow: var(--elevation-1);
43
+ z-index: 1;
44
+ transition: opacity 0.1s ease, visibility 0s ease, transform 0.3s ease,
45
+ width 0.3s ease, box-shadow 0.3s ease;
46
+ }
47
+
48
+ .hover-card {
49
+ opacity: 0;
50
+ visibility: hidden;
51
+ box-shadow: var(--elevation-3);
52
+ z-index: 2;
53
+ transition: opacity 0.15s ease 0.05s, visibility 0s ease 0.2s,
54
+ transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;
55
+ }
56
+
57
+ @media (min-width: 768px) {
58
+ ${({$hasContent:e,$isClickable:i})=>e&&i&&"\n &:hover {\n z-index: 6;\n\n .normal-card {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.1s ease 0.1s, visibility 0s ease 0.1s, transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;\n }\n\n .hover-card {\n opacity: 1;\n visibility: visible;\n transform: translate(-13px, -55px);\n width: 338px;\n transition: opacity 0.1s ease, visibility 0s ease, transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;\n }\n\n .hover-card figcaption {\n padding: 16px 16px 20px;\n }\n }\n "}
59
+ }
60
+
61
+ ${({$sx:e})=>e||""};
62
+ `,b=o.styled.figure`
63
+ margin: 0px;
64
+ border-radius: 16px;
65
+ overflow: hidden;
66
+ display: flex;
67
+ flex-direction: column;
68
+ border: none;
69
+ gap: 0;
70
+ line-height: 0;
71
+ `,$=o.styled.div`
72
+ position: relative;
73
+ width: 100%;
74
+ height: 180px;
75
+ overflow: hidden;
76
+ flex-shrink: 0;
77
+ background-color: var(--color-white);
78
+ border-radius: 16px;
79
+ border: none;
80
+ outline: none;
81
+
82
+ .hover-card & {
83
+ border-radius: 16px 16px 0 0;
84
+ background-color: #f8fafc;
85
+ }
86
+ `,y=o.styled.video`
87
+ width: 100%;
88
+ height: 100%;
89
+ object-fit: cover;
90
+ display: block;
91
+ border: none;
92
+ outline: none;
93
+ background-color: var(--color-white);
94
+ `,f=o.styled.div`
95
+ position: absolute;
96
+ bottom: 0;
97
+ left: 0;
98
+ right: 0;
99
+ height: 100px;
100
+ background: linear-gradient(
101
+ to bottom,
102
+ rgba(248, 250, 252, 0) 0%,
103
+ rgba(248, 250, 252, 0.1) 20%,
104
+ rgba(248, 250, 252, 0.3) 40%,
105
+ rgba(248, 250, 252, 0.6) 60%,
106
+ rgba(248, 250, 252, 0.85) 80%,
107
+ rgba(248, 250, 252, 1) 100%
108
+ );
109
+ pointer-events: none;
110
+ border: none;
111
+ outline: none;
112
+ `,j=o.styled.figcaption`
113
+ display: flex;
114
+ flex-flow: column nowrap;
115
+ padding: 12px;
116
+ position: relative;
117
+ width: 100%;
118
+ box-sizing: border-box;
119
+ background-color: #f8fafc;
120
+ line-height: normal;
121
+ transition: padding 0.3s ease;
122
+ border: none;
123
+ outline: none;
124
+ `,v=o.styled.div`
125
+ display: flex;
126
+ flex-direction: column;
127
+ gap: 12px;
128
+ position: relative;
129
+ z-index: 2;
130
+ border: none;
131
+ `,m=o.styled.div`
132
+ background-color: var(--color-primary-blue-2);
133
+ border-radius: 10px;
134
+ padding: 2px 6px;
135
+ display: inline-flex;
136
+ align-items: center;
137
+ gap: 4px;
138
+ `,w=o.styled.div`
139
+ display: flex;
140
+ flex-direction: column;
141
+ gap: 12px;
142
+ position: relative;
143
+ z-index: 2;
144
+ `,k=o.styled.button`
145
+ display: flex;
146
+ justify-content: center;
147
+ align-items: center;
148
+ border: none;
149
+ outline: none;
150
+ background-color: transparent;
151
+ padding: 0;
152
+ cursor: pointer;
153
+ color: var(--color-grey-4);
154
+
155
+ &:hover {
156
+ color: var(--color-primary-blue-2);
157
+ }
158
+ `;exports.SimpleCourseCard=({actions:i,content:r,href:o,image:h,numRating:z,price:S,rating:H,subtitle:C,supportLabel:q,supportIcon:P=e.jsx(d.Video,{size:16,color:"white"}),sx:_,title:B,additionalIcons:L,onHoverCardClick:T,trailerUrl:M,onTrailerClick:I,onShareClick:R})=>{const D=!!r,A=!!o,[F,E]=x.default.useState(!1),N=x.default.useRef(null),U=e=>{F&&T&&(e.preventDefault(),T())},V=()=>{D&&A&&(E(!0),N.current&&M&&N.current.play())},G=()=>{E(!1),N.current&&(N.current.pause(),N.current.currentTime=0)},J=e.jsxs(e.Fragment,{children:[e.jsxs(b,{className:"normal-card",children:[e.jsx($,{children:e.jsx(u.default,{alt:"",height:180,quality:100,src:h,width:312})}),e.jsx(j,{children:e.jsxs(v,{children:[e.jsxs(n.Box,{$dir:"column",$gap:4,children:[e.jsx(t.H,{$color:"grey-2",$textClampLines:2,$semiBold:!0,$fontSize:16,$lineHeight:26,dangerouslySetInnerHTML:{__html:B}}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,dangerouslySetInnerHTML:{__html:C}})]}),e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:4,children:[q&&e.jsxs(m,{children:[P,e.jsx(s.P,{$color:"white",$fontSize:10,$lineHeight:14,sx:"font-weight:500",children:q})]}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:H/20}),e.jsx(a.Rate,{isRateable:!1,percent:H,size:"small"}),e.jsxs(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:["(",z,")"]})]}),e.jsx(s.P,{$color:"grey-2",$fontSize:16,$lineHeight:24,$bold:!0,children:S})]})]})})]}),D&&M&&e.jsxs(b,{className:"hover-card",children:[e.jsxs($,{children:[e.jsx(y,{ref:N,muted:!0,loop:!0,playsInline:!0,preload:"auto",children:Array.isArray(M)?M.map((i,r)=>e.jsx("source",{src:i},r)):e.jsx("source",{src:M,type:"video/mp4"})}),e.jsx(f,{})]}),e.jsx(j,{children:e.jsxs(w,{children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",$gap:8,children:[e.jsx(s.P,{$color:"primary-blue-2",$fontSize:16,$lineHeight:24,$bold:!0,children:S}),i&&e.jsx(n.Box,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:i})]}),e.jsxs(n.Box,{$dir:"column",$gap:4,children:[e.jsx(t.H,{$color:"grey-2",$textClampLines:2,$semiBold:!0,$fontSize:16,$lineHeight:26,dangerouslySetInnerHTML:{__html:B}}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,dangerouslySetInnerHTML:{__html:C}})]}),e.jsx(s.P,{$color:"grey-3",$fontSize:14,$lineHeight:20,$textClampLines:4,dangerouslySetInnerHTML:{__html:r}}),e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:8,children:[q&&e.jsxs(m,{children:[P,e.jsx(s.P,{$color:"white",$fontSize:10,$lineHeight:14,sx:"font-weight:500",children:q})]}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:H/20}),e.jsx(a.Rate,{isRateable:!1,percent:H,size:"small"}),e.jsxs(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:["(",z,")"]})]}),e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:8,children:[I&&e.jsx(l.Tooltip,{content:"Trailer",place:"top",children:e.jsx(k,{onClick:e=>{e.preventDefault(),e.stopPropagation(),I()},children:e.jsx(p.PlayDisplay,{size:20})})}),R&&e.jsx(l.Tooltip,{content:"Share",place:"top",children:e.jsx(k,{onClick:e=>{e.preventDefault(),e.stopPropagation(),R()},children:e.jsx(c.ForwardBold,{size:20})})}),L&&L.length>0&&e.jsx(e.Fragment,{children:x.default.Children.toArray(L)})]})]})]})})]})]});return o?e.jsx(g,{as:"a",$sx:_,href:o,$hasContent:D,$isClickable:A,onClick:U,onMouseEnter:V,onMouseLeave:G,children:J}):e.jsx(g,{as:"div",$sx:_,$hasContent:D,$isClickable:A,onMouseEnter:V,onMouseLeave:G,children:J})};
@@ -9,8 +9,9 @@ import { VideoEpisodeCardProps } from './video/video';
9
9
  import { WrittenEpisodeCardProps } from './written/written';
10
10
  import { MeetingCardProps } from './meeting/meeting';
11
11
  import { CourseSeatsCardProps } from './course-seats/course-seats';
12
- type CardType = 'action' | 'audio-episode' | 'feature' | 'person' | 'price' | 'regular' | 'video-episode' | 'written-episode' | 'meeting' | 'course-seats';
13
- export type CardProps = (ActionCardProps | AudioEpisodeCardProps | FeatureCardProps | PersonCardProps | PriceCardProps | RegularCardProps | VideoEpisodeCardProps | WrittenEpisodeCardProps | MeetingCardProps | CourseSeatsCardProps) & {
12
+ import { SimpleCourseCardProps } from './simple-course/simple-course';
13
+ type CardType = 'action' | 'audio-episode' | 'feature' | 'person' | 'price' | 'regular' | 'video-episode' | 'written-episode' | 'meeting' | 'course-seats' | 'simple-course';
14
+ export type CardProps = (ActionCardProps | AudioEpisodeCardProps | FeatureCardProps | PersonCardProps | PriceCardProps | RegularCardProps | VideoEpisodeCardProps | WrittenEpisodeCardProps | MeetingCardProps | CourseSeatsCardProps | SimpleCourseCardProps) & {
14
15
  type: CardType;
15
16
  };
16
17
  export declare const Card: ({ type, ...rest }: CardProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,KAAK,QAAQ,GACT,QAAQ,GACR,eAAe,GACf,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,MAAM,SAAS,GAAG,CACpB,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,eAAe,GAC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AE,QAAQ,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,IAAI,sBAAmC,SAAS,uEAkB5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { SimpleCourseCard } from './simple-course';
2
+ export type { SimpleCourseCardProps } from './simple-course';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/simple-course/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ export interface SimpleCourseCardProps {
3
+ actions?: React.ReactElement;
4
+ content?: string;
5
+ href?: string;
6
+ image: string;
7
+ numRating: number;
8
+ price: string;
9
+ rating: number;
10
+ subtitle: string;
11
+ supportLabel?: string;
12
+ supportIcon?: React.ReactElement;
13
+ sx?: string;
14
+ title: string;
15
+ additionalIcons?: React.ReactElement[];
16
+ onHoverCardClick?: () => void;
17
+ trailerUrl?: string | string[];
18
+ onTrailerClick?: () => void;
19
+ onShareClick?: () => void;
20
+ }
21
+ export declare const SimpleCourseCard: ({ actions, content, href, image, numRating, price, rating, subtitle, supportLabel, supportIcon, sx, title, additionalIcons, onHoverCardClick, trailerUrl, onTrailerClick, onShareClick, }: SimpleCourseCardProps) => import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=simple-course.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-course.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/simple-course/simple-course.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,8LAkB1B,qBAAqB,4CAmPvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "2.14.89",
3
+ "version": "2.14.90",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "license": "MIT",