@undp/data-viz 0.0.66 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -83262,6 +83262,7 @@ declare interface Props_57 {
83262
83262
  width?: number;
83263
83263
  naColor?: string;
83264
83264
  className?: string;
83265
+ showNAColor: boolean;
83265
83266
  }
83266
83267
 
83267
83268
  declare interface Props_58 {
package/dist/index.js CHANGED
@@ -15161,11 +15161,11 @@ const xae = fn("mt-0 ml-0 mr-0", {
15161
15161
  },
15162
15162
  leading: {
15163
15163
  none: "leading-none",
15164
- xs: "leading-tight",
15165
- sm: "leading-snug",
15164
+ xs: "leading-[1.25]",
15165
+ sm: "leading-[1.375]",
15166
15166
  base: "leading-[1.4]",
15167
- lg: "leading-relaxed",
15168
- xl: "leading-loose"
15167
+ lg: "leading-[1.625]",
15168
+ xl: "leading-[2]"
15169
15169
  },
15170
15170
  marginBottom: {
15171
15171
  none: "mb-0",
@@ -26571,7 +26571,7 @@ function Q2(t) {
26571
26571
  "p",
26572
26572
  {
26573
26573
  className: ze(
26574
- "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5",
26574
+ "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 leading-none",
26575
26575
  `text-${s}`,
26576
26576
  i
26577
26577
  ),
@@ -29372,7 +29372,7 @@ function h4(t) {
29372
29372
  "p",
29373
29373
  {
29374
29374
  className: ze(
29375
- "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center",
29375
+ "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs m-0 py-0 px-1.5 text-center leading-none",
29376
29376
  i
29377
29377
  ),
29378
29378
  style: a,
@@ -33095,7 +33095,7 @@ const a7 = /* @__PURE__ */ Ma(t6e), uV = lN((t) => {
33095
33095
  "p",
33096
33096
  {
33097
33097
  className: ze(
33098
- "text-center leading-tight overflow-hidden m-0 circle-packing-label",
33098
+ "text-center leading-[1.25] overflow-hidden m-0 circle-packing-label",
33099
33099
  D == null ? void 0 : D.graphObjectValues
33100
33100
  ),
33101
33101
  style: {
@@ -33117,7 +33117,7 @@ const a7 = /* @__PURE__ */ Ma(t6e), uV = lN((t) => {
33117
33117
  g && /* @__PURE__ */ v.jsx(
33118
33118
  "p",
33119
33119
  {
33120
- className: "text-center font-bold leading-tight w-full m-0 circle-packing-value",
33120
+ className: "text-center font-bold leading-[1.25] w-full m-0 circle-packing-value",
33121
33121
  style: {
33122
33122
  fontSize: `${Math.min(
33123
33123
  Math.max(Math.round(fe / 4), 14),
@@ -46061,7 +46061,7 @@ function r3(t) {
46061
46061
  "p",
46062
46062
  {
46063
46063
  className: ze(
46064
- "text-sm leading-tight m-0 whitespace-normal",
46064
+ "text-sm leading-[1.25] m-0 whitespace-normal",
46065
46065
  a.fontWeight === "bold" ? "font-bold" : a.fontWeight === "medium" ? "font-medium" : "font-normal",
46066
46066
  a.align === "right" ? "text-right" : a.align === "center" ? "text-center" : "text-left",
46067
46067
  n ? void 0 : "text-primary-gray-700 dark:text-primary-gray-300",
@@ -61817,7 +61817,7 @@ function nye(t) {
61817
61817
  "p",
61818
61818
  {
61819
61819
  className: ze(
61820
- "text-xs text-center m-0 leading-tight graph-value",
61820
+ "text-xs text-center m-0 leading-[1.25] graph-value",
61821
61821
  M == null ? void 0 : M.graphObjectValues
61822
61822
  ),
61823
61823
  style: {
@@ -61908,7 +61908,16 @@ function aye(t) {
61908
61908
  );
61909
61909
  }
61910
61910
  function iye(t) {
61911
- const { colorLegendTitle: e, colorDomain: r, colors: n, setSelectedColor: a, width: i, naColor: o, className: l } = t, [s, f] = Ne(void 0), c = o ? 320 : 360;
61911
+ const {
61912
+ colorLegendTitle: e,
61913
+ colorDomain: r,
61914
+ colors: n,
61915
+ setSelectedColor: a,
61916
+ width: i,
61917
+ naColor: o,
61918
+ className: l,
61919
+ showNAColor: s
61920
+ } = t, [f, c] = Ne(void 0), h = o ? 320 : 360;
61912
61921
  return /* @__PURE__ */ v.jsxs(
61913
61922
  "div",
61914
61923
  {
@@ -61918,73 +61927,73 @@ function iye(t) {
61918
61927
  children: [
61919
61928
  e && e !== "" ? /* @__PURE__ */ v.jsx(lr, { size: "sm", marginBottom: "2xs", className: "w-full text-center", children: e }) : null,
61920
61929
  /* @__PURE__ */ v.jsx("svg", { width: "100%", viewBox: "0 0 360 30", style: { maxWidth: "360px" }, direction: "ltr", children: /* @__PURE__ */ v.jsxs("g", { children: [
61921
- r.map((h, d) => /* @__PURE__ */ v.jsxs(
61930
+ r.map((d, m) => /* @__PURE__ */ v.jsxs(
61922
61931
  "g",
61923
61932
  {
61924
61933
  onMouseOver: () => {
61925
- f(n[d]), a(n[d]);
61934
+ c(n[m]), a(n[m]);
61926
61935
  },
61927
61936
  onMouseLeave: () => {
61928
- f(void 0), a(void 0);
61937
+ c(void 0), a(void 0);
61929
61938
  },
61930
61939
  className: "cursor-pointer",
61931
61940
  children: [
61932
61941
  /* @__PURE__ */ v.jsx(
61933
61942
  "rect",
61934
61943
  {
61935
- x: d * c / n.length + 1,
61944
+ x: m * h / n.length + 1,
61936
61945
  y: 1,
61937
- width: c / n.length - 2,
61946
+ width: h / n.length - 2,
61938
61947
  height: 8,
61939
- className: `stroke-1 ${s === n[d] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
61948
+ className: `stroke-1 ${f === n[m] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
61940
61949
  style: {
61941
- fill: n[d],
61942
- ...s !== n[d] ? { stroke: n[d] } : {}
61950
+ fill: n[m],
61951
+ ...f !== n[m] ? { stroke: n[m] } : {}
61943
61952
  }
61944
61953
  }
61945
61954
  ),
61946
61955
  /* @__PURE__ */ v.jsx(
61947
61956
  "text",
61948
61957
  {
61949
- x: (d + 1) * c / n.length,
61958
+ x: (m + 1) * h / n.length,
61950
61959
  y: 25,
61951
61960
  className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-sm",
61952
61961
  style: { textAnchor: "middle" },
61953
- children: Tt(h, "", "")
61962
+ children: Tt(d, "", "")
61954
61963
  }
61955
61964
  )
61956
61965
  ]
61957
61966
  },
61958
- d
61967
+ m
61959
61968
  )),
61960
61969
  /* @__PURE__ */ v.jsx("g", { children: /* @__PURE__ */ v.jsx(
61961
61970
  "rect",
61962
61971
  {
61963
61972
  onMouseOver: () => {
61964
- f(n[r.length]), a(n[r.length]);
61973
+ c(n[r.length]), a(n[r.length]);
61965
61974
  },
61966
61975
  onMouseLeave: () => {
61967
- f(void 0), a(void 0);
61976
+ c(void 0), a(void 0);
61968
61977
  },
61969
- x: r.length * c / n.length + 1,
61978
+ x: r.length * h / n.length + 1,
61970
61979
  y: 1,
61971
- width: c / n.length - 2,
61980
+ width: h / n.length - 2,
61972
61981
  height: 8,
61973
- className: `cursor-pointer stroke-1 ${s === n[r.length] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
61982
+ className: `cursor-pointer stroke-1 ${f === n[r.length] ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
61974
61983
  style: {
61975
61984
  fill: n[r.length],
61976
- ...s !== n[r.length] ? { stroke: n[r.length] } : {}
61985
+ ...f !== n[r.length] ? { stroke: n[r.length] } : {}
61977
61986
  }
61978
61987
  }
61979
61988
  ) }),
61980
- o ? /* @__PURE__ */ v.jsxs(
61989
+ s ? /* @__PURE__ */ v.jsxs(
61981
61990
  "g",
61982
61991
  {
61983
61992
  onMouseOver: () => {
61984
- f(o || "#D4D6D8"), a(o || "#D4D6D8");
61993
+ c(o || "#D4D6D8"), a(o || "#D4D6D8");
61985
61994
  },
61986
61995
  onMouseLeave: () => {
61987
- f(void 0), a(void 0);
61996
+ c(void 0), a(void 0);
61988
61997
  },
61989
61998
  className: "cursor-pointer",
61990
61999
  children: [
@@ -61995,10 +62004,10 @@ function iye(t) {
61995
62004
  y: 1,
61996
62005
  width: 24,
61997
62006
  height: 8,
61998
- className: `stroke-1 ${s === o ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
62007
+ className: `stroke-1 ${f === o ? "stroke-primary-gray-700 dark:stroke-primary-gray-300" : ""}`,
61999
62008
  style: {
62000
62009
  fill: o || "#D4D6D8",
62001
- ...s !== o ? { stroke: o } : {},
62010
+ ...f !== o ? { stroke: o } : {},
62002
62011
  strokeWidth: 1
62003
62012
  }
62004
62013
  }
@@ -62138,7 +62147,8 @@ function oye(t) {
62138
62147
  ] : Qe[Y].sequentialColors[`neutralColorsx0${m.length + 1}`]),
62139
62148
  colorDomain: m,
62140
62149
  setSelectedColor: U,
62141
- naColor: G
62150
+ naColor: G,
62151
+ showNAColor: z
62142
62152
  }
62143
62153
  ) }) : /* @__PURE__ */ v.jsx("div", { style: { marginBottom: "-12px" }, children: /* @__PURE__ */ v.jsx(
62144
62154
  aye,