@undp/data-viz 1.2.8 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (642) hide show
  1. package/dist/AreaChart.cjs +2 -0
  2. package/dist/AreaChart.cjs.map +1 -0
  3. package/dist/AreaChart.d.ts +224 -0
  4. package/dist/AreaChart.js +531 -0
  5. package/dist/AreaChart.js.map +1 -0
  6. package/dist/Axis-DE7dSn1_.cjs +2 -0
  7. package/dist/Axis-DE7dSn1_.cjs.map +1 -0
  8. package/dist/Axis-Ddg-seDi.js +43 -0
  9. package/dist/Axis-Ddg-seDi.js.map +1 -0
  10. package/dist/AxisTitle-BmHLMRJZ.js +20 -0
  11. package/dist/AxisTitle-BmHLMRJZ.js.map +1 -0
  12. package/dist/AxisTitle-CK9YeovX.cjs +2 -0
  13. package/dist/AxisTitle-CK9YeovX.cjs.map +1 -0
  14. package/dist/BarGraph.cjs +2 -0
  15. package/dist/BarGraph.cjs.map +1 -0
  16. package/dist/BarGraph.d.ts +460 -0
  17. package/dist/BarGraph.js +4044 -0
  18. package/dist/BarGraph.js.map +1 -0
  19. package/dist/BasicStatCard.cjs +2 -0
  20. package/dist/BasicStatCard.cjs.map +1 -0
  21. package/dist/BasicStatCard.d.ts +106 -0
  22. package/dist/BasicStatCard.js +191 -0
  23. package/dist/BasicStatCard.js.map +1 -0
  24. package/dist/BeeSwarmChart.cjs +2 -0
  25. package/dist/BeeSwarmChart.cjs.map +1 -0
  26. package/dist/BeeSwarmChart.d.ts +181 -0
  27. package/dist/BeeSwarmChart.js +1043 -0
  28. package/dist/BeeSwarmChart.js.map +1 -0
  29. package/dist/BiVariateChoroplethMap.cjs +2 -0
  30. package/dist/BiVariateChoroplethMap.cjs.map +1 -0
  31. package/dist/BiVariateChoroplethMap.d.ts +189 -0
  32. package/dist/BiVariateChoroplethMap.js +721 -0
  33. package/dist/BiVariateChoroplethMap.js.map +1 -0
  34. package/dist/BulletChart.cjs +2 -0
  35. package/dist/BulletChart.cjs.map +1 -0
  36. package/dist/BulletChart.d.ts +219 -0
  37. package/dist/BulletChart.js +1432 -0
  38. package/dist/BulletChart.js.map +1 -0
  39. package/dist/ButterflyChart.cjs +2 -0
  40. package/dist/ButterflyChart.cjs.map +1 -0
  41. package/dist/ButterflyChart.d.ts +201 -0
  42. package/dist/ButterflyChart.js +693 -0
  43. package/dist/ButterflyChart.js.map +1 -0
  44. package/dist/ChoroplethMap.cjs +2 -0
  45. package/dist/ChoroplethMap.cjs.map +1 -0
  46. package/dist/ChoroplethMap.d.ts +190 -0
  47. package/dist/ChoroplethMap.js +746 -0
  48. package/dist/ChoroplethMap.js.map +1 -0
  49. package/dist/CirclePackingGraph.cjs +2 -0
  50. package/dist/CirclePackingGraph.cjs.map +1 -0
  51. package/dist/CirclePackingGraph.d.ts +153 -0
  52. package/dist/CirclePackingGraph.js +15 -0
  53. package/dist/CirclePackingGraph.js.map +1 -0
  54. package/dist/ColorLegend.cjs +2 -0
  55. package/dist/ColorLegend.cjs.map +1 -0
  56. package/dist/ColorLegend.d.ts +17 -0
  57. package/dist/ColorLegend.js +48 -0
  58. package/dist/ColorLegend.js.map +1 -0
  59. package/dist/ColorLegendWithMouseOver.cjs +2 -0
  60. package/dist/ColorLegendWithMouseOver.cjs.map +1 -0
  61. package/dist/ColorLegendWithMouseOver.d.ts +16 -0
  62. package/dist/ColorLegendWithMouseOver.js +71 -0
  63. package/dist/ColorLegendWithMouseOver.js.map +1 -0
  64. package/dist/Colors.cjs +2 -0
  65. package/dist/Colors.cjs.map +1 -0
  66. package/dist/Colors.d.ts +174 -0
  67. package/dist/Colors.js +562 -0
  68. package/dist/Colors.js.map +1 -0
  69. package/dist/CopyTextButton.cjs +17 -0
  70. package/dist/CopyTextButton.cjs.map +1 -0
  71. package/dist/CopyTextButton.d.ts +13 -0
  72. package/dist/CopyTextButton.js +699 -0
  73. package/dist/CopyTextButton.js.map +1 -0
  74. package/dist/CsvDownloadButton.cjs +23 -0
  75. package/dist/CsvDownloadButton.cjs.map +1 -0
  76. package/dist/CsvDownloadButton.d.ts +22 -0
  77. package/dist/CsvDownloadButton.js +868 -0
  78. package/dist/CsvDownloadButton.js.map +1 -0
  79. package/dist/DataCards.cjs +2 -0
  80. package/dist/DataCards.cjs.map +1 -0
  81. package/dist/DataCards.d.ts +131 -0
  82. package/dist/DataCards.js +15 -0
  83. package/dist/DataCards.js.map +1 -0
  84. package/dist/DataTable.cjs +2 -0
  85. package/dist/DataTable.cjs.map +1 -0
  86. package/dist/DataTable.d.ts +122 -0
  87. package/dist/DataTable.js +332 -0
  88. package/dist/DataTable.js.map +1 -0
  89. package/dist/DifferenceLineChart.cjs +2 -0
  90. package/dist/DifferenceLineChart.cjs.map +1 -0
  91. package/dist/DifferenceLineChart.d.ts +237 -0
  92. package/dist/DifferenceLineChart.js +806 -0
  93. package/dist/DifferenceLineChart.js.map +1 -0
  94. package/dist/DonutChart.cjs +2 -0
  95. package/dist/DonutChart.cjs.map +1 -0
  96. package/dist/DonutChart.d.ts +148 -0
  97. package/dist/DonutChart.js +479 -0
  98. package/dist/DonutChart.js.map +1 -0
  99. package/dist/DotDensityMap.cjs +2 -0
  100. package/dist/DotDensityMap.cjs.map +1 -0
  101. package/dist/DotDensityMap.d.ts +191 -0
  102. package/dist/DotDensityMap.js +601 -0
  103. package/dist/DotDensityMap.js.map +1 -0
  104. package/dist/DropdownSelect-0I2QxaVy.cjs +29 -0
  105. package/dist/DropdownSelect-0I2QxaVy.cjs.map +1 -0
  106. package/dist/DropdownSelect-CDC9lEqU.js +4193 -0
  107. package/dist/DropdownSelect-CDC9lEqU.js.map +1 -0
  108. package/dist/DualAxisLineChart.cjs +2 -0
  109. package/dist/DualAxisLineChart.cjs.map +1 -0
  110. package/dist/DualAxisLineChart.d.ts +180 -0
  111. package/dist/DualAxisLineChart.js +700 -0
  112. package/dist/DualAxisLineChart.js.map +1 -0
  113. package/dist/DumbbellChart.cjs +2 -0
  114. package/dist/DumbbellChart.cjs.map +1 -0
  115. package/dist/DumbbellChart.d.ts +224 -0
  116. package/dist/DumbbellChart.js +1511 -0
  117. package/dist/DumbbellChart.js.map +1 -0
  118. package/dist/EmptyState-DdTp-Mdn.js +22 -0
  119. package/dist/EmptyState-DdTp-Mdn.js.map +1 -0
  120. package/dist/EmptyState-d8_8SxeW.cjs +2 -0
  121. package/dist/EmptyState-d8_8SxeW.cjs.map +1 -0
  122. package/dist/ExcelDownloadButton.cjs +2 -0
  123. package/dist/ExcelDownloadButton.cjs.map +1 -0
  124. package/dist/ExcelDownloadButton.d.ts +22 -0
  125. package/dist/ExcelDownloadButton.js +30 -0
  126. package/dist/ExcelDownloadButton.js.map +1 -0
  127. package/dist/FootNote.cjs +2 -0
  128. package/dist/FootNote.cjs.map +1 -0
  129. package/dist/FootNote.d.ts +12 -0
  130. package/dist/FootNote.js +21 -0
  131. package/dist/FootNote.js.map +1 -0
  132. package/dist/GeoHubCompareMaps.cjs +2 -0
  133. package/dist/GeoHubCompareMaps.cjs.map +1 -0
  134. package/dist/GeoHubCompareMaps.d.ts +103 -0
  135. package/dist/GeoHubCompareMaps.js +371 -0
  136. package/dist/GeoHubCompareMaps.js.map +1 -0
  137. package/dist/GeoHubMap.cjs +2 -0
  138. package/dist/GeoHubMap.cjs.map +1 -0
  139. package/dist/GeoHubMap.d.ts +118 -0
  140. package/dist/GeoHubMap.js +430 -0
  141. package/dist/GeoHubMap.js.map +1 -0
  142. package/dist/GeoHubMapWithLayerSelection.cjs +2 -0
  143. package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -0
  144. package/dist/GeoHubMapWithLayerSelection.d.ts +117 -0
  145. package/dist/GeoHubMapWithLayerSelection.js +308 -0
  146. package/dist/GeoHubMapWithLayerSelection.js.map +1 -0
  147. package/dist/GraphDescription.cjs +2 -0
  148. package/dist/GraphDescription.cjs.map +1 -0
  149. package/dist/GraphDescription.d.ts +12 -0
  150. package/dist/GraphDescription.js +21 -0
  151. package/dist/GraphDescription.js.map +1 -0
  152. package/dist/GraphFooter.cjs +2 -0
  153. package/dist/GraphFooter.cjs.map +1 -0
  154. package/dist/GraphFooter.d.ts +24 -0
  155. package/dist/GraphFooter.js +22 -0
  156. package/dist/GraphFooter.js.map +1 -0
  157. package/dist/GraphHeader.cjs +2 -0
  158. package/dist/GraphHeader.cjs.map +1 -0
  159. package/dist/GraphHeader.d.ts +22 -0
  160. package/dist/GraphHeader.js +64 -0
  161. package/dist/GraphHeader.js.map +1 -0
  162. package/dist/GraphTitle.cjs +2 -0
  163. package/dist/GraphTitle.cjs.map +1 -0
  164. package/dist/GraphTitle.d.ts +13 -0
  165. package/dist/GraphTitle.js +29 -0
  166. package/dist/GraphTitle.js.map +1 -0
  167. package/dist/GriddedGraphs.cjs +2 -0
  168. package/dist/GriddedGraphs.cjs.map +1 -0
  169. package/dist/GriddedGraphs.d.ts +540 -0
  170. package/dist/GriddedGraphs.js +483 -0
  171. package/dist/GriddedGraphs.js.map +1 -0
  172. package/dist/GriddedGraphsFromConfig.cjs +2 -0
  173. package/dist/GriddedGraphsFromConfig.cjs.map +1 -0
  174. package/dist/GriddedGraphsFromConfig.d.ts +543 -0
  175. package/dist/GriddedGraphsFromConfig.js +43 -0
  176. package/dist/GriddedGraphsFromConfig.js.map +1 -0
  177. package/dist/HeatMap.cjs +2 -0
  178. package/dist/HeatMap.cjs.map +1 -0
  179. package/dist/HeatMap.d.ts +166 -0
  180. package/dist/HeatMap.js +452 -0
  181. package/dist/HeatMap.js.map +1 -0
  182. package/dist/Histogram.cjs +2 -0
  183. package/dist/Histogram.cjs.map +1 -0
  184. package/dist/Histogram.d.ts +165 -0
  185. package/dist/Histogram.js +288 -0
  186. package/dist/Histogram.js.map +1 -0
  187. package/dist/ImageDownloadButton.cjs +2 -0
  188. package/dist/ImageDownloadButton.cjs.map +1 -0
  189. package/dist/ImageDownloadButton.d.ts +15 -0
  190. package/dist/ImageDownloadButton.js +29 -0
  191. package/dist/ImageDownloadButton.js.map +1 -0
  192. package/dist/LineChartWithConfidenceInterval.cjs +2 -0
  193. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -0
  194. package/dist/LineChartWithConfidenceInterval.d.ts +250 -0
  195. package/dist/LineChartWithConfidenceInterval.js +819 -0
  196. package/dist/LineChartWithConfidenceInterval.js.map +1 -0
  197. package/dist/LinearColorLegend.cjs +2 -0
  198. package/dist/LinearColorLegend.cjs.map +1 -0
  199. package/dist/LinearColorLegend.d.ts +13 -0
  200. package/dist/LinearColorLegend.js +34 -0
  201. package/dist/LinearColorLegend.js.map +1 -0
  202. package/dist/Modal-CUU6ZK3U.js +1019 -0
  203. package/dist/Modal-CUU6ZK3U.js.map +1 -0
  204. package/dist/Modal-C_dl0EtQ.cjs +46 -0
  205. package/dist/Modal-C_dl0EtQ.cjs.map +1 -0
  206. package/dist/MultiGraphDashboard.cjs +2 -0
  207. package/dist/MultiGraphDashboard.cjs.map +1 -0
  208. package/dist/MultiGraphDashboard.d.ts +558 -0
  209. package/dist/MultiGraphDashboard.js +304 -0
  210. package/dist/MultiGraphDashboard.js.map +1 -0
  211. package/dist/MultiGraphDashboardFromConfig.cjs +2 -0
  212. package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -0
  213. package/dist/MultiGraphDashboardFromConfig.d.ts +562 -0
  214. package/dist/MultiGraphDashboardFromConfig.js +38 -0
  215. package/dist/MultiGraphDashboardFromConfig.js.map +1 -0
  216. package/dist/MultiGraphDashboardWideToLongFormat.cjs +2 -0
  217. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -0
  218. package/dist/MultiGraphDashboardWideToLongFormat.d.ts +128 -0
  219. package/dist/MultiGraphDashboardWideToLongFormat.js +244 -0
  220. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -0
  221. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +2 -0
  222. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -0
  223. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +133 -0
  224. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +31 -0
  225. package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -0
  226. package/dist/MultiLineAltChart.cjs +2 -0
  227. package/dist/MultiLineAltChart.cjs.map +1 -0
  228. package/dist/MultiLineAltChart.d.ts +244 -0
  229. package/dist/MultiLineAltChart.js +690 -0
  230. package/dist/MultiLineAltChart.js.map +1 -0
  231. package/dist/MultiLineChart.cjs +2 -0
  232. package/dist/MultiLineChart.cjs.map +1 -0
  233. package/dist/MultiLineChart.d.ts +246 -0
  234. package/dist/MultiLineChart.js +723 -0
  235. package/dist/MultiLineChart.js.map +1 -0
  236. package/dist/ParetoChart.cjs +2 -0
  237. package/dist/ParetoChart.cjs.map +1 -0
  238. package/dist/ParetoChart.d.ts +178 -0
  239. package/dist/ParetoChart.js +637 -0
  240. package/dist/ParetoChart.js.map +1 -0
  241. package/dist/RadarChart.cjs +2 -0
  242. package/dist/RadarChart.cjs.map +1 -0
  243. package/dist/RadarChart.d.ts +176 -0
  244. package/dist/RadarChart.js +678 -0
  245. package/dist/RadarChart.js.map +1 -0
  246. package/dist/ReferenceLine-C1GpoG9d.js +128 -0
  247. package/dist/ReferenceLine-C1GpoG9d.js.map +1 -0
  248. package/dist/ReferenceLine-CuFMk0cI.cjs +2 -0
  249. package/dist/ReferenceLine-CuFMk0cI.cjs.map +1 -0
  250. package/dist/RegressionLine-7_rKTHN_.cjs +2 -0
  251. package/dist/RegressionLine-7_rKTHN_.cjs.map +1 -0
  252. package/dist/RegressionLine-BFwDCTUU.js +48 -0
  253. package/dist/RegressionLine-BFwDCTUU.js.map +1 -0
  254. package/dist/SVGDownloadButton.cjs +2 -0
  255. package/dist/SVGDownloadButton.cjs.map +1 -0
  256. package/dist/SVGDownloadButton.d.ts +15 -0
  257. package/dist/SVGDownloadButton.js +29 -0
  258. package/dist/SVGDownloadButton.js.map +1 -0
  259. package/dist/SankeyChart.cjs +2 -0
  260. package/dist/SankeyChart.cjs.map +1 -0
  261. package/dist/SankeyChart.d.ts +178 -0
  262. package/dist/SankeyChart.js +990 -0
  263. package/dist/SankeyChart.js.map +1 -0
  264. package/dist/ScatterPlot.cjs +2 -0
  265. package/dist/ScatterPlot.cjs.map +1 -0
  266. package/dist/ScatterPlot.d.ts +266 -0
  267. package/dist/ScatterPlot.js +829 -0
  268. package/dist/ScatterPlot.js.map +1 -0
  269. package/dist/ScrollStory.cjs +2 -0
  270. package/dist/ScrollStory.cjs.map +1 -0
  271. package/dist/ScrollStory.d.ts +491 -0
  272. package/dist/ScrollStory.js +106 -0
  273. package/dist/ScrollStory.js.map +1 -0
  274. package/dist/SimpleLineChart.cjs +2 -0
  275. package/dist/SimpleLineChart.cjs.map +1 -0
  276. package/dist/SimpleLineChart.d.ts +230 -0
  277. package/dist/SimpleLineChart.js +620 -0
  278. package/dist/SimpleLineChart.js.map +1 -0
  279. package/dist/SingleGraphDashboard.cjs +2 -0
  280. package/dist/SingleGraphDashboard.cjs.map +1 -0
  281. package/dist/SingleGraphDashboard.d.ts +545 -0
  282. package/dist/SingleGraphDashboard.js +523 -0
  283. package/dist/SingleGraphDashboard.js.map +1 -0
  284. package/dist/SingleGraphDashboardFromConfig.cjs +2 -0
  285. package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -0
  286. package/dist/SingleGraphDashboardFromConfig.d.ts +547 -0
  287. package/dist/SingleGraphDashboardFromConfig.js +35 -0
  288. package/dist/SingleGraphDashboardFromConfig.js.map +1 -0
  289. package/dist/SlopeChart.cjs +2 -0
  290. package/dist/SlopeChart.cjs.map +1 -0
  291. package/dist/SlopeChart.d.ts +167 -0
  292. package/dist/SlopeChart.js +583 -0
  293. package/dist/SlopeChart.js.map +1 -0
  294. package/dist/Source.cjs +2 -0
  295. package/dist/Source.cjs.map +1 -0
  296. package/dist/Source.d.ts +16 -0
  297. package/dist/Source.js +41 -0
  298. package/dist/Source.js.map +1 -0
  299. package/dist/SparkLine.cjs +2 -0
  300. package/dist/SparkLine.cjs.map +1 -0
  301. package/dist/SparkLine.d.ts +139 -0
  302. package/dist/SparkLine.js +321 -0
  303. package/dist/SparkLine.js.map +1 -0
  304. package/dist/Spinner-C85UF28E.js +30 -0
  305. package/dist/Spinner-C85UF28E.js.map +1 -0
  306. package/dist/Spinner-DA6Z5E4n.cjs +2 -0
  307. package/dist/Spinner-DA6Z5E4n.cjs.map +1 -0
  308. package/dist/StatCardFromData.cjs +2 -0
  309. package/dist/StatCardFromData.cjs.map +1 -0
  310. package/dist/StatCardFromData.d.ts +115 -0
  311. package/dist/StatCardFromData.js +250 -0
  312. package/dist/StatCardFromData.js.map +1 -0
  313. package/dist/StripChart.cjs +2 -0
  314. package/dist/StripChart.cjs.map +1 -0
  315. package/dist/StripChart.d.ts +178 -0
  316. package/dist/StripChart.js +989 -0
  317. package/dist/StripChart.js.map +1 -0
  318. package/dist/ThreeDGlobe.cjs +2 -0
  319. package/dist/ThreeDGlobe.cjs.map +1 -0
  320. package/dist/ThreeDGlobe.d.ts +158 -0
  321. package/dist/ThreeDGlobe.js +452 -0
  322. package/dist/ThreeDGlobe.js.map +1 -0
  323. package/dist/ThresholdColorLegendWithMouseOver.cjs +2 -0
  324. package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -0
  325. package/dist/ThresholdColorLegendWithMouseOver.d.ts +16 -0
  326. package/dist/ThresholdColorLegendWithMouseOver.js +131 -0
  327. package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -0
  328. package/dist/Tooltip-DyM5snqx.js +46 -0
  329. package/dist/Tooltip-DyM5snqx.js.map +1 -0
  330. package/dist/Tooltip-n8z5bfav.cjs +2 -0
  331. package/dist/Tooltip-n8z5bfav.cjs.map +1 -0
  332. package/dist/TreeMapGraph.cjs +2 -0
  333. package/dist/TreeMapGraph.cjs.map +1 -0
  334. package/dist/TreeMapGraph.d.ts +158 -0
  335. package/dist/TreeMapGraph.js +761 -0
  336. package/dist/TreeMapGraph.js.map +1 -0
  337. package/dist/Types.cjs +2 -0
  338. package/dist/Types.cjs.map +1 -0
  339. package/dist/Types.d.ts +883 -0
  340. package/dist/Types.js +2 -0
  341. package/dist/Types.js.map +1 -0
  342. package/dist/Typography-Ctgfl1J5.js +140 -0
  343. package/dist/Typography-Ctgfl1J5.js.map +1 -0
  344. package/dist/Typography-k-kOjICQ.cjs +2 -0
  345. package/dist/Typography-k-kOjICQ.cjs.map +1 -0
  346. package/dist/UnitChart.cjs +2 -0
  347. package/dist/UnitChart.cjs.map +1 -0
  348. package/dist/UnitChart.d.ts +132 -0
  349. package/dist/UnitChart.js +217 -0
  350. package/dist/UnitChart.js.map +1 -0
  351. package/dist/XAxesLabels-CJMQbfVy.cjs +2 -0
  352. package/dist/XAxesLabels-CJMQbfVy.cjs.map +1 -0
  353. package/dist/XAxesLabels-DQFo_z2R.js +57 -0
  354. package/dist/XAxesLabels-DQFo_z2R.js.map +1 -0
  355. package/dist/XTicksAndGridLines-Bn9u5gOM.js +56 -0
  356. package/dist/XTicksAndGridLines-Bn9u5gOM.js.map +1 -0
  357. package/dist/XTicksAndGridLines-CCzXIV8d.cjs +2 -0
  358. package/dist/XTicksAndGridLines-CCzXIV8d.cjs.map +1 -0
  359. package/dist/YAxesLabels-BXLTX7AI.cjs +2 -0
  360. package/dist/YAxesLabels-BXLTX7AI.cjs.map +1 -0
  361. package/dist/YAxesLabels-H5-002X5.js +52 -0
  362. package/dist/YAxesLabels-H5-002X5.js.map +1 -0
  363. package/dist/YTicksAndGridLines-B6ah7CRf.js +56 -0
  364. package/dist/YTicksAndGridLines-B6ah7CRf.js.map +1 -0
  365. package/dist/YTicksAndGridLines-DBDuz6vb.cjs +2 -0
  366. package/dist/YTicksAndGridLines-DBDuz6vb.cjs.map +1 -0
  367. package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
  368. package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
  369. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  370. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  371. package/dist/area-BE2wo7fv.js +53 -0
  372. package/dist/area-BE2wo7fv.js.map +1 -0
  373. package/dist/area-D3Qx7k7K.cjs +2 -0
  374. package/dist/area-D3Qx7k7K.cjs.map +1 -0
  375. package/dist/array-B7TkkRH0.js +89 -0
  376. package/dist/array-B7TkkRH0.js.map +1 -0
  377. package/dist/array-DKbXV8lR.cjs +2 -0
  378. package/dist/array-DKbXV8lR.cjs.map +1 -0
  379. package/dist/band-BEjh2CHI.js +47 -0
  380. package/dist/band-BEjh2CHI.js.map +1 -0
  381. package/dist/band-CAApY4Pd.cjs +2 -0
  382. package/dist/band-CAApY4Pd.cjs.map +1 -0
  383. package/dist/checkIfMultiple-BB7PlCNh.js +2759 -0
  384. package/dist/checkIfMultiple-BB7PlCNh.js.map +1 -0
  385. package/dist/checkIfMultiple-D5ysrI7G.cjs +12 -0
  386. package/dist/checkIfMultiple-D5ysrI7G.cjs.map +1 -0
  387. package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs +2 -0
  388. package/dist/checkIfNullOrUndefined-BCW3Y1ML.cjs.map +1 -0
  389. package/dist/checkIfNullOrUndefined-DmfiKkNw.js +7 -0
  390. package/dist/checkIfNullOrUndefined-DmfiKkNw.js.map +1 -0
  391. package/dist/customArea-BYNyxAkm.cjs +2 -0
  392. package/dist/customArea-BYNyxAkm.cjs.map +1 -0
  393. package/dist/customArea-CaxScFmW.js +175 -0
  394. package/dist/customArea-CaxScFmW.js.map +1 -0
  395. package/dist/defaultLocale-BEa-49Qz.js +172 -0
  396. package/dist/defaultLocale-BEa-49Qz.js.map +1 -0
  397. package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
  398. package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
  399. package/dist/delaunay-C1uAf38t.js +684 -0
  400. package/dist/delaunay-C1uAf38t.js.map +1 -0
  401. package/dist/delaunay-rcy0HhZi.cjs +2 -0
  402. package/dist/delaunay-rcy0HhZi.cjs.map +1 -0
  403. package/dist/ensureCompleteData-BBDZbDCE.js +102 -0
  404. package/dist/ensureCompleteData-BBDZbDCE.js.map +1 -0
  405. package/dist/ensureCompleteData-DqWQ2Zbi.cjs +2 -0
  406. package/dist/ensureCompleteData-DqWQ2Zbi.cjs.map +1 -0
  407. package/dist/excelDownload-BOA-lskf.js +19 -0
  408. package/dist/excelDownload-BOA-lskf.js.map +1 -0
  409. package/dist/excelDownload-BQpsCa62.cjs +2 -0
  410. package/dist/excelDownload-BQpsCa62.cjs.map +1 -0
  411. package/dist/fetchAndParseData-Bcmr659B.js +1196 -0
  412. package/dist/fetchAndParseData-Bcmr659B.js.map +1 -0
  413. package/dist/fetchAndParseData-DmgQtB9n.cjs +16 -0
  414. package/dist/fetchAndParseData-DmgQtB9n.cjs.map +1 -0
  415. package/dist/fetchAndParseData.cjs +2 -0
  416. package/dist/fetchAndParseData.cjs.map +1 -0
  417. package/dist/fetchAndParseData.d.ts +84 -0
  418. package/dist/fetchAndParseData.js +10 -0
  419. package/dist/fetchAndParseData.js.map +1 -0
  420. package/dist/filterData-B8ocT57s.js +14 -0
  421. package/dist/filterData-B8ocT57s.js.map +1 -0
  422. package/dist/filterData-DN6py7y_.cjs +2 -0
  423. package/dist/filterData-DN6py7y_.cjs.map +1 -0
  424. package/dist/generateRandomString-B5zBiJzS.cjs +2 -0
  425. package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -0
  426. package/dist/generateRandomString-za3IQGfQ.js +11 -0
  427. package/dist/generateRandomString-za3IQGfQ.js.map +1 -0
  428. package/dist/getGraphList-DuColTJM.js +265 -0
  429. package/dist/getGraphList-DuColTJM.js.map +1 -0
  430. package/dist/getGraphList-gf02xgT2.cjs +2 -0
  431. package/dist/getGraphList-gf02xgT2.cjs.map +1 -0
  432. package/dist/getJenks-TWQvbuOz.cjs +2 -0
  433. package/dist/getJenks-TWQvbuOz.cjs.map +1 -0
  434. package/dist/getJenks-VhM3GIoC.js +23 -0
  435. package/dist/getJenks-VhM3GIoC.js.map +1 -0
  436. package/dist/getSchema.cjs +2 -0
  437. package/dist/getSchema.cjs.map +1 -0
  438. package/dist/getSchema.d.ts +3256 -0
  439. package/dist/getSchema.js +911 -0
  440. package/dist/getSchema.js.map +1 -0
  441. package/dist/getSliderMarks-C0jptXeP.js +1054 -0
  442. package/dist/getSliderMarks-C0jptXeP.js.map +1 -0
  443. package/dist/getSliderMarks-CtsEXiLV.cjs +6 -0
  444. package/dist/getSliderMarks-CtsEXiLV.cjs.map +1 -0
  445. package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js +28 -0
  446. package/dist/getTextColorBasedOnBgColor-B6Nk2WBf.js.map +1 -0
  447. package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs +2 -0
  448. package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs.map +1 -0
  449. package/dist/getUniqValue-BtUENB2H.js +20 -0
  450. package/dist/getUniqValue-BtUENB2H.js.map +1 -0
  451. package/dist/getUniqValue-CHqgSss5.cjs +2 -0
  452. package/dist/getUniqValue-CHqgSss5.cjs.map +1 -0
  453. package/dist/imageDownload-CgDcm1Sj.cjs +3 -0
  454. package/dist/imageDownload-CgDcm1Sj.cjs.map +1 -0
  455. package/dist/imageDownload-Dcci2LEy.js +495 -0
  456. package/dist/imageDownload-Dcci2LEy.js.map +1 -0
  457. package/dist/index-27yTRcko.js +35 -0
  458. package/dist/index-27yTRcko.js.map +1 -0
  459. package/dist/index-B0rbzOoC.cjs +2 -0
  460. package/dist/index-B0rbzOoC.cjs.map +1 -0
  461. package/dist/index-BLizQDlg.js +658 -0
  462. package/dist/index-BLizQDlg.js.map +1 -0
  463. package/dist/index-BVnYktl4.js +435 -0
  464. package/dist/index-BVnYktl4.js.map +1 -0
  465. package/dist/index-BW_-wD2k.cjs +2 -0
  466. package/dist/index-BW_-wD2k.cjs.map +1 -0
  467. package/dist/index-BXns0-ng.cjs +2 -0
  468. package/dist/index-BXns0-ng.cjs.map +1 -0
  469. package/dist/index-BczVvEBZ.cjs +2 -0
  470. package/dist/index-BczVvEBZ.cjs.map +1 -0
  471. package/dist/index-BmCqpO1B.js +342 -0
  472. package/dist/index-BmCqpO1B.js.map +1 -0
  473. package/dist/index-BxAUvrua.js +120 -0
  474. package/dist/index-BxAUvrua.js.map +1 -0
  475. package/dist/index-BzeLQvXk.cjs +2 -0
  476. package/dist/index-BzeLQvXk.cjs.map +1 -0
  477. package/dist/index-C1rRk_50.js +273 -0
  478. package/dist/index-C1rRk_50.js.map +1 -0
  479. package/dist/index-C21TvELx.cjs +2 -0
  480. package/dist/index-C21TvELx.cjs.map +1 -0
  481. package/dist/index-CHPV5EwG-BPSP-7Jg.js +3341 -0
  482. package/dist/index-CHPV5EwG-BPSP-7Jg.js.map +1 -0
  483. package/dist/index-CHPV5EwG-DDoeWRVt.cjs +44 -0
  484. package/dist/index-CHPV5EwG-DDoeWRVt.cjs.map +1 -0
  485. package/dist/index-CZbIGs8q.cjs +2 -0
  486. package/dist/index-CZbIGs8q.cjs.map +1 -0
  487. package/dist/index-CaAIPGZo.js +631 -0
  488. package/dist/index-CaAIPGZo.js.map +1 -0
  489. package/dist/index-CylX-pWB.cjs +2 -0
  490. package/dist/index-CylX-pWB.cjs.map +1 -0
  491. package/dist/index-D7ltPi18.js +26 -0
  492. package/dist/index-D7ltPi18.js.map +1 -0
  493. package/dist/index-D9h2WYDS.cjs +22 -0
  494. package/dist/index-D9h2WYDS.cjs.map +1 -0
  495. package/dist/index-DG3YrCr5-D3FrrXj8.js +459 -0
  496. package/dist/index-DG3YrCr5-D3FrrXj8.js.map +1 -0
  497. package/dist/index-DG3YrCr5-v7rayV3N.cjs +2 -0
  498. package/dist/index-DG3YrCr5-v7rayV3N.cjs.map +1 -0
  499. package/dist/index-DVOJ7vxH.cjs +10 -0
  500. package/dist/index-DVOJ7vxH.cjs.map +1 -0
  501. package/dist/index-D_n8aamX.cjs +2 -0
  502. package/dist/index-D_n8aamX.cjs.map +1 -0
  503. package/dist/index-Ds0uHjK9.cjs +2 -0
  504. package/dist/index-Ds0uHjK9.cjs.map +1 -0
  505. package/dist/index-DxagiOHo.js +707 -0
  506. package/dist/index-DxagiOHo.js.map +1 -0
  507. package/dist/index-OCoyy1wG.js +635 -0
  508. package/dist/index-OCoyy1wG.js.map +1 -0
  509. package/dist/index-UV9hjG_S.js +53 -0
  510. package/dist/index-UV9hjG_S.js.map +1 -0
  511. package/dist/index-n_RI8T0n.js +77 -0
  512. package/dist/index-n_RI8T0n.js.map +1 -0
  513. package/dist/index-tvAyXPPW-DBlMKnNB.js +47 -0
  514. package/dist/index-tvAyXPPW-DBlMKnNB.js.map +1 -0
  515. package/dist/index-tvAyXPPW-DPOG-C2i.cjs +2 -0
  516. package/dist/index-tvAyXPPW-DPOG-C2i.cjs.map +1 -0
  517. package/dist/index.cjs +1 -67
  518. package/dist/index.cjs.map +1 -1
  519. package/dist/index.d.ts +1 -5
  520. package/dist/index.js +178 -52486
  521. package/dist/index.js.map +1 -1
  522. package/dist/init-BhZylTFx.js +63 -0
  523. package/dist/init-BhZylTFx.js.map +1 -0
  524. package/dist/init-DU0ybBc_.cjs +2 -0
  525. package/dist/init-DU0ybBc_.cjs.map +1 -0
  526. package/dist/line-CPfhohvF.js +68 -0
  527. package/dist/line-CPfhohvF.js.map +1 -0
  528. package/dist/line-DHV4JwCR.cjs +2 -0
  529. package/dist/line-DHV4JwCR.cjs.map +1 -0
  530. package/dist/linear-BVckp9RD.cjs +2 -0
  531. package/dist/linear-BVckp9RD.cjs.map +1 -0
  532. package/dist/linear-DUdu7l2G.js +221 -0
  533. package/dist/linear-DUdu7l2G.js.map +1 -0
  534. package/dist/numberFormattingFunction-02t-wJta.cjs +2 -0
  535. package/dist/numberFormattingFunction-02t-wJta.cjs.map +1 -0
  536. package/dist/numberFormattingFunction-14YCbkN2.js +13 -0
  537. package/dist/numberFormattingFunction-14YCbkN2.js.map +1 -0
  538. package/dist/ordinal-BOeNbyae.cjs +2 -0
  539. package/dist/ordinal-BOeNbyae.cjs.map +1 -0
  540. package/dist/ordinal-w9Lu4Stb.js +62 -0
  541. package/dist/ordinal-w9Lu4Stb.js.map +1 -0
  542. package/dist/parse-DlCRUFh_.js +2768 -0
  543. package/dist/parse-DlCRUFh_.js.map +1 -0
  544. package/dist/parse-hMnG_lRV.cjs +2 -0
  545. package/dist/parse-hMnG_lRV.cjs.map +1 -0
  546. package/dist/pointer-CWRWOsrb.js +23 -0
  547. package/dist/pointer-CWRWOsrb.js.map +1 -0
  548. package/dist/pointer-Dkq5NV1q.cjs +2 -0
  549. package/dist/pointer-Dkq5NV1q.cjs.map +1 -0
  550. package/dist/pow-B5-jkdHU.cjs +2 -0
  551. package/dist/pow-B5-jkdHU.cjs.map +1 -0
  552. package/dist/pow-e8zx3AQJ.js +35 -0
  553. package/dist/pow-e8zx3AQJ.js.map +1 -0
  554. package/dist/proxy-DJxJg1kD.js +4612 -0
  555. package/dist/proxy-DJxJg1kD.js.map +1 -0
  556. package/dist/proxy-PQd2AItT.cjs +2 -0
  557. package/dist/proxy-PQd2AItT.cjs.map +1 -0
  558. package/dist/removeOutliers-DR48e-18.js +57 -0
  559. package/dist/removeOutliers-DR48e-18.js.map +1 -0
  560. package/dist/removeOutliers-WELHHqiI.cjs +2 -0
  561. package/dist/removeOutliers-WELHHqiI.cjs.map +1 -0
  562. package/dist/select-Bnfk0lJx.cjs +2 -0
  563. package/dist/select-Bnfk0lJx.cjs.map +1 -0
  564. package/dist/select-DKy99ogv.js +584 -0
  565. package/dist/select-DKy99ogv.js.map +1 -0
  566. package/dist/simple-statistics-flVzqVtt.js +65 -0
  567. package/dist/simple-statistics-flVzqVtt.js.map +1 -0
  568. package/dist/simple-statistics-xm8c0LQQ.cjs +2 -0
  569. package/dist/simple-statistics-xm8c0LQQ.cjs.map +1 -0
  570. package/dist/step-BZ3C8QFW.cjs +2 -0
  571. package/dist/step-BZ3C8QFW.cjs.map +1 -0
  572. package/dist/step-BrDul-H4.js +119 -0
  573. package/dist/step-BrDul-H4.js.map +1 -0
  574. package/dist/string-B8KlVSPX.js +364 -0
  575. package/dist/string-B8KlVSPX.js.map +1 -0
  576. package/dist/string-CRoCZCYa.cjs +2 -0
  577. package/dist/string-CRoCZCYa.cjs.map +1 -0
  578. package/dist/string2HTML-CWHGfz_d.js +758 -0
  579. package/dist/string2HTML-CWHGfz_d.js.map +1 -0
  580. package/dist/string2HTML-D2Avudmb.cjs +3 -0
  581. package/dist/string2HTML-D2Avudmb.cjs.map +1 -0
  582. package/dist/style.css +1 -1
  583. package/dist/svgDownload-C2-E3yf2.js +9 -0
  584. package/dist/svgDownload-C2-E3yf2.js.map +1 -0
  585. package/dist/svgDownload-D9zEGjTF.cjs +2 -0
  586. package/dist/svgDownload-D9zEGjTF.cjs.map +1 -0
  587. package/dist/threshold-DFfqcDMa.js +23 -0
  588. package/dist/threshold-DFfqcDMa.js.map +1 -0
  589. package/dist/threshold-DNsSUf8Q.cjs +2 -0
  590. package/dist/threshold-DNsSUf8Q.cjs.map +1 -0
  591. package/dist/time-Byw_jYQ7.cjs +2 -0
  592. package/dist/time-Byw_jYQ7.cjs.map +1 -0
  593. package/dist/time-BzJP5SPC.js +715 -0
  594. package/dist/time-BzJP5SPC.js.map +1 -0
  595. package/dist/timer-B39XOBYL.js +124 -0
  596. package/dist/timer-B39XOBYL.js.map +1 -0
  597. package/dist/timer-CKyBCVzT.cjs +2 -0
  598. package/dist/timer-CKyBCVzT.cjs.map +1 -0
  599. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +4 -0
  600. package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +1 -0
  601. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +145 -0
  602. package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +1 -0
  603. package/dist/transformData.cjs +2 -0
  604. package/dist/transformData.cjs.map +1 -0
  605. package/dist/transformData.d.ts +170 -0
  606. package/dist/transformData.js +10 -0
  607. package/dist/transformData.js.map +1 -0
  608. package/dist/transformDataForAggregation-BUGJnson.cjs +2 -0
  609. package/dist/transformDataForAggregation-BUGJnson.cjs.map +1 -0
  610. package/dist/transformDataForAggregation-DAQJWGNL.js +759 -0
  611. package/dist/transformDataForAggregation-DAQJWGNL.js.map +1 -0
  612. package/dist/transformDataForGraphFromFile-CrntpaMU.cjs +2 -0
  613. package/dist/transformDataForGraphFromFile-CrntpaMU.cjs.map +1 -0
  614. package/dist/transformDataForGraphFromFile-DdNiOWeC.js +24 -0
  615. package/dist/transformDataForGraphFromFile-DdNiOWeC.js.map +1 -0
  616. package/dist/use-in-view-BAHrBy6b.js +40 -0
  617. package/dist/use-in-view-BAHrBy6b.js.map +1 -0
  618. package/dist/use-in-view-BCmzDU2O.cjs +2 -0
  619. package/dist/use-in-view-BCmzDU2O.cjs.map +1 -0
  620. package/dist/utils.cjs +2 -0
  621. package/dist/utils.cjs.map +1 -0
  622. package/dist/utils.d.ts +217 -0
  623. package/dist/utils.js +27 -0
  624. package/dist/utils.js.map +1 -0
  625. package/dist/validateSchema.cjs +2 -0
  626. package/dist/validateSchema.cjs.map +1 -0
  627. package/dist/validateSchema.d.ts +68 -0
  628. package/dist/validateSchema.js +105 -0
  629. package/dist/validateSchema.js.map +1 -0
  630. package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +27 -0
  631. package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +1 -0
  632. package/dist/x-CnsEH4Ox-DDvAJndW.js +101 -0
  633. package/dist/x-CnsEH4Ox-DDvAJndW.js.map +1 -0
  634. package/dist/y-D0sAaVii.js +421 -0
  635. package/dist/y-D0sAaVii.js.map +1 -0
  636. package/dist/y-QcCbqrzx.cjs +2 -0
  637. package/dist/y-QcCbqrzx.cjs.map +1 -0
  638. package/dist/zoom-Lo7IAUfC.cjs +2 -0
  639. package/dist/zoom-Lo7IAUfC.cjs.map +1 -0
  640. package/dist/zoom-_lqdiGoI.js +1983 -0
  641. package/dist/zoom-_lqdiGoI.js.map +1 -0
  642. package/package.json +340 -4
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DDoeWRVt.cjs"),b=require("./Typography-k-kOjICQ.cjs"),N=require("./GraphFooter.cjs"),w=require("./GraphHeader.cjs"),E=require("./numberFormattingFunction-02t-wJta.cjs");function v(R){const{year:o,value:c,graphTitle:i,suffix:m="",sources:l,prefix:p="",graphDescription:n,footNote:x,padding:u,backgroundColor:a=!1,graphID:k,language:s="en",theme:S="light",ariaLabel:$,textBackground:d=!1,headingFontSize:g="4.375rem",centerAlign:h=!1,verticalAlign:f="center",layout:y="primary",styles:t,classNames:r,precision:j}=R;return e.jsxRuntimeExports.jsx("div",{className:`${S||"light"} flex w-full`,dir:s==="he"||s==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${a?a===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}flex flex-col w-full h-inherit ${s||"en"}`,r?.graphContainer),style:{...t?.graphContainer||{},...a&&a!==!0?{backgroundColor:a}:{}},id:k,"aria-label":$||`${i?`The graph shows ${i}. `:""}This is a statistic card.${n?` ${n}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:a?u||"1rem":u||0},children:y!=="secondary"?e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-12 justify-between grow",children:[i||n?e.jsxRuntimeExports.jsx(w.GraphHeader,{styles:{title:t?.title,description:t?.description},classNames:{title:r?.title,description:r?.description},graphTitle:i,graphDescription:n}):null,e.jsxRuntimeExports.jsx("div",{className:`flex flex-col justify-between grow ${f==="top"?"justify-start":f==="bottom"?"justify-end":"justify-center"}`,children:e.jsxRuntimeExports.jsxs(b.h,{marginBottom:"base",className:`leading-none text-outline font-heading ${h?"text-center":s==="he"||s==="ar"?"text-right":"text-left"} ${d?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:g,letterSpacing:"0.05rem"},children:[E.numberFormattingFunction(c,"NA",j,p,m)," ",o?e.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",o,")"]}):null]})}),l||x?e.jsxRuntimeExports.jsx(N.GraphFooter,{styles:{footnote:t?.footnote,source:t?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:l,footNote:x}):null]}):e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-center",children:[e.jsxRuntimeExports.jsxs(b.h,{marginBottom:y==="secondary"?"none":"base",className:`leading-none text-outline font-heading ${h?"text-center":s==="he"||s==="ar"?"text-right":"text-left"} ${d?"text-primary-black dark:text-primary-white":"transparent"}`,style:{fontSize:g,letterSpacing:"0.05rem"},children:[E.numberFormattingFunction(c,"NA",j,p,m)," ",o?e.jsxRuntimeExports.jsxs("span",{className:"text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",style:{marginLeft:"-8px",lineHeight:"1.09",textShadow:"none",WebkitTextStrokeWidth:0},children:["(",o,")"]}):null]}),i||n?e.jsxRuntimeExports.jsx(w.GraphHeader,{styles:{title:t?.title,description:t?.description},classNames:{title:r?.title,description:r?.description},graphTitle:i,graphDescription:n}):null,l||x?e.jsxRuntimeExports.jsx(N.GraphFooter,{styles:{footnote:t?.footnote,source:t?.source},classNames:{footnote:r?.footnote,source:r?.source},sources:l,footNote:x}):null]})})})})}exports.BasicStatCard=v;
2
+ //# sourceMappingURL=BasicStatCard.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasicStatCard.cjs","sources":["../src/Components/Graphs/StatCard/index.tsx"],"sourcesContent":["import { H3 } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { ClassNameObject, Languages, SourcesDataType, StyleObject } from '@/Types';\r\n\r\ninterface Props {\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Defines the layout for the cards */\r\n layout?: 'primary' | 'secondary';\r\n /** Font size of the main text */\r\n headingFontSize?: string;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Toggle the fill color of the main text. */\r\n textBackground?: boolean;\r\n /** Toggle is the text is center aligned. */\r\n centerAlign?: boolean;\r\n /** Vertical alignment of the main text */\r\n verticalAlign?: 'center' | 'top' | 'bottom';\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Main text */\r\n value: number | string;\r\n /** Sub text next to main text */\r\n year?: number | string;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BasicStatCard(props: Props) {\r\n const {\r\n year,\r\n value,\r\n graphTitle,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n graphID,\r\n language = 'en',\r\n theme = 'light',\r\n ariaLabel,\r\n textBackground = false,\r\n headingFontSize = '4.375rem',\r\n centerAlign = false,\r\n verticalAlign = 'center',\r\n layout = 'primary',\r\n styles,\r\n classNames,\r\n precision,\r\n } = props;\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex w-full`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }flex flex-col w-full h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${graphTitle ? `The graph shows ${graphTitle}. ` : ''}This is a statistic card.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n {layout !== 'secondary' ? (\r\n <div className='flex flex-col w-full gap-12 justify-between grow'>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\r\n <div\r\n className={`flex flex-col justify-between grow ${\r\n verticalAlign === 'top'\r\n ? 'justify-start'\r\n : verticalAlign === 'bottom'\r\n ? 'justify-end'\r\n : 'justify-center'\r\n }`}\r\n >\r\n <H3\r\n marginBottom='base'\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {numberFormattingFunction(value, 'NA', precision, prefix, suffix)}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n />\r\n ) : null}\r\n </div>\r\n ) : (\r\n <div className='flex flex-col w-full gap-4 grow justify-center'>\r\n <H3\r\n marginBottom={layout === 'secondary' ? 'none' : 'base'}\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {numberFormattingFunction(value, 'NA', precision, prefix, suffix)}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n />\r\n ) : null}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["BasicStatCard","props","year","value","graphTitle","suffix","sources","prefix","graphDescription","footNote","padding","backgroundColor","graphID","language","theme","ariaLabel","textBackground","headingFontSize","centerAlign","verticalAlign","layout","styles","classNames","precision","jsx","cn","jsxs","GraphHeader","H3","numberFormattingFunction","GraphFooter"],"mappings":"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"}
@@ -0,0 +1,106 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ declare interface AxesClassNameObject {
4
+ gridLines?: string;
5
+ labels?: string;
6
+ title?: string;
7
+ axis?: string;
8
+ }
9
+
10
+ declare interface AxesStyleObject {
11
+ gridLines?: React.CSSProperties;
12
+ labels?: React.CSSProperties;
13
+ title?: React.CSSProperties;
14
+ axis?: React.CSSProperties;
15
+ }
16
+
17
+ export declare function BasicStatCard(props: Props): JSX.Element;
18
+
19
+ declare interface ClassNameObject {
20
+ title?: string;
21
+ footnote?: string;
22
+ source?: string;
23
+ description?: string;
24
+ tooltip?: string;
25
+ xAxis?: AxesClassNameObject;
26
+ yAxis?: AxesClassNameObject;
27
+ legend?: string;
28
+ graphContainer?: string;
29
+ graphObjectValues?: string;
30
+ dataConnectors?: string;
31
+ mouseOverLine?: string;
32
+ regLine?: string;
33
+ dataCards?: string;
34
+ }
35
+
36
+ declare type Languages = 'en' | 'ar' | 'az' | 'bn' | 'cy' | 'he' | 'hi' | 'jp' | 'ka' | 'km' | 'ko' | 'my' | 'ne' | 'zh' | 'custom';
37
+
38
+ declare interface Props {
39
+ /** Title of the graph */
40
+ graphTitle?: string | React.ReactNode;
41
+ /** Description of the graph */
42
+ graphDescription?: string | React.ReactNode;
43
+ /** Footnote for the graph */
44
+ footNote?: string | React.ReactNode;
45
+ /** Source data for the graph */
46
+ sources?: SourcesDataType[];
47
+ /** Accessibility label */
48
+ ariaLabel?: string;
49
+ /** Background color of the graph */
50
+ backgroundColor?: string | boolean;
51
+ /** Defines the layout for the cards */
52
+ layout?: 'primary' | 'secondary';
53
+ /** Font size of the main text */
54
+ headingFontSize?: string;
55
+ /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */
56
+ padding?: string;
57
+ /** Toggle the fill color of the main text. */
58
+ textBackground?: boolean;
59
+ /** Toggle is the text is center aligned. */
60
+ centerAlign?: boolean;
61
+ /** Vertical alignment of the main text */
62
+ verticalAlign?: 'center' | 'top' | 'bottom';
63
+ /** Custom styles for the graph. Each object should be a valid React CSS style object. */
64
+ styles?: StyleObject;
65
+ /** Custom class names */
66
+ classNames?: ClassNameObject;
67
+ /** Prefix for values */
68
+ prefix?: string;
69
+ /** Suffix for values */
70
+ suffix?: string;
71
+ /** Specifies the number of decimal places to display in the value. */
72
+ precision?: number;
73
+ /** Main text */
74
+ value: number | string;
75
+ /** Sub text next to main text */
76
+ year?: number | string;
77
+ /** Language setting */
78
+ language?: Languages;
79
+ /** Color theme */
80
+ theme?: 'light' | 'dark';
81
+ /** Unique ID for the graph */
82
+ graphID?: string;
83
+ }
84
+
85
+ declare interface SourcesDataType {
86
+ source: string;
87
+ link?: string;
88
+ }
89
+
90
+ declare interface StyleObject {
91
+ title?: React.CSSProperties;
92
+ footnote?: React.CSSProperties;
93
+ source?: React.CSSProperties;
94
+ description?: React.CSSProperties;
95
+ graphContainer?: React.CSSProperties;
96
+ tooltip?: React.CSSProperties;
97
+ xAxis?: AxesStyleObject;
98
+ yAxis?: AxesStyleObject;
99
+ graphObjectValues?: React.CSSProperties;
100
+ dataConnectors?: React.CSSProperties;
101
+ mouseOverLine?: React.CSSProperties;
102
+ regLine?: React.CSSProperties;
103
+ dataCards?: React.CSSProperties;
104
+ }
105
+
106
+ export { }
@@ -0,0 +1,191 @@
1
+ import { j as e, m as A } from "./index-CHPV5EwG-BPSP-7Jg.js";
2
+ import { h as b } from "./Typography-Ctgfl1J5.js";
3
+ import { GraphFooter as N } from "./GraphFooter.js";
4
+ import { GraphHeader as w } from "./GraphHeader.js";
5
+ import { n as k } from "./numberFormattingFunction-14YCbkN2.js";
6
+ function H($) {
7
+ const {
8
+ year: n,
9
+ value: m,
10
+ graphTitle: s,
11
+ suffix: x = "",
12
+ sources: o,
13
+ prefix: d = "",
14
+ graphDescription: i,
15
+ footNote: c,
16
+ padding: f,
17
+ backgroundColor: l = !1,
18
+ graphID: S,
19
+ language: a = "en",
20
+ theme: v = "light",
21
+ ariaLabel: T,
22
+ textBackground: p = !1,
23
+ headingFontSize: g = "4.375rem",
24
+ centerAlign: h = !1,
25
+ verticalAlign: u = "center",
26
+ layout: y = "primary",
27
+ styles: t,
28
+ classNames: r,
29
+ precision: j
30
+ } = $;
31
+ return /* @__PURE__ */ e.jsx(
32
+ "div",
33
+ {
34
+ className: `${v || "light"} flex w-full`,
35
+ dir: a === "he" || a === "ar" ? "rtl" : void 0,
36
+ children: /* @__PURE__ */ e.jsx(
37
+ "div",
38
+ {
39
+ className: A(
40
+ `${l ? l === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}flex flex-col w-full h-inherit ${a || "en"}`,
41
+ r?.graphContainer
42
+ ),
43
+ style: {
44
+ ...t?.graphContainer || {},
45
+ ...l && l !== !0 ? { backgroundColor: l } : {}
46
+ },
47
+ id: S,
48
+ "aria-label": T || `${s ? `The graph shows ${s}. ` : ""}This is a statistic card.${i ? ` ${i}` : ""}`,
49
+ children: /* @__PURE__ */ e.jsx(
50
+ "div",
51
+ {
52
+ className: "flex grow",
53
+ style: { padding: l ? f || "1rem" : f || 0 },
54
+ children: y !== "secondary" ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-12 justify-between grow", children: [
55
+ s || i ? /* @__PURE__ */ e.jsx(
56
+ w,
57
+ {
58
+ styles: {
59
+ title: t?.title,
60
+ description: t?.description
61
+ },
62
+ classNames: {
63
+ title: r?.title,
64
+ description: r?.description
65
+ },
66
+ graphTitle: s,
67
+ graphDescription: i
68
+ }
69
+ ) : null,
70
+ /* @__PURE__ */ e.jsx(
71
+ "div",
72
+ {
73
+ className: `flex flex-col justify-between grow ${u === "top" ? "justify-start" : u === "bottom" ? "justify-end" : "justify-center"}`,
74
+ children: /* @__PURE__ */ e.jsxs(
75
+ b,
76
+ {
77
+ marginBottom: "base",
78
+ className: `leading-none text-outline font-heading ${h ? "text-center" : a === "he" || a === "ar" ? "text-right" : "text-left"} ${p ? "text-primary-black dark:text-primary-white" : "transparent"}`,
79
+ style: {
80
+ fontSize: g,
81
+ letterSpacing: "0.05rem"
82
+ },
83
+ children: [
84
+ k(m, "NA", j, d, x),
85
+ " ",
86
+ n ? /* @__PURE__ */ e.jsxs(
87
+ "span",
88
+ {
89
+ className: "text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",
90
+ style: {
91
+ marginLeft: "-8px",
92
+ lineHeight: "1.09",
93
+ textShadow: "none",
94
+ WebkitTextStrokeWidth: 0
95
+ },
96
+ children: [
97
+ "(",
98
+ n,
99
+ ")"
100
+ ]
101
+ }
102
+ ) : null
103
+ ]
104
+ }
105
+ )
106
+ }
107
+ ),
108
+ o || c ? /* @__PURE__ */ e.jsx(
109
+ N,
110
+ {
111
+ styles: { footnote: t?.footnote, source: t?.source },
112
+ classNames: {
113
+ footnote: r?.footnote,
114
+ source: r?.source
115
+ },
116
+ sources: o,
117
+ footNote: c
118
+ }
119
+ ) : null
120
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-center", children: [
121
+ /* @__PURE__ */ e.jsxs(
122
+ b,
123
+ {
124
+ marginBottom: y === "secondary" ? "none" : "base",
125
+ className: `leading-none text-outline font-heading ${h ? "text-center" : a === "he" || a === "ar" ? "text-right" : "text-left"} ${p ? "text-primary-black dark:text-primary-white" : "transparent"}`,
126
+ style: {
127
+ fontSize: g,
128
+ letterSpacing: "0.05rem"
129
+ },
130
+ children: [
131
+ k(m, "NA", j, d, x),
132
+ " ",
133
+ n ? /* @__PURE__ */ e.jsxs(
134
+ "span",
135
+ {
136
+ className: "text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400",
137
+ style: {
138
+ marginLeft: "-8px",
139
+ lineHeight: "1.09",
140
+ textShadow: "none",
141
+ WebkitTextStrokeWidth: 0
142
+ },
143
+ children: [
144
+ "(",
145
+ n,
146
+ ")"
147
+ ]
148
+ }
149
+ ) : null
150
+ ]
151
+ }
152
+ ),
153
+ s || i ? /* @__PURE__ */ e.jsx(
154
+ w,
155
+ {
156
+ styles: {
157
+ title: t?.title,
158
+ description: t?.description
159
+ },
160
+ classNames: {
161
+ title: r?.title,
162
+ description: r?.description
163
+ },
164
+ graphTitle: s,
165
+ graphDescription: i
166
+ }
167
+ ) : null,
168
+ o || c ? /* @__PURE__ */ e.jsx(
169
+ N,
170
+ {
171
+ styles: { footnote: t?.footnote, source: t?.source },
172
+ classNames: {
173
+ footnote: r?.footnote,
174
+ source: r?.source
175
+ },
176
+ sources: o,
177
+ footNote: c
178
+ }
179
+ ) : null
180
+ ] })
181
+ }
182
+ )
183
+ }
184
+ )
185
+ }
186
+ );
187
+ }
188
+ export {
189
+ H as BasicStatCard
190
+ };
191
+ //# sourceMappingURL=BasicStatCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasicStatCard.js","sources":["../src/Components/Graphs/StatCard/index.tsx"],"sourcesContent":["import { H3 } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { ClassNameObject, Languages, SourcesDataType, StyleObject } from '@/Types';\r\n\r\ninterface Props {\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Defines the layout for the cards */\r\n layout?: 'primary' | 'secondary';\r\n /** Font size of the main text */\r\n headingFontSize?: string;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n /** Toggle the fill color of the main text. */\r\n textBackground?: boolean;\r\n /** Toggle is the text is center aligned. */\r\n centerAlign?: boolean;\r\n /** Vertical alignment of the main text */\r\n verticalAlign?: 'center' | 'top' | 'bottom';\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Main text */\r\n value: number | string;\r\n /** Sub text next to main text */\r\n year?: number | string;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function BasicStatCard(props: Props) {\r\n const {\r\n year,\r\n value,\r\n graphTitle,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n graphID,\r\n language = 'en',\r\n theme = 'light',\r\n ariaLabel,\r\n textBackground = false,\r\n headingFontSize = '4.375rem',\r\n centerAlign = false,\r\n verticalAlign = 'center',\r\n layout = 'primary',\r\n styles,\r\n classNames,\r\n precision,\r\n } = props;\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex w-full`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }flex flex-col w-full h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${graphTitle ? `The graph shows ${graphTitle}. ` : ''}This is a statistic card.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n {layout !== 'secondary' ? (\r\n <div className='flex flex-col w-full gap-12 justify-between grow'>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\r\n <div\r\n className={`flex flex-col justify-between grow ${\r\n verticalAlign === 'top'\r\n ? 'justify-start'\r\n : verticalAlign === 'bottom'\r\n ? 'justify-end'\r\n : 'justify-center'\r\n }`}\r\n >\r\n <H3\r\n marginBottom='base'\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {numberFormattingFunction(value, 'NA', precision, prefix, suffix)}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n </div>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n />\r\n ) : null}\r\n </div>\r\n ) : (\r\n <div className='flex flex-col w-full gap-4 grow justify-center'>\r\n <H3\r\n marginBottom={layout === 'secondary' ? 'none' : 'base'}\r\n className={`leading-none text-outline font-heading ${\r\n centerAlign\r\n ? 'text-center'\r\n : language === 'he' || language === 'ar'\r\n ? 'text-right'\r\n : 'text-left'\r\n } ${textBackground ? 'text-primary-black dark:text-primary-white' : 'transparent'}`}\r\n style={{\r\n fontSize: headingFontSize,\r\n letterSpacing: '0.05rem',\r\n }}\r\n >\r\n {numberFormattingFunction(value, 'NA', precision, prefix, suffix)}{' '}\r\n {year ? (\r\n <span\r\n className='text-lg font-normal mt-0 mb-4 text-primary-gray-550 dark:text-primary-gray-400'\r\n style={{\r\n marginLeft: '-8px',\r\n lineHeight: '1.09',\r\n textShadow: 'none',\r\n WebkitTextStrokeWidth: 0,\r\n }}\r\n >\r\n ({year})\r\n </span>\r\n ) : null}\r\n </H3>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n />\r\n ) : null}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n />\r\n ) : null}\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["BasicStatCard","props","year","value","graphTitle","suffix","sources","prefix","graphDescription","footNote","padding","backgroundColor","graphID","language","theme","ariaLabel","textBackground","headingFontSize","centerAlign","verticalAlign","layout","styles","classNames","precision","jsx","cn","jsxs","GraphHeader","H3","numberFormattingFunction","GraphFooter"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-DDoeWRVt.cjs"),ce=require("./index-CZbIGs8q.cjs"),a=require("react"),ue=require("./index-BXns0-ng.cjs"),xe=require("./index-BczVvEBZ.cjs"),de=require("./Modal-C_dl0EtQ.cjs"),he=require("./Spinner-DA6Z5E4n.cjs"),me=require("./numberFormattingFunction-02t-wJta.cjs"),pe=require("./Tooltip-n8z5bfav.cjs"),O=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),fe=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),le=require("./Colors.cjs"),ge=require("./string2HTML-D2Avudmb.cjs"),je=require("./Axis-DE7dSn1_.cjs"),Me=require("./XTicksAndGridLines-CCzXIV8d.cjs"),ye=require("./ReferenceLine-CuFMk0cI.cjs"),ve=require("./pow-B5-jkdHU.cjs"),be=require("./linear-BVckp9RD.cjs"),re=require("./y-QcCbqrzx.cjs"),Re=require("./GraphFooter.cjs"),Ee=require("./GraphHeader.cjs"),we=require("./ColorLegendWithMouseOver.cjs"),Ce=require("./EmptyState-d8_8SxeW.cjs"),Oe=require("./YTicksAndGridLines-DBDuz6vb.cjs");function ke(ne){const{data:o,circleColors:u,showTicks:C,leftMargin:ie,width:b,height:R,colorDomain:c,rightMargin:se,topMargin:I,bottomMargin:F,showLabels:A,tooltip:j,onSeriesMouseOver:$,refValues:m,selectedColor:B,startFromZero:U,radius:g,maxRadiusValue:G,maxValue:n,minValue:Z,highlightedDataPoints:J,onSeriesMouseClick:P,rtl:oe,resetSelectionOnDoubleClick:K,detailsOnClick:L,suffix:N,prefix:S,styles:y,classNames:q,noOfTicks:Q,dimmedOpacity:V,precision:H,customLayers:k}=ne,X=a.useRef(null),[E,v]=a.useState(void 0),[D,W]=a.useState(void 0),[Y,z]=a.useState(null),[ee,p]=a.useState(void 0),[f,x]=a.useState(void 0),d={top:I,bottom:F,left:ie,right:se},_=b-d.left-d.right,te=R-d.top-d.bottom,M=o.filter(e=>!O.checkIfNullOrUndefined(e.radius)).length===0?o:xe.orderBy(o.filter(e=>!O.checkIfNullOrUndefined(e.radius)),"radius","desc"),w=O.checkIfNullOrUndefined(n)?Math.max(...o.filter(e=>!O.checkIfNullOrUndefined(e.position)).map(e=>e.position))<0&&!U?0:Math.max(...o.filter(e=>!O.checkIfNullOrUndefined(e.position)).map(e=>e.position)):n,r=O.checkIfNullOrUndefined(Z)?Math.min(...o.filter(e=>!O.checkIfNullOrUndefined(e.position)).map(e=>e.position))>=0&&!U?0:Math.min(...o.filter(e=>!O.checkIfNullOrUndefined(e.position)).map(e=>e.position)):Z,l=o.filter(e=>e.radius===void 0||e.radius===null).length!==o.length?ve.sqrt().domain([0,O.checkIfNullOrUndefined(G)?Math.max(...o.map(e=>e.radius).filter(e=>e!=null)):G]).range([.25,g]).nice():void 0,T=be.linear().domain([r,w]).range([0,_]).nice(),t=T.ticks(Q);return a.useEffect(()=>{z(null);const e=M.filter(h=>h.position);re.forceSimulation(e).force("x",re.forceX(h=>T(h.position)).strength(5)).force("y",re.forceY(h=>te/2).strength(1)).force("collide",re.forceCollide(h=>l?l(h.radius||0)+1:g+1)).force("charge",re.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{z(e)}).on("end",()=>{z(e)})},[o,g,te,_,r,w,M,T,l]),i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[Y?i.jsxRuntimeExports.jsx("svg",{width:`${b}px`,height:`${R}px`,viewBox:`0 0 ${b} ${R}`,direction:"ltr",ref:X,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${d.left},${d.top})`,children:[C?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(je.Axis,{x1:T(r<0?0:r),x2:T(r<0?0:r),y1:0-d.top,y2:te+d.bottom,label:me.numberFormattingFunction(r<0?0:r,"NA",H,S,N),labelPos:{x:T(r<0?0:r),y:0-I,dy:"0.75em",dx:3},classNames:{axis:q?.xAxis?.axis,label:q?.yAxis?.labels},styles:{axis:y?.xAxis?.axis,label:y?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(Me.XTicksAndGridLines,{values:t.filter(e=>e!==0),x:t.filter(e=>e!==0).map(e=>T(e)),y1:0-I,y2:te+d.bottom,styles:{gridLines:y?.xAxis?.gridLines,labels:y?.xAxis?.labels},classNames:{gridLines:q?.xAxis?.gridLines,labels:q?.xAxis?.labels},suffix:N,prefix:S,labelType:"secondary",showGridLines:!0,precision:H})]}):null,k.filter(e=>e.position==="before").map(e=>e.layer),Y.map(e=>i.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${e.x},${e.y})`,opacity:B?e.color&&u[c.indexOf(e.color)]===B?1:V:J.length!==0?J.indexOf(e.label)!==-1?.85:V:.85,onMouseEnter:h=>{v(e),x(h.clientY),p(h.clientX),$?.(e)},onMouseMove:h=>{v(e),x(h.clientY),p(h.clientX)},onClick:()=>{(P||L)&&(ue.isEqual(D,e)&&K?(W(void 0),P?.(void 0)):(W(e),P?.(e)))},onMouseLeave:()=>{v(void 0),p(void 0),x(void 0),$?.(void 0)},children:[i.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,fill:o.filter(h=>h.color).length===0?u[0]:e.color?u[c.indexOf(e.color)]:le.Colors.gray,radius:l?l(e.radius||0):g}),(l?l(e.radius||0):g)>10&&A?i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("foreignObject",{y:0-(l?l(e.radius||0):g),x:0-(l?l(e.radius||0):g),width:2*(l?l(e.radius||0):g),height:2*(l?l(e.radius||0):g),children:i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-0.5 justify-center items-center h-inherit py-0 px-1.5",children:A?i.jsxRuntimeExports.jsx("p",{className:i.mo("text-center leading-none m-0",q?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((l?l(e.radius||0):g)/4),10),Math.max(Math.round((l?l(e.radius||0):g)*12/`${e.label}`.length),10),20)}px`,color:fe.getTextColorBasedOnBgColor(o.filter(h=>h.color).length===0?u[0]:e.color?u[c.indexOf(e.color)]:le.Colors.gray),hyphens:"auto",...y?.graphObjectValues||{}},children:e.label}):null})})}):null]},e.label)),m?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:m.map((e,h)=>i.jsxRuntimeExports.jsx(ye.RefLineX,{text:e.text,color:e.color,x:T(e.value),y1:0-d.top,y2:te+d.bottom,textSide:T(e.value)>_*.75||oe?"left":"right",classNames:e.classNames,styles:e.styles,isInView:!0},h))}):null,k.filter(e=>e.position==="after").map(e=>e.layer)]})}):i.jsxRuntimeExports.jsx("div",{style:{width:`${b}px`,height:`${R}px`},children:i.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:i.jsxRuntimeExports.jsx(he.y,{})})}),E&&j&&ee&&f?i.jsxRuntimeExports.jsx(pe.Tooltip,{data:E,body:j,xPos:ee,yPos:f,backgroundStyle:y?.tooltip,className:q?.tooltip}):null,L&&D!==void 0?i.jsxRuntimeExports.jsx(de.X,{open:D!==void 0,onClose:()=>{W(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof L=="string"?{__html:ge.string2HTML(L,D)}:void 0,children:typeof L=="function"?L(D):null})}):null]})}function Ne(ne){const{data:o,graphTitle:u,backgroundColor:C=!1,topMargin:ie=25,bottomMargin:b=10,leftMargin:R=10,rightMargin:c=10,showLabels:se=!0,showTicks:I=!0,colors:F,sources:A,graphDescription:j,height:$,width:m,footNote:B,colorDomain:U,colorLegendTitle:g,padding:G,relativeHeight:n,tooltip:Z,onSeriesMouseOver:J,refValues:P,showColorScale:oe,graphID:K,radius:L=5,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q=[],onSeriesMouseClick:Q,graphDownload:V=!1,dataDownload:H=!1,language:k="en",showNAColor:X=!0,minHeight:E=0,theme:v="light",ariaLabel:D,resetSelectionOnDoubleClick:W=!0,detailsOnClick:Y,suffix:z="",prefix:ee="",styles:p,classNames:f,noOfTicks:x,dimmedOpacity:d=.3,precision:_=2,customLayers:te=[]}=ne,[M,w]=a.useState(0),[r,l]=a.useState(0),[T,t]=a.useState(void 0),e=a.useRef(null),h=a.useRef(null);return a.useEffect(()=>{const s=new ResizeObserver(ae=>{w(m||ae[0].target.clientWidth||620),l($||ae[0].target.clientHeight||480)});return e.current&&(l(e.current.clientHeight||480),w(e.current.clientWidth||620),m||s.observe(e.current)),()=>s.disconnect()},[m,$]),i.jsxRuntimeExports.jsx("div",{className:`${v||"light"} flex ${m?"w-fit grow-0":"w-full grow"}`,dir:k==="he"||k==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${C?C===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${k||"en"}`,f?.graphContainer),style:{...p?.graphContainer||{},...C&&C!==!0?{backgroundColor:C}:{}},id:K,ref:h,"aria-label":D||`${u?`The graph shows ${u}. `:""}This is a bee swarm chart showing the distribution along the x-axes. ${j?` ${j}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:C?G||"1rem":G||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[u||j||V||H?i.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:f?.title,description:f?.description},graphTitle:u,graphDescription:j,width:m,graphDownload:V?h.current:void 0,dataDownload:H?o.map(s=>s.data).filter(s=>s!==void 0).length>0?o.map(s=>s.data).filter(s=>s!==void 0):o.filter(s=>s!==void 0):null}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:o.length===0?i.jsxRuntimeExports.jsx(Ce.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe!==!1&&o.filter(s=>s.color).length!==0?i.jsxRuntimeExports.jsx(we.ColorLegendWithMouseOver,{width:m,colorLegendTitle:g,colors:F||le.Colors[v].categoricalColors.colors,colorDomain:U||ce.uniqBy(o.filter(s=>s.color),"color").map(s=>s.color),setSelectedColor:t,showNAColor:X??!0}):null,i.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:e,"aria-label":"Graph area",children:(m||M)&&($||r)?i.jsxRuntimeExports.jsx(ke,{data:o,circleColors:o.filter(s=>s.color).length===0?F?[F]:[le.Colors.primaryColors["blue-600"]]:F||le.Colors[v].categoricalColors.colors,colorDomain:o.filter(s=>s.color).length===0?[]:U||ce.uniqBy(o.filter(s=>s.color),"color").map(s=>s.color),width:m||M,selectedColor:T,height:Math.max(E,$||(n?E?(m||M)*n>E?(m||M)*n:E:(m||M)*n:r)),showTicks:I,leftMargin:R,rightMargin:c,topMargin:ie,bottomMargin:b,showLabels:se,tooltip:Z,onSeriesMouseOver:J,refValues:P,startFromZero:!1,radius:L,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q,onSeriesMouseClick:Q,rtl:k==="he"||k==="ar",resetSelectionOnDoubleClick:W,detailsOnClick:Y,suffix:z,prefix:ee,styles:p,classNames:f,noOfTicks:x||5,dimmedOpacity:d,precision:_,customLayers:te}):null})]})}),A||B?i.jsxRuntimeExports.jsx(Re.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:A,footNote:B,width:m}):null]})})})})}function Se(ne){const{data:o,circleColors:u,showTicks:C,leftMargin:ie,width:b,height:R,colorDomain:c,rightMargin:se,topMargin:I,bottomMargin:F,suffix:A,prefix:j,showLabels:$,tooltip:m,onSeriesMouseOver:B,refValues:U,selectedColor:g,startFromZero:G,radius:n,maxRadiusValue:Z,maxValue:J,minValue:P,highlightedDataPoints:oe,onSeriesMouseClick:K,resetSelectionOnDoubleClick:L,detailsOnClick:N,styles:S,classNames:y,noOfTicks:q,dimmedOpacity:Q,precision:V,customLayers:H}=ne,k=a.useRef(null),[X,E]=a.useState(void 0),[v,D]=a.useState(void 0),[W,Y]=a.useState(null),[z,ee]=a.useState(void 0),[p,f]=a.useState(void 0),x={top:I,bottom:F,left:ie,right:se},d=b-x.left-x.right,_=R-x.top-x.bottom,te=o.filter(t=>!O.checkIfNullOrUndefined(t.radius)).length===0?o:xe.orderBy(o.filter(t=>!O.checkIfNullOrUndefined(t.radius)),"radius","desc"),M=O.checkIfNullOrUndefined(J)?Math.max(...o.filter(t=>!O.checkIfNullOrUndefined(t.position)).map(t=>t.position))<0&&!G?0:Math.max(...o.filter(t=>!O.checkIfNullOrUndefined(t.position)).map(t=>t.position)):J,w=O.checkIfNullOrUndefined(P)?Math.min(...o.filter(t=>!O.checkIfNullOrUndefined(t.position)).map(t=>t.position))>=0&&!G?0:Math.min(...o.filter(t=>!O.checkIfNullOrUndefined(t.position)).map(t=>t.position)):P,r=o.filter(t=>t.radius===void 0||t.radius===null).length!==o.length?ve.sqrt().domain([0,O.checkIfNullOrUndefined(Z)?Math.max(...o.map(t=>t.radius).filter(t=>t!=null)):Z]).range([.25,n]).nice():void 0,l=be.linear().domain([w,M]).range([_,0]).nice(),T=l.ticks(q);return a.useEffect(()=>{Y(null);const t=te.filter(e=>e.position);re.forceSimulation(t).force("y",re.forceY(e=>l(e.position)).strength(5)).force("x",re.forceX(e=>d/2).strength(1)).force("collide",re.forceCollide(e=>r?r(e.radius||0)+1:n+1)).force("charge",re.forceManyBody().strength(-15)).alphaDecay(.05).tick(1e4).on("tick",()=>{Y(t)}).on("end",()=>{Y(t)})},[o,n,_,d,w,M,te,l,r]),i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[W?i.jsxRuntimeExports.jsx("svg",{width:`${b}px`,height:`${R}px`,viewBox:`0 0 ${b} ${R}`,direction:"ltr",ref:k,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${x.left},${x.top})`,children:[C?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(je.Axis,{y1:l(w<0?0:w),y2:l(w<0?0:w),x1:0-x.left,x2:d+x.right,label:me.numberFormattingFunction(w<0?0:w,"NA",V,j,A),labelPos:{x:0-x.left,y:l(w<0?0:w),dx:0,dy:M<0?"1em":-5},classNames:{axis:y?.xAxis?.axis,label:y?.yAxis?.labels},styles:{axis:S?.xAxis?.axis,label:S?.yAxis?.labels}}),i.jsxRuntimeExports.jsx(Oe.YTicksAndGridLines,{values:T.filter(t=>t!==0),y:T.filter(t=>t!==0).map(t=>l(t)),x1:0-x.left,x2:d+x.right,styles:{gridLines:S?.yAxis?.gridLines,labels:S?.yAxis?.labels},classNames:{gridLines:y?.yAxis?.gridLines,labels:y?.yAxis?.labels},suffix:A,prefix:j,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:V})]}):null,H.filter(t=>t.position==="before").map(t=>t.layer),W.map(t=>i.jsxRuntimeExports.jsxs("g",{className:"undp-viz-g-with-hover",transform:`translate(${t.x},${t.y})`,opacity:g?t.color&&u[c.indexOf(t.color)]===g?1:Q:oe.length!==0?oe.indexOf(t.label)!==-1?.85:Q:.85,onMouseEnter:e=>{E(t),f(e.clientY),ee(e.clientX),B?.(t)},onMouseMove:e=>{E(t),f(e.clientY),ee(e.clientX)},onClick:()=>{(K||N)&&(ue.isEqual(v,t)&&L?(D(void 0),K?.(void 0)):(D(t),K?.(t)))},onMouseLeave:()=>{E(void 0),ee(void 0),f(void 0),B?.(void 0)},children:[i.jsxRuntimeExports.jsx("circle",{cx:0,cy:0,r:r?r(t.radius||0):n,fill:o.filter(e=>e.color).length===0?u[0]:t.color?u[c.indexOf(t.color)]:le.Colors.gray}),(r?r(t.radius||0):n)>10&&$?i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("foreignObject",{y:0-(r?r(t.radius||0):n),x:0-(r?r(t.radius||0):n),width:2*(r?r(t.radius||0):n),height:2*(r?r(t.radius||0):n),children:i.jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-center items-center h-inherit py-0 px-1.5",children:$?i.jsxRuntimeExports.jsx("p",{className:i.mo("text-center leading-none m-0",y?.graphObjectValues),style:{fontSize:`${Math.min(Math.max(Math.round((r?r(t.radius||0):n)/4),10),Math.max(Math.round((r?r(t.radius||0):n)*12/`${t.label}`.length),10),20)}px`,hyphens:"auto",color:fe.getTextColorBasedOnBgColor(o.filter(e=>e.color).length===0?u[0]:t.color?u[c.indexOf(t.color)]:le.Colors.gray),...S?.graphObjectValues||{}},children:t.label}):null})})}):null]},t.label)),U?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:U.map((t,e)=>i.jsxRuntimeExports.jsx(ye.RefLineY,{text:t.text,color:t.color,y:l(t.value),x1:0-x.left,x2:d+x.right,classNames:t.classNames,styles:t.styles,isInView:!0},e))}):null,H.filter(t=>t.position==="after").map(t=>t.layer)]})}):i.jsxRuntimeExports.jsx("div",{style:{width:`${b}px`,height:`${R}px`},children:i.jsxRuntimeExports.jsx("div",{className:"flex m-auto items-center justify-center p-0 leading-none text-base h-40",children:i.jsxRuntimeExports.jsx(he.y,{})})}),X&&m&&z&&p?i.jsxRuntimeExports.jsx(pe.Tooltip,{data:X,body:m,xPos:z,yPos:p,backgroundStyle:S?.tooltip,className:y?.tooltip}):null,N&&v!==void 0?i.jsxRuntimeExports.jsx(de.X,{open:v!==void 0,onClose:()=>{D(void 0)},children:i.jsxRuntimeExports.jsx("div",{className:"graph-modal-content m-0",dangerouslySetInnerHTML:typeof N=="string"?{__html:ge.string2HTML(N,v)}:void 0,children:typeof N=="function"?N(v):null})}):null]})}function De(ne){const{data:o,graphTitle:u,colors:C,sources:ie,graphDescription:b,height:R,width:c,footNote:se,colorDomain:I,colorLegendTitle:F,padding:A,backgroundColor:j=!1,topMargin:$=25,bottomMargin:m=10,leftMargin:B=100,rightMargin:U=40,showLabels:g=!0,showTicks:G=!0,relativeHeight:n,tooltip:Z,onSeriesMouseOver:J,refValues:P,showColorScale:oe,graphID:K,radius:L=5,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q=[],onSeriesMouseClick:Q,graphDownload:V=!1,dataDownload:H=!1,language:k="en",showNAColor:X=!0,minHeight:E=0,theme:v="light",ariaLabel:D,resetSelectionOnDoubleClick:W=!0,detailsOnClick:Y,suffix:z="",prefix:ee="",styles:p,classNames:f,noOfTicks:x,dimmedOpacity:d=.3,precision:_=2,customLayers:te=[]}=ne,[M,w]=a.useState(0),[r,l]=a.useState(0),[T,t]=a.useState(void 0),e=a.useRef(null),h=a.useRef(null);return a.useEffect(()=>{const s=new ResizeObserver(ae=>{w(c||ae[0].target.clientWidth||620),l(R||ae[0].target.clientHeight||480)});return e.current&&(l(e.current.clientHeight||480),w(e.current.clientWidth||620),c||s.observe(e.current)),()=>s.disconnect()},[c,R]),i.jsxRuntimeExports.jsx("div",{className:`${v||"light"} flex ${c?"w-fit grow-0":"w-full grow"}`,dir:k==="he"||k==="ar"?"rtl":void 0,children:i.jsxRuntimeExports.jsx("div",{className:i.mo(`${j?j===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${k||"en"}`,f?.graphContainer),style:{...p?.graphContainer||{},...j&&j!==!0?{backgroundColor:j}:{}},id:K,ref:h,"aria-label":D||`${u?`The graph shows ${u}. `:""}This is a bee swarm chart showing the distribution along the y-axes. ${b?` ${b}`:""}`,children:i.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:j?A||"1rem":A||0},children:i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[u||b||V||H?i.jsxRuntimeExports.jsx(Ee.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:f?.title,description:f?.description},graphTitle:u,graphDescription:b,width:c,graphDownload:V?h.current:void 0,dataDownload:H?o.map(s=>s.data).filter(s=>s!==void 0).length>0?o.map(s=>s.data).filter(s=>s!==void 0):o.filter(s=>s!==void 0):null}):null,i.jsxRuntimeExports.jsx("div",{className:"grow flex flex-col justify-center gap-3 w-full",children:o.length===0?i.jsxRuntimeExports.jsx(Ce.EmptyState,{}):i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe!==!1&&o.filter(s=>s.color).length!==0?i.jsxRuntimeExports.jsx(we.ColorLegendWithMouseOver,{width:c,colorLegendTitle:F,colors:C||le.Colors[v].categoricalColors.colors,colorDomain:I||ce.uniqBy(o.filter(s=>s.color),"color").map(s=>s.color),setSelectedColor:t,showNAColor:X}):null,i.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center w-full leading-0",ref:e,"aria-label":"Graph area",children:(c||M)&&(R||r)?i.jsxRuntimeExports.jsx(Se,{data:o,circleColors:o.filter(s=>s.color).length===0?C?[C]:[le.Colors.primaryColors["blue-600"]]:C||le.Colors[v].categoricalColors.colors,colorDomain:o.filter(s=>s.color).length===0?[]:I||ce.uniqBy(o.filter(s=>s.color),"color").map(s=>s.color),width:c||M,selectedColor:T,height:Math.max(E,R||(n?E?(c||M)*n>E?(c||M)*n:E:(c||M)*n:r)),showTicks:G,leftMargin:B,rightMargin:U,topMargin:$,bottomMargin:m,showLabels:g,tooltip:Z,onSeriesMouseOver:J,refValues:P,startFromZero:!1,radius:L,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q,onSeriesMouseClick:Q,resetSelectionOnDoubleClick:W,detailsOnClick:Y,styles:p,classNames:f,suffix:z,prefix:ee,noOfTicks:x||5,dimmedOpacity:d,precision:_,customLayers:te}):null})]})}),ie||se?i.jsxRuntimeExports.jsx(Re.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:f?.footnote,source:f?.source},sources:ie,footNote:se,width:c}):null]})})})})}function Te(ne){const{data:o,graphTitle:u,backgroundColor:C,topMargin:ie,bottomMargin:b,leftMargin:R,rightMargin:c,showLabels:se,showTicks:I,colors:F,sources:A,graphDescription:j,height:$,width:m,footNote:B,colorDomain:U,colorLegendTitle:g,padding:G,relativeHeight:n,tooltip:Z,onSeriesMouseOver:J,refValues:P,showColorScale:oe,graphID:K,radius:L,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q,onSeriesMouseClick:Q,graphDownload:V,dataDownload:H,language:k,showNAColor:X,minHeight:E,theme:v,ariaLabel:D,resetSelectionOnDoubleClick:W,detailsOnClick:Y,noOfTicks:z,orientation:ee="vertical",styles:p,classNames:f,dimmedOpacity:x,precision:d,customLayers:_}=ne;return ee==="vertical"?i.jsxRuntimeExports.jsx(De,{data:o,graphTitle:u,backgroundColor:C,topMargin:ie,bottomMargin:b,leftMargin:R,rightMargin:c,showLabels:se,showTicks:I,colors:F,sources:A,graphDescription:j,height:$,width:m,footNote:B,colorDomain:U,colorLegendTitle:g,padding:G,relativeHeight:n,tooltip:Z,onSeriesMouseOver:J,refValues:P,showColorScale:oe,graphID:K,radius:L,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q,onSeriesMouseClick:Q,graphDownload:V,dataDownload:H,language:k,showNAColor:X,minHeight:E,theme:v,ariaLabel:D,resetSelectionOnDoubleClick:W,styles:p,detailsOnClick:Y,classNames:f,noOfTicks:z,dimmedOpacity:x,precision:d,customLayers:_}):i.jsxRuntimeExports.jsx(Ne,{data:o,graphTitle:u,backgroundColor:C,topMargin:ie,bottomMargin:b,leftMargin:R,rightMargin:c,showLabels:se,showTicks:I,colors:F,sources:A,graphDescription:j,height:$,width:m,footNote:B,colorDomain:U,colorLegendTitle:g,padding:G,relativeHeight:n,tooltip:Z,onSeriesMouseOver:J,refValues:P,showColorScale:oe,graphID:K,radius:L,maxRadiusValue:N,maxValue:S,minValue:y,highlightedDataPoints:q,onSeriesMouseClick:Q,graphDownload:V,dataDownload:H,language:k,showNAColor:X,minHeight:E,theme:v,ariaLabel:D,resetSelectionOnDoubleClick:W,styles:p,detailsOnClick:Y,classNames:f,noOfTicks:z,dimmedOpacity:x,precision:d,customLayers:_})}exports.BeeSwarmChart=Te;
2
+ //# sourceMappingURL=BeeSwarmChart.cjs.map