@viswa-test/creative-workspace-ui-component 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react"),r=require("./CustomCheckbox.js"),o={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react"),r=require("./CustomCheckbox.js"),o={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"600px",boxShadow:"0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.07)",display:"flex",flexDirection:"column",gap:"16px"},topRow:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},userInfo:{display:"flex",flexDirection:"column",gap:"2px"},userName:{fontSize:"15px",fontWeight:600,color:"#111827"},userEmail:{fontSize:"13px",color:"#6B7280"},levelBadge:{display:"flex",alignItems:"center",gap:"5px",background:"#EDE9FE",border:"1px solid #C4B5FD",borderRadius:"8px",padding:"4px 10px",fontSize:"12px",fontWeight:500,color:"#5B21B6",whiteSpace:"nowrap",flexShrink:0},divider:{border:"none",borderTop:"0.5px solid #E5E7EB"},label:{fontSize:"12px",fontWeight:500,color:"#6B7280",marginBottom:"6px",display:"flex",alignItems:"center",gap:"5px"},optionalTag:{fontSize:"11px",fontWeight:400,color:"#9CA3AF",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"20px",padding:"1px 7px"},textarea:{width:"100%",minHeight:"70px",resize:"vertical",fontSize:"13px",fontFamily:"inherit",color:"#111827",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"8px",padding:"10px 12px",lineHeight:1.6,outline:"none",boxSizing:"border-box"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",marginTop:"2px"},btnBack:{padding:"10px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"transparent",color:"#6B7280",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnLater:{padding:"8px 14px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#F3F4F6",color:"#374151",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnNow:{padding:"8px 16px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#5B4FE9",color:"#fff",border:"none",fontWeight:500,whiteSpace:"nowrap"}};exports.AddUserPopup=function(s){var a,l,d=s.user,p=s.accessLevel,x=s.wrapperEl,c=s.onBackToEditing,u=s.onSendLater,f=s.onSendNow,g=s.userLevel,b=t.useState(null!==(a=d.notes)&&void 0!==a?a:""),h=b[0],y=b[1],_=t.useRef(null);t.useEffect(function(){if(x){var e=x.style.position;return e&&"static"!==e||(x.style.position="relative"),function(){x.style.position=e}}},[x]),t.useEffect(function(){var e=function(e){"Escape"===e.key&&c()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[c]);var v=e.__assign(e.__assign({},o.overlay),x?{}:{position:"fixed"}),j=t.useState(null!==(l=d.sendMailNow)&&void 0!==l&&l),m=j[0],w=j[1];return n.jsx("div",e.__assign({style:v,onMouseDown:function(e){e.target===e.currentTarget&&c()}},{children:n.jsxs("div",e.__assign({ref:_,style:o.popup,role:"dialog","aria-modal":"true","aria-label":"Add notes for ".concat(d.name)},{children:[n.jsxs("div",e.__assign({style:o.topRow},{children:[n.jsxs("div",e.__assign({style:o.userInfo},{children:[n.jsxs("span",e.__assign({style:{fontWeight:600}},{children:["Add a note for ",d.email]})),n.jsxs("span",e.__assign({style:e.__assign(e.__assign({},o.userEmail),{alignItems:"center",gap:6,display:"flex"})},{children:[" ",n.jsxs("span",{children:[g.head," - ",g.title," "]})," ",n.jsx("span",e.__assign({style:{fontSize:20}},{children:" • "}))," ",n.jsxs("span",{children:[" ",p," "]})]})),p&&n.jsx("span",{style:e.__assign({},o.userEmail)})]})),n.jsx("button",e.__assign({style:o.btnBack,onClick:c,title:"Discard notes and go back"},{children:n.jsx(i.X,{width:14,height:14})}))]})),n.jsx("div",{children:n.jsx("textarea",{style:o.textarea,placeholder:"Write a note, e.g. context on why this clause needs review",value:h,onChange:function(e){return y(e.target.value)},autoFocus:!0})}),n.jsxs("div",e.__assign({style:{display:"flex",gap:12,fontSize:14}},{children:[n.jsxs("span",e.__assign({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[n.jsx(r.default,{getter:!0===m,setter:function(){return w(!0)},size:14}),n.jsx("span",{children:"Notify now"})]})),n.jsxs("span",e.__assign({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[n.jsx(r.default,{getter:!1===m,setter:function(){return w(!1)},size:14}),n.jsx("span",{children:"Notify when ready for review"})]}))]})),n.jsx("div",e.__assign({style:o.footer},{children:n.jsx("button",e.__assign({style:o.btnNow,onClick:function(){return m?f(h):u(h)},title:"Save notes and notify now"},{children:"Save Note"}))}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=AddUserPopup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{X as a}from"lucide-react";import l from"./CustomCheckbox.js";var p={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{X as a}from"lucide-react";import l from"./CustomCheckbox.js";var p={overlay:{position:"absolute",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(17, 24, 39, 0.45)",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",borderRadius:"inherit"},popup:{position:"relative",background:"#ffffff",border:"0.5px solid #E5E7EB",borderRadius:"16px",padding:"20px",width:"600px",boxShadow:"0 12px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.07)",display:"flex",flexDirection:"column",gap:"16px"},topRow:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},userInfo:{display:"flex",flexDirection:"column",gap:"2px"},userName:{fontSize:"15px",fontWeight:600,color:"#111827"},userEmail:{fontSize:"13px",color:"#6B7280"},levelBadge:{display:"flex",alignItems:"center",gap:"5px",background:"#EDE9FE",border:"1px solid #C4B5FD",borderRadius:"8px",padding:"4px 10px",fontSize:"12px",fontWeight:500,color:"#5B21B6",whiteSpace:"nowrap",flexShrink:0},divider:{border:"none",borderTop:"0.5px solid #E5E7EB"},label:{fontSize:"12px",fontWeight:500,color:"#6B7280",marginBottom:"6px",display:"flex",alignItems:"center",gap:"5px"},optionalTag:{fontSize:"11px",fontWeight:400,color:"#9CA3AF",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"20px",padding:"1px 7px"},textarea:{width:"100%",minHeight:"70px",resize:"vertical",fontSize:"13px",fontFamily:"inherit",color:"#111827",background:"#F9FAFB",border:"0.5px solid #E5E7EB",borderRadius:"8px",padding:"10px 12px",lineHeight:1.6,outline:"none",boxSizing:"border-box"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",marginTop:"2px"},btnBack:{padding:"10px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"transparent",color:"#6B7280",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnLater:{padding:"8px 14px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#F3F4F6",color:"#374151",border:"0.5px solid #D1D5DB",fontWeight:500,whiteSpace:"nowrap"},btnNow:{padding:"8px 16px",borderRadius:"8px",fontSize:"13px",fontFamily:"inherit",cursor:"pointer",background:"#5B4FE9",color:"#fff",border:"none",fontWeight:500,whiteSpace:"nowrap"}};function d(d){var s,c,f=d.user,x=d.accessLevel,u=d.wrapperEl,g=d.onBackToEditing,h=d.onSendLater,b=d.onSendNow,y=d.userLevel,m=o(null!==(s=f.notes)&&void 0!==s?s:""),v=m[0],w=m[1],E=i(null);r(function(){if(u){var e=u.style.position;return e&&"static"!==e||(u.style.position="relative"),function(){u.style.position=e}}},[u]),r(function(){var e=function(e){"Escape"===e.key&&g()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[g]);var k=e(e({},p.overlay),u?{}:{position:"fixed"}),S=o(null!==(c=f.sendMailNow)&&void 0!==c&&c),B=S[0],F=S[1];return t("div",e({style:k,onMouseDown:function(e){e.target===e.currentTarget&&g()}},{children:n("div",e({ref:E,style:p.popup,role:"dialog","aria-modal":"true","aria-label":"Add notes for ".concat(f.name)},{children:[n("div",e({style:p.topRow},{children:[n("div",e({style:p.userInfo},{children:[n("span",e({style:{fontWeight:600}},{children:["Add a note for ",f.email]})),n("span",e({style:e(e({},p.userEmail),{alignItems:"center",gap:6,display:"flex"})},{children:[" ",n("span",{children:[y.head," - ",y.title," "]})," ",t("span",e({style:{fontSize:20}},{children:" • "}))," ",n("span",{children:[" ",x," "]})]})),x&&t("span",{style:e({},p.userEmail)})]})),t("button",e({style:p.btnBack,onClick:g,title:"Discard notes and go back"},{children:t(a,{width:14,height:14})}))]})),t("div",{children:t("textarea",{style:p.textarea,placeholder:"Write a note, e.g. context on why this clause needs review",value:v,onChange:function(e){return w(e.target.value)},autoFocus:!0})}),n("div",e({style:{display:"flex",gap:12,fontSize:14}},{children:[n("span",e({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[t(l,{getter:!0===B,setter:function(){return F(!0)},size:14}),t("span",{children:"Notify now"})]})),n("span",e({style:{alignItems:"center",display:"flex",justifyContent:"center",gap:6}},{children:[t(l,{getter:!1===B,setter:function(){return F(!1)},size:14}),t("span",{children:"Notify when ready for review"})]}))]})),t("div",e({style:p.footer},{children:t("button",e({style:p.btnNow,onClick:function(){return B?b(v):h(v)},title:"Save notes and notify now"},{children:"Save Note"}))}))]}))}))}export{d as AddUserPopup};
|
|
2
2
|
//# sourceMappingURL=AddUserPopup.js.map
|