@undp/data-viz 1.4.1 → 1.4.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/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +21 -21
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +7 -7
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +5 -5
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +14 -14
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +9 -9
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +9 -9
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/CopyTextButton.cjs +7 -7
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +4 -4
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/DataCards.cjs +9 -9
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +93 -93
- package/dist/DataCards.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +18 -18
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +8 -8
- package/dist/{DropdownSelect-0I2QxaVy.cjs → DropdownSelect-BmE5JaeE.cjs} +6 -6
- package/dist/{DropdownSelect-0I2QxaVy.cjs.map → DropdownSelect-BmE5JaeE.cjs.map} +1 -1
- package/dist/{DropdownSelect-CDC9lEqU.js → DropdownSelect-CeHog_ih.js} +4 -4
- package/dist/{DropdownSelect-CDC9lEqU.js.map → DropdownSelect-CeHog_ih.js.map} +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +15 -15
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +13 -13
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.js +2 -2
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +2 -2
- package/dist/{GraphEl-B6SoGRFW.cjs → GraphEl-B5gAX1IQ.cjs} +2 -2
- package/dist/{GraphEl-B6SoGRFW.cjs.map → GraphEl-B5gAX1IQ.cjs.map} +1 -1
- package/dist/{GraphEl-Cw2tDUb3.js → GraphEl-BdIyscdt.js} +3 -3
- package/dist/{GraphEl-Cw2tDUb3.js.map → GraphEl-BdIyscdt.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +4 -4
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +10 -10
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +21 -21
- package/dist/{Modal-CUU6ZK3U.js → Modal-DVVwpKhP.js} +2 -2
- package/dist/{Modal-CUU6ZK3U.js.map → Modal-DVVwpKhP.js.map} +1 -1
- package/dist/{Modal-C_dl0EtQ.cjs → Modal-tXZlLE5s.cjs} +4 -4
- package/dist/{Modal-C_dl0EtQ.cjs.map → Modal-tXZlLE5s.cjs.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +3 -3
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +3 -3
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +21 -21
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +19 -19
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +12 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +3 -3
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.js +2 -2
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +8 -8
- package/dist/{ReferenceLine-CuFMk0cI.cjs → ReferenceLine-CFVBBN__.cjs} +2 -2
- package/dist/{ReferenceLine-CuFMk0cI.cjs.map → ReferenceLine-CFVBBN__.cjs.map} +1 -1
- package/dist/{ReferenceLine-C1GpoG9d.js → ReferenceLine-CfAW3vKJ.js} +2 -2
- package/dist/{ReferenceLine-C1GpoG9d.js.map → ReferenceLine-CfAW3vKJ.js.map} +1 -1
- package/dist/{RegressionLine-BFwDCTUU.js → RegressionLine-mH7UKOPi.js} +3 -3
- package/dist/{RegressionLine-BFwDCTUU.js.map → RegressionLine-mH7UKOPi.js.map} +1 -1
- package/dist/{RegressionLine-7_rKTHN_.cjs → RegressionLine-xKdiJ8sw.cjs} +2 -2
- package/dist/{RegressionLine-7_rKTHN_.cjs.map → RegressionLine-xKdiJ8sw.cjs.map} +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +4 -4
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +13 -13
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.js +2 -2
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +20 -20
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +4 -4
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +7 -7
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +9 -9
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +2 -2
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +4 -4
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +3 -3
- package/dist/{XAxesLabels-DQFo_z2R.js → XAxesLabels-CaV2q-6H.js} +2 -2
- package/dist/{XAxesLabels-DQFo_z2R.js.map → XAxesLabels-CaV2q-6H.js.map} +1 -1
- package/dist/{XAxesLabels-CJMQbfVy.cjs → XAxesLabels-OjBNl_lS.cjs} +2 -2
- package/dist/{XAxesLabels-CJMQbfVy.cjs.map → XAxesLabels-OjBNl_lS.cjs.map} +1 -1
- package/dist/{YAxesLabels-H5-002X5.js → YAxesLabels-CPGZjmZJ.js} +2 -2
- package/dist/{YAxesLabels-H5-002X5.js.map → YAxesLabels-CPGZjmZJ.js.map} +1 -1
- package/dist/{YAxesLabels-BXLTX7AI.cjs → YAxesLabels-D8IydyZj.cjs} +2 -2
- package/dist/{YAxesLabels-BXLTX7AI.cjs.map → YAxesLabels-D8IydyZj.cjs.map} +1 -1
- package/dist/{checkIfMultiple-Do4kADNr.cjs → checkIfMultiple-BXbHUCWM.cjs} +6 -6
- package/dist/{checkIfMultiple-Do4kADNr.cjs.map → checkIfMultiple-BXbHUCWM.cjs.map} +1 -1
- package/dist/{checkIfMultiple-CYp3vADF.js → checkIfMultiple-ChTJk2Tk.js} +5 -5
- package/dist/{checkIfMultiple-CYp3vADF.js.map → checkIfMultiple-ChTJk2Tk.js.map} +1 -1
- package/dist/{customArea-CaxScFmW.js → customArea-B-dWU0zZ.js} +2 -2
- package/dist/{customArea-CaxScFmW.js.map → customArea-B-dWU0zZ.js.map} +1 -1
- package/dist/{customArea-BYNyxAkm.cjs → customArea-CK768gCn.cjs} +2 -2
- package/dist/{customArea-BYNyxAkm.cjs.map → customArea-CK768gCn.cjs.map} +1 -1
- package/dist/{fetchAndParseData-Bcmr659B.js → fetchAndParseData-4gsYTy6_.js} +3 -3
- package/dist/fetchAndParseData-4gsYTy6_.js.map +1 -0
- package/dist/{fetchAndParseData-DmgQtB9n.cjs → fetchAndParseData-CQyVGCul.cjs} +6 -6
- package/dist/fetchAndParseData-CQyVGCul.cjs.map +1 -0
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/index-BW8iNx7E.cjs +10 -0
- package/dist/index-BW8iNx7E.cjs.map +1 -0
- package/dist/index-CNvov0eg.js +122 -0
- package/dist/index-CNvov0eg.js.map +1 -0
- package/dist/{index-D_n8aamX.cjs → index-CZLvTu6p.cjs} +2 -2
- package/dist/{index-D_n8aamX.cjs.map → index-CZLvTu6p.cjs.map} +1 -1
- package/dist/{index-n_RI8T0n.js → index-Cdcfp4nk.js} +2 -2
- package/dist/{index-n_RI8T0n.js.map → index-Cdcfp4nk.js.map} +1 -1
- package/dist/{index-BVnYktl4.js → index-DGAaLNu9.js} +2 -2
- package/dist/{index-BVnYktl4.js.map → index-DGAaLNu9.js.map} +1 -1
- package/dist/{index-CylX-pWB.cjs → index-DNj994Pv.cjs} +2 -2
- package/dist/{index-CylX-pWB.cjs.map → index-DNj994Pv.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/proxy-BHRoeZgd.cjs +2 -0
- package/dist/proxy-BHRoeZgd.cjs.map +1 -0
- package/dist/{proxy-DJxJg1kD.js → proxy-CkpFesk1.js} +4123 -4075
- package/dist/proxy-CkpFesk1.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +2 -2
- package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs → transformDataForGraphFromFile-B1A0AS-Z.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs.map → transformDataForGraphFromFile-B1A0AS-Z.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CA0rw80A.js → transformDataForGraphFromFile-BCjsizvb.js} +2 -2
- package/dist/{transformDataForGraphFromFile-CA0rw80A.js.map → transformDataForGraphFromFile-BCjsizvb.js.map} +1 -1
- package/dist/{use-in-view-BCmzDU2O.cjs → use-in-view-sQJZ_xDO.cjs} +2 -2
- package/dist/use-in-view-sQJZ_xDO.cjs.map +1 -0
- package/dist/{use-in-view-BAHrBy6b.js → use-in-view-yS6jzJAp.js} +2 -2
- package/dist/use-in-view-yS6jzJAp.js.map +1 -0
- package/dist/x-BBpi7a_7-Dz2vKSfu.cjs +27 -0
- package/dist/x-BBpi7a_7-Dz2vKSfu.cjs.map +1 -0
- package/dist/x-BBpi7a_7-WVdj1j6r.js +106 -0
- package/dist/x-BBpi7a_7-WVdj1j6r.js.map +1 -0
- package/package.json +50 -51
- package/dist/fetchAndParseData-Bcmr659B.js.map +0 -1
- package/dist/fetchAndParseData-DmgQtB9n.cjs.map +0 -1
- package/dist/index-BxAUvrua.js +0 -120
- package/dist/index-BxAUvrua.js.map +0 -1
- package/dist/index-DVOJ7vxH.cjs +0 -10
- package/dist/index-DVOJ7vxH.cjs.map +0 -1
- package/dist/proxy-DJxJg1kD.js.map +0 -1
- package/dist/proxy-PQd2AItT.cjs +0 -2
- package/dist/proxy-PQd2AItT.cjs.map +0 -1
- package/dist/use-in-view-BAHrBy6b.js.map +0 -1
- package/dist/use-in-view-BCmzDU2O.cjs.map +0 -1
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +0 -27
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +0 -1
- package/dist/x-CnsEH4Ox-DDvAJndW.js +0 -101
- package/dist/x-CnsEH4Ox-DDvAJndW.js.map +0 -1
package/dist/ChoroplethMap.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-DDoeWRVt.cjs"),d=require("react"),je=require("./getSliderMarks-CtsEXiLV.cjs"),we=require("./Spinner-DA6Z5E4n.cjs"),be=require("./parse-hMnG_lRV.cjs"),Re=require("./index-CZbIGs8q.cjs"),$e=require("./index-BXns0-ng.cjs"),T=require("./zoom-Lo7IAUfC.cjs"),Ce=require("./Modal-C_dl0EtQ.cjs"),ke=require("./Typography-k-kOjICQ.cjs"),Ne=require("./numberFormattingFunction-02t-wJta.cjs"),Se=require("./Tooltip-n8z5bfav.cjs"),Me=require("./string2HTML-D2Avudmb.cjs"),qe=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ee=require("./index-BW_-wD2k.cjs"),De=require("./use-in-view-BCmzDU2O.cjs"),Oe=require("./ordinal-BOeNbyae.cjs"),Pe=require("./threshold-DNsSUf8Q.cjs"),ve=require("./select-Bnfk0lJx.cjs"),ue=require("./proxy-PQd2AItT.cjs"),Ie=require("./index-DVOJ7vxH.cjs"),Le=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),de=require("./Colors.cjs"),ze=require("./fetchAndParseData-DmgQtB9n.cjs"),We=require("./getUniqValue-CHqgSss5.cjs"),Ve=require("./getJenks-TWQvbuOz.cjs"),Be=require("./init-DU0ybBc_.cjs");function Fe(pe){const{data:E,colorDomain:h,colors:l,mapData:j,colorLegendTitle:B,categorical:q,height:x,width:c,scale:ae,centerPoint:z,tooltip:ie,mapBorderWidth:D,mapBorderColor:F,mapNoDataColor:Y,onSeriesMouseOver:J,showColorScale:me,zoomScaleExtend:xe,zoomTranslateExtend:O,highlightedIds:H,onSeriesMouseClick:y,mapProperty:A,resetSelectionOnDoubleClick:he,detailsOnClick:$,styles:ge,classNames:ye,mapProjection:U,zoomInteraction:W,animate:b,dimmedOpacity:G,customLayers:se}=pe,[k,C]=d.useState(void 0),K=d.useRef(null),[Z,v]=d.useState(!(c<680)),[N,Q]=d.useState(void 0),[X,ee]=d.useState(void 0),[S,w]=d.useState(void 0),[ne,te]=d.useState(void 0),P=d.useRef(null),re=De.useInView(P,{once:b.once,amount:b.amount}),le=d.useRef(null),f=q?Oe.ordinal().domain(h).range(l):Pe.threshold().domain(h).range(l);d.useEffect(()=>{const r=ve.select(le.current),n=ve.select(P.current),p=a=>{if(W==="noZoom")return!1;if(W==="button")return!a.type.includes("wheel");const s=a.type==="wheel",e=a.type.startsWith("touch"),o=a.type==="mousedown"||a.type==="mousemove";return e?!0:s?W==="scroll"?!0:a.ctrlKey:o&&!a.button&&!a.ctrlKey},i=T.zoom().scaleExtent(xe).translateExtent(O||[[-20,-20],[c+20,x+20]]).filter(p).on("zoom",({transform:a})=>{r.attr("transform",a)});n.call(i),K.current=i},[x,c,W]);const g=T.turf_bbox_default(j),I=T.turf_centroid_default(j),oe=g[2]-g[0],ce=g[3]-g[1],V=c*190/960*360/oe,fe=x*190/678*180/ce,u=ae*Math.min(V,fe),R=U==="mercator"?T.geoMercator().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):U==="equalEarth"?T.geoEqualEarth().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):U==="naturalEarth"?T.geoNaturalEarth1().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):U==="orthographic"?T.geoOrthographic().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):T.geoAlbersUsa().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u),_=r=>{if(!P.current||!K.current)return;ve.select(P.current).call(K.current.scaleBy,r==="in"?1.2:1/1.2)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:"relative",children:[t.jsxRuntimeExports.jsx(ue.motion.svg,{width:`${c}px`,height:`${x}px`,viewBox:`0 0 ${c} ${x}`,ref:P,direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{ref:le,children:[se.filter(r=>r.position==="before").map(r=>r.layer),j.features.map((r,n)=>E.findIndex(i=>i.id===r.properties[A])!==-1?null:t.jsxRuntimeExports.jsx("g",{opacity:k?G:H.length!==0?H.indexOf(r.properties[A])!==-1?1:G:1,children:r.geometry.type==="MultiPolygon"?r.geometry.coordinates.map((i,a)=>{let s="";return i.forEach(e=>{let o=" M";e.forEach((m,L)=>{const M=R([m[0],m[1]]);L!==e.length-1?o=`${o}${M[0]} ${M[1]}L`:o=`${o}${M[0]} ${M[1]}`}),s+=o}),t.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:F,strokeWidth:D,fill:Y}},a)}):r.geometry.coordinates.map((i,a)=>{let s="M";return i.forEach((e,o)=>{const m=R([e[0],e[1]]);o!==i.length-1?s=`${s}${m[0]} ${m[1]}L`:s=`${s}${m[0]} ${m[1]}`}),t.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:F,strokeWidth:D,fill:Y}},a)})},n)),t.jsxRuntimeExports.jsx(Ie.AnimatePresence,{children:E.map(r=>{const n=j.features.findIndex(i=>r.id===i.properties[A]),p=qe.checkIfNullOrUndefined(r.x)?Y:f(r.x);return t.jsxRuntimeExports.jsx(ue.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:k?k===p?1:G:H.length!==0?H.indexOf(r.id)!==-1?1:G:1,transition:{duration:b.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},onMouseEnter:i=>{ee(r),te(i.clientY),w(i.clientX),J?.(r)},onMouseMove:i=>{ee(r),te(i.clientY),w(i.clientX)},onMouseLeave:()=>{ee(void 0),w(void 0),te(void 0),J?.(void 0)},onClick:()=>{(y||$)&&($e.isEqual(N,r)&&he?(Q(void 0),y?.(void 0)):(Q(r),y?.(r)))},children:n===-1?null:j.features[n].geometry.type==="MultiPolygon"?j.features[n].geometry.coordinates.map((i,a)=>{let s="";return i.forEach(e=>{let o=" M";e.forEach((m,L)=>{const M=R([m[0],m[1]]);L!==e.length-1?o=`${o}${M[0]} ${M[1]}L`:o=`${o}${M[0]} ${M[1]}`}),s+=o}),t.jsxRuntimeExports.jsx(ue.motion.path,{d:s,variants:{initial:{fill:p,opacity:0},whileInView:{fill:p,opacity:1,transition:{duration:b.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},style:{stroke:F,strokeWidth:D}},`${r.id}-${a}`)}):j.features[n].geometry.coordinates.map((i,a)=>{let s="M";return i.forEach((e,o)=>{const m=R([e[0],e[1]]);o!==i.length-1?s=`${s}${m[0]} ${m[1]}L`:s=`${s}${m[0]} ${m[1]}`}),t.jsxRuntimeExports.jsx(ue.motion.path,{d:s,variants:{initial:{fill:p,opacity:0},whileInView:{fill:p,opacity:1,transition:{duration:b.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},style:{stroke:F,strokeWidth:D}},`${r.id}-${a}`)})},r.id)})}),X?j.features.filter(r=>r.properties[A]===X.id).map((r,n)=>t.jsxRuntimeExports.jsx("g",{children:r.geometry.type==="MultiPolygon"?r.geometry.coordinates.map((p,i)=>{let a="";return p.forEach(s=>{let e=" M";s.forEach((o,m)=>{const L=R([o[0],o[1]]);m!==s.length-1?e=`${e}${L[0]} ${L[1]}L`:e=`${e}${L[0]} ${L[1]}`}),a+=e}),t.jsxRuntimeExports.jsx("path",{d:a,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},i)}):r.geometry.coordinates.map((p,i)=>{let a="M";return p.forEach((s,e)=>{const o=R([s[0],s[1]]);e!==p.length-1?a=`${a}${o[0]} ${o[1]}L`:a=`${a}${o[0]} ${o[1]}`}),t.jsxRuntimeExports.jsx("path",{d:a,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},i)})},n)):null,se.filter(r=>r.position==="after").map(r=>r.layer)]})}),me===!1?null:t.jsxRuntimeExports.jsx("div",{className:"absolute left-4 bottom-4",children:Z?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{v(!1)},children:t.jsxRuntimeExports.jsx(Ee.X,{})}),t.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)",width:q?void 0:"340px"},children:[B&&B!==""?t.jsxRuntimeExports.jsx(ke.u,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:B}):null,q?t.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:h.map((r,n)=>t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{C(l[n%l.length])},onMouseLeave:()=>{C(void 0)},children:[t.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:l[n%l.length]}}),t.jsxRuntimeExports.jsx(ke.u,{size:"sm",marginBottom:"none",leading:"none",children:r})]},n))}):t.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{children:[h.map((r,n)=>t.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{C(l[n])},onMouseLeave:()=>{C(void 0)},className:"cursor-pointer",children:[t.jsxRuntimeExports.jsx("rect",{x:n*320/l.length+1,y:1,width:320/l.length-2,height:8,className:k===l[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:l[n],...k===l[n]?{}:{stroke:l[n]}}}),t.jsxRuntimeExports.jsx("text",{x:(n+1)*320/l.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Ne.numberFormattingFunction(r,"NA")})]},n)),t.jsxRuntimeExports.jsx("g",{children:t.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{C(l[h.length])},onMouseLeave:()=>{C(void 0)},x:h.length*320/l.length+1,y:1,width:320/l.length-2,height:8,className:`cursor-pointer ${k===l[h.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:l[h.length],...k===l[h.length]?{}:{stroke:l[h.length]}}})})]})})]})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{v(!0)},children:t.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),W==="button"&&t.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col",children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>_("in"),className:"leading-0 px-2 py-3.5 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-400 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),t.jsxRuntimeExports.jsx("button",{onClick:()=>_("out"),className:"leading-0 px-2 py-3.5 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-400 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),$&&N!==void 0?t.jsxRuntimeExports.jsx(Ce.X,{open:N!==void 0,onClose:()=>{Q(void 0)},children:t.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:Me.string2HTML($,N)}:void 0,children:typeof $=="function"?$(N):null})}):null,X&&ie&&S&&ne?t.jsxRuntimeExports.jsx(Se.Tooltip,{data:X,body:ie,xPos:S,yPos:ne,backgroundStyle:ge?.tooltip,className:ye?.tooltip}):null]})}function He(pe){const{data:E,mapData:h="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json",graphTitle:l,colors:j,sources:B,graphDescription:q,height:x,width:c,footNote:ae="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.",colorDomain:z,colorLegendTitle:ie,scaleType:D="threshold",scale:F=.95,centerPoint:Y,padding:J,mapBorderWidth:me=.5,mapNoDataColor:xe=de.Colors.light.graphNoData,backgroundColor:O=!1,mapBorderColor:H=de.Colors.light.grays["gray-500"],relativeHeight:y,tooltip:A,onSeriesMouseOver:he,isWorldMap:$=!0,showColorScale:ge=!0,zoomScaleExtend:ye=[.8,6],zoomTranslateExtend:U,graphID:W,highlightedIds:b=[],onSeriesMouseClick:G,mapProperty:se="ISO3",graphDownload:k=!1,dataDownload:C=!1,showAntarctica:K=!1,language:Z="en",minHeight:v=0,theme:N="light",ariaLabel:Q,resetSelectionOnDoubleClick:X=!0,detailsOnClick:ee,styles:S,classNames:w,mapProjection:ne,zoomInteraction:te="button",animate:P=!1,dimmedOpacity:re=.3,customLayers:le=[],timeline:f={enabled:!1,autoplay:!1,showOnlyActiveDate:!0}}=pe,[g,I]=d.useState(0),[oe,ce]=d.useState(0),[V,fe]=d.useState(f.autoplay),u=je.sort(Re.uniqBy(E.filter(e=>e.date!==void 0&&e.date!==null),e=>e.date).map(e=>be.parse(`${e.date}`,f.dateFormat||"yyyy",new Date).getTime()),(e,o)=>Be.ascending(e,o)),[R,_]=d.useState(f.autoplay?0:u.length-1),[r,n]=d.useState(void 0),p=d.useRef(null),i=d.useRef(null);d.useEffect(()=>{const e=new ResizeObserver(o=>{I(c||o[0].target.clientWidth||760),ce(x||o[0].target.clientHeight||480)});return p.current&&(ce(p.current.clientHeight||480),I(p.current.clientWidth||760),c||e.observe(p.current)),()=>e.disconnect()},[c,x]),d.useEffect(()=>{typeof h=="string"?ze.fetchAndParseJSON(h).then(o=>{n(o)}):n(h)},[h]);const a=z||(D==="categorical"?We.getUniqValue(E,"x"):Ve.getJenks(E.map(e=>e.x),j?.length||4));d.useEffect(()=>{const e=setInterval(()=>{_(o=>o<u.length-1?o+1:0)},(f.speed||2)*1e3);return V||clearInterval(e),()=>clearInterval(e)},[u,V,f.speed]);const s=je.getSliderMarks(u,R,f.showOnlyActiveDate,f.dateFormat||"yyyy");return t.jsxRuntimeExports.jsx("div",{className:`${N||"light"} flex ${c?"w-fit grow-0":"w-full grow"}`,dir:Z==="he"||Z==="ar"?"rtl":void 0,children:t.jsxRuntimeExports.jsx("div",{className:t.mo(`${O?O===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${Z||"en"}`,w?.graphContainer),style:{...S?.graphContainer||{},...O&&O!==!0?{backgroundColor:O}:{}},id:W,ref:i,"aria-label":Q||`${l?`The graph shows ${l}. `:""}This is a choropleth map where geographic areas are colored in proportion to a specific variable.${q?` ${q}`:""}`,children:t.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:O?J||"1rem":J||0},children:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[l||q||k||C?t.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:S?.title,description:S?.description},classNames:{title:w?.title,description:w?.description},graphTitle:l,graphDescription:q,width:c,graphDownload:k?i.current:void 0,dataDownload:C?E.map(e=>e.data).filter(e=>e!==void 0).length>0?E.map(e=>e.data).filter(e=>e!==void 0):E.filter(e=>e!==void 0):null}):null,f.enabled&&u.length>0&&s?t.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[t.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{fe(!V)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":V?"Click to pause animation":"Click to play animation",children:V?t.jsxRuntimeExports.jsx(Ee.Pause,{}):t.jsxRuntimeExports.jsx(Ee.Play,{})}),t.jsxRuntimeExports.jsx(je.xr,{min:u[0],max:u[u.length-1],marks:s,step:null,defaultValue:u[u.length-1],value:u[R],onChangeComplete:e=>{_(u.indexOf(e))},onChange:e=>{_(u.indexOf(e))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:p,"aria-label":"Map area",children:(c||g)&&(x||oe)&&r?t.jsxRuntimeExports.jsx(Fe,{data:E.filter(e=>f.enabled?e.date===be.format(new Date(u[R]),f.dateFormat||"yyyy"):e),mapData:K?r:{...r,features:r.features.filter(e=>e.properties.NAME!=="Antarctica")},colorDomain:a,width:c||g,height:Math.max(v,x||(y?v?(c||g)*y>v?(c||g)*y:v:(c||g)*y:oe)),scale:F,centerPoint:Y,colors:j||(D==="categorical"?de.Colors[N].sequentialColors[`neutralColorsx0${a.length}`]:de.Colors[N].sequentialColors[`neutralColorsx0${a.length+1}`]),colorLegendTitle:ie,mapBorderWidth:me,mapNoDataColor:xe,categorical:D==="categorical",mapBorderColor:H,tooltip:A,onSeriesMouseOver:he,isWorldMap:$,showColorScale:ge,zoomScaleExtend:ye,zoomTranslateExtend:U,onSeriesMouseClick:G,mapProperty:se,highlightedIds:b,resetSelectionOnDoubleClick:X,styles:S,classNames:w,detailsOnClick:ee,mapProjection:ne||($?"naturalEarth":"mercator"),zoomInteraction:te,dimmedOpacity:re,animate:P===!0?{duration:.5,once:!0,amount:.5}:P||{duration:0,once:!0,amount:0},customLayers:le}):t.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(v,x||(y?v?(c||g)*y>v?(c||g)*y:v:(c||g)*y:oe))}px`},className:"flex items-center justify-center",children:t.jsxRuntimeExports.jsx(we.y,{"aria-label":"Loading graph"})})}),B||ae?t.jsxRuntimeExports.jsx(Le.GraphFooter,{styles:{footnote:S?.footnote,source:S?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:B,footNote:ae,width:c}):null]})})})})}exports.ChoroplethMap=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CHPV5EwG-DDoeWRVt.cjs"),d=require("react"),je=require("./getSliderMarks-CtsEXiLV.cjs"),we=require("./Spinner-DA6Z5E4n.cjs"),be=require("./parse-hMnG_lRV.cjs"),Re=require("./index-CZbIGs8q.cjs"),$e=require("./index-BXns0-ng.cjs"),T=require("./zoom-Lo7IAUfC.cjs"),Ce=require("./Modal-tXZlLE5s.cjs"),ke=require("./Typography-k-kOjICQ.cjs"),Ne=require("./numberFormattingFunction-02t-wJta.cjs"),Se=require("./Tooltip-n8z5bfav.cjs"),Me=require("./string2HTML-D2Avudmb.cjs"),qe=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ee=require("./index-BW_-wD2k.cjs"),De=require("./ordinal-BOeNbyae.cjs"),Oe=require("./threshold-DNsSUf8Q.cjs"),ve=require("./select-Bnfk0lJx.cjs"),Pe=require("./use-in-view-sQJZ_xDO.cjs"),ue=require("./proxy-BHRoeZgd.cjs"),Ie=require("./index-BW8iNx7E.cjs"),Le=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),de=require("./Colors.cjs"),ze=require("./fetchAndParseData-CQyVGCul.cjs"),We=require("./getUniqValue-CHqgSss5.cjs"),Ve=require("./getJenks-TWQvbuOz.cjs"),Be=require("./init-DU0ybBc_.cjs");function Fe(pe){const{data:E,colorDomain:h,colors:l,mapData:j,colorLegendTitle:B,categorical:q,height:x,width:c,scale:ae,centerPoint:z,tooltip:ie,mapBorderWidth:D,mapBorderColor:F,mapNoDataColor:Y,onSeriesMouseOver:J,showColorScale:me,zoomScaleExtend:xe,zoomTranslateExtend:O,highlightedIds:H,onSeriesMouseClick:y,mapProperty:A,resetSelectionOnDoubleClick:he,detailsOnClick:$,styles:ge,classNames:ye,mapProjection:U,zoomInteraction:W,animate:b,dimmedOpacity:G,customLayers:se}=pe,[k,C]=d.useState(void 0),K=d.useRef(null),[Z,v]=d.useState(!(c<680)),[N,Q]=d.useState(void 0),[X,ee]=d.useState(void 0),[S,w]=d.useState(void 0),[ne,te]=d.useState(void 0),P=d.useRef(null),re=Pe.useInView(P,{once:b.once,amount:b.amount}),le=d.useRef(null),f=q?De.ordinal().domain(h).range(l):Oe.threshold().domain(h).range(l);d.useEffect(()=>{const r=ve.select(le.current),n=ve.select(P.current),p=a=>{if(W==="noZoom")return!1;if(W==="button")return!a.type.includes("wheel");const s=a.type==="wheel",e=a.type.startsWith("touch"),o=a.type==="mousedown"||a.type==="mousemove";return e?!0:s?W==="scroll"?!0:a.ctrlKey:o&&!a.button&&!a.ctrlKey},i=T.zoom().scaleExtent(xe).translateExtent(O||[[-20,-20],[c+20,x+20]]).filter(p).on("zoom",({transform:a})=>{r.attr("transform",a)});n.call(i),K.current=i},[x,c,W]);const g=T.turf_bbox_default(j),I=T.turf_centroid_default(j),oe=g[2]-g[0],ce=g[3]-g[1],V=c*190/960*360/oe,fe=x*190/678*180/ce,u=ae*Math.min(V,fe),R=U==="mercator"?T.geoMercator().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):U==="equalEarth"?T.geoEqualEarth().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):U==="naturalEarth"?T.geoNaturalEarth1().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):U==="orthographic"?T.geoOrthographic().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u):T.geoAlbersUsa().rotate([0,0]).center(z||I.geometry.coordinates).translate([c/2,x/2]).scale(u),_=r=>{if(!P.current||!K.current)return;ve.select(P.current).call(K.current.scaleBy,r==="in"?1.2:1/1.2)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:"relative",children:[t.jsxRuntimeExports.jsx(ue.motion.svg,{width:`${c}px`,height:`${x}px`,viewBox:`0 0 ${c} ${x}`,ref:P,direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{ref:le,children:[se.filter(r=>r.position==="before").map(r=>r.layer),j.features.map((r,n)=>E.findIndex(i=>i.id===r.properties[A])!==-1?null:t.jsxRuntimeExports.jsx("g",{opacity:k?G:H.length!==0?H.indexOf(r.properties[A])!==-1?1:G:1,children:r.geometry.type==="MultiPolygon"?r.geometry.coordinates.map((i,a)=>{let s="";return i.forEach(e=>{let o=" M";e.forEach((m,L)=>{const M=R([m[0],m[1]]);L!==e.length-1?o=`${o}${M[0]} ${M[1]}L`:o=`${o}${M[0]} ${M[1]}`}),s+=o}),t.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:F,strokeWidth:D,fill:Y}},a)}):r.geometry.coordinates.map((i,a)=>{let s="M";return i.forEach((e,o)=>{const m=R([e[0],e[1]]);o!==i.length-1?s=`${s}${m[0]} ${m[1]}L`:s=`${s}${m[0]} ${m[1]}`}),t.jsxRuntimeExports.jsx("path",{d:s,style:{stroke:F,strokeWidth:D,fill:Y}},a)})},n)),t.jsxRuntimeExports.jsx(Ie.AnimatePresence,{children:E.map(r=>{const n=j.features.findIndex(i=>r.id===i.properties[A]),p=qe.checkIfNullOrUndefined(r.x)?Y:f(r.x);return t.jsxRuntimeExports.jsx(ue.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:k?k===p?1:G:H.length!==0?H.indexOf(r.id)!==-1?1:G:1,transition:{duration:b.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},onMouseEnter:i=>{ee(r),te(i.clientY),w(i.clientX),J?.(r)},onMouseMove:i=>{ee(r),te(i.clientY),w(i.clientX)},onMouseLeave:()=>{ee(void 0),w(void 0),te(void 0),J?.(void 0)},onClick:()=>{(y||$)&&($e.isEqual(N,r)&&he?(Q(void 0),y?.(void 0)):(Q(r),y?.(r)))},children:n===-1?null:j.features[n].geometry.type==="MultiPolygon"?j.features[n].geometry.coordinates.map((i,a)=>{let s="";return i.forEach(e=>{let o=" M";e.forEach((m,L)=>{const M=R([m[0],m[1]]);L!==e.length-1?o=`${o}${M[0]} ${M[1]}L`:o=`${o}${M[0]} ${M[1]}`}),s+=o}),t.jsxRuntimeExports.jsx(ue.motion.path,{d:s,variants:{initial:{fill:p,opacity:0},whileInView:{fill:p,opacity:1,transition:{duration:b.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},style:{stroke:F,strokeWidth:D}},`${r.id}-${a}`)}):j.features[n].geometry.coordinates.map((i,a)=>{let s="M";return i.forEach((e,o)=>{const m=R([e[0],e[1]]);o!==i.length-1?s=`${s}${m[0]} ${m[1]}L`:s=`${s}${m[0]} ${m[1]}`}),t.jsxRuntimeExports.jsx(ue.motion.path,{d:s,variants:{initial:{fill:p,opacity:0},whileInView:{fill:p,opacity:1,transition:{duration:b.duration}}},initial:"initial",animate:re?"whileInView":"initial",exit:{opacity:0,transition:{duration:b.duration}},style:{stroke:F,strokeWidth:D}},`${r.id}-${a}`)})},r.id)})}),X?j.features.filter(r=>r.properties[A]===X.id).map((r,n)=>t.jsxRuntimeExports.jsx("g",{children:r.geometry.type==="MultiPolygon"?r.geometry.coordinates.map((p,i)=>{let a="";return p.forEach(s=>{let e=" M";s.forEach((o,m)=>{const L=R([o[0],o[1]]);m!==s.length-1?e=`${e}${L[0]} ${L[1]}L`:e=`${e}${L[0]} ${L[1]}`}),a+=e}),t.jsxRuntimeExports.jsx("path",{d:a,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},i)}):r.geometry.coordinates.map((p,i)=>{let a="M";return p.forEach((s,e)=>{const o=R([s[0],s[1]]);e!==p.length-1?a=`${a}${o[0]} ${o[1]}L`:a=`${a}${o[0]} ${o[1]}`}),t.jsxRuntimeExports.jsx("path",{d:a,className:"stroke-primary-gray-700 dark:stroke-primary-gray-300",style:{fill:"none",fillOpacity:0,strokeWidth:"0.5"}},i)})},n)):null,se.filter(r=>r.position==="after").map(r=>r.layer)]})}),me===!1?null:t.jsxRuntimeExports.jsx("div",{className:"absolute left-4 bottom-4",children:Z?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("div",{style:{backgroundColor:"rgba(240,240,240, 0.7)",border:"1px solid var(--gray-400)",borderRadius:"999px",width:"24px",height:"24px",padding:"3px",cursor:"pointer",zIndex:10,position:"absolute",right:"-0.75rem",top:"-0.75rem"},onClick:()=>{v(!1)},children:t.jsxRuntimeExports.jsx(Ee.X,{})}),t.jsxRuntimeExports.jsxs("div",{className:"p-2",style:{backgroundColor:"rgba(240,240,240, 0.7)",width:q?void 0:"340px"},children:[B&&B!==""?t.jsxRuntimeExports.jsx(ke.u,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:B}):null,q?t.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:h.map((r,n)=>t.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",onMouseOver:()=>{C(l[n%l.length])},onMouseLeave:()=>{C(void 0)},children:[t.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:l[n%l.length]}}),t.jsxRuntimeExports.jsx(ke.u,{size:"sm",marginBottom:"none",leading:"none",children:r})]},n))}):t.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:t.jsxRuntimeExports.jsxs("g",{children:[h.map((r,n)=>t.jsxRuntimeExports.jsxs("g",{onMouseOver:()=>{C(l[n])},onMouseLeave:()=>{C(void 0)},className:"cursor-pointer",children:[t.jsxRuntimeExports.jsx("rect",{x:n*320/l.length+1,y:1,width:320/l.length-2,height:8,className:k===l[n]?"stroke-primary-gray-700 dark:stroke-primary-gray-300":"",style:{fill:l[n],...k===l[n]?{}:{stroke:l[n]}}}),t.jsxRuntimeExports.jsx("text",{x:(n+1)*320/l.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:Ne.numberFormattingFunction(r,"NA")})]},n)),t.jsxRuntimeExports.jsx("g",{children:t.jsxRuntimeExports.jsx("rect",{onMouseOver:()=>{C(l[h.length])},onMouseLeave:()=>{C(void 0)},x:h.length*320/l.length+1,y:1,width:320/l.length-2,height:8,className:`cursor-pointer ${k===l[h.length]?"stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300":""}`,style:{fill:l[h.length],...k===l[h.length]?{}:{stroke:l[h.length]}}})})]})})]})]}):t.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{v(!0)},children:t.jsxRuntimeExports.jsx("div",{className:"items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}),W==="button"&&t.jsxRuntimeExports.jsxs("div",{className:"absolute left-4 top-4 flex flex-col",children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>_("in"),className:"leading-0 px-2 py-3.5 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-400 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"+"}),t.jsxRuntimeExports.jsx("button",{onClick:()=>_("out"),className:"leading-0 px-2 py-3.5 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-400 dark:bg-primary-gray-600 dark:text-primary-gray-100",children:"–"})]})]}),$&&N!==void 0?t.jsxRuntimeExports.jsx(Ce.X,{open:N!==void 0,onClose:()=>{Q(void 0)},children:t.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof $=="string"?{__html:Me.string2HTML($,N)}:void 0,children:typeof $=="function"?$(N):null})}):null,X&&ie&&S&&ne?t.jsxRuntimeExports.jsx(Se.Tooltip,{data:X,body:ie,xPos:S,yPos:ne,backgroundStyle:ge?.tooltip,className:ye?.tooltip}):null]})}function He(pe){const{data:E,mapData:h="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json",graphTitle:l,colors:j,sources:B,graphDescription:q,height:x,width:c,footNote:ae="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.",colorDomain:z,colorLegendTitle:ie,scaleType:D="threshold",scale:F=.95,centerPoint:Y,padding:J,mapBorderWidth:me=.5,mapNoDataColor:xe=de.Colors.light.graphNoData,backgroundColor:O=!1,mapBorderColor:H=de.Colors.light.grays["gray-500"],relativeHeight:y,tooltip:A,onSeriesMouseOver:he,isWorldMap:$=!0,showColorScale:ge=!0,zoomScaleExtend:ye=[.8,6],zoomTranslateExtend:U,graphID:W,highlightedIds:b=[],onSeriesMouseClick:G,mapProperty:se="ISO3",graphDownload:k=!1,dataDownload:C=!1,showAntarctica:K=!1,language:Z="en",minHeight:v=0,theme:N="light",ariaLabel:Q,resetSelectionOnDoubleClick:X=!0,detailsOnClick:ee,styles:S,classNames:w,mapProjection:ne,zoomInteraction:te="button",animate:P=!1,dimmedOpacity:re=.3,customLayers:le=[],timeline:f={enabled:!1,autoplay:!1,showOnlyActiveDate:!0}}=pe,[g,I]=d.useState(0),[oe,ce]=d.useState(0),[V,fe]=d.useState(f.autoplay),u=je.sort(Re.uniqBy(E.filter(e=>e.date!==void 0&&e.date!==null),e=>e.date).map(e=>be.parse(`${e.date}`,f.dateFormat||"yyyy",new Date).getTime()),(e,o)=>Be.ascending(e,o)),[R,_]=d.useState(f.autoplay?0:u.length-1),[r,n]=d.useState(void 0),p=d.useRef(null),i=d.useRef(null);d.useEffect(()=>{const e=new ResizeObserver(o=>{I(c||o[0].target.clientWidth||760),ce(x||o[0].target.clientHeight||480)});return p.current&&(ce(p.current.clientHeight||480),I(p.current.clientWidth||760),c||e.observe(p.current)),()=>e.disconnect()},[c,x]),d.useEffect(()=>{typeof h=="string"?ze.fetchAndParseJSON(h).then(o=>{n(o)}):n(h)},[h]);const a=z||(D==="categorical"?We.getUniqValue(E,"x"):Ve.getJenks(E.map(e=>e.x),j?.length||4));d.useEffect(()=>{const e=setInterval(()=>{_(o=>o<u.length-1?o+1:0)},(f.speed||2)*1e3);return V||clearInterval(e),()=>clearInterval(e)},[u,V,f.speed]);const s=je.getSliderMarks(u,R,f.showOnlyActiveDate,f.dateFormat||"yyyy");return t.jsxRuntimeExports.jsx("div",{className:`${N||"light"} flex ${c?"w-fit grow-0":"w-full grow"}`,dir:Z==="he"||Z==="ar"?"rtl":void 0,children:t.jsxRuntimeExports.jsx("div",{className:t.mo(`${O?O===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${Z||"en"}`,w?.graphContainer),style:{...S?.graphContainer||{},...O&&O!==!0?{backgroundColor:O}:{}},id:W,ref:i,"aria-label":Q||`${l?`The graph shows ${l}. `:""}This is a choropleth map where geographic areas are colored in proportion to a specific variable.${q?` ${q}`:""}`,children:t.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:O?J||"1rem":J||0},children:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[l||q||k||C?t.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:S?.title,description:S?.description},classNames:{title:w?.title,description:w?.description},graphTitle:l,graphDescription:q,width:c,graphDownload:k?i.current:void 0,dataDownload:C?E.map(e=>e.data).filter(e=>e!==void 0).length>0?E.map(e=>e.data).filter(e=>e!==void 0):E.filter(e=>e!==void 0):null}):null,f.enabled&&u.length>0&&s?t.jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",dir:"ltr",children:[t.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{fe(!V)},className:"p-0 border-0 cursor-pointer bg-transparent","aria-label":V?"Click to pause animation":"Click to play animation",children:V?t.jsxRuntimeExports.jsx(Ee.Pause,{}):t.jsxRuntimeExports.jsx(Ee.Play,{})}),t.jsxRuntimeExports.jsx(je.xr,{min:u[0],max:u[u.length-1],marks:s,step:null,defaultValue:u[u.length-1],value:u[R],onChangeComplete:e=>{_(u.indexOf(e))},onChange:e=>{_(u.indexOf(e))},"aria-label":"Time slider. Use arrow keys to adjust selected time period."})]}):null,t.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:p,"aria-label":"Map area",children:(c||g)&&(x||oe)&&r?t.jsxRuntimeExports.jsx(Fe,{data:E.filter(e=>f.enabled?e.date===be.format(new Date(u[R]),f.dateFormat||"yyyy"):e),mapData:K?r:{...r,features:r.features.filter(e=>e.properties.NAME!=="Antarctica")},colorDomain:a,width:c||g,height:Math.max(v,x||(y?v?(c||g)*y>v?(c||g)*y:v:(c||g)*y:oe)),scale:F,centerPoint:Y,colors:j||(D==="categorical"?de.Colors[N].sequentialColors[`neutralColorsx0${a.length}`]:de.Colors[N].sequentialColors[`neutralColorsx0${a.length+1}`]),colorLegendTitle:ie,mapBorderWidth:me,mapNoDataColor:xe,categorical:D==="categorical",mapBorderColor:H,tooltip:A,onSeriesMouseOver:he,isWorldMap:$,showColorScale:ge,zoomScaleExtend:ye,zoomTranslateExtend:U,onSeriesMouseClick:G,mapProperty:se,highlightedIds:b,resetSelectionOnDoubleClick:X,styles:S,classNames:w,detailsOnClick:ee,mapProjection:ne||($?"naturalEarth":"mercator"),zoomInteraction:te,dimmedOpacity:re,animate:P===!0?{duration:.5,once:!0,amount:.5}:P||{duration:0,once:!0,amount:0},customLayers:le}):t.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(v,x||(y?v?(c||g)*y>v?(c||g)*y:v:(c||g)*y:oe))}px`},className:"flex items-center justify-center",children:t.jsxRuntimeExports.jsx(we.y,{"aria-label":"Loading graph"})})}),B||ae?t.jsxRuntimeExports.jsx(Le.GraphFooter,{styles:{footnote:S?.footnote,source:S?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:B,footNote:ae,width:c}):null]})})})})}exports.ChoroplethMap=He;
|
|
2
2
|
//# sourceMappingURL=ChoroplethMap.cjs.map
|
package/dist/ChoroplethMap.js
CHANGED
|
@@ -6,23 +6,23 @@ import { p as Me, f as De } from "./parse-DlCRUFh_.js";
|
|
|
6
6
|
import { u as Se } from "./index-CaAIPGZo.js";
|
|
7
7
|
import { i as Oe } from "./index-27yTRcko.js";
|
|
8
8
|
import { z as Ee, t as Pe, a as Ie, g as Le, b as ze, c as We, d as Te, e as Be } from "./zoom-_lqdiGoI.js";
|
|
9
|
-
import { X as Ae } from "./Modal-
|
|
9
|
+
import { X as Ae } from "./Modal-DVVwpKhP.js";
|
|
10
10
|
import { u as ke } from "./Typography-Ctgfl1J5.js";
|
|
11
11
|
import { n as Ve } from "./numberFormattingFunction-14YCbkN2.js";
|
|
12
12
|
import { T as Fe } from "./Tooltip-DyM5snqx.js";
|
|
13
13
|
import { s as He } from "./string2HTML-CWHGfz_d.js";
|
|
14
14
|
import { c as qe } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
15
15
|
import { X as Xe, P as Ue, f as _e } from "./index-BmCqpO1B.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { t as Ye } from "./threshold-DFfqcDMa.js";
|
|
16
|
+
import { o as Ge } from "./ordinal-w9Lu4Stb.js";
|
|
17
|
+
import { t as Re } from "./threshold-DFfqcDMa.js";
|
|
19
18
|
import { s as be } from "./select-DKy99ogv.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
19
|
+
import { u as Ye } from "./use-in-view-yS6jzJAp.js";
|
|
20
|
+
import { m as de } from "./proxy-CkpFesk1.js";
|
|
21
|
+
import { A as Je } from "./index-CNvov0eg.js";
|
|
22
22
|
import { GraphFooter as Ke } from "./GraphFooter.js";
|
|
23
23
|
import { GraphHeader as Ze } from "./GraphHeader.js";
|
|
24
24
|
import { Colors as me } from "./Colors.js";
|
|
25
|
-
import { f as Qe } from "./fetchAndParseData-
|
|
25
|
+
import { f as Qe } from "./fetchAndParseData-4gsYTy6_.js";
|
|
26
26
|
import { g as et } from "./getUniqValue-BtUENB2H.js";
|
|
27
27
|
import { g as tt } from "./getJenks-VhM3GIoC.js";
|
|
28
28
|
import { c as rt } from "./init-BhZylTFx.js";
|
|
@@ -58,10 +58,10 @@ function at(he) {
|
|
|
58
58
|
animate: j,
|
|
59
59
|
dimmedOpacity: U,
|
|
60
60
|
customLayers: ne
|
|
61
|
-
} = he, [w, M] = b(void 0), J = ae(null), [K, v] = b(!(c < 680)), [D, Z] = b(void 0), [_, Q] = b(void 0), [S, $] = b(void 0), [se, ee] = b(void 0), L = ae(null), te =
|
|
61
|
+
} = he, [w, M] = b(void 0), J = ae(null), [K, v] = b(!(c < 680)), [D, Z] = b(void 0), [_, Q] = b(void 0), [S, $] = b(void 0), [se, ee] = b(void 0), L = ae(null), te = Ye(L, {
|
|
62
62
|
once: j.once,
|
|
63
63
|
amount: j.amount
|
|
64
|
-
}), le = ae(null), y = E ?
|
|
64
|
+
}), le = ae(null), y = E ? Ge().domain(g).range(l) : Re().domain(g).range(l);
|
|
65
65
|
pe(() => {
|
|
66
66
|
const r = be(le.current), s = be(L.current), m = (o) => {
|
|
67
67
|
if (B === "noZoom") return !1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-DDoeWRVt.cjs");require("./index-CZbIGs8q.cjs");require("react");require("./index-C21TvELx.cjs");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CHPV5EwG-DDoeWRVt.cjs");require("./index-CZbIGs8q.cjs");require("react");require("./index-C21TvELx.cjs");const e=require("./index-CZLvTu6p.cjs");require("./GraphFooter.cjs");require("./GraphHeader.cjs");require("./ColorLegendWithMouseOver.cjs");require("./Colors.cjs");require("./checkIfNullOrUndefined-BCW3Y1ML.cjs");require("./EmptyState-d8_8SxeW.cjs");exports.CirclePackingGraph=e.CirclePackingGraph;
|
|
2
2
|
//# sourceMappingURL=CirclePackingGraph.cjs.map
|
|
@@ -2,7 +2,7 @@ import "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
|
2
2
|
import "./index-CaAIPGZo.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./index-D7ltPi18.js";
|
|
5
|
-
import { C as h } from "./index-
|
|
5
|
+
import { C as h } from "./index-DGAaLNu9.js";
|
|
6
6
|
import "./GraphFooter.js";
|
|
7
7
|
import "./GraphHeader.js";
|
|
8
8
|
import "./ColorLegendWithMouseOver.js";
|
package/dist/CopyTextButton.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-DDoeWRVt.cjs"),oe=require("./index-BW_-wD2k.cjs"),b=require("react"),Fe=require("react-dom"),d=require("./index-DG3YrCr5-v7rayV3N.cjs"),Oe=require("./index-tvAyXPPW-DPOG-C2i.cjs"),z=require("./x-
|
|
2
|
-
* @license lucide-react v0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-DDoeWRVt.cjs"),oe=require("./index-BW_-wD2k.cjs"),b=require("react"),Fe=require("react-dom"),d=require("./index-DG3YrCr5-v7rayV3N.cjs"),Oe=require("./index-tvAyXPPW-DPOG-C2i.cjs"),z=require("./x-BBpi7a_7-Dz2vKSfu.cjs");function ce(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=ce(b),Ke=ce(Fe),qe=1,Ve=1e6;let U=0;function $e(){return U=(U+1)%Number.MAX_SAFE_INTEGER,U.toString()}const G=new Map,ne=e=>{if(G.has(e))return;const r=setTimeout(()=>{G.delete(e),L({type:"REMOVE_TOAST",toastId:e})},Ve);G.set(e,r)},ze=(e,r)=>{switch(r.type){case"ADD_TOAST":return{...e,toasts:[r.toast,...e.toasts].slice(0,qe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(t=>t.id===r.toast.id?{...t,...r.toast}:t)};case"DISMISS_TOAST":{const{toastId:t}=r;return t?ne(t):e.toasts.forEach(a=>{ne(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===t||t===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return r.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(t=>t.id!==r.toastId)};default:return{...e}}},V=[];let $={toasts:[]};function L(e){$=ze($,e),V.forEach(r=>{r($)})}function We({...e}){const r=$e(),t=n=>L({type:"UPDATE_TOAST",toast:{...n,id:r}}),a=()=>L({type:"DISMISS_TOAST",toastId:r});return L({type:"ADD_TOAST",toast:{...e,id:r,open:!0,onOpenChange:n=>{n||a()}}}),{id:r,dismiss:a,update:t}}function de(){const[e,r]=b.useState($);return b.useEffect(()=>(V.push(r),()=>{const t=V.indexOf(r);t>-1&&V.splice(t,1)}),[e]),{...e,toast:We,dismiss:t=>L({type:"DISMISS_TOAST",toastId:t})}}/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
7
|
-
* @license lucide-react v0.
|
|
6
|
+
*/const Be=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ue=z.k("circle-check-big",Be);/**
|
|
7
|
+
* @license lucide-react v0.542.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const
|
|
12
|
-
* @license lucide-react v0.
|
|
11
|
+
*/const Ge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Xe=z.k("circle-x",Ge);/**
|
|
12
|
+
* @license lucide-react v0.542.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Ye=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Be=z.b("triangle-alert",Ye);var Q="ToastProvider",[J,Ze,Qe]=Oe.h("Toast"),[le,bt]=d.g("Toast",[Qe]),[Je,W]=le(Q),ue=e=>{const{__scopeToast:r,label:t="Notification",duration:a=5e3,swipeDirection:n="right",swipeThreshold:i=50,children:m}=e,[w,h]=o.useState(null),[u,E]=o.useState(0),T=o.useRef(!1),R=o.useRef(!1);return t.trim()||console.error(`Invalid prop \`label\` supplied to \`${Q}\`. Expected non-empty \`string\`.`),s.ae.jsx(J.Provider,{scope:r,children:s.ae.jsx(Je,{scope:r,label:t,duration:a,swipeDirection:n,swipeThreshold:i,toastCount:u,viewport:w,onViewportChange:h,onToastAdd:o.useCallback(()=>E(C=>C+1),[]),onToastRemove:o.useCallback(()=>E(C=>C-1),[]),isFocusedToastEscapeKeyDownRef:T,isClosePausedRef:R,children:m})})};ue.displayName=Q;var pe="ToastViewport",et=["F8"],Y="toast.viewportPause",B="toast.viewportResume",fe=o.forwardRef((e,r)=>{const{__scopeToast:t,hotkey:a=et,label:n="Notifications ({hotkey})",...i}=e,m=W(pe,t),w=Ze(t),h=o.useRef(null),u=o.useRef(null),E=o.useRef(null),T=o.useRef(null),R=d.P(r,T,m.onViewportChange),C=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=m.toastCount>0;o.useEffect(()=>{const l=v=>{a.length!==0&&a.every(f=>v[f]||v.code===f)&&T.current?.focus()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]),o.useEffect(()=>{const l=h.current,v=T.current;if(P&&l&&v){const f=()=>{if(!m.isClosePausedRef.current){const j=new CustomEvent(Y);v.dispatchEvent(j),m.isClosePausedRef.current=!0}},x=()=>{if(m.isClosePausedRef.current){const j=new CustomEvent(B);v.dispatchEvent(j),m.isClosePausedRef.current=!1}},y=j=>{!l.contains(j.relatedTarget)&&x()},g=()=>{l.contains(document.activeElement)||x()};return l.addEventListener("focusin",f),l.addEventListener("focusout",y),l.addEventListener("pointermove",f),l.addEventListener("pointerleave",g),window.addEventListener("blur",f),window.addEventListener("focus",x),()=>{l.removeEventListener("focusin",f),l.removeEventListener("focusout",y),l.removeEventListener("pointermove",f),l.removeEventListener("pointerleave",g),window.removeEventListener("blur",f),window.removeEventListener("focus",x)}}},[P,m.isClosePausedRef]);const p=o.useCallback(({tabbingDirection:l})=>{const v=w().map(f=>{const x=f.ref.current,y=[x,...ft(x)];return l==="forwards"?y:y.reverse()});return(l==="forwards"?v.reverse():v).flat()},[w]);return o.useEffect(()=>{const l=T.current;if(l){const v=f=>{const x=f.altKey||f.ctrlKey||f.metaKey;if(f.key==="Tab"&&!x){const y=document.activeElement,g=f.shiftKey;if(f.target===l&&g){u.current?.focus();return}const j=p({tabbingDirection:g?"backwards":"forwards"}),S=j.findIndex(D=>D===y);X(j.slice(S+1))?f.preventDefault():g?u.current?.focus():E.current?.focus()}};return l.addEventListener("keydown",v),()=>l.removeEventListener("keydown",v)}},[w,p]),s.ae.jsxs(d.$,{ref:h,role:"region","aria-label":n.replace("{hotkey}",C),tabIndex:-1,style:{pointerEvents:P?void 0:"none"},children:[P&&s.ae.jsx(Z,{ref:u,onFocusFromOutsideViewport:()=>{const l=p({tabbingDirection:"forwards"});X(l)}}),s.ae.jsx(J.Slot,{scope:t,children:s.ae.jsx(d.w.ol,{tabIndex:-1,...i,ref:R})}),P&&s.ae.jsx(Z,{ref:E,onFocusFromOutsideViewport:()=>{const l=p({tabbingDirection:"backwards"});X(l)}})]})});fe.displayName=pe;var me="ToastFocusProxy",Z=o.forwardRef((e,r)=>{const{__scopeToast:t,onFocusFromOutsideViewport:a,...n}=e,i=W(me,t);return s.ae.jsx(d.a,{tabIndex:0,...n,ref:r,style:{position:"fixed"},onFocus:m=>{const w=m.relatedTarget;!i.viewport?.contains(w)&&a()}})});Z.displayName=me;var M="Toast",tt="toast.swipeStart",rt="toast.swipeMove",at="toast.swipeCancel",st="toast.swipeEnd",xe=o.forwardRef((e,r)=>{const{forceMount:t,open:a,defaultOpen:n,onOpenChange:i,...m}=e,[w,h]=d._({prop:a,defaultProp:n??!0,onChange:i,caller:M});return s.ae.jsx(d.E,{present:t||w,children:s.ae.jsx(it,{open:w,...m,ref:r,onClose:()=>h(!1),onPause:d.c(e.onPause),onResume:d.c(e.onResume),onSwipeStart:d.j(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:d.j(e.onSwipeMove,u=>{const{x:E,y:T}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${E}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${T}px`)}),onSwipeCancel:d.j(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:d.j(e.onSwipeEnd,u=>{const{x:E,y:T}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${E}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${T}px`),h(!1)})})})});xe.displayName=M;var[ot,nt]=le(M,{onClose(){}}),it=o.forwardRef((e,r)=>{const{__scopeToast:t,type:a="foreground",duration:n,open:i,onClose:m,onEscapeKeyDown:w,onPause:h,onResume:u,onSwipeStart:E,onSwipeMove:T,onSwipeCancel:R,onSwipeEnd:C,...P}=e,p=W(M,t),[l,v]=o.useState(null),f=d.P(r,c=>v(c)),x=o.useRef(null),y=o.useRef(null),g=n||p.duration,j=o.useRef(0),S=o.useRef(g),D=o.useRef(0),{onToastAdd:te,onToastRemove:re}=p,_=d.c(()=>{l?.contains(document.activeElement)&&p.viewport?.focus(),m()}),F=o.useCallback(c=>{!c||c===1/0||(window.clearTimeout(D.current),j.current=new Date().getTime(),D.current=window.setTimeout(_,c))},[_]);o.useEffect(()=>{const c=p.viewport;if(c){const k=()=>{F(S.current),u?.()},N=()=>{const A=new Date().getTime()-j.current;S.current=S.current-A,window.clearTimeout(D.current),h?.()};return c.addEventListener(Y,N),c.addEventListener(B,k),()=>{c.removeEventListener(Y,N),c.removeEventListener(B,k)}}},[p.viewport,g,h,u,F]),o.useEffect(()=>{i&&!p.isClosePausedRef.current&&F(g)},[i,g,p.isClosePausedRef,F]),o.useEffect(()=>(te(),()=>re()),[te,re]);const ae=o.useMemo(()=>l?Ee(l):null,[l]);return p.viewport?s.ae.jsxs(s.ae.Fragment,{children:[ae&&s.ae.jsx(ct,{__scopeToast:t,role:"status","aria-live":a==="foreground"?"assertive":"polite",children:ae}),s.ae.jsx(ot,{scope:t,onClose:_,children:Ke.createPortal(s.ae.jsx(J.ItemSlot,{scope:t,children:s.ae.jsx(d.Z,{asChild:!0,onEscapeKeyDown:d.j(w,()=>{p.isFocusedToastEscapeKeyDownRef.current||_(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.ae.jsx(d.w.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...P,ref:f,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:d.j(e.onKeyDown,c=>{c.key==="Escape"&&(w?.(c.nativeEvent),c.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:d.j(e.onPointerDown,c=>{c.button===0&&(x.current={x:c.clientX,y:c.clientY})}),onPointerMove:d.j(e.onPointerMove,c=>{if(!x.current)return;const k=c.clientX-x.current.x,N=c.clientY-x.current.y,A=!!y.current,I=["left","right"].includes(p.swipeDirection),O=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Le=I?O(0,k):0,Me=I?0:O(0,N),U=c.pointerType==="touch"?10:2,K={x:Le,y:Me},se={originalEvent:c,delta:K};A?(y.current=K,q(rt,T,se,{discrete:!1})):ie(K,p.swipeDirection,U)?(y.current=K,q(tt,E,se,{discrete:!1}),c.target.setPointerCapture(c.pointerId)):(Math.abs(k)>U||Math.abs(N)>U)&&(x.current=null)}),onPointerUp:d.j(e.onPointerUp,c=>{const k=y.current,N=c.target;if(N.hasPointerCapture(c.pointerId)&&N.releasePointerCapture(c.pointerId),y.current=null,x.current=null,k){const A=c.currentTarget,I={originalEvent:c,delta:k};ie(k,p.swipeDirection,p.swipeThreshold)?q(st,C,I,{discrete:!0}):q(at,R,I,{discrete:!0}),A.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),ct=e=>{const{__scopeToast:r,children:t,...a}=e,n=W(M,r),[i,m]=o.useState(!1),[w,h]=o.useState(!1);return ut(()=>m(!0)),o.useEffect(()=>{const u=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(u)},[]),w?null:s.ae.jsx(d.u,{asChild:!0,children:s.ae.jsx(d.a,{...a,children:i&&s.ae.jsxs(s.ae.Fragment,{children:[n.label," ",t]})})})},dt="ToastTitle",we=o.forwardRef((e,r)=>{const{__scopeToast:t,...a}=e;return s.ae.jsx(d.w.div,{...a,ref:r})});we.displayName=dt;var lt="ToastDescription",ve=o.forwardRef((e,r)=>{const{__scopeToast:t,...a}=e;return s.ae.jsx(d.w.div,{...a,ref:r})});ve.displayName=lt;var ye="ToastAction",he=o.forwardRef((e,r)=>{const{altText:t,...a}=e;return t.trim()?s.ae.jsx(be,{altText:t,asChild:!0,children:s.ae.jsx(ee,{...a,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${ye}\`. Expected non-empty \`string\`.`),null)});he.displayName=ye;var Te="ToastClose",ee=o.forwardRef((e,r)=>{const{__scopeToast:t,...a}=e,n=nt(Te,t);return s.ae.jsx(be,{asChild:!0,children:s.ae.jsx(d.w.button,{type:"button",...a,ref:r,onClick:d.j(e.onClick,n.onClose)})})});ee.displayName=Te;var be=o.forwardRef((e,r)=>{const{__scopeToast:t,altText:a,...n}=e;return s.ae.jsx(d.w.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...n,ref:r})});function Ee(e){const r=[];return Array.from(e.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),pt(t)){const a=t.ariaHidden||t.hidden||t.style.display==="none",n=t.dataset.radixToastAnnounceExclude==="";if(!a)if(n){const i=t.dataset.radixToastAnnounceAlt;i&&r.push(i)}else r.push(...Ee(t))}}),r}function q(e,r,t,{discrete:a}){const n=t.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:t});r&&n.addEventListener(e,r,{once:!0}),a?d.N(n,i):n.dispatchEvent(i)}var ie=(e,r,t=0)=>{const a=Math.abs(e.x),n=Math.abs(e.y),i=a>n;return r==="left"||r==="right"?i&&a>t:!i&&n>t};function ut(e=()=>{}){const r=d.c(e);d.E$1(()=>{let t=0,a=0;return t=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(t),window.cancelAnimationFrame(a)}},[r])}function pt(e){return e.nodeType===e.ELEMENT_NODE}function ft(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const n=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||n?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)r.push(t.currentNode);return r}function X(e){const r=document.activeElement;return e.some(t=>t===r?!0:(t.focus(),document.activeElement!==r))}var mt=ue,ge=fe,je=xe,ke=we,Ne=ve,Ce=he,Pe=ee;const xt=mt,Re=b.createContext(null),Se=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(ge,{...r,ref:t,className:s.mo("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e)}));Se.displayName=ge.displayName;const wt=s.j("group pointer-events-auto relative shadow-xs bg-primary-white dark:bg-primary-gray-650 flex w-full text-primary-black dark:text-primary-white items-center justify-between flex gap-2 overflow-hidden rounded-sm border border-primary-gray-400 p-2 pr-6 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border border-primary-gray-400 dark:border-0",success:"border-t-4 border-accent-dark-green dark:border-b-0 dark:border-l-0 dark:border-r-0",warning:"border-t-4 border-accent-dark-yellow dark:border-b-0 dark:border-l-0 dark:border-r-0",destructive:"border-t-4 border-accent-dark-red dark:border-b-0 dark:border-l-0 dark:border-r-0"}},defaultVariants:{variant:"default"}}),vt=s.j("",{variants:{variant:{default:"text-primary-black dark:text-primary-white",success:"text-accent-dark-green",warning:"text-accent-dark-yellow",destructive:"text-accent-dark-red"}},defaultVariants:{variant:"default"}}),De=b.forwardRef(({className:e,variant:r,...t},a)=>s.ae.jsx(Re.Provider,{value:{variant:r},children:s.ae.jsx(je,{...t,ref:a,className:s.mo(wt({variant:r}),e)})}));De.displayName=je.displayName;const yt=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(Ce,{...r,ref:t,className:s.mo("inline-flex h-8 shrink-0 items-center text-primary-gray-700 dark:text-primary-gray-100 justify-center rounded-none bg-transparent px-3 text-sm font-medium transition-colors hover:bg-primary-gray-200 dark:hover:bg-primary-gray-600 focus:outline-hidden focus:ring-1 disabled:pointer-events-none disabled:opacity-50",e)}));yt.displayName=Ce.displayName;const _e=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(Pe,{...r,ref:t,className:s.mo("absolute right-1 top-1 rounded-md p-1 text-primary-gray-700/50 dark:text-primary-gray-100/50 opacity-0 transition-opacity hover:text-primary-gray-700 dark:hover:text-primary-gray-100 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100",e),"toast-close":"",children:s.ae.jsx(z.t,{className:"h-4 w-4"})}));_e.displayName=Pe.displayName;const Ae=b.forwardRef(({className:e,...r},t)=>{const a=b.useContext(Re),n=s.mo(vt({variant:a?.variant}),"text-lg font-bold [&+div]:text-xs",e);let i=null;switch(a?.variant){case"destructive":i=s.ae.jsx(Xe,{className:"h-4 w-4 stroke-accent-dark-red",strokeWidth:2});break;case"success":i=s.ae.jsx(Ge,{className:"h-4 w-4 stroke-accent-dark-green",strokeWidth:2});break;case"warning":i=s.ae.jsx(Be,{className:"h-4 w-4 stroke-accent-dark-yellow",strokeWidth:2});break;default:i=null;break}return s.ae.jsxs("div",{className:"flex gap-x-1 items-center",children:[i,s.ae.jsx(ke,{...r,ref:t,className:n})]})});Ae.displayName=ke.displayName;const Ie=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(Ne,{...r,ref:t,className:s.mo("text-base opacity-90 dark:text-primary-white",e)}));Ie.displayName=Ne.displayName;function ht(){const{toasts:e}=de();return s.ae.jsxs(xt,{children:[e.map(({id:r,title:t,description:a,action:n,...i})=>b.createElement(De,{...i,key:r},s.ae.jsxs("div",{className:"grid gap-1",children:[t&&s.ae.jsx(Ae,{children:t}),a&&s.ae.jsx(Ie,{children:a})]}),n,s.ae.jsx(_e,{}))),s.ae.jsx(Se,{})]})}function Tt(e){const{text:r,successMessage:t="Text copied",buttonText:a,buttonSmall:n=!1,className:i=""}=e,{toast:m}=de();return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(oe.d,{variant:"tertiary",className:`${n?"p-2":"py-4 px-6"} ${i}`,onClick:()=>{navigator.clipboard.writeText(r),m({variant:"success",description:t,duration:1e3})},"aria-label":"Click to copy the text",children:[s.jsxRuntimeExports.jsx(oe.Copy,{}),a||null]}),s.jsxRuntimeExports.jsx(ht,{})]})}exports.CopyTextButton=Tt;
|
|
16
|
+
*/const Ye=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],He=z.k("triangle-alert",Ye);var Q="ToastProvider",[J,Ze,Qe]=Oe.h("Toast"),[le,bt]=d.g("Toast",[Qe]),[Je,W]=le(Q),ue=e=>{const{__scopeToast:r,label:t="Notification",duration:a=5e3,swipeDirection:n="right",swipeThreshold:i=50,children:m}=e,[w,h]=o.useState(null),[u,E]=o.useState(0),T=o.useRef(!1),R=o.useRef(!1);return t.trim()||console.error(`Invalid prop \`label\` supplied to \`${Q}\`. Expected non-empty \`string\`.`),s.ae.jsx(J.Provider,{scope:r,children:s.ae.jsx(Je,{scope:r,label:t,duration:a,swipeDirection:n,swipeThreshold:i,toastCount:u,viewport:w,onViewportChange:h,onToastAdd:o.useCallback(()=>E(C=>C+1),[]),onToastRemove:o.useCallback(()=>E(C=>C-1),[]),isFocusedToastEscapeKeyDownRef:T,isClosePausedRef:R,children:m})})};ue.displayName=Q;var pe="ToastViewport",et=["F8"],Y="toast.viewportPause",H="toast.viewportResume",fe=o.forwardRef((e,r)=>{const{__scopeToast:t,hotkey:a=et,label:n="Notifications ({hotkey})",...i}=e,m=W(pe,t),w=Ze(t),h=o.useRef(null),u=o.useRef(null),E=o.useRef(null),T=o.useRef(null),R=d.P(r,T,m.onViewportChange),C=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=m.toastCount>0;o.useEffect(()=>{const l=v=>{a.length!==0&&a.every(f=>v[f]||v.code===f)&&T.current?.focus()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]),o.useEffect(()=>{const l=h.current,v=T.current;if(P&&l&&v){const f=()=>{if(!m.isClosePausedRef.current){const k=new CustomEvent(Y);v.dispatchEvent(k),m.isClosePausedRef.current=!0}},x=()=>{if(m.isClosePausedRef.current){const k=new CustomEvent(H);v.dispatchEvent(k),m.isClosePausedRef.current=!1}},y=k=>{!l.contains(k.relatedTarget)&&x()},g=()=>{l.contains(document.activeElement)||x()};return l.addEventListener("focusin",f),l.addEventListener("focusout",y),l.addEventListener("pointermove",f),l.addEventListener("pointerleave",g),window.addEventListener("blur",f),window.addEventListener("focus",x),()=>{l.removeEventListener("focusin",f),l.removeEventListener("focusout",y),l.removeEventListener("pointermove",f),l.removeEventListener("pointerleave",g),window.removeEventListener("blur",f),window.removeEventListener("focus",x)}}},[P,m.isClosePausedRef]);const p=o.useCallback(({tabbingDirection:l})=>{const v=w().map(f=>{const x=f.ref.current,y=[x,...ft(x)];return l==="forwards"?y:y.reverse()});return(l==="forwards"?v.reverse():v).flat()},[w]);return o.useEffect(()=>{const l=T.current;if(l){const v=f=>{const x=f.altKey||f.ctrlKey||f.metaKey;if(f.key==="Tab"&&!x){const y=document.activeElement,g=f.shiftKey;if(f.target===l&&g){u.current?.focus();return}const k=p({tabbingDirection:g?"backwards":"forwards"}),S=k.findIndex(_=>_===y);X(k.slice(S+1))?f.preventDefault():g?u.current?.focus():E.current?.focus()}};return l.addEventListener("keydown",v),()=>l.removeEventListener("keydown",v)}},[w,p]),s.ae.jsxs(d.$,{ref:h,role:"region","aria-label":n.replace("{hotkey}",C),tabIndex:-1,style:{pointerEvents:P?void 0:"none"},children:[P&&s.ae.jsx(Z,{ref:u,onFocusFromOutsideViewport:()=>{const l=p({tabbingDirection:"forwards"});X(l)}}),s.ae.jsx(J.Slot,{scope:t,children:s.ae.jsx(d.w.ol,{tabIndex:-1,...i,ref:R})}),P&&s.ae.jsx(Z,{ref:E,onFocusFromOutsideViewport:()=>{const l=p({tabbingDirection:"backwards"});X(l)}})]})});fe.displayName=pe;var me="ToastFocusProxy",Z=o.forwardRef((e,r)=>{const{__scopeToast:t,onFocusFromOutsideViewport:a,...n}=e,i=W(me,t);return s.ae.jsx(d.a,{tabIndex:0,...n,ref:r,style:{position:"fixed"},onFocus:m=>{const w=m.relatedTarget;!i.viewport?.contains(w)&&a()}})});Z.displayName=me;var M="Toast",tt="toast.swipeStart",rt="toast.swipeMove",at="toast.swipeCancel",st="toast.swipeEnd",xe=o.forwardRef((e,r)=>{const{forceMount:t,open:a,defaultOpen:n,onOpenChange:i,...m}=e,[w,h]=d._({prop:a,defaultProp:n??!0,onChange:i,caller:M});return s.ae.jsx(d.E,{present:t||w,children:s.ae.jsx(it,{open:w,...m,ref:r,onClose:()=>h(!1),onPause:d.c(e.onPause),onResume:d.c(e.onResume),onSwipeStart:d.j(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:d.j(e.onSwipeMove,u=>{const{x:E,y:T}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${E}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${T}px`)}),onSwipeCancel:d.j(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:d.j(e.onSwipeEnd,u=>{const{x:E,y:T}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${E}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${T}px`),h(!1)})})})});xe.displayName=M;var[ot,nt]=le(M,{onClose(){}}),it=o.forwardRef((e,r)=>{const{__scopeToast:t,type:a="foreground",duration:n,open:i,onClose:m,onEscapeKeyDown:w,onPause:h,onResume:u,onSwipeStart:E,onSwipeMove:T,onSwipeCancel:R,onSwipeEnd:C,...P}=e,p=W(M,t),[l,v]=o.useState(null),f=d.P(r,c=>v(c)),x=o.useRef(null),y=o.useRef(null),g=n||p.duration,k=o.useRef(0),S=o.useRef(g),_=o.useRef(0),{onToastAdd:te,onToastRemove:re}=p,D=d.c(()=>{l?.contains(document.activeElement)&&p.viewport?.focus(),m()}),F=o.useCallback(c=>{!c||c===1/0||(window.clearTimeout(_.current),k.current=new Date().getTime(),_.current=window.setTimeout(D,c))},[D]);o.useEffect(()=>{const c=p.viewport;if(c){const j=()=>{F(S.current),u?.()},N=()=>{const A=new Date().getTime()-k.current;S.current=S.current-A,window.clearTimeout(_.current),h?.()};return c.addEventListener(Y,N),c.addEventListener(H,j),()=>{c.removeEventListener(Y,N),c.removeEventListener(H,j)}}},[p.viewport,g,h,u,F]),o.useEffect(()=>{i&&!p.isClosePausedRef.current&&F(g)},[i,g,p.isClosePausedRef,F]),o.useEffect(()=>(te(),()=>re()),[te,re]);const ae=o.useMemo(()=>l?Ee(l):null,[l]);return p.viewport?s.ae.jsxs(s.ae.Fragment,{children:[ae&&s.ae.jsx(ct,{__scopeToast:t,role:"status","aria-live":a==="foreground"?"assertive":"polite",children:ae}),s.ae.jsx(ot,{scope:t,onClose:D,children:Ke.createPortal(s.ae.jsx(J.ItemSlot,{scope:t,children:s.ae.jsx(d.Z,{asChild:!0,onEscapeKeyDown:d.j(w,()=>{p.isFocusedToastEscapeKeyDownRef.current||D(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.ae.jsx(d.w.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...P,ref:f,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:d.j(e.onKeyDown,c=>{c.key==="Escape"&&(w?.(c.nativeEvent),c.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:d.j(e.onPointerDown,c=>{c.button===0&&(x.current={x:c.clientX,y:c.clientY})}),onPointerMove:d.j(e.onPointerMove,c=>{if(!x.current)return;const j=c.clientX-x.current.x,N=c.clientY-x.current.y,A=!!y.current,I=["left","right"].includes(p.swipeDirection),O=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Le=I?O(0,j):0,Me=I?0:O(0,N),B=c.pointerType==="touch"?10:2,K={x:Le,y:Me},se={originalEvent:c,delta:K};A?(y.current=K,q(rt,T,se,{discrete:!1})):ie(K,p.swipeDirection,B)?(y.current=K,q(tt,E,se,{discrete:!1}),c.target.setPointerCapture(c.pointerId)):(Math.abs(j)>B||Math.abs(N)>B)&&(x.current=null)}),onPointerUp:d.j(e.onPointerUp,c=>{const j=y.current,N=c.target;if(N.hasPointerCapture(c.pointerId)&&N.releasePointerCapture(c.pointerId),y.current=null,x.current=null,j){const A=c.currentTarget,I={originalEvent:c,delta:j};ie(j,p.swipeDirection,p.swipeThreshold)?q(st,C,I,{discrete:!0}):q(at,R,I,{discrete:!0}),A.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),ct=e=>{const{__scopeToast:r,children:t,...a}=e,n=W(M,r),[i,m]=o.useState(!1),[w,h]=o.useState(!1);return ut(()=>m(!0)),o.useEffect(()=>{const u=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(u)},[]),w?null:s.ae.jsx(d.u,{asChild:!0,children:s.ae.jsx(d.a,{...a,children:i&&s.ae.jsxs(s.ae.Fragment,{children:[n.label," ",t]})})})},dt="ToastTitle",we=o.forwardRef((e,r)=>{const{__scopeToast:t,...a}=e;return s.ae.jsx(d.w.div,{...a,ref:r})});we.displayName=dt;var lt="ToastDescription",ve=o.forwardRef((e,r)=>{const{__scopeToast:t,...a}=e;return s.ae.jsx(d.w.div,{...a,ref:r})});ve.displayName=lt;var ye="ToastAction",he=o.forwardRef((e,r)=>{const{altText:t,...a}=e;return t.trim()?s.ae.jsx(be,{altText:t,asChild:!0,children:s.ae.jsx(ee,{...a,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${ye}\`. Expected non-empty \`string\`.`),null)});he.displayName=ye;var Te="ToastClose",ee=o.forwardRef((e,r)=>{const{__scopeToast:t,...a}=e,n=nt(Te,t);return s.ae.jsx(be,{asChild:!0,children:s.ae.jsx(d.w.button,{type:"button",...a,ref:r,onClick:d.j(e.onClick,n.onClose)})})});ee.displayName=Te;var be=o.forwardRef((e,r)=>{const{__scopeToast:t,altText:a,...n}=e;return s.ae.jsx(d.w.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...n,ref:r})});function Ee(e){const r=[];return Array.from(e.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),pt(t)){const a=t.ariaHidden||t.hidden||t.style.display==="none",n=t.dataset.radixToastAnnounceExclude==="";if(!a)if(n){const i=t.dataset.radixToastAnnounceAlt;i&&r.push(i)}else r.push(...Ee(t))}}),r}function q(e,r,t,{discrete:a}){const n=t.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:t});r&&n.addEventListener(e,r,{once:!0}),a?d.N(n,i):n.dispatchEvent(i)}var ie=(e,r,t=0)=>{const a=Math.abs(e.x),n=Math.abs(e.y),i=a>n;return r==="left"||r==="right"?i&&a>t:!i&&n>t};function ut(e=()=>{}){const r=d.c(e);d.E$1(()=>{let t=0,a=0;return t=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(t),window.cancelAnimationFrame(a)}},[r])}function pt(e){return e.nodeType===e.ELEMENT_NODE}function ft(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const n=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||n?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)r.push(t.currentNode);return r}function X(e){const r=document.activeElement;return e.some(t=>t===r?!0:(t.focus(),document.activeElement!==r))}var mt=ue,ge=fe,ke=xe,je=we,Ne=ve,Ce=he,Pe=ee;const xt=mt,Re=b.createContext(null),Se=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(ge,{...r,ref:t,className:s.mo("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e)}));Se.displayName=ge.displayName;const wt=s.j("group pointer-events-auto relative shadow-xs bg-primary-white dark:bg-primary-gray-650 flex w-full text-primary-black dark:text-primary-white items-center justify-between flex gap-2 overflow-hidden rounded-sm border border-primary-gray-400 p-2 pr-6 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border border-primary-gray-400 dark:border-0",success:"border-t-4 border-accent-dark-green dark:border-b-0 dark:border-l-0 dark:border-r-0",warning:"border-t-4 border-accent-dark-yellow dark:border-b-0 dark:border-l-0 dark:border-r-0",destructive:"border-t-4 border-accent-dark-red dark:border-b-0 dark:border-l-0 dark:border-r-0"}},defaultVariants:{variant:"default"}}),vt=s.j("",{variants:{variant:{default:"text-primary-black dark:text-primary-white",success:"text-accent-dark-green",warning:"text-accent-dark-yellow",destructive:"text-accent-dark-red"}},defaultVariants:{variant:"default"}}),_e=b.forwardRef(({className:e,variant:r,...t},a)=>s.ae.jsx(Re.Provider,{value:{variant:r},children:s.ae.jsx(ke,{...t,ref:a,className:s.mo(wt({variant:r}),e)})}));_e.displayName=ke.displayName;const yt=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(Ce,{...r,ref:t,className:s.mo("inline-flex h-8 shrink-0 items-center text-primary-gray-700 dark:text-primary-gray-100 justify-center rounded-none bg-transparent px-3 text-sm font-medium transition-colors hover:bg-primary-gray-200 dark:hover:bg-primary-gray-600 focus:outline-hidden focus:ring-1 disabled:pointer-events-none disabled:opacity-50",e)}));yt.displayName=Ce.displayName;const De=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(Pe,{...r,ref:t,className:s.mo("absolute right-1 top-1 rounded-md p-1 text-primary-gray-700/50 dark:text-primary-gray-100/50 opacity-0 transition-opacity hover:text-primary-gray-700 dark:hover:text-primary-gray-100 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100",e),"toast-close":"",children:s.ae.jsx(z.t,{className:"h-4 w-4"})}));De.displayName=Pe.displayName;const Ae=b.forwardRef(({className:e,...r},t)=>{const a=b.useContext(Re),n=s.mo(vt({variant:a?.variant}),"text-lg font-bold [&+div]:text-xs",e);let i=null;switch(a?.variant){case"destructive":i=s.ae.jsx(Xe,{className:"h-4 w-4 stroke-accent-dark-red",strokeWidth:2});break;case"success":i=s.ae.jsx(Ue,{className:"h-4 w-4 stroke-accent-dark-green",strokeWidth:2});break;case"warning":i=s.ae.jsx(He,{className:"h-4 w-4 stroke-accent-dark-yellow",strokeWidth:2});break;default:i=null;break}return s.ae.jsxs("div",{className:"flex gap-x-1 items-center",children:[i,s.ae.jsx(je,{...r,ref:t,className:n})]})});Ae.displayName=je.displayName;const Ie=b.forwardRef(({className:e,...r},t)=>s.ae.jsx(Ne,{...r,ref:t,className:s.mo("text-base opacity-90 dark:text-primary-white",e)}));Ie.displayName=Ne.displayName;function ht(){const{toasts:e}=de();return s.ae.jsxs(xt,{children:[e.map(({id:r,title:t,description:a,action:n,...i})=>b.createElement(_e,{...i,key:r},s.ae.jsxs("div",{className:"grid gap-1",children:[t&&s.ae.jsx(Ae,{children:t}),a&&s.ae.jsx(Ie,{children:a})]}),n,s.ae.jsx(De,{}))),s.ae.jsx(Se,{})]})}function Tt(e){const{text:r,successMessage:t="Text copied",buttonText:a,buttonSmall:n=!1,className:i=""}=e,{toast:m}=de();return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(oe.d,{variant:"tertiary",className:`${n?"p-2":"py-4 px-6"} ${i}`,onClick:()=>{navigator.clipboard.writeText(r),m({variant:"success",description:t,duration:1e3})},"aria-label":"Click to copy the text",children:[s.jsxRuntimeExports.jsx(oe.Copy,{}),a||null]}),s.jsxRuntimeExports.jsx(ht,{})]})}exports.CopyTextButton=Tt;
|
|
17
17
|
//# sourceMappingURL=CopyTextButton.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyTextButton.cjs","sources":["../node_modules/@undp/design-system-react/dist/ToasterHooks.js","../node_modules/@undp/design-system-react/dist/Toaster.js","../src/Components/Actions/CopyTextButton.tsx"],"sourcesContent":["import c from \"react\";\nconst d = 1, f = 1e6;\nlet i = 0;\nfunction p() {\n return i = (i + 1) % Number.MAX_SAFE_INTEGER, i.toString();\n}\nconst a = /* @__PURE__ */ new Map(), S = (t) => {\n if (a.has(t))\n return;\n const s = setTimeout(() => {\n a.delete(t), n({\n type: \"REMOVE_TOAST\",\n toastId: t\n });\n }, f);\n a.set(t, s);\n}, A = (t, s) => {\n switch (s.type) {\n case \"ADD_TOAST\":\n return {\n ...t,\n toasts: [s.toast, ...t.toasts].slice(0, d)\n };\n case \"UPDATE_TOAST\":\n return {\n ...t,\n toasts: t.toasts.map((e) => e.id === s.toast.id ? { ...e, ...s.toast } : e)\n };\n case \"DISMISS_TOAST\": {\n const { toastId: e } = s;\n return e ? S(e) : t.toasts.forEach((o) => {\n S(o.id);\n }), {\n ...t,\n toasts: t.toasts.map(\n (o) => o.id === e || e === void 0 ? {\n ...o,\n open: !1\n } : o\n )\n };\n }\n case \"REMOVE_TOAST\":\n return s.toastId === void 0 ? {\n ...t,\n toasts: []\n } : {\n ...t,\n toasts: t.toasts.filter((e) => e.id !== s.toastId)\n };\n default:\n return { ...t };\n }\n}, r = [];\nlet u = { toasts: [] };\nfunction n(t) {\n u = A(u, t), r.forEach((s) => {\n s(u);\n });\n}\nfunction O({ ...t }) {\n const s = p(), e = (T) => n({\n type: \"UPDATE_TOAST\",\n toast: { ...T, id: s }\n }), o = () => n({ type: \"DISMISS_TOAST\", toastId: s });\n return n({\n type: \"ADD_TOAST\",\n toast: {\n ...t,\n id: s,\n open: !0,\n onOpenChange: (T) => {\n T || o();\n }\n }\n }), {\n id: s,\n dismiss: o,\n update: e\n };\n}\nfunction E() {\n const [t, s] = c.useState(u);\n return c.useEffect(() => (r.push(s), () => {\n const e = r.indexOf(s);\n e > -1 && r.splice(e, 1);\n }), [t]), {\n ...t,\n toast: O,\n dismiss: (e) => n({ type: \"DISMISS_TOAST\", toastId: e })\n };\n}\nexport {\n A as reducer,\n O as toast,\n E as useToast\n};\n//# sourceMappingURL=ToasterHooks.js.map\n","import { j as s } from \"./jsx-runtime-OVHDjVDe.js\";\nimport * as a from \"react\";\nimport R, { createElement as Fe } from \"react\";\nimport { useToast as De } from \"./ToasterHooks.js\";\nimport * as Le from \"react-dom\";\nimport { c as Me, u as Oe, a as g, b as Ve } from \"./index-qYTfyJ7M.js\";\nimport { u as se, P as _, d as Ke } from \"./index-C4xSz587.js\";\nimport { c as $e } from \"./index-tvAyXPPW.js\";\nimport { B as We, R as He } from \"./index-4sb1Etb4.js\";\nimport { P as Xe } from \"./index-CykeRNke.js\";\nimport { P as Ue } from \"./index-DG3YrCr5.js\";\nimport { u as X } from \"./index-0ioNhtNM.js\";\nimport { a as ae } from \"./index-CTSQX5Nm.js\";\nimport { c as ne } from \"./index-CHPV5EwG.js\";\nimport { c as j } from \"./utils-D_Pof5Gy.js\";\nimport { X as ze } from \"./x-CnsEH4Ox.js\";\nimport { c as J } from \"./createLucideIcon-C8GTh_Qx.js\";\n/**\n * @license lucide-react v0.488.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\nconst Be = [\n [\"path\", { d: \"M21.801 10A10 10 0 1 1 17 3.335\", key: \"yps3ct\" }],\n [\"path\", { d: \"m9 11 3 3L22 4\", key: \"1pflzl\" }]\n], Ye = J(\"circle-check-big\", Be);\n/**\n * @license lucide-react v0.488.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\nconst qe = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"m15 9-6 6\", key: \"1uzhvr\" }],\n [\"path\", { d: \"m9 9 6 6\", key: \"z0biqf\" }]\n], Ge = J(\"circle-x\", qe);\n/**\n * @license lucide-react v0.488.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\nconst Je = [\n [\n \"path\",\n {\n d: \"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\",\n key: \"wmoenq\"\n }\n ],\n [\"path\", { d: \"M12 9v4\", key: \"juzpu7\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n], Qe = J(\"triangle-alert\", Je);\nvar Q = \"ToastProvider\", [Z, Ze, et] = $e(\"Toast\"), [ie, Lt] = Me(\"Toast\", [et]), [tt, U] = ie(Q), ce = (e) => {\n const {\n __scopeToast: r,\n label: o = \"Notification\",\n duration: t = 5e3,\n swipeDirection: c = \"right\",\n swipeThreshold: l = 50,\n children: p\n } = e, [v, w] = a.useState(null), [d, b] = a.useState(0), y = a.useRef(!1), A = a.useRef(!1);\n return o.trim() || console.error(\n `Invalid prop \\`label\\` supplied to \\`${Q}\\`. Expected non-empty \\`string\\`.`\n ), /* @__PURE__ */ s.jsx(Z.Provider, { scope: r, children: /* @__PURE__ */ s.jsx(\n tt,\n {\n scope: r,\n label: o,\n duration: t,\n swipeDirection: c,\n swipeThreshold: l,\n toastCount: d,\n viewport: v,\n onViewportChange: w,\n onToastAdd: a.useCallback(() => b((k) => k + 1), []),\n onToastRemove: a.useCallback(() => b((k) => k - 1), []),\n isFocusedToastEscapeKeyDownRef: y,\n isClosePausedRef: A,\n children: p\n }\n ) });\n};\nce.displayName = Q;\nvar de = \"ToastViewport\", rt = [\"F8\"], Y = \"toast.viewportPause\", q = \"toast.viewportResume\", le = a.forwardRef(\n (e, r) => {\n const {\n __scopeToast: o,\n hotkey: t = rt,\n label: c = \"Notifications ({hotkey})\",\n ...l\n } = e, p = U(de, o), v = Ze(o), w = a.useRef(null), d = a.useRef(null), b = a.useRef(null), y = a.useRef(null), A = se(r, y, p.onViewportChange), k = t.join(\"+\").replace(/Key/g, \"\").replace(/Digit/g, \"\"), N = p.toastCount > 0;\n a.useEffect(() => {\n const i = (T) => {\n t.length !== 0 && t.every((m) => T[m] || T.code === m) && y.current?.focus();\n };\n return document.addEventListener(\"keydown\", i), () => document.removeEventListener(\"keydown\", i);\n }, [t]), a.useEffect(() => {\n const i = w.current, T = y.current;\n if (N && i && T) {\n const f = () => {\n if (!p.isClosePausedRef.current) {\n const x = new CustomEvent(Y);\n T.dispatchEvent(x), p.isClosePausedRef.current = !0;\n }\n }, m = () => {\n if (p.isClosePausedRef.current) {\n const x = new CustomEvent(q);\n T.dispatchEvent(x), p.isClosePausedRef.current = !1;\n }\n }, h = (x) => {\n !i.contains(x.relatedTarget) && m();\n }, E = () => {\n i.contains(document.activeElement) || m();\n };\n return i.addEventListener(\"focusin\", f), i.addEventListener(\"focusout\", h), i.addEventListener(\"pointermove\", f), i.addEventListener(\"pointerleave\", E), window.addEventListener(\"blur\", f), window.addEventListener(\"focus\", m), () => {\n i.removeEventListener(\"focusin\", f), i.removeEventListener(\"focusout\", h), i.removeEventListener(\"pointermove\", f), i.removeEventListener(\"pointerleave\", E), window.removeEventListener(\"blur\", f), window.removeEventListener(\"focus\", m);\n };\n }\n }, [N, p.isClosePausedRef]);\n const u = a.useCallback(\n ({ tabbingDirection: i }) => {\n const f = v().map((m) => {\n const h = m.ref.current, E = [h, ...vt(h)];\n return i === \"forwards\" ? E : E.reverse();\n });\n return (i === \"forwards\" ? f.reverse() : f).flat();\n },\n [v]\n );\n return a.useEffect(() => {\n const i = y.current;\n if (i) {\n const T = (f) => {\n const m = f.altKey || f.ctrlKey || f.metaKey;\n if (f.key === \"Tab\" && !m) {\n const E = document.activeElement, x = f.shiftKey;\n if (f.target === i && x) {\n d.current?.focus();\n return;\n }\n const F = u({ tabbingDirection: x ? \"backwards\" : \"forwards\" }), V = F.findIndex((S) => S === E);\n B(F.slice(V + 1)) ? f.preventDefault() : x ? d.current?.focus() : b.current?.focus();\n }\n };\n return i.addEventListener(\"keydown\", T), () => i.removeEventListener(\"keydown\", T);\n }\n }, [v, u]), /* @__PURE__ */ s.jsxs(\n We,\n {\n ref: w,\n role: \"region\",\n \"aria-label\": c.replace(\"{hotkey}\", k),\n tabIndex: -1,\n style: { pointerEvents: N ? void 0 : \"none\" },\n children: [\n N && /* @__PURE__ */ s.jsx(\n G,\n {\n ref: d,\n onFocusFromOutsideViewport: () => {\n const i = u({\n tabbingDirection: \"forwards\"\n });\n B(i);\n }\n }\n ),\n /* @__PURE__ */ s.jsx(Z.Slot, { scope: o, children: /* @__PURE__ */ s.jsx(_.ol, { tabIndex: -1, ...l, ref: A }) }),\n N && /* @__PURE__ */ s.jsx(\n G,\n {\n ref: b,\n onFocusFromOutsideViewport: () => {\n const i = u({\n tabbingDirection: \"backwards\"\n });\n B(i);\n }\n }\n )\n ]\n }\n );\n }\n);\nle.displayName = de;\nvar ue = \"ToastFocusProxy\", G = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, onFocusFromOutsideViewport: t, ...c } = e, l = U(ue, o);\n return /* @__PURE__ */ s.jsx(\n ae,\n {\n tabIndex: 0,\n ...c,\n ref: r,\n style: { position: \"fixed\" },\n onFocus: (p) => {\n const v = p.relatedTarget;\n !l.viewport?.contains(v) && t();\n }\n }\n );\n }\n);\nG.displayName = ue;\nvar M = \"Toast\", ot = \"toast.swipeStart\", st = \"toast.swipeMove\", at = \"toast.swipeCancel\", nt = \"toast.swipeEnd\", pe = a.forwardRef(\n (e, r) => {\n const { forceMount: o, open: t, defaultOpen: c, onOpenChange: l, ...p } = e, [v, w] = Oe({\n prop: t,\n defaultProp: c ?? !0,\n onChange: l,\n caller: M\n });\n return /* @__PURE__ */ s.jsx(Ue, { present: o || v, children: /* @__PURE__ */ s.jsx(\n dt,\n {\n open: v,\n ...p,\n ref: r,\n onClose: () => w(!1),\n onPause: X(e.onPause),\n onResume: X(e.onResume),\n onSwipeStart: g(e.onSwipeStart, (d) => {\n d.currentTarget.setAttribute(\"data-swipe\", \"start\");\n }),\n onSwipeMove: g(e.onSwipeMove, (d) => {\n const { x: b, y } = d.detail.delta;\n d.currentTarget.setAttribute(\"data-swipe\", \"move\"), d.currentTarget.style.setProperty(\"--radix-toast-swipe-move-x\", `${b}px`), d.currentTarget.style.setProperty(\"--radix-toast-swipe-move-y\", `${y}px`);\n }),\n onSwipeCancel: g(e.onSwipeCancel, (d) => {\n d.currentTarget.setAttribute(\"data-swipe\", \"cancel\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-x\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-y\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-end-x\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-end-y\");\n }),\n onSwipeEnd: g(e.onSwipeEnd, (d) => {\n const { x: b, y } = d.detail.delta;\n d.currentTarget.setAttribute(\"data-swipe\", \"end\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-x\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-y\"), d.currentTarget.style.setProperty(\"--radix-toast-swipe-end-x\", `${b}px`), d.currentTarget.style.setProperty(\"--radix-toast-swipe-end-y\", `${y}px`), w(!1);\n })\n }\n ) });\n }\n);\npe.displayName = M;\nvar [it, ct] = ie(M, {\n onClose() {\n }\n}), dt = a.forwardRef(\n (e, r) => {\n const {\n __scopeToast: o,\n type: t = \"foreground\",\n duration: c,\n open: l,\n onClose: p,\n onEscapeKeyDown: v,\n onPause: w,\n onResume: d,\n onSwipeStart: b,\n onSwipeMove: y,\n onSwipeCancel: A,\n onSwipeEnd: k,\n ...N\n } = e, u = U(M, o), [i, T] = a.useState(null), f = se(r, (n) => T(n)), m = a.useRef(null), h = a.useRef(null), E = c || u.duration, x = a.useRef(0), I = a.useRef(E), O = a.useRef(0), { onToastAdd: F, onToastRemove: V } = u, S = X(() => {\n i?.contains(document.activeElement) && u.viewport?.focus(), p();\n }), K = a.useCallback(\n (n) => {\n !n || n === 1 / 0 || (window.clearTimeout(O.current), x.current = (/* @__PURE__ */ new Date()).getTime(), O.current = window.setTimeout(S, n));\n },\n [S]\n );\n a.useEffect(() => {\n const n = u.viewport;\n if (n) {\n const P = () => {\n K(I.current), d?.();\n }, C = () => {\n const D = (/* @__PURE__ */ new Date()).getTime() - x.current;\n I.current = I.current - D, window.clearTimeout(O.current), w?.();\n };\n return n.addEventListener(Y, C), n.addEventListener(q, P), () => {\n n.removeEventListener(Y, C), n.removeEventListener(q, P);\n };\n }\n }, [u.viewport, E, w, d, K]), a.useEffect(() => {\n l && !u.isClosePausedRef.current && K(E);\n }, [l, E, u.isClosePausedRef, K]), a.useEffect(() => (F(), () => V()), [F, V]);\n const te = a.useMemo(() => i ? Te(i) : null, [i]);\n return u.viewport ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [\n te && /* @__PURE__ */ s.jsx(\n lt,\n {\n __scopeToast: o,\n role: \"status\",\n \"aria-live\": t === \"foreground\" ? \"assertive\" : \"polite\",\n children: te\n }\n ),\n /* @__PURE__ */ s.jsx(it, { scope: o, onClose: S, children: Le.createPortal(\n /* @__PURE__ */ s.jsx(Z.ItemSlot, { scope: o, children: /* @__PURE__ */ s.jsx(\n He,\n {\n asChild: !0,\n onEscapeKeyDown: g(v, () => {\n u.isFocusedToastEscapeKeyDownRef.current || S(), u.isFocusedToastEscapeKeyDownRef.current = !1;\n }),\n children: /* @__PURE__ */ s.jsx(\n _.li,\n {\n tabIndex: 0,\n \"data-state\": l ? \"open\" : \"closed\",\n \"data-swipe-direction\": u.swipeDirection,\n ...N,\n ref: f,\n style: { userSelect: \"none\", touchAction: \"none\", ...e.style },\n onKeyDown: g(e.onKeyDown, (n) => {\n n.key === \"Escape\" && (v?.(n.nativeEvent), n.nativeEvent.defaultPrevented || (u.isFocusedToastEscapeKeyDownRef.current = !0, S()));\n }),\n onPointerDown: g(e.onPointerDown, (n) => {\n n.button === 0 && (m.current = { x: n.clientX, y: n.clientY });\n }),\n onPointerMove: g(e.onPointerMove, (n) => {\n if (!m.current) return;\n const P = n.clientX - m.current.x, C = n.clientY - m.current.y, D = !!h.current, L = [\"left\", \"right\"].includes(u.swipeDirection), $ = [\"left\", \"up\"].includes(u.swipeDirection) ? Math.min : Math.max, Ae = L ? $(0, P) : 0, Ie = L ? 0 : $(0, C), z = n.pointerType === \"touch\" ? 10 : 2, W = { x: Ae, y: Ie }, re = { originalEvent: n, delta: W };\n D ? (h.current = W, H(st, y, re, {\n discrete: !1\n })) : oe(W, u.swipeDirection, z) ? (h.current = W, H(ot, b, re, {\n discrete: !1\n }), n.target.setPointerCapture(n.pointerId)) : (Math.abs(P) > z || Math.abs(C) > z) && (m.current = null);\n }),\n onPointerUp: g(e.onPointerUp, (n) => {\n const P = h.current, C = n.target;\n if (C.hasPointerCapture(n.pointerId) && C.releasePointerCapture(n.pointerId), h.current = null, m.current = null, P) {\n const D = n.currentTarget, L = { originalEvent: n, delta: P };\n oe(P, u.swipeDirection, u.swipeThreshold) ? H(nt, k, L, {\n discrete: !0\n }) : H(\n at,\n A,\n L,\n {\n discrete: !0\n }\n ), D.addEventListener(\"click\", ($) => $.preventDefault(), {\n once: !0\n });\n }\n })\n }\n )\n }\n ) }),\n u.viewport\n ) })\n ] }) : null;\n }\n), lt = (e) => {\n const { __scopeToast: r, children: o, ...t } = e, c = U(M, r), [l, p] = a.useState(!1), [v, w] = a.useState(!1);\n return ft(() => p(!0)), a.useEffect(() => {\n const d = window.setTimeout(() => w(!0), 1e3);\n return () => window.clearTimeout(d);\n }, []), v ? null : /* @__PURE__ */ s.jsx(Xe, { asChild: !0, children: /* @__PURE__ */ s.jsx(ae, { ...t, children: l && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [\n c.label,\n \" \",\n o\n ] }) }) });\n}, ut = \"ToastTitle\", fe = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, ...t } = e;\n return /* @__PURE__ */ s.jsx(_.div, { ...t, ref: r });\n }\n);\nfe.displayName = ut;\nvar pt = \"ToastDescription\", me = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, ...t } = e;\n return /* @__PURE__ */ s.jsx(_.div, { ...t, ref: r });\n }\n);\nme.displayName = pt;\nvar ve = \"ToastAction\", we = a.forwardRef(\n (e, r) => {\n const { altText: o, ...t } = e;\n return o.trim() ? /* @__PURE__ */ s.jsx(ye, { altText: o, asChild: !0, children: /* @__PURE__ */ s.jsx(ee, { ...t, ref: r }) }) : (console.error(\n `Invalid prop \\`altText\\` supplied to \\`${ve}\\`. Expected non-empty \\`string\\`.`\n ), null);\n }\n);\nwe.displayName = ve;\nvar xe = \"ToastClose\", ee = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, ...t } = e, c = ct(xe, o);\n return /* @__PURE__ */ s.jsx(ye, { asChild: !0, children: /* @__PURE__ */ s.jsx(\n _.button,\n {\n type: \"button\",\n ...t,\n ref: r,\n onClick: g(e.onClick, c.onClose)\n }\n ) });\n }\n);\nee.displayName = xe;\nvar ye = a.forwardRef((e, r) => {\n const { __scopeToast: o, altText: t, ...c } = e;\n return /* @__PURE__ */ s.jsx(\n _.div,\n {\n \"data-radix-toast-announce-exclude\": \"\",\n \"data-radix-toast-announce-alt\": t || void 0,\n ...c,\n ref: r\n }\n );\n});\nfunction Te(e) {\n const r = [];\n return Array.from(e.childNodes).forEach((t) => {\n if (t.nodeType === t.TEXT_NODE && t.textContent && r.push(t.textContent), mt(t)) {\n const c = t.ariaHidden || t.hidden || t.style.display === \"none\", l = t.dataset.radixToastAnnounceExclude === \"\";\n if (!c)\n if (l) {\n const p = t.dataset.radixToastAnnounceAlt;\n p && r.push(p);\n } else\n r.push(...Te(t));\n }\n }), r;\n}\nfunction H(e, r, o, { discrete: t }) {\n const c = o.originalEvent.currentTarget, l = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: o });\n r && c.addEventListener(e, r, { once: !0 }), t ? Ke(c, l) : c.dispatchEvent(l);\n}\nvar oe = (e, r, o = 0) => {\n const t = Math.abs(e.x), c = Math.abs(e.y), l = t > c;\n return r === \"left\" || r === \"right\" ? l && t > o : !l && c > o;\n};\nfunction ft(e = () => {\n}) {\n const r = X(e);\n Ve(() => {\n let o = 0, t = 0;\n return o = window.requestAnimationFrame(() => t = window.requestAnimationFrame(r)), () => {\n window.cancelAnimationFrame(o), window.cancelAnimationFrame(t);\n };\n }, [r]);\n}\nfunction mt(e) {\n return e.nodeType === e.ELEMENT_NODE;\n}\nfunction vt(e) {\n const r = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (t) => {\n const c = t.tagName === \"INPUT\" && t.type === \"hidden\";\n return t.disabled || t.hidden || c ? NodeFilter.FILTER_SKIP : t.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n for (; o.nextNode(); ) r.push(o.currentNode);\n return r;\n}\nfunction B(e) {\n const r = document.activeElement;\n return e.some((o) => o === r ? !0 : (o.focus(), document.activeElement !== r));\n}\nvar wt = ce, he = le, Ee = pe, be = fe, ge = me, Pe = we, Ce = ee;\nconst xt = wt, Re = R.createContext(null), ke = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n he,\n {\n ...r,\n ref: o,\n className: j(\n \"fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n e\n )\n }\n));\nke.displayName = he.displayName;\nconst yt = ne(\n \"group pointer-events-auto relative shadow-xs bg-primary-white dark:bg-primary-gray-650 flex w-full text-primary-black dark:text-primary-white items-center justify-between flex gap-2 overflow-hidden rounded-sm border border-primary-gray-400 p-2 pr-6 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border border-primary-gray-400 dark:border-0\",\n success: \"border-t-4 border-accent-dark-green dark:border-b-0 dark:border-l-0 dark:border-r-0\",\n warning: \"border-t-4 border-accent-dark-yellow dark:border-b-0 dark:border-l-0 dark:border-r-0\",\n destructive: \"border-t-4 border-accent-dark-red dark:border-b-0 dark:border-l-0 dark:border-r-0\"\n }\n },\n defaultVariants: { variant: \"default\" }\n }\n), Tt = ne(\"\", {\n variants: {\n variant: {\n default: \"text-primary-black dark:text-primary-white\",\n success: \"text-accent-dark-green\",\n warning: \"text-accent-dark-yellow\",\n destructive: \"text-accent-dark-red\"\n }\n },\n defaultVariants: { variant: \"default\" }\n}), Ne = R.forwardRef(({ className: e, variant: r, ...o }, t) => /* @__PURE__ */ s.jsx(Re.Provider, { value: { variant: r }, children: /* @__PURE__ */ s.jsx(\n Ee,\n {\n ...o,\n ref: t,\n className: j(yt({ variant: r }), e)\n }\n) }));\nNe.displayName = Ee.displayName;\nconst ht = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n Pe,\n {\n ...r,\n ref: o,\n className: j(\n \"inline-flex h-8 shrink-0 items-center text-primary-gray-700 dark:text-primary-gray-100 justify-center rounded-none bg-transparent px-3 text-sm font-medium transition-colors hover:bg-primary-gray-200 dark:hover:bg-primary-gray-600 focus:outline-hidden focus:ring-1 disabled:pointer-events-none disabled:opacity-50\",\n e\n )\n }\n));\nht.displayName = Pe.displayName;\nconst Se = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n Ce,\n {\n ...r,\n ref: o,\n className: j(\n \"absolute right-1 top-1 rounded-md p-1 text-primary-gray-700/50 dark:text-primary-gray-100/50 opacity-0 transition-opacity hover:text-primary-gray-700 dark:hover:text-primary-gray-100 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100\",\n e\n ),\n \"toast-close\": \"\",\n children: /* @__PURE__ */ s.jsx(ze, { className: \"h-4 w-4\" })\n }\n));\nSe.displayName = Ce.displayName;\nconst _e = R.forwardRef(({ className: e, ...r }, o) => {\n const t = R.useContext(Re), c = j(\n Tt({ variant: t?.variant }),\n \"text-lg font-bold [&+div]:text-xs\",\n e\n );\n let l = null;\n switch (t?.variant) {\n case \"destructive\":\n l = /* @__PURE__ */ s.jsx(Ge, { className: \"h-4 w-4 stroke-accent-dark-red\", strokeWidth: 2 });\n break;\n case \"success\":\n l = /* @__PURE__ */ s.jsx(Ye, { className: \"h-4 w-4 stroke-accent-dark-green\", strokeWidth: 2 });\n break;\n case \"warning\":\n l = /* @__PURE__ */ s.jsx(Qe, { className: \"h-4 w-4 stroke-accent-dark-yellow\", strokeWidth: 2 });\n break;\n default:\n l = null;\n break;\n }\n return /* @__PURE__ */ s.jsxs(\"div\", { className: \"flex gap-x-1 items-center\", children: [\n l,\n /* @__PURE__ */ s.jsx(be, { ...r, ref: o, className: c })\n ] });\n});\n_e.displayName = be.displayName;\nconst je = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n ge,\n {\n ...r,\n ref: o,\n className: j(\"text-base opacity-90 dark:text-primary-white\", e)\n }\n));\nje.displayName = ge.displayName;\nfunction Mt() {\n const { toasts: e } = De();\n return /* @__PURE__ */ s.jsxs(xt, { children: [\n e.map(({ id: r, title: o, description: t, action: c, ...l }) => /* @__PURE__ */ Fe(Ne, { ...l, key: r }, /* @__PURE__ */ s.jsxs(\"div\", { className: \"grid gap-1\", children: [\n o && /* @__PURE__ */ s.jsx(_e, { children: o }),\n t && /* @__PURE__ */ s.jsx(je, { children: t })\n ] }), c, /* @__PURE__ */ s.jsx(Se, {}))),\n /* @__PURE__ */ s.jsx(ke, {})\n ] });\n}\nexport {\n Mt as Toaster\n};\n//# sourceMappingURL=Toaster.js.map\n","import { Button } from '@undp/design-system-react/Button';\r\nimport { Toaster } from '@undp/design-system-react/Toaster';\r\nimport { useToast } from '@undp/design-system-react/ToasterHooks';\r\n\r\nimport { Copy } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n text: string;\r\n successMessage?: string;\r\n buttonText?: string;\r\n buttonSmall?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function CopyTextButton(props: Props) {\r\n const {\r\n text,\r\n successMessage = 'Text copied',\r\n buttonText,\r\n buttonSmall = false,\r\n className = '',\r\n } = props;\r\n const { toast } = useToast();\r\n return (\r\n <>\r\n <Button\r\n variant='tertiary'\r\n className={`${buttonSmall ? 'p-2' : 'py-4 px-6'} ${className}`}\r\n onClick={() => {\r\n navigator.clipboard.writeText(text);\r\n toast({\r\n variant: 'success',\r\n description: successMessage,\r\n duration: 1000,\r\n });\r\n }}\r\n aria-label='Click to copy the text'\r\n >\r\n <Copy />\r\n {buttonText || null}\r\n </Button>\r\n <Toaster />\r\n </>\r\n );\r\n}\r\n"],"names":["d","f","i","p","a","S","t","s","n","A","e","o","r","u","O","T","E","c","Be","Ye","J","qe","Ge","Je","Qe","Z","et","$e","ie","Lt","Me","tt","U","ce","l","v","w","b","y","k","de","rt","q","le","se","N","m","x","h","vt","F","V","B","We","G","_","ue","ae","ot","st","nt","pe","Oe","Ue","dt","X","g","it","ct","I","K","P","C","D","te","Te","lt","Le","He","L","$","Ae","Ie","z","W","re","H","oe","ft","Xe","ut","fe","pt","me","ve","we","ye","xe","mt","Ke","Ve","wt","he","Ee","be","ge","Pe","Ce","R","ke","j","yt","ne","Tt","Ne","ht","Se","ze","_e","je","Mt","De","Fe","CopyTextButton","props","text","successMessage","buttonText","buttonSmall","className","toast","useToast","jsxs","Fragment","Button","jsx","Copy","Toaster"],"mappings":"mnBACMA,GAAI,EAAGC,GAAI,IACjB,IAAIC,EAAI,EACR,SAASC,IAAI,CACX,OAAOD,GAAK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AK,GAAI,CAAE,SAAU,CAC5C,EAAE,IAAI,CAAC,CAAE,GAAI,EAAG,MAAOI,EAAG,YAAaL,EAAG,OAAQW,EAAG,GAAGiB,CAAC,IAAuBwF,EAAAA,cAAGR,GAAI,CAAE,GAAGhF,EAAG,IAAK,CAAC,EAAoB3B,KAAE,KAAK,MAAO,CAAE,UAAW,aAAc,SAAU,CAC1KI,GAAqBJ,EAAAA,GAAE,IAAI+G,GAAI,CAAE,SAAU3G,EAAG,EAC9CL,GAAqBC,EAAAA,GAAE,IAAIgH,GAAI,CAAE,SAAUjH,CAAC,CAAE,CACpD,CAAK,CAAE,EAAGW,EAAmBV,EAAAA,GAAE,IAAI6G,GAAI,CAAA,CAAE,CAAC,CAAC,EACvB7G,KAAE,IAAIsG,GAAI,CAAA,CAAE,CAChC,EAAK,CACL,CCvjBO,SAASc,GAAeC,EAAc,CAC3C,KAAM,CACJ,KAAAC,EACA,eAAAC,EAAiB,cACjB,WAAAC,EACA,YAAAC,EAAc,GACd,UAAAC,EAAY,EAAA,EACVL,EACE,CAAE,MAAAM,CAAA,EAAUC,GAAA,EAClB,OACEC,EAAAA,kBAAAA,KAAAC,6BAAA,CACE,SAAA,CAAAD,EAAAA,kBAAAA,KAACE,GAAAA,EAAA,CACC,QAAQ,WACR,UAAW,GAAGN,EAAc,MAAQ,WAAW,IAAIC,CAAS,GAC5D,QAAS,IAAM,CACb,UAAU,UAAU,UAAUJ,CAAI,EAClCK,EAAM,CACJ,QAAS,UACT,YAAaJ,EACb,SAAU,GAAA,CACX,CACH,EACA,aAAW,yBAEX,SAAA,CAAAS,EAAAA,kBAAAA,IAACC,GAAAA,KAAA,EAAK,EACLT,GAAc,IAAA,CAAA,CAAA,0BAEhBU,GAAA,CAAA,CAAQ,CAAA,EACX,CAEJ","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"CopyTextButton.cjs","sources":["../node_modules/@undp/design-system-react/dist/ToasterHooks.js","../node_modules/@undp/design-system-react/dist/Toaster.js","../src/Components/Actions/CopyTextButton.tsx"],"sourcesContent":["import c from \"react\";\nconst d = 1, f = 1e6;\nlet i = 0;\nfunction p() {\n return i = (i + 1) % Number.MAX_SAFE_INTEGER, i.toString();\n}\nconst a = /* @__PURE__ */ new Map(), S = (t) => {\n if (a.has(t))\n return;\n const s = setTimeout(() => {\n a.delete(t), n({\n type: \"REMOVE_TOAST\",\n toastId: t\n });\n }, f);\n a.set(t, s);\n}, A = (t, s) => {\n switch (s.type) {\n case \"ADD_TOAST\":\n return {\n ...t,\n toasts: [s.toast, ...t.toasts].slice(0, d)\n };\n case \"UPDATE_TOAST\":\n return {\n ...t,\n toasts: t.toasts.map((e) => e.id === s.toast.id ? { ...e, ...s.toast } : e)\n };\n case \"DISMISS_TOAST\": {\n const { toastId: e } = s;\n return e ? S(e) : t.toasts.forEach((o) => {\n S(o.id);\n }), {\n ...t,\n toasts: t.toasts.map(\n (o) => o.id === e || e === void 0 ? {\n ...o,\n open: !1\n } : o\n )\n };\n }\n case \"REMOVE_TOAST\":\n return s.toastId === void 0 ? {\n ...t,\n toasts: []\n } : {\n ...t,\n toasts: t.toasts.filter((e) => e.id !== s.toastId)\n };\n default:\n return { ...t };\n }\n}, r = [];\nlet u = { toasts: [] };\nfunction n(t) {\n u = A(u, t), r.forEach((s) => {\n s(u);\n });\n}\nfunction O({ ...t }) {\n const s = p(), e = (T) => n({\n type: \"UPDATE_TOAST\",\n toast: { ...T, id: s }\n }), o = () => n({ type: \"DISMISS_TOAST\", toastId: s });\n return n({\n type: \"ADD_TOAST\",\n toast: {\n ...t,\n id: s,\n open: !0,\n onOpenChange: (T) => {\n T || o();\n }\n }\n }), {\n id: s,\n dismiss: o,\n update: e\n };\n}\nfunction E() {\n const [t, s] = c.useState(u);\n return c.useEffect(() => (r.push(s), () => {\n const e = r.indexOf(s);\n e > -1 && r.splice(e, 1);\n }), [t]), {\n ...t,\n toast: O,\n dismiss: (e) => n({ type: \"DISMISS_TOAST\", toastId: e })\n };\n}\nexport {\n A as reducer,\n O as toast,\n E as useToast\n};\n//# sourceMappingURL=ToasterHooks.js.map\n","import { j as s } from \"./jsx-runtime-OVHDjVDe.js\";\nimport * as a from \"react\";\nimport R, { createElement as Fe } from \"react\";\nimport { useToast as De } from \"./ToasterHooks.js\";\nimport * as Le from \"react-dom\";\nimport { c as Me, u as Oe, a as g, b as Ve } from \"./index-qYTfyJ7M.js\";\nimport { u as se, P as _, d as Ke } from \"./index-C4xSz587.js\";\nimport { c as $e } from \"./index-tvAyXPPW.js\";\nimport { B as We, R as He } from \"./index-4sb1Etb4.js\";\nimport { P as Xe } from \"./index-CykeRNke.js\";\nimport { P as Ue } from \"./index-DG3YrCr5.js\";\nimport { u as X } from \"./index-0ioNhtNM.js\";\nimport { a as ae } from \"./index-CTSQX5Nm.js\";\nimport { c as ne } from \"./index-CHPV5EwG.js\";\nimport { c as j } from \"./utils-D_Pof5Gy.js\";\nimport { X as ze } from \"./x-BBpi7a_7.js\";\nimport { c as J } from \"./createLucideIcon-CI1yJrZf.js\";\n/**\n * @license lucide-react v0.542.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\nconst Be = [\n [\"path\", { d: \"M21.801 10A10 10 0 1 1 17 3.335\", key: \"yps3ct\" }],\n [\"path\", { d: \"m9 11 3 3L22 4\", key: \"1pflzl\" }]\n], Ye = J(\"circle-check-big\", Be);\n/**\n * @license lucide-react v0.542.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\nconst qe = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"m15 9-6 6\", key: \"1uzhvr\" }],\n [\"path\", { d: \"m9 9 6 6\", key: \"z0biqf\" }]\n], Ge = J(\"circle-x\", qe);\n/**\n * @license lucide-react v0.542.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\nconst Je = [\n [\n \"path\",\n {\n d: \"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\",\n key: \"wmoenq\"\n }\n ],\n [\"path\", { d: \"M12 9v4\", key: \"juzpu7\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n], Qe = J(\"triangle-alert\", Je);\nvar Q = \"ToastProvider\", [Z, Ze, et] = $e(\"Toast\"), [ie, Lt] = Me(\"Toast\", [et]), [tt, U] = ie(Q), ce = (e) => {\n const {\n __scopeToast: r,\n label: o = \"Notification\",\n duration: t = 5e3,\n swipeDirection: c = \"right\",\n swipeThreshold: l = 50,\n children: p\n } = e, [v, w] = a.useState(null), [d, b] = a.useState(0), y = a.useRef(!1), A = a.useRef(!1);\n return o.trim() || console.error(\n `Invalid prop \\`label\\` supplied to \\`${Q}\\`. Expected non-empty \\`string\\`.`\n ), /* @__PURE__ */ s.jsx(Z.Provider, { scope: r, children: /* @__PURE__ */ s.jsx(\n tt,\n {\n scope: r,\n label: o,\n duration: t,\n swipeDirection: c,\n swipeThreshold: l,\n toastCount: d,\n viewport: v,\n onViewportChange: w,\n onToastAdd: a.useCallback(() => b((k) => k + 1), []),\n onToastRemove: a.useCallback(() => b((k) => k - 1), []),\n isFocusedToastEscapeKeyDownRef: y,\n isClosePausedRef: A,\n children: p\n }\n ) });\n};\nce.displayName = Q;\nvar de = \"ToastViewport\", rt = [\"F8\"], Y = \"toast.viewportPause\", q = \"toast.viewportResume\", le = a.forwardRef(\n (e, r) => {\n const {\n __scopeToast: o,\n hotkey: t = rt,\n label: c = \"Notifications ({hotkey})\",\n ...l\n } = e, p = U(de, o), v = Ze(o), w = a.useRef(null), d = a.useRef(null), b = a.useRef(null), y = a.useRef(null), A = se(r, y, p.onViewportChange), k = t.join(\"+\").replace(/Key/g, \"\").replace(/Digit/g, \"\"), N = p.toastCount > 0;\n a.useEffect(() => {\n const i = (T) => {\n t.length !== 0 && t.every((m) => T[m] || T.code === m) && y.current?.focus();\n };\n return document.addEventListener(\"keydown\", i), () => document.removeEventListener(\"keydown\", i);\n }, [t]), a.useEffect(() => {\n const i = w.current, T = y.current;\n if (N && i && T) {\n const f = () => {\n if (!p.isClosePausedRef.current) {\n const x = new CustomEvent(Y);\n T.dispatchEvent(x), p.isClosePausedRef.current = !0;\n }\n }, m = () => {\n if (p.isClosePausedRef.current) {\n const x = new CustomEvent(q);\n T.dispatchEvent(x), p.isClosePausedRef.current = !1;\n }\n }, h = (x) => {\n !i.contains(x.relatedTarget) && m();\n }, E = () => {\n i.contains(document.activeElement) || m();\n };\n return i.addEventListener(\"focusin\", f), i.addEventListener(\"focusout\", h), i.addEventListener(\"pointermove\", f), i.addEventListener(\"pointerleave\", E), window.addEventListener(\"blur\", f), window.addEventListener(\"focus\", m), () => {\n i.removeEventListener(\"focusin\", f), i.removeEventListener(\"focusout\", h), i.removeEventListener(\"pointermove\", f), i.removeEventListener(\"pointerleave\", E), window.removeEventListener(\"blur\", f), window.removeEventListener(\"focus\", m);\n };\n }\n }, [N, p.isClosePausedRef]);\n const u = a.useCallback(\n ({ tabbingDirection: i }) => {\n const f = v().map((m) => {\n const h = m.ref.current, E = [h, ...vt(h)];\n return i === \"forwards\" ? E : E.reverse();\n });\n return (i === \"forwards\" ? f.reverse() : f).flat();\n },\n [v]\n );\n return a.useEffect(() => {\n const i = y.current;\n if (i) {\n const T = (f) => {\n const m = f.altKey || f.ctrlKey || f.metaKey;\n if (f.key === \"Tab\" && !m) {\n const E = document.activeElement, x = f.shiftKey;\n if (f.target === i && x) {\n d.current?.focus();\n return;\n }\n const F = u({ tabbingDirection: x ? \"backwards\" : \"forwards\" }), V = F.findIndex((S) => S === E);\n B(F.slice(V + 1)) ? f.preventDefault() : x ? d.current?.focus() : b.current?.focus();\n }\n };\n return i.addEventListener(\"keydown\", T), () => i.removeEventListener(\"keydown\", T);\n }\n }, [v, u]), /* @__PURE__ */ s.jsxs(\n We,\n {\n ref: w,\n role: \"region\",\n \"aria-label\": c.replace(\"{hotkey}\", k),\n tabIndex: -1,\n style: { pointerEvents: N ? void 0 : \"none\" },\n children: [\n N && /* @__PURE__ */ s.jsx(\n G,\n {\n ref: d,\n onFocusFromOutsideViewport: () => {\n const i = u({\n tabbingDirection: \"forwards\"\n });\n B(i);\n }\n }\n ),\n /* @__PURE__ */ s.jsx(Z.Slot, { scope: o, children: /* @__PURE__ */ s.jsx(_.ol, { tabIndex: -1, ...l, ref: A }) }),\n N && /* @__PURE__ */ s.jsx(\n G,\n {\n ref: b,\n onFocusFromOutsideViewport: () => {\n const i = u({\n tabbingDirection: \"backwards\"\n });\n B(i);\n }\n }\n )\n ]\n }\n );\n }\n);\nle.displayName = de;\nvar ue = \"ToastFocusProxy\", G = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, onFocusFromOutsideViewport: t, ...c } = e, l = U(ue, o);\n return /* @__PURE__ */ s.jsx(\n ae,\n {\n tabIndex: 0,\n ...c,\n ref: r,\n style: { position: \"fixed\" },\n onFocus: (p) => {\n const v = p.relatedTarget;\n !l.viewport?.contains(v) && t();\n }\n }\n );\n }\n);\nG.displayName = ue;\nvar M = \"Toast\", ot = \"toast.swipeStart\", st = \"toast.swipeMove\", at = \"toast.swipeCancel\", nt = \"toast.swipeEnd\", pe = a.forwardRef(\n (e, r) => {\n const { forceMount: o, open: t, defaultOpen: c, onOpenChange: l, ...p } = e, [v, w] = Oe({\n prop: t,\n defaultProp: c ?? !0,\n onChange: l,\n caller: M\n });\n return /* @__PURE__ */ s.jsx(Ue, { present: o || v, children: /* @__PURE__ */ s.jsx(\n dt,\n {\n open: v,\n ...p,\n ref: r,\n onClose: () => w(!1),\n onPause: X(e.onPause),\n onResume: X(e.onResume),\n onSwipeStart: g(e.onSwipeStart, (d) => {\n d.currentTarget.setAttribute(\"data-swipe\", \"start\");\n }),\n onSwipeMove: g(e.onSwipeMove, (d) => {\n const { x: b, y } = d.detail.delta;\n d.currentTarget.setAttribute(\"data-swipe\", \"move\"), d.currentTarget.style.setProperty(\"--radix-toast-swipe-move-x\", `${b}px`), d.currentTarget.style.setProperty(\"--radix-toast-swipe-move-y\", `${y}px`);\n }),\n onSwipeCancel: g(e.onSwipeCancel, (d) => {\n d.currentTarget.setAttribute(\"data-swipe\", \"cancel\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-x\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-y\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-end-x\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-end-y\");\n }),\n onSwipeEnd: g(e.onSwipeEnd, (d) => {\n const { x: b, y } = d.detail.delta;\n d.currentTarget.setAttribute(\"data-swipe\", \"end\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-x\"), d.currentTarget.style.removeProperty(\"--radix-toast-swipe-move-y\"), d.currentTarget.style.setProperty(\"--radix-toast-swipe-end-x\", `${b}px`), d.currentTarget.style.setProperty(\"--radix-toast-swipe-end-y\", `${y}px`), w(!1);\n })\n }\n ) });\n }\n);\npe.displayName = M;\nvar [it, ct] = ie(M, {\n onClose() {\n }\n}), dt = a.forwardRef(\n (e, r) => {\n const {\n __scopeToast: o,\n type: t = \"foreground\",\n duration: c,\n open: l,\n onClose: p,\n onEscapeKeyDown: v,\n onPause: w,\n onResume: d,\n onSwipeStart: b,\n onSwipeMove: y,\n onSwipeCancel: A,\n onSwipeEnd: k,\n ...N\n } = e, u = U(M, o), [i, T] = a.useState(null), f = se(r, (n) => T(n)), m = a.useRef(null), h = a.useRef(null), E = c || u.duration, x = a.useRef(0), I = a.useRef(E), O = a.useRef(0), { onToastAdd: F, onToastRemove: V } = u, S = X(() => {\n i?.contains(document.activeElement) && u.viewport?.focus(), p();\n }), K = a.useCallback(\n (n) => {\n !n || n === 1 / 0 || (window.clearTimeout(O.current), x.current = (/* @__PURE__ */ new Date()).getTime(), O.current = window.setTimeout(S, n));\n },\n [S]\n );\n a.useEffect(() => {\n const n = u.viewport;\n if (n) {\n const P = () => {\n K(I.current), d?.();\n }, C = () => {\n const D = (/* @__PURE__ */ new Date()).getTime() - x.current;\n I.current = I.current - D, window.clearTimeout(O.current), w?.();\n };\n return n.addEventListener(Y, C), n.addEventListener(q, P), () => {\n n.removeEventListener(Y, C), n.removeEventListener(q, P);\n };\n }\n }, [u.viewport, E, w, d, K]), a.useEffect(() => {\n l && !u.isClosePausedRef.current && K(E);\n }, [l, E, u.isClosePausedRef, K]), a.useEffect(() => (F(), () => V()), [F, V]);\n const te = a.useMemo(() => i ? Te(i) : null, [i]);\n return u.viewport ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [\n te && /* @__PURE__ */ s.jsx(\n lt,\n {\n __scopeToast: o,\n role: \"status\",\n \"aria-live\": t === \"foreground\" ? \"assertive\" : \"polite\",\n children: te\n }\n ),\n /* @__PURE__ */ s.jsx(it, { scope: o, onClose: S, children: Le.createPortal(\n /* @__PURE__ */ s.jsx(Z.ItemSlot, { scope: o, children: /* @__PURE__ */ s.jsx(\n He,\n {\n asChild: !0,\n onEscapeKeyDown: g(v, () => {\n u.isFocusedToastEscapeKeyDownRef.current || S(), u.isFocusedToastEscapeKeyDownRef.current = !1;\n }),\n children: /* @__PURE__ */ s.jsx(\n _.li,\n {\n tabIndex: 0,\n \"data-state\": l ? \"open\" : \"closed\",\n \"data-swipe-direction\": u.swipeDirection,\n ...N,\n ref: f,\n style: { userSelect: \"none\", touchAction: \"none\", ...e.style },\n onKeyDown: g(e.onKeyDown, (n) => {\n n.key === \"Escape\" && (v?.(n.nativeEvent), n.nativeEvent.defaultPrevented || (u.isFocusedToastEscapeKeyDownRef.current = !0, S()));\n }),\n onPointerDown: g(e.onPointerDown, (n) => {\n n.button === 0 && (m.current = { x: n.clientX, y: n.clientY });\n }),\n onPointerMove: g(e.onPointerMove, (n) => {\n if (!m.current) return;\n const P = n.clientX - m.current.x, C = n.clientY - m.current.y, D = !!h.current, L = [\"left\", \"right\"].includes(u.swipeDirection), $ = [\"left\", \"up\"].includes(u.swipeDirection) ? Math.min : Math.max, Ae = L ? $(0, P) : 0, Ie = L ? 0 : $(0, C), z = n.pointerType === \"touch\" ? 10 : 2, W = { x: Ae, y: Ie }, re = { originalEvent: n, delta: W };\n D ? (h.current = W, H(st, y, re, {\n discrete: !1\n })) : oe(W, u.swipeDirection, z) ? (h.current = W, H(ot, b, re, {\n discrete: !1\n }), n.target.setPointerCapture(n.pointerId)) : (Math.abs(P) > z || Math.abs(C) > z) && (m.current = null);\n }),\n onPointerUp: g(e.onPointerUp, (n) => {\n const P = h.current, C = n.target;\n if (C.hasPointerCapture(n.pointerId) && C.releasePointerCapture(n.pointerId), h.current = null, m.current = null, P) {\n const D = n.currentTarget, L = { originalEvent: n, delta: P };\n oe(P, u.swipeDirection, u.swipeThreshold) ? H(nt, k, L, {\n discrete: !0\n }) : H(\n at,\n A,\n L,\n {\n discrete: !0\n }\n ), D.addEventListener(\"click\", ($) => $.preventDefault(), {\n once: !0\n });\n }\n })\n }\n )\n }\n ) }),\n u.viewport\n ) })\n ] }) : null;\n }\n), lt = (e) => {\n const { __scopeToast: r, children: o, ...t } = e, c = U(M, r), [l, p] = a.useState(!1), [v, w] = a.useState(!1);\n return ft(() => p(!0)), a.useEffect(() => {\n const d = window.setTimeout(() => w(!0), 1e3);\n return () => window.clearTimeout(d);\n }, []), v ? null : /* @__PURE__ */ s.jsx(Xe, { asChild: !0, children: /* @__PURE__ */ s.jsx(ae, { ...t, children: l && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [\n c.label,\n \" \",\n o\n ] }) }) });\n}, ut = \"ToastTitle\", fe = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, ...t } = e;\n return /* @__PURE__ */ s.jsx(_.div, { ...t, ref: r });\n }\n);\nfe.displayName = ut;\nvar pt = \"ToastDescription\", me = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, ...t } = e;\n return /* @__PURE__ */ s.jsx(_.div, { ...t, ref: r });\n }\n);\nme.displayName = pt;\nvar ve = \"ToastAction\", we = a.forwardRef(\n (e, r) => {\n const { altText: o, ...t } = e;\n return o.trim() ? /* @__PURE__ */ s.jsx(ye, { altText: o, asChild: !0, children: /* @__PURE__ */ s.jsx(ee, { ...t, ref: r }) }) : (console.error(\n `Invalid prop \\`altText\\` supplied to \\`${ve}\\`. Expected non-empty \\`string\\`.`\n ), null);\n }\n);\nwe.displayName = ve;\nvar xe = \"ToastClose\", ee = a.forwardRef(\n (e, r) => {\n const { __scopeToast: o, ...t } = e, c = ct(xe, o);\n return /* @__PURE__ */ s.jsx(ye, { asChild: !0, children: /* @__PURE__ */ s.jsx(\n _.button,\n {\n type: \"button\",\n ...t,\n ref: r,\n onClick: g(e.onClick, c.onClose)\n }\n ) });\n }\n);\nee.displayName = xe;\nvar ye = a.forwardRef((e, r) => {\n const { __scopeToast: o, altText: t, ...c } = e;\n return /* @__PURE__ */ s.jsx(\n _.div,\n {\n \"data-radix-toast-announce-exclude\": \"\",\n \"data-radix-toast-announce-alt\": t || void 0,\n ...c,\n ref: r\n }\n );\n});\nfunction Te(e) {\n const r = [];\n return Array.from(e.childNodes).forEach((t) => {\n if (t.nodeType === t.TEXT_NODE && t.textContent && r.push(t.textContent), mt(t)) {\n const c = t.ariaHidden || t.hidden || t.style.display === \"none\", l = t.dataset.radixToastAnnounceExclude === \"\";\n if (!c)\n if (l) {\n const p = t.dataset.radixToastAnnounceAlt;\n p && r.push(p);\n } else\n r.push(...Te(t));\n }\n }), r;\n}\nfunction H(e, r, o, { discrete: t }) {\n const c = o.originalEvent.currentTarget, l = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: o });\n r && c.addEventListener(e, r, { once: !0 }), t ? Ke(c, l) : c.dispatchEvent(l);\n}\nvar oe = (e, r, o = 0) => {\n const t = Math.abs(e.x), c = Math.abs(e.y), l = t > c;\n return r === \"left\" || r === \"right\" ? l && t > o : !l && c > o;\n};\nfunction ft(e = () => {\n}) {\n const r = X(e);\n Ve(() => {\n let o = 0, t = 0;\n return o = window.requestAnimationFrame(() => t = window.requestAnimationFrame(r)), () => {\n window.cancelAnimationFrame(o), window.cancelAnimationFrame(t);\n };\n }, [r]);\n}\nfunction mt(e) {\n return e.nodeType === e.ELEMENT_NODE;\n}\nfunction vt(e) {\n const r = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (t) => {\n const c = t.tagName === \"INPUT\" && t.type === \"hidden\";\n return t.disabled || t.hidden || c ? NodeFilter.FILTER_SKIP : t.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n for (; o.nextNode(); ) r.push(o.currentNode);\n return r;\n}\nfunction B(e) {\n const r = document.activeElement;\n return e.some((o) => o === r ? !0 : (o.focus(), document.activeElement !== r));\n}\nvar wt = ce, he = le, Ee = pe, be = fe, ge = me, Pe = we, Ce = ee;\nconst xt = wt, Re = R.createContext(null), ke = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n he,\n {\n ...r,\n ref: o,\n className: j(\n \"fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n e\n )\n }\n));\nke.displayName = he.displayName;\nconst yt = ne(\n \"group pointer-events-auto relative shadow-xs bg-primary-white dark:bg-primary-gray-650 flex w-full text-primary-black dark:text-primary-white items-center justify-between flex gap-2 overflow-hidden rounded-sm border border-primary-gray-400 p-2 pr-6 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border border-primary-gray-400 dark:border-0\",\n success: \"border-t-4 border-accent-dark-green dark:border-b-0 dark:border-l-0 dark:border-r-0\",\n warning: \"border-t-4 border-accent-dark-yellow dark:border-b-0 dark:border-l-0 dark:border-r-0\",\n destructive: \"border-t-4 border-accent-dark-red dark:border-b-0 dark:border-l-0 dark:border-r-0\"\n }\n },\n defaultVariants: { variant: \"default\" }\n }\n), Tt = ne(\"\", {\n variants: {\n variant: {\n default: \"text-primary-black dark:text-primary-white\",\n success: \"text-accent-dark-green\",\n warning: \"text-accent-dark-yellow\",\n destructive: \"text-accent-dark-red\"\n }\n },\n defaultVariants: { variant: \"default\" }\n}), Ne = R.forwardRef(({ className: e, variant: r, ...o }, t) => /* @__PURE__ */ s.jsx(Re.Provider, { value: { variant: r }, children: /* @__PURE__ */ s.jsx(\n Ee,\n {\n ...o,\n ref: t,\n className: j(yt({ variant: r }), e)\n }\n) }));\nNe.displayName = Ee.displayName;\nconst ht = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n Pe,\n {\n ...r,\n ref: o,\n className: j(\n \"inline-flex h-8 shrink-0 items-center text-primary-gray-700 dark:text-primary-gray-100 justify-center rounded-none bg-transparent px-3 text-sm font-medium transition-colors hover:bg-primary-gray-200 dark:hover:bg-primary-gray-600 focus:outline-hidden focus:ring-1 disabled:pointer-events-none disabled:opacity-50\",\n e\n )\n }\n));\nht.displayName = Pe.displayName;\nconst Se = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n Ce,\n {\n ...r,\n ref: o,\n className: j(\n \"absolute right-1 top-1 rounded-md p-1 text-primary-gray-700/50 dark:text-primary-gray-100/50 opacity-0 transition-opacity hover:text-primary-gray-700 dark:hover:text-primary-gray-100 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100\",\n e\n ),\n \"toast-close\": \"\",\n children: /* @__PURE__ */ s.jsx(ze, { className: \"h-4 w-4\" })\n }\n));\nSe.displayName = Ce.displayName;\nconst _e = R.forwardRef(({ className: e, ...r }, o) => {\n const t = R.useContext(Re), c = j(\n Tt({ variant: t?.variant }),\n \"text-lg font-bold [&+div]:text-xs\",\n e\n );\n let l = null;\n switch (t?.variant) {\n case \"destructive\":\n l = /* @__PURE__ */ s.jsx(Ge, { className: \"h-4 w-4 stroke-accent-dark-red\", strokeWidth: 2 });\n break;\n case \"success\":\n l = /* @__PURE__ */ s.jsx(Ye, { className: \"h-4 w-4 stroke-accent-dark-green\", strokeWidth: 2 });\n break;\n case \"warning\":\n l = /* @__PURE__ */ s.jsx(Qe, { className: \"h-4 w-4 stroke-accent-dark-yellow\", strokeWidth: 2 });\n break;\n default:\n l = null;\n break;\n }\n return /* @__PURE__ */ s.jsxs(\"div\", { className: \"flex gap-x-1 items-center\", children: [\n l,\n /* @__PURE__ */ s.jsx(be, { ...r, ref: o, className: c })\n ] });\n});\n_e.displayName = be.displayName;\nconst je = R.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ s.jsx(\n ge,\n {\n ...r,\n ref: o,\n className: j(\"text-base opacity-90 dark:text-primary-white\", e)\n }\n));\nje.displayName = ge.displayName;\nfunction Mt() {\n const { toasts: e } = De();\n return /* @__PURE__ */ s.jsxs(xt, { children: [\n e.map(({ id: r, title: o, description: t, action: c, ...l }) => /* @__PURE__ */ Fe(Ne, { ...l, key: r }, /* @__PURE__ */ s.jsxs(\"div\", { className: \"grid gap-1\", children: [\n o && /* @__PURE__ */ s.jsx(_e, { children: o }),\n t && /* @__PURE__ */ s.jsx(je, { children: t })\n ] }), c, /* @__PURE__ */ s.jsx(Se, {}))),\n /* @__PURE__ */ s.jsx(ke, {})\n ] });\n}\nexport {\n Mt as Toaster\n};\n//# sourceMappingURL=Toaster.js.map\n","import { Button } from '@undp/design-system-react/Button';\r\nimport { Toaster } from '@undp/design-system-react/Toaster';\r\nimport { useToast } from '@undp/design-system-react/ToasterHooks';\r\n\r\nimport { Copy } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n text: string;\r\n successMessage?: string;\r\n buttonText?: string;\r\n buttonSmall?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport function CopyTextButton(props: Props) {\r\n const {\r\n text,\r\n successMessage = 'Text copied',\r\n buttonText,\r\n buttonSmall = false,\r\n className = '',\r\n } = props;\r\n const { toast } = useToast();\r\n return (\r\n <>\r\n <Button\r\n variant='tertiary'\r\n className={`${buttonSmall ? 'p-2' : 'py-4 px-6'} ${className}`}\r\n onClick={() => {\r\n navigator.clipboard.writeText(text);\r\n toast({\r\n variant: 'success',\r\n description: successMessage,\r\n duration: 1000,\r\n });\r\n }}\r\n aria-label='Click to copy the text'\r\n >\r\n <Copy />\r\n {buttonText || null}\r\n </Button>\r\n <Toaster />\r\n </>\r\n );\r\n}\r\n"],"names":["d","f","i","p","a","S","t","s","n","A","e","o","r","u","O","T","E","c","Ye","J","qe","Ge","Je","Qe","Z","et","$e","ie","Lt","Me","tt","U","ce","l","v","w","b","y","k","de","rt","q","le","se","N","m","x","h","vt","F","V","B","We","G","_","ue","ae","ot","st","nt","pe","Oe","Ue","dt","X","g","it","ct","I","K","P","C","D","te","Te","lt","Le","He","L","$","Ae","Ie","z","W","re","H","oe","ft","Xe","ut","fe","pt","me","ve","we","ye","xe","mt","Ke","Ve","wt","he","Ee","be","ge","Pe","Ce","R","ke","j","yt","ne","Tt","Ne","ht","Se","ze","_e","je","Mt","De","Fe","CopyTextButton","props","text","successMessage","buttonText","buttonSmall","className","toast","useToast","jsxs","Fragment","Button","jsx","Copy","Toaster"],"mappings":"mnBACMA,GAAI,EAAGC,GAAI,IACjB,IAAIC,EAAI,EACR,SAASC,IAAI,CACX,OAAOD,GAAKA,EAAI,GAAK,OAAO,iBAAkBA,EAAE,SAAQ,CAC1D,CACA,MAAME,EAAoB,IAAI,IAAOC,GAAKC,GAAM,CAC9C,GAAIF,EAAE,IAAIE,CAAC,EACT,OACF,MAAMC,EAAI,WAAW,IAAM,CACzBH,EAAE,OAAOE,CAAC,EAAGE,EAAE,CACb,KAAM,eACN,QAASF,CACf,CAAK,CACH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C1KI,GAAqBJ,EAAAA,GAAE,IAAI8G,GAAI,CAAE,SAAU1G,EAAG,EAC9CL,GAAqBC,EAAAA,GAAE,IAAI+G,GAAI,CAAE,SAAUhH,CAAC,CAAE,CACpD,CAAK,CAAE,EAAGW,EAAmBV,EAAAA,GAAE,IAAI4G,GAAI,CAAA,CAAE,CAAC,CAAC,EACvB5G,KAAE,IAAIqG,GAAI,CAAA,CAAE,CAChC,EAAK,CACL,CCvjBO,SAASc,GAAeC,EAAc,CAC3C,KAAM,CACJ,KAAAC,EACA,eAAAC,EAAiB,cACjB,WAAAC,EACA,YAAAC,EAAc,GACd,UAAAC,EAAY,EAAA,EACVL,EACE,CAAE,MAAAM,CAAA,EAAUC,GAAA,EAClB,OACEC,EAAAA,kBAAAA,KAAAC,6BAAA,CACE,SAAA,CAAAD,EAAAA,kBAAAA,KAACE,GAAAA,EAAA,CACC,QAAQ,WACR,UAAW,GAAGN,EAAc,MAAQ,WAAW,IAAIC,CAAS,GAC5D,QAAS,IAAM,CACb,UAAU,UAAU,UAAUJ,CAAI,EAClCK,EAAM,CACJ,QAAS,UACT,YAAaJ,EACb,SAAU,GAAA,CACX,CACH,EACA,aAAW,yBAEX,SAAA,CAAAS,EAAAA,kBAAAA,IAACC,GAAAA,KAAA,EAAK,EACLT,GAAc,IAAA,CAAA,CAAA,0BAEhBU,GAAA,CAAA,CAAQ,CAAA,EACX,CAEJ","x_google_ignoreList":[0,1]}
|
package/dist/CopyTextButton.js
CHANGED
|
@@ -5,7 +5,7 @@ import k, { createElement as Ue } from "react";
|
|
|
5
5
|
import * as We from "react-dom";
|
|
6
6
|
import { g as Xe, _ as Ye, E as Ze, j as g, c as X, w as P, P as pe, $ as Be, Z as Ge, a as fe, u as He, N as Qe, b as Je } from "./index-DG3YrCr5-D3FrrXj8.js";
|
|
7
7
|
import { h as et } from "./index-tvAyXPPW-DBlMKnNB.js";
|
|
8
|
-
import { t as tt,
|
|
8
|
+
import { t as tt, k as te } from "./x-BBpi7a_7-WVdj1j6r.js";
|
|
9
9
|
const rt = 1, at = 1e6;
|
|
10
10
|
let B = 0;
|
|
11
11
|
function st() {
|
|
@@ -98,7 +98,7 @@ function me() {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
* @license lucide-react v0.
|
|
101
|
+
* @license lucide-react v0.542.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -108,7 +108,7 @@ const it = [
|
|
|
108
108
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
109
109
|
], ct = te("circle-check-big", it);
|
|
110
110
|
/**
|
|
111
|
-
* @license lucide-react v0.
|
|
111
|
+
* @license lucide-react v0.542.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -119,7 +119,7 @@ const dt = [
|
|
|
119
119
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
120
120
|
], lt = te("circle-x", dt);
|
|
121
121
|
/**
|
|
122
|
-
* @license lucide-react v0.
|
|
122
|
+
* @license lucide-react v0.542.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|