@deepnoid/ui 0.1.122 → 0.1.124

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 (108) hide show
  1. package/.turbo/turbo-build.log +168 -168
  2. package/dist/{chunk-5MINOKNM.mjs → chunk-2GFE25AI.mjs} +1 -1
  3. package/dist/{chunk-4DESGO3D.mjs → chunk-2TDHQLVV.mjs} +1 -1
  4. package/dist/{chunk-XOUAUSP4.mjs → chunk-3HY74IGR.mjs} +1 -1
  5. package/dist/{chunk-H6JGLPPF.mjs → chunk-3U5NJTRH.mjs} +1 -1
  6. package/dist/{chunk-27K5BTEL.mjs → chunk-3ZF7LQOM.mjs} +5 -5
  7. package/dist/{chunk-S7Y7XUBL.mjs → chunk-5XV45JBV.mjs} +1 -1
  8. package/dist/{chunk-VB5NKWJG.mjs → chunk-5XW5QDIW.mjs} +1 -1
  9. package/dist/{chunk-6JLHCQH7.mjs → chunk-6UKNZTOL.mjs} +1 -1
  10. package/dist/{chunk-CDXBML6O.mjs → chunk-76QIZILI.mjs} +6 -3
  11. package/dist/{chunk-NBJHZ4X2.mjs → chunk-BBRPAQON.mjs} +1 -1
  12. package/dist/{chunk-RVFSQFWS.mjs → chunk-C5IJSWWJ.mjs} +4 -4
  13. package/dist/{chunk-I3ADJOUT.mjs → chunk-CVXLLXLE.mjs} +1 -1
  14. package/dist/{chunk-LOYDOCOR.mjs → chunk-F4ORNNYB.mjs} +2 -2
  15. package/dist/{chunk-ITWKPTSD.mjs → chunk-GUTGDPXH.mjs} +1 -1
  16. package/dist/{chunk-3F6OF2QS.mjs → chunk-HKONMHXA.mjs} +1 -1
  17. package/dist/{chunk-WB7Z54CF.mjs → chunk-HO533YTO.mjs} +10 -10
  18. package/dist/chunk-IHLCZM5T.mjs +198 -0
  19. package/dist/{chunk-AF4I7ZQS.mjs → chunk-IW2MDZBW.mjs} +1 -1
  20. package/dist/{chunk-FF56E2UQ.mjs → chunk-J7IIHQNA.mjs} +1 -1
  21. package/dist/{chunk-DD6HAIW3.mjs → chunk-KJ7L6CO6.mjs} +1 -1
  22. package/dist/{chunk-HX64P3XQ.mjs → chunk-KRGI6HW7.mjs} +2 -2
  23. package/dist/{chunk-GZEAMYAO.mjs → chunk-LX7NPKFE.mjs} +1 -1
  24. package/dist/{chunk-2CLPU5LR.mjs → chunk-MCBAEW2Q.mjs} +1 -1
  25. package/dist/{chunk-UA24L44Z.mjs → chunk-OEFILEL3.mjs} +25 -7
  26. package/dist/{chunk-VOKDAIUY.mjs → chunk-OL22LVBG.mjs} +1 -1
  27. package/dist/{chunk-3IILPVRA.mjs → chunk-P3PXIJTU.mjs} +1 -1
  28. package/dist/{chunk-E2LGBO2H.mjs → chunk-QXYGQPY3.mjs} +2 -2
  29. package/dist/{chunk-Q364C3FI.mjs → chunk-SDUDU3CU.mjs} +1 -1
  30. package/dist/{chunk-D6MHTE5L.mjs → chunk-SJNXRXV5.mjs} +1 -1
  31. package/dist/{chunk-DLNGJVFS.mjs → chunk-TSBG5FXL.mjs} +1 -1
  32. package/dist/{chunk-OGJONB7G.mjs → chunk-WNNOVISA.mjs} +1 -1
  33. package/dist/{chunk-AT6GNVOQ.mjs → chunk-WOGNHRNX.mjs} +1 -1
  34. package/dist/{chunk-2IOTRPCS.mjs → chunk-WUGITHV6.mjs} +4 -4
  35. package/dist/{chunk-EKLA6ZR4.mjs → chunk-XL3K55LE.mjs} +1 -1
  36. package/dist/{chunk-VEBJS4SC.mjs → chunk-Y3CGQN3I.mjs} +3 -3
  37. package/dist/{chunk-YBVJFHH6.mjs → chunk-YGOX6FBU.mjs} +1 -1
  38. package/dist/components/accordion/accordion.mjs +2 -2
  39. package/dist/components/accordion/accordionItem.mjs +2 -2
  40. package/dist/components/accordion/index.mjs +3 -3
  41. package/dist/components/avatar/avatar.mjs +2 -2
  42. package/dist/components/avatar/index.mjs +2 -2
  43. package/dist/components/backdrop/backdrop.mjs +2 -2
  44. package/dist/components/backdrop/index.mjs +2 -2
  45. package/dist/components/breadcrumb/breadcrumb.mjs +6 -6
  46. package/dist/components/breadcrumb/index.mjs +6 -6
  47. package/dist/components/button/button-group.mjs +2 -2
  48. package/dist/components/button/button.mjs +2 -2
  49. package/dist/components/button/icon-button.mjs +2 -2
  50. package/dist/components/button/index.mjs +7 -7
  51. package/dist/components/button/text-button.mjs +2 -2
  52. package/dist/components/charts/areaChart.d.mts +5 -0
  53. package/dist/components/charts/areaChart.d.ts +5 -0
  54. package/dist/components/charts/areaChart.js +191 -73
  55. package/dist/components/charts/areaChart.mjs +5 -2
  56. package/dist/components/charts/barChart.mjs +2 -2
  57. package/dist/components/charts/circularProgress.mjs +2 -2
  58. package/dist/components/charts/index.js +247 -109
  59. package/dist/components/charts/index.mjs +10 -7
  60. package/dist/components/charts/radarChart.js +24 -6
  61. package/dist/components/charts/radarChart.mjs +2 -2
  62. package/dist/components/checkbox/checkbox.mjs +2 -2
  63. package/dist/components/checkbox/index.mjs +2 -2
  64. package/dist/components/chip/chip.mjs +2 -2
  65. package/dist/components/chip/index.mjs +2 -2
  66. package/dist/components/drawer/drawer.mjs +2 -2
  67. package/dist/components/drawer/index.mjs +2 -2
  68. package/dist/components/fileUpload/fileUpload.mjs +8 -8
  69. package/dist/components/fileUpload/index.mjs +8 -8
  70. package/dist/components/input/index.mjs +2 -2
  71. package/dist/components/input/input.mjs +2 -2
  72. package/dist/components/list/index.mjs +4 -4
  73. package/dist/components/list/list.mjs +2 -2
  74. package/dist/components/list/listItem.mjs +3 -3
  75. package/dist/components/modal/index.mjs +7 -7
  76. package/dist/components/modal/modal.mjs +7 -7
  77. package/dist/components/pagination/index.mjs +3 -3
  78. package/dist/components/pagination/pagination.mjs +3 -3
  79. package/dist/components/picker/datePicker.mjs +8 -8
  80. package/dist/components/picker/day.mjs +2 -2
  81. package/dist/components/picker/index.mjs +11 -11
  82. package/dist/components/picker/timePicker.mjs +3 -3
  83. package/dist/components/progress/index.mjs +2 -2
  84. package/dist/components/progress/progress.mjs +2 -2
  85. package/dist/components/radio/index.mjs +2 -2
  86. package/dist/components/radio/radio.mjs +2 -2
  87. package/dist/components/select/index.mjs +2 -2
  88. package/dist/components/select/select.mjs +2 -2
  89. package/dist/components/table/definition-table.mjs +2 -2
  90. package/dist/components/table/form-table.mjs +1 -1
  91. package/dist/components/table/index.mjs +10 -10
  92. package/dist/components/table/table-body.mjs +7 -7
  93. package/dist/components/table/table-head.mjs +7 -7
  94. package/dist/components/table/table.mjs +7 -7
  95. package/dist/components/tabs/index.mjs +2 -2
  96. package/dist/components/tabs/tabs.mjs +2 -2
  97. package/dist/components/toast/index.mjs +3 -3
  98. package/dist/components/toast/toast.mjs +2 -2
  99. package/dist/components/toast/use-toast.mjs +3 -3
  100. package/dist/components/tooltip/index.mjs +2 -2
  101. package/dist/components/tooltip/tooltip.mjs +2 -2
  102. package/dist/components/tree/index.mjs +2 -2
  103. package/dist/components/tree/tree.mjs +2 -2
  104. package/dist/index.js +136 -75
  105. package/dist/index.mjs +63 -63
  106. package/dist/utils/tailwind-variants.mjs +1 -1
  107. package/package.json +1 -1
  108. package/dist/chunk-QKRCC26D.mjs +0 -155
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  circularProgress_default
4
- } from "../../chunk-VB5NKWJG.mjs";
4
+ } from "../../chunk-5XW5QDIW.mjs";
5
5
  import "../../chunk-E3G5QXSH.mjs";
