@soul-refiner/design-system 2.14.123 → 2.14.125

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 +1 @@
1
- "use strict";var e=require("@udecode/plate-common"),t=require("@udecode/plate"),i=require("@udecode/plate-alignment"),n=require("@udecode/plate-indent"),r=require("../plugins/plate.js");const l=e.createPlugins([t.createParagraphPlugin(),t.createListPlugin(),t.createBoldPlugin(),t.createItalicPlugin(),t.createUnderlinePlugin(),i.createAlignPlugin({inject:{props:{validTypes:[e.ELEMENT_PARAGRAPH]}}}),n.createIndentPlugin({options:{offset:40,unit:"px"}}),t.createHistoryPlugin()],{components:r.plateUI});exports.plugins=l;
1
+ "use strict";var e=require("@udecode/plate-common"),t=require("@udecode/plate"),i=require("@udecode/plate-indent"),n=require("../plugins/plate.js");const r=e.createPlugins([t.createParagraphPlugin(),t.createListPlugin(),t.createBoldPlugin(),t.createItalicPlugin(),t.createUnderlinePlugin(),t.createLinkPlugin(),t.createAlignPlugin({inject:{props:{validTypes:[e.ELEMENT_PARAGRAPH]}}}),i.createIndentPlugin({options:{offset:40,unit:"px"}}),t.createHistoryPlugin()],{components:n.plateUI});exports.plugins=r;
@@ -40,6 +40,11 @@
40
40
  text-decoration: underline;
41
41
  }
42
42
 
