@object-ui/plugin-charts 0.3.0
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/CHANGELOG.md +48 -0
- package/LICENSE +21 -0
- package/README.md +121 -0
- package/dist/AdvancedChartImpl-LUnT2ZAf.js +2320 -0
- package/dist/BarChart-CRc8MAtI.js +17766 -0
- package/dist/ChartImpl-DiqV9Evl.js +79 -0
- package/dist/index-BcjHuFVN.js +738 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -0
- package/dist/index.umd.cjs +85 -0
- package/dist/src/AdvancedChartImpl.d.ts +16 -0
- package/dist/src/ChartContainerImpl.d.ts +31 -0
- package/dist/src/ChartImpl.d.ts +13 -0
- package/dist/src/index.d.ts +42 -0
- package/dist/src/index.test.d.ts +1 -0
- package/dist/src/types.d.ts +47 -0
- package/package.json +42 -0
- package/src/AdvancedChartImpl.tsx +162 -0
- package/src/ChartContainerImpl.tsx +345 -0
- package/src/ChartImpl.tsx +83 -0
- package/src/index.test.ts +128 -0
- package/src/index.tsx +201 -0
- package/src/types.ts +60 -0
- package/tsconfig.json +17 -0
- package/vite.config.ts +38 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { j as r } from "./index-BcjHuFVN.js";
|
|
2
|
+
import { R as l, B as n, C as d, X as f, Y as p, T as x, L as u, a as c } from "./BarChart-CRc8MAtI.js";
|
|
3
|
+
function j({
|
|
4
|
+
data: e = [],
|
|
5
|
+
dataKey: s = "value",
|
|
6
|
+
xAxisKey: a = "name",
|
|
7
|
+
height: t = 400,
|
|
8
|
+
className: i = "",
|
|
9
|
+
// Default to standard primary color
|
|
10
|
+
color: o = "hsl(var(--primary))"
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ r.jsx("div", { className: `p-4 rounded-xl border border-border bg-card/40 backdrop-blur-sm shadow-lg shadow-background/5 ${i}`, children: /* @__PURE__ */ r.jsx(l, { width: "100%", height: t, children: /* @__PURE__ */ r.jsxs(n, { data: e, margin: { top: 20, right: 30, left: 20, bottom: 5 }, children: [
|
|
13
|
+
/* @__PURE__ */ r.jsxs("defs", { children: [
|
|
14
|
+
/* @__PURE__ */ r.jsxs("linearGradient", { id: "barGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
15
|
+
/* @__PURE__ */ r.jsx("stop", { offset: "0%", stopColor: o, stopOpacity: 1 }),
|
|
16
|
+
/* @__PURE__ */ r.jsx("stop", { offset: "90%", stopColor: o, stopOpacity: 0.6 }),
|
|
17
|
+
/* @__PURE__ */ r.jsx("stop", { offset: "100%", stopColor: o, stopOpacity: 0.3 })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ r.jsxs("filter", { id: "glow", height: "130%", children: [
|
|
20
|
+
/* @__PURE__ */ r.jsx("feGaussianBlur", { in: "SourceAlpha", stdDeviation: "3", result: "blur" }),
|
|
21
|
+
/* @__PURE__ */ r.jsx("feOffset", { in: "blur", dx: "0", dy: "0", result: "offsetBlur" }),
|
|
22
|
+
/* @__PURE__ */ r.jsx("feFlood", { floodColor: o, floodOpacity: "0.5", result: "offsetColor" }),
|
|
23
|
+
/* @__PURE__ */ r.jsx("feComposite", { in: "offsetColor", in2: "offsetBlur", operator: "in", result: "offsetBlur" }),
|
|
24
|
+
/* @__PURE__ */ r.jsxs("feMerge", { children: [
|
|
25
|
+
/* @__PURE__ */ r.jsx("feMergeNode", { in: "offsetBlur" }),
|
|
26
|
+
/* @__PURE__ */ r.jsx("feMergeNode", { in: "SourceGraphic" })
|
|
27
|
+
] })
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ r.jsx(d, { strokeDasharray: "3 3", stroke: "hsl(var(--border))", vertical: !1 }),
|
|
31
|
+
/* @__PURE__ */ r.jsx(
|
|
32
|
+
f,
|
|
33
|
+
{
|
|
34
|
+
dataKey: a,
|
|
35
|
+
tick: { fill: "hsl(var(--muted-foreground))", fontSize: 12, fontFamily: "monospace" },
|
|
36
|
+
tickLine: !1,
|
|
37
|
+
axisLine: { stroke: "hsl(var(--border))" },
|
|
38
|
+
dy: 10
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r.jsx(
|
|
42
|
+
p,
|
|
43
|
+
{
|
|
44
|
+
tick: { fill: "hsl(var(--muted-foreground))", fontSize: 12, fontFamily: "monospace" },
|
|
45
|
+
tickLine: !1,
|
|
46
|
+
axisLine: !1
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ r.jsx(
|
|
50
|
+
x,
|
|
51
|
+
{
|
|
52
|
+
cursor: { fill: "hsl(var(--muted))", opacity: 0.2 },
|
|
53
|
+
contentStyle: {
|
|
54
|
+
backgroundColor: "hsl(var(--popover))",
|
|
55
|
+
borderColor: "hsl(var(--border))",
|
|
56
|
+
color: "hsl(var(--popover-foreground))",
|
|
57
|
+
borderRadius: "8px",
|
|
58
|
+
fontFamily: "monospace",
|
|
59
|
+
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)"
|
|
60
|
+
},
|
|
61
|
+
itemStyle: { color: "hsl(var(--primary))" }
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ r.jsx(u, { wrapperStyle: { paddingTop: "20px", fontFamily: "monospace" } }),
|
|
65
|
+
/* @__PURE__ */ r.jsx(
|
|
66
|
+
c,
|
|
67
|
+
{
|
|
68
|
+
dataKey: s,
|
|
69
|
+
fill: "url(#barGradient)",
|
|
70
|
+
radius: [4, 4, 0, 0],
|
|
71
|
+
filter: "url(#glow)",
|
|
72
|
+
animationDuration: 1500
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }) }) });
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
j as default
|
|
79
|
+
};
|