@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/README.md CHANGED
@@ -5,12 +5,21 @@ React UI component library — the React port of the `fancy-flux` Blade/Livewire
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
+ # npm
9
+ npm install @particle-academy/react-fancy
10
+
11
+ # pnpm
8
12
  pnpm add @particle-academy/react-fancy
13
+
14
+ # yarn
15
+ yarn add @particle-academy/react-fancy
9
16
  ```
10
17
 
11
- Peer dependencies: `react >= 18`, `react-dom >= 18`.
18
+ **Peer dependencies:** `react >= 18`, `react-dom >= 18`, `tailwindcss >= 4`
19
+
20
+ **Bundled dependencies:** `clsx`, `tailwind-merge`, `marked`
12
21
 
13
- Dependencies: `lucide-react` (default icon library, bundled externally).
22
+ **External dependency:** `lucide-react` (default icon library)
14
23
 
15
24
  ## Usage
16
25
 
package/dist/index.cjs CHANGED
@@ -7121,6 +7121,14 @@ function ChartBar({
7121
7121
  [data]
7122
7122
  );
7123
7123
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), "data-react-fancy-chart-bar": "", children: [
7124
+ showValues && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 flex gap-2", children: data.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
7125
+ "div",
7126
+ {
7127
+ className: "flex-1 text-center text-xs font-medium text-zinc-500 dark:text-zinc-400",
7128
+ children: item.value
7129
+ },
7130
+ item.label
7131
+ )) }),
7124
7132
  /* @__PURE__ */ jsxRuntime.jsx(
7125
7133
  "div",
7126
7134
  {
@@ -7129,26 +7137,23 @@ function ChartBar({
7129
7137
  children: data.map((item, i) => {
7130
7138
  const barHeight = item.value / maxValue * 100;
7131
7139
  const color = item.color ?? DEFAULT_COLORS[i % DEFAULT_COLORS.length];
7132
- return /* @__PURE__ */ jsxRuntime.jsxs(
7140
+ return /* @__PURE__ */ jsxRuntime.jsx(
7133
7141
  "div",
7134
7142
  {
7135
- className: "flex h-full flex-1 flex-col items-center justify-end gap-1",
7143
+ className: "flex h-full flex-1 items-end justify-center",
7136
7144
  "data-react-fancy-chart-bar-column": "",
7137
- children: [
7138
- showValues && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-zinc-500", children: item.value }),
7139
- /* @__PURE__ */ jsxRuntime.jsx(
7140
- "div",
7141
- {
7142
- "data-react-fancy-chart-bar-item": "",
7143
- className: "w-full rounded-t-md transition-all duration-500",
7144
- style: {
7145
- height: `${barHeight}%`,
7146
- backgroundColor: color,
7147
- minHeight: 4
7148
- }
7145
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7146
+ "div",
7147
+ {
7148
+ "data-react-fancy-chart-bar-item": "",
7149
+ className: "w-full rounded-t-md transition-all duration-500",
7150
+ style: {
7151
+ height: `${barHeight}%`,
7152
+ backgroundColor: color,
7153
+ minHeight: 4
7149
7154
  }
7150
- )
7151
- ]
7155
+ }
7156
+ )
7152
7157
  },
7153
7158
  item.label
7154
7159
  );