@deepnoid/ui 0.1.166 → 0.1.168

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 (43) hide show
  1. package/.turbo/turbo-build.log +198 -193
  2. package/dist/chunk-2LRPY6DW.mjs +192 -0
  3. package/dist/{chunk-W7MZB2KA.mjs → chunk-4XEZQMLU.mjs} +1 -1
  4. package/dist/{chunk-BRVQTI2T.mjs → chunk-5GAHDSWH.mjs} +1 -1
  5. package/dist/{chunk-ARNMOGRH.mjs → chunk-LH6Z7SDZ.mjs} +1 -1
  6. package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
  7. package/dist/components/breadcrumb/index.mjs +2 -2
  8. package/dist/components/button/index.mjs +3 -3
  9. package/dist/components/charts/areaChart.js +1 -1
  10. package/dist/components/charts/areaChart.mjs +1 -1
  11. package/dist/components/charts/barChart.js +1 -1
  12. package/dist/components/charts/barChart.mjs +1 -1
  13. package/dist/components/charts/index.d.mts +1 -0
  14. package/dist/components/charts/index.d.ts +1 -0
  15. package/dist/components/charts/index.js +187 -4
  16. package/dist/components/charts/index.mjs +11 -7
  17. package/dist/components/charts/simpleBarChart.d.mts +40 -0
  18. package/dist/components/charts/simpleBarChart.d.ts +40 -0
  19. package/dist/components/charts/simpleBarChart.js +555 -0
  20. package/dist/components/charts/simpleBarChart.mjs +10 -0
  21. package/dist/components/fileUpload/fileUpload.js +1 -1
  22. package/dist/components/fileUpload/fileUpload.mjs +2 -2
  23. package/dist/components/fileUpload/index.js +1 -1
  24. package/dist/components/fileUpload/index.mjs +2 -2
  25. package/dist/components/modal/index.mjs +1 -1
  26. package/dist/components/modal/modal.mjs +1 -1
  27. package/dist/components/picker/datePicker.mjs +2 -2
  28. package/dist/components/picker/index.mjs +7 -7
  29. package/dist/components/table/index.mjs +3 -3
  30. package/dist/components/table/table-body.mjs +3 -3
  31. package/dist/components/table/table-head.mjs +3 -3
  32. package/dist/components/table/table.mjs +3 -3
  33. package/dist/components/toast/index.mjs +2 -2
  34. package/dist/components/toast/use-toast.mjs +2 -2
  35. package/dist/index.d.mts +1 -0
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +201 -18
  38. package/dist/index.mjs +57 -53
  39. package/package.json +1 -1
  40. package/dist/{chunk-VYNBJBXD.mjs → chunk-3OCNT22V.mjs} +0 -0
  41. package/dist/{chunk-EQLBG32V.mjs → chunk-4OOHXMJH.mjs} +3 -3
  42. package/dist/{chunk-6DOAZ27E.mjs → chunk-7HMERBCT.mjs} +3 -3
  43. package/dist/{chunk-W66K4FK5.mjs → chunk-I3SXSUFN.mjs} +3 -3
