@viswa-test/creative-workspace-ui-component 0.0.11 → 0.0.12

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"),s=require("react"),t=require("lucide-react"),i=require("./utils/generateRandomColorsPair.js"),r=require("./assets/VerticalLine.js"),o=require("./components/AssignLevelsDatePicker.js"),a=require("./components/LevelData.js");exports.default=function(l){var d,c,u=l.level,g=l.id,p=l.accessLevelOptions,x=l.fetchUsers,h=l.onToggleMandatory,f=l.onDueDateChange,y=l.onAssigneesChange,_=l.onTitleChange,j=l.onDeleteLevel,m=s.useMemo(function(){return i.getRandomColorPair()},[]),v=s.useState(!1),b=v[0],C=v[1],k=s.useState(!1),D=k[0],q=k[1];return n.jsxs("div",e.__assign({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n.jsx("span",e.__assign({style:{backgroundColor:m.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:m.color,fontSize:"14px",fontWeight:500}},{children:u.headerName})),D?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("input",{type:"text",value:u.title||"",onChange:function(e){return null==_?void 0:_(e.target.value)},onBlur:function(){return q(!1)},onKeyDown:function(e){return"Enter"===e.key&&q(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"14px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n.jsx("button",e.__assign({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),q(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n.jsx(t.Check,{size:16,color:"#10B981"})}))]})):n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#374151"}},{children:u.title})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),q(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n.jsx(t.Edit2,{size:14,color:"#6B7280"})}))]}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[b&&u.hasDueDate&&n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({style:{color:"#6B7280"}},{children:["Due Date: ",u.isMandatory&&n.jsx("sup",e.__assign({style:{color:"red"}},{children:"*"}))]})),n.jsx(o.default,{value:null!==(d=u.dueDate)&&void 0!==d?d:null,onSet:f,id:g}),n.jsx(r.default,{})]}),"0"!==g&&n.jsx("div",e.__assign({style:{height:"auto",display:"flex",alignItems:"center"}},{children:n.jsxs("button",e.__assign({type:"button",className:"required-toggle ".concat(u.isMandatory?"active":""),onClick:h,style:{transform:"scale(0.85)",transformOrigin:"right center",margin:0,cursor:"pointer"}},{children:[n.jsx("span",{className:"toggle-thumb"}),n.jsx("span",e.__assign({className:"toggle-label"},{children:"Required"}))]}))})),j&&!1===u.isMandatory&&n.jsx(t.Trash2,{size:18,color:"#EF4444",onClick:function(e){e.stopPropagation(),j()},style:{cursor:"pointer",transition:"opacity 0.2s"}}),n.jsx(t.ChevronDown,{size:20,onClick:function(e){e.stopPropagation(),C(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:b?"rotate(180deg)":"rotate(0deg)"}})]}))]})),b&&n.jsx("div",e.__assign({style:{width:"100%",height:"auto"}},{children:n.jsx(a.default,{assignees:null!==(c=u.assignees)&&void 0!==c?c:[],onAssigneeChange:y,accessLevelOptions:p,fetchUsers:x})}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),n=require("react/jsx-runtime"),s=require("react"),t=require("lucide-react"),i=require("./utils/generateRandomColorsPair.js"),o=require("./assets/VerticalLine.js"),r=require("./components/AssignLevelsDatePicker.js"),a=require("./components/LevelData.js");exports.default=function(l){var d,p,u=l.level,c=l.id,g=l.accessLevelOptions,x=l.fetchUsers,h=l.onToggleMandatory,y=l.onDueDateChange,f=l.onAssigneesChange,_=l.onTitleChange,j=l.onDeleteLevel,b=s.useMemo(function(){return i.getRandomColorPair()},[]),v=s.useState(!1),F=v[0],m=v[1],C=s.useState(!1),k=C[0],D=C[1];return n.jsxs("div",e.__assign({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n.jsx("span",e.__assign({style:{backgroundColor:b.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:b.color,fontSize:"14px",fontWeight:500}},{children:u.headerName})),k?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("input",{type:"text",value:u.title||"",onChange:function(e){return null==_?void 0:_(e.target.value)},onBlur:function(){return D(!1)},onKeyDown:function(e){return"Enter"===e.key&&D(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"14px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n.jsx("button",e.__assign({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),D(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n.jsx(t.Check,{size:16,color:"#10B981"})}))]})):n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"6px"}},{children:[n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#374151"}},{children:u.title})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),D(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n.jsx(t.Edit2,{size:14,color:"#6B7280"})}))]}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[F&&u.hasDueDate&&n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({style:{color:"#6B7280"}},{children:["Due Date: ",u.isMandatory&&n.jsx("sup",e.__assign({style:{color:"red"}},{children:"*"}))]})),n.jsx(r.default,{value:null!==(d=u.dueDate)&&void 0!==d?d:null,onSet:y,id:c}),n.jsx(o.default,{})]}),"0"!==c&&n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center"}},{children:n.jsxs("button",e.__assign({type:"button",onClick:h,style:{position:"relative",width:"110px",height:"32px",border:"none",borderRadius:"999px",backgroundColor:u.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",display:"flex",alignItems:"center",padding:"0 12px",transition:"all 0.2s ease",boxSizing:"border-box"}},{children:[n.jsx("span",{style:{position:"absolute",top:"4px",left:u.isMandatory?"78px":"4px",width:"24px",height:"24px",borderRadius:"50%",background:"#FFFFFF",transition:"all 0.2s ease",boxShadow:"0 1px 4px rgba(0,0,0,0.15)"}}),n.jsx("span",e.__assign({style:{color:"#FFFFFF",fontSize:"14px",fontWeight:500,userSelect:"none",paddingLeft:u.isMandatory?"0":"30px",paddingRight:u.isMandatory?"30px":"0",transition:"all 0.2s ease"}},{children:"Required"}))]}))})),j&&!1===u.isMandatory&&n.jsx(t.Trash2,{size:18,color:"#EF4444",onClick:function(e){e.stopPropagation(),j()},style:{cursor:"pointer",transition:"opacity 0.2s"}}),n.jsx(t.ChevronDown,{size:20,onClick:function(e){e.stopPropagation(),m(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:F?"rotate(180deg)":"rotate(0deg)"}})]}))]})),F&&n.jsx("div",e.__assign({style:{width:"100%",height:"auto"}},{children:n.jsx(a.default,{assignees:null!==(p=u.assignees)&&void 0!==p?p:[],onAssigneeChange:f,accessLevelOptions:g,fetchUsers:x})}))]}))};
2
2
  //# sourceMappingURL=AssignLevelAccordions.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as t,jsx as n,Fragment as o}from"react/jsx-runtime";import{useMemo as r,useState as i}from"react";import{Check as l,Edit2 as s,Trash2 as a,ChevronDown as c}from"lucide-react";import{getRandomColorPair as d}from"./utils/generateRandomColorsPair.js";import p from"./assets/VerticalLine.js";import u from"./components/AssignLevelsDatePicker.js";import g from"./components/LevelData.js";function f(f){var h,m,y=f.level,x=f.id,b=f.accessLevelOptions,v=f.fetchUsers,C=f.onToggleMandatory,k=f.onDueDateChange,D=f.onAssigneesChange,L=f.onTitleChange,j=f.onDeleteLevel,z=r(function(){return d()},[]),F=i(!1),w=F[0],B=F[1],P=i(!1),E=P[0],I=P[1];return t("div",e({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[t("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[t("span",e({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n("span",e({style:{backgroundColor:z.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:z.color,fontSize:"14px",fontWeight:500}},{children:y.headerName})),t("div",e({style:{display:"flex",alignItems:"center",gap:"6px"}},E?{children:[n("input",{type:"text",value:y.title||"",onChange:function(e){return null==L?void 0:L(e.target.value)},onBlur:function(){return I(!1)},onKeyDown:function(e){return"Enter"===e.key&&I(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"14px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n("button",e({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),I(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n(l,{size:16,color:"#10B981"})}))]}:{children:[n("span",e({style:{fontSize:"14px",fontWeight:500,color:"#374151"}},{children:y.title})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),I(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n(s,{size:14,color:"#6B7280"})}))]}))]})),t("div",e({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[w&&y.hasDueDate&&t(o,{children:[t("span",e({style:{color:"#6B7280"}},{children:["Due Date: ",y.isMandatory&&n("sup",e({style:{color:"red"}},{children:"*"}))]})),n(u,{value:null!==(h=y.dueDate)&&void 0!==h?h:null,onSet:k,id:x}),n(p,{})]}),"0"!==x&&n("div",e({style:{height:"auto",display:"flex",alignItems:"center"}},{children:t("button",e({type:"button",className:"required-toggle ".concat(y.isMandatory?"active":""),onClick:C,style:{transform:"scale(0.85)",transformOrigin:"right center",margin:0,cursor:"pointer"}},{children:[n("span",{className:"toggle-thumb"}),n("span",e({className:"toggle-label"},{children:"Required"}))]}))})),j&&!1===y.isMandatory&&n(a,{size:18,color:"#EF4444",onClick:function(e){e.stopPropagation(),j()},style:{cursor:"pointer",transition:"opacity 0.2s"}}),n(c,{size:20,onClick:function(e){e.stopPropagation(),B(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:w?"rotate(180deg)":"rotate(0deg)"}})]}))]})),w&&n("div",e({style:{width:"100%",height:"auto"}},{children:n(g,{assignees:null!==(m=y.assignees)&&void 0!==m?m:[],onAssigneeChange:D,accessLevelOptions:b,fetchUsers:v})}))]}))}export{f as default};