6
- import "../../chunk-CDXBML6O.mjs";
6
+ import "../../chunk-76QIZILI.mjs";
7
7
  import "../../chunk-AC6TWLRT.mjs";
8
8
  export {
9
9
  circularProgress_default as default
@@ -495,28 +495,132 @@ var circularProgressStyle = tv({
495
495
  // src/components/charts/areaChart.tsx
496
496
  var import_react2 = require("react");
497
497
  var import_recharts2 = require("recharts");
498
+
499
+ // src/components/scroll/scrollArea.tsx
500
+ var import_tailwind_variants3 = require("tailwind-variants");
501
+
502
+ // src/utils/clsx.ts
503
+ function clsx(...args) {
504
+ var i = 0, tmp, x, str = "";
505
+ while (i < args.length) {
506
+ if (tmp = args[i++]) {
507
+ if (x = toVal(tmp)) {
508
+ str && (str += " ");
509
+ str += x;
510
+ }
511
+ }
512
+ }
513
+ return str;
514
+ }
515
+ function toVal(mix) {
516
+ var k, y, str = "";
517
+ if (typeof mix === "string" || typeof mix === "number") {
518
+ str += mix;
519
+ } else if (typeof mix === "object") {
520
+ if (Array.isArray(mix)) {
521
+ var len = mix.length;
522
+ for (k = 0; k < len; k++) {
523
+ if (mix[k]) {
524
+ if (y = toVal(mix[k])) {
525
+ str && (str += " ");
526
+ str += y;
527
+ }
528
+ }
529
+ }
530
+ } else {
531
+ for (y in mix) {
532
+ if (mix[y]) {
533
+ str && (str += " ");
534
+ str += y;
535
+ }
536
+ }
537
+ }
538
+ }
539
+ return str;
540
+ }
541
+
542
+ // src/components/scroll/scrollArea.tsx
498
543
  var import_jsx_runtime2 = require("react/jsx-runtime");
544
+ var ScrollArea = ({ children, className, direction, size }) => {
545
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: clsx(scrollAreaStyle({ direction, size }), className), children });
546
+ };
547
+ ScrollArea.displayName = "ScrollArea";
548
+ var scrollArea_default = ScrollArea;
549
+ var scrollAreaStyle = (0, import_tailwind_variants3.tv)({
550
+ base: [
551
+ "h-full",
552
+ "x-full",
553
+ "scrollbar-thumb-trans-soft",
554
+ "hover:scrollbar-thumb-neutral-light",
555
+ "scrollbar-track-neutral-soft",
556
+ "scrollbar-button-neutral-main"
557
+ ],
558
+ variants: {
559
+ direction: {
560
+ x: ["overflow-x-auto", "overflow-y-hidden"],
561
+ y: ["overflow-y-auto", "overflow-x-hidden"],
562
+ both: ["overflow-auto"]
563
+ },
564
+ size: {
565
+ sm: ["scrollbar-sm"],
566
+ // "scrollbar-thin",
567
+ md: ["scrollbar-md"],
568
+ lg: ["scrollbar-lg"]
569
+ }
570
+ },
571
+ defaultVariants: {
572
+ direction: "both",
573
+ size: "md"
574
+ }
575
+ });
576
+
577
+ // src/components/charts/areaChart.tsx
578
+ var import_jsx_runtime3 = require("react/jsx-runtime");
499
579
  var AreaChartComponent = (0, import_react2.forwardRef)((originalProps, ref) => {
500
580
  const uniqueId = (0, import_react2.useId)();
501
581
  const [props, variantProps] = mapPropsVariants(originalProps, areaChartStyle.variantKeys);
502
- const { data, label, color = "primary", classNames } = { ...props, ...variantProps };
582
+ const {
583
+ data,
584
+ label,
585
+ headerContent,
586
+ color = "primary",
587
+ startFromZero = false,
588
+ itemWidth,
589
+ chartHeight = 240,
590
+ classNames
591
+ } = { ...props, ...variantProps };
503
592
  const slots = (0, import_react2.useMemo)(() => areaChartStyle({ ...variantProps }), [variantProps]);
504
593
  const COLOR_MAP = {
505
594
  primary: "#3F9CF2",
506
595
  danger: "#FF4684"
507
596
  };
508
597
  const colorHex = (0, import_react2.useMemo)(() => COLOR_MAP[color], [color]);
598
+ const totalChartWidth = (0, import_react2.useMemo)(() => {
599
+ if (!data || !itemWidth) return void 0;
600
+ const dataLength = startFromZero ? data.length + 1 : data.length;
601
+ return dataLength * itemWidth;
602
+ }, [data, itemWidth, startFromZero]);
603
+ const needsScroll = (0, import_react2.useMemo)(() => {
604
+ return totalChartWidth;
605
+ }, [totalChartWidth]);
606
+ const processedData = (0, import_react2.useMemo)(() => {
607
+ if (!data) return [];
608
+ return data;
609
+ }, [data, startFromZero]);
509
610
  const [tickPositions, setTickPositions] = (0, import_react2.useState)([]);
510
611
  const tickRef = (0, import_react2.useRef)([]);
511
612
  const CustomTick = ({ x, y, payload }) => {
512
613
  if (x !== void 0) {
513
614
  tickRef.current.push(x);
514
615
  }
515
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
616
+ if (startFromZero && payload.value === "") {
617
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", {});
618
+ }
619
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
516
620
  "text",
517
621
  {
518
622
  x,
519
- y: y + 14,
623
+ y: y + 11,
520
624
  textAnchor: "middle",
521
625
  fontSize: 12,
522
626
  fontWeight: 700,
@@ -537,79 +641,95 @@ var AreaChartComponent = (0, import_react2.forwardRef)((originalProps, ref) => {
537
641
  tickRef.current = [];
538
642
  });
539
643
  return () => cancelAnimationFrame(raf);
540
- }, [data]);
644
+ }, [processedData]);
541
645
  const CustomDotWithShadow = (props2) => {
542
- const { cx, cy, fill, stroke } = props2;
646
+ const { cx, cy, fill, stroke, payload } = props2;
543
647
  if (cx === void 0 || cy === void 0) return null;
544
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
545
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx, cy, r: 8, fill, opacity: 0.2 }),
546
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx, cy, r: 3.5, fill, stroke, strokeWidth: 2 })
648
+ if (startFromZero && (payload == null ? void 0 : payload.name) === "") {
649
+ return null;
650
+ }
651
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
652
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx, cy, r: 8, fill, opacity: 0.2 }),
653
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx, cy, r: 3.5, fill, stroke, strokeWidth: 2 })
547
654
  ] });