@@ -0,0 +1,192 @@
1
+ "use client";
2
+ import {
3
+ mapPropsVariants
4
+ } from "./chunk-E3G5QXSH.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-U4DJHAM5.mjs";
8
+
9
+ // src/components/charts/simpleBarChart.tsx
10
+ import { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
11
+ import { XAxis, YAxis, ResponsiveContainer, CartesianGrid, BarChart, Bar } from "recharts";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ var SimpleBarChartComponent = forwardRef((originalProps, ref) => {
14
+ const [props, variantProps] = mapPropsVariants(originalProps, simpleBarChartStyle.variantKeys);
15
+ const {
16
+ data = [],
17
+ label,
18
+ classNames,
19
+ yAxisTicks = [0, 20, 40, 60, 80, 100],
20
+ yAxisDomain = [0, 100],
21
+ barGap = 20,
22
+ tooltipFormatter
23
+ } = { ...props, ...variantProps };
24
+ const slots = useMemo(() => simpleBarChartStyle({ ...variantProps }), [variantProps]);
25
+ const chartRef = useRef(null);
26
+ const tooltipRef = useRef(null);
27
+ const [tooltipLeft, setTooltipLeft] = useState(0);
28
+ const [tickPositions, setTickPositions] = useState([]);
29
+ const tickRef = useRef([]);
30
+ const [tooltipState, setTooltipState] = useState(null);
31
+ const handleMouseEnter = (e) => {
32
+ if (!tooltipFormatter || !chartRef.current) return;
33
+ const { payload, x, y } = e;
34
+ if (!payload) return;
35
+ setTooltipState({
36
+ x,
37
+ y,
38
+ value: payload.value,
39
+ label: payload.title
40
+ });
41
+ };
42
+ const handleMouseLeave = () => {
43
+ setTooltipState(null);
44
+ };
45
+ const CustomBarShape = ({ x, y, width, height, fill }) => {
46
+ const radius = 4;
47
+ const extraHeight = 10;
48
+ const adjustedHeight = height + extraHeight;
49
+ const adjustedY = y - extraHeight;
50
+ const bottomY = adjustedY + adjustedHeight;
51
+ return height > 0 ? /* @__PURE__ */ jsx(
52
+ "path",
53
+ {
54
+ d: `M${x},${bottomY} L${x},${adjustedY + radius} Q${x},${adjustedY} ${x + radius},${adjustedY} L${x + width - radius},${adjustedY} Q${x + width},${adjustedY} ${x + width},${adjustedY + radius} L${x + width},${bottomY} Z`,
55
+ fill
56
+ }
57
+ ) : /* @__PURE__ */ jsx("rect", { x, y, width, height: 0, fill });
58
+ };
59
+ const CustomTick = ({ x, y, payload }) => {
60
+ if (x !== void 0) tickRef.current.push(x);
61
+ return /* @__PURE__ */ jsx(
62
+ "text",
63
+ {
64
+ x,
65
+ y: y + 14,
66
+ textAnchor: "middle",
67
+ fontSize: 12,
68
+ fontWeight: 700,
69
+ fill: "currentColor",
70
+ className: "text-body-foreground",
71
+ children: payload.value
72
+ }
73
+ );
74
+ };
75
+ useEffect(() => {
76
+ const raf = requestAnimationFrame(() => {
77
+ const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
78
+ const mids = [];
79
+ for (let i = 0; i < unique.length - 1; i++) {
80
+ mids.push((unique[i] + unique[i + 1]) / 2);
81
+ }
82
+ setTickPositions(mids);
83
+ tickRef.current = [];
84
+ });
85
+ return () => cancelAnimationFrame(raf);
86
+ }, [data]);
87
+ useLayoutEffect(() => {
88
+ if (!tooltipState || !chartRef.current || !tooltipRef.current) return;
89
+ const chartRect = chartRef.current.getBoundingClientRect();
90
+ const tooltipRect = tooltipRef.current.getBoundingClientRect();
91
+ const chartWidth = chartRect.width;
92
+ const tooltipWidth = tooltipRect.width;
93
+ let left = tooltipState.x - tooltipWidth / 2;
94
+ const padding = 8;
95
+ if (left < padding) {
96
+ left = padding;
97
+ } else if (left + tooltipWidth > chartWidth - padding) {
98
+ left = chartWidth - tooltipWidth - padding;
99
+ }
100
+ setTooltipLeft(left);
101
+ }, [tooltipState]);
102
+ return /* @__PURE__ */ jsxs("div", { ref: chartRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: [
103
+ label && /* @__PURE__ */ jsx("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
104
+ /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ jsxs(
105
+ BarChart,
106
+ {
107
+ data,
108
+ margin: { left: 0, right: 0, top: 0, bottom: 0 },
109
+ barSize: 10,
110
+ barGap,
111
+ className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
112
+ children: [
113
+ /* @__PURE__ */ jsx(
114
+ CartesianGrid,
115
+ {
116
+ vertical: true,
117
+ horizontal: false,
118
+ strokeDasharray: "4 4",
119
+ className: "stroke-neutral-light",
120
+ verticalPoints: tickPositions
121
+ }
122
+ ),
123
+ /* @__PURE__ */ jsx(
124
+ CartesianGrid,
125
+ {
126
+ vertical: true,
127
+ horizontal: false,
128
+ strokeDasharray: "0",
129
+ strokeWidth: 2,
130
+ className: "stroke-neutral-light",
131
+ verticalPoints: [0]
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx(
135
+ XAxis,
136
+ {
137
+ dataKey: "title",
138
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
139
+ tickLine: false,
140
+ tick: CustomTick,
141
+ padding: { left: 0, right: 0 }
142
+ }
143
+ ),
144
+ /* @__PURE__ */ jsx(YAxis, { hide: true, ticks: yAxisTicks, domain: yAxisDomain }),
145
+ /* @__PURE__ */ jsx(
146
+ Bar,
147
+ {
148
+ dataKey: "value",
149
+ fill: "#C7E5FA",
150
+ shape: CustomBarShape,
151
+ onMouseEnter: handleMouseEnter,
152
+ onMouseLeave: handleMouseLeave
153
+ }
154
+ )
155
+ ]
156
+ }
157
+ ) }),
158
+ tooltipFormatter && /* @__PURE__ */ jsx(
159
+ "div",
160
+ {
161
+ ref: tooltipRef,
162
+ style: {
163
+ position: "absolute",
164
+ left: tooltipLeft + 10,
165
+ top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y - 30 : 0,
166
+ pointerEvents: "none",
167
+ zIndex: 10,
168
+ opacity: tooltipState ? 1 : 0,
169
+ transition: "opacity 0.1s ease-out",
170
+ visibility: tooltipState ? "visible" : "hidden",
171
+ width: "fit-content",
172
+ whiteSpace: "nowrap"
173
+ },
174
+ children: tooltipState && tooltipFormatter(tooltipState)
175
+ }
176
+ )
177
+ ] });
178
+ });
179
+ SimpleBarChartComponent.displayName = "simpleBarChart";
180
+ var simpleBarChart_default = SimpleBarChartComponent;
181
+ var simpleBarChartStyle = tv({
182
+ slots: {
183
+ base: ["flex", "flex-col", "gap-[10px]", "select-none", "relative", "w-full"],
184
+ label: ["text-md", "font-bold", "text-common-black"]
185
+ },
186
+ variants: {},
187
+ defaultVariants: {}
188
+ });
189
+
190
+ export {
191
+ simpleBarChart_default
192
+ };
@@ -120,7 +120,7 @@ function FileUpload({
120
120
  full: true,
121
121
  placeholder,
122
122
  value: displayFileName,
123
- errorMessage: message
123
+ errorMessage: message && (message == null ? void 0 : message.length) > 0 ? message : void 0
124
124
  }
125
125
  ),
126
126
  shouldShowCloseButton && /* @__PURE__ */ jsx(
@@ -145,7 +145,7 @@ var BarChartComponent = forwardRef((originalProps, ref) => {
145
145
  {
146
146
  vertical: true,
147
147
  horizontal: false,
148
- strokeDasharray: "3 3",
148
+ strokeDasharray: "4 4",
149
149
  className: "stroke-neutral-light",
150
150
  verticalPoints: tickPositions
151
151
  }
@@ -115,7 +115,7 @@ var AreaChartComponent = forwardRef((originalProps, ref) => {
115
115
  {
116
116
  vertical: true,
117
117
  horizontal: false,
118
- strokeDasharray: "3 3",
118
+ strokeDasharray: "4 4",
119
119
  className: "stroke-neutral-light",
120
120
  verticalPoints: tickPositions
121
121
  }
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  breadcrumb_default
4
- } from "../../chunk-6DOAZ27E.mjs";
4
+ } from "../../chunk-7HMERBCT.mjs";
5
5
  import "../../chunk-MY5U63QO.mjs";
6
- import "../../chunk-4LUASWAN.mjs";
7
6
  import "../../chunk-5VTYO3RF.mjs";
8
7
  import "../../chunk-DO56H4BN.mjs";
9
8
  import "../../chunk-AKAGWXXP.mjs";
@@ -12,6 +11,7 @@ import "../../chunk-LXHUO6VM.mjs";
12
11
  import "../../chunk-SZL743JC.mjs";
13
12
  import "../../chunk-ZYIIXWVY.mjs";
14
13
  import "../../chunk-R7KUEH3N.mjs";
14
+ import "../../chunk-4LUASWAN.mjs";
15
15
  import "../../chunk-E3G5QXSH.mjs";
16
16
  import "../../chunk-DDFJMHBC.mjs";
17
17
  import "../../chunk-U4DJHAM5.mjs";
@@ -2,9 +2,8 @@
2
2
  import "../../chunk-KYIODWXL.mjs";
3
3
  import {
4
4
  breadcrumb_default
5
- } from "../../chunk-6DOAZ27E.mjs";
5
+ } from "../../chunk-7HMERBCT.mjs";
6
6
  import "../../chunk-MY5U63QO.mjs";
7
- import "../../chunk-4LUASWAN.mjs";
8
7
  import "../../chunk-5VTYO3RF.mjs";
9
8
  import "../../chunk-DO56H4BN.mjs";
10
9
  import "../../chunk-AKAGWXXP.mjs";
@@ -13,6 +12,7 @@ import "../../chunk-LXHUO6VM.mjs";
13
12
  import "../../chunk-SZL743JC.mjs";
14
13
  import "../../chunk-ZYIIXWVY.mjs";
15
14
  import "../../chunk-R7KUEH3N.mjs";
15
+ import "../../chunk-4LUASWAN.mjs";
16
16
  import "../../chunk-E3G5QXSH.mjs";
17
17
  import "../../chunk-DDFJMHBC.mjs";
18
18
  import "../../chunk-U4DJHAM5.mjs";
@@ -1,8 +1,5 @@
1
1
  "use client";
2
2
  import "../../chunk-MY5U63QO.mjs";
3
- import {
4
- text_button_default
5
- } from "../../chunk-4LUASWAN.mjs";
6
3
  import {
7
4
  button_group_default
8
5
  } from "../../chunk-5VTYO3RF.mjs";
@@ -17,6 +14,9 @@ import "../../chunk-LXHUO6VM.mjs";
17
14
  import "../../chunk-SZL743JC.mjs";
18
15
  import "../../chunk-ZYIIXWVY.mjs";
19
16
  import "../../chunk-R7KUEH3N.mjs";
17
+ import {
18
+ text_button_default
19
+ } from "../../chunk-4LUASWAN.mjs";
20
20
  import "../../chunk-E3G5QXSH.mjs";
21
21
  import "../../chunk-DDFJMHBC.mjs";
22
22
  import "../../chunk-U4DJHAM5.mjs";
@@ -558,7 +558,7 @@ var AreaChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
558
558
  {
559
559
  vertical: true,
560
560
  horizontal: false,
561
- strokeDasharray: "3 3",
561
+ strokeDasharray: "4 4",
562
562
  className: "stroke-neutral-light",
563
563
  verticalPoints: tickPositions
564
564
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  areaChart_default
4
- } from "../../chunk-ARNMOGRH.mjs";
4
+ } from "../../chunk-LH6Z7SDZ.mjs";
5
5
  import "../../chunk-DQRAFUDA.mjs";
6
6
  import "../../chunk-EWS3FESG.mjs";
7
7
  import "../../chunk-E3G5QXSH.mjs";
@@ -513,7 +513,7 @@ var BarChartComponent = (0, import_react.forwardRef)((originalProps, ref) => {
513
513
  {
514
514
  vertical: true,
515
515
  horizontal: false,
516
- strokeDasharray: "3 3",
516
+ strokeDasharray: "4 4",
517
517
  className: "stroke-neutral-light",
518
518
  verticalPoints: tickPositions
519
519
  }
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BarChartTooltip,
4
4
  barChart_default
5
- } from "../../chunk-BRVQTI2T.mjs";
5
+ } from "../../chunk-5GAHDSWH.mjs";
6
6
  import "../../chunk-E3G5QXSH.mjs";
7
7
  import "../../chunk-U4DJHAM5.mjs";
8
8
  import "../../chunk-AC6TWLRT.mjs";
@@ -2,6 +2,7 @@ export { default as CircularProgress } from './circularProgress.mjs';
2
2
  export { default as AreaChart } from './areaChart.mjs';
3
3
  export { default as BarChart, BarChartTooltip } from './barChart.mjs';
4
4
  export { default as RadarChart } from './radarChart.mjs';
5
+ export { default as SimpleBarChart } from './simpleBarChart.mjs';
5
6
  import 'tailwind-variants';
6
7
  import 'react';
7
8
  import '../../utils/types.mjs';
@@ -2,6 +2,7 @@ export { default as CircularProgress } from './circularProgress.js';
2
2
  export { default as AreaChart } from './areaChart.js';
3
3
  export { default as BarChart, BarChartTooltip } from './barChart.js';
4
4
  export { default as RadarChart } from './radarChart.js';
5
+ export { default as SimpleBarChart } from './simpleBarChart.js';
5
6
  import 'tailwind-variants';
6
7
  import 'react';
7
8
  import '../../utils/types.js';
@@ -106,7 +106,8 @@ __export(charts_exports, {
106
106
  BarChart: () => barChart_default,
107
107
  BarChartTooltip: () => BarChartTooltip,
108
108
  CircularProgress: () => circularProgress_default,
109
- RadarChart: () => radarChart_default
109
+ RadarChart: () => radarChart_default,
110
+ SimpleBarChart: () => simpleBarChart_default
110
111
  });
111
112
  module.exports = __toCommonJS(charts_exports);
112
113
 
@@ -715,7 +716,7 @@ var AreaChartComponent = (0, import_react2.forwardRef)((originalProps, ref) => {
715
716
  {
716
717
  vertical: true,
717
718
  horizontal: false,
718
- strokeDasharray: "3 3",
719
+ strokeDasharray: "4 4",
719
720
  className: "stroke-neutral-light",
720
721
  verticalPoints: tickPositions
721
722
  }
@@ -932,7 +933,7 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
932
933
  {
933
934
  vertical: true,
934
935
  horizontal: false,
935
- strokeDasharray: "3 3",
936
+ strokeDasharray: "4 4",
936
937
  className: "stroke-neutral-light",
937
938
  verticalPoints: tickPositions
938
939
  }
@@ -1128,11 +1129,193 @@ var radarChartStyle = tv({
1128
1129
  color: "primary"
1129
1130
  }
1130
1131
  });
1132
+
1133
+ // src/components/charts/simpleBarChart.tsx
1134
+ var import_react5 = require("react");
1135
+ var import_recharts5 = require("recharts");
1136
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1137
+ var SimpleBarChartComponent = (0, import_react5.forwardRef)((originalProps, ref) => {
1138
+ const [props, variantProps] = mapPropsVariants(originalProps, simpleBarChartStyle.variantKeys);
1139
+ const {
1140
+ data = [],
1141
+ label,
1142
+ classNames,
1143
+ yAxisTicks = [0, 20, 40, 60, 80, 100],
1144
+ yAxisDomain = [0, 100],
1145
+ barGap = 20,
1146
+ tooltipFormatter
1147
+ } = { ...props, ...variantProps };
1148
+ const slots = (0, import_react5.useMemo)(() => simpleBarChartStyle({ ...variantProps }), [variantProps]);
1149
+ const chartRef = (0, import_react5.useRef)(null);
1150
+ const tooltipRef = (0, import_react5.useRef)(null);
1151
+ const [tooltipLeft, setTooltipLeft] = (0, import_react5.useState)(0);
1152
+ const [tickPositions, setTickPositions] = (0, import_react5.useState)([]);
1153
+ const tickRef = (0, import_react5.useRef)([]);
1154
+ const [tooltipState, setTooltipState] = (0, import_react5.useState)(null);
1155
+ const handleMouseEnter = (e) => {
1156
+ if (!tooltipFormatter || !chartRef.current) return;
1157
+ const { payload, x, y } = e;
1158
+ if (!payload) return;
1159
+ setTooltipState({
1160
+ x,
1161
+ y,
1162
+ value: payload.value,
1163
+ label: payload.title
1164
+ });
1165
+ };
1166
+ const handleMouseLeave = () => {
1167
+ setTooltipState(null);
1168
+ };
1169
+ const CustomBarShape = ({ x, y, width, height, fill }) => {
1170
+ const radius = 4;
1171
+ const extraHeight = 10;
1172
+ const adjustedHeight = height + extraHeight;
1173
+ const adjustedY = y - extraHeight;
1174
+ const bottomY = adjustedY + adjustedHeight;
1175
+ return height > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1176
+ "path",
1177
+ {
1178
+ d: `M${x},${bottomY} L${x},${adjustedY + radius} Q${x},${adjustedY} ${x + radius},${adjustedY} L${x + width - radius},${adjustedY} Q${x + width},${adjustedY} ${x + width},${adjustedY + radius} L${x + width},${bottomY} Z`,
1179
+ fill
1180
+ }
1181
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x, y, width, height: 0, fill });
1182
+ };
1183
+ const CustomTick = ({ x, y, payload }) => {
1184
+ if (x !== void 0) tickRef.current.push(x);
1185
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1186
+ "text",
1187
+ {
1188
+ x,
1189
+ y: y + 14,
1190
+ textAnchor: "middle",
1191
+ fontSize: 12,
1192
+ fontWeight: 700,
1193
+ fill: "currentColor",
1194
+ className: "text-body-foreground",
1195
+ children: payload.value
1196
+ }
1197
+ );
1198
+ };
1199
+ (0, import_react5.useEffect)(() => {
1200
+ const raf = requestAnimationFrame(() => {
1201
+ const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
1202
+ const mids = [];
1203
+ for (let i = 0; i < unique.length - 1; i++) {
1204
+ mids.push((unique[i] + unique[i + 1]) / 2);
1205
+ }
1206
+ setTickPositions(mids);
1207
+ tickRef.current = [];
1208
+ });
1209
+ return () => cancelAnimationFrame(raf);
1210
+ }, [data]);
1211
+ (0, import_react5.useLayoutEffect)(() => {
1212
+ if (!tooltipState || !chartRef.current || !tooltipRef.current) return;
1213
+ const chartRect = chartRef.current.getBoundingClientRect();
1214
+ const tooltipRect = tooltipRef.current.getBoundingClientRect();
1215
+ const chartWidth = chartRect.width;
1216
+ const tooltipWidth = tooltipRect.width;
1217
+ let left = tooltipState.x - tooltipWidth / 2;
1218
+ const padding2 = 8;
1219
+ if (left < padding2) {
1220
+ left = padding2;
1221
+ } else if (left + tooltipWidth > chartWidth - padding2) {
1222
+ left = chartWidth - tooltipWidth - padding2;
1223
+ }
1224
+ setTooltipLeft(left);
1225
+ }, [tooltipState]);
1226
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref: chartRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: [
1227
+ label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
1228
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_recharts5.ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1229
+ import_recharts5.BarChart,
1230
+ {
1231
+ data,
1232
+ margin: { left: 0, right: 0, top: 0, bottom: 0 },
1233
+ barSize: 10,
1234
+ barGap,
1235
+ className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
1236
+ children: [
1237
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1238
+ import_recharts5.CartesianGrid,
1239
+ {
1240
+ vertical: true,
1241
+ horizontal: false,
1242
+ strokeDasharray: "4 4",
1243
+ className: "stroke-neutral-light",
1244
+ verticalPoints: tickPositions
1245
+ }
1246
+ ),
1247
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1248
+ import_recharts5.CartesianGrid,
1249
+ {
1250
+ vertical: true,
1251
+ horizontal: false,
1252
+ strokeDasharray: "0",
1253
+ strokeWidth: 2,
1254
+ className: "stroke-neutral-light",
1255
+ verticalPoints: [0]
1256
+ }
1257
+ ),
1258
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1259
+ import_recharts5.XAxis,
1260
+ {
1261
+ dataKey: "title",
1262
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
1263
+ tickLine: false,
1264
+ tick: CustomTick,
1265
+ padding: { left: 0, right: 0 }
1266
+ }
1267
+ ),
1268
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_recharts5.YAxis, { hide: true, ticks: yAxisTicks, domain: yAxisDomain }),
1269
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1270
+ import_recharts5.Bar,
1271
+ {
1272
+ dataKey: "value",
1273
+ fill: "#C7E5FA",
1274
+ shape: CustomBarShape,
1275
+ onMouseEnter: handleMouseEnter,
1276
+ onMouseLeave: handleMouseLeave
1277
+ }
1278
+ )
1279
+ ]
1280
+ }
1281
+ ) }),
1282
+ tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1283
+ "div",
1284
+ {
1285
+ ref: tooltipRef,
1286
+ style: {
1287
+ position: "absolute",
1288
+ left: tooltipLeft + 10,
1289
+ top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y - 30 : 0,
1290
+ pointerEvents: "none",
1291
+ zIndex: 10,
1292
+ opacity: tooltipState ? 1 : 0,
1293
+ transition: "opacity 0.1s ease-out",
1294
+ visibility: tooltipState ? "visible" : "hidden",
1295
+ width: "fit-content",
1296
+ whiteSpace: "nowrap"
1297
+ },
1298
+ children: tooltipState && tooltipFormatter(tooltipState)
1299
+ }
1300
+ )
1301
+ ] });
1302
+ });
1303
+ SimpleBarChartComponent.displayName = "simpleBarChart";
1304
+ var simpleBarChart_default = SimpleBarChartComponent;
1305
+ var simpleBarChartStyle = tv({
1306
+ slots: {
1307
+ base: ["flex", "flex-col", "gap-[10px]", "select-none", "relative", "w-full"],
1308
+ label: ["text-md", "font-bold", "text-common-black"]
1309
+ },
1310
+ variants: {},
1311
+ defaultVariants: {}
1312
+ });
1131
1313
  // Annotate the CommonJS export names for ESM import in node:
