@undp/data-viz 1.4.12 → 1.4.14

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.
Files changed (180) hide show
  1. package/dist/AreaChart.cjs +1 -1
  2. package/dist/AreaChart.cjs.map +1 -1
  3. package/dist/AreaChart.js +25 -24
  4. package/dist/AreaChart.js.map +1 -1
  5. package/dist/BarGraph.cjs +1 -1
  6. package/dist/BarGraph.cjs.map +1 -1
  7. package/dist/BarGraph.js +638 -632
  8. package/dist/BarGraph.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +134 -132
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +35 -34
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/BulletChart.cjs +1 -1
  18. package/dist/BulletChart.cjs.map +1 -1
  19. package/dist/BulletChart.js +226 -224
  20. package/dist/BulletChart.js.map +1 -1
  21. package/dist/ButterflyChart.cjs +1 -1
  22. package/dist/ButterflyChart.cjs.map +1 -1
  23. package/dist/ButterflyChart.js +48 -47
  24. package/dist/ButterflyChart.js.map +1 -1
  25. package/dist/ChoroplethMap.cjs +1 -1
  26. package/dist/ChoroplethMap.cjs.map +1 -1
  27. package/dist/ChoroplethMap.js +56 -55
  28. package/dist/ChoroplethMap.js.map +1 -1
  29. package/dist/CirclePackingGraph.cjs +1 -1
  30. package/dist/CirclePackingGraph.js +1 -1
  31. package/dist/DataCards.cjs +3 -3
  32. package/dist/DataCards.cjs.map +1 -1
  33. package/dist/DataCards.js +2 -1
  34. package/dist/DataCards.js.map +1 -1
  35. package/dist/DataTable.cjs +1 -1
  36. package/dist/DataTable.cjs.map +1 -1
  37. package/dist/DataTable.js +9 -8
  38. package/dist/DataTable.js.map +1 -1
  39. package/dist/DifferenceLineChart.cjs +1 -1
  40. package/dist/DifferenceLineChart.cjs.map +1 -1
  41. package/dist/DifferenceLineChart.js +1 -0
  42. package/dist/DifferenceLineChart.js.map +1 -1
  43. package/dist/DonutChart.cjs +1 -1
  44. package/dist/DonutChart.cjs.map +1 -1
  45. package/dist/DonutChart.js +77 -76
  46. package/dist/DonutChart.js.map +1 -1
  47. package/dist/DotDensityMap.cjs +1 -1
  48. package/dist/DotDensityMap.cjs.map +1 -1
  49. package/dist/DotDensityMap.js +1 -0
  50. package/dist/DotDensityMap.js.map +1 -1
  51. package/dist/{DropdownSelect-CeHog_ih.js → DropdownSelect-CtOKZHD0.js} +22 -20
  52. package/dist/{DropdownSelect-CeHog_ih.js.map → DropdownSelect-CtOKZHD0.js.map} +1 -1
  53. package/dist/{DropdownSelect-BmE5JaeE.cjs → DropdownSelect-DBDM64B5.cjs} +2 -2
  54. package/dist/{DropdownSelect-BmE5JaeE.cjs.map → DropdownSelect-DBDM64B5.cjs.map} +1 -1
  55. package/dist/DualAxisLineChart.cjs +1 -1
  56. package/dist/DualAxisLineChart.cjs.map +1 -1
  57. package/dist/DualAxisLineChart.d.ts +3 -1
  58. package/dist/DualAxisLineChart.js +265 -261
  59. package/dist/DualAxisLineChart.js.map +1 -1
  60. package/dist/DumbbellChart.cjs +1 -1
  61. package/dist/DumbbellChart.cjs.map +1 -1
  62. package/dist/DumbbellChart.js +216 -214
  63. package/dist/DumbbellChart.js.map +1 -1
  64. package/dist/GeoHubCompareMaps.cjs +1 -1
  65. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  66. package/dist/GeoHubCompareMaps.js +1 -0
  67. package/dist/GeoHubCompareMaps.js.map +1 -1
  68. package/dist/GeoHubMap.cjs +1 -1
  69. package/dist/GeoHubMap.cjs.map +1 -1
  70. package/dist/GeoHubMap.js +29 -28
  71. package/dist/GeoHubMap.js.map +1 -1
  72. package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
  73. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
  74. package/dist/GeoHubMapWithLayerSelection.js +34 -33
  75. package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
  76. package/dist/{GraphEl-s3ctz7oA.js → GraphEl-N6vuMRw_.js} +6 -2
  77. package/dist/GraphEl-N6vuMRw_.js.map +1 -0
  78. package/dist/GraphEl-Zl0W-LK9.cjs +2 -0
  79. package/dist/GraphEl-Zl0W-LK9.cjs.map +1 -0
  80. package/dist/GriddedGraphs.cjs +1 -1
  81. package/dist/GriddedGraphs.d.ts +1 -0
  82. package/dist/GriddedGraphs.js +2 -2
  83. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  84. package/dist/HeatMap.cjs +1 -1
  85. package/dist/HeatMap.cjs.map +1 -1
  86. package/dist/HeatMap.js +55 -54
  87. package/dist/HeatMap.js.map +1 -1
  88. package/dist/Histogram.cjs +1 -1
  89. package/dist/Histogram.js +1 -1
  90. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  91. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  92. package/dist/LineChartWithConfidenceInterval.js +22 -21
  93. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  94. package/dist/MultiGraphDashboard.cjs +1 -1
  95. package/dist/MultiGraphDashboard.d.ts +1 -0
  96. package/dist/MultiGraphDashboard.js +1 -1
  97. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  98. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  99. package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
  100. package/dist/MultiLineAltChart.cjs +1 -1
  101. package/dist/MultiLineAltChart.cjs.map +1 -1
  102. package/dist/MultiLineAltChart.js +34 -33
  103. package/dist/MultiLineAltChart.js.map +1 -1
  104. package/dist/MultiLineChart.cjs +1 -1
  105. package/dist/MultiLineChart.cjs.map +1 -1
  106. package/dist/MultiLineChart.js +72 -71
  107. package/dist/MultiLineChart.js.map +1 -1
  108. package/dist/ParetoChart.cjs +1 -1
  109. package/dist/ParetoChart.cjs.map +1 -1
  110. package/dist/ParetoChart.d.ts +4 -0
  111. package/dist/ParetoChart.js +317 -312
  112. package/dist/ParetoChart.js.map +1 -1
  113. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  114. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  115. package/dist/PerformanceIntensiveMultiGraphDashboard.js +1 -1
  116. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  117. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  118. package/dist/RadarChart.cjs +1 -1
  119. package/dist/RadarChart.cjs.map +1 -1
  120. package/dist/RadarChart.js +27 -26
  121. package/dist/RadarChart.js.map +1 -1
  122. package/dist/SankeyChart.cjs +1 -1
  123. package/dist/SankeyChart.cjs.map +1 -1
  124. package/dist/SankeyChart.js +30 -29
  125. package/dist/SankeyChart.js.map +1 -1
  126. package/dist/ScatterPlot.cjs +1 -1
  127. package/dist/ScatterPlot.cjs.map +1 -1
  128. package/dist/ScatterPlot.js +119 -118
  129. package/dist/ScatterPlot.js.map +1 -1
  130. package/dist/ScrollStory.d.ts +1 -0
  131. package/dist/SimpleLineChart.cjs +1 -1
  132. package/dist/SimpleLineChart.cjs.map +1 -1
  133. package/dist/SimpleLineChart.js +16 -15
  134. package/dist/SimpleLineChart.js.map +1 -1
  135. package/dist/SingleGraphDashboard.cjs +1 -1
  136. package/dist/SingleGraphDashboard.d.ts +1 -0
  137. package/dist/SingleGraphDashboard.js +2 -2
  138. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  139. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  140. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  141. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  142. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  143. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  144. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  145. package/dist/SlopeChart.cjs +1 -1
  146. package/dist/SlopeChart.cjs.map +1 -1
  147. package/dist/SlopeChart.js +46 -45
  148. package/dist/SlopeChart.js.map +1 -1
  149. package/dist/SparkLine.cjs +1 -1
  150. package/dist/SparkLine.cjs.map +1 -1
  151. package/dist/SparkLine.js +12 -11
  152. package/dist/SparkLine.js.map +1 -1
  153. package/dist/StripChart.cjs +1 -1
  154. package/dist/StripChart.cjs.map +1 -1
  155. package/dist/StripChart.js +81 -79
  156. package/dist/StripChart.js.map +1 -1
  157. package/dist/ThreeDGlobe.cjs +1 -1
  158. package/dist/ThreeDGlobe.cjs.map +1 -1
  159. package/dist/ThreeDGlobe.js +1 -0
  160. package/dist/ThreeDGlobe.js.map +1 -1
  161. package/dist/TreeMapGraph.cjs +1 -1
  162. package/dist/TreeMapGraph.cjs.map +1 -1
  163. package/dist/TreeMapGraph.js +114 -113
  164. package/dist/TreeMapGraph.js.map +1 -1
  165. package/dist/Types.d.ts +1 -0
  166. package/dist/UnitChart.cjs +1 -1
  167. package/dist/UnitChart.cjs.map +1 -1
  168. package/dist/UnitChart.js +10 -9
  169. package/dist/UnitChart.js.map +1 -1
  170. package/dist/{index-CZLvTu6p.cjs → index-BbNoLJ_w.cjs} +2 -2
  171. package/dist/{index-CZLvTu6p.cjs.map → index-BbNoLJ_w.cjs.map} +1 -1
  172. package/dist/{index-DGAaLNu9.js → index-Bc5VF70V.js} +46 -45
  173. package/dist/{index-DGAaLNu9.js.map → index-Bc5VF70V.js.map} +1 -1
  174. package/dist/index.cjs +1 -1
  175. package/dist/index.d.ts +8 -1
  176. package/dist/index.js +1 -1
  177. package/package.json +2 -2
  178. package/dist/GraphEl-OzC-icbr.cjs +0 -2
  179. package/dist/GraphEl-OzC-icbr.cjs.map +0 -1
  180. package/dist/GraphEl-s3ctz7oA.js.map +0 -1