1
+ import{__assign as e}from"../../_virtual/_tslib.js";import{jsxs as t,jsx as n,Fragment as o}from"react/jsx-runtime";import{useMemo as i,useState as r}from"react";import{Check as a,Edit2 as s,Trash2 as l,ChevronDown as d}from"lucide-react";import{getRandomColorPair as p}from"./utils/generateRandomColorsPair.js";import c from"./assets/VerticalLine.js";import u from"./components/AssignLevelsDatePicker.js";import g from"./components/LevelData.js";function f(f){var x,h,y=f.level,b=f.id,m=f.accessLevelOptions,v=f.fetchUsers,F=f.onToggleMandatory,C=f.onDueDateChange,k=f.onAssigneesChange,D=f.onTitleChange,w=f.onDeleteLevel,z=i(function(){return p()},[]),L=r(!1),S=L[0],B=L[1],M=r(!1),j=M[0],R=M[1];return t("div",e({style:{width:"100%",border:"1.5px solid #E2E8F0",borderRadius:"5px"}},{children:[t("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F8FAFC",padding:"0px 10px",minHeight:"48px"}},{children:[t("span",e({style:{display:"flex",alignItems:"center",gap:10,paddingLeft:"20px"}},{children:[n("span",e({style:{backgroundColor:z.backgroundColor,borderRadius:"10px",padding:"3px 12px",color:z.color,fontSize:"14px",fontWeight:500}},{children:y.headerName})),t("div",e({style:{display:"flex",alignItems:"center",gap:"6px"}},j?{children:[n("input",{type:"text",value:y.title||"",onChange:function(e){return null==D?void 0:D(e.target.value)},onBlur:function(){return R(!1)},onKeyDown:function(e){return"Enter"===e.key&&R(!1)},autoFocus:!0,style:{border:"none",borderBottom:"2px solid #3B82F6",outline:"none",fontSize:"14px",fontWeight:500,color:"#374151",background:"transparent",padding:"0 2px",width:"150px"}}),n("button",e({type:"button",onMouseDown:function(e){return e.preventDefault()},onClick:function(e){e.stopPropagation(),R(!1)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"}},{children:n(a,{size:16,color:"#10B981"})}))]}:{children:[n("span",e({style:{fontSize:"14px",fontWeight:500,color:"#374151"}},{children:y.title})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),R(!0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",padding:"2px"},title:"Edit Title"},{children:n(s,{size:14,color:"#6B7280"})}))]}))]})),t("div",e({style:{display:"flex",alignItems:"center",gap:16,marginLeft:"auto"}},{children:[S&&y.hasDueDate&&t(o,{children:[t("span",e({style:{color:"#6B7280"}},{children:["Due Date: ",y.isMandatory&&n("sup",e({style:{color:"red"}},{children:"*"}))]})),n(u,{value:null!==(x=y.dueDate)&&void 0!==x?x:null,onSet:C,id:b}),n(c,{})]}),"0"!==b&&n("div",e({style:{display:"flex",alignItems:"center"}},{children:t("button",e({type:"button",onClick:F,style:{position:"relative",width:"110px",height:"32px",border:"none",borderRadius:"999px",backgroundColor:y.isMandatory?"#5B4FE9":"#D1D5DB",cursor:"pointer",display:"flex",alignItems:"center",padding:"0 12px",transition:"all 0.2s ease",boxSizing:"border-box"}},{children:[n("span",{style:{position:"absolute",top:"4px",left:y.isMandatory?"78px":"4px",width:"24px",height:"24px",borderRadius:"50%",background:"#FFFFFF",transition:"all 0.2s ease",boxShadow:"0 1px 4px rgba(0,0,0,0.15)"}}),n("span",e({style:{color:"#FFFFFF",fontSize:"14px",fontWeight:500,userSelect:"none",paddingLeft:y.isMandatory?"0":"30px",paddingRight:y.isMandatory?"30px":"0",transition:"all 0.2s ease"}},{children:"Required"}))]}))})),w&&!1===y.isMandatory&&n(l,{size:18,color:"#EF4444",onClick:function(e){e.stopPropagation(),w()},style:{cursor:"pointer",transition:"opacity 0.2s"}}),n(d,{size:20,onClick:function(e){e.stopPropagation(),B(function(e){return!e})},style:{cursor:"pointer",flexShrink:0,transition:"transform 0.2s ease",transform:S?"rotate(180deg)":"rotate(0deg)"}})]}))]})),S&&n("div",e({style:{width:"100%",height:"auto"}},{children:n(g,{assignees:null!==(h=y.assignees)&&void 0!==h?h:[],onAssigneeChange:k,accessLevelOptions:m,fetchUsers:v})}))]}))}export{f as default};
2
2
  //# sourceMappingURL=AssignLevelAccordions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACnC,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,aAAa,EAChB,EAAE,2BAA2B,qBAgI7B"}
1
+ {"version":3,"file":"AssignLevelAccordions.d.ts","sourceRoot":"","sources":["../../../../src/components/AssignReminders/AssignLevelAccordions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAKpD,UAAU,2BAA4B,SAAQ,mBAAmB;IAC7D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACnC,KAAK,EACL,EAAE,EACF,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,aAAa,EAChB,EAAE,2BAA2B,qBAqK7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/creative-workspace-ui-component",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",