1mpacto-react-ui 0.0.131 → 0.0.132

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.cjs CHANGED
@@ -189,7 +189,7 @@ You should wrap it with \`css\` like this:
189
189
  ${(s.step??u)<e?jn.passed:""}
190
190
  ${(s.step??u)===e?jn.active:""}
191
191
  ${s.className??""}`,children:s.value?s.value:u}),I.jsx("div",{style:{width:n/2}})]}),s.desc&&I.jsx("div",{className:`${jn["content-description"]} ${a??""}
192
- ${(s.step??u)<=e?jn.active:""}`,style:{maxWidth:n-30},children:s.desc})]},l)})});Yi.register(ka,Ma,Pi,qn,HC,ls,VC);const qO=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),a=n||new Date().getFullYear();return new Date(`${i}/${r}/${a}`)},KO=({data:e,className:t,height:n=65})=>{const r=w.useRef(null),i=e.map(h=>So(qO(1,h.label,h.year),"MMM yy",{locale:Ml}))||[],[a,o]=w.useState(""),[s,l]=w.useState(""),u=h=>{const f=[],g=[];let m=!h.find(v=>v.isCurrent);return h.forEach(v=>{m?(g.push(v.value),f.push(null)):(f.push(v.value),v.isCurrent?(m=!0,g.push(v.value)):g.push(null))}),{passed:f,notPassed:g}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:a,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(h){const f=e[h.dataIndex];let g=s;return f.isCurrent&&(g="#ED0019"),g},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:a,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},d={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(h){let f=document.getElementById("chartjs-tooltip");f||(f=document.createElement("div"),f.id="chartjs-tooltip",f.innerHTML="<table></table>",document.body.appendChild(f));const g=h.tooltip;if(g.opacity===0){f.style.opacity="0";return}f.classList.remove("above","below","no-transform"),g.yAlign?f.classList.add(g.yAlign):f.classList.add("no-transform");function m(y){return y.lines}if(g.body){const y=g.title||[];let b=g.body.map(m),x="<thead>";y.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; font-weight: 600",$+="; font-size: 12px",$+="; padding: 0px 14px",x+=`<tr><span style="${$}">${D}</span></tr>`}),x+="</thead><tbody>",b.length>1&&b[0][0]===b[1][0]&&(b=[b[0]]),b.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; color: #0163C8",$+="; padding: 0px 14px",$+="; font-size: 12px";const F=`<span style="${$}">${D}</span>`;x+=`<tr><td>${F}</td></tr>`}),x+="</tbody>";const C=f.querySelector("table");C&&(C.innerHTML=x)}const v=h.chart.canvas.getBoundingClientRect();f.style.opacity="1",f.style.border="solid 1px #0163C8",f.style.background="white",f.style.height="fit-content",f.style.borderRadius="10px",f.style.position="absolute",f.style.zIndex="10",f.style.padding="4px 0",f.style.left=v.left+window.pageXOffset+g.caretX-30+"px",f.style.top=v.top+window.pageYOffset+g.caretY-60+"px",f.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(h){const f=e[h[0].dataIndex];return So(new Date(`1/${f.label}/${f.year}`),"MMMM yyyy",{locale:Ml})},label:function(h){let f=h.dataset.label??"";return f&&(f+=": "),h.parsed.y!==null&&(f+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(h.parsed.y)),f}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(h){return $u(h)??0}}}}};return w.useEffect(()=>{if(r.current){const h=r.current.getContext("2d"),f=h==null?void 0:h.createLinearGradient(0,100,500,-500);f==null||f.addColorStop(0,"rgba(237, 0, 25, 0)"),f==null||f.addColorStop(1,"rgba(237, 0, 25, 20)");const g=h.fillStyle="rgba(255, 255, 255, 0)";l(g),o(f)}},[]),I.jsxs("div",{className:t??"",children:[I.jsx(ZC,{options:d,data:c,height:n}),I.jsx("div",{className:"1ru-h-5",children:I.jsx("canvas",{ref:r})})]})},QO="_container_1oiqk_1",Ib={container:QO,"container-popover":"_container-popover_1oiqk_5"},eN=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:a,placement:o="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:d,delay:h=600})=>{let f;const g=w.useRef(null),m={backgroundColor:zb[s]||s},[v,y]=w.useState(!1),[b,x]=w.useState(!1),C=$=>{var F;(F=g.current)==null||F.handlerShow($),x(!0),typeof i=="function"&&i()},D=()=>{var $;x(!1),v||(clearInterval(f),($=g.current)==null||$.setShow(!1),typeof a=="function"&&a())};return I.jsxs(I.Fragment,{children:[I.jsx("div",{id:e,onMouseEnter:$=>{if(d&&!v){const F=$.currentTarget;f=setTimeout(()=>{C({...$,currentTarget:F})},h)}},onMouseLeave:()=>{d&&!v&&D()},onClick:$=>{y(!0),clearInterval(f),b||C($)},className:Ib.container,children:t}),I.jsx(Ar,{floatingOptions:{placement:o},ref:g,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{v&&(y(!1),D())},styleInnerPopover:{backgroundColor:m.backgroundColor},propsArrow:{fill:m.backgroundColor,...u},className:`${Ib["container-popover"]} ${c??""}`,...l,children:n})]})},tN="_icon_i1q12_5",nN="_show_i1q12_8",pd={"container-popover":"_container-popover_i1q12_1",icon:tN,show:nN},YC=w.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:a,endIcon:o,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:d="",placement:h="top-end",popoverProps:f,zIndexPopover:g=1,offset:m=5,idPopover:v="1ru-popover-button-popover",onClick:y,onClose:b,...x}=e,C=w.useRef(null),D=w.useRef(null),[$,F]=w.useState(!1),p=(A,T,R)=>{let M=I.jsx(I.Fragment,{});return A&&w.isValidElement(T)?M=T:w.isValidElement(R)&&(M=I.jsx("div",{className:`${pd.icon} ${A?pd.show:""}`,children:R})),M},S=A=>{var T;(T=C.current)==null||T.setShow(A),F(A)},_=A=>{var T;(T=C.current)==null||T.handlerShow(A),F(!0)},E=()=>{var A;F(!1),(A=C.current)==null||A.setShow(!1),typeof b=="function"&&b()};return w.useImperativeHandle(t,()=>({show:$,setShow:S,handlerClose:E,handlerShow:_}),[$]),I.jsxs(I.Fragment,{children:[I.jsx(Mn,{ref:D,id:r,className:`${u} ${$?c:""}`,onClick:A=>{$?E():typeof y=="function"?y(A):_(A)},startIcon:p($,s,a),endIcon:p($,l,o),...x,children:i}),I.jsx(Ar,{ref:C,id:v,offset:m,floatingOptions:{placement:h},zIndex:g,onClose:E,className:`${pd["container-popover"]} ${d}`,...f,children:n})]})});YC.displayName="ButtonPopover";Yi.register(ka,Ma,Pi,qn,OC,ls);const rN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},iN={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:a,right:o}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(a,s),n.lineTo(o,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},aN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},oN=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(aN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?rN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return I.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[a&&I.jsx(Qh,{selector:"body",children:I.jsx(a,{...u})}),I.jsx(ZC,{data:f,options:g,plugins:[iN]})]})};Yi.register(ka,Ma,Tl,ls,Pi,OC,ls);const sN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},lN={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,a)=>{const o=e.getDatasetMeta(a);o.visible&&o.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?$u(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let d,h=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,d=s.y-5,d>n&&(h=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,d=s.y+5,d<r&&(h=!0)),h&&t.fillText(c,s.x,d)})}),t.restore()}},uN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return $u(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},cN=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(uN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?sN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return I.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[a&&I.jsx(Qh,{selector:"body",children:I.jsx(a,{...u})}),I.jsx(PO,{data:f,options:g,plugins:[lN]})]})},dN="_left_1s2i5_4",fN="_right_1s2i5_7",hN="_indicator_1s2i5_16",gN="_active_1s2i5_19",Br={"container-step-indicator":"_container-step-indicator_1s2i5_1",left:dN,right:fN,"text-step-indicator":"_text-step-indicator_1s2i5_10","step-indicator":"_step-indicator_1s2i5_13",indicator:hN,active:gN};function mN(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const pN=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:a="",id:o="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:d=""})=>I.jsxs("div",{id:o,className:`${Br["container-step-indicator"]}
192
+ ${(s.step??u)<=e?jn.active:""}`,style:{maxWidth:n-30},children:s.desc})]},l)})});Yi.register(ka,Ma,Pi,qn,HC,ls,VC);const qO=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),a=n||new Date().getFullYear();return new Date(`${i}/${r}/${a}`)},KO=({data:e,className:t,height:n=65})=>{const r=w.useRef(null),i=e.map(h=>So(qO(1,h.label,h.year),"MMM yy",{locale:Ml}))||[],[a,o]=w.useState(""),[s,l]=w.useState(""),u=h=>{const f=[],g=[];let m=!h.find(v=>v.isCurrent);return h.forEach(v=>{m?(g.push(v.value),f.push(null)):(f.push(v.value),v.isCurrent?(m=!0,g.push(v.value)):g.push(null))}),{passed:f,notPassed:g}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:a,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(h){const f=e[h.dataIndex];let g=s;return f.isCurrent&&(g="#ED0019"),g},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:a,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},d={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(h){let f=document.getElementById("chartjs-tooltip");f||(f=document.createElement("div"),f.id="chartjs-tooltip",f.innerHTML="<table></table>",document.body.appendChild(f));const g=h.tooltip;if(g.opacity===0){f.style.opacity="0";return}f.classList.remove("above","below","no-transform"),g.yAlign?f.classList.add(g.yAlign):f.classList.add("no-transform");function m(y){return y.lines}if(g.body){const y=g.title||[];let b=g.body.map(m),x="<thead>";y.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; font-weight: 600",$+="; font-size: 12px",$+="; padding: 0px 14px",x+=`<tr><span style="${$}">${D}</span></tr>`}),x+="</thead><tbody>",b.length>1&&b[0][0]===b[1][0]&&(b=[b[0]]),b.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; color: #0163C8",$+="; padding: 0px 14px",$+="; font-size: 12px";const F=`<span style="${$}">${D}</span>`;x+=`<tr><td>${F}</td></tr>`}),x+="</tbody>";const C=f.querySelector("table");C&&(C.innerHTML=x)}const v=h.chart.canvas.getBoundingClientRect();f.style.opacity="1",f.style.border="solid 1px #0163C8",f.style.background="white",f.style.height="fit-content",f.style.borderRadius="10px",f.style.position="absolute",f.style.zIndex="10",f.style.padding="4px 0",f.style.left=v.left+window.pageXOffset+g.caretX-30+"px",f.style.top=v.top+window.pageYOffset+g.caretY-60+"px",f.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(h){const f=e[h[0].dataIndex];return So(new Date(`1/${f.label}/${f.year}`),"MMMM yyyy",{locale:Ml})},label:function(h){let f=h.dataset.label??"";return f&&(f+=": "),h.parsed.y!==null&&(f+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(h.parsed.y)),f}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(h){return $u(h)??0}}}}};return w.useEffect(()=>{if(r.current){const h=r.current.getContext("2d"),f=h==null?void 0:h.createLinearGradient(0,100,500,-500);f==null||f.addColorStop(0,"rgba(237, 0, 25, 0)"),f==null||f.addColorStop(1,"rgba(237, 0, 25, 20)");const g=h.fillStyle="rgba(255, 255, 255, 0)";l(g),o(f)}},[]),I.jsxs("div",{className:t??"",children:[I.jsx(ZC,{options:d,data:c,height:n}),I.jsx("div",{className:"1ru-h-5",children:I.jsx("canvas",{ref:r})})]})},QO="_container_1oiqk_1",Ib={container:QO,"container-popover":"_container-popover_1oiqk_5"},eN=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:a,placement:o="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:d,delay:h=600})=>{let f;const g=w.useRef(null),m={backgroundColor:zb[s]||s},[v,y]=w.useState(!1),[b,x]=w.useState(!1),C=$=>{var F;(F=g.current)==null||F.handlerShow($),x(!0),typeof i=="function"&&i()},D=()=>{var $;x(!1),v||(clearInterval(f),($=g.current)==null||$.setShow(!1),typeof a=="function"&&a())};return I.jsxs(I.Fragment,{children:[I.jsx("div",{id:e,onMouseEnter:$=>{if(d&&!v){const F=$.currentTarget;f=setTimeout(()=>{C({...$,currentTarget:F})},h)}},onMouseLeave:()=>{d&&!v&&D()},onClick:$=>{y(!0),clearInterval(f),b||C($)},className:Ib.container,children:t}),I.jsx(Ar,{floatingOptions:{placement:o},ref:g,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{v&&(y(!1),D())},styleInnerPopover:{backgroundColor:m.backgroundColor},propsArrow:{fill:m.backgroundColor,...u},className:`${Ib["container-popover"]} ${c??""}`,...l,children:n})]})},tN="_icon_i1q12_5",nN="_show_i1q12_8",pd={"container-popover":"_container-popover_i1q12_1",icon:tN,show:nN},YC=w.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:a,endIcon:o,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:d="",placement:h="top-end",popoverProps:f,zIndexPopover:g=1,offset:m=5,idPopover:v="1ru-popover-button-popover",onClick:y,onClose:b,...x}=e,C=w.useRef(null),D=w.useRef(null),[$,F]=w.useState(!1),p=(A,T,R)=>{let M=I.jsx(I.Fragment,{});return A&&w.isValidElement(T)?M=T:w.isValidElement(R)&&(M=I.jsx("div",{className:`${pd.icon} ${A?pd.show:""}`,children:R})),M},S=A=>{var T;(T=C.current)==null||T.setShow(A),F(A)},_=A=>{var T;(T=C.current)==null||T.handlerShow(A),F(!0)},E=()=>{var A;F(!1),(A=C.current)==null||A.setShow(!1),typeof b=="function"&&b()};return w.useImperativeHandle(t,()=>({show:$,setShow:S,handlerClose:E,handlerShow:_}),[$]),I.jsxs(I.Fragment,{children:[I.jsx(Mn,{ref:D,id:r,className:`${u} ${$?c:""}`,onClick:A=>{$?E():typeof y=="function"?y(A):_(A)},startIcon:p($,s,a),endIcon:p($,l,o),...x,children:i}),I.jsx(Ar,{ref:C,id:v,offset:m,floatingOptions:{placement:h},zIndex:g,onClose:E,className:`${pd["container-popover"]} ${d}`,...f,children:n})]})});YC.displayName="ButtonPopover";Yi.register(ka,Ma,Pi,qn,OC,ls);const rN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},iN={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:a,right:o}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(a,s),n.lineTo(o,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},aN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},oN=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(aN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?rN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return I.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[a&&I.jsx(Qh,{selector:"body",children:I.jsx(a,{...u})}),I.jsx(ZC,{data:f,options:g,plugins:[iN]})]})};Yi.register(ka,Ma,Tl,ls,Pi,OC,ls);const sN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},lN={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,a)=>{const o=e.getDatasetMeta(a);o.visible&&o.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?$u(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let d,h=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,d=s.y-5,d>n&&(h=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,d=s.y+5,d<r&&(h=!0)),h&&t.fillText(c,s.x,d)})}),t.restore()}},uN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return $u(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},cN=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(uN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?sN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return I.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[a&&I.jsx(Qh,{selector:"body",children:I.jsx(a,{...u})}),I.jsx(PO,{data:f,options:g,plugins:[lN]})]})},dN="_left_1s2i5_4",fN="_right_1s2i5_7",hN="_indicator_1s2i5_16",gN="_active_1s2i5_19",Br={"container-step-indicator":"_container-step-indicator_1s2i5_1",left:dN,right:fN,"text-step-indicator":"_text-step-indicator_1s2i5_10","step-indicator":"_step-indicator_1s2i5_13",indicator:hN,active:gN};function mN(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const pN=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:a="",id:o="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:d=""})=>I.jsxs("div",{id:o,className:`${Br["container-step-indicator"]}
193
193
  ${s==="left"?Br.left:Br.right} ${r||""}`,children:[s==="left"&&I.jsxs("p",{className:`${Br["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]}),I.jsx("div",{className:`${Br["step-indicator"]} ${d||""}
194
194
  ${u?"1ru-w-full":""} ${c}`,style:{gap:c},children:Array.from({length:t}).map((h,f)=>I.jsx("div",{className:`${Br.indicator} ${a||""}
195
195
  ${f<=e?`${Br.active} ${n}`:""}`,style:{width:u?mN(t,c):l}},f))}),s==="right"&&I.jsxs("p",{className:`${Br["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]});exports.AlertContainer=YD;exports.Badges=P3;exports.BigNumber=rt;exports.Breadcrumbs=qP;exports.Button=Mn;exports.ButtonIcon=F3;exports.ButtonPopover=YC;exports.Calendar=Ku;exports.CalendarRange=R3;exports.CheckboxTable=MO;exports.Chips=T3;exports.Collapse=nT;exports.ConfigColors=zb;exports.ConfigTable=rn;exports.DatePicker=PP;exports.DateRangePicker=A3;exports.DefaultCheckedChecboxIcon=k3;exports.DefaultRadioChecboxIcon=M3;exports.DoughnutChart=TO;exports.ErrorMessage=jO;exports.FilterContainer=N3;exports.FilterDate=TP;exports.GradientBarChart=cN;exports.GradientLineChart=oN;exports.InputFloatingInner=y1;exports.InputNative=bg;exports.InputReguler=zf;exports.LineChart=KO;exports.ListVirtualization=_v;exports.ModalDialog=iT;exports.MonthYearPicker=kO;exports.NumberFormat=NT;exports.Pagination=K$;exports.PatternFormat=OT;exports.Popover=Ar;exports.PortalComponent=Qh;exports.RadioCheckbox=Qu;exports.RadioCheckboxLabel=ZP;exports.SelectDropdownContainer=by;exports.SelectDropdownContainerComponents=ay;exports.Sidebar=O3;exports.Step=JO;exports.StepIndicator=pN;exports.Switch=BP;exports.TPublish=U5;exports.TabPanel=z$;exports.Table=N$;exports.TableVirtualization=dh;exports.Tabs=W$;exports.Textarea=U3;exports.TextareaFloatingInner=XC;exports.Timeline=lT;exports.Tooltip=eN;exports.TruncateComponent=jT;exports.TypeBigNumber=Iu;exports.UploadFile=Y3;exports.UploadImage=XT;exports.UploadMultipleFile=HO;exports.betweenBig=l5;exports.configScreens=Y5;exports.configTypography=X5;exports.configTypographyLabaBisnis=Zb;exports.configTypographyPayhere=Gb;exports.convertBigNumbersToStrings=Ed;exports.convertNumbersToBigNumbers=Sd;exports.convertTextToJsonBigNumbers=Z5;exports.cookieStorage=kD;exports.deepCompareEquals=Ff;exports.defaultConfig=Mb;exports.formatBigNumber=FD;exports.formatDate=fa;exports.formatDateRange=CD;exports.formatNumber=Nr;exports.groupByKey=Ob;exports.isAccurateBigNumber=nr;exports.isAccurateNumber=Bb;exports.lessThanBig=s5;exports.maxBig=a5;exports.minBig=i5;exports.moreThanBig=o5;exports.openAlert=UD;exports.parseBigDecimal=_u;exports.parseDecimal=$f;exports.removeKeyObjectEmptyValue=DD;exports.removeTrailingZeros=PD;exports.setDigit=$u;exports.transformArrayMapping=ED;exports.transformArrayMappingObjectFC=ID;exports.transformArrayOfObjectToArray=Af;exports.transformArrayOfObjectToString=Rf;exports.transformBigNumber=RD;exports.transformDataHistory=wD;exports.transformLatLong=SD;exports.transformNumber=$D;exports.transformSecondTime=_D;exports.transfromIsNan=AD;exports.useAsyncDebounce=Sv;exports.useCombinedResizeObserver=$$;exports.useCountdown=_$;exports.useDeepCompareEffect=Mi;exports.useDeepCompareMemoize=No;exports.useElementOrWindowMediaQuery=I$;exports.useEventListener=P$;exports.useMasonry=T$;exports.useMergeRefs=hh;exports.useStateRef=R$;exports.utilTable=LI;