548
655
  };
549
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
550
- label && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
551
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
552
- import_recharts2.AreaChart,
553
- {
554
- data,
555
- margin: { left: -30 },
556
- className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
557
- children: [
558
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
559
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
560
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
561
- ] }) }),
562
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
563
- import_recharts2.CartesianGrid,
564
- {
565
- vertical: true,
566
- horizontal: false,
567
- strokeDasharray: "3 3",
568
- className: "stroke-neutral-light",
569
- verticalPoints: tickPositions
570
- }
571
- ),
572
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
573
- import_recharts2.XAxis,
574
- {
575
- dataKey: "name",
576
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
577
- tickLine: false,
578
- tick: CustomTick,
579
- padding: { left: 35.5, right: 35.5 }
580
- }
581
- ),
582
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
583
- import_recharts2.YAxis,
584
- {
585
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
586
- tickLine: false,
587
- tick: {
588
- fontSize: 12,
589
- fontWeight: 700,
590
- fill: "text-body-foreground",
591
- textAnchor: "middle",
592
- dx: -10
593
- },
594
- ticks: [0, 20, 40, 60, 80, 100],
595
- domain: [-6, 110]
596
- }
597
- ),
598
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
599
- import_recharts2.Area,
600
- {
601
- type: "monotone",
602
- dataKey: "value",
603
- stroke: colorHex,
604
- strokeWidth: 2,
605
- fill: `url(#colorGradient-${uniqueId})`,
606
- dot: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
607
- activeDot: { r: 7, fill: colorHex }
608
- }
609
- )
610
- ]
611
- }
612
- ) })
656
+ const chartContent = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
657
+ "div",
658
+ {
659
+ style: {
660
+ width: totalChartWidth || "100%",
661
+ minWidth: totalChartWidth || "100%"
662
+ },
663
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
664
+ import_recharts2.AreaChart,
665
+ {
666
+ width: totalChartWidth || 400,
667
+ height: chartHeight + 30,
668
+ data: processedData,
669
+ margin: { left: -30 },
670
+ className: "bg-body-background [&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
671
+ children: [
672
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
673
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
674
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
675
+ ] }) }),
676
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
677
+ import_recharts2.CartesianGrid,
678
+ {
679
+ vertical: true,
680
+ horizontal: false,
681
+ strokeDasharray: "3 3",
682
+ className: "stroke-neutral-light",
683
+ verticalPoints: tickPositions
684
+ }
685
+ ),
686
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
687
+ import_recharts2.XAxis,
688
+ {
689
+ dataKey: "name",
690
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
691
+ tickLine: false,
692
+ tick: CustomTick,
693
+ padding: { left: 35.5, right: 35.5 }
694
+ }
695
+ ),
696
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
697
+ import_recharts2.YAxis,
698
+ {
699
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
700
+ tickLine: false,
701
+ tick: {
702
+ fontSize: 12,
703
+ fontWeight: 700,
704
+ fill: "text-body-foreground",
705
+ textAnchor: "middle",
706
+ dx: -10
707
+ },
708
+ ticks: [0, 20, 40, 60, 80, 100],
709
+ domain: [-6, 110]
710
+ }
711
+ ),
712
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
713
+ import_recharts2.Area,
714
+ {
715
+ type: "monotone",
716
+ dataKey: "value",
717
+ stroke: colorHex,
718
+ strokeWidth: 2,
719
+ fill: `url(#colorGradient-${uniqueId})`,
720
+ dot: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
721
+ activeDot: false
722
+ }
723
+ )
724
+ ]
725
+ }
726
+ )
727
+ }
728
+ );
729
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
730
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
731
+ headerContent,
732
+ needsScroll ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(scrollArea_default, { direction: "x", size: "sm", children: chartContent }) : chartContent
613
733
  ] });
