@soul-refiner/design-system 2.14.143 → 2.14.144
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,8 +1,8 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("@udecode/plate-common"),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"),l=require("../../../atoms/typography/heading.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(t);const
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("@udecode/plate-common"),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"),l=require("../../../atoms/typography/heading.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(t);const f=a.default.forwardRef(({children:n,element:o,...c},f)=>{const{questionAnswerId:p}=o,{defaultFilter:m="",commentInputLoader:h,commentLoader:w,filterComponent:g,hideShowAnswersButton:j,showAnswersBelowInput:b}=a.default.useContext(s.EditorContext),[v,q]=a.default.useState(!1),[y,E]=a.default.useState(m),[A,I]=a.default.useState(!1),C=a.default.useRef(null),B=a.default.useRef(null),$=a.default.useRef(!1);a.default.useEffect(()=>{if(!b)return void($.current||(I(!0),$.current=!0));if("undefined"==typeof IntersectionObserver)return void($.current||(I(!0),$.current=!0));if(!C.current||$.current)return;B.current&&B.current.disconnect();const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&!$.current&&($.current=!0,I(!0),e.disconnect(),B.current=null)})},{rootMargin:"200px",threshold:.01});return B.current=e,e.observe(C.current),()=>{B.current&&(B.current.disconnect(),B.current=null)}},[b]);const T=a.default.useCallback(e=>{const t=e.currentTarget.getAttribute("data-value");E(e=>e===t?m:t)},[]),F=a.default.useCallback(()=>E(m),[]);return e.jsx(r.PlateElement,{asChild:!0,element:o,ref:f,...c,children:e.jsxs(t.Fragment,{children:[e.jsx(x,{children:e.jsx(l.H,{as:"p",$color:"green-3",$fontSize:18,$lineHeight:26,$mediumBold:!0,children:n})}),e.jsx("div",{ref:C,children:e.jsxs(u.Box,{$dir:"column",$gap:"small",sx:"padding: 0 24px; @media (max-width: 500px) { padding: 0; }",contentEditable:!1,children:[(!j||g)&&e.jsxs(u.Box,{sx:"width: 100%",$justify:"space-between",children:[!j&&e.jsx(i.Button,{as:"div",onClick:()=>q(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:v?"Hide answers":"Show answers"}),g&&e.jsx(d.HideButRender,{show:v,children:e.jsx(g,{filter:y,onFilterChange:T,questionAnswerId:p})})]}),!b&&A&&e.jsx(d.HideButRender,{show:v,children:e.jsx(w,{questionAnswerId:p,filterType:y,resetFilter:F,waitToLoad:!v})}),A&&e.jsx(h,{questionAnswerId:p,onComment:()=>q(!0)}),b&&A&&e.jsx(w,{questionAnswerId:p,filterType:y,resetFilter:F,waitToLoad:!1},`comments-${p}`)]})})]})})}),x=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
|
margin: 80px 0 0px 0 !important;
|
|
8
|
-
`,p=r.createPluginFactory({key:o.ELEMENT_QA,type:o.ELEMENT_QA,isElement:!0,component:
|
|
8
|
+
`,p=r.createPluginFactory({key:o.ELEMENT_QA,type:o.ELEMENT_QA,isElement:!0,component:f});exports.QuestionAnswerElement=f,exports.createQAPlugin=p;
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
gap: 12px;
|
|
71
71
|
width: 90%;
|
|
72
72
|
padding: 8px 0;
|
|
73
|
-
`;exports.Comment=({avatarTooltipContent:t,avatarTooltipSx:n,content:r,createdDate:s,hasMoreReplies:d,id:p,onComment:$,onReact:b,latestReaction:w,onShowReplies:E,onEdit:S,isEditing:P,setIsEditing:A,dropdown:F,reactionModal:N,reactions:D,replies:H,userImageUri:O,userName:W,userReactions:V,visibilityIcon:X,customPlaceHolder:Y,userProfileUri:J,sx:K,moveButtonsToLeft:Q=!1,useNewVersion:Z=!1,onDelete:ee,visibility:te,shareDropdown:ne,belongsToLoggedUser:re=!1,disableRedirectionToUserProfile:oe=!1,replyAccountOptions:ie,selectedReplyAccount:se,onReplyAccountChange:ae,showAccountSelector:le=!1,accountSelectorSize:ce=32,activeReplyId:de,onReplyClick:pe,flatReplies:xe=!1,mentionMap:ue={},avatarInside:he=!1})=>{const[ge,fe]=k.default.useState(!1),[me,je]=k.default.useState({x:0,y:0}),[ye,ve]=k.default.useState("up"),[$e,be]=k.default.useState(!1),[we,Ee]=k.default.useState(!1),[ke,Se]=k.default.useState(""),[Ce,Pe]=k.default.useState(r),Re=k.default.useRef(null),[Ie,ze]=k.default.useState(!1),[Be,qe]=k.default.useState(!1),Te=de===p,
|
|
73
|
+
`;exports.Comment=({avatarTooltipContent:t,avatarTooltipSx:n,content:r,createdDate:s,hasMoreReplies:d,id:p,onComment:$,onReact:b,latestReaction:w,onShowReplies:E,onEdit:S,isEditing:P,setIsEditing:A,dropdown:F,reactionModal:N,reactions:D,replies:H,userImageUri:O,userName:W,userReactions:V,visibilityIcon:X,customPlaceHolder:Y,userProfileUri:J,sx:K,moveButtonsToLeft:Q=!1,useNewVersion:Z=!1,onDelete:ee,visibility:te,shareDropdown:ne,belongsToLoggedUser:re=!1,disableRedirectionToUserProfile:oe=!1,replyAccountOptions:ie,selectedReplyAccount:se,onReplyAccountChange:ae,showAccountSelector:le=!1,accountSelectorSize:ce=32,activeReplyId:de,onReplyClick:pe,flatReplies:xe=!1,mentionMap:ue={},avatarInside:he=!1})=>{const[ge,fe]=k.default.useState(!1),[me,je]=k.default.useState({x:0,y:0}),[ye,ve]=k.default.useState("up"),[$e,be]=k.default.useState(!1),[we,Ee]=k.default.useState(!1),[ke,Se]=k.default.useState(""),[Ce,Pe]=k.default.useState(r),Re=k.default.useRef(null),[Ie,ze]=k.default.useState(!1),[Be,qe]=k.default.useState(!1),Te=window.innerWidth<=500,_e=de===p,Le=k.default.Children.toArray(H);k.default.useEffect(()=>{(P||Ie)&&Re.current&&Re.current.focus()},[P,Ie]);const Me=e=>{e.stopPropagation(),fe(e=>!e),je({y:e.clientY,x:e.clientX}),ve(e.clientY>400?"up":"down")},Ae=()=>{E&&E(),Ee(!0)},Ue=h.abbrTimeBeforeDate(s),Ge=D&&Object.entries(D).slice(0,5).sort((e,t)=>e[1]<t[1]?1:-1).map(([t,n])=>e.jsx(e.Fragment,{children:e.jsx(y.EmojiReaction,{size:16,emoji:t,isActive:V?.includes(t),onReact:()=>b(t),showSparkle:t===w,count:n,showCount:!0},p+t)})),Fe=!!Le?.length&&Le.length>0,Ne=Fe&&Le.map((t,n)=>{if(!k.default.isValidElement(t))return null;const r=t.props?.id,o=n!==Le.length-1||d;return xe?e.jsx(k.default.Fragment,{children:t},r):e.jsxs(M,{$hasLine:o,children:[t,e.jsx(U,{})]},r)});return e.jsxs(B,{$sx:K,id:"comment-"+p,$moveButtonsToLeft:Q,children:[!he&&(O&&"/images/default_avatar.png"!==O?e.jsx(o.Avatar,{as:oe?void 0:C.default,href:oe?void 0:J,image:O,size:32,tooltipContent:t,tooltipSx:n}):e.jsx(o.Avatar.Initials,{name:W||"U",size:32,sx:"font-size: 12px;"})),e.jsxs(i.Box,{$flex:1,$dir:"column",children:[e.jsxs(q,{$hasReplies:!xe&&(Fe||!!d),children:[P||Ie?e.jsx(g.ResponsiveTextArea,{inputStyles:"min-height: 104px;",wrapperStyles:"background:var(--color-grey-9); ",onChange:e=>{Pe(e.target.value)},value:Ce,ref:Re,onBlur:async()=>{Z&&(S&&await S(Ce,p),ze(!1))}}):e.jsxs(T,{onClick:()=>Z&&re?ze(!0):void 0,onMouseEnter:()=>qe(!0),onMouseLeave:()=>qe(!1),children:[e.jsxs(i.Box,{$dir:"row",$justify:"space-between",$align:"center",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[he&&(O&&"/images/default_avatar.png"!==O?e.jsx(o.Avatar,{as:oe?void 0:C.default,href:oe?void 0:J,image:O,size:32,tooltipContent:t,tooltipSx:n}):e.jsx(o.Avatar.Initials,{name:W||"U",size:32,sx:"font-size: 12px;"})),e.jsx(a.P,{as:oe?void 0:J?C.default:"span",href:oe?void 0:J,$bold:!0,$color:"grey-2",sx:"text-decoration:none !important; color:var(--color-grey-2) !important;",$fontSize:14,$lineHeight:20,children:W}),Z&&te&&("PUBLIC_WITH_MEETING"===te?e.jsxs(e.Fragment,{children:[z.PUBLIC,e.jsx(a.P,{$fontSize:14,children:I.PUBLIC}),z.MEETING_MEMBERS,e.jsx(a.P,{$fontSize:14,children:I.MEETING_MEMBERS})]}):e.jsxs(e.Fragment,{children:[z[te],e.jsx(a.P,{$fontSize:14,children:I[te]})]}))]}),Z&&re?Te||Be?e.jsx(v.TrashSlash,{sx:"cursor: pointer;",onClick:e=>{e.stopPropagation(),e.preventDefault(),ee&&ee()}}):null:F]}),e.jsx(a.P,{sx:"white-space: pre-line;letter-spacing: -0.176px; word-break: break-word;",children:R(r,ue)})]}),e.jsxs(i.Box,{$align:"flex-start",$dir:"row",$display:"flex",$gap:16,sx:"margin: 8px 0px; position: relative;",children:[P?e.jsxs(i.Box,{$display:"flex",$align:"center",$justify:"space-between",$gap:6,sx:"margin-top: 8px; width: 100%;",children:[e.jsx(x.Emoticon,{color:"primary-blue-2",onClick:Me,size:24,sx:`cursor: pointer; flex-shrink: 0;\n ${!Q&&"margin-right: auto;"}\n `}),e.jsx(l.Button,{onClick:()=>{A&&A(!P),Pe(r)},sx:`background-color: transparent; border: none; box-shadow: none; color: var(--color-primary-blue-2);\n ${Q?"margin-left: 20px;":"margin-left: auto;"}\n &:hover, &:focus {\n border: none;\n outline: none;\n }\n `,size:"small",type:"outlined",children:"Cancel"}),e.jsx(l.Button,{onClick:()=>{S&&S(Ce,p),A&&A(!1)},size:"small",type:"primary",children:"Save"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x.Emoticon,{color:"primary-blue-2",onClick:Me,size:24,sx:" cursor: pointer; flex-shrink: 0;"}),e.jsx(u.Comment,{color:"primary-blue-2",onClick:()=>{pe&&p?pe(de===p?"":p):be(e=>!e)},size:24,sx:"border-radius: 50%; cursor: pointer; flex-shrink: 0;"}),e.jsx(a.P,{$color:"grey-7",children:"•"}),e.jsx(a.P,{$color:"grey-4",$fontSize:12,$lineHeight:24,sx:"flex-shrink: 0;",children:Ue}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",marginLeft:"auto",width:"100%"},children:[e.jsxs(i.Box,{$display:"flex",$flow:"row wrap",$justify:"flex-end",$align:"flex-end",$gap:6,sx:` \n margin-left: auto;\n @media (max-width: 500px) {\n max-width: 100%;\n }\n ${Ge?.length?"margin-bottom: 12px;":""}\n `,children:[Ge,N]}),Z&&ne]})]}),ge&&e.jsx(c.Portal,{children:e.jsx(_,{$pickerOrientation:ye,$top:me.y,$left:me.x,children:e.jsx(j.CustomEmojiPicker,{open:ge,trigger:e.jsx(e.Fragment,{}),onSelect:({native:e})=>{b(e),fe(!1)},onClickOutside:()=>fe(!1)})})})]})]}),Fe&&we&&e.jsx(L,{children:Ne}),!we&&!d&&Fe&&e.jsx(L,{children:e.jsxs(M,{$hasLine:!1,children:[e.jsx(l.Button,{onClick:Ae,size:"small",sx:"color: var(--color-grey-3);",type:"text",children:"show replies"}),e.jsx(U,{})]})}),d&&e.jsx(L,{children:e.jsxs(M,{$hasLine:!1,children:[e.jsx(l.Button,{onClick:Ae,size:"small",sx:"color: var(--color-grey-3);",type:"text",children:"show more replies"}),e.jsx(U,{})]})}),(_e||$e)&&e.jsxs(G,{children:[le&&ie&&ae?e.jsx(m.AccountSelector,{selectedOption:se??null,options:ie,onOptionChange:ae,size:ce,showChevron:ie.length>1}):O&&"/images/default_avatar.png"!==O?e.jsx(o.Avatar,{as:oe?void 0:C.default,href:oe?void 0:J,image:O,size:32,tooltipContent:t,tooltipSx:n}):e.jsx(o.Avatar.Initials,{name:W||"U",size:32,sx:"font-size: 12px;"}),e.jsx(g.ResponsiveTextArea,{bg:"var(--color-grey-10)",value:ke,onChange:e=>{Se(e.target.value)},placeholder:Y||"Write a reply",maxCharacters:1e3,minWidth:"100%",wrapperStyles:"margin: 16px 0; width: 100%;",actionComponent:e.jsxs(i.Box,{sx:"margin: auto 0 5px 0px;",$align:"center",$justify:"center",$gap:8,children:[X,e.jsx(l.Button,{disabled:!ke.length,icon:e.jsx(f.SendText,{}),onClick:e=>{e.stopPropagation(),e.preventDefault(),$(ke,p),Se("")},sx:"\n justify-content: center; \n background-color: var(--color-primary-blue-2);\n align-items: center; \n height: 40px;\n width: 40px;\n cursor: pointer;\n border: none;\n box-shadow: none;\n svg {\n fill: white;\n }\n &:disabled {\n svg {\n fill: var(--color-grey-7);\n }\n border: none !important;\n background-color: var(--color-grey-1);\n }\n ",type:"secondary"})]}),inputStyles:"font-size: 14px;"})]})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var H=require("react/jsx-runtime"),C=require("../../components/iconography/icon/icon.js");exports.Bible=V=>H.jsx(C.Icon,{viewBox:"0 0 30 30",...V,children:H.jsx("path",{d:"M4.125 1.16129C2.75 1.16129 1.625 2.03226 1.625 3.09677V23.6129H4.875V1.16129H4.125ZM6.5 1.16129V23.6129H28.375V1.16129H6.5ZM0 3.09677C0 1.35484 1.875 0 4.125 0H29.25C29.625 0 30 0.193548 30 0.580645V24.2903C30 24.3871 30 24.4839 29.875 24.5806C29.375 25.1613 29.25 25.7419 29.25 26.3226C29.25 26.9032 29.375 27.4839 29.875 28.0645C30 28.2581 30 28.5484 29.875 28.7419C29.75 28.8387 29.5 29.0323 29.25 29.0323H3C1.375 29.0323 0 28.0645 0 26.8065V3.09677ZM1.625 25.8387V26.8065C1.625 27.2903 2.125 27.7742 3 27.7742H28C27.75 27.2903 27.625 26.8065 27.625 26.3226C27.625 25.8387 27.75 25.3548 28 24.871H3C2.125 24.871 1.625 25.3548 1.625 25.8387ZM14.25 9.77419V6.87097H15.75V9.77419H18.875V10.9355H15.75V19.7419H14.25V10.9355H11.125V9.77419H14.25Z"})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bible.d.ts","sourceRoot":"","sources":["../../../../src/icons/basic/bible.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,eAAO,MAAM,KAAK,UAAW,SAAS,
|
|
1
|
+
{"version":3,"file":"bible.d.ts","sourceRoot":"","sources":["../../../../src/icons/basic/bible.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,eAAO,MAAM,KAAK,UAAW,SAAS,4CAMrC,CAAC"}
|