@particle-academy/react-fancy 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6811,6 +6811,14 @@ function ChartBar({
6811
6811
  [data]
6812
6812
  );
6813
6813
  return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), "data-react-fancy-chart-bar": "", children: [
6814
+ showValues && /* @__PURE__ */ jsx("div", { className: "mb-1 flex gap-2", children: data.map((item) => /* @__PURE__ */ jsx(
6815
+ "div",
6816
+ {
6817
+ className: "flex-1 text-center text-xs font-medium text-zinc-500 dark:text-zinc-400",
6818
+ children: item.value
6819
+ },
6820
+ item.label
6821
+ )) }),
6814
6822
  /* @__PURE__ */ jsx(
6815
6823
  "div",
6816
6824
  {
@@ -6819,26 +6827,23 @@ function ChartBar({
6819
6827
  children: data.map((item, i) => {
6820
6828
  const barHeight = item.value / maxValue * 100;
6821
6829
  const color = item.color ?? DEFAULT_COLORS[i % DEFAULT_COLORS.length];
6822
- return /* @__PURE__ */ jsxs(
6830
+ return /* @__PURE__ */ jsx(
6823
6831
  "div",
6824
6832
  {
6825
- className: "flex h-full flex-1 flex-col items-center justify-end gap-1",
6833
+ className: "flex h-full flex-1 items-end justify-center",
6826
6834
  "data-react-fancy-chart-bar-column": "",
6827
- children: [
6828
- showValues && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-zinc-500", children: item.value }),
6829
- /* @__PURE__ */ jsx(
6830
- "div",
6831
- {
6832
- "data-react-fancy-chart-bar-item": "",
6833
- className: "w-full rounded-t-md transition-all duration-500",
6834
- style: {
6835
- height: `${barHeight}%`,
6836
- backgroundColor: color,
6837
- minHeight: 4
6838
- }
6835
+ children: /* @__PURE__ */ jsx(
6836
+ "div",
6837
+ {
6838
+ "data-react-fancy-chart-bar-item": "",
6839
+ className: "w-full rounded-t-md transition-all duration-500",
6840
+ style: {
6841
+ height: `${barHeight}%`,
6842
+ backgroundColor: color,
6843
+ minHeight: 4
6839
6844
  }
6840
- )
6841
- ]
6845
+ }
6846
+ )
6842
6847
  },
6843
6848
  item.label
6844
6849
  );