@deepnoid/ui 0.1.44 → 0.1.46
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 +176 -176
- package/dist/{chunk-NZOVUADT.mjs → chunk-7Q64PDCF.mjs} +41 -35
- package/dist/{chunk-TBZSYI6R.mjs → chunk-IXHFLCAG.mjs} +1 -1
- package/dist/components/breadcrumb/breadcrumb.mjs +3 -3
- package/dist/components/breadcrumb/index.mjs +3 -3
- package/dist/components/button/index.mjs +6 -6
- package/dist/components/charts/areaCharts.d.mts +0 -6
- package/dist/components/charts/areaCharts.d.ts +0 -6
- package/dist/components/charts/areaCharts.js +40 -34
- package/dist/components/charts/areaCharts.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 +41 -35
- package/dist/components/charts/index.mjs +2 -2
- package/dist/components/dateTimePicker/dateTimePicker.mjs +3 -3
- package/dist/components/dateTimePicker/index.mjs +3 -3
- package/dist/components/fileUpload/fileUpload.mjs +3 -3
- package/dist/components/fileUpload/index.mjs +3 -3
- package/dist/components/modal/index.mjs +3 -3
- package/dist/components/modal/modal.mjs +3 -3
- package/dist/components/table/index.mjs +3 -3
- package/dist/components/toast/index.mjs +2 -2
- package/dist/components/toast/use-toast.mjs +2 -2
- package/dist/index.js +42 -36
- package/dist/index.mjs +51 -51
- package/package.json +1 -1
- package/dist/{chunk-TRR232FS.mjs → chunk-25QOEKXS.mjs} +3 -3
- package/dist/{chunk-CTBTYNSM.mjs → chunk-IBI3OVQI.mjs} +3 -3
- package/dist/{chunk-WOEZHDJR.mjs → chunk-NHVIKP4H.mjs} +3 -3
- package/dist/{chunk-G67WUZO3.mjs → chunk-PXIVYA5G.mjs} +3 -3
|
@@ -7,24 +7,50 @@ import {
|
|
|
7
7
|
} from "./chunk-E3G5QXSH.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/charts/areaCharts.tsx
|
|
10
|
-
import { forwardRef, useMemo, useState } from "react";
|
|
10
|
+
import { forwardRef, useMemo, useState, useRef, useLayoutEffect } from "react";
|
|
11
11
|
import { AreaChart, Area, XAxis, YAxis, ResponsiveContainer, CartesianGrid } from "recharts";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
var AreaChartComponent = forwardRef((originalProps, ref) => {
|
|
14
|
-
var _a, _b;
|
|
15
14
|
const [props, variantProps] = mapPropsVariants(originalProps, areaChartStyle.variantKeys);
|
|
16
15
|
const { areaData, color, classNames } = { ...props, ...variantProps };
|
|
17
16
|
const slots = useMemo(() => areaChartStyle({ ...variantProps }), [variantProps]);
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const COLOR_MAP = {
|
|
18
|
+
primary: "#3F9CF2",
|
|
19
|
+
danger: "#FF4684"
|
|
20
|
+
};
|
|
21
|
+
const colorHex = useMemo(() => COLOR_MAP[color || "primary"], [color]);
|
|
22
|
+
const [tickPositions, setTickPositions] = useState([]);
|
|
23
|
+
const tickRef = useRef([]);
|
|
24
|
+
const CustomTick = ({ x, y, payload }) => {
|
|
25
|
+
if (x !== void 0) {
|
|
26
|
+
tickRef.current.push(x);
|
|
25
27
|
}
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"text",
|
|
30
|
+
{
|
|
31
|
+
x,
|
|
32
|
+
y: y + 14,
|
|
33
|
+
textAnchor: "middle",
|
|
34
|
+
fontSize: 12,
|
|
35
|
+
fontWeight: 700,
|
|
36
|
+
fill: "currentColor",
|
|
37
|
+
className: "text-body-foreground",
|
|
38
|
+
children: payload.value
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
useLayoutEffect(() => {
|
|
43
|
+
const raf = requestAnimationFrame(() => {
|
|
44
|
+
const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
|
|
45
|
+
const mids = [];
|
|
46
|
+
for (let i = 0; i < unique.length - 1; i++) {
|
|
47
|
+
mids.push((unique[i] + unique[i + 1]) / 2);
|
|
48
|
+
}
|
|
49
|
+
setTickPositions(mids);
|
|
50
|
+
tickRef.current = [];
|
|
51
|
+
});
|
|
52
|
+
return () => cancelAnimationFrame(raf);
|
|
53
|
+
}, [areaData]);
|
|
28
54
|
const CustomDotWithShadow = (props2) => {
|
|
29
55
|
const { cx, cy, fill, stroke } = props2;
|
|
30
56
|
if (cx === void 0 || cy === void 0) return null;
|
|
@@ -45,7 +71,7 @@ var AreaChartComponent = forwardRef((originalProps, ref) => {
|
|
|
45
71
|
horizontal: false,
|
|
46
72
|
strokeDasharray: "3 3",
|
|
47
73
|
className: "stroke-neutral-light",
|
|
48
|
-
verticalPoints:
|
|
74
|
+
verticalPoints: tickPositions
|
|
49
75
|
}
|
|
50
76
|
),
|
|
51
77
|
/* @__PURE__ */ jsx(
|
|
@@ -54,25 +80,7 @@ var AreaChartComponent = forwardRef((originalProps, ref) => {
|
|
|
54
80
|
dataKey: "name",
|
|
55
81
|
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
56
82
|
tickLine: false,
|
|
57
|
-
tick:
|
|
58
|
-
setXTickPositions((prev) => {
|
|
59
|
-
if (!prev.includes(x)) return [...prev, x];
|
|
60
|
-
return prev;
|
|
61
|
-
});
|
|
62
|
-
return /* @__PURE__ */ jsx(
|
|
63
|
-
"text",
|
|
64
|
-
{
|
|
65
|
-
x,
|
|
66
|
-
y: y + 14,
|
|
67
|
-
textAnchor: "middle",
|
|
68
|
-
fontSize: 12,
|
|
69
|
-
fontWeight: 700,
|
|
70
|
-
fill: "currentColor",
|
|
71
|
-
className: "text-body-foreground",
|
|
72
|
-
children: payload.value
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
},
|
|
83
|
+
tick: CustomTick,
|
|
76
84
|
padding: { left: 35.5, right: 35.5 }
|
|
77
85
|
}
|
|
78
86
|
),
|
|
@@ -117,12 +125,10 @@ var areaChartStyle = tv({
|
|
|
117
125
|
variants: {
|
|
118
126
|
color: {
|
|
119
127
|
primary: {
|
|
120
|
-
color: ["text-primary-main"]
|
|
121
|
-
_colorValue: "#3F9CF2"
|
|
128
|
+
color: ["text-primary-main"]
|
|
122
129
|
},
|
|
123
130
|
danger: {
|
|
124
|
-
color: ["text-danger-main"]
|
|
125
|
-
_colorValue: "#FF4684"
|
|
131
|
+
color: ["text-danger-main"]
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
134
|
},
|
|
@@ -24,7 +24,7 @@ var CircularProgress = forwardRef((originalProps, ref) => {
|
|
|
24
24
|
const OUTER_RADIUS = 88;
|
|
25
25
|
const INNER_RADIUS = OUTER_RADIUS - BAR_SIZE;
|
|
26
26
|
return /* @__PURE__ */ jsxs("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
27
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", style: { width: size, height: size }, children: [
|
|
28
28
|
/* @__PURE__ */ jsxs(
|
|
29
29
|
RadialBarChart,
|
|
30
30
|
{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
breadcrumb_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-PXIVYA5G.mjs";
|
|
5
5
|
import "../../chunk-MY5U63QO.mjs";
|
|
6
|
-
import "../../chunk-7TAGGLNY.mjs";
|
|
7
|
-
import "../../chunk-WFMFC7R6.mjs";
|
|
8
6
|
import "../../chunk-LPZOH3RP.mjs";
|
|
9
7
|
import "../../chunk-UB4YBFOT.mjs";
|
|
8
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
10
9
|
import "../../chunk-6WSACUIB.mjs";
|
|
11
10
|
import "../../chunk-LXHUO6VM.mjs";
|
|
12
11
|
import "../../chunk-6PNKRBUT.mjs";
|
|
13
12
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
14
13
|
import "../../chunk-2TKEWFGH.mjs";
|
|
14
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
15
15
|
import "../../chunk-2SDYFOZL.mjs";
|
|
16
16
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
17
17
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import "../../chunk-KYIODWXL.mjs";
|
|
3
3
|
import {
|
|
4
4
|
breadcrumb_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-PXIVYA5G.mjs";
|
|
6
6
|
import "../../chunk-MY5U63QO.mjs";
|
|
7
|
-
import "../../chunk-7TAGGLNY.mjs";
|
|
8
|
-
import "../../chunk-WFMFC7R6.mjs";
|
|
9
7
|
import "../../chunk-LPZOH3RP.mjs";
|
|
10
8
|
import "../../chunk-UB4YBFOT.mjs";
|
|
9
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
11
10
|
import "../../chunk-6WSACUIB.mjs";
|
|
12
11
|
import "../../chunk-LXHUO6VM.mjs";
|
|
13
12
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
13
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
14
|
import "../../chunk-2TKEWFGH.mjs";
|
|
15
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
16
16
|
import "../../chunk-2SDYFOZL.mjs";
|
|
17
17
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
18
18
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-MY5U63QO.mjs";
|
|
3
|
-
import {
|
|
4
|
-
icon_button_default
|
|
5
|
-
} from "../../chunk-7TAGGLNY.mjs";
|
|
6
|
-
import {
|
|
7
|
-
text_button_default
|
|
8
|
-
} from "../../chunk-WFMFC7R6.mjs";
|
|
9
3
|
import {
|
|
10
4
|
button_group_default
|
|
11
5
|
} from "../../chunk-LPZOH3RP.mjs";
|
|
12
6
|
import {
|
|
13
7
|
button_default
|
|
14
8
|
} from "../../chunk-UB4YBFOT.mjs";
|
|
9
|
+
import {
|
|
10
|
+
icon_button_default
|
|
11
|
+
} from "../../chunk-7TAGGLNY.mjs";
|
|
15
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
16
13
|
import "../../chunk-LXHUO6VM.mjs";
|
|
17
14
|
import "../../chunk-6PNKRBUT.mjs";
|
|
18
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
19
16
|
import "../../chunk-2TKEWFGH.mjs";
|
|
17
|
+
import {
|
|
18
|
+
text_button_default
|
|
19
|
+
} from "../../chunk-WFMFC7R6.mjs";
|
|
20
20
|
import "../../chunk-2SDYFOZL.mjs";
|
|
21
21
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
22
22
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -18,11 +18,9 @@ declare const areaChartStyle: tailwind_variants.TVReturnType<{
|
|
|
18
18
|
color: {
|
|
19
19
|
primary: {
|
|
20
20
|
color: string[];
|
|
21
|
-
_colorValue: string;
|
|
22
21
|
};
|
|
23
22
|
danger: {
|
|
24
23
|
color: string[];
|
|
25
|
-
_colorValue: string;
|
|
26
24
|
};
|
|
27
25
|
};
|
|
28
26
|
}, {
|
|
@@ -33,11 +31,9 @@ declare const areaChartStyle: tailwind_variants.TVReturnType<{
|
|
|
33
31
|
color: {
|
|
34
32
|
primary: {
|
|
35
33
|
color: string[];
|
|
36
|
-
_colorValue: string;
|
|
37
34
|
};
|
|
38
35
|
danger: {
|
|
39
36
|
color: string[];
|
|
40
|
-
_colorValue: string;
|
|
41
37
|
};
|
|
42
38
|
};
|
|
43
39
|
}, {
|
|
@@ -48,11 +44,9 @@ declare const areaChartStyle: tailwind_variants.TVReturnType<{
|
|
|
48
44
|
color: {
|
|
49
45
|
primary: {
|
|
50
46
|
color: string[];
|
|
51
|
-
_colorValue: string;
|
|
52
47
|
};
|
|
53
48
|
danger: {
|
|
54
49
|
color: string[];
|
|
55
|
-
_colorValue: string;
|
|
56
50
|
};
|
|
57
51
|
};
|
|
58
52
|
}, {
|
|
@@ -18,11 +18,9 @@ declare const areaChartStyle: tailwind_variants.TVReturnType<{
|
|
|
18
18
|
color: {
|
|
19
19
|
primary: {
|
|
20
20
|
color: string[];
|
|
21
|
-
_colorValue: string;
|
|
22
21
|
};
|
|
23
22
|
danger: {
|
|
24
23
|
color: string[];
|
|
25
|
-
_colorValue: string;
|
|
26
24
|
};
|
|
27
25
|
};
|
|
28
26
|
}, {
|
|
@@ -33,11 +31,9 @@ declare const areaChartStyle: tailwind_variants.TVReturnType<{
|
|
|
33
31
|
color: {
|
|
34
32
|
primary: {
|
|
35
33
|
color: string[];
|
|
36
|
-
_colorValue: string;
|
|
37
34
|
};
|
|
38
35
|
danger: {
|
|
39
36
|
color: string[];
|
|
40
|
-
_colorValue: string;
|
|
41
37
|
};
|
|
42
38
|
};
|
|
43
39
|
}, {
|
|
@@ -48,11 +44,9 @@ declare const areaChartStyle: tailwind_variants.TVReturnType<{
|
|
|
48
44
|
color: {
|
|
49
45
|
primary: {
|
|
50
46
|
color: string[];
|
|
51
|
-
_colorValue: string;
|
|
52
47
|
};
|
|
53
48
|
danger: {
|
|
54
49
|
color: string[];
|
|
55
|
-
_colorValue: string;
|
|
56
50
|
};
|
|
57
51
|
};
|
|
58
52
|
}, {
|
|
@@ -350,20 +350,46 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
|
350
350
|
// src/components/charts/areaCharts.tsx
|
|
351
351
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
352
352
|
var AreaChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
353
|
-
var _a, _b;
|
|
354
353
|
const [props, variantProps] = mapPropsVariants(originalProps, areaChartStyle.variantKeys);
|
|
355
354
|
const { areaData, color, classNames } = { ...props, ...variantProps };
|
|
356
355
|
const slots = (0, import_react.useMemo)(() => areaChartStyle({ ...variantProps }), [variantProps]);
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
356
|
+
const COLOR_MAP = {
|
|
357
|
+
primary: "#3F9CF2",
|
|
358
|
+
danger: "#FF4684"
|
|
359
|
+
};
|
|
360
|
+
const colorHex = (0, import_react.useMemo)(() => COLOR_MAP[color || "primary"], [color]);
|
|
361
|
+
const [tickPositions, setTickPositions] = (0, import_react.useState)([]);
|
|
362
|
+
const tickRef = (0, import_react.useRef)([]);
|
|
363
|
+
const CustomTick = ({ x, y, payload }) => {
|
|
364
|
+
if (x !== void 0) {
|
|
365
|
+
tickRef.current.push(x);
|
|
364
366
|
}
|
|
365
|
-
return
|
|
366
|
-
|
|
367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
368
|
+
"text",
|
|
369
|
+
{
|
|
370
|
+
x,
|
|
371
|
+
y: y + 14,
|
|
372
|
+
textAnchor: "middle",
|
|
373
|
+
fontSize: 12,
|
|
374
|
+
fontWeight: 700,
|
|
375
|
+
fill: "currentColor",
|
|
376
|
+
className: "text-body-foreground",
|
|
377
|
+
children: payload.value
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
};
|
|
381
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
382
|
+
const raf = requestAnimationFrame(() => {
|
|
383
|
+
const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
|
|
384
|
+
const mids = [];
|
|
385
|
+
for (let i = 0; i < unique.length - 1; i++) {
|
|
386
|
+
mids.push((unique[i] + unique[i + 1]) / 2);
|
|
387
|
+
}
|
|
388
|
+
setTickPositions(mids);
|
|
389
|
+
tickRef.current = [];
|
|
390
|
+
});
|
|
391
|
+
return () => cancelAnimationFrame(raf);
|
|
392
|
+
}, [areaData]);
|
|
367
393
|
const CustomDotWithShadow = (props2) => {
|
|
368
394
|
const { cx, cy, fill, stroke } = props2;
|
|
369
395
|
if (cx === void 0 || cy === void 0) return null;
|
|
@@ -384,7 +410,7 @@ var AreaChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
384
410
|
horizontal: false,
|
|
385
411
|
strokeDasharray: "3 3",
|
|
386
412
|
className: "stroke-neutral-light",
|
|
387
|
-
verticalPoints:
|
|
413
|
+
verticalPoints: tickPositions
|
|
388
414
|
}
|
|
389
415
|
),
|
|
390
416
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -393,25 +419,7 @@ var AreaChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
393
419
|
dataKey: "name",
|
|
394
420
|
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
395
421
|
tickLine: false,
|
|
396
|
-
tick:
|
|
397
|
-
setXTickPositions((prev) => {
|
|
398
|
-
if (!prev.includes(x)) return [...prev, x];
|
|
399
|
-
return prev;
|
|
400
|
-
});
|
|
401
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
402
|
-
"text",
|
|
403
|
-
{
|
|
404
|
-
x,
|
|
405
|
-
y: y + 14,
|
|
406
|
-
textAnchor: "middle",
|
|
407
|
-
fontSize: 12,
|
|
408
|
-
fontWeight: 700,
|
|
409
|
-
fill: "currentColor",
|
|
410
|
-
className: "text-body-foreground",
|
|
411
|
-
children: payload.value
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
},
|
|
422
|
+
tick: CustomTick,
|
|
415
423
|
padding: { left: 35.5, right: 35.5 }
|
|
416
424
|
}
|
|
417
425
|
),
|
|
@@ -456,12 +464,10 @@ var areaChartStyle = tv({
|
|
|
456
464
|
variants: {
|
|
457
465
|
color: {
|
|
458
466
|
primary: {
|
|
459
|
-
color: ["text-primary-main"]
|
|
460
|
-
_colorValue: "#3F9CF2"
|
|
467
|
+
color: ["text-primary-main"]
|
|
461
468
|
},
|
|
462
469
|
danger: {
|
|
463
|
-
color: ["text-danger-main"]
|
|
464
|
-
_colorValue: "#FF4684"
|
|
470
|
+
color: ["text-danger-main"]
|
|
465
471
|
}
|
|
466
472
|
}
|
|
467
473
|
},
|
|
@@ -362,7 +362,7 @@ var CircularProgress = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
362
362
|
const OUTER_RADIUS = 88;
|
|
363
363
|
const INNER_RADIUS = OUTER_RADIUS - BAR_SIZE;
|
|
364
364
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
365
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className:
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
|
|
366
366
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
367
367
|
import_recharts.RadialBarChart,
|
|
368
368
|
{
|
|
@@ -364,7 +364,7 @@ var CircularProgress = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
364
364
|
const OUTER_RADIUS = 88;
|
|
365
365
|
const INNER_RADIUS = OUTER_RADIUS - BAR_SIZE;
|
|
366
366
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
367
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className:
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
|
|
368
368
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
369
369
|
import_recharts.RadialBarChart,
|
|
370
370
|
{
|
|
@@ -447,20 +447,46 @@ var import_react2 = require("react");
|
|
|
447
447
|
var import_recharts2 = require("recharts");
|
|
448
448
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
449
449
|
var AreaChartComponent = (0, import_react2.forwardRef)((originalProps, ref) => {
|
|
450
|
-
var _a, _b;
|
|
451
450
|
const [props, variantProps] = mapPropsVariants(originalProps, areaChartStyle.variantKeys);
|
|
452
451
|
const { areaData, color, classNames } = { ...props, ...variantProps };
|
|
453
452
|
const slots = (0, import_react2.useMemo)(() => areaChartStyle({ ...variantProps }), [variantProps]);
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
453
|
+
const COLOR_MAP = {
|
|
454
|
+
primary: "#3F9CF2",
|
|
455
|
+
danger: "#FF4684"
|
|
456
|
+
};
|
|
457
|
+
const colorHex = (0, import_react2.useMemo)(() => COLOR_MAP[color || "primary"], [color]);
|
|
458
|
+
const [tickPositions, setTickPositions] = (0, import_react2.useState)([]);
|
|
459
|
+
const tickRef = (0, import_react2.useRef)([]);
|
|
460
|
+
const CustomTick = ({ x, y, payload }) => {
|
|
461
|
+
if (x !== void 0) {
|
|
462
|
+
tickRef.current.push(x);
|
|
461
463
|
}
|
|
462
|
-
return
|
|
463
|
-
|
|
464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
465
|
+
"text",
|
|
466
|
+
{
|
|
467
|
+
x,
|
|
468
|
+
y: y + 14,
|
|
469
|
+
textAnchor: "middle",
|
|
470
|
+
fontSize: 12,
|
|
471
|
+
fontWeight: 700,
|
|
472
|
+
fill: "currentColor",
|
|
473
|
+
className: "text-body-foreground",
|
|
474
|
+
children: payload.value
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
};
|
|
478
|
+
(0, import_react2.useLayoutEffect)(() => {
|
|
479
|
+
const raf = requestAnimationFrame(() => {
|
|
480
|
+
const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
|
|
481
|
+
const mids = [];
|
|
482
|
+
for (let i = 0; i < unique.length - 1; i++) {
|
|
483
|
+
mids.push((unique[i] + unique[i + 1]) / 2);
|
|
484
|
+
}
|
|
485
|
+
setTickPositions(mids);
|
|
486
|
+
tickRef.current = [];
|
|
487
|
+
});
|
|
488
|
+
return () => cancelAnimationFrame(raf);
|
|
489
|
+
}, [areaData]);
|
|
464
490
|
const CustomDotWithShadow = (props2) => {
|
|
465
491
|
const { cx, cy, fill, stroke } = props2;
|
|
466
492
|
if (cx === void 0 || cy === void 0) return null;
|
|
@@ -481,7 +507,7 @@ var AreaChartComponent = (0, import_react2.forwardRef)((originalProps, ref) => {
|
|
|
481
507
|
horizontal: false,
|
|
482
508
|
strokeDasharray: "3 3",
|
|
483
509
|
className: "stroke-neutral-light",
|
|
484
|
-
verticalPoints:
|
|
510
|
+
verticalPoints: tickPositions
|
|
485
511
|
}
|
|
486
512
|
),
|
|
487
513
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -490,25 +516,7 @@ var AreaChartComponent = (0, import_react2.forwardRef)((originalProps, ref) => {
|
|
|
490
516
|
dataKey: "name",
|
|
491
517
|
axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
|
|
492
518
|
tickLine: false,
|
|
493
|
-
tick:
|
|
494
|
-
setXTickPositions((prev) => {
|
|
495
|
-
if (!prev.includes(x)) return [...prev, x];
|
|
496
|
-
return prev;
|
|
497
|
-
});
|
|
498
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
499
|
-
"text",
|
|
500
|
-
{
|
|
501
|
-
x,
|
|
502
|
-
y: y + 14,
|
|
503
|
-
textAnchor: "middle",
|
|
504
|
-
fontSize: 12,
|
|
505
|
-
fontWeight: 700,
|
|
506
|
-
fill: "currentColor",
|
|
507
|
-
className: "text-body-foreground",
|
|
508
|
-
children: payload.value
|
|
509
|
-
}
|
|
510
|
-
);
|
|
511
|
-
},
|
|
519
|
+
tick: CustomTick,
|
|
512
520
|
padding: { left: 35.5, right: 35.5 }
|
|
513
521
|
}
|
|
514
522
|
),
|
|
@@ -553,12 +561,10 @@ var areaChartStyle = tv({
|
|
|
553
561
|
variants: {
|
|
554
562
|
color: {
|
|
555
563
|
primary: {
|
|
556
|
-
color: ["text-primary-main"]
|
|
557
|
-
_colorValue: "#3F9CF2"
|
|
564
|
+
color: ["text-primary-main"]
|
|
558
565
|
},
|
|
559
566
|
danger: {
|
|
560
|
-
color: ["text-danger-main"]
|
|
561
|
-
_colorValue: "#FF4684"
|
|
567
|
+
color: ["text-danger-main"]
|
|
562
568
|
}
|
|
563
569
|
}
|
|
564
570
|
},
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import "../../chunk-3YMMVZDL.mjs";
|
|
3
3
|
import {
|
|
4
4
|
areaCharts_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-7Q64PDCF.mjs";
|
|
6
6
|
import {
|
|
7
7
|
circularProgress_default
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-IXHFLCAG.mjs";
|
|
9
9
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
10
10
|
import "../../chunk-E3G5QXSH.mjs";
|
|
11
11
|
import "../../chunk-AC6TWLRT.mjs";
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
dateTimePickerStyle,
|
|
4
4
|
dateTimePicker_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-NHVIKP4H.mjs";
|
|
6
|
+
import "../../chunk-FWJ2ZKH6.mjs";
|
|
6
7
|
import "../../chunk-A7RU3FU5.mjs";
|
|
8
|
+
import "../../chunk-P732YGHO.mjs";
|
|
7
9
|
import "../../chunk-KYJTZPXY.mjs";
|
|
8
10
|
import "../../chunk-7MVEAQ7Z.mjs";
|
|
9
11
|
import "../../chunk-HIVPDIEP.mjs";
|
|
10
12
|
import "../../chunk-RT3S3VVJ.mjs";
|
|
11
|
-
import "../../chunk-FWJ2ZKH6.mjs";
|
|
12
|
-
import "../../chunk-P732YGHO.mjs";
|
|
13
13
|
import "../../chunk-SP3JVQY3.mjs";
|
|
14
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
15
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import "../../chunk-75HLCORR.mjs";
|
|
3
3
|
import {
|
|
4
4
|
dateTimePicker_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-NHVIKP4H.mjs";
|
|
6
|
+
import "../../chunk-FWJ2ZKH6.mjs";
|
|
6
7
|
import "../../chunk-A7RU3FU5.mjs";
|
|
8
|
+
import "../../chunk-P732YGHO.mjs";
|
|
7
9
|
import "../../chunk-KYJTZPXY.mjs";
|
|
8
10
|
import "../../chunk-7MVEAQ7Z.mjs";
|
|
9
11
|
import "../../chunk-HIVPDIEP.mjs";
|
|
10
12
|
import "../../chunk-RT3S3VVJ.mjs";
|
|
11
|
-
import "../../chunk-FWJ2ZKH6.mjs";
|
|
12
|
-
import "../../chunk-P732YGHO.mjs";
|
|
13
13
|
import "../../chunk-SP3JVQY3.mjs";
|
|
14
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
15
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
FileUpload,
|
|
4
4
|
fileUploadStyle,
|
|
5
5
|
fileUpload_default
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-25QOEKXS.mjs";
|
|
7
7
|
import "../../chunk-2GCSFWHD.mjs";
|
|
8
8
|
import "../../chunk-GH6CPGFN.mjs";
|
|
9
9
|
import "../../chunk-MY5U63QO.mjs";
|
|
10
|
-
import "../../chunk-7TAGGLNY.mjs";
|
|
11
|
-
import "../../chunk-WFMFC7R6.mjs";
|
|
12
10
|
import "../../chunk-LPZOH3RP.mjs";
|
|
13
11
|
import "../../chunk-UB4YBFOT.mjs";
|
|
12
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
14
13
|
import "../../chunk-6WSACUIB.mjs";
|
|
15
14
|
import "../../chunk-LXHUO6VM.mjs";
|
|
16
15
|
import "../../chunk-6PNKRBUT.mjs";
|
|
17
16
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
18
17
|
import "../../chunk-2TKEWFGH.mjs";
|
|
18
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
19
19
|
import "../../chunk-2SDYFOZL.mjs";
|
|
20
20
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
21
21
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import "../../chunk-RLXOHILK.mjs";
|
|
3
3
|
import {
|
|
4
4
|
fileUpload_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-25QOEKXS.mjs";
|
|
6
6
|
import "../../chunk-2GCSFWHD.mjs";
|
|
7
7
|
import "../../chunk-GH6CPGFN.mjs";
|
|
8
8
|
import "../../chunk-MY5U63QO.mjs";
|
|
9
|
-
import "../../chunk-7TAGGLNY.mjs";
|
|
10
|
-
import "../../chunk-WFMFC7R6.mjs";
|
|
11
9
|
import "../../chunk-LPZOH3RP.mjs";
|
|
12
10
|
import "../../chunk-UB4YBFOT.mjs";
|
|
11
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
13
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
14
13
|
import "../../chunk-LXHUO6VM.mjs";
|
|
15
14
|
import "../../chunk-6PNKRBUT.mjs";
|
|
16
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
16
|
import "../../chunk-2TKEWFGH.mjs";
|
|
17
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
18
18
|
import "../../chunk-2SDYFOZL.mjs";
|
|
19
19
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
20
20
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -3,18 +3,18 @@ import "../../chunk-DJOG6Z35.mjs";
|
|
|
3
3
|
import {
|
|
4
4
|
modal_default
|
|
5
5
|
} from "../../chunk-IC25OKBJ.mjs";
|
|
6
|
-
import "../../chunk-MY5U63QO.mjs";
|
|
7
|
-
import "../../chunk-7TAGGLNY.mjs";
|
|
8
|
-
import "../../chunk-WFMFC7R6.mjs";
|
|
9
6
|
import "../../chunk-SE5TU755.mjs";
|
|
10
7
|
import "../../chunk-LL6F3WDX.mjs";
|
|
8
|
+
import "../../chunk-MY5U63QO.mjs";
|
|
11
9
|
import "../../chunk-LPZOH3RP.mjs";
|
|
12
10
|
import "../../chunk-UB4YBFOT.mjs";
|
|
11
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
13
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
14
13
|
import "../../chunk-LXHUO6VM.mjs";
|
|
15
14
|
import "../../chunk-6PNKRBUT.mjs";
|
|
16
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
16
|
import "../../chunk-2TKEWFGH.mjs";
|
|
17
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
18
18
|
import "../../chunk-2SDYFOZL.mjs";
|
|
19
19
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
20
20
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
modal_default
|
|
4
4
|
} from "../../chunk-IC25OKBJ.mjs";
|
|
5
|
-
import "../../chunk-MY5U63QO.mjs";
|
|
6
|
-
import "../../chunk-7TAGGLNY.mjs";
|
|
7
|
-
import "../../chunk-WFMFC7R6.mjs";
|
|
8
5
|
import "../../chunk-SE5TU755.mjs";
|
|
9
6
|
import "../../chunk-LL6F3WDX.mjs";
|
|
7
|
+
import "../../chunk-MY5U63QO.mjs";
|
|
10
8
|
import "../../chunk-LPZOH3RP.mjs";
|
|
11
9
|
import "../../chunk-UB4YBFOT.mjs";
|
|
10
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
12
11
|
import "../../chunk-6WSACUIB.mjs";
|
|
13
12
|
import "../../chunk-LXHUO6VM.mjs";
|
|
14
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
15
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
16
15
|
import "../../chunk-2TKEWFGH.mjs";
|
|
16
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
17
17
|
import "../../chunk-2SDYFOZL.mjs";
|
|
18
18
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
19
19
|
import "../../chunk-27Y6K5NK.mjs";
|