waffle-board 0.2.2 → 0.2.4

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 (33) hide show
  1. package/README.md +53 -6
  2. package/dist-lib/{AreaChart-BybfMJe7.js → AreaChart-FcTyoMIU.js} +92 -89
  3. package/dist-lib/BarChart-B_gQGncr.js +383 -0
  4. package/dist-lib/{BubbleChart-4mszGuHa.js → BubbleChart-ChjG24ep.js} +3 -3
  5. package/dist-lib/CandlestickChart-CNPWAUc7.js +201 -0
  6. package/dist-lib/{ChordChart-C1--yz3H.js → ChordChart-Mqk6fqnw.js} +2 -2
  7. package/dist-lib/{CompositeChart-CC9WaSX2.js → CompositeChart-D8ZYLRaj.js} +4 -4
  8. package/dist-lib/D3ShapeFactories-BW5r_o96.js +259 -0
  9. package/dist-lib/{Grid-DoKyoesQ.js → Grid-CFUvuF-c.js} +2 -2
  10. package/dist-lib/{GridColumns-Bmuw2WtH.js → GridColumns-B3meoJgP.js} +4 -4
  11. package/dist-lib/{GridRows-DGQ9ou3n.js → GridRows-7-3enkd1.js} +5 -4
  12. package/dist-lib/{HeatmapChart-BA7C9aDH.js → HeatmapChart-DZpssQYc.js} +1 -1
  13. package/dist-lib/LineChart-TlaDdO56.js +257 -0
  14. package/dist-lib/PieChart-o5Bf7WW3.js +321 -0
  15. package/dist-lib/{RadarChart-Qb_0U-rp.js → RadarChart-CmGksAYH.js} +1 -1
  16. package/dist-lib/{SankeyChart-DzvTwdbQ.js → SankeyChart-ZThr5BbW.js} +1 -1
  17. package/dist-lib/{ScatterChart-texqcqO7.js → ScatterChart-0sGTmbit.js} +3 -3
  18. package/dist-lib/{band-Q-NQixeu.js → band-DbiWCPe-.js} +6 -6
  19. package/dist-lib/{linear-BMy3dF_L.js → linear-BdXdqDf3.js} +42 -42
  20. package/dist-lib/{monotone-DpfKcgi8.js → monotone-ClLgsXsq.js} +1 -1
  21. package/dist-lib/{ordinal-CB3mLwcq.js → ordinal-C_i-AnC9.js} +2 -2
  22. package/dist-lib/{ordinal-CEApqus_.js → ordinal-DZ5TFA9v.js} +1 -1
  23. package/dist-lib/{scaleOperator-BDwBQdxT.js → scaleOperator-Dwi9_Jub.js} +21 -21
  24. package/dist-lib/stackOffset-BVFXLVew.js +143 -0
  25. package/dist-lib/{time-BkG4aUoI.js → time-CYw7WqrE.js} +2 -2
  26. package/dist-lib/waffle-board.css +1 -1
  27. package/dist-lib/waffle-board.es.js +675 -577
  28. package/dist-lib/waffle-board.umd.js +4 -4
  29. package/package.json +4 -4
  30. package/dist-lib/BarChart-BBQ6DRng.js +0 -147
  31. package/dist-lib/D3ShapeFactories-D3zwXaLE.js +0 -395
  32. package/dist-lib/LineChart-DhhhQVLj.js +0 -313
  33. package/dist-lib/PieChart-dluYJoK7.js +0 -319
package/README.md CHANGED
@@ -3,16 +3,16 @@
3
3
  A **JSON schema-based dashboard renderer** for React. Build complex, draggable grid layouts simply by defining a JSON configuration.
4
4
 
