@deepnoid/ui 0.1.118 → 0.1.120
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/.turbo/turbo-build.log +146 -146
- package/dist/{chunk-CF7LIQF6.mjs → chunk-OGJONB7G.mjs} +57 -23
- package/dist/{chunk-WIZDHK4O.mjs → chunk-QKRCC26D.mjs} +63 -55
- package/dist/{chunk-63KZGR73.mjs → chunk-UA24L44Z.mjs} +34 -26
- package/dist/{chunk-KIN2UK2C.mjs → chunk-VB5NKWJG.mjs} +1 -1
- package/dist/components/charts/areaChart.js +63 -55
- package/dist/components/charts/areaChart.mjs +1 -1
- package/dist/components/charts/barChart.d.mts +14 -4
- package/dist/components/charts/barChart.d.ts +14 -4
- package/dist/components/charts/barChart.js +56 -22
- package/dist/components/charts/barChart.mjs +1 -1
- package/dist/components/charts/circularProgress.js +1 -1
- package/dist/components/charts/circularProgress.mjs +1 -1
- package/dist/components/charts/index.js +154 -104
- package/dist/components/charts/index.mjs +4 -4
- package/dist/components/charts/radarChart.js +34 -26
- package/dist/components/charts/radarChart.mjs +1 -1
- package/dist/index.js +154 -104
- package/dist/index.mjs +8 -8
- package/package.json +1 -1
|
@@ -8,17 +8,20 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/components/charts/barChart.tsx
|
|
10
10
|
import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
11
|
-
import { XAxis, YAxis, ResponsiveContainer, CartesianGrid, BarChart, Bar } from "recharts";
|
|
11
|
+
import { XAxis, YAxis, ResponsiveContainer, CartesianGrid, BarChart, Bar, Tooltip } from "recharts";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
var BarChartComponent = forwardRef((originalProps, ref) => {
|
|
14
14
|
const [props, variantProps] = mapPropsVariants(originalProps, barChartStyle.variantKeys);
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
data,
|
|
17
|
+
label,
|
|
18
|
+
classNames,
|
|
19
|
+
yAxisTicks = [0, 20, 40, 60, 80, 100],
|
|
20
|
+
yAxisTickFormatter = (value) => `${value}`,
|
|
21
|
+
yAxisDomain = [-6, 110],
|
|
22
|
+
customTooltip
|
|
23
|
+
} = { ...props, ...variantProps };
|
|
16
24
|
const slots = useMemo(() => barChartStyle({ ...variantProps }), [variantProps]);
|
|
17
|
-
const COLOR_MAP = {
|
|
18
|
-
primary: "#C7E5FA",
|
|
19
|
-
secondary: "#92DCB2",
|
|
20
|
-
warning: "#DEC1FA"
|
|
21
|
-
};
|
|
22
25
|
const [tickPositions, setTickPositions] = useState([]);
|
|
23
26
|
const tickRef = useRef([]);
|
|
24
27
|
const CustomBarShape = (barProps) => {
|
|
@@ -54,6 +57,28 @@ var BarChartComponent = forwardRef((originalProps, ref) => {
|
|
|
54
57
|
}
|
|
55
58
|
);
|
|
56
59
|
};
|
|
60
|
+
const CustomYAxisTick = ({ x, y, payload }) => {
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
"text",
|
|
63
|
+
{
|
|
64
|
+
x: x - 10,
|
|
65
|
+
y,
|
|
66
|
+
textAnchor: "middle",
|
|
67
|
+
fontSize: 12,
|
|
68
|
+
fontWeight: 700,
|
|
69
|
+
fill: "currentColor",
|
|
70
|
+
className: "text-body-foreground",
|
|
71
|
+
dy: 4,
|
|
72
|
+
children: yAxisTickFormatter(payload.value)
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
const CustomTooltip = ({ active, payload, label: label2 }) => {
|
|
77
|
+
if (customTooltip && active && payload && payload.length) {
|
|
78
|
+
return customTooltip({ active, payload, label: label2 });
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
};
|
|
57
82
|
useEffect(() => {
|
|
58
83
|
const raf = requestAnimationFrame(() => {
|
|
59
84
|
const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
|
|
@@ -72,11 +97,25 @@ var BarChartComponent = forwardRef((originalProps, ref) => {
|
|
|
72
97
|
BarChart,
|
|
73
98
|
{
|
|
74
99
|
data,
|
|
75
|
-
margin: { left: -
|
|
100
|
+
margin: { left: -20 },
|
|
76
101
|
barSize: 20,
|
|
77
|
-
barGap:
|
|
102
|
+
barGap: 20,
|
|
78
103
|
className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
|
|
79
104
|
children: [
|
|
105
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
106
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
107
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#DEC1FA" }),
|
|
108
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#3F9CF2" })
|
|
109
|
+
] }),
|
|
110
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
111
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#C2E59C" }),
|
|
112
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#64B3F4" })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxs("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
115
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#DDD6F3" }),
|
|
116
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#FAACA8" })
|
|
117
|
+
] })
|
|
118
|
+
] }),
|
|
80
119
|
/* @__PURE__ */ jsx(
|
|
81
120
|
CartesianGrid,
|
|
82
121
|
{
|
|
@@ -90,11 +129,11 @@ var BarChartComponent = forwardRef((originalProps, ref) => {
|
|
|
90
129
|
/* @__PURE__ */ jsx(
|
|
91
130
|
XAxis,
|
|
92
131
|
{
|
|
93
|
-
dataKey: "
|
|
132
|
+
dataKey: "title",
|
|
94
133
|
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
95
134
|
tickLine: false,
|
|
96
135
|
tick: CustomTick,
|
|
97
|
-
padding: { left:
|
|
136
|
+
padding: { left: 0, right: 0 }
|
|
98
137
|
}
|
|
99
138
|
),
|
|
100
139
|
/* @__PURE__ */ jsx(
|
|
@@ -102,20 +141,15 @@ var BarChartComponent = forwardRef((originalProps, ref) => {
|
|
|
102
141
|
{
|
|
103
142
|
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
104
143
|
tickLine: false,
|
|
105
|
-
tick:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
fill: "text-body-foreground",
|
|
109
|
-
textAnchor: "middle",
|
|
110
|
-
dx: -10
|
|
111
|
-
},
|
|
112
|
-
ticks: [0, 20, 40, 60, 80, 100],
|
|
113
|
-
domain: [-6, 110]
|
|
144
|
+
tick: CustomYAxisTick,
|
|
145
|
+
ticks: yAxisTicks,
|
|
146
|
+
domain: yAxisDomain
|
|
114
147
|
}
|
|
115
148
|
),
|
|
116
|
-
/* @__PURE__ */ jsx(
|
|
117
|
-
/* @__PURE__ */ jsx(Bar, { dataKey: "
|
|
118
|
-
/* @__PURE__ */ jsx(Bar, { dataKey: "
|
|
149
|
+
customTooltip && /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(CustomTooltip, {}), cursor: { fill: "transparent" } }),
|
|
150
|
+
/* @__PURE__ */ jsx(Bar, { dataKey: "blue", fill: "url(#blueGradient)", width: 20, shape: CustomBarShape }),
|
|
151
|
+
/* @__PURE__ */ jsx(Bar, { dataKey: "green", fill: "url(#greenGradient)", width: 20, shape: CustomBarShape }),
|
|
152
|
+
/* @__PURE__ */ jsx(Bar, { dataKey: "pink", fill: "url(#pinkGradient)", width: 20, shape: CustomBarShape })
|
|
119
153
|
]
|
|
120
154
|
}
|
|
121
155
|
) })
|
|
@@ -62,67 +62,75 @@ var AreaChartComponent = forwardRef((originalProps, ref) => {
|
|
|
62
62
|
};
|
|
63
63
|
return /* @__PURE__ */ jsxs("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
64
64
|
label && /* @__PURE__ */ jsx("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
|
|
65
|
-
/* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
65
|
+
/* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(
|
|
66
|
+
AreaChart,
|
|
67
|
+
{
|
|
68
|
+
data,
|
|
69
|
+
margin: { left: -30 },
|
|
70
|
+
className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
73
|
+
/* @__PURE__ */ jsx("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
|
|
74
|
+
/* @__PURE__ */ jsx("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
|
|
75
|
+
] }) }),
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
CartesianGrid,
|
|
78
|
+
{
|
|
79
|
+
vertical: true,
|
|
80
|
+
horizontal: false,
|
|
81
|
+
strokeDasharray: "3 3",
|
|
82
|
+
className: "stroke-neutral-light",
|
|
83
|
+
verticalPoints: tickPositions
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
XAxis,
|
|
88
|
+
{
|
|
89
|
+
dataKey: "name",
|
|
90
|
+
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
91
|
+
tickLine: false,
|
|
92
|
+
tick: CustomTick,
|
|
93
|
+
padding: { left: 35.5, right: 35.5 }
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
YAxis,
|
|
98
|
+
{
|
|
99
|
+
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
100
|
+
tickLine: false,
|
|
101
|
+
tick: {
|
|
102
|
+
fontSize: 12,
|
|
103
|
+
fontWeight: 700,
|
|
104
|
+
fill: "text-body-foreground",
|
|
105
|
+
textAnchor: "middle",
|
|
106
|
+
dx: -10
|
|
107
|
+
},
|
|
108
|
+
ticks: [0, 20, 40, 60, 80, 100],
|
|
109
|
+
domain: [-6, 110]
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsx(
|
|
113
|
+
Area,
|
|
114
|
+
{
|
|
115
|
+
type: "monotone",
|
|
116
|
+
dataKey: "value",
|
|
117
|
+
stroke: colorHex,
|
|
118
|
+
strokeWidth: 2,
|
|
119
|
+
fill: `url(#colorGradient-${uniqueId})`,
|
|
120
|
+
dot: /* @__PURE__ */ jsx(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
|
|
121
|
+
activeDot: { r: 7, fill: colorHex }
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
) })
|
|
119
127
|
] });
|
|
120
128
|
});
|
|
121
129
|
AreaChartComponent.displayName = "AreaChart";
|
|
122
130
|
var areaChart_default = AreaChartComponent;
|
|
123
131
|
var areaChartStyle = tv({
|
|
124
132
|
slots: {
|
|
125
|
-
base: ["flex", "flex-col", "gap-[10px]"],
|
|
133
|
+
base: ["flex", "flex-col", "gap-[10px]", "select-none"],
|
|
126
134
|
color: [],
|
|
127
135
|
axis: ["text-sm", "font-bold", "text-center", "text-body-foreground"],
|
|
128
136
|
label: ["text-md", "font-bold", "text-body-foreground"]
|
|
@@ -26,31 +26,39 @@ var RadarChart = forwardRef((originalProps, ref) => {
|
|
|
26
26
|
return Math.max(...data.map((item) => item.fullMark || 100));
|
|
27
27
|
}, [data]);
|
|
28
28
|
return /* @__PURE__ */ jsxs("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
29
|
-
/* @__PURE__ */ jsx(ResponsiveContainer, { width: 580, height: 330, children: /* @__PURE__ */ jsxs(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
/* @__PURE__ */ jsx(ResponsiveContainer, { width: 580, height: 330, children: /* @__PURE__ */ jsxs(
|
|
30
|
+
RechartsRadarChart,
|
|
31
|
+
{
|
|
32
|
+
data,
|
|
33
|
+
outerRadius: "80%",
|
|
34
|
+
className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(PolarGrid, { stroke: "#DFE2E7", strokeWidth: 1.75 }),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
PolarAngleAxis,
|
|
39
|
+
{
|
|
40
|
+
dataKey: "name",
|
|
41
|
+
tick: { fill: "#333", fontSize: 12, fontWeight: "bold" },
|
|
42
|
+
tickFormatter: (value) => value,
|
|
43
|
+
tickSize: 15
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx(PolarRadiusAxis, { domain: [0, maxFullMark], tick: false, tickCount: 6, axisLine: false }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
Radar,
|
|
49
|
+
{
|
|
50
|
+
name: label,
|
|
51
|
+
dataKey: "value",
|
|
52
|
+
stroke: "#3F9CF2",
|
|
53
|
+
fill: "#EFF8FF",
|
|
54
|
+
strokeWidth: 1.75,
|
|
55
|
+
dot: false,
|
|
56
|
+
activeDot: false
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
) }),
|
|
54
62
|
label && /* @__PURE__ */ jsx("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })
|
|
55
63
|
] });
|
|
56
64
|
});
|
|
@@ -58,7 +66,7 @@ RadarChart.displayName = "RadarChart";
|
|
|
58
66
|
var radarChart_default = RadarChart;
|
|
59
67
|
var radarChartStyle = tv({
|
|
60
68
|
slots: {
|
|
61
|
-
base: ["flex", "flex-col", "items-center", "gap-[10px]"],
|
|
69
|
+
base: ["flex", "flex-col", "items-center", "gap-[10px]", "select-none"],
|
|
62
70
|
label: ["text-sm", "font-bold", "text-left", "text-body-foreground"]
|
|
63
71
|
},
|
|
64
72
|
variants: {},
|
|
@@ -102,7 +102,7 @@ CircularProgress.displayName = "CircularProgress";
|
|
|
102
102
|
var circularProgress_default = CircularProgress;
|
|
103
103
|
var circularProgressStyle = tv({
|
|
104
104
|
slots: {
|
|
105
|
-
base: ["flex", "flex-col", "items-center", "gap-[20px]"],
|
|
105
|
+
base: ["flex", "flex-col", "items-center", "gap-[20px]", "select-none"],
|
|
106
106
|
background: ["fill-body-background", "border-neutral-light"],
|
|
107
107
|
progress: ["transition-all", "duration-1000 ease-out"],
|
|
108
108
|
percentage: ["text-xl", "font-bold", "text-body-foreground"],
|
|
@@ -424,67 +424,75 @@ var AreaChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
424
424
|
};
|
|
425
425
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
426
426
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
|
|
427
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
427
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
428
|
+
import_recharts.AreaChart,
|
|
429
|
+
{
|
|
430
|
+
data,
|
|
431
|
+
margin: { left: -30 },
|
|
432
|
+
className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
|
|
433
|
+
children: [
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
|
|
437
|
+
] }) }),
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
439
|
+
import_recharts.CartesianGrid,
|
|
440
|
+
{
|
|
441
|
+
vertical: true,
|
|
442
|
+
horizontal: false,
|
|
443
|
+
strokeDasharray: "3 3",
|
|
444
|
+
className: "stroke-neutral-light",
|
|
445
|
+
verticalPoints: tickPositions
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
449
|
+
import_recharts.XAxis,
|
|
450
|
+
{
|
|
451
|
+
dataKey: "name",
|
|
452
|
+
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
453
|
+
tickLine: false,
|
|
454
|
+
tick: CustomTick,
|
|
455
|
+
padding: { left: 35.5, right: 35.5 }
|
|
456
|
+
}
|
|
457
|
+
),
|
|
458
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
459
|
+
import_recharts.YAxis,
|
|
460
|
+
{
|
|
461
|
+
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
462
|
+
tickLine: false,
|
|
463
|
+
tick: {
|
|
464
|
+
fontSize: 12,
|
|
465
|
+
fontWeight: 700,
|
|
466
|
+
fill: "text-body-foreground",
|
|
467
|
+
textAnchor: "middle",
|
|
468
|
+
dx: -10
|
|
469
|
+
},
|
|
470
|
+
ticks: [0, 20, 40, 60, 80, 100],
|
|
471
|
+
domain: [-6, 110]
|
|
472
|
+
}
|
|
473
|
+
),
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
475
|
+
import_recharts.Area,
|
|
476
|
+
{
|
|
477
|
+
type: "monotone",
|
|
478
|
+
dataKey: "value",
|
|
479
|
+
stroke: colorHex,
|
|
480
|
+
strokeWidth: 2,
|
|
481
|
+
fill: `url(#colorGradient-${uniqueId})`,
|
|
482
|
+
dot: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
|
|
483
|
+
activeDot: { r: 7, fill: colorHex }
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
) })
|
|
481
489
|
] });
|
|
482
490
|
});
|
|
483
491
|
AreaChartComponent.displayName = "AreaChart";
|
|
484
492
|
var areaChart_default = AreaChartComponent;
|
|
485
493
|
var areaChartStyle = tv({
|
|
486
494
|
slots: {
|
|
487
|
-
base: ["flex", "flex-col", "gap-[10px]"],
|
|
495
|
+
base: ["flex", "flex-col", "gap-[10px]", "select-none"],
|
|
488
496
|
color: [],
|
|
489
497
|
axis: ["text-sm", "font-bold", "text-center", "text-body-foreground"],
|
|
490
498
|
label: ["text-md", "font-bold", "text-body-foreground"]
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
4
5
|
import { SlotsToClasses } from '../../utils/types.mjs';
|
|
5
6
|
|
|
6
7
|
type BarData = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
title: string;
|
|
9
|
+
blue: number;
|
|
10
|
+
green: number;
|
|
11
|
+
pink: number;
|
|
12
|
+
};
|
|
13
|
+
type TooltipProps = {
|
|
14
|
+
active: boolean;
|
|
15
|
+
payload: any[];
|
|
16
|
+
label: string;
|
|
11
17
|
};
|
|
12
18
|
type Props = {
|
|
13
19
|
data?: BarData[];
|
|
14
20
|
label?: string;
|
|
15
21
|
classNames?: SlotsToClasses<barChartSlots>;
|
|
22
|
+
yAxisTicks?: number[];
|
|
23
|
+
yAxisTickFormatter?: (value: number) => string;
|
|
24
|
+
yAxisDomain?: [number, number];
|
|
25
|
+
customTooltip?: (props: TooltipProps) => ReactNode;
|
|
16
26
|
};
|
|
17
27
|
type barChartProps = Props & barChartVariantProps;
|
|
18
28
|
declare const BarChartComponent: react.ForwardRefExoticComponent<Props & barChartVariantProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
4
5
|
import { SlotsToClasses } from '../../utils/types.js';
|
|
5
6
|
|
|
6
7
|
type BarData = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
title: string;
|
|
9
|
+
blue: number;
|
|
10
|
+
green: number;
|
|
11
|
+
pink: number;
|
|
12
|
+
};
|
|
13
|
+
type TooltipProps = {
|
|
14
|
+
active: boolean;
|
|
15
|
+
payload: any[];
|
|
16
|
+
label: string;
|
|
11
17
|
};
|
|
12
18
|
type Props = {
|
|
13
19
|
data?: BarData[];
|
|
14
20
|
label?: string;
|
|
15
21
|
classNames?: SlotsToClasses<barChartSlots>;
|
|
22
|
+
yAxisTicks?: number[];
|
|
23
|
+
yAxisTickFormatter?: (value: number) => string;
|
|
24
|
+
yAxisDomain?: [number, number];
|
|
25
|
+
customTooltip?: (props: TooltipProps) => ReactNode;
|
|
16
26
|
};
|
|
17
27
|
type barChartProps = Props & barChartVariantProps;
|
|
18
28
|
declare const BarChartComponent: react.ForwardRefExoticComponent<Props & barChartVariantProps & react.RefAttributes<HTMLDivElement>>;
|