@undp/data-viz 2.0.1 → 2.0.2
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/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +2 -2
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +2 -2
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +32 -24
- package/dist/DonutChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +2 -2
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +2 -2
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/{XAxesLabels-D5X8jngD.cjs → XAxesLabels-C1XSXoWG.cjs} +2 -2
- package/dist/XAxesLabels-C1XSXoWG.cjs.map +1 -0
- package/dist/{XAxesLabels-DNO0KmjL.js → XAxesLabels-Dmbk50u4.js} +18 -16
- package/dist/XAxesLabels-Dmbk50u4.js.map +1 -0
- package/dist/YAxesLabels-1XTb-D0_.js +72 -0
- package/dist/YAxesLabels-1XTb-D0_.js.map +1 -0
- package/dist/YAxesLabels-pjdsVwIM.cjs +2 -0
- package/dist/YAxesLabels-pjdsVwIM.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/XAxesLabels-D5X8jngD.cjs.map +0 -1
- package/dist/XAxesLabels-DNO0KmjL.js.map +0 -1
- package/dist/YAxesLabels-DcS85Beo.cjs +0 -2
- package/dist/YAxesLabels-DcS85Beo.cjs.map +0 -1
- package/dist/YAxesLabels-Dnnng49-.js +0 -70
- package/dist/YAxesLabels-Dnnng49-.js.map +0 -1
package/dist/ParetoChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),st=require("react"),xe=require("./index-DQA8q5sC.cjs"),he=require("./Modal-JW_IExO3.cjs"),ne=require("./numberFormattingFunction-02t-wJta.cjs"),ge=require("./Tooltip-4dJo4_AF.cjs"),ye=require("./string2HTML-CPGr_I5E.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-DxRV2yMi.cjs"),me=require("./AxisTitle-sS5bLLR7.cjs"),be=require("./XAxesLabels-D5X8jngD.cjs"),ve=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-BwPAspcq.cjs"),de=require("./line-DHV4JwCR.cjs"),se=require("./step-BZ3C8QFW.cjs"),je=require("./use-in-view-QcfiW0w3.cjs"),Dt=require("./proxy-BxvUI_9l.cjs"),Ae=require("./index-DG2bgAva.cjs"),we=require("./GraphFooter.cjs"),Ee=require("./GraphHeader.cjs"),Re=require("./ColorLegend.cjs"),oe=require("./Colors.cjs"),Me=require("./EmptyState-sAEZ_5rU.cjs"),fe=require("./GraphContainer-d8A46BK2.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(156),{data:j,width:P,height:D,barColor:d,lineColor:p,axisTitles:u,sameAxes:A,rightMargin:zt,leftMargin:Qt,topMargin:Ft,bottomMargin:Ht,tooltip:Et,showValues:Rt,onSeriesMouseOver:ot,barPadding:Yt,truncateBy:Mt,showLabels:Gt,onSeriesMouseClick:C,resetSelectionOnDoubleClick:pt,detailsOnClick:y,noOfTicks:dt,lineSuffix:ft,barSuffix:Ct,linePrefix:kt,barPrefix:Lt,curveType:St,styles:s,classNames:o,animate:r,precision:F,customLayers:k,naLabel:rt,showAxisLabels:R}=e,Jt=st.useRef(null);let ht;t[0]!==r.amount||t[1]!==r.once?(ht={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ht):ht=t[2];const L=je.useInView(Jt,ht),Xt=St==="linear"?de.curveLinear:St==="step"?se.curveStep:St==="stepAfter"?se.stepAfter:St==="stepBefore"?se.stepBefore:se.monotoneX,[Nt,lt]=st.useState(void 0),[w,gt]=st.useState(void 0),[Ot,c]=st.useState(void 0),[x,at]=st.useState(void 0),Wt=Qt+50,yt=zt+65;let Tt;t[3]!==Ht||t[4]!==Wt||t[5]!==yt||t[6]!==Ft?(Tt={top:Ft,bottom:Ht,left:Wt,right:yt},t[3]=Ht,t[4]=Wt,t[5]=yt,t[6]=Ft,t[7]=Tt):Tt=t[7];const l=Tt,h=P-l.left-l.right,a=D-l.top-l.bottom;let S,H,Y,M,G,X,W,N,O,T,$,B,U,z,J;if(t[8]!==r||t[9]!==u||t[10]!==d||t[11]!==Yt||t[12]!==Lt||t[13]!==Ct||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Xt||t[21]!==k||t[22]!==j||t[23]!==y||t[24]!==a||t[25]!==h||t[26]!==D||t[27]!==L||t[28]!==p||t[29]!==kt||t[30]!==ft||t[31]!==l.bottom||t[32]!==l.left||t[33]!==l.right||t[34]!==l.top||t[35]!==w||t[36]!==rt||t[37]!==dt||t[38]!==C||t[39]!==ot||t[40]!==F||t[41]!==pt||t[42]!==A||t[43]!==R||t[44]!==Gt||t[45]!==Rt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==Mt||t[53]!==P){const m=j.map(ei),g=ve.band().domain(m.map(ti)).range([0,h]).paddingInner(Yt),$t=Math.min(...m.map(_e).filter(Ze))!==1/0?Math.min(...m.map(Qe).filter(Ke))>0?0:Math.min(...m.map(Je).filter(ze)):0,vt=Math.min(...m.map(Ue).filter(Be))!==1/0?Math.min(...m.map(We).filter(Xe))>0?0:Math.min(...m.map(Ge).filter(Ye)):0,jt=Math.max(...m.map(He).filter(Fe))!==1/0?Math.max(...m.map(De).filter(Pe)):0,ct=Math.max(...m.map(Ve).filter(Ie))!==1/0?Math.max(...m.map(qe).filter($e)):0,Bt=$t<vt?$t:vt,At=jt>ct?jt:ct,f=pe.linear().domain([A?Bt:$t,A?At>0?At:0:jt>0?jt:0]).range([a,0]).nice(),b=pe.linear().domain([A?Bt:vt,A?At>0?At:0:ct>0?ct:0]).range([a,0]).nice(),qt=de.line().defined(Te).x(i=>g(`${i.id}`)+g.bandwidth()/2).y(i=>b(i.line)).curve(Xt),re=f.ticks(dt),Ut=b.ticks(dt);H=Dt.motion.svg,G=`${P}px`,X=`${D}px`,W=`0 0 ${P} ${D}`,N="ltr",O=Jt,U=`translate(${l.left},${l.top})`;const Kt=o?.xAxis?.axis;let et;t[69]!==Kt?(et={axis:Kt},t[69]=Kt,t[70]=et):et=t[70];let ut;t[71]!==s?.xAxis?.axis?(ut=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=ut):ut=t[72];let q;t[73]!==d||t[74]!==ut?(q={axis:{stroke:d,...ut}},t[73]=d,t[74]=ut,t[75]=q):q=t[75];let xt;t[76]!==a||t[77]!==et||t[78]!==q?(xt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:-15,x2:-15,classNames:et,styles:q}),t[76]=a,t[77]=et,t[78]=q,t[79]=xt):xt=t[79];let wt;t[80]!==u||t[81]!==d||t[82]!==o?.yAxis?.title||t[83]!==a||t[84]!==l.left||t[85]!==R||t[86]!==s?.yAxis?.title?(wt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-l.left,y:a/2,style:{fill:d,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[0].length>100?`${u[0].substring(0,100)}...`:u[0],rotate90:!0}):null,t[80]=u,t[81]=d,t[82]=o?.yAxis?.title,t[83]=a,t[84]=l.left,t[85]=R,t[86]=s?.yAxis?.title,t[87]=wt):wt=t[87],z=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:f(i),y2:f(i),x1:-15,x2:-20,style:{stroke:d,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:f(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:d,...s?.yAxis?.labels||{}},children:ne.numberFormattingFunction(i,rt,F,Lt,Ct)})]},Pt)),xt,wt]});const It=h+15,it=h+15,nt=o?.xAxis?.axis;let E;t[88]!==nt?(E={axis:nt},t[88]=nt,t[89]=E):E=t[89];let I;t[90]!==s?.xAxis?.axis?(I=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=I):I=t[91];let mt;t[92]!==p||t[93]!==I?(mt={axis:{stroke:p,...I}},t[92]=p,t[93]=I,t[94]=mt):mt=t[94];let Vt;t[95]!==a||t[96]!==It||t[97]!==it||t[98]!==E||t[99]!==mt?(Vt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:It,x2:it,classNames:E,styles:mt}),t[95]=a,t[96]=It,t[97]=it,t[98]=E,t[99]=mt,t[100]=Vt):Vt=t[100];let Zt;t[101]!==u||t[102]!==o?.yAxis?.title||t[103]!==a||t[104]!==h||t[105]!==p||t[106]!==l.right||t[107]!==R||t[108]!==s?.yAxis?.title?(Zt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:h+l.right-15,y:a/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[1].length>100?`${u[1].substring(0,100)}...`:u[1],rotate90:!0}):null,t[101]=u,t[102]=o?.yAxis?.title,t[103]=a,t[104]=h,t[105]=p,t[106]=l.right,t[107]=R,t[108]=s?.yAxis?.title,t[109]=Zt):Zt=t[109],J=n.jsxRuntimeExports.jsxs("g",{children:[Ut.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:h+15,x2:h+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:h+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:ne.numberFormattingFunction(i,rt,F,kt,ft)})]},Pt)),Vt,Zt]});const le=o?.xAxis?.axis;let _t;t[110]!==le?(_t={axis:le},t[110]=le,t[111]=_t):_t=t[111];const ae=s?.xAxis?.axis;let te;t[112]!==ae?(te={axis:ae},t[112]=ae,t[113]=te):te=t[113],Y=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?f(0):a,y2:A?f(0):a,x1:-15,x2:h+15,classNames:_t,styles:te}),t[114]!==k?(M=k.filter(Oe).map(Ne),t[114]=k,t[115]=M):M=t[115],S=Ae.AnimatePresence,T=m.map((i,Pt)=>n.jsxRuntimeExports.jsxs(Dt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.rect,{variants:{initial:{attrY:f(0),height:0,opacity:1,fill:d},whileInView:{attrY:i.bar?i.bar>0?f(i.bar):f(0):0,height:i.bar?Math.abs(f(i.bar)-f(0)):0,opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{attrY:f(0),height:0,opacity:0,transition:{duration:r.duration}},x:g(`${Pt}`),width:g.bandwidth()}),Rt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{attrY:f(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:f(0),opacity:0,fill:d},whileInView:{attrY:f(i.bar||0),opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:ne.numberFormattingFunction(i.bar,rt,F,Lt,Ct)}):null,Gt?n.jsxRuntimeExports.jsx(be.XAxesLabels,{value:`${i.label}`.length<Mt?`${i.label}`:`${`${i.label}`.substring(0,Mt)}...`,y:a+5,x:g(`${i.id}`),width:g.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:L}):null]},i.label));let ee;t[116]!==r.duration?(ee={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ee):ee=t[117];let ie;t[118]===Symbol.for("react.memo_cache_sentinel")?(ie={fill:"none",strokeWidth:2},t[118]=ie):ie=t[118],$=n.jsxRuntimeExports.jsx(Dt.motion.path,{exit:ee,variants:{initial:{d:qt(m.map(Se)),opacity:0,stroke:p},whileInView:{d:qt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:ie}),B=m.map((i,Pt)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",cx:g(i.id)+g.bandwidth()/2,r:h/m.length<5?0:h/m.length<20?2:4}),Rt?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:ne.numberFormattingFunction(i.line,rt,F,kt,ft)}):null]})},Pt)),t[8]=r,t[9]=u,t[10]=d,t[11]=Yt,t[12]=Lt,t[13]=Ct,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Xt,t[21]=k,t[22]=j,t[23]=y,t[24]=a,t[25]=h,t[26]=D,t[27]=L,t[28]=p,t[29]=kt,t[30]=ft,t[31]=l.bottom,t[32]=l.left,t[33]=l.right,t[34]=l.top,t[35]=w,t[36]=rt,t[37]=dt,t[38]=C,t[39]=ot,t[40]=F,t[41]=pt,t[42]=A,t[43]=R,t[44]=Gt,t[45]=Rt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=Mt,t[53]=P,t[54]=S,t[55]=H,t[56]=Y,t[57]=M,t[58]=G,t[59]=X,t[60]=W,t[61]=N,t[62]=O,t[63]=T,t[64]=$,t[65]=B,t[66]=U,t[67]=z,t[68]=J}else S=t[54],H=t[55],Y=t[56],M=t[57],G=t[58],X=t[59],W=t[60],N=t[61],O=t[62],T=t[63],$=t[64],B=t[65],U=t[66],z=t[67],J=t[68];let K;t[119]!==S||t[120]!==T||t[121]!==$||t[122]!==B?(K=n.jsxRuntimeExports.jsxs(S,{children:[T,$,B]}),t[119]=S,t[120]=T,t[121]=$,t[122]=B,t[123]=K):K=t[123];let v;t[124]!==k?(v=k.filter(Le).map(ke),t[124]=k,t[125]=v):v=t[125];let Q;t[126]!==Y||t[127]!==M||t[128]!==K||t[129]!==v||t[130]!==U||t[131]!==z||t[132]!==J?(Q=n.jsxRuntimeExports.jsxs("g",{transform:U,children:[z,J,Y,M,K,v]}),t[126]=Y,t[127]=M,t[128]=K,t[129]=v,t[130]=U,t[131]=z,t[132]=J,t[133]=Q):Q=t[133];let Z;t[134]!==H||t[135]!==G||t[136]!==X||t[137]!==W||t[138]!==N||t[139]!==O||t[140]!==Q?(Z=n.jsxRuntimeExports.jsx(H,{width:G,height:X,viewBox:W,direction:N,ref:O,children:Q}),t[134]=H,t[135]=G,t[136]=X,t[137]=W,t[138]=N,t[139]=O,t[140]=Q,t[141]=Z):Z=t[141];let _;t[142]!==o?.tooltip||t[143]!==Ot||t[144]!==x||t[145]!==Nt||t[146]!==s?.tooltip||t[147]!==Et?(_=Nt&&Et&&Ot&&x?n.jsxRuntimeExports.jsx(ge.Tooltip,{data:Nt,body:Et,xPos:Ot,yPos:x,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=Ot,t[144]=x,t[145]=Nt,t[146]=s?.tooltip,t[147]=Et,t[148]=_):_=t[148];let tt;t[149]!==y||t[150]!==w?(tt=y&&w!==void 0?n.jsxRuntimeExports.jsx(he.le,{open:w!==void 0,onClose:()=>{gt(void 0)},children:n.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof y=="string"?{__html:ye.string2HTML(y,w)}:void 0,children:typeof y=="function"?y(w):null})}):null,t[149]=y,t[150]=w,t[151]=tt):tt=t[151];let bt;return t[152]!==Z||t[153]!==_||t[154]!==tt?(bt=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Z,_,tt]}),t[152]=Z,t[153]=_,t[154]=tt,t[155]=bt):bt=t[155],bt}function ke(e){return e.layer}function Le(e){return e.position==="after"}function Se(e){return{...e,line:0}}function Ne(e){return e.layer}function Oe(e){return e.position==="before"}function Te(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ie(e){return e!=null}function Ve(e){return e.line}function Pe(e){return e!=null}function De(e){return e.bar}function Fe(e){return e!=null}function He(e){return e.bar}function Ye(e){return e!=null}function Ge(e){return e.line}function Xe(e){return e!=null}function We(e){return e.line}function Be(e){return e!=null}function Ue(e){return e.line}function ze(e){return e!=null}function Je(e){return e.bar}function Ke(e){return e!=null}function Qe(e){return e.bar}function Ze(e){return e!=null}function _e(e){return e.bar}function ti(e){return`${e.id}`}function ei(e,t){return{...e,id:`${t}`}}function ii(e){const t=n.compilerRuntimeExports.c(77),{data:j,graphTitle:P,sources:D,graphDescription:d,height:p,width:u,footNote:A,padding:zt,lineColor:Qt,barColor:Ft,sameAxes:Ht,backgroundColor:Et,leftMargin:Rt,rightMargin:ot,topMargin:Yt,bottomMargin:Mt,lineAxisTitle:Gt,barAxisTitle:C,tooltip:pt,relativeHeight:y,onSeriesMouseOver:dt,graphID:ft,graphDownload:Ct,dataDownload:kt,barPadding:Lt,truncateBy:St,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:F,minHeight:k,theme:rt,ariaLabel:R,resetSelectionOnDoubleClick:Jt,detailsOnClick:ht,showValues:L,noOfTicks:Xt,lineSuffix:Nt,barSuffix:lt,linePrefix:w,barPrefix:gt,curveType:Ot,styles:c,classNames:x,animate:at,precision:Wt,customLayers:yt,naLabel:Tt,showColorScale:l,showAxisLabels:h}=e,a=Qt===void 0?oe.Colors.light.categoricalColors.colors[1]:Qt,S=Ft===void 0?oe.Colors.light.categoricalColors.colors[0]:Ft,H=Ht===void 0?!1:Ht,Y=Et===void 0?!1:Et,M=Rt===void 0?80:Rt,G=ot===void 0?80:ot,X=Yt===void 0?20:Yt,W=Mt===void 0?25:Mt,N=Gt===void 0?"Line chart":Gt,O=C===void 0?"Bar graph":C,T=Ct===void 0?!1:Ct,$=kt===void 0?!1:kt,B=Lt===void 0?.25:Lt,U=St===void 0?999:St,z=s===void 0?!0:s,J=r===void 0?"en":r,K=k===void 0?0:k,v=rt===void 0?"light":rt,Q=Jt===void 0?!0:Jt,Z=L===void 0?!0:L,_=Xt===void 0?5:Xt,tt=Nt===void 0?"":Nt,bt=lt===void 0?"":lt,m=w===void 0?"":w,g=gt===void 0?"":gt,$t=Ot===void 0?"curve":Ot,vt=at===void 0?!1:at,jt=Wt===void 0?2:Wt;let ct;t[0]!==yt?(ct=yt===void 0?[]:yt,t[0]=yt,t[1]=ct):ct=t[1];const Bt=ct,At=Tt===void 0?"NA":Tt,f=l===void 0?!0:l,b=h===void 0?!0:h,[qt,re]=st.useState(0),[Ut,Kt]=st.useState(0),et=st.useRef(null),ut=st.useRef(null);let q,xt;t[2]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{const mt=new ResizeObserver(Vt=>{re(Vt[0].target.clientWidth||620),Kt(Vt[0].target.clientHeight||480)});return et.current&&mt.observe(et.current),()=>mt.disconnect()},xt=[],t[2]=q,t[3]=xt):(q=t[2],xt=t[3]),st.useEffect(q,xt);const wt=x?.graphContainer,It=c?.graphContainer;let it;t[4]!==x?.description||t[5]!==x?.title||t[6]!==j||t[7]!==$||t[8]!==d||t[9]!==T||t[10]!==P||t[11]!==c?.description||t[12]!==c?.title||t[13]!==u?(it=P||d||T||$?n.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:x?.title,description:x?.description},graphTitle:P,graphDescription:d,width:u,graphDownload:T?ut:void 0,dataDownload:$?j.map(li).filter(ri).length>0?j.map(oi).filter(si):j.filter(ni):null}):null,t[4]=x?.description,t[5]=x?.title,t[6]=j,t[7]=$,t[8]=d,t[9]=T,t[10]=P,t[11]=c?.description,t[12]=c?.title,t[13]=u,t[14]=it):it=t[14];let nt;t[15]!==vt||t[16]!==O||t[17]!==S||t[18]!==B||t[19]!==g||t[20]!==bt||t[21]!==W||t[22]!==x||t[23]!==F||t[24]!==$t||t[25]!==Bt||t[26]!==j||t[27]!==ht||t[28]!==M||t[29]!==N||t[30]!==a||t[31]!==m||t[32]!==tt||t[33]!==At||t[34]!==_||t[35]!==o||t[36]!==dt||t[37]!==jt||t[38]!==Q||t[39]!==G||t[40]!==H||t[41]!==b||t[42]!==f||t[43]!==z||t[44]!==Z||t[45]!==c||t[46]!==Ut||t[47]!==qt||t[48]!==v||t[49]!==pt||t[50]!==X||t[51]!==U?(nt=j.length===0?n.jsxRuntimeExports.jsx(Me.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[f?n.jsxRuntimeExports.jsx(Re.ColorLegend,{colorDomain:[O,N],colors:[S||oe.Colors[v].categoricalColors.colors[0],a||oe.Colors[v].categoricalColors.colors[1]],colorLegendTitle:F,showNAColor:!1,className:x?.colorLegend}):null,n.jsxRuntimeExports.jsx(fe.GraphArea,{ref:et,children:qt&&Ut?n.jsxRuntimeExports.jsx(Ce,{data:j,sameAxes:H,lineColor:a,barColor:S,width:qt,height:Ut,truncateBy:U,leftMargin:M,rightMargin:G,topMargin:X,bottomMargin:W,axisTitles:[O,N],tooltip:pt,onSeriesMouseOver:dt,barPadding:B,showLabels:z,onSeriesMouseClick:o,resetSelectionOnDoubleClick:Q,detailsOnClick:ht,noOfTicks:_,lineSuffix:tt,barSuffix:bt,linePrefix:m,barPrefix:g,curveType:$t,showValues:Z,styles:c,classNames:x,animate:vt===!0?{duration:.5,once:!0,amount:.5}:vt||{duration:0,once:!0,amount:0},precision:jt,customLayers:Bt,naLabel:At,showAxisLabels:b}):null})]}),t[15]=vt,t[16]=O,t[17]=S,t[18]=B,t[19]=g,t[20]=bt,t[21]=W,t[22]=x,t[23]=F,t[24]=$t,t[25]=Bt,t[26]=j,t[27]=ht,t[28]=M,t[29]=N,t[30]=a,t[31]=m,t[32]=tt,t[33]=At,t[34]=_,t[35]=o,t[36]=dt,t[37]=jt,t[38]=Q,t[39]=G,t[40]=H,t[41]=b,t[42]=f,t[43]=z,t[44]=Z,t[45]=c,t[46]=Ut,t[47]=qt,t[48]=v,t[49]=pt,t[50]=X,t[51]=U,t[52]=nt):nt=t[52];let E;t[53]!==x?.footnote||t[54]!==x?.source||t[55]!==A||t[56]!==D||t[57]!==c?.footnote||t[58]!==c?.source||t[59]!==u?(E=D||A?n.jsxRuntimeExports.jsx(we.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:D,footNote:A,width:u}):null,t[53]=x?.footnote,t[54]=x?.source,t[55]=A,t[56]=D,t[57]=c?.footnote,t[58]=c?.source,t[59]=u,t[60]=E):E=t[60];let I;return t[61]!==R||t[62]!==Y||t[63]!==ft||t[64]!==p||t[65]!==J||t[66]!==K||t[67]!==zt||t[68]!==y||t[69]!==wt||t[70]!==It||t[71]!==it||t[72]!==nt||t[73]!==E||t[74]!==v||t[75]!==u?(I=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:wt,style:It,id:ft,ref:ut,"aria-label":R,backgroundColor:Y,theme:v,language:J,minHeight:K,width:u,height:p,relativeHeight:y,padding:zt,children:[it,nt,E]}),t[61]=R,t[62]=Y,t[63]=ft,t[64]=p,t[65]=J,t[66]=K,t[67]=zt,t[68]=y,t[69]=wt,t[70]=It,t[71]=it,t[72]=nt,t[73]=E,t[74]=v,t[75]=u,t[76]=I):I=t[76],I}function ni(e){return e!==void 0}function si(e){return e!==void 0}function oi(e){return e.data}function ri(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ii;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),st=require("react"),xe=require("./index-DQA8q5sC.cjs"),he=require("./Modal-JW_IExO3.cjs"),ne=require("./numberFormattingFunction-02t-wJta.cjs"),ge=require("./Tooltip-4dJo4_AF.cjs"),ye=require("./string2HTML-CPGr_I5E.cjs"),ue=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ce=require("./Axis-DxRV2yMi.cjs"),me=require("./AxisTitle-sS5bLLR7.cjs"),be=require("./XAxesLabels-C1XSXoWG.cjs"),ve=require("./band-VYfcZeJ2.cjs"),pe=require("./linear-BwPAspcq.cjs"),de=require("./line-DHV4JwCR.cjs"),se=require("./step-BZ3C8QFW.cjs"),je=require("./use-in-view-QcfiW0w3.cjs"),Dt=require("./proxy-BxvUI_9l.cjs"),Ae=require("./index-DG2bgAva.cjs"),we=require("./GraphFooter.cjs"),Ee=require("./GraphHeader.cjs"),Re=require("./ColorLegend.cjs"),oe=require("./Colors.cjs"),Me=require("./EmptyState-sAEZ_5rU.cjs"),fe=require("./GraphContainer-d8A46BK2.cjs");function Ce(e){const t=n.compilerRuntimeExports.c(156),{data:j,width:P,height:D,barColor:d,lineColor:p,axisTitles:u,sameAxes:A,rightMargin:zt,leftMargin:Qt,topMargin:Ft,bottomMargin:Ht,tooltip:Et,showValues:Rt,onSeriesMouseOver:ot,barPadding:Yt,truncateBy:Mt,showLabels:Gt,onSeriesMouseClick:C,resetSelectionOnDoubleClick:pt,detailsOnClick:y,noOfTicks:dt,lineSuffix:ft,barSuffix:Ct,linePrefix:kt,barPrefix:Lt,curveType:St,styles:s,classNames:o,animate:r,precision:F,customLayers:k,naLabel:rt,showAxisLabels:R}=e,Jt=st.useRef(null);let ht;t[0]!==r.amount||t[1]!==r.once?(ht={once:r.once,amount:r.amount},t[0]=r.amount,t[1]=r.once,t[2]=ht):ht=t[2];const L=je.useInView(Jt,ht),Xt=St==="linear"?de.curveLinear:St==="step"?se.curveStep:St==="stepAfter"?se.stepAfter:St==="stepBefore"?se.stepBefore:se.monotoneX,[Nt,lt]=st.useState(void 0),[w,gt]=st.useState(void 0),[Ot,c]=st.useState(void 0),[x,at]=st.useState(void 0),Wt=Qt+50,yt=zt+65;let Tt;t[3]!==Ht||t[4]!==Wt||t[5]!==yt||t[6]!==Ft?(Tt={top:Ft,bottom:Ht,left:Wt,right:yt},t[3]=Ht,t[4]=Wt,t[5]=yt,t[6]=Ft,t[7]=Tt):Tt=t[7];const l=Tt,h=P-l.left-l.right,a=D-l.top-l.bottom;let S,H,Y,M,G,X,W,N,O,T,$,B,U,z,J;if(t[8]!==r||t[9]!==u||t[10]!==d||t[11]!==Yt||t[12]!==Lt||t[13]!==Ct||t[14]!==o?.graphObjectValues||t[15]!==o?.xAxis?.axis||t[16]!==o?.xAxis?.labels||t[17]!==o?.yAxis?.gridLines||t[18]!==o?.yAxis?.labels||t[19]!==o?.yAxis?.title||t[20]!==Xt||t[21]!==k||t[22]!==j||t[23]!==y||t[24]!==a||t[25]!==h||t[26]!==D||t[27]!==L||t[28]!==p||t[29]!==kt||t[30]!==ft||t[31]!==l.bottom||t[32]!==l.left||t[33]!==l.right||t[34]!==l.top||t[35]!==w||t[36]!==rt||t[37]!==dt||t[38]!==C||t[39]!==ot||t[40]!==F||t[41]!==pt||t[42]!==A||t[43]!==R||t[44]!==Gt||t[45]!==Rt||t[46]!==s?.graphObjectValues||t[47]!==s?.xAxis?.axis||t[48]!==s?.xAxis?.labels||t[49]!==s?.yAxis?.gridLines||t[50]!==s?.yAxis?.labels||t[51]!==s?.yAxis?.title||t[52]!==Mt||t[53]!==P){const m=j.map(ei),g=ve.band().domain(m.map(ti)).range([0,h]).paddingInner(Yt),$t=Math.min(...m.map(_e).filter(Ze))!==1/0?Math.min(...m.map(Qe).filter(Ke))>0?0:Math.min(...m.map(Je).filter(ze)):0,vt=Math.min(...m.map(Ue).filter(Be))!==1/0?Math.min(...m.map(We).filter(Xe))>0?0:Math.min(...m.map(Ge).filter(Ye)):0,jt=Math.max(...m.map(He).filter(Fe))!==1/0?Math.max(...m.map(De).filter(Pe)):0,ct=Math.max(...m.map(Ve).filter(Ie))!==1/0?Math.max(...m.map(qe).filter($e)):0,Bt=$t<vt?$t:vt,At=jt>ct?jt:ct,f=pe.linear().domain([A?Bt:$t,A?At>0?At:0:jt>0?jt:0]).range([a,0]).nice(),b=pe.linear().domain([A?Bt:vt,A?At>0?At:0:ct>0?ct:0]).range([a,0]).nice(),qt=de.line().defined(Te).x(i=>g(`${i.id}`)+g.bandwidth()/2).y(i=>b(i.line)).curve(Xt),re=f.ticks(dt),Ut=b.ticks(dt);H=Dt.motion.svg,G=`${P}px`,X=`${D}px`,W=`0 0 ${P} ${D}`,N="ltr",O=Jt,U=`translate(${l.left},${l.top})`;const Kt=o?.xAxis?.axis;let et;t[69]!==Kt?(et={axis:Kt},t[69]=Kt,t[70]=et):et=t[70];let ut;t[71]!==s?.xAxis?.axis?(ut=s?.xAxis?.axis||{},t[71]=s?.xAxis?.axis,t[72]=ut):ut=t[72];let q;t[73]!==d||t[74]!==ut?(q={axis:{stroke:d,...ut}},t[73]=d,t[74]=ut,t[75]=q):q=t[75];let xt;t[76]!==a||t[77]!==et||t[78]!==q?(xt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:-15,x2:-15,classNames:et,styles:q}),t[76]=a,t[77]=et,t[78]=q,t[79]=xt):xt=t[79];let wt;t[80]!==u||t[81]!==d||t[82]!==o?.yAxis?.title||t[83]!==a||t[84]!==l.left||t[85]!==R||t[86]!==s?.yAxis?.title?(wt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:10-l.left,y:a/2,style:{fill:d,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[0].length>100?`${u[0].substring(0,100)}...`:u[0],rotate90:!0}):null,t[80]=u,t[81]=d,t[82]=o?.yAxis?.title,t[83]=a,t[84]=l.left,t[85]=R,t[86]=s?.yAxis?.title,t[87]=wt):wt=t[87],z=n.jsxRuntimeExports.jsxs("g",{children:[re.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:f(i),y2:f(i),x1:-15,x2:-20,style:{stroke:d,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:f(i),dy:"0.33em",className:n.mo("text-xs",o?.yAxis?.labels),style:{textAnchor:"end",fill:d,...s?.yAxis?.labels||{}},children:ne.numberFormattingFunction(i,rt,F,Lt,Ct)})]},Pt)),xt,wt]});const It=h+15,it=h+15,nt=o?.xAxis?.axis;let E;t[88]!==nt?(E={axis:nt},t[88]=nt,t[89]=E):E=t[89];let I;t[90]!==s?.xAxis?.axis?(I=s?.xAxis?.axis||{},t[90]=s?.xAxis?.axis,t[91]=I):I=t[91];let mt;t[92]!==p||t[93]!==I?(mt={axis:{stroke:p,...I}},t[92]=p,t[93]=I,t[94]=mt):mt=t[94];let Vt;t[95]!==a||t[96]!==It||t[97]!==it||t[98]!==E||t[99]!==mt?(Vt=n.jsxRuntimeExports.jsx(ce.Axis,{y1:0,y2:a,x1:It,x2:it,classNames:E,styles:mt}),t[95]=a,t[96]=It,t[97]=it,t[98]=E,t[99]=mt,t[100]=Vt):Vt=t[100];let Zt;t[101]!==u||t[102]!==o?.yAxis?.title||t[103]!==a||t[104]!==h||t[105]!==p||t[106]!==l.right||t[107]!==R||t[108]!==s?.yAxis?.title?(Zt=R?n.jsxRuntimeExports.jsx(me.AxisTitle,{x:h+l.right-15,y:a/2,style:{fill:p,...s?.yAxis?.title||{}},className:o?.yAxis?.title,text:u[1].length>100?`${u[1].substring(0,100)}...`:u[1],rotate90:!0}):null,t[101]=u,t[102]=o?.yAxis?.title,t[103]=a,t[104]=h,t[105]=p,t[106]=l.right,t[107]=R,t[108]=s?.yAxis?.title,t[109]=Zt):Zt=t[109],J=n.jsxRuntimeExports.jsxs("g",{children:[Ut.map((i,Pt)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:b(i),y2:b(i),x1:h+15,x2:h+20,style:{stroke:p,strokeWidth:1,...s?.yAxis?.gridLines||{}},className:o?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:h+25,y:b(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:p,...s?.yAxis?.labels||{}},className:n.mo("text-xs",o?.yAxis?.labels),children:ne.numberFormattingFunction(i,rt,F,kt,ft)})]},Pt)),Vt,Zt]});const le=o?.xAxis?.axis;let _t;t[110]!==le?(_t={axis:le},t[110]=le,t[111]=_t):_t=t[111];const ae=s?.xAxis?.axis;let te;t[112]!==ae?(te={axis:ae},t[112]=ae,t[113]=te):te=t[113],Y=n.jsxRuntimeExports.jsx(ce.Axis,{y1:A?f(0):a,y2:A?f(0):a,x1:-15,x2:h+15,classNames:_t,styles:te}),t[114]!==k?(M=k.filter(Oe).map(Ne),t[114]=k,t[115]=M):M=t[115],S=Ae.AnimatePresence,T=m.map((i,Pt)=>n.jsxRuntimeExports.jsxs(Dt.motion.g,{className:"undp-viz-g-with-hover",opacity:.85,onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.rect,{variants:{initial:{attrY:f(0),height:0,opacity:1,fill:d},whileInView:{attrY:i.bar?i.bar>0?f(i.bar):f(0):0,height:i.bar?Math.abs(f(i.bar)-f(0)):0,opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",exit:{attrY:f(0),height:0,opacity:0,transition:{duration:r.duration}},x:g(`${Pt}`),width:g.bandwidth()}),Rt&&!ue.checkIfNullOrUndefined(i.bar)?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{attrY:f(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{attrY:f(0),opacity:0,fill:d},whileInView:{attrY:f(i.bar||0),opacity:1,fill:d,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:{textAnchor:"middle",...s?.graphObjectValues||{}},className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:i.bar?i.bar>=0?"-5px":"1em":"-5px",children:ne.numberFormattingFunction(i.bar,rt,F,Lt,Ct)}):null,Gt?n.jsxRuntimeExports.jsx(be.XAxesLabels,{value:`${i.label}`.length<Mt?`${i.label}`:`${`${i.label}`.substring(0,Mt)}...`,y:a+5,x:g(`${i.id}`),width:g.bandwidth(),height:l.bottom,style:s?.xAxis?.labels,className:o?.xAxis?.labels,alignment:"top",animate:r,isInView:L}):null]},i.label));let ee;t[116]!==r.duration?(ee={opacity:0,transition:{duration:r.duration}},t[116]=r.duration,t[117]=ee):ee=t[117];let ie;t[118]===Symbol.for("react.memo_cache_sentinel")?(ie={fill:"none",strokeWidth:2},t[118]=ie):ie=t[118],$=n.jsxRuntimeExports.jsx(Dt.motion.path,{exit:ee,variants:{initial:{d:qt(m.map(Se)),opacity:0,stroke:p},whileInView:{d:qt(m),opacity:1,stroke:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",style:ie}),B=m.map((i,Pt)=>n.jsxRuntimeExports.jsx("g",{children:ue.checkIfNullOrUndefined(i.line)?null:n.jsxRuntimeExports.jsxs("g",{onMouseEnter:V=>{lt(i),at(V.clientY),c(V.clientX),ot?.(i)},onClick:()=>{(C||y)&&(xe.isEqual(w,i)&&pt?(gt(void 0),C?.(void 0)):(gt(i),C?.(i)))},onMouseMove:V=>{lt(i),at(V.clientY),c(V.clientX)},onMouseLeave:()=>{lt(void 0),c(void 0),at(void 0),ot?.(void 0)},children:[n.jsxRuntimeExports.jsx(Dt.motion.circle,{exit:{cy:b(0),opacity:0,transition:{duration:r.duration}},variants:{initial:{cy:b(0),opacity:0,fill:p},whileInView:{cy:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",cx:g(i.id)+g.bandwidth()/2,r:h/m.length<5?0:h/m.length<20?2:4}),Rt?n.jsxRuntimeExports.jsx(Dt.motion.text,{x:g(`${i.id}`)+g.bandwidth()/2,exit:{y:b(0),opacity:0,transition:{duration:r.duration}},style:{textAnchor:"middle",...s?.graphObjectValues||{}},variants:{initial:{y:b(0),opacity:0,fill:p},whileInView:{y:b(i.line),opacity:1,fill:p,transition:{duration:r.duration}}},initial:"initial",animate:L?"whileInView":"initial",className:n.mo("graph-value text-sm",o?.graphObjectValues),dy:"-5px",children:ne.numberFormattingFunction(i.line,rt,F,kt,ft)}):null]})},Pt)),t[8]=r,t[9]=u,t[10]=d,t[11]=Yt,t[12]=Lt,t[13]=Ct,t[14]=o?.graphObjectValues,t[15]=o?.xAxis?.axis,t[16]=o?.xAxis?.labels,t[17]=o?.yAxis?.gridLines,t[18]=o?.yAxis?.labels,t[19]=o?.yAxis?.title,t[20]=Xt,t[21]=k,t[22]=j,t[23]=y,t[24]=a,t[25]=h,t[26]=D,t[27]=L,t[28]=p,t[29]=kt,t[30]=ft,t[31]=l.bottom,t[32]=l.left,t[33]=l.right,t[34]=l.top,t[35]=w,t[36]=rt,t[37]=dt,t[38]=C,t[39]=ot,t[40]=F,t[41]=pt,t[42]=A,t[43]=R,t[44]=Gt,t[45]=Rt,t[46]=s?.graphObjectValues,t[47]=s?.xAxis?.axis,t[48]=s?.xAxis?.labels,t[49]=s?.yAxis?.gridLines,t[50]=s?.yAxis?.labels,t[51]=s?.yAxis?.title,t[52]=Mt,t[53]=P,t[54]=S,t[55]=H,t[56]=Y,t[57]=M,t[58]=G,t[59]=X,t[60]=W,t[61]=N,t[62]=O,t[63]=T,t[64]=$,t[65]=B,t[66]=U,t[67]=z,t[68]=J}else S=t[54],H=t[55],Y=t[56],M=t[57],G=t[58],X=t[59],W=t[60],N=t[61],O=t[62],T=t[63],$=t[64],B=t[65],U=t[66],z=t[67],J=t[68];let K;t[119]!==S||t[120]!==T||t[121]!==$||t[122]!==B?(K=n.jsxRuntimeExports.jsxs(S,{children:[T,$,B]}),t[119]=S,t[120]=T,t[121]=$,t[122]=B,t[123]=K):K=t[123];let v;t[124]!==k?(v=k.filter(Le).map(ke),t[124]=k,t[125]=v):v=t[125];let Q;t[126]!==Y||t[127]!==M||t[128]!==K||t[129]!==v||t[130]!==U||t[131]!==z||t[132]!==J?(Q=n.jsxRuntimeExports.jsxs("g",{transform:U,children:[z,J,Y,M,K,v]}),t[126]=Y,t[127]=M,t[128]=K,t[129]=v,t[130]=U,t[131]=z,t[132]=J,t[133]=Q):Q=t[133];let Z;t[134]!==H||t[135]!==G||t[136]!==X||t[137]!==W||t[138]!==N||t[139]!==O||t[140]!==Q?(Z=n.jsxRuntimeExports.jsx(H,{width:G,height:X,viewBox:W,direction:N,ref:O,children:Q}),t[134]=H,t[135]=G,t[136]=X,t[137]=W,t[138]=N,t[139]=O,t[140]=Q,t[141]=Z):Z=t[141];let _;t[142]!==o?.tooltip||t[143]!==Ot||t[144]!==x||t[145]!==Nt||t[146]!==s?.tooltip||t[147]!==Et?(_=Nt&&Et&&Ot&&x?n.jsxRuntimeExports.jsx(ge.Tooltip,{data:Nt,body:Et,xPos:Ot,yPos:x,backgroundStyle:s?.tooltip,className:o?.tooltip}):null,t[142]=o?.tooltip,t[143]=Ot,t[144]=x,t[145]=Nt,t[146]=s?.tooltip,t[147]=Et,t[148]=_):_=t[148];let tt;t[149]!==y||t[150]!==w?(tt=y&&w!==void 0?n.jsxRuntimeExports.jsx(he.le,{open:w!==void 0,onClose:()=>{gt(void 0)},children:n.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof y=="string"?{__html:ye.string2HTML(y,w)}:void 0,children:typeof y=="function"?y(w):null})}):null,t[149]=y,t[150]=w,t[151]=tt):tt=t[151];let bt;return t[152]!==Z||t[153]!==_||t[154]!==tt?(bt=n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Z,_,tt]}),t[152]=Z,t[153]=_,t[154]=tt,t[155]=bt):bt=t[155],bt}function ke(e){return e.layer}function Le(e){return e.position==="after"}function Se(e){return{...e,line:0}}function Ne(e){return e.layer}function Oe(e){return e.position==="before"}function Te(e){return!ue.checkIfNullOrUndefined(e.line)}function $e(e){return e!=null}function qe(e){return e.line}function Ie(e){return e!=null}function Ve(e){return e.line}function Pe(e){return e!=null}function De(e){return e.bar}function Fe(e){return e!=null}function He(e){return e.bar}function Ye(e){return e!=null}function Ge(e){return e.line}function Xe(e){return e!=null}function We(e){return e.line}function Be(e){return e!=null}function Ue(e){return e.line}function ze(e){return e!=null}function Je(e){return e.bar}function Ke(e){return e!=null}function Qe(e){return e.bar}function Ze(e){return e!=null}function _e(e){return e.bar}function ti(e){return`${e.id}`}function ei(e,t){return{...e,id:`${t}`}}function ii(e){const t=n.compilerRuntimeExports.c(77),{data:j,graphTitle:P,sources:D,graphDescription:d,height:p,width:u,footNote:A,padding:zt,lineColor:Qt,barColor:Ft,sameAxes:Ht,backgroundColor:Et,leftMargin:Rt,rightMargin:ot,topMargin:Yt,bottomMargin:Mt,lineAxisTitle:Gt,barAxisTitle:C,tooltip:pt,relativeHeight:y,onSeriesMouseOver:dt,graphID:ft,graphDownload:Ct,dataDownload:kt,barPadding:Lt,truncateBy:St,showLabels:s,onSeriesMouseClick:o,language:r,colorLegendTitle:F,minHeight:k,theme:rt,ariaLabel:R,resetSelectionOnDoubleClick:Jt,detailsOnClick:ht,showValues:L,noOfTicks:Xt,lineSuffix:Nt,barSuffix:lt,linePrefix:w,barPrefix:gt,curveType:Ot,styles:c,classNames:x,animate:at,precision:Wt,customLayers:yt,naLabel:Tt,showColorScale:l,showAxisLabels:h}=e,a=Qt===void 0?oe.Colors.light.categoricalColors.colors[1]:Qt,S=Ft===void 0?oe.Colors.light.categoricalColors.colors[0]:Ft,H=Ht===void 0?!1:Ht,Y=Et===void 0?!1:Et,M=Rt===void 0?80:Rt,G=ot===void 0?80:ot,X=Yt===void 0?20:Yt,W=Mt===void 0?25:Mt,N=Gt===void 0?"Line chart":Gt,O=C===void 0?"Bar graph":C,T=Ct===void 0?!1:Ct,$=kt===void 0?!1:kt,B=Lt===void 0?.25:Lt,U=St===void 0?999:St,z=s===void 0?!0:s,J=r===void 0?"en":r,K=k===void 0?0:k,v=rt===void 0?"light":rt,Q=Jt===void 0?!0:Jt,Z=L===void 0?!0:L,_=Xt===void 0?5:Xt,tt=Nt===void 0?"":Nt,bt=lt===void 0?"":lt,m=w===void 0?"":w,g=gt===void 0?"":gt,$t=Ot===void 0?"curve":Ot,vt=at===void 0?!1:at,jt=Wt===void 0?2:Wt;let ct;t[0]!==yt?(ct=yt===void 0?[]:yt,t[0]=yt,t[1]=ct):ct=t[1];const Bt=ct,At=Tt===void 0?"NA":Tt,f=l===void 0?!0:l,b=h===void 0?!0:h,[qt,re]=st.useState(0),[Ut,Kt]=st.useState(0),et=st.useRef(null),ut=st.useRef(null);let q,xt;t[2]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{const mt=new ResizeObserver(Vt=>{re(Vt[0].target.clientWidth||620),Kt(Vt[0].target.clientHeight||480)});return et.current&&mt.observe(et.current),()=>mt.disconnect()},xt=[],t[2]=q,t[3]=xt):(q=t[2],xt=t[3]),st.useEffect(q,xt);const wt=x?.graphContainer,It=c?.graphContainer;let it;t[4]!==x?.description||t[5]!==x?.title||t[6]!==j||t[7]!==$||t[8]!==d||t[9]!==T||t[10]!==P||t[11]!==c?.description||t[12]!==c?.title||t[13]!==u?(it=P||d||T||$?n.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:c?.title,description:c?.description},classNames:{title:x?.title,description:x?.description},graphTitle:P,graphDescription:d,width:u,graphDownload:T?ut:void 0,dataDownload:$?j.map(li).filter(ri).length>0?j.map(oi).filter(si):j.filter(ni):null}):null,t[4]=x?.description,t[5]=x?.title,t[6]=j,t[7]=$,t[8]=d,t[9]=T,t[10]=P,t[11]=c?.description,t[12]=c?.title,t[13]=u,t[14]=it):it=t[14];let nt;t[15]!==vt||t[16]!==O||t[17]!==S||t[18]!==B||t[19]!==g||t[20]!==bt||t[21]!==W||t[22]!==x||t[23]!==F||t[24]!==$t||t[25]!==Bt||t[26]!==j||t[27]!==ht||t[28]!==M||t[29]!==N||t[30]!==a||t[31]!==m||t[32]!==tt||t[33]!==At||t[34]!==_||t[35]!==o||t[36]!==dt||t[37]!==jt||t[38]!==Q||t[39]!==G||t[40]!==H||t[41]!==b||t[42]!==f||t[43]!==z||t[44]!==Z||t[45]!==c||t[46]!==Ut||t[47]!==qt||t[48]!==v||t[49]!==pt||t[50]!==X||t[51]!==U?(nt=j.length===0?n.jsxRuntimeExports.jsx(Me.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[f?n.jsxRuntimeExports.jsx(Re.ColorLegend,{colorDomain:[O,N],colors:[S||oe.Colors[v].categoricalColors.colors[0],a||oe.Colors[v].categoricalColors.colors[1]],colorLegendTitle:F,showNAColor:!1,className:x?.colorLegend}):null,n.jsxRuntimeExports.jsx(fe.GraphArea,{ref:et,children:qt&&Ut?n.jsxRuntimeExports.jsx(Ce,{data:j,sameAxes:H,lineColor:a,barColor:S,width:qt,height:Ut,truncateBy:U,leftMargin:M,rightMargin:G,topMargin:X,bottomMargin:W,axisTitles:[O,N],tooltip:pt,onSeriesMouseOver:dt,barPadding:B,showLabels:z,onSeriesMouseClick:o,resetSelectionOnDoubleClick:Q,detailsOnClick:ht,noOfTicks:_,lineSuffix:tt,barSuffix:bt,linePrefix:m,barPrefix:g,curveType:$t,showValues:Z,styles:c,classNames:x,animate:vt===!0?{duration:.5,once:!0,amount:.5}:vt||{duration:0,once:!0,amount:0},precision:jt,customLayers:Bt,naLabel:At,showAxisLabels:b}):null})]}),t[15]=vt,t[16]=O,t[17]=S,t[18]=B,t[19]=g,t[20]=bt,t[21]=W,t[22]=x,t[23]=F,t[24]=$t,t[25]=Bt,t[26]=j,t[27]=ht,t[28]=M,t[29]=N,t[30]=a,t[31]=m,t[32]=tt,t[33]=At,t[34]=_,t[35]=o,t[36]=dt,t[37]=jt,t[38]=Q,t[39]=G,t[40]=H,t[41]=b,t[42]=f,t[43]=z,t[44]=Z,t[45]=c,t[46]=Ut,t[47]=qt,t[48]=v,t[49]=pt,t[50]=X,t[51]=U,t[52]=nt):nt=t[52];let E;t[53]!==x?.footnote||t[54]!==x?.source||t[55]!==A||t[56]!==D||t[57]!==c?.footnote||t[58]!==c?.source||t[59]!==u?(E=D||A?n.jsxRuntimeExports.jsx(we.GraphFooter,{styles:{footnote:c?.footnote,source:c?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:D,footNote:A,width:u}):null,t[53]=x?.footnote,t[54]=x?.source,t[55]=A,t[56]=D,t[57]=c?.footnote,t[58]=c?.source,t[59]=u,t[60]=E):E=t[60];let I;return t[61]!==R||t[62]!==Y||t[63]!==ft||t[64]!==p||t[65]!==J||t[66]!==K||t[67]!==zt||t[68]!==y||t[69]!==wt||t[70]!==It||t[71]!==it||t[72]!==nt||t[73]!==E||t[74]!==v||t[75]!==u?(I=n.jsxRuntimeExports.jsxs(fe.GraphContainer,{className:wt,style:It,id:ft,ref:ut,"aria-label":R,backgroundColor:Y,theme:v,language:J,minHeight:K,width:u,height:p,relativeHeight:y,padding:zt,children:[it,nt,E]}),t[61]=R,t[62]=Y,t[63]=ft,t[64]=p,t[65]=J,t[66]=K,t[67]=zt,t[68]=y,t[69]=wt,t[70]=It,t[71]=it,t[72]=nt,t[73]=E,t[74]=v,t[75]=u,t[76]=I):I=t[76],I}function ni(e){return e!==void 0}function si(e){return e!==void 0}function oi(e){return e.data}function ri(e){return e!==void 0}function li(e){return e.data}exports.ParetoChart=ii;
|
|
2
2
|
//# sourceMappingURL=ParetoChart.cjs.map
|
package/dist/ParetoChart.js
CHANGED
|
@@ -8,7 +8,7 @@ import { s as vi } from "./string2HTML-DhG75NqA.js";
|
|
|
8
8
|
import { c as mi } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
9
9
|
import { A as ci } from "./Axis-CRyfcLjc.js";
|
|
10
10
|
import { A as fi } from "./AxisTitle-jeI7am8o.js";
|
|
11
|
-
import { X as bi } from "./XAxesLabels-
|
|
11
|
+
import { X as bi } from "./XAxesLabels-Dmbk50u4.js";
|
|
12
12
|
import { b as Ai } from "./band-CyHaVft5.js";
|
|
13
13
|
import { a as pi } from "./linear-BwnDd9KF.js";
|
|
14
14
|
import { l as wi, c as ji } from "./line-CPfhohvF.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const p=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("./proxy-BxvUI_9l.cjs");function C(A){const t=p.compilerRuntimeExports.c(38),{value:g,y:e,x:i,style:h,className:j,width:w,height:E,alignment:V,animate:n,isInView:N}=A,b=V===void 0?"top":V;let l;t[0]!==i||t[1]!==e?(l={x:i,y:e},t[0]=i,t[1]=e,t[2]=l):l=t[2];let s;t[3]!==n.duration?(s={duration:n.duration},t[3]=n.duration,t[4]=s):s=t[4];let r;t[5]!==s||t[6]!==i||t[7]!==e?(r={x:i,y:e,transition:s},t[5]=s,t[6]=i,t[7]=e,t[8]=r):r=t[8];let a;t[9]!==l||t[10]!==r?(a={initial:l,whileInView:r},t[9]=l,t[10]=r,t[11]=a):a=t[11];const R=N?"whileInView":"initial";let o;t[12]!==n.duration?(o={opacity:0,transition:{duration:n.duration}},t[12]=n.duration,t[13]=o):o=t[13];const v=`flex flex-col items-center h-full ${b==="top"?"justify-start":"justify-end"}`,I=b==="top"?"flex-start":"flex-end";let x;t[14]!==I?(x={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:I,height:"100%"},t[14]=I,t[15]=x):x=t[15];let c;t[16]!==j?(c=p.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none",j),t[16]=j,t[17]=c):c=t[17];let f;t[18]!==h?(f={textAlign:"center",padding:"0 6px",...h},t[18]=h,t[19]=f):f=t[19];let u;t[20]!==c||t[21]!==f||t[22]!==g?(u=p.jsxRuntimeExports.jsx("p",{className:c,style:f,children:g}),t[20]=c,t[21]=f,t[22]=g,t[23]=u):u=t[23];let d;t[24]!==u||t[25]!==v||t[26]!==x?(d=p.jsxRuntimeExports.jsx("div",{className:v,style:x,children:u}),t[24]=u,t[25]=v,t[26]=x,t[27]=d):d=t[27];let m;t[28]!==E||t[29]!==d||t[30]!==w?(m=p.jsxRuntimeExports.jsx("foreignObject",{width:w,height:E,y:0,x:0,children:d}),t[28]=E,t[29]=d,t[30]=w,t[31]=m):m=t[31];let y;return t[32]!==m||t[33]!==a||t[34]!==R||t[35]!==o||t[36]!==e?(y=p.jsxRuntimeExports.jsx(q.motion.g,{variants:a,initial:"initial",animate:R,exit:o,children:m},e),t[32]=m,t[33]=a,t[34]=R,t[35]=o,t[36]=e,t[37]=y):y=t[37],y}exports.XAxesLabels=C;
|
|
2
|
-
//# sourceMappingURL=XAxesLabels-
|
|
1
|
+
"use strict";const p=require("./index-CHPV5EwG-CTPQjnHt.cjs"),q=require("./proxy-BxvUI_9l.cjs");function C(A){const t=p.compilerRuntimeExports.c(38),{value:g,y:e,x:i,style:h,className:j,width:w,height:E,alignment:V,animate:n,isInView:N}=A,b=V===void 0?"top":V;let l;t[0]!==i||t[1]!==e?(l={x:i,y:e},t[0]=i,t[1]=e,t[2]=l):l=t[2];let s;t[3]!==n.duration?(s={duration:n.duration},t[3]=n.duration,t[4]=s):s=t[4];let r;t[5]!==s||t[6]!==i||t[7]!==e?(r={x:i,y:e,transition:s},t[5]=s,t[6]=i,t[7]=e,t[8]=r):r=t[8];let a;t[9]!==l||t[10]!==r?(a={initial:l,whileInView:r},t[9]=l,t[10]=r,t[11]=a):a=t[11];const R=N?"whileInView":"initial";let o;t[12]!==n.duration?(o={opacity:0,transition:{duration:n.duration}},t[12]=n.duration,t[13]=o):o=t[13];const v=`flex flex-col items-center h-full ${b==="top"?"justify-start":"justify-end"}`,I=b==="top"?"flex-start":"flex-end";let x;t[14]!==I?(x={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:I,height:"100%"},t[14]=I,t[15]=x):x=t[15];let c;t[16]!==j?(c=p.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none",j),t[16]=j,t[17]=c):c=t[17];let f;t[18]!==h?(f={textAlign:"center",padding:"0 6px",fontSize:"12px",lineHeight:1,...h},t[18]=h,t[19]=f):f=t[19];let u;t[20]!==c||t[21]!==f||t[22]!==g?(u=p.jsxRuntimeExports.jsx("p",{className:c,style:f,children:g}),t[20]=c,t[21]=f,t[22]=g,t[23]=u):u=t[23];let d;t[24]!==u||t[25]!==v||t[26]!==x?(d=p.jsxRuntimeExports.jsx("div",{className:v,style:x,children:u}),t[24]=u,t[25]=v,t[26]=x,t[27]=d):d=t[27];let m;t[28]!==E||t[29]!==d||t[30]!==w?(m=p.jsxRuntimeExports.jsx("foreignObject",{width:w,height:E,y:0,x:0,children:d}),t[28]=E,t[29]=d,t[30]=w,t[31]=m):m=t[31];let y;return t[32]!==m||t[33]!==a||t[34]!==R||t[35]!==o||t[36]!==e?(y=p.jsxRuntimeExports.jsx(q.motion.g,{variants:a,initial:"initial",animate:R,exit:o,children:m},e),t[32]=m,t[33]=a,t[34]=R,t[35]=o,t[36]=e,t[37]=y):y=t[37],y}exports.XAxesLabels=C;
|
|
2
|
+
//# sourceMappingURL=XAxesLabels-C1XSXoWG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XAxesLabels-C1XSXoWG.cjs","sources":["../src/Components/Elements/Axes/XAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'top' | 'bottom';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function XAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'top',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={y}\r\n variants={{\r\n initial: {\r\n x,\r\n y,\r\n },\r\n whileInView: {\r\n x,\r\n y,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject width={width} height={height} y={0} x={0}>\r\n <div\r\n className={`flex flex-col items-center h-full ${\r\n alignment === 'top' ? 'justify-start' : 'justify-end'\r\n }`}\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: alignment === 'top' ? 'flex-start' : 'flex-end',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none',\r\n className,\r\n )}\r\n style={{\r\n textAlign: 'center',\r\n padding: '0 6px',\r\n fontSize: '12px',\r\n lineHeight: 1,\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["XAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","t9","display","flexDirection","alignItems","justifyContent","t10","cn","t11","textAlign","padding","fontSize","lineHeight","t12","t13","t14","jsx","t15","motion"],"mappings":"gGAkBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,MAAA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AAxC,MAAAO,EAAAP,MAAAyC,GAAAA,EAAAzC,EAAA,EAAA,EAAA,IAAA2C,EAAA,OAAA3C,EAAA,EAAA,IAAAyC,GAAAzC,EAAA,EAAA,IAAAmB,GAAAnB,EAAA,EAAA,IAAAsB,GAAAtB,EAAA,EAAA,IAAAuB,GAAAvB,QAAAG,GA9ClBwC,EAAAD,EAAAA,kBAAAA,IAAAE,EAAAA,OAAA,EAAA,CAEY,SAAAzB,EAWF,QAAA,UACC,QAAAG,EACH,KAAAC,EAENkB,YAhBKtC,CA8CP,EAAWH,MAAAyC,EAAAzC,MAAAmB,EAAAnB,MAAAsB,EAAAtB,MAAAuB,EAAAvB,MAAAG,EAAAH,MAAA2C,GAAAA,EAAA3C,EAAA,EAAA,EA/CX2C,CA+CW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as X, m as $, j as y } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
2
|
import { m as k } from "./proxy-BxkFHwUw.js";
|
|
3
|
-
function
|
|
3
|
+
function D(E) {
|
|
4
4
|
const t = X.c(38), {
|
|
5
5
|
value: g,
|
|
6
6
|
y: e,
|
|
@@ -28,19 +28,19 @@ function L(E) {
|
|
|
28
28
|
y: e,
|
|
29
29
|
transition: s
|
|
30
30
|
}, t[5] = s, t[6] = i, t[7] = e, t[8] = a) : a = t[8];
|
|
31
|
-
let
|
|
32
|
-
t[9] !== n || t[10] !== a ? (
|
|
31
|
+
let o;
|
|
32
|
+
t[9] !== n || t[10] !== a ? (o = {
|
|
33
33
|
initial: n,
|
|
34
34
|
whileInView: a
|
|
35
|
-
}, t[9] = n, t[10] = a, t[11] =
|
|
35
|
+
}, t[9] = n, t[10] = a, t[11] = o) : o = t[11];
|
|
36
36
|
const I = R ? "whileInView" : "initial";
|
|
37
|
-
let
|
|
38
|
-
t[12] !== l.duration ? (
|
|
37
|
+
let r;
|
|
38
|
+
t[12] !== l.duration ? (r = {
|
|
39
39
|
opacity: 0,
|
|
40
40
|
transition: {
|
|
41
41
|
duration: l.duration
|
|
42
42
|
}
|
|
43
|
-
}, t[12] = l.duration, t[13] =
|
|
43
|
+
}, t[12] = l.duration, t[13] = r) : r = t[13];
|
|
44
44
|
const N = `flex flex-col items-center h-full ${A === "top" ? "justify-start" : "justify-end"}`, V = A === "top" ? "flex-start" : "flex-end";
|
|
45
45
|
let f;
|
|
46
46
|
t[14] !== V ? (f = {
|
|
@@ -52,22 +52,24 @@ function L(E) {
|
|
|
52
52
|
}, t[14] = V, t[15] = f) : f = t[15];
|
|
53
53
|
let c;
|
|
54
54
|
t[16] !== j ? (c = $("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none", j), t[16] = j, t[17] = c) : c = t[17];
|
|
55
|
-
let
|
|
56
|
-
t[18] !== h ? (
|
|
55
|
+
let x;
|
|
56
|
+
t[18] !== h ? (x = {
|
|
57
57
|
textAlign: "center",
|
|
58
58
|
padding: "0 6px",
|
|
59
|
+
fontSize: "12px",
|
|
60
|
+
lineHeight: 1,
|
|
59
61
|
...h
|
|
60
|
-
}, t[18] = h, t[19] =
|
|
61
|
-
let
|
|
62
|
-
t[20] !== c || t[21] !==
|
|
62
|
+
}, t[18] = h, t[19] = x) : x = t[19];
|
|
63
|
+
let m;
|
|
64
|
+
t[20] !== c || t[21] !== x || t[22] !== g ? (m = /* @__PURE__ */ y.jsx("p", { className: c, style: x, children: g }), t[20] = c, t[21] = x, t[22] = g, t[23] = m) : m = t[23];
|
|
63
65
|
let d;
|
|
64
|
-
t[24] !==
|
|
66
|
+
t[24] !== m || t[25] !== N || t[26] !== f ? (d = /* @__PURE__ */ y.jsx("div", { className: N, style: f, children: m }), t[24] = m, t[25] = N, t[26] = f, t[27] = d) : d = t[27];
|
|
65
67
|
let p;
|
|
66
68
|
t[28] !== v || t[29] !== d || t[30] !== w ? (p = /* @__PURE__ */ y.jsx("foreignObject", { width: w, height: v, y: 0, x: 0, children: d }), t[28] = v, t[29] = d, t[30] = w, t[31] = p) : p = t[31];
|
|
67
69
|
let u;
|
|
68
|
-
return t[32] !== p || t[33] !==
|
|
70
|
+
return t[32] !== p || t[33] !== o || t[34] !== I || t[35] !== r || t[36] !== e ? (u = /* @__PURE__ */ y.jsx(k.g, { variants: o, initial: "initial", animate: I, exit: r, children: p }, e), t[32] = p, t[33] = o, t[34] = I, t[35] = r, t[36] = e, t[37] = u) : u = t[37], u;
|
|
69
71
|
}
|
|
70
72
|
export {
|
|
71
|
-
|
|
73
|
+
D as X
|
|
72
74
|
};
|
|
73
|
-
//# sourceMappingURL=XAxesLabels-
|
|
75
|
+
//# sourceMappingURL=XAxesLabels-Dmbk50u4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"XAxesLabels-Dmbk50u4.js","sources":["../src/Components/Elements/Axes/XAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'top' | 'bottom';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function XAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'top',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={y}\r\n variants={{\r\n initial: {\r\n x,\r\n y,\r\n },\r\n whileInView: {\r\n x,\r\n y,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject width={width} height={height} y={0} x={0}>\r\n <div\r\n className={`flex flex-col items-center h-full ${\r\n alignment === 'top' ? 'justify-start' : 'justify-end'\r\n }`}\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: alignment === 'top' ? 'flex-start' : 'flex-end',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none',\r\n className,\r\n )}\r\n style={{\r\n textAlign: 'center',\r\n padding: '0 6px',\r\n fontSize: '12px',\r\n lineHeight: 1,\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["XAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","t9","display","flexDirection","alignItems","justifyContent","t10","cn","t11","textAlign","padding","fontSize","lineHeight","t12","t13","t14","jsx","t15","motion"],"mappings":";;AAkBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,OAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAC;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAWIb,GAHFU,IAAAC,MAAAG,SAAA,QAAAH;AAAiB,MAAAI;AAAA,EAAAd,EAAA,CAAA,MAAAI,KAAAJ,SAAAG,KAQJW,IAAA;AAAA,IAAAV,GAAAA;AAAAA,IAAAD,GAAAA;AAAAA,EAAAA,GAGRH,OAAAI,GAAAJ,OAAAG,GAAAH,OAAAc,KAAAA,IAAAd,EAAA,CAAA;AAAA,MAAAe;AAAA,EAAAf,EAAA,CAAA,MAAAW,EAAAK,YAIaD,IAAA;AAAA,IAAAC,UAAYL,EAAOK;AAAA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,EAAAA,IAAAE,EAAA,GAAA,EAEY,UAAAzB,GAWF,SAAA,WACC,SAAAG,GACH,MAAAC,GAENkB,eAhBKtC,CA8CP,GAAWH,QAAAyC,GAAAzC,QAAAmB,GAAAnB,QAAAsB,GAAAtB,QAAAuB,GAAAvB,QAAAG,GAAAH,QAAA2C,KAAAA,IAAA3C,EAAA,EAAA,GA/CX2C;AA+CW;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { c as E, m as R, j as h } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import { m as S } from "./proxy-BxkFHwUw.js";
|
|
3
|
+
function $(V) {
|
|
4
|
+
const e = E.c(35), {
|
|
5
|
+
value: y,
|
|
6
|
+
y: i,
|
|
7
|
+
x: t,
|
|
8
|
+
style: g,
|
|
9
|
+
className: j,
|
|
10
|
+
width: w,
|
|
11
|
+
height: v,
|
|
12
|
+
alignment: N,
|
|
13
|
+
animate: l,
|
|
14
|
+
isInView: A
|
|
15
|
+
} = V, d = N === void 0 ? "right" : N;
|
|
16
|
+
let n;
|
|
17
|
+
e[0] !== t || e[1] !== i ? (n = {
|
|
18
|
+
y: i,
|
|
19
|
+
x: t
|
|
20
|
+
}, e[0] = t, e[1] = i, e[2] = n) : n = e[2];
|
|
21
|
+
let s;
|
|
22
|
+
e[3] !== l.duration ? (s = {
|
|
23
|
+
duration: l.duration
|
|
24
|
+
}, e[3] = l.duration, e[4] = s) : s = e[4];
|
|
25
|
+
let a;
|
|
26
|
+
e[5] !== s || e[6] !== t || e[7] !== i ? (a = {
|
|
27
|
+
y: i,
|
|
28
|
+
x: t,
|
|
29
|
+
transition: s
|
|
30
|
+
}, e[5] = s, e[6] = t, e[7] = i, e[8] = a) : a = e[8];
|
|
31
|
+
let o;
|
|
32
|
+
e[9] !== n || e[10] !== a ? (o = {
|
|
33
|
+
initial: n,
|
|
34
|
+
whileInView: a
|
|
35
|
+
}, e[9] = n, e[10] = a, e[11] = o) : o = e[11];
|
|
36
|
+
const b = A ? "whileInView" : "initial";
|
|
37
|
+
let r;
|
|
38
|
+
e[12] !== l.duration ? (r = {
|
|
39
|
+
opacity: 0,
|
|
40
|
+
transition: {
|
|
41
|
+
duration: l.duration
|
|
42
|
+
}
|
|
43
|
+
}, e[12] = l.duration, e[13] = r) : r = e[13];
|
|
44
|
+
let u;
|
|
45
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
46
|
+
display: "flex",
|
|
47
|
+
flexDirection: "column",
|
|
48
|
+
justifyContent: "center",
|
|
49
|
+
height: "100%"
|
|
50
|
+
}, e[14] = u) : u = e[14];
|
|
51
|
+
const I = `text-${d}`;
|
|
52
|
+
let c;
|
|
53
|
+
e[15] !== j || e[16] !== I ? (c = R("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none", I, j), e[15] = j, e[16] = I, e[17] = c) : c = e[17];
|
|
54
|
+
let f;
|
|
55
|
+
e[18] !== d || e[19] !== g ? (f = {
|
|
56
|
+
textAlign: d,
|
|
57
|
+
padding: "6px 0",
|
|
58
|
+
fontSize: "12px",
|
|
59
|
+
lineHeight: 1,
|
|
60
|
+
...g
|
|
61
|
+
}, e[18] = d, e[19] = g, e[20] = f) : f = e[20];
|
|
62
|
+
let m;
|
|
63
|
+
e[21] !== f || e[22] !== c || e[23] !== y ? (m = /* @__PURE__ */ h.jsx("div", { className: "flex flex-col justify-center h-full", style: u, children: /* @__PURE__ */ h.jsx("p", { className: c, style: f, children: y }) }), e[21] = f, e[22] = c, e[23] = y, e[24] = m) : m = e[24];
|
|
64
|
+
let x;
|
|
65
|
+
e[25] !== v || e[26] !== m || e[27] !== w ? (x = /* @__PURE__ */ h.jsx("foreignObject", { y: 0, x: 0, width: w, height: v, children: m }), e[25] = v, e[26] = m, e[27] = w, e[28] = x) : x = e[28];
|
|
66
|
+
let p;
|
|
67
|
+
return e[29] !== x || e[30] !== o || e[31] !== b || e[32] !== r || e[33] !== t ? (p = /* @__PURE__ */ h.jsx(S.g, { variants: o, initial: "initial", animate: b, exit: r, children: x }, t), e[29] = x, e[30] = o, e[31] = b, e[32] = r, e[33] = t, e[34] = p) : p = e[34], p;
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
$ as Y
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=YAxesLabels-1XTb-D0_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YAxesLabels-1XTb-D0_.js","sources":["../src/Components/Elements/Axes/YAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'left' | 'right' | 'center';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function YAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'right',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={x}\r\n variants={{\r\n initial: {\r\n y,\r\n x,\r\n },\r\n whileInView: {\r\n y,\r\n x,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={width} height={height}>\r\n <div\r\n className='flex flex-col justify-center h-full'\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none',\r\n `text-${alignment}`,\r\n className,\r\n )}\r\n style={{\r\n textAlign: alignment,\r\n padding: '6px 0',\r\n fontSize: '12px',\r\n lineHeight: 1,\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["YAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","Symbol","for","display","flexDirection","justifyContent","t8","t9","cn","t10","textAlign","padding","fontSize","lineHeight","t11","jsx","t12","t13","motion"],"mappings":";;AAkBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,OAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAC;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAWIb,GAHFU,IAAAC,MAAAG,SAAA,UAAAH;AAAmB,MAAAI;AAAA,EAAAd,EAAA,CAAA,MAAAI,KAAAJ,SAAAG,KAQNW,IAAA;AAAA,IAAAX,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,EAAAA,GAGRJ,OAAAI,GAAAJ,OAAAG,GAAAH,OAAAc,KAAAA,IAAAd,EAAA,CAAA;AAAA,MAAAe;AAAA,EAAAf,EAAA,CAAA,MAAAW,EAAAK,YAIaD,IAAA;AAAA,IAAAC,UAAYL,EAAOK;AAAAA,EAAAA,GAAWhB,EAAA,CAAA,IAAAW,EAAAK,UAAAhB,OAAAe,KAAAA,IAAAf,EAAA,CAAA;AAAA,MAAAiB;AAAA,EAAAjB,EAAA,CAAA,MAAAe,KAAAf,SAAAI,KAAAJ,EAAA,CAAA,MAAAG,KAH/Bc,IAAA;AAAA,IAAAd,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAc,YAGCH;AAAAA,EA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eExports.c(35),{value:h,y:i,x:t,style:g,className:j,width:w,height:E,alignment:v,animate:n,isInView:A}=V,d=v===void 0?"right":v;let l;e[0]!==t||e[1]!==i?(l={y:i,x:t},e[0]=t,e[1]=i,e[2]=l):l=e[2];let s;e[3]!==n.duration?(s={duration:n.duration},e[3]=n.duration,e[4]=s):s=e[4];let r;e[5]!==s||e[6]!==t||e[7]!==i?(r={y:i,x:t,transition:s},e[5]=s,e[6]=t,e[7]=i,e[8]=r):r=e[8];let a;e[9]!==l||e[10]!==r?(a={initial:l,whileInView:r},e[9]=l,e[10]=r,e[11]=a):a=e[11];const R=A?"whileInView":"initial";let o;e[12]!==n.duration?(o={opacity:0,transition:{duration:n.duration}},e[12]=n.duration,e[13]=o):o=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p={display:"flex",flexDirection:"column",justifyContent:"center",height:"100%"},e[14]=p):p=e[14];const b=`text-${d}`;let x;e[15]!==j||e[16]!==b?(x=m.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none",b,j),e[15]=j,e[16]=b,e[17]=x):x=e[17];let c;e[18]!==d||e[19]!==g?(c={textAlign:d,padding:"6px 0",fontSize:"12px",lineHeight:1,...g},e[18]=d,e[19]=g,e[20]=c):c=e[20];let f;e[21]!==c||e[22]!==x||e[23]!==h?(f=m.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center h-full",style:p,children:m.jsxRuntimeExports.jsx("p",{className:x,style:c,children:h})}),e[21]=c,e[22]=x,e[23]=h,e[24]=f):f=e[24];let u;e[25]!==E||e[26]!==f||e[27]!==w?(u=m.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:w,height:E,children:f}),e[25]=E,e[26]=f,e[27]=w,e[28]=u):u=e[28];let y;return e[29]!==u||e[30]!==a||e[31]!==R||e[32]!==o||e[33]!==t?(y=m.jsxRuntimeExports.jsx(I.motion.g,{variants:a,initial:"initial",animate:R,exit:o,children:u},t),e[29]=u,e[30]=a,e[31]=R,e[32]=o,e[33]=t,e[34]=y):y=e[34],y}exports.YAxesLabels=N;
|
|
2
|
+
//# sourceMappingURL=YAxesLabels-pjdsVwIM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YAxesLabels-pjdsVwIM.cjs","sources":["../src/Components/Elements/Axes/YAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'left' | 'right' | 'center';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function YAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'right',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={x}\r\n variants={{\r\n initial: {\r\n y,\r\n x,\r\n },\r\n whileInView: {\r\n y,\r\n x,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={width} height={height}>\r\n <div\r\n className='flex flex-col justify-center h-full'\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none',\r\n `text-${alignment}`,\r\n className,\r\n )}\r\n style={{\r\n textAlign: alignment,\r\n padding: '6px 0',\r\n fontSize: '12px',\r\n lineHeight: 1,\r\n ...style,\r\n }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["YAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","Symbol","for","display","flexDirection","justifyContent","t8","t9","cn","t10","textAlign","padding","fontSize","lineHeight","t11","jsx","t12","t13","motion"],"mappings":"gGAkBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,MAAAA,EAAAC,EAAAA,EAAAC,EAAAA,EAAAC,MAAAA,EAAAC,UAAAA,EAAAC,MAAAA,EAAAC,OAAAA,EAAAC,UAAAC,EAAAC,QAAAA,EAAAC,SAAAA,CAAAA,EAWIb,EAHFU,EAAAC,IAAAG,OAAA,QAAAH,EAAmB,IAAAI,EAAAd,EAAA,CAAA,IAAAI,GAAAJ,OAAAG,GAQNW,EAAA,CAAAX,EAAAA,EAAAC,EAAAA,CAAAA,EAGRJ,KAAAI,EAAAJ,KAAAG,EAAAH,KAAAc,GAAAA,EAAAd,EAAA,CAAA,EAAA,IAAAe,EAAAf,EAAA,CAAA,IAAAW,EAAAK,UAIaD,EAAA,CAAAC,SAAYL,EAAOK,QAAAA,EAAWhB,EAAA,CAAA,EAAAW,EAAAK,SAAAhB,KAAAe,GAAAA,EAAAf,EAAA,CAAA,EAAA,IAAAiB,EAAAjB,EAAA,CAAA,IAAAe,GAAAf,OAAAI,GAAAJ,EAAA,CAAA,IAAAG,GAH/Bc,EAAA,CAAAd,EAAAA,EAAAC,EAAAA,EAAAc,WAGCH,CAAAA,EACbf,KAAAe,EAAAf,KAAAI,EAAAJ,KAAAG,EAAAH,KAAAiB,GAAAA,EAAAjB,EAAA,CAAA,EAAA,IAAAmB,EAAAnB,EAAA,CAAA,IAAAc,GAAAd,QAAAiB,GATOE,EAAA,CAAAC,QACCN,EAGRO,YACYJ,CAAAA,EAKdjB,KAAAc,EAAAd,MAAAiB,EAAAjB,MAAAmB,GAAAA,E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,GAAAR,QAAAuC,GAAAvC,EAAA,EAAA,IAAAO,GA1BRkC,EAAAD,EAAAA,kBAAAA,IAAA,iBAAkB,EAAA,EAAM,EAAA,EAAUjC,MAAAA,EAAeC,OAAAA,EAC/C+B,SAAAA,CAAAA,CA0BF,EAAgBvC,MAAAQ,EAAAR,MAAAuC,EAAAvC,MAAAO,EAAAP,MAAAyC,GAAAA,EAAAzC,EAAA,EAAA,EAAA,IAAA0C,EAAA,OAAA1C,EAAA,EAAA,IAAAyC,GAAAzC,EAAA,EAAA,IAAAmB,GAAAnB,EAAA,EAAA,IAAAsB,GAAAtB,EAAA,EAAA,IAAAuB,GAAAvB,QAAAI,GA5ClBsC,EAAAF,EAAAA,kBAAAA,IAAAG,EAAAA,OAAA,EAAA,CAEY,SAAAxB,EAWF,QAAA,UACC,QAAAG,EACH,KAAAC,EAENkB,YAhBKrC,CA4CP,EAAWJ,MAAAyC,EAAAzC,MAAAmB,EAAAnB,MAAAsB,EAAAtB,MAAAuB,EAAAvB,MAAAI,EAAAJ,MAAA0C,GAAAA,EAAA1C,EAAA,EAAA,EA7CX0C,CA6CW"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XAxesLabels-D5X8jngD.cjs","sources":["../src/Components/Elements/Axes/XAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'top' | 'bottom';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function XAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'top',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={y}\r\n variants={{\r\n initial: {\r\n x,\r\n y,\r\n },\r\n whileInView: {\r\n x,\r\n y,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject width={width} height={height} y={0} x={0}>\r\n <div\r\n className={`flex flex-col items-center h-full ${\r\n alignment === 'top' ? 'justify-start' : 'justify-end'\r\n }`}\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: alignment === 'top' ? 'flex-start' : 'flex-end',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none',\r\n className,\r\n )}\r\n style={{ textAlign: 'center', padding: '0 6px', ...style }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["XAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","t9","display","flexDirection","alignItems","justifyContent","t10","cn","t11","textAlign","padding","t12","t13","t14","jsx","t15","motion"],"mappings":"gGAkBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,MAAAA,EAAAC,EAAAA,EAAAC,EAAAA,EAAAC,MAAAA,EAAAC,UAAAA,EAAAC,MAAAA,EAAAC,OAAAA,EAAAC,UAAAC,EAAAC,QAAAA,EAAAC,SAAAA,CAAAA,EAWIb,EAHFU,EAAAC,IAAAG,OAAA,MAAAH,EAAiB,IAAAI,EAAAd,EAAA,CAAA,IAAAI,GAAAJ,OAAAG,GAQJW,EAAA,CAAAV,EAAAA,EAAAD,EAAAA,CAAAA,EAGRH,KAAAI,EAAAJ,KAAAG,EAAA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AAAuC,EAAAvC,MAAAmB,EAAAnB,MAAAsB,EAAAtB,MAAAuB,EAAAvB,MAAAG,EAAAH,MAAAyC,GAAAA,EAAAzC,EAAA,EAAA,EAzCXyC,CAyCW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XAxesLabels-DNO0KmjL.js","sources":["../src/Components/Elements/Axes/XAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'top' | 'bottom';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function XAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'top',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={y}\r\n variants={{\r\n initial: {\r\n x,\r\n y,\r\n },\r\n whileInView: {\r\n x,\r\n y,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject width={width} height={height} y={0} x={0}>\r\n <div\r\n className={`flex flex-col items-center h-full ${\r\n alignment === 'top' ? 'justify-start' : 'justify-end'\r\n }`}\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n justifyContent: alignment === 'top' ? 'flex-start' : 'flex-end',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none',\r\n className,\r\n )}\r\n style={{ textAlign: 'center', padding: '0 6px', ...style }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["XAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","t8","t9","display","flexDirection","alignItems","justifyContent","t10","cn","t11","textAlign","padding","t12","t13","t14","jsx","t15","motion"],"mappings":";;AAkBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,OAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAC;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAWIb,GAHFU,IAAAC,MAAAG,SAAA,QAAAH;AAAiB,MAAAI;AAAA,EAAAd,EAAA,CAAA,MAAAI,KAAAJ,SAAAG,KAQJW,IAAA;AAAA,IAAAV,GAAAA;AAAAA,IAAAD,GAAAA;AAAAA,EAAAA,GAGRH,OAAAI,GAAAJ,OAAAG,GAAAH,OAAAc,KAAAA,IAAAd,EAAA,CAAA;AAAA,MAAAe;AAAA,EAAAf,EAAA,CAAA,MAAAW,EAAAK,YAIaD,IAAA;AAAA,IAAAC,UAAYL,EAAOK;AAAAA,EAAAA,GAAWhB,EAAA,CAAA,IAAAW,EAAAK,UAAAhB,OAAAe,KAAAA,IAAAf,EAAA,CAAA;AAAA,MAAAiB;AAAA,EAAAjB,EAAA,CAAA,MAAAe,KAAAf,SAAAI,KAAAJ,EAAA,CAAA,MAAAG,KAH/Bc,IAAA;AAAA,IAAAb,GAAAA;AAAAA,IAAAD,GAAAA;AAAAA,IAAAe,YAGCH;AAAAA,EAAAA,GACbf,OAAAe,GAAAf,OAAAI,GAAAJ,OAAAG,GAAAH,OAAAiB,KAAAA,IAAAjB,E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value:h,y:i,x:t,style:g,className:j,width:w,height:E,alignment:v,animate:l,isInView:A}=V,d=v===void 0?"right":v;let n;e[0]!==t||e[1]!==i?(n={y:i,x:t},e[0]=t,e[1]=i,e[2]=n):n=e[2];let s;e[3]!==l.duration?(s={duration:l.duration},e[3]=l.duration,e[4]=s):s=e[4];let r;e[5]!==s||e[6]!==t||e[7]!==i?(r={y:i,x:t,transition:s},e[5]=s,e[6]=t,e[7]=i,e[8]=r):r=e[8];let a;e[9]!==n||e[10]!==r?(a={initial:n,whileInView:r},e[9]=n,e[10]=r,e[11]=a):a=e[11];const R=A?"whileInView":"initial";let o;e[12]!==l.duration?(o={opacity:0,transition:{duration:l.duration}},e[12]=l.duration,e[13]=o):o=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p={display:"flex",flexDirection:"column",justifyContent:"center",height:"100%"},e[14]=p):p=e[14];const b=`text-${d}`;let x;e[15]!==j||e[16]!==b?(x=m.mo("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none",b,j),e[15]=j,e[16]=b,e[17]=x):x=e[17];let c;e[18]!==d||e[19]!==g?(c={textAlign:d,padding:"0 6px",...g},e[18]=d,e[19]=g,e[20]=c):c=e[20];let f;e[21]!==c||e[22]!==x||e[23]!==h?(f=m.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center h-full",style:p,children:m.jsxRuntimeExports.jsx("p",{className:x,style:c,children:h})}),e[21]=c,e[22]=x,e[23]=h,e[24]=f):f=e[24];let u;e[25]!==E||e[26]!==f||e[27]!==w?(u=m.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:w,height:E,children:f}),e[25]=E,e[26]=f,e[27]=w,e[28]=u):u=e[28];let y;return e[29]!==u||e[30]!==a||e[31]!==R||e[32]!==o||e[33]!==t?(y=m.jsxRuntimeExports.jsx(I.motion.g,{variants:a,initial:"initial",animate:R,exit:o,children:u},t),e[29]=u,e[30]=a,e[31]=R,e[32]=o,e[33]=t,e[34]=y):y=e[34],y}exports.YAxesLabels=N;
|
|
2
|
-
//# sourceMappingURL=YAxesLabels-DcS85Beo.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"YAxesLabels-DcS85Beo.cjs","sources":["../src/Components/Elements/Axes/YAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'left' | 'right' | 'center';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function YAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'right',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={x}\r\n variants={{\r\n initial: {\r\n y,\r\n x,\r\n },\r\n whileInView: {\r\n y,\r\n x,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={width} height={height}>\r\n <div\r\n className='flex flex-col justify-center h-full'\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none',\r\n `text-${alignment}`,\r\n className,\r\n )}\r\n style={{ textAlign: alignment, padding: '0 6px', ...style }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["YAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","Symbol","for","display","flexDirection","justifyContent","t8","t9","cn","t10","textAlign","padding","t11","jsx","t12","t13","motion"],"mappings":"gGAkBO,SAAAA,EAAAC,EAAA,CAAA,MAAAC,EAAAC,EAAAA,uBAAAA,EAAA,EAAA,EACL,CAAAC,MAAAA,EAAAC,EAAAA,EAAAC,EAAAA,EAAAC,MAAAA,EAAAC,UAAAA,EAAAC,MAAAA,EAAAC,OAAAA,EAAAC,UAAAC,EAAAC,QAAAA,EAAAC,SAAAA,CAAAA,EAWIb,EAHFU,EAAAC,IAAAG,OAAA,QAAAH,EAAmB,IAAAI,EAAAd,EAAA,CAAA,IAAAI,GAAAJ,OAAAG,GAQNW,EAAA,CAAAX,EAAAA,EAAAC,EAAAA,CAAAA,EAGRJ,KAAAI,EAAAJ,KAAAG,EAAAH,KAAAc,GAAAA,EAAAd,EAAA,CAAA,EAAA,IAAAe,EAAAf,EAAA,CAAA,IAAAW,EAAAK,UAIaD,EAAA,CAAAC,SAAYL,EAAOK,QAAAA,EAAWhB,EAAA,CAAA,EAAAW,EAAAK,SAAAhB,KAAAe,GAAAA,EAAAf,EAAA,CAAA,EAAA,IAAAiB,EAAAjB,EAAA,CAAA,IAAAe,GAAAf,OAAAI,GAAAJ,EAAA,CAAA,IAAAG,GAH/Bc,EAAA,CAAAd,EAAAA,EAAAC,EAAAA,EAAAc,WAGCH,CAAAA,EACbf,KAAAe,EAAAf,KAAAI,EAAAJ,KAAAG,EAAAH,KAAAiB,GAAAA,EAAAjB,EAAA,CAAA,EAAA,IAAAmB,EAAAnB,EAAA,CAAA,IAAAc,GAAAd,QAAAiB,GATOE,EAAA,CAAAC,QACCN,EAGRO,YACYJ,CAAAA,EAKdjB,KAAAc,EAAAd,MAAAiB,EAAAjB,MAAAmB,GAAAA,EAAAnB,EAAA,EAAA,EAEQ,MAAAsB,EAAAV,EAAA,cAAA,UAAoC,IAAAW,EAAAvB,EAAA,EAAA,IAAAW,E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AA,EAAeC,OAAAA,EAC/C6B,SAAAA,CAAAA,CAoBF,EAAgBrC,MAAAQ,EAAAR,MAAAqC,EAAArC,MAAAO,EAAAP,MAAAuC,GAAAA,EAAAvC,EAAA,EAAA,EAAA,IAAAwC,EAAA,OAAAxC,EAAA,EAAA,IAAAuC,GAAAvC,EAAA,EAAA,IAAAmB,GAAAnB,EAAA,EAAA,IAAAsB,GAAAtB,EAAA,EAAA,IAAAuB,GAAAvB,QAAAI,GAtClBoC,EAAAF,EAAAA,kBAAAA,IAAAG,EAAAA,OAAA,EAAA,CAEY,SAAAtB,EAWF,QAAA,UACC,QAAAG,EACH,KAAAC,EAENgB,YAhBKnC,CAsCP,EAAWJ,MAAAuC,EAAAvC,MAAAmB,EAAAnB,MAAAsB,EAAAtB,MAAAuB,EAAAvB,MAAAI,EAAAJ,MAAAwC,GAAAA,EAAAxC,EAAA,EAAA,EAvCXwC,CAuCW"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { c as E, m as R, j as y } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
-
import { m as Y } from "./proxy-BxkFHwUw.js";
|
|
3
|
-
function k(V) {
|
|
4
|
-
const t = E.c(35), {
|
|
5
|
-
value: h,
|
|
6
|
-
y: i,
|
|
7
|
-
x: e,
|
|
8
|
-
style: g,
|
|
9
|
-
className: j,
|
|
10
|
-
width: w,
|
|
11
|
-
height: v,
|
|
12
|
-
alignment: N,
|
|
13
|
-
animate: l,
|
|
14
|
-
isInView: A
|
|
15
|
-
} = V, d = N === void 0 ? "right" : N;
|
|
16
|
-
let n;
|
|
17
|
-
t[0] !== e || t[1] !== i ? (n = {
|
|
18
|
-
y: i,
|
|
19
|
-
x: e
|
|
20
|
-
}, t[0] = e, t[1] = i, t[2] = n) : n = t[2];
|
|
21
|
-
let s;
|
|
22
|
-
t[3] !== l.duration ? (s = {
|
|
23
|
-
duration: l.duration
|
|
24
|
-
}, t[3] = l.duration, t[4] = s) : s = t[4];
|
|
25
|
-
let a;
|
|
26
|
-
t[5] !== s || t[6] !== e || t[7] !== i ? (a = {
|
|
27
|
-
y: i,
|
|
28
|
-
x: e,
|
|
29
|
-
transition: s
|
|
30
|
-
}, t[5] = s, t[6] = e, t[7] = i, t[8] = a) : a = t[8];
|
|
31
|
-
let r;
|
|
32
|
-
t[9] !== n || t[10] !== a ? (r = {
|
|
33
|
-
initial: n,
|
|
34
|
-
whileInView: a
|
|
35
|
-
}, t[9] = n, t[10] = a, t[11] = r) : r = t[11];
|
|
36
|
-
const b = A ? "whileInView" : "initial";
|
|
37
|
-
let o;
|
|
38
|
-
t[12] !== l.duration ? (o = {
|
|
39
|
-
opacity: 0,
|
|
40
|
-
transition: {
|
|
41
|
-
duration: l.duration
|
|
42
|
-
}
|
|
43
|
-
}, t[12] = l.duration, t[13] = o) : o = t[13];
|
|
44
|
-
let u;
|
|
45
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
46
|
-
display: "flex",
|
|
47
|
-
flexDirection: "column",
|
|
48
|
-
justifyContent: "center",
|
|
49
|
-
height: "100%"
|
|
50
|
-
}, t[14] = u) : u = t[14];
|
|
51
|
-
const I = `text-${d}`;
|
|
52
|
-
let c;
|
|
53
|
-
t[15] !== j || t[16] !== I ? (c = R("fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none", I, j), t[15] = j, t[16] = I, t[17] = c) : c = t[17];
|
|
54
|
-
let f;
|
|
55
|
-
t[18] !== d || t[19] !== g ? (f = {
|
|
56
|
-
textAlign: d,
|
|
57
|
-
padding: "0 6px",
|
|
58
|
-
...g
|
|
59
|
-
}, t[18] = d, t[19] = g, t[20] = f) : f = t[20];
|
|
60
|
-
let m;
|
|
61
|
-
t[21] !== f || t[22] !== c || t[23] !== h ? (m = /* @__PURE__ */ y.jsx("div", { className: "flex flex-col justify-center h-full", style: u, children: /* @__PURE__ */ y.jsx("p", { className: c, style: f, children: h }) }), t[21] = f, t[22] = c, t[23] = h, t[24] = m) : m = t[24];
|
|
62
|
-
let x;
|
|
63
|
-
t[25] !== v || t[26] !== m || t[27] !== w ? (x = /* @__PURE__ */ y.jsx("foreignObject", { y: 0, x: 0, width: w, height: v, children: m }), t[25] = v, t[26] = m, t[27] = w, t[28] = x) : x = t[28];
|
|
64
|
-
let p;
|
|
65
|
-
return t[29] !== x || t[30] !== r || t[31] !== b || t[32] !== o || t[33] !== e ? (p = /* @__PURE__ */ y.jsx(Y.g, { variants: r, initial: "initial", animate: b, exit: o, children: x }, e), t[29] = x, t[30] = r, t[31] = b, t[32] = o, t[33] = e, t[34] = p) : p = t[34], p;
|
|
66
|
-
}
|
|
67
|
-
export {
|
|
68
|
-
k as Y
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=YAxesLabels-Dnnng49-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"YAxesLabels-Dnnng49-.js","sources":["../src/Components/Elements/Axes/YAxesLabels.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { motion } from 'motion/react';\r\n\r\nimport { AnimateDataType } from '@/Types';\r\n\r\ninterface Props {\r\n value: number | string;\r\n y: number;\r\n x: number;\r\n width: number;\r\n height: number;\r\n style?: React.CSSProperties;\r\n className?: string;\r\n alignment?: 'left' | 'right' | 'center';\r\n animate: AnimateDataType;\r\n isInView: boolean;\r\n}\r\n\r\nexport function YAxesLabels(props: Props) {\r\n const {\r\n value,\r\n y,\r\n x,\r\n style,\r\n className,\r\n width,\r\n height,\r\n alignment = 'right',\r\n animate,\r\n isInView,\r\n } = props;\r\n return (\r\n <motion.g\r\n key={x}\r\n variants={{\r\n initial: {\r\n y,\r\n x,\r\n },\r\n whileInView: {\r\n y,\r\n x,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={width} height={height}>\r\n <div\r\n className='flex flex-col justify-center h-full'\r\n style={{\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n height: '100%',\r\n }}\r\n >\r\n <p\r\n className={cn(\r\n 'fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none',\r\n `text-${alignment}`,\r\n className,\r\n )}\r\n style={{ textAlign: alignment, padding: '0 6px', ...style }}\r\n >\r\n {value}\r\n </p>\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n );\r\n}\r\n"],"names":["YAxesLabels","props","$","_c","value","y","x","style","className","width","height","alignment","t0","animate","isInView","undefined","t1","t2","duration","t3","transition","t4","initial","whileInView","t5","t6","opacity","t7","Symbol","for","display","flexDirection","justifyContent","t8","t9","cn","t10","textAlign","padding","t11","jsx","t12","t13","motion"],"mappings":";;AAkBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,OAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,QAAAA;AAAAA,IAAAC,WAAAC;AAAAA,IAAAC,SAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAWIb,GAHFU,IAAAC,MAAAG,SAAA,UAAAH;AAAmB,MAAAI;AAAA,EAAAd,EAAA,CAAA,MAAAI,KAAAJ,SAAAG,KAQNW,IAAA;AAAA,IAAAX,GAAAA;AAAAA,IAAAC,GAAAA;AAAAA,EAAAA,GAGRJ,OAAAI,GAAAJ,OAAAG,GAAAH,OAAAc,KAAAA,IAAAd,EAAA,CAAA;AAAA,MAAAe;AAAA,EAAAf,EAAA,CAAA,MAAAW,EAAAK,YAIaD,IAAA;AAAA,IAAAC,UAAYL,EAAOK;AAAAA,EAAAA,GAAWhB,EAAA,CAAA,IAAAW,EAAAK,UAAAhB,O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