5
5
  [![NPM Version](https://img.shields.io/npm/v/waffle-board)](https://www.npmjs.com/package/waffle-board)
6
- [![Live Demo](https://img.shields.io/badge/demo-live-green)](https://mbuchthal.github.io/waffle-board/)
6
+ [![Live Demo](https://img.shields.io/badge/demo-live-green)](https://surprisewaffles-io.github.io/waffle-board/)
7
7
 
8
- ![Dashboard Preview](https://github.com/mbuchthal/waffle-board/raw/main/public/preview.png)
8
+ ![Dashboard Preview](https://github.com/surprisewaffles-io/waffle-board/raw/main/public/preview.png)
9
9
 
10
10
  ## Features
11
11
 
12
12
  - **JSON-Driven**: Define your entire dashboard layout and widget configuration in a simple JSON object.
13
13
  - **Drag & Drop**: Built-in support for resizing and rearranging widgets (powered by `react-grid-layout`).
14
14
  - **Theme System**: 4 distinct themes (Ocean, Forest, Sunset, Default) with dark mode support.
15
- - **Waffle Charts Integration**: Showcases the full power of the [Waffle Charts](https://github.com/mbuchthal/waffle-charts) library.
15
+ - **Waffle Charts Integration**: Showcases the full power of the [Waffle Charts](https://github.com/surprisewaffles-io/waffle-charts) library.
16
16
  - **Modern UI**: Clean aesthetics using Tailwind CSS and Lucide icons.
17
17
 
18
18
  ## Tech Stack
@@ -20,7 +20,7 @@ A **JSON schema-based dashboard renderer** for React. Build complex, draggable g
20
20
  - **Framework**: [React](https://react.dev/) + [Vite](https://vitejs.dev/)
21
21
  - **Language**: TypeScript
22
22
  - **Styling**: Tailwind CSS
23
- - **Charts**: [Waffle Charts](https://github.com/mbuchthal/waffle-charts) (Visx-based)
23
+ - **Charts**: [Waffle Charts](https://github.com/surprisewaffles-io/waffle-charts) (Visx-based)
24
24
  - **Grid**: `react-grid-layout`
25
25
 
26
26
  ## Installation (As a Library)
@@ -35,7 +35,8 @@ npm install waffle-board
35
35
 
36
36
  ```tsx
37
37
  import { Dashboard } from 'waffle-board';
38
- import { BarChart, LineChart } from 'waffle-charts'; // Your chart components
38
+ import { BarChart } from '@waffle-charts/components/waffle/BarChart';
39
+ import { LineChart } from '@waffle-charts/components/waffle/LineChart'; // Your chart components
39
40
  import 'waffle-board/dist-lib/style.css'; // Import styles
40
41
 
41
42
  const registry = {
@@ -54,7 +55,44 @@ function MyDashboard() {
54
55
  }
55
56
  ```
56
57
 
57
- ## Running the Project
58
+ > **Note**: The Vite config in this repo defines an alias `@waffle-charts` that points to the local source of the `waffle-charts` library. This lets you import chart components directly from their file paths.
59
+
60
+ ### Supported Charts
61
+ Directly import these components from `@waffle-charts/components/waffle/`:
62
+
63
+ - `BarChart` - Supports stacked and grouped variants
64
+ - `LineChart` - Supports multi-series and legends
65
+ - `AreaChart`
66
+ - `PieChart`
67
+ - `CandlestickChart` - Financial OHLC data
68
+ - `ScatterChart`
69
+ - `RadarChart`
70
+ - `HeatmapChart`
71
+ - `TreemapChart`
72
+ - `SankeyChart`
73
+ - `ChordChart`
74
+
75
+ ### Registry Explanation
76
+ The `registry` object maps the string `type` found in your JSON configuration (e.g., `"type": "my-bar-chart"`) to the actual React component. This allows the JSON schema to remain serializable and agnostic of implementation details.
77
+
78
+ ### Data Integration (Dynamic Loading)
79
+ Widgets can fetch their own data by defining a `dataSource` in the JSON config. You provide the `fetcher` implementation.
80
+
81
+ ```tsx
82
+ <Dashboard
83
+ // ...
84
+ fetcher={async (dataSource) => {
85
+ // Implement your data fetching logic here
86
+ if (dataSource.type === 'api') {
87
+ const response = await fetch(dataSource.endpoint);
88
+ return response.json();
89
+ }
90
+ return null;
91
+ }}
92
+ />
93
+ ```
94
+
95
+ ### Running the Project
58
96
 
59
97
  ### Demo App
60
98
  To run the included demo application:
@@ -78,6 +116,15 @@ Themes are defined in `src/index.css` using CSS variables. To add a new theme:
78
116
  2. Define the color palette (background, foreground, primary, etc.).
79
117
  3. Add the theme to the `themes` array in `src/App.tsx`.
80
118
 
119
+ ## Troubleshooting
120
+
121
+ - **Module not found**: Verify the `@waffle-charts` alias exists in `vite.config.ts`.
122
+ - **TypeScript errors**: Run `npm run build:lib` to generate the compiled type definitions.
123
+
124
+ ## Contributing
125
+
126
+ See [CONTRIBUTING.md](https://github.com/surprisewaffles-io/waffle-board/blob/main/CONTRIBUTING.md) for guidelines.
127
+
81
128
  ## License
82
129
 
83
130
  MIT
@@ -1,38 +1,38 @@
1
1
  import { j as o, c as C } from "./utils-B4eT4KZs.js";
2
- import N, { useMemo as I } from "react";
3
- import { G, c as W, P as J } from "./ParentSize-DgScxYmK.js";
4
- import { c as Q } from "./time-BkG4aUoI.js";
5
- import { c as U, b as V } from "./linear-BMy3dF_L.js";
6
- import { u as Z, a as _, d as tt } from "./useTooltipInPortal-DOXS3zAG.js";
7
- import { G as et, A as at, a as rt } from "./GridRows-DGQ9ou3n.js";
8
- import { G as ot } from "./GridColumns-Bmuw2WtH.js";
9
- import { c as nt, b as st } from "./D3ShapeFactories-D3zwXaLE.js";
10
- import { l as lt } from "./localPoint-BIHUncaY.js";
11
- var it = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
12
- function R() {
13
- return R = Object.assign ? Object.assign.bind() : function(t) {
2
+ import N, { useMemo as G } from "react";
3
+ import { G as R, c as W, P as Q } from "./ParentSize-DgScxYmK.js";
4
+ import { c as U } from "./time-CYw7WqrE.js";
5
+ import { c as V, b as Z } from "./linear-BdXdqDf3.js";
6
+ import { u as _, a as tt, d as et } from "./useTooltipInPortal-DOXS3zAG.js";
7
+ import { G as at, A as rt, a as ot } from "./GridRows-7-3enkd1.js";
8
+ import { G as nt } from "./GridColumns-B3meoJgP.js";
9
+ import { s as st, b as lt } from "./D3ShapeFactories-BW5r_o96.js";
10
+ import { l as it } from "./localPoint-BIHUncaY.js";
11
+ var ct = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
12
+ function I() {
13
+ return I = Object.assign ? Object.assign.bind() : function(t) {
14
14
  for (var r = 1; r < arguments.length; r++) {
15
15
  var a = arguments[r];
16
16
  for (var n in a)
17
17
  Object.prototype.hasOwnProperty.call(a, n) && (t[n] = a[n]);
18
18
  }
19
19
  return t;
20
- }, R.apply(this, arguments);
20
+ }, I.apply(this, arguments);
21
21
  }
22
- function ct(t, r) {
22
+ function dt(t, r) {
23
23
  if (t == null) return {};
24
24
  var a = {}, n = Object.keys(t), s, l;
25
25
  for (l = 0; l < n.length; l++)
26
26
  s = n[l], !(r.indexOf(s) >= 0) && (a[s] = t[s]);
27
27
  return a;
28
28
  }
29
- function dt(t) {
30
- var r = t.className, a = t.top, n = t.left, s = t.keys, l = t.data, S = t.curve, O = t.defined, P = t.x, b = t.x0, k = t.x1, T = t.y0, A = t.y1, M = t.value, w = t.order, c = t.offset, u = t.color, p = t.children, i = ct(t, it), h = nt({
29
+ function ut(t) {
30
+ var r = t.className, a = t.top, n = t.left, s = t.keys, l = t.data, S = t.curve, O = t.defined, P = t.x, b = t.x0, k = t.x1, T = t.y0, A = t.y1, M = t.value, w = t.order, c = t.offset, u = t.color, p = t.children, i = dt(t, ct), y = st({
31
31
  keys: s,
32
32
  value: M,
33
33
  order: w,
34
34
  offset: c
35
- }), j = st({
35
+ }), j = lt({
36
36
  x: P,
37
37
  x0: b,
38
38
  x1: k,
@@ -40,35 +40,35 @@ function dt(t) {
40
40
  y1: A,
41
41
  curve: S,
42
42
  defined: O
43
- }), x = h(l);
43
+ }), x = y(l);
44
44
  return p ? /* @__PURE__ */ N.createElement(N.Fragment, null, p({
45
45
  stacks: x,
46
46
  path: j,
47
- stack: h
48
- })) : /* @__PURE__ */ N.createElement(G, {
47
+ stack: y
48
+ })) : /* @__PURE__ */ N.createElement(R, {
49
49
  top: a,
50
50
  left: n
51
- }, x.map(function(d, v) {
52
- return /* @__PURE__ */ N.createElement("path", R({
51
+ }, x.map(function(d, m) {
52
+ return /* @__PURE__ */ N.createElement("path", I({
53
53
  className: W("visx-stack", r),
54
- key: "stack-" + v + "-" + (d.key || ""),
54
+ key: "stack-" + m + "-" + (d.key || ""),
55
55
  d: j(d) || "",
56
- fill: u?.(d.key, v)
56
+ fill: u?.(d.key, m)
57
57
  }, i));
58
58
  }));
59
59
  }
60
- var ut = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
61
- function D() {
62
- return D = Object.assign ? Object.assign.bind() : function(t) {
60
+ var pt = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
61
+ function z() {
62
+ return z = Object.assign ? Object.assign.bind() : function(t) {
63
63
  for (var r = 1; r < arguments.length; r++) {
64
64
  var a = arguments[r];
65
65
  for (var n in a)
66
66
  Object.prototype.hasOwnProperty.call(a, n) && (t[n] = a[n]);
67
67
  }
68
68
  return t;
69
- }, D.apply(this, arguments);
69
+ }, z.apply(this, arguments);
70
70
  }
71
- function pt(t, r) {
71
+ function mt(t, r) {
72
72
  if (t == null) return {};
73
73
  var a = {}, n = Object.keys(t), s, l;
74
74
  for (l = 0; l < n.length; l++)
@@ -76,8 +76,8 @@ function pt(t, r) {
76
76
  return a;
77
77
  }
78
78
  function xt(t) {
79
- var r = t.className, a = t.top, n = t.left, s = t.keys, l = t.data, S = t.curve, O = t.defined, P = t.x, b = t.x0, k = t.x1, T = t.y0, A = t.y1, M = t.value, w = t.order, c = t.offset, u = t.color, p = t.children, i = pt(t, ut);
80
- return /* @__PURE__ */ N.createElement(dt, D({
79
+ var r = t.className, a = t.top, n = t.left, s = t.keys, l = t.data, S = t.curve, O = t.defined, P = t.x, b = t.x0, k = t.x1, T = t.y0, A = t.y1, M = t.value, w = t.order, c = t.offset, u = t.color, p = t.children, i = mt(t, pt);
80
+ return /* @__PURE__ */ N.createElement(ut, z({
81
81
  className: r,
82
82
  top: a,
83
83
  left: n,
@@ -94,19 +94,19 @@ function xt(t) {
94
94
  order: w,
95
95
  offset: c,
96
96
  color: u
97
- }, i), p || function(h) {
98
- var j = h.stacks, x = h.path;
99
- return j.map(function(d, v) {
100
- return /* @__PURE__ */ N.createElement("path", D({
97
+ }, i), p || function(y) {
98
+ var j = y.stacks, x = y.path;
99
+ return j.map(function(d, m) {
100
+ return /* @__PURE__ */ N.createElement("path", z({
101
101
  className: W("visx-area-stack", r),
102
- key: "area-stack-" + v + "-" + (d.key || ""),
102
+ key: "area-stack-" + m + "-" + (d.key || ""),
103
103
  d: x(d) || "",
104
- fill: u?.(d.key, v)
104
+ fill: u?.(d.key, m)
105
105
  }, i));
106
106
  });
107
107
  });
108
108
  }
109
- function mt({
109
+ function ft({
110
110
  data: t,
111
111
  width: r,
112
112
  height: a,
@@ -125,53 +125,56 @@ function mt({
125
125
  const c = { ...{ top: 40, right: 30, bottom: 50, left: 50 }, ...M }, u = r - c.left - c.right, p = a - c.top - c.bottom;
126
126
  if (!Array.isArray(t))
127
127
  return console.warn("AreaChart: data prop is not an array", t), null;
128
- const i = (e) => new Date(e[n]), h = (e) => e[0], j = (e) => e[1], x = I(
129
- () => Q({
128
+ const i = (e) => new Date(e[n]), y = (e) => e[0], j = (e) => e[1], x = G(() => t.filter((e) => {
129
+ const f = i(e);
130
+ return f instanceof Date && !isNaN(f.getTime());
131
+ }), [t, i]), d = G(
132
+ () => U({
130
133
  range: [0, u],
131
- domain: [Math.min(...t.map((e) => i(e).getTime())), Math.max(...t.map((e) => i(e).getTime()))]
134
+ domain: [
135
+ Math.min(...x.map((e) => i(e).getTime())) || 0,
136
+ Math.max(...x.map((e) => i(e).getTime())) || 0
137
+ ]
132
138
  }),
133
- [u, t, n]
134
- ), d = I(
135
- () => U({
139
+ [u, x, n]
140
+ ), m = G(
141
+ () => V({
136
142
  range: [p, 0],
137
143
  round: !0,
138
- // Calculate max value from stacked data could be complex, assuming simplistic sum or finding max from data
139
- // For accurate stacking, we should ideally calculate the max stack value.
140
- // For this demo, let's just make sure we cover the data range generously.
141
- domain: [0, Math.max(...t.map((e) => s.reduce((y, m) => y + Number(e[m]), 0))) * 1.1],
144
+ domain: [0, Math.max(...x.map((e) => s.reduce((f, h) => f + (Number(e[h]) || 0), 0))) * 1.1 || 100],
142
145
  nice: !0
143
146
  }),
144
- [p, t, s]
147
+ [p, x, s]
145
148
  ), {
146
- tooltipOpen: v,
147
- tooltipLeft: H,
148
- tooltipTop: Y,
149
+ tooltipOpen: H,
150
+ tooltipLeft: Y,
151
+ tooltipTop: B,
149
152
  tooltipData: E,
150
- hideTooltip: B,
151
- showTooltip: F
152
- } = Z(), { containerRef: K, TooltipInPortal: X } = _({
153
+ hideTooltip: F,
154
+ showTooltip: K
155
+ } = _(), { containerRef: X, TooltipInPortal: q } = tt({
153
156
  scroll: !0
154
- }), q = V((e) => i(e)).left, $ = (e) => {
155
- const { x: y } = lt(e) || { x: 0 }, m = x.invert(y - c.left), L = q(t, m, 1), g = t[L - 1], f = t[L];
156
- let z = g;
157
- f && i(f) && (z = m.valueOf() - i(g).valueOf() > i(f).valueOf() - m.valueOf() ? f : g), z && F({
158
- tooltipData: z,
159
- tooltipLeft: x(i(z)) + c.left,
160
- tooltipTop: d(0) + c.top
157
+ }), J = Z((e) => i(e)).left, $ = (e) => {
158
+ const { x: f } = it(e) || { x: 0 }, h = d.invert(f - c.left), L = J(t, h, 1), g = t[L - 1], v = t[L];
159
+ let D = g;
160
+ v && i(v) && (D = h.valueOf() - i(g).valueOf() > i(v).valueOf() - h.valueOf() ? v : g), D && K({
161
+ tooltipData: D,
162
+ tooltipLeft: d(i(D)) + c.left,
163
+ tooltipTop: m(0) + c.top
161
164
  // Snap to bottom or follow mouse
162
165
  });
163
166
  };
164
167
  return r < 10 || a < 100 ? null : /* @__PURE__ */ o.jsxs("div", { className: C("relative", S), children: [
165
- /* @__PURE__ */ o.jsx("svg", { ref: K, width: r, height: a, className: "overflow-visible", children: /* @__PURE__ */ o.jsxs(G, { left: c.left, top: c.top, children: [
166
- (b || k) && /* @__PURE__ */ o.jsxs(G, { children: [
167
- b && /* @__PURE__ */ o.jsx(et, { scale: d, width: u, height: p, strokeDasharray: "3,3", stroke: "hsl(var(--border, 214.3 31.8% 91.4%))" }),
168
- k && /* @__PURE__ */ o.jsx(ot, { scale: x, width: u, height: p, strokeDasharray: "3,3", stroke: "hsl(var(--border, 214.3 31.8% 91.4%))" })
168
+ /* @__PURE__ */ o.jsx("svg", { ref: X, width: r, height: a, className: "overflow-visible", children: /* @__PURE__ */ o.jsxs(R, { left: c.left, top: c.top, children: [
169
+ (b || k) && /* @__PURE__ */ o.jsxs(R, { children: [
170
+ b && /* @__PURE__ */ o.jsx(at, { scale: m, width: u, height: p, strokeDasharray: "3,3", stroke: "hsl(var(--border, 214.3 31.8% 91.4%))" }),
171
+ k && /* @__PURE__ */ o.jsx(nt, { scale: d, width: u, height: p, strokeDasharray: "3,3", stroke: "hsl(var(--border, 214.3 31.8% 91.4%))" })
169
172
  ] }),
170
173
  O && /* @__PURE__ */ o.jsx(
171
- at,
174
+ rt,
172
175
  {
173
176
  top: p,
174
- scale: x,
177
+ scale: d,
175
178
  stroke: "hsl(var(--border, 214.3 31.8% 91.4%))",
176
179
  tickStroke: "hsl(var(--border, 214.3 31.8% 91.4%))",
177
180
  label: T,
@@ -190,9 +193,9 @@ function mt({
190
193
  }
191
194
  ),
192
195
  P && /* @__PURE__ */ o.jsx(
193
- rt,
196
+ ot,
194
197
  {
195
- scale: d,
198
+ scale: m,
196
199
  stroke: "transparent",
197
200
  tickStroke: "hsl(var(--border))",
198
201
  label: A,
@@ -216,20 +219,20 @@ function mt({
216
219
  {
217
220
  data: t,
218
221
  keys: s,
219
- x: (e) => x(i(e.data)) ?? 0,
220
- y0: (e) => d(h(e)) ?? 0,
221
- y1: (e) => d(j(e)) ?? 0,
222
- children: ({ stacks: e, path: y }) => e.map((m, L) => {
223
- const g = l[L % l.length], f = g.startsWith("#");
222
+ x: (e) => d(i(e.data)) ?? 0,
223
+ y0: (e) => m(y(e)) ?? 0,
224
+ y1: (e) => m(j(e)) ?? 0,
225
+ children: ({ stacks: e, path: f }) => e.map((h, L) => {
226
+ const g = l[L % l.length], v = g.startsWith("#");
224
227
  return /* @__PURE__ */ o.jsx(
225
228
  "path",
226
229
  {
227
- d: y(m) || "",
230
+ d: f(h) || "",
228
231
  stroke: "transparent",
229
- fill: f ? g : void 0,
230
- className: C("opacity-80 hover:opacity-100 transition-opacity", !f && "fill-current", !f && g)
232
+ fill: v ? g : void 0,
233
+ className: C("opacity-80 hover:opacity-100 transition-opacity", !v && "fill-current", !v && g)
231
234
  },
232
- `stack-${m.key}`
235
+ `stack-${h.key}`
233
236
  );
234
237
  })
235
238
  }
@@ -245,20 +248,20 @@ function mt({
245
248
  onTouchStart: $,
246
249
  onTouchMove: $,
247
250
  onMouseMove: $,
248
- onMouseLeave: () => B()
251
+ onMouseLeave: () => F()
249
252
  }
250
253
  )
251
254
  ] }) }),
252
- v && E && /* @__PURE__ */ o.jsx(
253
- X,
255
+ H && E && /* @__PURE__ */ o.jsx(
256
+ q,
254
257
  {
255
- top: Y,
256
- left: H,
257
- style: { ...tt, padding: 0, borderRadius: 0, boxShadow: "none", background: "transparent", zIndex: 50 },
258
+ top: B,
259
+ left: Y,
260
+ style: { ...et, padding: 0, borderRadius: 0, boxShadow: "none", background: "transparent", zIndex: 50 },
258
261
  children: /* @__PURE__ */ o.jsxs("div", { className: "rounded-md border bg-white dark:bg-slate-900 px-3 py-1.5 text-sm text-slate-900 dark:text-slate-100 shadow-lg", children: [
259
262
  /* @__PURE__ */ o.jsx("p", { className: "font-semibold text-xs text-muted-foreground mb-1", children: i(E).toLocaleDateString() }),
260
- s.map((e, y) => /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2", children: [
261
- /* @__PURE__ */ o.jsx("div", { className: C("w-2 h-2 rounded-full bg-current", l[y % l.length]) }),
263
+ s.map((e, f) => /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-2", children: [
264
+ /* @__PURE__ */ o.jsx("div", { className: C("w-2 h-2 rounded-full bg-current", l[f % l.length]) }),
262
265
  /* @__PURE__ */ o.jsxs("span", { className: "text-xs capitalize", children: [
263
266
  e,
264
267
  ":"
@@ -270,7 +273,7 @@ function mt({
270
273
  )
271
274
  ] });
272
275
  }
273
- const Ot = (t) => /* @__PURE__ */ o.jsx("div", { style: { width: "100%", height: "100%", minHeight: 100 }, children: /* @__PURE__ */ o.jsx(J, { children: ({ width: r, height: a }) => /* @__PURE__ */ o.jsx(mt, { ...t, width: r, height: a }) }) });
276
+ const Pt = (t) => /* @__PURE__ */ o.jsx("div", { style: { width: "100%", height: "100%", minHeight: 100 }, children: /* @__PURE__ */ o.jsx(Q, { children: ({ width: r, height: a }) => /* @__PURE__ */ o.jsx(ft, { ...t, width: r, height: a }) }) });
274
277
  export {
275
- Ot as AreaChart
278
+ Pt as AreaChart
276
279
  };