43
+ a {
44
+ text-decoration: underline;
45
+ color: var(--color-primary-blue-1);
46
+ }
47
+
43
48
  li {
44
49
  margin: 8px 0px;
45
50
  color: var(--color-grey-3);
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("styled-components"),o=require("next/link"),n=require("../../iconography/avatar/avatar.js"),i=require("../../atoms/box/box.js"),s=require("../../atoms/highlighter/highlighter.js"),l=require("../../atoms/typography/paragraph.js"),a=require("../../actions/button/button.js"),c=require("../portal/portal.js"),d=require("../../../common/regex.js"),p=require("../../../common/styles.js"),x=require("../../../icons/basic/emoticon_add.js"),u=require("../../../icons/message/comment.js"),h=require("./helpers.js"),g=require("../../input/responsive-text_area/responsive_text_area.js"),f=require("../../../icons/email/send_text.js"),m=require("../../actions/AccountSelector/selector.js"),j=require("../../feedback/emojiPicker/emoji-picker.js"),y=require("../../feedback/emojiPicker/emoji-reactions.js"),b=require("../../../icons/basic/trash_slash.js"),v=require("../../../icons/security/lock.js"),$=require("../../../icons/basic/eye.js"),w=require("../../../icons/time/calendar_dates.js");function k(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C=k(r),S=k(t),E=k(o);const P={PRIVATE:"Private",MEETING_MEMBERS:"Meeting",PUBLIC:"Public",PUBLIC_WITH_MEETING:""},B={PRIVATE:e.jsx(v.Lock,{}),MEETING_MEMBERS:e.jsx(w.CalendarDates,{}),PUBLIC:e.jsx($.Eye,{}),PUBLIC_WITH_MEETING:e.jsx(e.Fragment,{})},R=S.default.div`
2
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("styled-components"),r=require("next/link"),o=require("../../iconography/avatar/avatar.js"),i=require("../../atoms/box/box.js"),s=require("../../atoms/highlighter/highlighter.js"),l=require("../../atoms/typography/paragraph.js"),a=require("../../actions/button/button.js"),c=require("../portal/portal.js"),d=require("../../../common/regex.js"),p=require("../../../common/styles.js"),x=require("../../../icons/basic/emoticon_add.js"),u=require("../../../icons/message/comment.js"),h=require("./helpers.js"),g=require("../../input/responsive-text_area/responsive_text_area.js"),f=require("../../../icons/email/send_text.js"),m=require("../../actions/AccountSelector/selector.js"),j=require("../../feedback/emojiPicker/emoji-picker.js"),y=require("../../feedback/emojiPicker/emoji-reactions.js"),$=require("../../../icons/basic/trash_slash.js"),b=require("../../../icons/security/lock.js"),v=require("../../../icons/basic/eye.js"),w=require("../../../icons/time/calendar_dates.js");function k(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=k(t),S=k(n),C=k(r);const P=/@(\S+)/g,R=(t,n={})=>{if(!t)return e.jsx(e.Fragment,{children:t});const r=new RegExp(P.source,"g");if(!r.test(t))return e.jsx(s.Highlighter,{highlightRender:t=>e.jsx(l.P,{as:"span",$color:"primary-blue-2",children:e.jsx(C.default,{href:t,target:"_blank",children:t})}),seperator:d.URL_REGEX,text:t});const o=[];let i=0;const a=[];let c;for(r.lastIndex=0;null!==(c=r.exec(t));)a.push({index:c.index,type:"mention",match:c});const p=new RegExp(d.URL_REGEX.source,"g");for(;null!==(c=p.exec(t));)a.push({index:c.index,type:"url",match:c});a.sort((e,t)=>e.index-t.index);for(const{index:e,type:n,match:r}of a)e>i&&o.push({type:"text",content:t.substring(i,e),start:i,end:e}),"mention"===n?(o.push({type:"mention",content:r[0],start:e,end:e+r[0].length}),i=e+r[0].length):(o.push({type:"url",content:r[0],start:e,end:e+r[0].length}),i=e+r[0].length);return i<t.length&&o.push({type:"text",content:t.substring(i),start:i,end:t.length}),e.jsx(e.Fragment,{children:o.map((t,r)=>{if("mention"===t.type){const o=t.content.substring(1),i=n[o];return i?e.jsx(A,{children:e.jsx(C.default,{href:i,children:t.content})},`${t.start}-${t.end}-${r}`):e.jsx(A,{children:t.content},`${t.start}-${t.end}-${r}`)}return"url"===t.type?e.jsx(l.P,{as:"span",$color:"primary-blue-2",children:e.jsx(C.default,{href:t.content,target:"_blank",children:t.content})},`${t.start}-${t.end}-${r}`):e.jsx(l.P,{as:"span",children:t.content},`${t.start}-${t.end}-${r}`)})})},B={PRIVATE:"Private",MEETING_MEMBERS:"Meeting",PUBLIC:"Public",PUBLIC_WITH_MEETING:""},I={PRIVATE:e.jsx(b.Lock,{}),MEETING_MEMBERS:e.jsx(w.CalendarDates,{}),PUBLIC:e.jsx(v.Eye,{}),PUBLIC_WITH_MEETING:e.jsx(e.Fragment,{})},q=S.default.div`
3
3
  max-width: 700px;
4
4
  display: flex;
5
5
  flex-direction: row;
@@ -9,19 +9,19 @@
9
9
  ${({$sx:e})=>e||""}
10
10
 
11
11
  ${({$moveButtonsToLeft:e})=>e?"justify-content: flex-start;":"justify-content: space-between;"}
12
- `,q=S.default.div`
12
+ `,T=S.default.div`
13
13
  display: flex;
14
14
  word-break: break-word;
15
15
  flex-direction: column;
16
16
  ${({$hasReplies:e})=>e?'\n position: relative;\n\n &::before {\n content: "";\n position: absolute;\n top: 32px;\n left: -28px;\n height: calc(100% - 12px);\n border-left: 2px solid var(--color-grey-9);\n }':""}
17
- `,I=S.default.div`
17
+ `,z=S.default.div`
18
18
  padding: 16px;
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  gap: 8px;
22
22
  background-color: var(--color-grey-10);
23
23
  border-radius: 16px;
24
- `,T=S.default.div`
24
+ `,_=S.default.div`
25
25
  position: absolute;
26
26
  z-index: 1000;
27
27
 
@@ -35,12 +35,26 @@
35
35
  border-radius: 12px;
36
36
  cursor: pointer;
37
37
  ${({$userSelected:e})=>e?"\n background-color: var(--color-primary-blue-4);\n border: 1px solid var(--color-primary-blue-3);\n ":""}
38
- `;const z=S.default.div`
38
+ `;const L=S.default.div`
39
39
  padding-top: 12px;
40
- `,_=S.default.div`
40
+ `,M=S.default.div`
41
41
  position: relative;
42
42
  ${({$hasLine:e})=>e?'\n &::before {\n content: "";\n position: absolute;\n left: -28px;\n height: 100%;\n border-left: 2px solid var(--color-grey-9);\n }':""}
43
- `,L=S.default.div`
43
+ `,A=S.default.span`
44
+ font-weight: 600;
45
+ font-size: 0.9em;
46
+
47
+ a {
48
+ color: var(--color-primary-blue-2);
49
+ text-decoration: none;
50
+ font-weight: inherit;
51
+ font-size: inherit;
52
+
53
+ &:hover {
54
+ text-decoration: underline;
55
+ }
56
+ }
57
+ `,U=S.default.div`
44
58
  position: absolute;
45
59
  top: -12px;
46
60
  left: -28px;
@@ -50,10 +64,10 @@
50
64
  border: 2px solid var(--color-grey-9);
51
65
  border-top: none;
52
66
  border-right: none;
53
- `,M=S.default.form`
67
+ `,F=S.default.form`
54
68
  display: flex;
55
69
  align-items: center;
56
70
  gap: 12px;
57
- width: 100%;
71
+ width: 90%;
58
72
  padding: 8px 0;
59
- `;exports.Comment=({avatarTooltipContent:r,avatarTooltipSx:t,content:o,createdDate:p,hasMoreReplies:v,id:$,onComment:w,onReact:k,latestReaction:S,onShowReplies:A,onEdit:U,isEditing:N,setIsEditing:D,dropdown:G,reactionModal:H,reactions:O,replies:F,userImageUri:V,userName:W,userReactions:Y,visibilityIcon:X,customPlaceHolder:J,userProfileUri:K,sx:Q,moveButtonsToLeft:Z=!1,useNewVersion:ee=!1,onDelete:re,visibility:te,shareDropdown:oe,belongsToLoggedUser:ne=!1,disableRedirectionToUserProfile:ie=!1,replyAccountOptions:se,selectedReplyAccount:le,onReplyAccountChange:ae,showAccountSelector:ce=!1,accountSelectorSize:de=32,activeReplyId:pe,onReplyClick:xe})=>{const[ue,he]=C.default.useState(!1),[ge,fe]=C.default.useState({x:0,y:0}),[me,je]=C.default.useState("up"),[ye,be]=C.default.useState(!1),[ve,$e]=C.default.useState(!1),[we,ke]=C.default.useState(""),[Ce,Se]=C.default.useState(o),Ee=C.default.useRef(null),[Pe,Be]=C.default.useState(!1),Re=pe===$,qe=C.default.Children.toArray(F);C.default.useEffect(()=>{(N||Pe)&&Ee.current&&Ee.current.focus()},[N,Pe]);const Ie=e=>{e.stopPropagation(),he(e=>!e),fe({y:e.clientY,x:e.clientX}),je(e.clientY>400?"up":"down")},Te=()=>{A&&A(),$e(!0)},ze=h.abbrTimeBeforeDate(p),_e=O&&Object.entries(O).slice(0,5).sort((e,r)=>e[1]<r[1]?1:-1).map(([r,t])=>e.jsx(e.Fragment,{children:e.jsx(y.EmojiReaction,{size:16,emoji:r,isActive:Y?.includes(r),onReact:()=>k(r),showSparkle:r===S,count:t,showCount:!0},$+r)})),Le=!!qe?.length&&qe.length>0,Me=Le&&qe.map((r,t)=>{if(!C.default.isValidElement(r))return null;const o=r.props?.id,n=t!==qe.length-1||v;return e.jsxs(_,{$hasLine:n,children:[r,e.jsx(L,{})]},o)});return e.jsxs(R,{$sx:Q,id:"comment-"+$,$moveButtonsToLeft:Z,children:[e.jsx(n.Avatar,{as:ie?void 0:E.default,href:ie?void 0:K,image:V,size:32,tooltipContent:r,tooltipSx:t}),e.jsxs(i.Box,{$flex:1,$dir:"column",children:[e.jsxs(q,{$hasReplies:Le||!!v,children:[N||Pe?e.jsx(g.ResponsiveTextArea,{inputStyles:"min-height: 104px;",wrapperStyles:"background:var(--color-grey-9); ",onChange:e=>{Se(e.target.value)},value:Ce,ref:Ee,onBlur:async()=>{ee&&(U&&await U(Ce,$),Be(!1))}}):e.jsxs(I,{onClick:()=>ee&&ne?Be(!0):void 0,children:[e.jsxs(i.Box,{$dir:"row",$justify:"space-between",$align:"center",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(l.P,{as:ie?void 0:K?E.default:"span",href:ie?void 0:K,$bold:!0,$color:"grey-2",sx:"text-decoration:none !important; color:var(--color-grey-2) !important;",$fontSize:14,$lineHeight:20,children:W}),ee&&te&&("PUBLIC_WITH_MEETING"===te?e.jsxs(e.Fragment,{children:[B.PUBLIC,e.jsx(l.P,{$fontSize:14,children:P.PUBLIC}),B.MEETING_MEMBERS,e.jsx(l.P,{$fontSize:14,children:P.MEETING_MEMBERS})]}):e.jsxs(e.Fragment,{children:[B[te],e.jsx(l.P,{$fontSize:14,children:P[te]})]}))]}),ee&&ne?e.jsx(b.TrashSlash,{sx:"cursor: pointer;",onClick:e=>{e.stopPropagation(),e.preventDefault(),re&&re()}}):G]}),e.jsx(l.P,{sx:"white-space: pre-line;letter-spacing: -0.176px; word-break: break-word;",children:e.jsx(s.Highlighter,{highlightRender:r=>e.jsx(l.P,{as:"span",$color:"primary-blue-2",children:e.jsx(E.default,{href:r,target:"_blank",children:r})}),seperator:d.URL_REGEX,text:o})})]}),e.jsxs(i.Box,{$align:"flex-start",$dir:"row",$display:"flex",$gap:16,sx:"margin: 8px 0px; position: relative;",children:[N?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:Ie,size:24,sx:`cursor: pointer; flex-shrink: 0;\n ${!Z&&"margin-right: auto;"}\n `}),e.jsx(a.Button,{onClick:()=>{D&&D(!N),Se(o)},sx:`background-color: transparent; border: none; box-shadow: none; color: var(--color-primary-blue-2);\n ${Z?"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(a.Button,{onClick:()=>{U&&U(Ce,$),D&&D(!1)},size:"small",type:"primary",children:"Save"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x.Emoticon,{color:"primary-blue-2",onClick:Ie,size:24,sx:" cursor: pointer; flex-shrink: 0;"}),e.jsx(u.Comment,{color:"primary-blue-2",onClick:()=>{xe&&$?xe(pe===$?"":$):be(e=>!e)},size:24,sx:"border-radius: 50%; cursor: pointer; flex-shrink: 0;"}),e.jsx(l.P,{$color:"grey-7",children:"•"}),e.jsx(l.P,{$color:"grey-4",$fontSize:12,$lineHeight:24,sx:"flex-shrink: 0;",children:ze}),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 ${_e?.length?"margin-bottom: 12px;":""}\n `,children:[_e,H]}),ee&&oe]})]}),ue&&e.jsx(c.Portal,{children:e.jsx(T,{$pickerOrientation:me,$top:ge.y,$left:ge.x,children:e.jsx(j.CustomEmojiPicker,{open:ue,trigger:e.jsx(e.Fragment,{}),onSelect:({native:e})=>{k(e),he(!1)},onClickOutside:()=>he(!1)})})})]})]}),Le&&ve&&e.jsx(z,{children:Me}),!ve&&!v&&Le&&e.jsx(z,{children:e.jsxs(_,{$hasLine:!1,children:[e.jsx(a.Button,{onClick:Te,size:"small",sx:"color: var(--color-grey-3);",type:"text",children:"show replies"}),e.jsx(L,{})]})}),v&&e.jsx(z,{children:e.jsxs(_,{$hasLine:!1,children:[e.jsx(a.Button,{onClick:Te,size:"small",sx:"color: var(--color-grey-3);",type:"text",children:"show more replies"}),e.jsx(L,{})]})}),(Re||ye)&&e.jsxs(M,{children:[ce&&se&&ae?e.jsx(m.AccountSelector,{selectedOption:le??null,options:se,onOptionChange:ae,size:de,showChevron:se.length>1}):e.jsx(n.Avatar,{as:ie?void 0:E.default,href:ie?void 0:K,image:V,size:32,tooltipContent:r,tooltipSx:t}),e.jsx(g.ResponsiveTextArea,{bg:"var(--color-grey-10)",value:we,onChange:e=>{ke(e.target.value)},placeholder:J||"Write a reply",maxCharacters:1e3,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(a.Button,{disabled:!we.length,icon:e.jsx(f.SendText,{}),onClick:e=>{e.stopPropagation(),e.preventDefault(),w(we),ke("")},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;"})]})]})]})};
73
+ `;exports.Comment=({avatarTooltipContent:t,avatarTooltipSx:n,content:r,createdDate:s,hasMoreReplies:d,id:p,onComment:b,onReact:v,latestReaction:w,onShowReplies:k,onEdit:S,isEditing:P,setIsEditing:A,dropdown:G,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:le,showAccountSelector:ae=!1,accountSelectorSize:ce=32,activeReplyId:de,onReplyClick:pe,flatReplies:xe=!1,mentionMap:ue={}})=>{const[he,ge]=E.default.useState(!1),[fe,me]=E.default.useState({x:0,y:0}),[je,ye]=E.default.useState("up"),[$e,be]=E.default.useState(!1),[ve,we]=E.default.useState(!1),[ke,Ee]=E.default.useState(""),[Se,Ce]=E.default.useState(r),Pe=E.default.useRef(null),[Re,Be]=E.default.useState(!1),Ie=de===p,qe=E.default.Children.toArray(H);E.default.useEffect(()=>{(P||Re)&&Pe.current&&Pe.current.focus()},[P,Re]);const Te=e=>{e.stopPropagation(),ge(e=>!e),me({y:e.clientY,x:e.clientX}),ye(e.clientY>400?"up":"down")},ze=()=>{k&&k(),we(!0)},_e=h.abbrTimeBeforeDate(s),Le=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:()=>v(t),showSparkle:t===w,count:n,showCount:!0},p+t)})),Me=!!qe?.length&&qe.length>0,Ae=Me&&qe.map((t,n)=>{if(!E.default.isValidElement(t))return null;const r=t.props?.id,o=n!==qe.length-1||d;return xe?e.jsx(E.default.Fragment,{children:t},r):e.jsxs(M,{$hasLine:o,children:[t,e.jsx(U,{})]},r)});return e.jsxs(q,{$sx:K,id:"comment-"+p,$moveButtonsToLeft:Q,children:[e.jsx(o.Avatar,{as:oe?void 0:C.default,href:oe?void 0:J,image:O,size:32,tooltipContent:t,tooltipSx:n}),e.jsxs(i.Box,{$flex:1,$dir:"column",children:[e.jsxs(T,{$hasReplies:!xe&&(Me||!!d),children:[P||Re?e.jsx(g.ResponsiveTextArea,{inputStyles:"min-height: 104px;",wrapperStyles:"background:var(--color-grey-9); ",onChange:e=>{Ce(e.target.value)},value:Se,ref:Pe,onBlur:async()=>{Z&&(S&&await S(Se,p),Be(!1))}}):e.jsxs(z,{onClick:()=>Z&&re?Be(!0):void 0,children:[e.jsxs(i.Box,{$dir:"row",$justify:"space-between",$align:"center",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(l.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:[I.PUBLIC,e.jsx(l.P,{$fontSize:14,children:B.PUBLIC}),I.MEETING_MEMBERS,e.jsx(l.P,{$fontSize:14,children:B.MEETING_MEMBERS})]}):e.jsxs(e.Fragment,{children:[I[te],e.jsx(l.P,{$fontSize:14,children:B[te]})]}))]}),Z&&re?e.jsx($.TrashSlash,{sx:"cursor: pointer;",onClick:e=>{e.stopPropagation(),e.preventDefault(),ee&&ee()}}):G]}),e.jsx(l.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:Te,size:24,sx:`cursor: pointer; flex-shrink: 0;\n ${!Q&&"margin-right: auto;"}\n `}),e.jsx(a.Button,{onClick:()=>{A&&A(!P),Ce(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(a.Button,{onClick:()=>{S&&S(Se,p),A&&A(!1)},size:"small",type:"primary",children:"Save"})]}):e.jsxs(e.Fragment,{children:[e.jsx(x.Emoticon,{color:"primary-blue-2",onClick:Te,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(l.P,{$color:"grey-7",children:"•"}),e.jsx(l.P,{$color:"grey-4",$fontSize:12,$lineHeight:24,sx:"flex-shrink: 0;",children:_e}),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 ${Le?.length?"margin-bottom: 12px;":""}\n `,children:[Le,N]}),Z&&ne]})]}),he&&e.jsx(c.Portal,{children:e.jsx(_,{$pickerOrientation:je,$top:fe.y,$left:fe.x,children:e.jsx(j.CustomEmojiPicker,{open:he,trigger:e.jsx(e.Fragment,{}),onSelect:({native:e})=>{v(e),ge(!1)},onClickOutside:()=>ge(!1)})})})]})]}),Me&&ve&&e.jsx(L,{children:Ae}),!ve&&!d&&Me&&e.jsx(L,{children:e.jsxs(M,{$hasLine:!1,children:[e.jsx(a.Button,{onClick:ze,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(a.Button,{onClick:ze,size:"small",sx:"color: var(--color-grey-3);",type:"text",children:"show more replies"}),e.jsx(U,{})]})}),(Ie||$e)&&e.jsxs(F,{children:[ae&&ie&&le?e.jsx(m.AccountSelector,{selectedOption:se??null,options:ie,onOptionChange:le,size:ce,showChevron:ie.length>1}):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(g.ResponsiveTextArea,{bg:"var(--color-grey-10)",value:ke,onChange:e=>{Ee(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(a.Button,{disabled:!ke.length,icon:e.jsx(f.SendText,{}),onClick:e=>{e.stopPropagation(),e.preventDefault(),b(ke,p),Ee("")},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
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/minimal_editor/plugins.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO,gMAyBnB,CAAC"}
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/minimal_editor/plugins.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,OAAO,gMA0BnB,CAAC"}
@@ -42,7 +42,9 @@ export interface CommentProps {
42
42
  accountSelectorSize?: 96 | 72 | 64 | 56 | 48 | 40 | 36 | 32 | 24 | 16;
43
43
  activeReplyId?: string | null;
44
44
  onReplyClick?: (commentId: string) => void;
45
+ flatReplies?: boolean;
46
+ mentionMap?: Record<string, string>;
45
47
  }
46
- export declare const Comment: ({ avatarTooltipContent, avatarTooltipSx, content, createdDate, hasMoreReplies, id, onComment, onReact, latestReaction, onShowReplies, onEdit, isEditing, setIsEditing, dropdown, reactionModal, reactions, replies, userImageUri, userName, userReactions, visibilityIcon, customPlaceHolder, userProfileUri, sx, moveButtonsToLeft, useNewVersion, onDelete, visibility, shareDropdown, belongsToLoggedUser, disableRedirectionToUserProfile, replyAccountOptions, selectedReplyAccount, onReplyAccountChange, showAccountSelector, accountSelectorSize, activeReplyId, onReplyClick, }: CommentProps) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const Comment: ({ avatarTooltipContent, avatarTooltipSx, content, createdDate, hasMoreReplies, id, onComment, onReact, latestReaction, onShowReplies, onEdit, isEditing, setIsEditing, dropdown, reactionModal, reactions, replies, userImageUri, userName, userReactions, visibilityIcon, customPlaceHolder, userProfileUri, sx, moveButtonsToLeft, useNewVersion, onDelete, visibility, shareDropdown, belongsToLoggedUser, disableRedirectionToUserProfile, replyAccountOptions, selectedReplyAccount, onReplyAccountChange, showAccountSelector, accountSelectorSize, activeReplyId, onReplyClick, flatReplies, mentionMap, }: CommentProps) => import("react/jsx-runtime").JSX.Element;
47
49
  export {};
48
50
  //# sourceMappingURL=comment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/components/surfaces/comment/comment.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAwB1B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAI/C,KAAK,UAAU,GACX,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,oBAAoB,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,IAAI,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC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AE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACtE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAgBD,eAAO,MAAM,OAAO,slBAyCjB,YAAY,4CAycd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "2.14.123",
3
+ "version": "2.14.125",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "license": "MIT",