1132
1314
  0 && (module.exports = {
1133
1315
  AreaChart,
1134
1316
  BarChart,
1135
1317
  BarChartTooltip,
1136
1318
  CircularProgress,
1137
- RadarChart
1319
+ RadarChart,
1320
+ SimpleBarChart
1138
1321
  });
@@ -1,20 +1,23 @@
1
1
  "use client";
2
- import "../../chunk-VYNBJBXD.mjs";
2
+ import "../../chunk-3OCNT22V.mjs";
3
+ import {
4
+ radarChart_default
5
+ } from "../../chunk-U7SYKG2C.mjs";
6
+ import {
7
+ simpleBarChart_default
8
+ } from "../../chunk-2LRPY6DW.mjs";
3
9
  import {
4
10
  areaChart_default
5
- } from "../../chunk-ARNMOGRH.mjs";
11
+ } from "../../chunk-LH6Z7SDZ.mjs";
6
12
  import "../../chunk-DQRAFUDA.mjs";
7
13
  import "../../chunk-EWS3FESG.mjs";
8
14
  import {
9
15
  BarChartTooltip,
10
16
  barChart_default
11
- } from "../../chunk-BRVQTI2T.mjs";
17
+ } from "../../chunk-5GAHDSWH.mjs";
12
18
  import {
13
19
  circularProgress_default
14
20
  } from "../../chunk-WA7CSZQ3.mjs";