614
734
  });
615
735
  AreaChartComponent.displayName = "AreaChart";
@@ -639,7 +759,7 @@ var areaChartStyle = tv({
639
759
  // src/components/charts/barChart.tsx
640
760
  var import_react3 = require("react");
641
761
  var import_recharts3 = require("recharts");
642
- var import_jsx_runtime3 = require("react/jsx-runtime");
762
+ var import_jsx_runtime4 = require("react/jsx-runtime");
643
763
  var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
644
764
  const [props, variantProps] = mapPropsVariants(originalProps, barChartStyle.variantKeys);
645
765
  const {
@@ -661,19 +781,19 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
661
781
  const adjustedHeight = height + extraHeight;
662
782
  const adjustedY = y;
663
783
  const bottomY = adjustedY + adjustedHeight;
664
- return height ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
784
+ return height ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
665
785
  "path",
666
786
  {
667
787
  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`,
668
788
  fill
669
789
  }
670
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x, y, width, height: 0, fill });
790
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { x, y, width, height: 0, fill });
671
791
  };
672
792
  const CustomTick = ({ x, y, payload }) => {
673
793
  if (x !== void 0) {
674
794
  tickRef.current.push(x);
675
795
  }
676
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
796
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
677
797
  "text",
678
798
  {
679
799
  x,
@@ -688,7 +808,7 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
688
808
  );
689
809
  };
690
810
  const CustomYAxisTick = ({ x, y, payload }) => {
691
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
811
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
692
812
  "text",
693
813
  {
694
814
  x: x - 10,
@@ -721,9 +841,9 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
721
841
  });
722
842
  return () => cancelAnimationFrame(raf);
723
843
  }, [data]);
724
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
725
- label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
726
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
844
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
845
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
846
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
727
847
  import_recharts3.BarChart,
728
848
  {
729
849
  data,
@@ -732,21 +852,21 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
732
852
  barGap: 20,
733
853
  className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
734
854
  children: [
735
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("defs", { children: [
736
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
737
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "0%", stopColor: "#DEC1FA" }),
738
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "100%", stopColor: "#3F9CF2" })
855
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("defs", { children: [
856
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
857
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "0%", stopColor: "#DEC1FA" }),
858
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "100%", stopColor: "#3F9CF2" })
739
859
  ] }),
740
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
741
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "0%", stopColor: "#C2E59C" }),
742
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "100%", stopColor: "#64B3F4" })
860
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
861
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "0%", stopColor: "#C2E59C" }),
862
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "100%", stopColor: "#64B3F4" })
743
863
  ] }),
744
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
745
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "0%", stopColor: "#DDD6F3" }),
746
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("stop", { offset: "100%", stopColor: "#FAACA8" })
864
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
865
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "0%", stopColor: "#DDD6F3" }),
866
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "100%", stopColor: "#FAACA8" })
747
867
  ] })
748
868
  ] }),
749
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
869
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
750
870
  import_recharts3.CartesianGrid,
751
871
  {
752
872
  vertical: true,
@@ -756,7 +876,7 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
756
876
  verticalPoints: tickPositions
757
877
  }
758
878
  ),
759
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
879
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
760
880
  import_recharts3.XAxis,
761
881
  {
762
882
  dataKey: "title",
@@ -766,7 +886,7 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
766
886
  padding: { left: 0, right: 0 }
767
887
  }
768
888
  ),
769
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
889
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
770
890
  import_recharts3.YAxis,
771
891
  {
772
892
  axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
@@ -776,10 +896,10 @@ var BarChartComponent = (0, import_react3.forwardRef)((originalProps, ref) => {
776
896
  domain: yAxisDomain
777
897
  }
778
898
  ),
779
- customTooltip && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts3.Tooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CustomTooltip, {}), cursor: { fill: "transparent" } }),
780
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts3.Bar, { dataKey: "blue", fill: "url(#blueGradient)", width: 20, shape: CustomBarShape }),
781
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts3.Bar, { dataKey: "green", fill: "url(#greenGradient)", width: 20, shape: CustomBarShape }),
782
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts3.Bar, { dataKey: "pink", fill: "url(#pinkGradient)", width: 20, shape: CustomBarShape })
899
+ customTooltip && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.Tooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CustomTooltip, {}), cursor: { fill: "transparent" } }),
900
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.Bar, { dataKey: "blue", fill: "url(#blueGradient)", width: 20, shape: CustomBarShape }),
901
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.Bar, { dataKey: "green", fill: "url(#greenGradient)", width: 20, shape: CustomBarShape }),
902
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.Bar, { dataKey: "pink", fill: "url(#pinkGradient)", width: 20, shape: CustomBarShape })
783
903
  ]
784
904
  }
785
905
  ) })
@@ -801,7 +921,7 @@ var barChartStyle = tv({
801
921
  // src/components/charts/radarChart.tsx
802
922
  var import_recharts4 = require("recharts");
803
923
  var import_react4 = require("react");
804
- var import_jsx_runtime4 = require("react/jsx-runtime");
924
+ var import_jsx_runtime5 = require("react/jsx-runtime");
805
925
  var RadarChart = (0, import_react4.forwardRef)((originalProps, ref) => {
806
926
  const [props, variantProps] = mapPropsVariants(originalProps, radarChartStyle.variantKeys);
807
927
  const { data, label, classNames } = { ...props, ...variantProps };
@@ -810,16 +930,35 @@ var RadarChart = (0, import_react4.forwardRef)((originalProps, ref) => {
810
930
  if (!data || data.length === 0) return 100;
811
931
  return Math.max(...data.map((item) => item.fullMark || 100));
812
932
  }, [data]);
813
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
814
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts4.ResponsiveContainer, { width: 580, height: 330, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
933
+ const containerHeight = (0, import_react4.useMemo)(() => {
934
+ if (!data || data.length === 0) return 250;
935
+ return data.length === 3 ? 245 : 306;
936
+ }, [data]);
937
+ const chartMargin = (0, import_react4.useMemo)(() => {
938
+ return { top: 0, right: 0, bottom: 0, left: 0 };
939
+ }, [data]);
940
+ const outerRadius = (0, import_react4.useMemo)(() => {
941
+ if (!data || data.length === 0) return 125;
942
+ return data.length === 3 ? 135 : 125;
943
+ }, [data]);
944
+ const chartCenter = (0, import_react4.useMemo)(() => {
945
+ if (!data || data.length === 0) return {};
946
+ if (data.length === 3) return { cx: "50%", cy: "65%" };
947
+ return {};
948
+ }, [data]);
949
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
950
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
951
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.ResponsiveContainer, { width: "100%", height: containerHeight, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
815
952
  import_recharts4.RadarChart,
816
953
  {
817
954
  data,
818
- outerRadius: "80%",
955
+ outerRadius,
956
+ margin: chartMargin,
957
+ ...chartCenter,
819
958
  className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
820
959
  children: [
821
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts4.PolarGrid, { stroke: "#DFE2E7", strokeWidth: 1.75 }),
822
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
960
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.PolarGrid, { stroke: "#DFE2E7", strokeWidth: 1.75 }),
961
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
823
962
  import_recharts4.PolarAngleAxis,
824
963
  {
825
964
  dataKey: "name",
@@ -828,8 +967,8 @@ var RadarChart = (0, import_react4.forwardRef)((originalProps, ref) => {
828
967
  tickSize: 15
829
968
  }
830
969
  ),
831
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts4.PolarRadiusAxis, { domain: [0, maxFullMark], tick: false, tickCount: 6, axisLine: false }),
832
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
970
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.PolarRadiusAxis, { domain: [0, maxFullMark], tick: false, tickCount: 6, axisLine: false }),
971
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
833
972
  import_recharts4.Radar,
834
973
  {
835
974
  name: label,
@@ -843,16 +982,15 @@ var RadarChart = (0, import_react4.forwardRef)((originalProps, ref) => {
843
982
  )
844
983
  ]
845
984
  }
846
- ) }),
847
- label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })
985
+ ) }) })
848
986
  ] });
849
987
  });
850
988
  RadarChart.displayName = "RadarChart";
851
989
  var radarChart_default = RadarChart;
852
990
  var radarChartStyle = tv({
853
991
  slots: {
854
- base: ["flex", "flex-col", "items-center", "gap-[10px]", "select-none"],
855
- label: ["text-sm", "font-bold", "text-left", "text-body-foreground"]
992
+ base: ["flex", "flex-col", "select-none"],
993
+ label: ["text-md", "font-bold", "text-left", "text-body-foreground"]
856
994
  },
857
995
  variants: {},
858
996
  defaultVariants: {
@@ -1,19 +1,22 @@
1
1
  "use client";
2
2
  import "../../chunk-VYNBJBXD.mjs";
3
+ import {
4
+ radarChart_default
5
+ } from "../../chunk-OEFILEL3.mjs";
3
6
  import {
4
7
  areaChart_default
5
- } from "../../chunk-QKRCC26D.mjs";
8
+ } from "../../chunk-IHLCZM5T.mjs";
9
+ import "../../chunk-DQRAFUDA.mjs";
10
+ import "../../chunk-M37VBNB3.mjs";
6
11
  import {
7
12
  barChart_default
8
- } from "../../chunk-OGJONB7G.mjs";
13
+ } from "../../chunk-WNNOVISA.mjs";
9
14
  import {
10
15
  circularProgress_default
11
- } from "../../chunk-VB5NKWJG.mjs";
12
- import {
13
- radarChart_default
14
- } from "../../chunk-UA24L44Z.mjs";
16
+ } from "../../chunk-5XW5QDIW.mjs";
15
17
  import "../../chunk-E3G5QXSH.mjs";
16
- import "../../chunk-CDXBML6O.mjs";
18
+ import "../../chunk-76QIZILI.mjs";
19
+ import "../../chunk-27Y6K5NK.mjs";
17
20
  import "../../chunk-AC6TWLRT.mjs";
18
21
  export {
19
22
  areaChart_default as AreaChart,
@@ -378,12 +378,31 @@ var RadarChart = (0, import_react.forwardRef)((originalProps, ref) => {
378
378
  if (!data || data.length === 0) return 100;
379
379
  return Math.max(...data.map((item) => item.fullMark || 100));
380
380
  }, [data]);
381
+ const containerHeight = (0, import_react.useMemo)(() => {
382
+ if (!data || data.length === 0) return 250;
383
+ return data.length === 3 ? 245 : 306;
384
+ }, [data]);
385
+ const chartMargin = (0, import_react.useMemo)(() => {
386
+ return { top: 0, right: 0, bottom: 0, left: 0 };
387
+ }, [data]);
388
+ const outerRadius = (0, import_react.useMemo)(() => {
389
+ if (!data || data.length === 0) return 125;
390
+ return data.length === 3 ? 135 : 125;
391
+ }, [data]);
392
+ const chartCenter = (0, import_react.useMemo)(() => {
393
+ if (!data || data.length === 0) return {};
394
+ if (data.length === 3) return { cx: "50%", cy: "65%" };
395
+ return {};
396
+ }, [data]);
381
397
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
382
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.ResponsiveContainer, { width: 580, height: 330, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
398
+ label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
399
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: containerHeight, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
383
400
  import_recharts.RadarChart,
384
401
  {
385
402
  data,
386
- outerRadius: "80%",
403
+ outerRadius,
404
+ margin: chartMargin,
405
+ ...chartCenter,
387
406
  className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
388
407
  children: [
389
408
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_recharts.PolarGrid, { stroke: "#DFE2E7", strokeWidth: 1.75 }),
@@ -411,16 +430,15 @@ var RadarChart = (0, import_react.forwardRef)((originalProps, ref) => {
411
430
  )
412
431
  ]
413
432
  }
414
- ) }),
415
- label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })
433
+ ) }) })
416
434
  ] });
417
435
  });
418
436
  RadarChart.displayName = "RadarChart";
419
437
  var radarChart_default = RadarChart;
420
438
  var radarChartStyle = tv({
421
439
  slots: {
422
- base: ["flex", "flex-col", "items-center", "gap-[10px]", "select-none"],
423
- label: ["text-sm", "font-bold", "text-left", "text-body-foreground"]
440
+ base: ["flex", "flex-col", "select-none"],
441
+ label: ["text-md", "font-bold", "text-left", "text-body-foreground"]
424
442
  },
425
443
  variants: {},
426
444
  defaultVariants: {
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  radarChart_default
4
- } from "../../chunk-UA24L44Z.mjs";
4
+ } from "../../chunk-OEFILEL3.mjs";
5
5
  import "../../chunk-E3G5QXSH.mjs";
6
- import "../../chunk-CDXBML6O.mjs";
6
+ import "../../chunk-76QIZILI.mjs";
7
7
  import "../../chunk-AC6TWLRT.mjs";
8
8
  export {
9
9
  radarChart_default as default
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  checkbox_default
4
- } from "../../chunk-H6JGLPPF.mjs";
4
+ } from "../../chunk-3U5NJTRH.mjs";
5
5
  import "../../chunk-E3G5QXSH.mjs";
6
- import "../../chunk-CDXBML6O.mjs";
6
+ import "../../chunk-76QIZILI.mjs";
7
7
  import "../../chunk-27Y6K5NK.mjs";
8
8
  import "../../chunk-AC6TWLRT.mjs";
9
9
  export {
@@ -2,9 +2,9 @@
2
2
  import "../../chunk-QZ3LVYJW.mjs";
3
3
  import {
4
4
  checkbox_default
5
- } from "../../chunk-H6JGLPPF.mjs";
5
+ } from "../../chunk-3U5NJTRH.mjs";
6
6
  import "../../chunk-E3G5QXSH.mjs";
7
- import "../../chunk-CDXBML6O.mjs";
7
+ import "../../chunk-76QIZILI.mjs";
8
8
  import "../../chunk-27Y6K5NK.mjs";
9
9
  import "../../chunk-AC6TWLRT.mjs";
10
10
  export {