@soul-refiner/design-system 2.14.88 → 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.
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/simple-course/simple-course.js +158 -0
- package/dist/components/editor/minimal_editor/minimal_editor.js +2 -2
- package/dist/components/media/video/video.js +1 -1
- package/dist/components/media/video-player/video.js +4 -4
- package/dist/components/surfaces/post/post.js +12 -12
- package/dist/src/components/card/card.d.ts +3 -2
- package/dist/src/components/card/card.d.ts.map +1 -1
- package/dist/src/components/card/simple-course/index.d.ts +3 -0
- package/dist/src/components/card/simple-course/index.d.ts.map +1 -0
- package/dist/src/components/card/simple-course/simple-course.d.ts +22 -0
- package/dist/src/components/card/simple-course/simple-course.d.ts.map +1 -0
- package/dist/src/components/editor/minimal_editor/minimal_editor.d.ts.map +1 -1
- package/dist/src/components/media/common.d.ts +2 -2
- package/dist/src/components/media/common.d.ts.map +1 -1
- package/dist/src/components/media/video/video.d.ts.map +1 -1
- package/dist/src/components/media/video-player/video.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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"),
|
|
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})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var o=require("react/jsx-runtime"),r=require("styled-components"),e=require("@udecode/plate"),l=require("./plugins.js"),t=require("./navbar.js");const
|
|
2
|
+
"use strict";var o=require("react/jsx-runtime"),r=require("styled-components"),e=require("@udecode/plate"),l=require("./plugins.js"),t=require("./navbar.js"),i=require("react");const n=r.styled.div`
|
|
3
3
|
position: relative;
|
|
4
4
|
width: ${({$width:o})=>o};
|
|
5
5
|
${({$height:o})=>o?`height: ${o};`:""}
|
|
@@ -104,4 +104,4 @@
|
|
|
104
104
|
&::-webkit-scrollbar-thumb:hover {
|
|
105
105
|
background: var(--color-grey-5, #555);
|
|
106
106
|
}
|
|
107
|
-
`;exports.MinimalEditor=({editable:r,onChange:
|
|
107
|
+
`;exports.MinimalEditor=({editable:r,onChange:d,sx:c,placeholder:s="Write a short description about your course...",previousContent:h=[{type:"p",children:[{text:""}]}],width:p="100%",height:g="300px",minHeight:u="120px",navBackgroundColor:x="var(--color-white)",contentBackgroundColor:b="var(--color-white)",borderColor:$="var(--color-grey-8)",placeholderColor:m="var(--color-grey-5)",textColor:f="var(--color-grey-3)"})=>{const y=i.useMemo(()=>JSON.stringify(h),[h]);return o.jsx(e.Plate,{id:"minimal-editor",initialValue:h,onChange:d,plugins:l.plugins,children:o.jsxs(n,{$sx:c,$width:p,$height:g,$minHeight:u,$borderColor:$,$contentBackgroundColor:b,children:[r&&o.jsx(t.MinimalEditorBar,{navBackgroundColor:x,borderColor:$}),o.jsx(a,{$contentBackgroundColor:b,$placeholderColor:m,$textColor:f,children:o.jsx(e.PlateContent,{autoFocus:!1,placeholder:s,readOnly:!r,spellCheck:!0})})]})},y)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("react-player"),i=require("next/image"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("react-player"),i=require("next/image"),a=require("../../atoms/typography/paragraph.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(t),s=l(r),n=l(i);exports.Video=({controls:t=!0,loop:r=!1,muted:i,playsInline:l,src:u,subtitles:c,style:d,thumbnail:p,thumbnailObjectFit:y="contain",forwardedRef:h,playing:f=!0,title:g,handleOnReady:m})=>{const b=o.default.useRef(null),x=h||b,j=(Array.isArray(u)?u[0]:u).includes(".m3u8");return e.jsx(s.default,{className:"player",config:{file:{attributes:{crossOrigin:"true"},forceHLS:j,hlsOptions:j?{autoStartLoad:!0}:void 0,tracks:c?.map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:t,height:"100%",light:p?e.jsxs(e.Fragment,{children:[e.jsx(n.default,{alt:"thumbnail for trailer",layout:"fill",priority:!0,quality:100,src:p,style:{objectFit:y}}),g&&e.jsx(a.P,{$color:"white",sx:"position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; z-index: 100;",children:g})]}):void 0,loop:r,muted:i,pip:!1,playsinline:l,playing:f,ref:x,style:{backgroundColor:"var(--color-grey-0)",maxHeight:720,maxWidth:1280,minHeight:480,overflow:"hidden",position:"relative",...d||{}},url:u,width:"100%",onReady:m})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),i=require("react"),t=require("next/image"),n=require("react-player"),r=require("styled-components"),o=require("../../actions/button/button.js"),l=require("../../atoms/box/box.js");require("../../navigation/breadcrumb/breadcrumb.js"),require("../../navigation/inner/inner.js");var s=require("../../navigation/tabs/tabs.js");require("../../navigation/tabs/custom-tabs.js");var a=require("../../../icons/basic/select_item.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),p=require("../../../icons/security/lock_circle.js"),
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),i=require("react"),t=require("next/image"),n=require("react-player"),r=require("styled-components"),o=require("../../actions/button/button.js"),l=require("../../atoms/box/box.js");require("../../navigation/breadcrumb/breadcrumb.js"),require("../../navigation/inner/inner.js");var s=require("../../navigation/tabs/tabs.js");require("../../navigation/tabs/custom-tabs.js");var a=require("../../../icons/basic/select_item.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),p=require("../../../icons/security/lock_circle.js"),u=require("../../../icons/audio_video/play_solid.js"),g=require("../../../utils/local-storage.js"),h=require("./playlist-item.js"),x=require("./misc.js"),m=require("../../../icons/arrow/chevron_down.js"),f=require("../../surfaces/accordion/accordion.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=b(i),w=b(t),v=b(n);const j=1280/720,$=200*j,I=r.styled.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
background-color: var(--color-grey-0);
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
${({$playable:e})=>e?"":"\n .player {\n cursor: initial;\n pointer-events: none;\n user-select: none;\n }"}
|
|
62
62
|
|
|
63
63
|
${({$orientation:e})=>"vertical"===e?"\n flex-direction: column;\n gap: 24px;\n justify-content: flex-start;":"\n & > div:first-of-type {\n flex: 5;\n aspect-ratio: 1280 / 720;\n }\n & > div:last-of-type {\n flex: 3;\n }"}
|
|
64
|
-
`,
|
|
64
|
+
`,A=r.styled.div`
|
|
65
65
|
position: relative;
|
|
66
66
|
flex: 1;
|
|
67
67
|
box-sizing: border-box;
|
|
68
68
|
height: 100%;
|
|
69
|
-
`,
|
|
69
|
+
`,z=r.styled.div`
|
|
70
70
|
position: absolute;
|
|
71
71
|
flex: 1;
|
|
72
72
|
width: 100%;
|
|
@@ -135,4 +135,4 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
${({$showingAll:e})=>e?"height: 100%; overflow-y:auto;":"max-height: 350px;"}
|
|
138
|
-
`;exports.VideoPlayer=({activeIndex:t,pip:n,playable:r,playlist:b,onClickPreview:L,onPipChange:M,onProgress:T,onStart:E,orientation:H,setMediaItem:R,onShowAllPlaylist:O,forwardedRef:F,subtitle:N,title:_,trailer:W,additionalMedia:V})=>{const X="undefined"!=typeof window?window:{innerHeight:0,innerWidth:600},Y=X.innerHeight/3,K=j*(X.innerHeight/3),G=y.default.useRef(null),J=F||G,Q=y.default.useRef({}),U=y.default.useRef(null),Z=y.default.useRef(null),[ee,ie]=y.default.useState(0),[te,ne]=y.default.useState(!1),[re,oe]=y.default.useState(!r),[le,se]=y.default.useState(b?.[t].id||null),[ae,de]=u.useLocalStorage("videoPipHeight",Y),[ce,pe]=u.useLocalStorage("videoPipWidth",K),[ge,ue]=u.useLocalStorage("video-volume",1),[he,xe]=u.useLocalStorage("videoPipRight",16),[me,fe]=u.useLocalStorage("videoPipBottom",16),[be,ye]=y.default.useState([0,0]),[we,ve]=y.default.useState([0,0]),[je,$e]=y.default.useState(!1),[Ie,ke]=y.default.useState(0),[Se,De]=y.default.useState([]),[Pe,ze]=y.default.useState([]),[Ae,qe]=y.default.useState([]),Ce=re?W:je?Se?.[Ie]:b?.[t];y.default.useEffect(()=>{V&&(De(V.filter(e=>"VIDEO"===e.type)),ze(V.filter(e=>"FILE"===e.type)),qe(V.filter(e=>"LINK"===e.type)))},[V]),y.default.useEffect(()=>{const e=()=>{const e=Q.current[le];e&&setTimeout(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})},0)};return b?.length&&le&&("undefined"!=typeof window&&window.addEventListener("load",e),e()),()=>{"undefined"!=typeof window&&window.removeEventListener("load",e)}},[b,le]);const Be=(e,i=!1)=>{oe(!1),$e(i),i?ke(e):R(e)},Le=()=>{ne(e=>!e),O&&O(!te)},Me=(e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();t.x<16||t.y<16||e>=2*X.innerWidth/3||i>=2*X.innerHeight/3||e<$||i<200||(pe(e),de(i))},Te=()=>{if(!Z?.current)return;const e=Z.current.getBoundingClientRect();ve([e.width,e.height])},Ee=e=>{if(!Z?.current)return;const i=e.currentTarget.getAttribute("class")?.split(" ")||[],t=window.innerWidth-e.clientX,n=window.innerHeight-e.clientY;if(!(e.clientX<0||e.clientY<0))if(e.stopPropagation(),e.preventDefault(),i.includes("top")){const e=Math.round(n-be[1]+we[1]),i=Math.round(e*j);Me(i,e)}else if(i.includes("bottom")){const e=Math.round(be[1]-n+we[1]),i=Math.round(e*j);Me(i,e)}else if(i.includes("left")){const e=Math.round(t-be[0]+we[0]),i=Math.round(e/j);Me(e,i)}else if(i.includes("right")){const e=Math.round(be[0]-t+we[0]),i=Math.round(e/j);Me(e,i)}},He=i.useMemo(()=>{let e=[{label:"All lessons",color:"dark"}];return V?.length&&e.push({label:"Resources",color:"dark"}),e.push({label:"Trailer",color:"dark"}),e},[V]),Re=ee===He.length-1,Oe=V&&ee>0&&ee<He.length-1;return y.default.useEffect(()=>{ee>=He.length&&ie(0)},[He,ee]),Ce?e.jsx(I,{$orientation:H,children:e.jsxs(P,{$orientation:H,$playable:r||re||je,children:["vertical"===H&&e.jsxs(l.Box,{className:"pip-trigger-vertical pip-trigger",$dir:"column",$gap:4,sx:"margin: 24px;",children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),n&&e.jsx(S,{}),e.jsxs(k,{$pip:!!n,draggable:n&&0===we[0],onDrag:n?e=>{if(e.clientX<0||e.clientY<0)return;const i=window.innerWidth-e.clientX,t=window.innerHeight-e.clientY;((e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();e&&e>=16&&e<=X.innerWidth-16-t.width&&xe(e),i&&i>=16&&i<=X.innerHeight-16-t.height&&fe(i)})(he+(i-be[0]),me+(t-be[1])),ye([i,t])}:void 0,onMouseDown:e=>{ye([window.innerWidth-e.clientX,window.innerHeight-e.clientY])},ref:Z,style:n?{bottom:me,height:ae,right:he,width:ce}:void 0,children:[n&&e.jsx(o.Button,{className:"close-pip",icon:e.jsx(a.SelectItem,{color:"grey-0"}),onClick:e=>{e.stopPropagation(),M&&M(!1)},size:"large",sx:"\n display: none;\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n svg {\n fill: var(--color-white);\n }\n ",type:"text"}),e.jsx(v.default,{className:"player",config:{file:{attributes:{crossOrigin:"true",disablePictureInPicture:"true"},forceHLS:!0,hlsOptions:{autoStartLoad:!0},tracks:(Ce?.subtitles||[]).map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:!0,height:"100%",light:e.jsx(w.default,{alt:`thumbnail for ${_}`,layout:"fill",priority:!0,quality:100,style:{objectFit:"cover"},src:Ce.thumbnail}),progressInterval:4e3,onProgress:e=>T(e,je?Se[Ie]?.id:void 0),onStart:E,onClickPreview:L,onReady:()=>{if(!re){const e=J?.current?.getCurrentTime();0===e&&(je?0!==Se?.[Ie]?.progress&&J.current.seekTo(Se?.[Ie].progress):0!==Ce?.progress&&J.current.seekTo(Ce.progress))}},pip:n,playIcon:r||re||je?e.jsx(g.PlaySolid,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}):e.jsx(p.LockCircle,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}),playing:r,ref:J,url:Ce.src,width:"100%",volume:ge,onVolumeChange:e=>{ue(e.target.volume)}}),n&&e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"top horizontal",draggable:"false",onDrag:Ee,onMouseDown:Te,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"bottom horizontal",draggable:"false",onDrag:Ee,onMouseDown:Te,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"right vertical",draggable:"false",onDrag:Ee,onMouseDown:Te,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"left vertical",draggable:"false",onDrag:Ee,onMouseDown:Te,onDragEnd:()=>ve([0,0]),tabIndex:0})]})]}),"horizontal"===H&&e.jsx(z,{children:e.jsxs(A,{$showingAll:te,children:[e.jsxs(l.Box,{$dir:"column",$gap:4,children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),e.jsxs(l.Box,{$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:He,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Le})]}),0===ee?e.jsx(C,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),Be(t)},title:i.title,thumbnail:i.thumbnail,shortDescription:i.shortDescription,duration:i.duration,progress:i.progress,playable:r,nowplaying:le,comingSoon:i.comingSoon||!1,ref:e=>{Q.current[i.id]=e}},i.id))}):Oe?e.jsxs(C,{$showingAll:te,children:[!!Se.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),Be(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!Pe.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Pe].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!Ae.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Products"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Ae].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))})]}):Re&&W?e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:oe,trailer:W}):null]})}),"vertical"===H&&e.jsx(l.Box,{$dir:"column",$gap:24,sx:te?"z-index: 3; position:relative;":"height: auto",children:e.jsxs(q,{$showingAll:te,children:[e.jsxs(l.Box,{sx:"padding: 0 1.5rem;",$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:He,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Le})]}),[e.jsx(B,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{comingSoon:i.comingSoon||!1,nowplaying:le,playlistItemId:i.id,duration:i.duration,ref:e=>{Q.current[i.id]=e},onClick:()=>{Be(t),se(i.id)},playable:r,progress:i.progress,shortDescription:i.shortDescription,thumbnail:i.thumbnail,title:i.title},i.id))}),e.jsxs(B,{$showingAll:te,children:[!!Se.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})]}),sx:"flex-direction: column; gap: 24px;",children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),Be(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))},i))}),(!!Pe.length||!!Ae.length)&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})]}),sx:"flex-direction: column; gap: 24px;",children:[...Pe,...Ae].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))},i))})]}),!!W&&e.jsx(l.Box,{$dir:"column",$gap:8,sx:"margin: 0px 24px;",children:e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:oe,trailer:W})})][ee]]})})]})}):null};
|
|
138
|
+
`;exports.VideoPlayer=({activeIndex:t,pip:n,playable:r,playlist:b,onClickPreview:L,onPipChange:M,onProgress:T,onStart:E,orientation:H,setMediaItem:R,onShowAllPlaylist:O,forwardedRef:F,subtitle:N,title:_,trailer:W,additionalMedia:V})=>{const X="undefined"!=typeof window?window:{innerHeight:0,innerWidth:600},Y=X.innerHeight/3,K=j*(X.innerHeight/3),G=y.default.useRef(null),J=F||G,Q=y.default.useRef({}),U=y.default.useRef(null),Z=y.default.useRef(null),[ee,ie]=y.default.useState(0),[te,ne]=y.default.useState(!1),[re,oe]=y.default.useState(!r),[le,se]=y.default.useState(b?.[t].id||null),[ae,de]=g.useLocalStorage("videoPipHeight",Y),[ce,pe]=g.useLocalStorage("videoPipWidth",K),[ue,ge]=g.useLocalStorage("video-volume",1),[he,xe]=g.useLocalStorage("videoPipRight",16),[me,fe]=g.useLocalStorage("videoPipBottom",16),[be,ye]=y.default.useState([0,0]),[we,ve]=y.default.useState([0,0]),[je,$e]=y.default.useState(!1),[Ie,ke]=y.default.useState(0),[Se,De]=y.default.useState([]),[Pe,Ae]=y.default.useState([]),[ze,qe]=y.default.useState([]),Ce=re?W:je?Se?.[Ie]:b?.[t],Be=Array.isArray(Ce?.src)?Ce.src[0]:Ce?.src,Le=Be?.includes(".m3u8")||!1;y.default.useEffect(()=>{V&&(De(V.filter(e=>"VIDEO"===e.type)),Ae(V.filter(e=>"FILE"===e.type)),qe(V.filter(e=>"LINK"===e.type)))},[V]),y.default.useEffect(()=>{const e=()=>{const e=Q.current[le];e&&setTimeout(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})},0)};return b?.length&&le&&("undefined"!=typeof window&&window.addEventListener("load",e),e()),()=>{"undefined"!=typeof window&&window.removeEventListener("load",e)}},[b,le]);const Me=(e,i=!1)=>{oe(!1),$e(i),i?ke(e):R(e)},Te=()=>{ne(e=>!e),O&&O(!te)},Ee=(e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();t.x<16||t.y<16||e>=2*X.innerWidth/3||i>=2*X.innerHeight/3||e<$||i<200||(pe(e),de(i))},He=()=>{if(!Z?.current)return;const e=Z.current.getBoundingClientRect();ve([e.width,e.height])},Re=e=>{if(!Z?.current)return;const i=e.currentTarget.getAttribute("class")?.split(" ")||[],t=window.innerWidth-e.clientX,n=window.innerHeight-e.clientY;if(!(e.clientX<0||e.clientY<0))if(e.stopPropagation(),e.preventDefault(),i.includes("top")){const e=Math.round(n-be[1]+we[1]),i=Math.round(e*j);Ee(i,e)}else if(i.includes("bottom")){const e=Math.round(be[1]-n+we[1]),i=Math.round(e*j);Ee(i,e)}else if(i.includes("left")){const e=Math.round(t-be[0]+we[0]),i=Math.round(e/j);Ee(e,i)}else if(i.includes("right")){const e=Math.round(be[0]-t+we[0]),i=Math.round(e/j);Ee(e,i)}},Oe=i.useMemo(()=>{let e=[{label:"All lessons",color:"dark"}];return V?.length&&e.push({label:"Resources",color:"dark"}),e.push({label:"Trailer",color:"dark"}),e},[V]),Fe=ee===Oe.length-1,Ne=V&&ee>0&&ee<Oe.length-1;return y.default.useEffect(()=>{ee>=Oe.length&&ie(0)},[Oe,ee]),Ce?e.jsx(I,{$orientation:H,children:e.jsxs(P,{$orientation:H,$playable:r||re||je,children:["vertical"===H&&e.jsxs(l.Box,{className:"pip-trigger-vertical pip-trigger",$dir:"column",$gap:4,sx:"margin: 24px;",children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),n&&e.jsx(S,{}),e.jsxs(k,{$pip:!!n,draggable:n&&0===we[0],onDrag:n?e=>{if(e.clientX<0||e.clientY<0)return;const i=window.innerWidth-e.clientX,t=window.innerHeight-e.clientY;((e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();e&&e>=16&&e<=X.innerWidth-16-t.width&&xe(e),i&&i>=16&&i<=X.innerHeight-16-t.height&&fe(i)})(he+(i-be[0]),me+(t-be[1])),ye([i,t])}:void 0,onMouseDown:e=>{ye([window.innerWidth-e.clientX,window.innerHeight-e.clientY])},ref:Z,style:n?{bottom:me,height:ae,right:he,width:ce}:void 0,children:[n&&e.jsx(o.Button,{className:"close-pip",icon:e.jsx(a.SelectItem,{color:"grey-0"}),onClick:e=>{e.stopPropagation(),M&&M(!1)},size:"large",sx:"\n display: none;\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n svg {\n fill: var(--color-white);\n }\n ",type:"text"}),e.jsx(v.default,{className:"player",config:{file:{attributes:{crossOrigin:"true",disablePictureInPicture:"true"},forceHLS:Le,hlsOptions:Le?{autoStartLoad:!0}:void 0,tracks:(Ce?.subtitles||[]).map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:!0,height:"100%",light:e.jsx(w.default,{alt:`thumbnail for ${_}`,layout:"fill",priority:!0,quality:100,style:{objectFit:"cover"},src:Ce.thumbnail}),progressInterval:4e3,onProgress:e=>T(e,je?Se[Ie]?.id:void 0),onStart:E,onClickPreview:L,onReady:()=>{if(!re){const e=J?.current?.getCurrentTime();0===e&&(je?0!==Se?.[Ie]?.progress&&J.current.seekTo(Se?.[Ie].progress):0!==Ce?.progress&&J.current.seekTo(Ce.progress))}},pip:n,playIcon:r||re||je?e.jsx(u.PlaySolid,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}):e.jsx(p.LockCircle,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}),playing:r,ref:J,url:Ce.src,width:"100%",volume:ue,onVolumeChange:e=>{ge(e.target.volume)}}),n&&e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"top horizontal",draggable:"false",onDrag:Re,onMouseDown:He,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"bottom horizontal",draggable:"false",onDrag:Re,onMouseDown:He,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"right vertical",draggable:"false",onDrag:Re,onMouseDown:He,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"left vertical",draggable:"false",onDrag:Re,onMouseDown:He,onDragEnd:()=>ve([0,0]),tabIndex:0})]})]}),"horizontal"===H&&e.jsx(A,{children:e.jsxs(z,{$showingAll:te,children:[e.jsxs(l.Box,{$dir:"column",$gap:4,children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),e.jsxs(l.Box,{$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:Oe,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Te})]}),0===ee?e.jsx(C,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),Me(t)},title:i.title,thumbnail:i.thumbnail,shortDescription:i.shortDescription,duration:i.duration,progress:i.progress,playable:r,nowplaying:le,comingSoon:i.comingSoon||!1,ref:e=>{Q.current[i.id]=e}},i.id))}):Ne?e.jsxs(C,{$showingAll:te,children:[!!Se.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),Me(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!Pe.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Pe].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!ze.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Products"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))})]}):Fe&&W?e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:oe,trailer:W}):null]})}),"vertical"===H&&e.jsx(l.Box,{$dir:"column",$gap:24,sx:te?"z-index: 3; position:relative;":"height: auto",children:e.jsxs(q,{$showingAll:te,children:[e.jsxs(l.Box,{sx:"padding: 0 1.5rem;",$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:Oe,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Te})]}),[e.jsx(B,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{comingSoon:i.comingSoon||!1,nowplaying:le,playlistItemId:i.id,duration:i.duration,ref:e=>{Q.current[i.id]=e},onClick:()=>{Me(t),se(i.id)},playable:r,progress:i.progress,shortDescription:i.shortDescription,thumbnail:i.thumbnail,title:i.title},i.id))}),e.jsxs(B,{$showingAll:te,children:[!!Se.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})]}),sx:"flex-direction: column; gap: 24px;",children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),Me(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))},i))}),(!!Pe.length||!!ze.length)&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})]}),sx:"flex-direction: column; gap: 24px;",children:[...Pe,...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))},i))})]}),!!W&&e.jsx(l.Box,{$dir:"column",$gap:8,sx:"margin: 0px 24px;",children:e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:oe,trailer:W})})][ee]]})})]})}):null};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),i=require("next/image"),r=require("next/link"),o=require("styled-components"),n=require("react-show-more-text"),l=require("../../../common/regex.js"),s=require("../../atoms/box/box.js"),a=require("../../atoms/highlighter/highlighter.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),h=require("../modal/modal.js");require("../../atoms/typography/display.js"),require("../../atoms/typography/typography.js");var p=require("../../atoms/time_ago/time_ago.js"),u=require("../../iconography/avatar/avatar.js"),x=require("../../../icons/security/lock.js"),g=require("../../../icons/arrow/chevron_left.js"),f=require("../../../icons/arrow/chevron_right.js"),m=require("../../media/video/video.js");require("../../iconography/icon/icon.js");var y=require("../../../icons/audio_video/play.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/basic/subtask.js"),require("../../../common/colors.js");var v=b(t),j=b(i),w=b(r),$=b(n);const k=o.styled.div`
|
|
3
3
|
position: relative;
|
|
4
4
|
max-width: 700px;
|
|
5
5
|
width: 100%;
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
border: none;
|
|
22
22
|
cursor: pointer;
|
|
23
23
|
color: var(--color-grey-5);
|
|
24
|
-
`;const
|
|
24
|
+
`;const q=o.styled.div`
|
|
25
25
|
padding: 16px 24px;
|
|
26
26
|
display: flex;
|
|
27
27
|
justify-content: space-between;
|
|
28
28
|
align-items: flex-start;
|
|
29
29
|
border-bottom: 1px solid var(--color-grey-9);
|
|
30
|
-
`,
|
|
30
|
+
`,C=o.styled.div`
|
|
31
31
|
position: absolute;
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
background: var(--color-grey-0);
|
|
42
42
|
border-radius: inherit;
|
|
43
43
|
overflow: hidden;
|
|
44
|
-
`,
|
|
44
|
+
`,z=o.styled.div`
|
|
45
45
|
position: absolute;
|
|
46
46
|
width: 64px;
|
|
47
47
|
height: 64px;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
z-index: 3;
|
|
57
57
|
pointer-events: none;
|
|
58
58
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
59
|
-
`,
|
|
59
|
+
`,P=o.styled.div`
|
|
60
60
|
position: relative;
|
|
61
61
|
display: flex;
|
|
62
62
|
gap: 8px;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
${({$numImages:e})=>e>1?"\n div {\n min-width: calc(50% - 4px);\n max-width: calc(50% - 4px);\n\n flex:1;\n img {\n object-fit: cover;\n width: 100%;\n height: 100%;\n }\n }":"\n div > img {\n object-fit: contain;\n width: 100%;\n height: 100%;\n }\n "}
|
|
78
|
-
`,
|
|
78
|
+
`,H=o.styled.div`
|
|
79
79
|
position: relative;
|
|
80
80
|
aspect-ratio: 700 / 427;
|
|
81
81
|
flex: 1;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
position: relative;
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 480px;
|
|
97
|
-
`,
|
|
97
|
+
`,R=o.styled.div`
|
|
98
98
|
position: relative;
|
|
99
99
|
display: flex;
|
|
100
100
|
flex-direction: column;
|
|
@@ -104,17 +104,17 @@
|
|
|
104
104
|
justify-content: center;
|
|
105
105
|
gap: 16px;
|
|
106
106
|
overflow: hidden;
|
|
107
|
-
`,
|
|
107
|
+
`,E=o.styled.div`
|
|
108
108
|
display: flex;
|
|
109
109
|
justify-content: space-around;
|
|
110
110
|
align-items: center;
|
|
111
111
|
padding: 24px;
|
|
112
|
-
`,
|
|
112
|
+
`,L=o.styled.div`
|
|
113
113
|
padding: 24px;
|
|
114
114
|
display: flex;
|
|
115
115
|
flex-flow: column nowrap;
|
|
116
116
|
gap: 24px;
|
|
117
|
-
`,
|
|
117
|
+
`,_=o.styled.button`
|
|
118
118
|
width: 48px;
|
|
119
119
|
height: 150px;
|
|
120
120
|
display: flex;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
&:hover {
|
|
131
131
|
background-color: rgba(0, 0, 0, 0.2);
|
|
132
132
|
}
|
|
133
|
-
`,
|
|
133
|
+
`,M=o.styled.div`
|
|
134
134
|
margin-top: 24px;
|
|
135
135
|
border-radius: 32px;
|
|
136
136
|
border: 1px solid var(--color-grey-8);
|
|
@@ -138,4 +138,4 @@
|
|
|
138
138
|
padding: 6px 16px;
|
|
139
139
|
width: fit-content;
|
|
140
140
|
cursor: pointer;
|
|
141
|
-
`;exports.Post=({actions:
|
|
141
|
+
`;exports.Post=({actions:t,author:i,authorActive:r,authorHref:o,authorImage:n,avatarTooltipContent:b,avatarTooltipSx:U,children:I,content:A,createdDate:B,dropdown:F,hasComments:T,id:W,images:J,isPaidUser:D,isPaywalled:V=!1,link:X,video:G,onJoin:N,monthlyMembershipPrice:O,onImageClick:Y})=>{const K=v.default.useId(),Q=v.default.useRef(null),[Z,ee]=v.default.useState(!1),[te,ie]=v.default.useState(-1),[re,oe]=v.default.useState(!1);v.default.useRef(null);const[ne,le]=v.default.useState(-1),[se,ae]=v.default.useState({x:"30vw",y:"30vh"}),de=!!G?.url&&!!G?.thumbnail,ce=G?.displayHtmlVideo,[he,pe]=v.default.useState(!1),ue=v.default.useRef(null);v.default.useEffect(()=>{if(Q.current&&A?.length>0){const e=24,t=Math.ceil(Q.current.offsetHeight/e);if(ie(t),!Z)try{const t=Q.current.style.webkitLineClamp;Q.current.style.webkitLineClamp="none";const i=Q.current.offsetHeight,r=Math.ceil(i/e);Q.current.style.webkitLineClamp=t,oe(r>3)}catch(e){oe(t>=3)}}else ie(-1),oe(!1)},[A,Z]),v.default.useEffect(()=>{const e=e=>{"ArrowLeft"===e.key?me():"ArrowRight"===e.key?fe():"Escape"!==e.key&&"Enter"!==e.key||le(-1)};return"undefined"!=typeof document&&J?.length&&ne>-1&&document.addEventListener("keydown",e),()=>{J?.length&&document.removeEventListener("keydown",e)}},[]);const xe=v.default.Children.toArray(t),ge=v.default.Children.toArray(I),fe=()=>{le(e=>J?.length&&e!==J.length-1?e+1:e)},me=()=>{le(e=>J?.length&&0!==e?e-1:e)};return e.jsxs(k,{id:W,children:[ne>-1&&!!J?.[ne]&&e.jsx(h.Modal,{alwaysRender:!1,controlledOpen:!0,onChange:e=>!e&&le(-1),children:e.jsxs(h.Modal.Content,{sx:`\n position: relative; \n height: ${se.y}; \n width: ${se.x};\n margin: 0 auto;\n `,children:[e.jsx(_,{$side:"left",$visible:0!==ne,onClick:me,children:e.jsx(g.ChevronLeft,{color:"white",size:48})}),e.jsx(j.default,{alt:"",fill:!0,quality:100,onLoad:e=>{const{naturalHeight:t,naturalWidth:i}=e.target;let r=`${i}px`,o=`${t}px`;window?.innerHeight<t&&window?.innerWidth<i?(r=`${Math.floor(.95*window.innerHeight*i/t)}px`,o=`${Math.round(.95*window.innerWidth*t/i)}px`):window?.innerHeight<t?(r=`${Math.floor(.95*window.innerHeight*i/t)}px`,o="95vh"):window?.innerWidth<i&&(r="95vw",o=`${Math.round(.95*window.innerWidth*t/i)}px`),ae({x:r,y:o})},draggable:!1,priority:!0,sizes:"100vw",src:J[ne],style:{objectFit:"cover"}}),e.jsx(_,{$side:"right",$visible:ne!==J.length-1,onClick:fe,children:e.jsx(f.ChevronRight,{color:"white",size:48})})]})}),e.jsxs(q,{children:[e.jsx(u.Avatar,{isPaidUser:D,as:o?w.default:"button",href:o,image:n,size:64,status:r?"online":void 0,subtitle:e.jsx(c.P,{as:"span",sx:"vertical-align: top;",$fontSize:14,$lineHeight:20,children:e.jsx(p.TimeAgo,{date:new Date(B)})}),title:e.jsx(d.H,{as:o?w.default:"span",href:o,sx:"text-decoration:none;",$bold:!0,$fontSize:18,$lineHeight:26,children:i}),textPosition:"right",tooltipContent:b,tooltipSx:U,sx:o?"img { cursor: pointer; }":void 0}),F]}),!!A?.length&&e.jsxs("div",{style:{padding:"16px 24px"},children:[V&&te>1?e.jsx($.default,{lines:2,more:"Continue Reading",onClick:N,anchorClass:"see-more",expanded:!1,truncatedEndingComponent:"... ",children:e.jsx(c.P,{$sx:"white-space: pre-line; word-break: break-word;",$textClampLines:2,children:e.jsx(a.Highlighter,{highlightRender:t=>e.jsx(c.P,{as:"span",$color:"primary-blue-2",children:e.jsx(w.default,{href:t,target:"_blank",children:t})}),seperator:l.URL_REGEX,text:A})})}):e.jsxs(e.Fragment,{children:[e.jsx(c.P,{$sx:"white-space: pre-line; word-break: break-word;",innerRef:Q,$textClampLines:Z?void 0:5,children:e.jsx(a.Highlighter,{highlightRender:t=>e.jsx(c.P,{as:"span",$color:"primary-blue-2",children:e.jsx(w.default,{href:t,target:"_blank",children:t})}),seperator:l.URL_REGEX,text:V&&1===te?"This is a premium post. Join to the membership to unlock the full access.":A})}),re&&!V?e.jsx(c.P,{$color:"grey-5",sx:"cursor:pointer;",$mediumBold:!0,$fontSize:14,onClick:()=>ee(e=>!e),children:Z?"See less":"See more"}):null]}),V&&!J?.length&&e.jsx(M,{onClick:N,children:e.jsxs(c.P,{$fontSize:14,$mediumBold:!0,children:["Join now for $",O," per month"]})})]}),V&&!!J?.length&&!de&&e.jsxs(R,{children:[e.jsx(j.default,{alt:"",width:650,height:427,priority:!0,quality:100,src:J[0],style:{objectFit:"fill",height:"100%",width:"100%",filter:"blur(60px)",position:"absolute",top:0,left:"50%",transform:"translateX(-50%)"}}),e.jsx(x.Lock,{size:40,color:"white",sx:"z-index: 1"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",zIndex:1},children:[e.jsx(c.P,{$color:"white",$fontSize:14,$bold:!0,$lineHeight:20,children:"Become a member"}),e.jsx(c.P,{$color:"white",$fontSize:14,$bold:!0,$lineHeight:20,children:"to unlock this post"})]}),e.jsx(M,{onClick:N,style:{zIndex:1,marginTop:0},children:e.jsxs(c.P,{$fontSize:14,$mediumBold:!0,children:["Join now for $",O," per month"]})})]}),!!J?.length&&!de&&!V&&e.jsxs(P,{$numImages:J.length,children:[J.slice(0,4).map((t,i)=>e.jsx(H,{children:e.jsx(j.default,{alt:"",fill:!0,onClick:()=>{Y?.(i),le(i)},quality:100,src:t,draggable:!1,style:{cursor:"pointer",objectFit:"cover"}})},`${K}${t.slice(0,15)}${i}`)),J.length>4&&e.jsxs(d.H,{as:"p",className:"more-than",sx:"pointer-events: none;",$color:"grey-10",$fontSize:28,$lineHeight:36,$semiBold:!0,children:["+",J.length-4]})]}),!J?.length&&!de&&X&&!V&&e.jsxs(w.default,{href:X.url,target:"_blank",children:[e.jsx(H,{children:e.jsx(j.default,{alt:"",fill:!0,quality:100,src:X.imageUrl,draggable:!1,style:{cursor:"pointer",objectFit:"cover"}})}),e.jsxs(s.Box,{$dir:"column",$gap:8,sx:"padding: 8px 16px;",children:[e.jsx(c.P,{$color:"grey-2",$semiBold:!0,children:X.title}),e.jsx(c.P,{$color:"grey-5",children:X.description})]})]}),de&&e.jsx(S,{children:ce?he?e.jsxs("video",{ref:ue,style:{width:"100%",height:"100%"},controls:!0,playsInline:!0,poster:G.thumbnail,children:[G.videoUrls.webm&&e.jsx("source",{src:G.videoUrls.webm,type:"video/webm; codecs=vp9"}),G.videoUrls.mp4&&e.jsx("source",{src:G.videoUrls.mp4,type:"video/mp4; codecs=avc1.42E01E"}),"Your browser does not support the video tag."]}):e.jsxs(C,{onClick:()=>{pe(!0),setTimeout(()=>{ue.current?.play()},100)},children:[e.jsx(j.default,{src:G.thumbnail,alt:"Video thumbnail",fill:!0,style:{objectFit:"cover",borderRadius:"inherit"},priority:!0,draggable:!1}),e.jsx(z,{children:e.jsx(y.Play,{size:32,color:"white"})})]}):e.jsx(m.Video,{src:G.url,thumbnail:G.thumbnail,subtitles:[],title:G?.title})}),!!xe.length&&e.jsx(E,{children:!V&&xe}),T&&!!ge.length&&e.jsx(L,{children:ge})]})};
|
|
@@ -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
|
-
|
|
13
|
-
|
|
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;
|
|
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,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,KAAK,QAAQ,GACT,QAAQ,GACR,eAAe,GACf,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,SAAS,GACT,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,MAAM,SAAS,GAAG,CACpB,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,qBAAqB,GACrB,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,GACpB,qBAAqB,CACxB,GAAG;IACF,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,IAAI,sBAAmC,SAAS,uEAkB5D,CAAC"}
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimal_editor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/minimal_editor/minimal_editor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"minimal_editor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/minimal_editor/minimal_editor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAE7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,8KAyBvB,kBAAkB,4CA4CpB,CAAC"}
|
|
@@ -11,7 +11,7 @@ export interface MediaItem {
|
|
|
11
11
|
preview?: string | null;
|
|
12
12
|
previewDuration?: number | null;
|
|
13
13
|
progress?: number;
|
|
14
|
-
src: string;
|
|
14
|
+
src: string | string[];
|
|
15
15
|
subtitles?: Subtitle[];
|
|
16
16
|
shortDescription: string;
|
|
17
17
|
thumbnail: string;
|
|
@@ -20,7 +20,7 @@ export interface MediaItem {
|
|
|
20
20
|
}
|
|
21
21
|
export interface Trailer {
|
|
22
22
|
id: number;
|
|
23
|
-
src: string;
|
|
23
|
+
src: string | string[];
|
|
24
24
|
subtitles: Subtitle[];
|
|
25
25
|
thumbnail: string;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/media/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/media/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video/video.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAKrC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5D,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,KAAK,+IAcf,UAAU,
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video/video.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAKrC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5D,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,KAAK,+IAcf,UAAU,4CA2EZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/video.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWhE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,CACV,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB,EACD,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAE3C,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,uMAiBrB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/video.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWhE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,CACV,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB,EACD,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAE3C,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,uMAiBrB,gBAAgB,4CA8yBlB,CAAC"}
|