kwant-ui 3.30.0 → 3.30.1

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.
package/dist/index.es.js CHANGED
@@ -4229,7 +4229,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{css as
4229
4229
  font-style: normal;
4230
4230
  font-weight: 500;
4231
4231
  line-height: 16px; /* 133.333% */
4232
- `,eF=(e,t)=>ei(e).format(t),tF=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e},rF="Actual Workforce overlay",nF="Workforce Variance",aF="#F7EFF3",cF="transparent",iF=r=>{const{payload:n}=r;return e(IN,{children:n?.map((({color:r,type:n,value:a,payload:c,shape:i})=>{if("none"===n)return null;if(a===rF)return null;return t(TN,{children:[i??e(NN,{children:e(FN,{color:(a===nF?aF:r===cF?c?.fill:r||cF)||cF})}),e(QN,{children:a})]},a)}))})},oF=t=>{const{value:r,dy:n}=t;return e(UN,{dy:n,...SN,children:r})},sF=r=>{const{x:n,y:a,payload:c,rotate:i=0,dateFormat:o}=r,s=ei(tF(c.value,o)).format("ddd"),l=c.value;return t(YN,{transform:`translate(${n},${a}), rotate(${i})`,children:[e(oF,{value:s,dy:16}),e(oF,{value:l,dy:36})]})},lF=e=>ei(e).format("ddd, DD MMM YYYY"),hF=({color:r,name:n,value:a,shape:c})=>n===rF?null:t(XN,{children:[t(KN,{children:[c,r&&e(qN,{color:n===nF?aF:r||cF}),e(GN,{children:n})]}),e(JN,{children:a})]}),vF=r=>{const{label:n,payload:a,labelFormatter:c}=r;return t(WN,{style:{transform:"translateY(-50%)"},children:[e($N,{children:c?.(n,a||[])||n}),a?.map((t=>{return e(hF,{color:t.color,name:t.name,value:(r=t.value,isNaN(Number(r))?r:Number(r).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}))});var r}))]})},pF=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,areas:s,areasYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:g,yAxisLeftLabel:m,showLegends:d,showRightYAxis:_,isGradient:w=!1,yAxisRightLabel:b,gradientColor:y,gradientStart:x=0,gradientStop:Z=.3,customTooltip:O=e(vF,{}),areaProps:M={},cartesianGridProps:E={},legendProps:H={},tooltipProps:P={},xAxisProps:j={},yAxisProps:V={},yAxisRightProps:A={},areaYAxisRightProps:C={},showAverageLine:L=!0,averageLineValue:z,averageLineColor:B="#2DA170",customTooltipLabelFormatter:k=lF,hideXAxis:S=!1,hideYAxis:R=!1,hideCartesianGrid:D=!1,dateFormat:I="MM/DD/YYYY"}=n,[T,N]=p({x:0,y:0}),F=u(null),Q=F?.current?.current?.parentElement;return e(Ry,{width:a,height:c,ref:F,children:t(mN,{data:o,margin:i,onMouseMove:e=>N({x:e.chartX,y:e.chartY<=60?70:e.chartY}),children:[e("defs",{children:w&&t("linearGradient",{id:"custom_linear_gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:y,stopOpacity:Z}),e("stop",{offset:"95%",stopColor:y,stopOpacity:x})]})}),v&&e(hy,{content:O,labelFormatter:k,coordinate:{...T},position:{y:T.y},reverseDirection:{x:T.x>Q?.getBoundingClientRect().width/2},...P}),d&&e(Pd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(iF,{}),wrapperStyle:{paddingTop:60},...H}),!S&&e(TS,{dataKey:h,includeHidden:!0,interval:1,minTickGap:10,tick:e(sF,{dateFormat:I,rotate:o.length>15?-15:0}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:g,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},...j}),!R&&e(NS,{yAxisId:"left",...RN,label:{value:m,angle:-90,dx:-30,...RN.label},...V}),_&&t(r,{children:[e(NS,{...RN,yAxisId:"right",hide:!_,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:b,angle:90,dx:20,...RN.label},...V,...A}),l?.map((e=>f(ZS,{...e,...DN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...C})))]}),s?.map((e=>f(ZS,{...e,...DN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...C}))),!D&&e(Uk,{...E,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),L&&e(GB,{y:z,yAxisId:"left",stroke:B,strokeDasharray:"4 4"})]})})},uF=t=>{const{x:r,y:n,payload:a,rotate:c=0}=t,i=a.value;return e(YN,{transform:`translate(${r},${n}), rotate(${c})`,children:e(oF,{value:i,dy:16})})},gF=t=>{const{x:r,y:n,width:a,height:c}=t;return e("svg",{style:{pointerEvents:"none"},children:e("line",{x1:+r+ +a/2,y1:0,x2:+r+ +a/2,y2:+n+ +c+10,stroke:"#A1AFC0",strokeWidth:1,opacity:.1})})},mF=r=>{const n=r.payload[0]?.dataKey,[a]="string"==typeof n&&n?.split(".")||[],c=r.payload[0]?.payload[a],i=ei(c?.date).format("ddd, DD/MM/YYYY");return t(WN,{style:{transform:"translateY(-50%)"},children:[e($N,{children:i}),e(hF,{name:"Work Phase Time:",value:c?.workPhaseTimeHour||"N/A",color:"#5879EF"}),e(hF,{name:"Slack Time:",value:c?.slackTimeHour||"N/A",color:"#A1AFC0"})]})},dF={},fF=[1,2,3,4,5,6,7],_F=e=>`${e}h`,wF=r=>{const{legends:n,data:a,width:c,height:i,labelX:s,labelY:l,workPhaseTimeHourLabel:h,slackTimeHourLabel:v,dataKeyX:u,dataKeyY:g,workPhaseTimeHourDataKey:m,slackTimeHourDataKey:d,margin:f,showLegends:_,showTooltip:w,customXAxisTickFormatter:b,customYAxisTickFormatter:y=_F,dateFormat:x="MM/DD/YYYY"}=r,[Z,O]=p(!1),[M,E]=p({chartX:0}),H=a.length>4?-10:0,P=e=>{const{x:t}=e||{};"number"==typeof t&&(E({chartX:t+18}),O(!0))},j=()=>{O(!1)};return e(Ry,{width:c,height:i,children:t($R,{data:a,barSize:18,barGap:6,margin:f,children:[e(Uk,{vertical:!1,strokeDasharray:"4 4",stroke:"#E4E9F2"}),w&&e(hy,{shared:!1,content:e(mF,{})}),_&&e(Pd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(iF,{}),wrapperStyle:{paddingTop:60},payload:n}),e(TS,{dataKey:u,tickLine:!1,xAxisId:"xAxis",tick:e(uF,{dateFormat:x,rotate:H}),tickFormatter:b,interval:0,axisLine:{stroke:"#E4E9F2"},padding:{left:0,right:0},label:{value:s,fill:"#455F7B",fontSize:12,fontFamily:"Poppins",dy:40}}),e(NS,{...RN,tickFormatter:y,dataKey:g,label:{...RN.label,value:l,angle:-90,dx:-30}}),fF.map((r=>t(o.Fragment,{children:[e(LB,{dataKey:`day${r}.${m}`,stackId:r,xAxisId:"xAxis",fill:Z?"#9FB2F6":"#708CF1",...dF,className:"productive",name:h,activeBar:!1,onMouseOver:P,onMouseLeave:j,children:Z&&e(GV,{dataKey:`day${r}.${m}`,content:gF,x:M.chartX-18})}),e(LB,{dataKey:`day${r}.${d}`,stackId:r,xAxisId:"xAxis",fill:Z?"#BFCADF":"#D1D9E7",...dF,radius:[4,4,0,0],className:"unproductive",name:v,activeBar:!1,onMouseOver:P,onMouseLeave:j})]},r)))]})})},bF={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},yF={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},xF=n.div`
4232
+ `,eF=(e,t)=>ei(e).format(t),tF=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e},rF="Actual Workforce overlay",nF="Workforce Variance",aF="#F7EFF3",cF="transparent",iF=r=>{const{payload:n}=r;return e(IN,{children:n?.map((({color:r,type:n,value:a,payload:c,shape:i})=>{if("none"===n)return null;if(a===rF)return null;return t(TN,{children:[i??e(NN,{children:e(FN,{color:(a===nF?aF:r===cF?c?.fill:r||cF)||cF})}),e(QN,{children:a})]},a)}))})},oF=t=>{const{value:r,dy:n}=t;return e(UN,{dy:n,...SN,children:r})},sF=r=>{const{x:n,y:a,payload:c,rotate:i=0,dateFormat:o}=r,s=ei(tF(c.value,o)).format("ddd"),l=c.value;return t(YN,{transform:`translate(${n},${a}), rotate(${i})`,children:[e(oF,{value:s,dy:16}),e(oF,{value:l,dy:36})]})},lF=e=>ei(e).format("ddd, DD MMM YYYY"),hF=({color:r,name:n,value:a,shape:c})=>n===rF?null:t(XN,{children:[t(KN,{children:[c,r&&e(qN,{color:n===nF?aF:r||cF}),e(GN,{children:n})]}),e(JN,{children:a})]}),vF=r=>{const{label:n,payload:a,labelFormatter:c}=r;return t(WN,{style:{transform:"translateY(-50%)"},children:[e($N,{children:c?.(n,a||[])||n}),a?.map((t=>{return e(hF,{color:t.color,name:t.name,value:(r=t.value,isNaN(Number(r))?r:Number(r).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}))});var r}))]})},pF=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,areas:s,areasYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:g,yAxisLeftLabel:m,showLegends:d,showRightYAxis:_,isGradient:w=!1,yAxisRightLabel:b,gradientColor:y,gradientStart:x=0,gradientStop:Z=.3,customTooltip:O=e(vF,{}),areaProps:M={},cartesianGridProps:E={},legendProps:H={},tooltipProps:P={},xAxisProps:j={},yAxisProps:V={},yAxisRightProps:A={},areaYAxisRightProps:C={},showAverageLine:L=!0,averageLineValue:z,averageLineColor:B="#2DA170",customTooltipLabelFormatter:k=lF,hideXAxis:S=!1,hideYAxis:R=!1,hideCartesianGrid:D=!1,dateFormat:I="MM/DD/YYYY"}=n,[T,N]=p({x:0,y:0}),F=u(null),Q=F?.current?.current?.parentElement;return e(Ry,{width:a,height:c,ref:F,children:t(mN,{data:o,margin:i,onMouseMove:e=>N({x:e.chartX,y:e.chartY<=60?70:e.chartY}),children:[e("defs",{children:w&&t("linearGradient",{id:"custom_linear_gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:y,stopOpacity:Z}),e("stop",{offset:"95%",stopColor:y,stopOpacity:x})]})}),v&&e(hy,{content:O,labelFormatter:k,coordinate:{...T},position:{y:T.y},reverseDirection:{x:T.x>Q?.getBoundingClientRect().width/2},...P}),d&&e(Pd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(iF,{}),wrapperStyle:{paddingTop:60},...H}),!S&&e(TS,{dataKey:h,includeHidden:!0,interval:1,minTickGap:10,tick:e(sF,{dateFormat:I,rotate:o.length>15?-15:0}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:g,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},...j}),!R&&e(NS,{yAxisId:"left",...RN,label:{value:m,angle:-90,dx:-30,...RN.label},...V}),_&&t(r,{children:[e(NS,{...RN,yAxisId:"right",hide:!_,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:b,angle:90,dx:20,...RN.label},...V,...A}),l?.map((e=>f(ZS,{...e,...DN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...C})))]}),s?.map((e=>f(ZS,{...e,...DN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...C}))),!D&&e(Uk,{...E,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),L&&e(GB,{y:z,yAxisId:"left",stroke:B,strokeDasharray:"4 4"})]})})},uF=t=>{const{x:r,y:n,payload:a,rotate:c=0,dateFormat:i}=t,o=ei(tF(a.value,i)).format("ddd");return e(YN,{transform:`translate(${r},${n}), rotate(${c})`,children:e(oF,{value:o,dy:16})})},gF=t=>{const{x:r,y:n,width:a,height:c}=t;return e("svg",{style:{pointerEvents:"none"},children:e("line",{x1:+r+ +a/2,y1:0,x2:+r+ +a/2,y2:+n+ +c+10,stroke:"#A1AFC0",strokeWidth:1,opacity:.1})})},mF=r=>{const n=r.payload[0]?.dataKey,[a]="string"==typeof n&&n?.split(".")||[],c=r.payload[0]?.payload[a],i=ei(c?.date).format("ddd, DD/MM/YYYY");return t(WN,{style:{transform:"translateY(-50%)"},children:[e($N,{children:i}),e(hF,{name:"Work Phase Time:",value:c?.workPhaseTimeHour||"N/A",color:"#5879EF"}),e(hF,{name:"Slack Time:",value:c?.slackTimeHour||"N/A",color:"#A1AFC0"})]})},dF={},fF=[1,2,3,4,5,6,7],_F=e=>`${e}h`,wF=r=>{const{legends:n,data:a,width:c,height:i,labelX:s,labelY:l,workPhaseTimeHourLabel:h,slackTimeHourLabel:v,dataKeyX:u,dataKeyY:g,workPhaseTimeHourDataKey:m,slackTimeHourDataKey:d,margin:f,showLegends:_,showTooltip:w,customXAxisTickFormatter:b,customYAxisTickFormatter:y=_F,dateFormat:x="MM/DD/YYYY"}=r,[Z,O]=p(!1),[M,E]=p({chartX:0}),H=a.length>4?-10:0,P=e=>{const{x:t}=e||{};"number"==typeof t&&(E({chartX:t+18}),O(!0))},j=()=>{O(!1)};return e(Ry,{width:c,height:i,children:t($R,{data:a,barSize:18,barGap:6,margin:f,children:[e(Uk,{vertical:!1,strokeDasharray:"4 4",stroke:"#E4E9F2"}),w&&e(hy,{shared:!1,content:e(mF,{})}),_&&e(Pd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(iF,{}),wrapperStyle:{paddingTop:60},payload:n}),e(TS,{dataKey:u,tickLine:!1,xAxisId:"xAxis",tick:e(uF,{dateFormat:x,rotate:H}),tickFormatter:b,interval:0,axisLine:{stroke:"#E4E9F2"},padding:{left:0,right:0},label:{value:s,fill:"#455F7B",fontSize:12,fontFamily:"Poppins",dy:40}}),e(NS,{...RN,tickFormatter:y,dataKey:g,label:{...RN.label,value:l,angle:-90,dx:-30}}),fF.map((r=>t(o.Fragment,{children:[e(LB,{dataKey:`day${r}.${m}`,stackId:r,xAxisId:"xAxis",fill:Z?"#9FB2F6":"#708CF1",...dF,className:"productive",name:h,activeBar:!1,onMouseOver:P,onMouseLeave:j,children:Z&&e(GV,{dataKey:`day${r}.${m}`,content:gF,x:M.chartX-18})}),e(LB,{dataKey:`day${r}.${d}`,stackId:r,xAxisId:"xAxis",fill:Z?"#BFCADF":"#D1D9E7",...dF,radius:[4,4,0,0],className:"unproductive",name:v,activeBar:!1,onMouseOver:P,onMouseLeave:j})]},r)))]})})},bF={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},yF={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},xF=n.div`
4233
4233
  display: flex;
4234
4234
  justify-content: center;
4235
4235
  align-items: center;
@@ -4515,7 +4515,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{css as
4515
4515
  font-style: normal;
4516
4516
  font-weight: 500;
4517
4517
  line-height: 16px; /* 133.333% */
4518
- `,QW=r=>{const{payload:n}=r;return e(VW,{children:n?.map((r=>t(AW,{children:[e(CW,{children:e(LW,{color:r.payload?.fill||"transparent"})}),e(zW,{children:r.value})]},r.payload?.value)))})},YW=t=>{const{value:r,dy:n}=t;return e(kW,{dy:n,...HW,children:r})},UW=t=>{const{x:r,y:n,payload:a}=t,c=a.value;return e(BW,{transform:`translate(${r},${n})`,children:e(YW,{value:c,dy:16})})},WW=e=>ei(e).format("ddd, DD MMM YYYY"),$W=({color:r,name:n,value:a})=>t(DW,{children:[t(IW,{children:[e(TW,{color:r||"transparent"}),e(NW,{children:n})]}),e(FW,{children:a})]}),XW=r=>{const{label:n,payload:a,labelFormatter:c}=r;return t(SW,{children:[e(RW,{children:c?.(n,a||[])||n}),a?.map((t=>e($W,{color:t.color,name:t.name,value:t.value})))]})},KW=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,lines:s,linesYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:u,yAxisLabel:g,showLegends:m,showRightYAxis:d,yAxisRightLabel:_,customTooltip:w=e(XW,{}),lineProps:b={},cartesianGridProps:y={},legendProps:x={},tooltipProps:Z={},xAxisProps:O={},yAxisProps:M={},yAxisRightProps:E={},lineYAxisRightProps:H={},customTooltipLabelFormatter:P=WW,dateFormat:j="MM/DD/YYYY"}=n,[V,A]=p(100);return e(Ry,{width:a,height:c,children:t(WR,{onMouseMove:e=>{const{chartY:t}=e;A((()=>t)),console.log("event;sas",e)},data:o,margin:i,children:[v&&e(hy,{content:w,labelFormatter:P,wrapperStyle:{top:V<20?"0px":"-80px",left:"-86px",right:"104%",height:"1%"},allowEscapeViewBox:{x:!1,y:!1},cursor:{stroke:"#2A4055",strokeWidth:1.25,strokeDasharray:"4 4"},...Z}),e(Uk,{...y,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),m&&e(Pd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(QW,{}),wrapperStyle:{paddingTop:60,paddingLeft:"55px"},...x}),e(TS,{dataKey:h,includeHidden:!0,minTickGap:20,tick:e(UW,{dateFormat:j}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:u,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},...O}),e(NS,{yAxisId:"left",...PW,label:{value:g,angle:-90,dx:-23,...PW.label},...M}),d&&t(r,{children:[e(NS,{...PW,yAxisId:"right",hide:!d,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:_,angle:90,dx:20,...PW.label},...M,...E}),l?.map((e=>f(sS,{...jW,key:e.dataKey,dataKey:e.dataKey,stroke:e?.stroke,fillOpacity:e.fillOpacity,fill:e.color,yAxisId:e.yAxisId||"left",name:e.name,...b,...H,dot:!1})))]}),s?.map((e=>f(sS,{...jW,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke,fill:e.color,yAxisId:e.yAxisId||"left",dot:!1,activeDot:{r:5.5},name:e.name,...b})))]})})},qW=n.div`
4518
+ `,QW=r=>{const{payload:n}=r;return e(VW,{children:n?.map((r=>t(AW,{children:[e(CW,{children:e(LW,{color:r.payload?.fill||"transparent"})}),e(zW,{children:r.value})]},r.payload?.value)))})},YW=t=>{const{value:r,dy:n}=t;return e(kW,{dy:n,...HW,children:r})},UW=t=>{const{x:r,y:n,payload:a,dateFormat:c}=t,i=ei(tF(a.value,c)).format("ddd");return e(BW,{transform:`translate(${r},${n})`,children:e(YW,{value:i,dy:16})})},WW=e=>ei(e).format("ddd, DD MMM YYYY"),$W=({color:r,name:n,value:a})=>t(DW,{children:[t(IW,{children:[e(TW,{color:r||"transparent"}),e(NW,{children:n})]}),e(FW,{children:a})]}),XW=r=>{const{label:n,payload:a,labelFormatter:c}=r;return t(SW,{children:[e(RW,{children:c?.(n,a||[])||n}),a?.map((t=>e($W,{color:t.color,name:t.name,value:t.value})))]})},KW=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,lines:s,linesYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:u,yAxisLabel:g,showLegends:m,showRightYAxis:d,yAxisRightLabel:_,customTooltip:w=e(XW,{}),lineProps:b={},cartesianGridProps:y={},legendProps:x={},tooltipProps:Z={},xAxisProps:O={},yAxisProps:M={},yAxisRightProps:E={},lineYAxisRightProps:H={},customTooltipLabelFormatter:P=WW,dateFormat:j="MM/DD/YYYY"}=n,[V,A]=p(100);return e(Ry,{width:a,height:c,children:t(WR,{onMouseMove:e=>{const{chartY:t}=e;A((()=>t)),console.log("event;sas",e)},data:o,margin:i,children:[v&&e(hy,{content:w,labelFormatter:P,wrapperStyle:{top:V<20?"0px":"-80px",left:"-86px",right:"104%",height:"1%"},allowEscapeViewBox:{x:!1,y:!1},cursor:{stroke:"#2A4055",strokeWidth:1.25,strokeDasharray:"4 4"},...Z}),e(Uk,{...y,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),m&&e(Pd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(QW,{}),wrapperStyle:{paddingTop:60,paddingLeft:"55px"},...x}),e(TS,{dataKey:h,includeHidden:!0,minTickGap:20,tick:e(UW,{dateFormat:j}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:u,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},...O}),e(NS,{yAxisId:"left",...PW,label:{value:g,angle:-90,dx:-23,...PW.label},...M}),d&&t(r,{children:[e(NS,{...PW,yAxisId:"right",hide:!d,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:_,angle:90,dx:20,...PW.label},...M,...E}),l?.map((e=>f(sS,{...jW,key:e.dataKey,dataKey:e.dataKey,stroke:e?.stroke,fillOpacity:e.fillOpacity,fill:e.color,yAxisId:e.yAxisId||"left",name:e.name,...b,...H,dot:!1})))]}),s?.map((e=>f(sS,{...jW,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke,fill:e.color,yAxisId:e.yAxisId||"left",dot:!1,activeDot:{r:5.5},name:e.name,...b})))]})})},qW=n.div`
4519
4519
  display: flex;
4520
4520
  column-gap: 2px;
4521
4521
  ${({danger:e,color:t})=>e?a`
package/dist/index.js CHANGED
@@ -4229,7 +4229,7 @@
4229
4229
  font-style: normal;
4230
4230
  font-weight: 500;
4231
4231
  line-height: 16px; /* 133.333% */
4232
- `,GT=(e,t)=>ec(e).format(t),JT=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e},eN="Actual Workforce overlay",tN="Workforce Variance",rN="#F7EFF3",nN="transparent",aN=t=>{const{payload:r}=t;return e.jsx(RT,{children:r?.map((({color:t,type:r,value:n,payload:a,shape:c})=>{if("none"===r)return null;if(n===eN)return null;const i=n===tN?rN:t===nN?a?.fill:t||nN;return e.jsxs(DT,{children:[c??e.jsx(IT,{children:e.jsx(TT,{color:i||nN})}),e.jsx(NT,{children:n})]},n)}))})},cN=t=>{const{value:r,dy:n}=t;return e.jsx(QT,{dy:n,...zT,children:r})},iN=t=>{const{x:r,y:n,payload:a,rotate:c=0,dateFormat:i}=t,o=ec(JT(a.value,i)).format("ddd"),s=a.value;return e.jsxs(FT,{transform:`translate(${r},${n}), rotate(${c})`,children:[e.jsx(cN,{value:o,dy:16}),e.jsx(cN,{value:s,dy:36})]})},oN=e=>ec(e).format("ddd, DD MMM YYYY"),sN=({color:t,name:r,value:n,shape:a})=>r===eN?null:e.jsxs(WT,{children:[e.jsxs($T,{children:[a,t&&e.jsx(XT,{color:r===tN?rN:t||nN}),e.jsx(KT,{children:r})]}),e.jsx(qT,{children:n})]}),lN=t=>{const{label:r,payload:n,labelFormatter:a}=t;return e.jsxs(YT,{style:{transform:"translateY(-50%)"},children:[e.jsx(UT,{children:a?.(r,n||[])||r}),n?.map((t=>{return e.jsx(sN,{color:t.color,name:t.name,value:(r=t.value,isNaN(Number(r))?r:Number(r).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}))});var r}))]})},hN=t=>{const{x:r,y:n,payload:a,rotate:c=0}=t,i=a.value;return e.jsx(FT,{transform:`translate(${r},${n}), rotate(${c})`,children:e.jsx(cN,{value:i,dy:16})})},vN=t=>{const{x:r,y:n,width:a,height:c}=t;return e.jsx("svg",{style:{pointerEvents:"none"},children:e.jsx("line",{x1:+r+ +a/2,y1:0,x2:+r+ +a/2,y2:+n+ +c+10,stroke:"#A1AFC0",strokeWidth:1,opacity:.1})})},pN=t=>{const r=t.payload[0]?.dataKey,[n]="string"==typeof r&&r?.split(".")||[],a=t.payload[0]?.payload[n],c=ec(a?.date).format("ddd, DD/MM/YYYY");return e.jsxs(YT,{style:{transform:"translateY(-50%)"},children:[e.jsx(UT,{children:c}),e.jsx(sN,{name:"Work Phase Time:",value:a?.workPhaseTimeHour||"N/A",color:"#5879EF"}),e.jsx(sN,{name:"Slack Time:",value:a?.slackTimeHour||"N/A",color:"#A1AFC0"})]})},uN={},gN=[1,2,3,4,5,6,7],mN=e=>`${e}h`,dN={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},fN={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},_N=t.div`
4232
+ `,GT=(e,t)=>ec(e).format(t),JT=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e},eN="Actual Workforce overlay",tN="Workforce Variance",rN="#F7EFF3",nN="transparent",aN=t=>{const{payload:r}=t;return e.jsx(RT,{children:r?.map((({color:t,type:r,value:n,payload:a,shape:c})=>{if("none"===r)return null;if(n===eN)return null;const i=n===tN?rN:t===nN?a?.fill:t||nN;return e.jsxs(DT,{children:[c??e.jsx(IT,{children:e.jsx(TT,{color:i||nN})}),e.jsx(NT,{children:n})]},n)}))})},cN=t=>{const{value:r,dy:n}=t;return e.jsx(QT,{dy:n,...zT,children:r})},iN=t=>{const{x:r,y:n,payload:a,rotate:c=0,dateFormat:i}=t,o=ec(JT(a.value,i)).format("ddd"),s=a.value;return e.jsxs(FT,{transform:`translate(${r},${n}), rotate(${c})`,children:[e.jsx(cN,{value:o,dy:16}),e.jsx(cN,{value:s,dy:36})]})},oN=e=>ec(e).format("ddd, DD MMM YYYY"),sN=({color:t,name:r,value:n,shape:a})=>r===eN?null:e.jsxs(WT,{children:[e.jsxs($T,{children:[a,t&&e.jsx(XT,{color:r===tN?rN:t||nN}),e.jsx(KT,{children:r})]}),e.jsx(qT,{children:n})]}),lN=t=>{const{label:r,payload:n,labelFormatter:a}=t;return e.jsxs(YT,{style:{transform:"translateY(-50%)"},children:[e.jsx(UT,{children:a?.(r,n||[])||r}),n?.map((t=>{return e.jsx(sN,{color:t.color,name:t.name,value:(r=t.value,isNaN(Number(r))?r:Number(r).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}))});var r}))]})},hN=t=>{const{x:r,y:n,payload:a,rotate:c=0,dateFormat:i}=t,o=ec(JT(a.value,i)).format("ddd");return e.jsx(FT,{transform:`translate(${r},${n}), rotate(${c})`,children:e.jsx(cN,{value:o,dy:16})})},vN=t=>{const{x:r,y:n,width:a,height:c}=t;return e.jsx("svg",{style:{pointerEvents:"none"},children:e.jsx("line",{x1:+r+ +a/2,y1:0,x2:+r+ +a/2,y2:+n+ +c+10,stroke:"#A1AFC0",strokeWidth:1,opacity:.1})})},pN=t=>{const r=t.payload[0]?.dataKey,[n]="string"==typeof r&&r?.split(".")||[],a=t.payload[0]?.payload[n],c=ec(a?.date).format("ddd, DD/MM/YYYY");return e.jsxs(YT,{style:{transform:"translateY(-50%)"},children:[e.jsx(UT,{children:c}),e.jsx(sN,{name:"Work Phase Time:",value:a?.workPhaseTimeHour||"N/A",color:"#5879EF"}),e.jsx(sN,{name:"Slack Time:",value:a?.slackTimeHour||"N/A",color:"#A1AFC0"})]})},uN={},gN=[1,2,3,4,5,6,7],mN=e=>`${e}h`,dN={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},fN={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},_N=t.div`
4233
4233
  display: flex;
4234
4234
  justify-content: center;
4235
4235
  align-items: center;
@@ -4515,7 +4515,7 @@
4515
4515
  font-style: normal;
4516
4516
  font-weight: 500;
4517
4517
  line-height: 16px; /* 133.333% */
4518
- `,zU=t=>{const{payload:r}=t;return e.jsx(yU,{children:r?.map((t=>e.jsxs(xU,{children:[e.jsx(ZU,{children:e.jsx(OU,{color:t.payload?.fill||"transparent"})}),e.jsx(MU,{children:t.value})]},t.payload?.value)))})},kU=t=>{const{value:r,dy:n}=t;return e.jsx(HU,{dy:n,..._U,children:r})},SU=t=>{const{x:r,y:n,payload:a}=t,c=a.value;return e.jsx(EU,{transform:`translate(${r},${n})`,children:e.jsx(kU,{value:c,dy:16})})},RU=e=>ec(e).format("ddd, DD MMM YYYY"),DU=({color:t,name:r,value:n})=>e.jsxs(VU,{children:[e.jsxs(CU,{children:[e.jsx(AU,{color:t||"transparent"}),e.jsx(LU,{children:r})]}),e.jsx(BU,{children:n})]}),IU=t=>{const{label:r,payload:n,labelFormatter:a}=t;return e.jsxs(PU,{children:[e.jsx(jU,{children:a?.(r,n||[])||r}),n?.map((t=>e.jsx(DU,{color:t.color,name:t.name,value:t.value})))]})},TU=t.div`
4518
+ `,zU=t=>{const{payload:r}=t;return e.jsx(yU,{children:r?.map((t=>e.jsxs(xU,{children:[e.jsx(ZU,{children:e.jsx(OU,{color:t.payload?.fill||"transparent"})}),e.jsx(MU,{children:t.value})]},t.payload?.value)))})},kU=t=>{const{value:r,dy:n}=t;return e.jsx(HU,{dy:n,..._U,children:r})},SU=t=>{const{x:r,y:n,payload:a,dateFormat:c}=t,i=ec(JT(a.value,c)).format("ddd");return e.jsx(EU,{transform:`translate(${r},${n})`,children:e.jsx(kU,{value:i,dy:16})})},RU=e=>ec(e).format("ddd, DD MMM YYYY"),DU=({color:t,name:r,value:n})=>e.jsxs(VU,{children:[e.jsxs(CU,{children:[e.jsx(AU,{color:t||"transparent"}),e.jsx(LU,{children:r})]}),e.jsx(BU,{children:n})]}),IU=t=>{const{label:r,payload:n,labelFormatter:a}=t;return e.jsxs(PU,{children:[e.jsx(jU,{children:a?.(r,n||[])||r}),n?.map((t=>e.jsx(DU,{color:t.color,name:t.name,value:t.value})))]})},TU=t.div`
4519
4519
  display: flex;
4520
4520
  column-gap: 2px;
4521
4521
  ${({danger:e,color:r})=>e?t.css`
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kwant-ui",
3
- "version": "3.30.0",
3
+ "version": "3.30.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kwant-ui",
3
- "version": "3.30.0",
3
+ "version": "3.30.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",