@soul-refiner/design-system 2.14.104 → 2.14.106
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.
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
`,w=i.styled.div`
|
|
136
136
|
display: flex;
|
|
137
137
|
flex-direction: column;
|
|
138
|
-
gap:
|
|
138
|
+
gap: 15px;
|
|
139
139
|
position: relative;
|
|
140
140
|
z-index: 2;
|
|
141
141
|
border: none;
|
|
@@ -205,4 +205,4 @@
|
|
|
205
205
|
&:hover {
|
|
206
206
|
background-color: var(--color-white);
|
|
207
207
|
}
|
|
208
|
-
`;exports.SimpleCourseCard=({actions:r,content:o,href:i,image:g,numRating:B,price:_,rating:E,subtitle:L,supportLabel:T,supportIcon:F=e.jsx(d.Video,{size:16,color:"white"}),sx:I,title:M,additionalIcons:R,onHoverCardClick:D,trailerUrl:A,onTrailerClick:N,onShareClick:U,status:V,onEditClick:G})=>{const J=!!o,K=!!i,[O,Q]=h.default.useState(!1),W=h.default.useRef(null),X=e=>{O&&D&&(e.preventDefault(),D())},Y=()=>{J&&K&&(Q(!0),W.current&&A&&W.current.play())},Z=()=>{Q(!1),W.current&&(W.current.pause(),W.current.currentTime=0)},ee=!i&&(V||G),re=e.jsxs(e.Fragment,{children:[e.jsxs(y,{className:"normal-card",children:[e.jsxs(f,{children:[e.jsx(b.default,{alt:"",height:180,quality:100,src:g,width:312}),ee&&e.jsxs(S,{children:[V&&e.jsxs(H,{$bgColor:u[V].bgColor,$dotColor:u[V].dotColor,children:[e.jsx(q,{$color:u[V].dotColor}),e.jsx(s.P,{$color:"grey-2",$fontSize:12,$lineHeight:16,children:u[V].label})]}),G&&e.jsx(P,{onClick:e=>{e.preventDefault(),e.stopPropagation(),G()},children:e.jsx(c.Pencil,{size:16,color:"grey-3"})})]})]}),e.jsx(m,{children:e.jsxs(w,{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:M}}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,dangerouslySetInnerHTML:{__html:L}})]}),e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:4,children:[T&&e.jsxs(C,{children:[F,e.jsx(s.P,{$color:"white",$fontSize:10,$lineHeight:14,sx:"font-weight:500",children:T})]}),void 0!==E&&e.jsxs(e.Fragment,{children:[e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:E/20}),e.jsx(l.Rate,{isRateable:!1,percent:E,size:"small"})]}),void 0!==B&&e.jsxs(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:["(",B,")"]})]}),e.jsx(s.P,{$color:"grey-2",$fontSize:16,$lineHeight:24,$bold:!0,children:_})]})]})})]}),J&&A&&e.jsxs(y,{className:"hover-card",children:[e.jsxs(f,{children:[e.jsx(j,{ref:W,muted:!0,loop:!0,playsInline:!0,preload:"auto",children:Array.isArray(A)?A.map((r,o)=>e.jsx("source",{src:r},o)):e.jsx("source",{src:A,type:"video/mp4"})}),e.jsx(v,{})]}),e.jsx(m,{children:e.jsxs(k,{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:_}),r&&e.jsx(n.Box,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:r})]}),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:M}}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,dangerouslySetInnerHTML:{__html:L}})]}),e.jsx(s.P,{$color:"grey-3",$fontSize:14,$lineHeight:20,$textClampLines:2,dangerouslySetInnerHTML:{__html:o}}),e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:8,children:[T&&e.jsxs(C,{children:[F,e.jsx(s.P,{$color:"white",$fontSize:10,$lineHeight:14,sx:"font-weight:500",children:T})]}),void 0!==E&&e.jsxs(e.Fragment,{children:[e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:E/20}),e.jsx(l.Rate,{isRateable:!1,percent:E,size:"small"})]}),void 0!==B&&e.jsxs(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:["(",B,")"]})]}),e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:8,children:[N&&e.jsx(a.Tooltip,{content:"Trailer",place:"top",children:e.jsx(z,{onClick:e=>{e.preventDefault(),e.stopPropagation(),N()},children:e.jsx(x.Trailer,{size:
|
|
208
|
+
`;exports.SimpleCourseCard=({actions:r,content:o,href:i,image:g,numRating:B,price:_,rating:E,subtitle:L,supportLabel:T,supportIcon:F=e.jsx(d.Video,{size:16,color:"white"}),sx:I,title:M,additionalIcons:R,onHoverCardClick:D,trailerUrl:A,onTrailerClick:N,onShareClick:U,status:V,onEditClick:G})=>{const J=!!o,K=!!i,[O,Q]=h.default.useState(!1),W=h.default.useRef(null),X=e=>{O&&D&&(e.preventDefault(),D())},Y=()=>{J&&K&&(Q(!0),W.current&&A&&W.current.play())},Z=()=>{Q(!1),W.current&&(W.current.pause(),W.current.currentTime=0)},ee=!i&&(V||G),re=e.jsxs(e.Fragment,{children:[e.jsxs(y,{className:"normal-card",children:[e.jsxs(f,{children:[e.jsx(b.default,{alt:"",height:180,quality:100,src:g,width:312}),ee&&e.jsxs(S,{children:[V&&e.jsxs(H,{$bgColor:u[V].bgColor,$dotColor:u[V].dotColor,children:[e.jsx(q,{$color:u[V].dotColor}),e.jsx(s.P,{$color:"grey-2",$fontSize:12,$lineHeight:16,children:u[V].label})]}),G&&e.jsx(P,{onClick:e=>{e.preventDefault(),e.stopPropagation(),G()},children:e.jsx(c.Pencil,{size:16,color:"grey-3"})})]})]}),e.jsx(m,{children:e.jsxs(w,{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:M}}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,dangerouslySetInnerHTML:{__html:L}})]}),e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:4,children:[T&&e.jsxs(C,{children:[F,e.jsx(s.P,{$color:"white",$fontSize:10,$lineHeight:14,sx:"font-weight:500",children:T})]}),void 0!==E&&e.jsxs(e.Fragment,{children:[e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:E/20}),e.jsx(l.Rate,{isRateable:!1,percent:E,size:"small"})]}),void 0!==B&&e.jsxs(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:["(",B,")"]})]}),e.jsx(s.P,{$color:"grey-2",$fontSize:16,$lineHeight:24,$bold:!0,children:_})]})]})})]}),J&&A&&e.jsxs(y,{className:"hover-card",children:[e.jsxs(f,{children:[e.jsx(j,{ref:W,muted:!0,loop:!0,playsInline:!0,preload:"auto",children:Array.isArray(A)?A.map((r,o)=>e.jsx("source",{src:r},o)):e.jsx("source",{src:A,type:"video/mp4"})}),e.jsx(v,{})]}),e.jsx(m,{children:e.jsxs(k,{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:_}),r&&e.jsx(n.Box,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:r})]}),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:M}}),e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,dangerouslySetInnerHTML:{__html:L}})]}),e.jsx(s.P,{$color:"grey-3",$fontSize:14,$lineHeight:20,$textClampLines:2,dangerouslySetInnerHTML:{__html:o}}),e.jsxs(n.Box,{$align:"center",$dir:"row",$justify:"space-between",children:[e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:8,children:[T&&e.jsxs(C,{children:[F,e.jsx(s.P,{$color:"white",$fontSize:10,$lineHeight:14,sx:"font-weight:500",children:T})]}),void 0!==E&&e.jsxs(e.Fragment,{children:[e.jsx(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:E/20}),e.jsx(l.Rate,{isRateable:!1,percent:E,size:"small"})]}),void 0!==B&&e.jsxs(s.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,children:["(",B,")"]})]}),e.jsxs(n.Box,{$align:"center",$dir:"row",$gap:8,children:[N&&e.jsx(a.Tooltip,{content:"Trailer",place:"top",children:e.jsx(z,{onClick:e=>{e.preventDefault(),e.stopPropagation(),N()},children:e.jsx(x.Trailer,{size:16})})}),U&&e.jsx(a.Tooltip,{content:"Share",place:"top",children:e.jsx(z,{onClick:e=>{e.preventDefault(),e.stopPropagation(),U()},children:e.jsx(p.ForwardBold,{size:16})})}),R&&R.length>0&&e.jsx(e.Fragment,{children:h.default.Children.toArray(R)})]})]})]})})]})]});return i?e.jsx($,{as:"a",$sx:I,href:i,$hasContent:J,$isClickable:K,onClick:X,onMouseEnter:Y,onMouseLeave:Z,children:re}):e.jsx($,{as:"div",$sx:I,$hasContent:J,$isClickable:K,onMouseEnter:Y,onMouseLeave:Z,children:re})};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("@udecode/plate"),n=require("styled-components"),o=require("../../constants.js"),s=require("../../context.js"),i=require("../../../actions/button/button.js"),u=require("../../../atoms/box/box.js"),d=require("../../../atoms/hide/hide.js"),c=require("../../../atoms/typography/heading.js"),l=require("../../../../icons/arrow/chevron_down.js"),a=require("../../../../icons/arrow/chevron_up.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=x(r);const h=f.default.forwardRef(({children:n,element:o,...x},h)=>{const{questionAnswerId:m}=o,{defaultFilter:w="",commentInputLoader:j,commentLoader:g,filterComponent:v,hideShowAnswersButton:b,showAnswersBelowInput:q}=f.default.useContext(s.EditorContext),[y,E]=f.default.useState(!1),[A,C]=f.default.useState(w),[I,B]=f.default.useState(!1),T=f.default.useRef(null),$=f.default.useRef(null),F=f.default.useRef(!1);f.default.useEffect(()=>{if(!q)return void(F.current||(B(!0),F.current=!0));if("undefined"==typeof IntersectionObserver)return void(F.current||(B(!0),F.current=!0));if(!T.current||F.current)return;$.current&&$.current.disconnect();const e=new IntersectionObserver(r=>{r.forEach(r=>{r.isIntersecting&&!F.current&&(F.current=!0,B(!0),e.disconnect(),$.current=null)})},{rootMargin:"200px",threshold:.01});return $.current=e,e.observe(T.current),()=>{$.current&&($.current.disconnect(),$.current=null)}},[q]);const L=f.default.useCallback(e=>{const r=e.currentTarget.getAttribute("data-value");C(e=>e===r?w:r)},[]),R=f.default.useCallback(()=>C(w),[]);return e.jsx(t.PlateElement,{asChild:!0,element:o,ref:h,...x,children:e.jsxs(r.Fragment,{children:[e.jsx(p,{children:e.jsx(c.H,{as:"p",$fontSize:18,$lineHeight:26,$mediumBold:!0,children:n})}),e.jsx("div",{ref:T,children:e.jsxs(u.Box,{$dir:"column",$gap:"medium",sx:"padding: 8px 24px; @media (max-width: 500px) { padding: 8px 0; }",contentEditable:!1,children:[(!b||v)&&e.jsxs(u.Box,{sx:"width: 100%",$justify:"space-between",children:[!b&&e.jsx(i.Button,{as:"div",icon:y?e.jsx(a.ChevronUp,{color:"grey-3"}):e.jsx(l.ChevronDown,{color:"grey-3"}),onClick:()=>E(e=>!e),size:"small",sx:"\n width: fit-content;\n flex-direction: row-reverse;\n color: var(--color-grey-5);\n padding 7px 15px;\n &:not(:hover) svg {\n fill: var(--color-grey-3);\n }\n ",type:"text",contentEditable:!1,children:y?"Hide answers":"Show answers"}),v&&e.jsx(d.HideButRender,{show:y,children:e.jsx(v,{filter:A,onFilterChange:L,questionAnswerId:m})})]}),!q&&I&&e.jsx(d.HideButRender,{show:y,children:e.jsx(g,{questionAnswerId:m,filterType:A,resetFilter:R,waitToLoad:!y})}),I&&e.jsx(j,{questionAnswerId:m,onComment:()=>E(!0)}),q&&I&&e.jsx(g,{questionAnswerId:m,filterType:A,resetFilter:R,waitToLoad:!1},`comments-${m}`)]})})]})})}),p=n.styled.div`
|
|
2
2
|
margin-bottom: 8px;
|
|
3
3
|
padding: 16px;
|
|
4
4
|
border-left: 8px solid var(--color-hue-blue-1);
|
|
5
5
|
border-radius: 8px;
|
|
6
6
|
background-color: var(--color-hue-blue-3);
|
|
7
|
-
`,
|
|
7
|
+
`,m=t.createPluginFactory({key:o.ELEMENT_QA,type:o.ELEMENT_QA,isElement:!0,component:h});exports.QuestionAnswerElement=h,exports.createQAPlugin=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../../../../../src/components/editor/plugins/blocks/qa.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAGL,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AAWxB,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../../../../../src/components/editor/plugins/blocks/qa.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAGL,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AAWxB,eAAO,MAAM,qBAAqB,4FA0KhC,CAAC;AAUH,eAAO,MAAM,cAAc,wfAKzB,CAAC"}
|