@@ -30,12 +30,12 @@ function at(he) {
30
30
  const {
31
31
  data: k,
32
32
  colorDomain: g,
33
- colors: l,
33
+ colors: c,
34
34
  mapData: x,
35
35
  colorLegendTitle: V,
36
36
  categorical: E,
37
37
  height: h,
38
- width: c,
38
+ width: s,
39
39
  scale: oe,
40
40
  centerPoint: T,
41
41
  tooltip: ie,
@@ -58,12 +58,12 @@ 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 = Ye(L, {
61
+ } = he, [w, M] = b(void 0), J = ae(null), [K, v] = b(!(s < 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), f = E ? Ge().domain(g).range(l) : Re().domain(g).range(l);
64
+ }), le = ae(null), f = E ? Ge().domain(g).range(c) : Re().domain(g).range(c);
65
65
  pe(() => {
66
- const r = be(le.current), s = be(L.current), m = (o) => {
66
+ const r = be(le.current), l = be(L.current), m = (o) => {
67
67
  if (B === "noZoom") return !1;
68
68
  if (B === "button") return !o.type.includes("wheel");
69
69
  const n = o.type === "wheel", e = o.type.startsWith("touch"), a = o.type === "mousedown" || o.type === "mousemove";
@@ -71,14 +71,14 @@ function at(he) {
71
71
  }, i = Ee().scaleExtent(ue).translateExtent(
72
72
  I || [
73
73
  [-20, -20],
74
- [c + 20, h + 20]
74
+ [s + 20, h + 20]
75
75
  ]
76
76
  ).filter(m).on("zoom", ({ transform: o }) => {
77
77
  r.attr("transform", o);
78
78
  });
79
- s.call(i), J.current = i;
80
- }, [h, c, B]);
81
- const u = Pe(x), z = Ie(x), re = u[2] - u[0], ce = u[3] - u[1], A = c * 190 / 960 * 360 / re, ve = h * 190 / 678 * 180 / ce, d = oe * Math.min(A, ve), N = X === "mercator" ? Le().rotate([0, 0]).center(T || z.geometry.coordinates).translate([c / 2, h / 2]).scale(d) : X === "equalEarth" ? ze().rotate([0, 0]).center(T || z.geometry.coordinates).translate([c / 2, h / 2]).scale(d) : X === "naturalEarth" ? We().rotate([0, 0]).center(T || z.geometry.coordinates).translate([c / 2, h / 2]).scale(d) : X === "orthographic" ? Te().rotate([0, 0]).center(T || z.geometry.coordinates).translate([c / 2, h / 2]).scale(d) : Be().rotate([0, 0]).center(T || z.geometry.coordinates).translate([c / 2, h / 2]).scale(d), G = (r) => {
79
+ l.call(i), J.current = i;
80
+ }, [h, s, B]);
81
+ const u = Pe(x), z = Ie(x), re = u[2] - u[0], ce = u[3] - u[1], A = s * 190 / 960 * 360 / re, ve = h * 190 / 678 * 180 / ce, d = oe * Math.min(A, ve), N = X === "mercator" ? Le().rotate([0, 0]).center(T || z.geometry.coordinates).translate([s / 2, h / 2]).scale(d) : X === "equalEarth" ? ze().rotate([0, 0]).center(T || z.geometry.coordinates).translate([s / 2, h / 2]).scale(d) : X === "naturalEarth" ? We().rotate([0, 0]).center(T || z.geometry.coordinates).translate([s / 2, h / 2]).scale(d) : X === "orthographic" ? Te().rotate([0, 0]).center(T || z.geometry.coordinates).translate([s / 2, h / 2]).scale(d) : Be().rotate([0, 0]).center(T || z.geometry.coordinates).translate([s / 2, h / 2]).scale(d), G = (r) => {
82
82
  if (!L.current || !J.current) return;
83
83
  be(L.current).call(J.current.scaleBy, r === "in" ? 1.2 : 1 / 1.2);
84
84
  };
@@ -87,15 +87,15 @@ function at(he) {
87
87
  /* @__PURE__ */ t.jsx(
88
88
  de.svg,
89
89
  {
90
- width: `${c}px`,
90
+ width: `${s}px`,
91
91
  height: `${h}px`,
92
- viewBox: `0 0 ${c} ${h}`,
92
+ viewBox: `0 0 ${s} ${h}`,
93
93
  ref: L,
94
94
  direction: "ltr",
95
95
  children: /* @__PURE__ */ t.jsxs("g", { ref: le, children: [
96
96
  ne.filter((r) => r.position === "before").map((r) => r.layer),
97
97
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
98
- x.features.map((r, s) => k.findIndex((i) => i.id === r.properties[q]) !== -1 ? null : /* @__PURE__ */ t.jsx(
98
+ x.features.map((r, l) => k.findIndex((i) => i.id === r.properties[q]) !== -1 ? null : /* @__PURE__ */ t.jsx(
99
99
  "g",
100
100
  {
101
101
  opacity: w ? U : H.length !== 0 ? H.indexOf(r.properties[q]) !== -1 ? 1 : U : 1,
@@ -144,10 +144,10 @@ function at(he) {
144
144
  })
145
145
  )
146
146
  },
147
- s
147
+ l
148
148
  )),
149
149
  /* @__PURE__ */ t.jsx(Je, { children: k.map((r) => {
150
- const s = x.features.findIndex(
150
+ const l = x.features.findIndex(
151
151
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
152
152
  (i) => r.id === i.properties[q]
153
153
  ), m = qe(r.x) ? R : (
@@ -179,7 +179,7 @@ function at(he) {
179
179
  onClick: () => {
180
180
  (y || C) && (Oe(D, r) && ye ? (Z(void 0), y?.(void 0)) : (Z(r), y?.(r)));
181
181
  },
182
- children: s === -1 ? null : x.features[s].geometry.type === "MultiPolygon" ? x.features[s].geometry.coordinates.map(
182
+ children: l === -1 ? null : x.features[l].geometry.type === "MultiPolygon" ? x.features[l].geometry.coordinates.map(
183
183
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
184
184
  (i, o) => {
185
185
  let n = "";
@@ -212,7 +212,7 @@ function at(he) {
212
212
  `${r.id}-${o}`
213
213
  );
214
214
  }
215
- ) : x.features[s].geometry.coordinates.map(
215
+ ) : x.features[l].geometry.coordinates.map(
216
216
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
217
217
  (i, o) => {
218
218
  let n = "M";
@@ -250,7 +250,7 @@ function at(he) {
250
250
  _ ? x.features.filter(
251
251
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
252
252
  (r) => r.properties[q] === _.id
253
- ).map((r, s) => /* @__PURE__ */ t.jsx("g", { children: r.geometry.type === "MultiPolygon" ? (
253
+ ).map((r, l) => /* @__PURE__ */ t.jsx("g", { children: r.geometry.type === "MultiPolygon" ? (
254
254
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
255
255
  r.geometry.coordinates.map((m, i) => {
256
256
  let o = "";
@@ -295,7 +295,7 @@ function at(he) {
295
295
  i
296
296
  );
297
297
  })
298
- ) }, s)) : null,
298
+ ) }, l)) : null,
299
299
  ne.filter((r) => r.position === "after").map((r) => r.layer)
300
300
  ] })
301
301
  }
@@ -346,12 +346,12 @@ function at(he) {
346
346
  children: V
347
347
  }
348
348
  ) : null,
349
- E ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: g.map((r, s) => /* @__PURE__ */ t.jsxs(
349
+ E ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: g.map((r, l) => /* @__PURE__ */ t.jsxs(
350
350
  "div",
351
351
  {
352
352
  className: "flex gap-2 items-center",
353
353
  onMouseOver: () => {
354
- M(l[s % l.length]);
354
+ M(c[l % c.length]);
355
355
  },
356
356
  onMouseLeave: () => {
357
357
  M(void 0);
@@ -361,19 +361,19 @@ function at(he) {
361
361
  "div",
362
362
  {
363
363
  className: "w-2 h-2 rounded-full",
364
- style: { backgroundColor: l[s % l.length] }
364
+ style: { backgroundColor: c[l % c.length] }
365
365
  }
366
366
  ),
367
367
  /* @__PURE__ */ t.jsx(ke, { size: "sm", marginBottom: "none", leading: "none", children: r })
368
368
  ]
369
369
  },
370
- s
370
+ l
371
371
  )) }) : /* @__PURE__ */ t.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ t.jsxs("g", { children: [
372
- g.map((r, s) => /* @__PURE__ */ t.jsxs(
372
+ g.map((r, l) => /* @__PURE__ */ t.jsxs(
373
373
  "g",
374
374
  {
375
375
  onMouseOver: () => {
376
- M(l[s]);
376
+ M(c[l]);
377
377
  },
378
378
  onMouseLeave: () => {
379
379
  M(void 0);
@@ -383,21 +383,21 @@ function at(he) {
383
383
  /* @__PURE__ */ t.jsx(
384
384
  "rect",
385
385
  {
386
- x: s * 320 / l.length + 1,
386
+ x: l * 320 / c.length + 1,
387
387
  y: 1,
388
- width: 320 / l.length - 2,
388
+ width: 320 / c.length - 2,
389
389
  height: 8,
390
- className: w === l[s] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "",
390
+ className: w === c[l] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : "",
391
391
  style: {
392
- fill: l[s],
393
- ...w === l[s] ? {} : { stroke: l[s] }
392
+ fill: c[l],
393
+ ...w === c[l] ? {} : { stroke: c[l] }
394
394
  }
395
395
  }
396
396
  ),
397
397
  /* @__PURE__ */ t.jsx(
398
398
  "text",
399
399
  {
400
- x: (s + 1) * 320 / l.length,
400
+ x: (l + 1) * 320 / c.length,
401
401
  y: 25,
402
402
  className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",
403
403
  style: { textAnchor: "middle" },
@@ -406,25 +406,25 @@ function at(he) {
406
406
  )
407
407
  ]
408
408
  },
409
- s
409
+ l
410
410
  )),
411
411
  /* @__PURE__ */ t.jsx("g", { children: /* @__PURE__ */ t.jsx(
412
412
  "rect",
413
413
  {
414
414
  onMouseOver: () => {
415
- M(l[g.length]);
415
+ M(c[g.length]);
416
416
  },
417
417
  onMouseLeave: () => {
418
418
  M(void 0);
419
419
  },
420
- x: g.length * 320 / l.length + 1,
420
+ x: g.length * 320 / c.length + 1,
421
421
  y: 1,
422
- width: 320 / l.length - 2,
422
+ width: 320 / c.length - 2,
423
423
  height: 8,
424
- className: `cursor-pointer ${w === l[g.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
424
+ className: `cursor-pointer ${w === c[g.length] ? "stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
425
425
  style: {
426
- fill: l[g.length],
427
- ...w === l[g.length] ? {} : { stroke: l[g.length] }
426
+ fill: c[g.length],
427
+ ...w === c[g.length] ? {} : { stroke: c[g.length] }
428
428
  }
429
429
  }
430
430
  ) })
@@ -496,12 +496,12 @@ function Pt(he) {
496
496
  const {
497
497
  data: k,
498
498
  mapData: g = "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json",
499
- graphTitle: l,
499
+ graphTitle: c,
500
500
  colors: x,
501
501
  sources: V,
502
502
  graphDescription: E,
503
503
  height: h,
504
- width: c,
504
+ width: s,
505
505
  footNote: oe = "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.",
506
506
  colorDomain: T,
507
507
  colorLegendTitle: ie,
@@ -547,16 +547,16 @@ function Pt(he) {
547
547
  (e) => e.date
548
548
  ).map((e) => Me(`${e.date}`, f.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
549
549
  (e, a) => rt(e, a)
550
- ), [N, G] = b(f.autoplay ? 0 : d.length - 1), [r, s] = b(void 0), m = ae(null), i = ae(null);
550
+ ), [N, G] = b(f.autoplay ? 0 : d.length - 1), [r, l] = b(void 0), m = ae(null), i = ae(null);
551
551
  pe(() => {
552
552
  const e = new ResizeObserver((a) => {
553
- z(c || a[0].target.clientWidth || 760), ce(h || a[0].target.clientHeight || 480);
553
+ z(s || a[0].target.clientWidth || 760), ce(h || a[0].target.clientHeight || 480);
554
554
  });
555
- return m.current && (ce(m.current.clientHeight || 480), z(m.current.clientWidth || 760), c || e.observe(m.current)), () => e.disconnect();
556
- }, [c, h]), pe(() => {
555
+ return m.current && (ce(m.current.clientHeight || 480), z(m.current.clientWidth || 760), s || e.observe(m.current)), () => e.disconnect();
556
+ }, [s, h]), pe(() => {
557
557
  typeof g == "string" ? Qe(g).then((a) => {
558
- s(a);
559
- }) : s(g);
558
+ l(a);
559
+ }) : l(g);
560
560
  }, [g]);
561
561
  const o = T || (P === "categorical" ? et(k, "x") : tt(
562
562
  k.map((e) => e.x),
@@ -580,13 +580,14 @@ function Pt(he) {
580
580
  return /* @__PURE__ */ t.jsx(
581
581
  "div",
582
582
  {
583
- className: `${D || "light"} flex ${c ? "w-fit grow-0" : "w-full grow"}`,
583
+ className: `${D || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
584
584
  dir: K === "he" || K === "ar" ? "rtl" : void 0,
585
585
  children: /* @__PURE__ */ t.jsx(
586
586
  "div",
587
587
  {
588
588
  className: je(
589
589
  `${I ? I === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${K || "en"}`,
590
+ s ? "w-fit" : "w-full",
590
591
  $?.graphContainer
591
592
  ),
592
593
  style: {
@@ -595,14 +596,14 @@ function Pt(he) {
595
596
  },
596
597
  id: B,
597
598
  ref: i,
598
- "aria-label": Z || `${l ? `The graph shows ${l}. ` : ""}This is a choropleth map where geographic areas are colored in proportion to a specific variable.${E ? ` ${E}` : ""}`,
599
+ "aria-label": Z || `${c ? `The graph shows ${c}. ` : ""}This is a choropleth map where geographic areas are colored in proportion to a specific variable.${E ? ` ${E}` : ""}`,
599
600
  children: /* @__PURE__ */ t.jsx(
600
601
  "div",
601
602
  {
602
603
  className: "flex grow",
603
604
  style: { padding: I ? Y || "1rem" : Y || 0 },
604
605
  children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
605
- l || E || w || M ? /* @__PURE__ */ t.jsx(
606
+ c || E || w || M ? /* @__PURE__ */ t.jsx(
606
607
  Ze,
607
608
  {
608
609
  styles: {
@@ -613,9 +614,9 @@ function Pt(he) {
613
614
  title: $?.title,
614
615
  description: $?.description
615
616
  },
616
- graphTitle: l,
617
+ graphTitle: c,
617
618
  graphDescription: E,
618
- width: c,
619
+ width: s,
619
620
  graphDownload: w ? i.current : void 0,
620
621
  dataDownload: M ? k.map((e) => e.data).filter((e) => e !== void 0).length > 0 ? k.map((e) => e.data).filter((e) => e !== void 0) : k.filter((e) => e !== void 0) : null
621
622
  }
@@ -658,7 +659,7 @@ function Pt(he) {
658
659
  className: "flex flex-col grow justify-center leading-0",
659
660
  ref: m,
660
661
  "aria-label": "Map area",
661
- children: (c || u) && (h || re) && r ? /* @__PURE__ */ t.jsx(
662
+ children: (s || u) && (h || re) && r ? /* @__PURE__ */ t.jsx(
662
663
  at,
663
664
  {
664
665
  data: k.filter(
@@ -672,10 +673,10 @@ function Pt(he) {
672
673
  )
673
674
  },
674
675
  colorDomain: o,
675
- width: c || u,
676
+ width: s || u,
676
677
  height: Math.max(
677
678
  v,
678
- h || (y ? v ? (c || u) * y > v ? (c || u) * y : v : (c || u) * y : re)
679
+ h || (y ? v ? (s || u) * y > v ? (s || u) * y : v : (s || u) * y : re)
679
680
  ),
680
681
  scale: F,
681
682
  centerPoint: R,
@@ -710,7 +711,7 @@ function Pt(he) {
710
711
  style: {
711
712
  height: `${Math.max(
712
713
  v,
713
- h || (y ? v ? (c || u) * y > v ? (c || u) * y : v : (c || u) * y : re)
714
+ h || (y ? v ? (s || u) * y > v ? (s || u) * y : v : (s || u) * y : re)
714
715
  )}px`
715
716
  },
716
717
  className: "flex items-center justify-center",
@@ -729,7 +730,7 @@ function Pt(he) {
729
730
  },
730
731
  sources: V,
731
732
  footNote: oe,
732
- width: c
733
+ width: s
733
734
  }
734
735
  ) : null
735
736
  ] })