15
- import {
16
- radarChart_default
17
- } from "../../chunk-U7SYKG2C.mjs";
18
21
  import "../../chunk-E3G5QXSH.mjs";
19
22
  import "../../chunk-U4DJHAM5.mjs";
20
23
  import "../../chunk-27Y6K5NK.mjs";
@@ -24,5 +27,6 @@ export {
24
27
  barChart_default as BarChart,
25
28
  BarChartTooltip,
26
29
  circularProgress_default as CircularProgress,
27
- radarChart_default as RadarChart
30
+ radarChart_default as RadarChart,
31
+ simpleBarChart_default as SimpleBarChart
28
32
  };
@@ -0,0 +1,40 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as react from 'react';
4
+ import { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.mjs';
6
+
7
+ type SimpleBarData = {
8
+ title: string;
9
+ value: number;
10
+ };
11
+ type TooltipFormatterParams = {
12
+ value: number;
13
+ label: string;
14
+ };
15
+ type Props = {
16
+ data?: SimpleBarData[];
17
+ label?: string;
18
+ classNames?: SlotsToClasses<simpleBarChartSlots>;
19
+ yAxisTicks?: number[];
20
+ yAxisDomain?: [number, number];
21
+ barGap?: number;
22
+ tooltipFormatter?: (params: TooltipFormatterParams) => ReactNode;
23
+ };
24
+ type simpleBarChartProps = Props & simpleBarChartVariantProps;
25
+ declare const SimpleBarChartComponent: react.ForwardRefExoticComponent<Props & simpleBarChartVariantProps & react.RefAttributes<HTMLDivElement>>;
26
+
27
+ declare const simpleBarChartStyle: tailwind_variants.TVReturnType<{}, {
28
+ base: string[];
29
+ label: string[];
30
+ }, undefined, {}, {
31
+ base: string[];
32
+ label: string[];
33
+ }, tailwind_variants.TVReturnType<{}, {
34
+ base: string[];
35
+ label: string[];
36
+ }, undefined, unknown, unknown, undefined>>;
37
+ type simpleBarChartVariantProps = VariantProps<typeof simpleBarChartStyle>;
38
+ type simpleBarChartSlots = keyof ReturnType<typeof simpleBarChartStyle>;
39
+
40
+ export { SimpleBarChartComponent as default, type simpleBarChartProps };
@@ -0,0 +1,40 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as react from 'react';
4
+ import { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.js';
6
+
7
+ type SimpleBarData = {
8
+ title: string;
9
+ value: number;
10
+ };
11
+ type TooltipFormatterParams = {
12
+ value: number;
13
+ label: string;
14
+ };
15
+ type Props = {
16
+ data?: SimpleBarData[];
17
+ label?: string;
18
+ classNames?: SlotsToClasses<simpleBarChartSlots>;
19
+ yAxisTicks?: number[];
20
+ yAxisDomain?: [number, number];
21
+ barGap?: number;
22
+ tooltipFormatter?: (params: TooltipFormatterParams) => ReactNode;
23
+ };
24
+ type simpleBarChartProps = Props & simpleBarChartVariantProps;
25
+ declare const SimpleBarChartComponent: react.ForwardRefExoticComponent<Props & simpleBarChartVariantProps & react.RefAttributes<HTMLDivElement>>;
26
+
27
+ declare const simpleBarChartStyle: tailwind_variants.TVReturnType<{}, {
28
+ base: string[];
29
+ label: string[];
30
+ }, undefined, {}, {
31
+ base: string[];
32
+ label: string[];
33
+ }, tailwind_variants.TVReturnType<{}, {
34
+ base: string[];
35
+ label: string[];
36
+ }, undefined, unknown, unknown, undefined>>;
37
+ type simpleBarChartVariantProps = VariantProps<typeof simpleBarChartStyle>;
38
+ type simpleBarChartSlots = keyof ReturnType<typeof simpleBarChartStyle>;
39
+
40
+ export { SimpleBarChartComponent as default, type simpleBarChartProps };