@deepnoid/ui 0.1.180 → 0.1.182

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 (85) hide show
  1. package/.turbo/turbo-build.log +161 -161
  2. package/dist/{chunk-ROXKJQSJ.mjs → chunk-6NO7GQHG.mjs} +3 -3
  3. package/dist/{chunk-GWHUQUKA.mjs → chunk-6WD32ERF.mjs} +93 -79
  4. package/dist/{chunk-ADU7DFVK.mjs → chunk-GPJVGQ5W.mjs} +8 -2
  5. package/dist/{chunk-RMZ3ZIP7.mjs → chunk-KDBM7UVG.mjs} +3 -3
  6. package/dist/{chunk-SAWYH3JL.mjs → chunk-M5ZLURXE.mjs} +4 -4
  7. package/dist/{chunk-2H5EBNCD.mjs → chunk-SX2FQY4L.mjs} +4 -4
  8. package/dist/{chunk-MU6QDNYC.mjs → chunk-W67QZ4OB.mjs} +1 -1
  9. package/dist/chunk-WKTRWHDA.mjs +264 -0
  10. package/dist/{chunk-7C7RHDHV.mjs → chunk-XZTVXEOD.mjs} +4 -4
  11. package/dist/{chunk-5S4NCYZF.mjs → chunk-YTW5HJJH.mjs} +6 -6
  12. package/dist/components/backdrop/backdrop.mjs +2 -2
  13. package/dist/components/backdrop/index.mjs +2 -2
  14. package/dist/components/breadcrumb/breadcrumb.mjs +4 -4
  15. package/dist/components/breadcrumb/index.mjs +4 -4
  16. package/dist/components/button/button.mjs +1 -1
  17. package/dist/components/button/icon-button.mjs +1 -1
  18. package/dist/components/button/index.mjs +5 -5
  19. package/dist/components/button/text-button.mjs +2 -2
  20. package/dist/components/charts/areaChart.mjs +1 -1
  21. package/dist/components/charts/barChart.js +125 -111
  22. package/dist/components/charts/barChart.mjs +1 -1
  23. package/dist/components/charts/index.js +218 -190
  24. package/dist/components/charts/index.mjs +3 -3
  25. package/dist/components/charts/simpleBarChart.js +93 -79
  26. package/dist/components/charts/simpleBarChart.mjs +1 -1
  27. package/dist/components/checkbox/checkbox.mjs +2 -2
  28. package/dist/components/checkbox/index.mjs +2 -2
  29. package/dist/components/chip/chip.mjs +1 -1
  30. package/dist/components/chip/index.mjs +1 -1
  31. package/dist/components/drawer/drawer.mjs +2 -2
  32. package/dist/components/drawer/index.mjs +2 -2
  33. package/dist/components/fileUpload/fileUpload.js +6 -0
  34. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  35. package/dist/components/fileUpload/index.js +6 -0
  36. package/dist/components/fileUpload/index.mjs +6 -6
  37. package/dist/components/input/index.mjs +3 -3
  38. package/dist/components/input/input.mjs +3 -3
  39. package/dist/components/list/index.mjs +2 -2
  40. package/dist/components/list/listItem.mjs +2 -2
  41. package/dist/components/modal/index.mjs +5 -5
  42. package/dist/components/modal/modal.mjs +5 -5
  43. package/dist/components/pagination/index.mjs +4 -4
  44. package/dist/components/pagination/pagination.mjs +4 -4
  45. package/dist/components/picker/datePicker.mjs +5 -5
  46. package/dist/components/picker/index.mjs +7 -7
  47. package/dist/components/picker/timePicker.mjs +4 -4
  48. package/dist/components/progress/index.mjs +2 -2
  49. package/dist/components/progress/progress.mjs +2 -2
  50. package/dist/components/radio/index.mjs +2 -2
  51. package/dist/components/radio/radio.mjs +2 -2
  52. package/dist/components/select/index.mjs +3 -3
  53. package/dist/components/select/select.mjs +3 -3
  54. package/dist/components/starRating/index.mjs +1 -1
  55. package/dist/components/starRating/starRating.mjs +1 -1
  56. package/dist/components/table/definition-table.mjs +2 -2
  57. package/dist/components/table/index.mjs +7 -7
  58. package/dist/components/table/table-body.mjs +6 -6
  59. package/dist/components/table/table-head.mjs +6 -6
  60. package/dist/components/table/table.mjs +6 -6
  61. package/dist/components/textarea/index.mjs +2 -2
  62. package/dist/components/textarea/textarea.mjs +2 -2
  63. package/dist/components/timePicker/calendar.mjs +1 -1
  64. package/dist/components/toast/index.mjs +5 -5
  65. package/dist/components/toast/toast.mjs +3 -3
  66. package/dist/components/toast/use-toast.mjs +4 -4
  67. package/dist/components/tree/index.mjs +2 -2
  68. package/dist/components/tree/tree.mjs +2 -2
  69. package/dist/index.js +224 -190
  70. package/dist/index.mjs +44 -44
  71. package/package.json +1 -1
  72. package/dist/chunk-JOK735WN.mjs +0 -250
  73. package/dist/{chunk-OEIEALIP.mjs → chunk-3DCUMRYP.mjs} +3 -3
  74. package/dist/{chunk-3CRSSRCH.mjs → chunk-3HXNAVAN.mjs} +3 -3
  75. package/dist/{chunk-IH3BJRTV.mjs → chunk-4X35QQTI.mjs} +3 -3
  76. package/dist/{chunk-RXDRG6MC.mjs → chunk-7H6U5XJA.mjs} +3 -3
  77. package/dist/{chunk-KH63CD55.mjs → chunk-ACZ3DQVT.mjs} +3 -3
  78. package/dist/{chunk-DS5CGU2X.mjs → chunk-BH3I4LIZ.mjs} +3 -3
  79. package/dist/{chunk-GS5X67UB.mjs → chunk-GVTYOGSV.mjs} +3 -3
  80. package/dist/{chunk-4EELFA6L.mjs → chunk-LE7PGMCV.mjs} +3 -3
  81. package/dist/{chunk-4LUASWAN.mjs → chunk-NDNIAALB.mjs} +3 -3
  82. package/dist/{chunk-MWUA62VL.mjs → chunk-NKF2TQMA.mjs} +3 -3
  83. package/dist/{chunk-A3WPBLOW.mjs → chunk-UINFH5AT.mjs} +3 -3
  84. package/dist/{chunk-PRNE3U26.mjs → chunk-XL6LZDT4.mjs} +3 -3
  85. package/dist/{chunk-45Y7ANPK.mjs → chunk-ZFC5O2V3.mjs} +3 -3
package/dist/index.js CHANGED
@@ -12364,6 +12364,7 @@ function FileUpload({
12364
12364
  const [message, setMessage] = (0, import_react38.useState)(errorMessage);
12365
12365
  const [displayFileName, setDisplayFileName] = (0, import_react38.useState)(() => (defaultFile == null ? void 0 : defaultFile.name) || "");
12366
12366
  const [hasUploadedFile, setHasUploadedFile] = (0, import_react38.useState)(false);
12367
+ const [isUploading, setIsUploading] = (0, import_react38.useState)(false);
12367
12368
  const slots = fileUploadStyle();
12368
12369
  const handleButtonClick = () => {
12369
12370
  var _a;
@@ -12382,11 +12383,13 @@ function FileUpload({
12382
12383
  const startUploadSimulation = (file) => {
12383
12384
  let progress = 0;
12384
12385
  setUploadProgress(0);
12386
+ setIsUploading(true);
12385
12387
  uploadIntervalRef.current = window.setInterval(() => {
12386
12388
  progress += 10;
12387
12389
  setUploadProgress(progress);
12388
12390
  if (progress >= 100) {
12389
12391
  clearInterval(uploadIntervalRef.current);
12392
+ setIsUploading(false);
12390
12393
  onFileUpload == null ? void 0 : onFileUpload(file);
12391
12394
  }
12392
12395
  }, 100);
@@ -12401,6 +12404,7 @@ function FileUpload({
12401
12404
  setCurrentFile(null);
12402
12405
  setDisplayFileName((defaultFile == null ? void 0 : defaultFile.name) || "");
12403
12406
  setHasUploadedFile(false);
12407
+ setIsUploading(false);
12404
12408
  if (fileInputRef.current) {
12405
12409
  fileInputRef.current.value = "";
12406
12410
  }
@@ -12421,6 +12425,7 @@ function FileUpload({
12421
12425
  setMessage("");
12422
12426
  setDisplayFileName((defaultFile == null ? void 0 : defaultFile.name) || "");
12423
12427
  setHasUploadedFile(false);
12428
+ setIsUploading(false);
12424
12429
  if (fileInputRef.current) {
12425
12430
  fileInputRef.current.value = "";
12426
12431
  }
@@ -12474,6 +12479,7 @@ function FileUpload({
12474
12479
  variant: "outline",
12475
12480
  onClick: handleButtonClick,
12476
12481
  disabled: !!(currentFile && hasUploadedFile),
12482
+ isLoading: isUploading,
12477
12483
  children: buttonText
12478
12484
  }
12479
12485
  ),
@@ -12928,8 +12934,8 @@ var BarChartComponent = (0, import_react41.forwardRef)((originalProps, ref) => {
12928
12934
  const { payload, x, y } = e;
12929
12935
  if (!payload || !payload[dataKey]) return;
12930
12936
  setTooltipState({
12931
- x,
12932
- y,
12937
+ barX: x,
12938
+ barY: y - 10,
12933
12939
  value: payload[dataKey],
12934
12940
  dataKey,
12935
12941
  label: payload.title
@@ -13000,7 +13006,7 @@ var BarChartComponent = (0, import_react41.forwardRef)((originalProps, ref) => {
13000
13006
  const tooltipRect = tooltipRef.current.getBoundingClientRect();
13001
13007
  const chartWidth = chartRect.width;
13002
13008
  const tooltipWidth = tooltipRect.width;
13003
- let left = tooltipState.x - tooltipWidth / 2;
13009
+ let left = tooltipState.barX - tooltipWidth / 2;
13004
13010
  const padding2 = 8;
13005
13011
  if (left < padding2) {
13006
13012
  left = padding2;
@@ -13009,114 +13015,128 @@ var BarChartComponent = (0, import_react41.forwardRef)((originalProps, ref) => {
13009
13015
  }
13010
13016
  setTooltipLeft(left);
13011
13017
  }, [tooltipState]);
13012
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref: chartRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: [
13013
- label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13014
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
13015
- import_recharts3.BarChart,
13016
- {
13017
- data,
13018
- margin: { left: -20 },
13019
- barSize: 20,
13020
- barGap,
13021
- className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13022
- children: [
13023
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("defs", { children: [
13024
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13025
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#DEC1FA" }),
13026
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#3F9CF2" })
13027
- ] }),
13028
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13029
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#C2E59C" }),
13030
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#64B3F4" })
13031
- ] }),
13032
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13033
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#DDD6F3" }),
13034
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#FAACA8" })
13035
- ] })
13036
- ] }),
13037
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13038
- import_recharts3.CartesianGrid,
13039
- {
13040
- vertical: true,
13041
- horizontal: false,
13042
- strokeDasharray: "4 4",
13043
- className: "stroke-neutral-light",
13044
- verticalPoints: tickPositions
13045
- }
13046
- ),
13047
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13048
- import_recharts3.XAxis,
13049
- {
13050
- dataKey: "title",
13051
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
13052
- tickLine: false,
13053
- tick: CustomTick,
13054
- padding: { left: 0, right: 0 }
13055
- }
13056
- ),
13057
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13058
- import_recharts3.YAxis,
13059
- {
13060
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
13061
- tickLine: false,
13062
- tick: CustomYAxisTick,
13063
- ticks: yAxisTicks,
13064
- domain: yAxisDomain
13065
- }
13066
- ),
13067
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13068
- import_recharts3.Bar,
13069
- {
13070
- dataKey: "blue",
13071
- fill: "url(#blueGradient)",
13072
- shape: CustomBarShape,
13073
- onMouseEnter: (e) => handleMouseEnter(e, "blue"),
13074
- onMouseLeave: handleMouseLeave
13075
- }
13076
- ),
13077
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13078
- import_recharts3.Bar,
13079
- {
13080
- dataKey: "green",
13081
- fill: "url(#greenGradient)",
13082
- shape: CustomBarShape,
13083
- onMouseEnter: (e) => handleMouseEnter(e, "green"),
13084
- onMouseLeave: handleMouseLeave
13085
- }
13086
- ),
13087
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13088
- import_recharts3.Bar,
13089
- {
13090
- dataKey: "pink",
13091
- fill: "url(#pinkGradient)",
13092
- shape: CustomBarShape,
13093
- onMouseEnter: (e) => handleMouseEnter(e, "pink"),
13094
- onMouseLeave: handleMouseLeave
13095
- }
13096
- )
13097
- ]
13098
- }
13099
- ) }),
13100
- tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13101
- "div",
13102
- {
13103
- ref: tooltipRef,
13104
- style: {
13105
- position: "absolute",
13106
- left: tooltipLeft + 10,
13107
- top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y - 40 : 0,
13108
- pointerEvents: "none",
13109
- zIndex: 10,
13110
- opacity: tooltipState ? 1 : 0,
13111
- transition: "opacity 0.1s ease-out",
13112
- visibility: tooltipState ? "visible" : "hidden",
13113
- width: "fit-content",
13114
- whiteSpace: "nowrap"
13115
- },
13116
- children: tooltipState && tooltipFormatter(tooltipState)
13117
- }
13118
- )
13119
- ] });
13018
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
13019
+ "div",
13020
+ {
13021
+ ref: chartRef,
13022
+ className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
13023
+ onMouseLeave: handleMouseLeave,
13024
+ onMouseMove: (e) => {
13025
+ const target = e.target;
13026
+ if (!target.closest('[data-testid="recharts-bar-rectangle"]') && !target.closest(".recharts-bar-rectangle") && target.tagName !== "path") {
13027
+ setTooltipState(null);
13028
+ }
13029
+ },
13030
+ children: [
13031
+ label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13032
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
13033
+ import_recharts3.BarChart,
13034
+ {
13035
+ data,
13036
+ margin: { left: -20 },
13037
+ barSize: 20,
13038
+ barGap,
13039
+ className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13040
+ children: [
13041
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("defs", { children: [
13042
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13043
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#DEC1FA" }),
13044
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#3F9CF2" })
13045
+ ] }),
13046
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13047
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#C2E59C" }),
13048
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#64B3F4" })
13049
+ ] }),
13050
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13051
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#DDD6F3" }),
13052
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#FAACA8" })
13053
+ ] })
13054
+ ] }),
13055
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13056
+ import_recharts3.CartesianGrid,
13057
+ {
13058
+ vertical: true,
13059
+ horizontal: false,
13060
+ strokeDasharray: "4 4",
13061
+ className: "stroke-neutral-light",
13062
+ verticalPoints: tickPositions
13063
+ }
13064
+ ),
13065
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13066
+ import_recharts3.XAxis,
13067
+ {
13068
+ dataKey: "title",
13069
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
13070
+ tickLine: false,
13071
+ tick: CustomTick,
13072
+ padding: { left: 0, right: 0 }
13073
+ }
13074
+ ),
13075
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13076
+ import_recharts3.YAxis,
13077
+ {
13078
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
13079
+ tickLine: false,
13080
+ tick: CustomYAxisTick,
13081
+ ticks: yAxisTicks,
13082
+ domain: yAxisDomain
13083
+ }
13084
+ ),
13085
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13086
+ import_recharts3.Bar,
13087
+ {
13088
+ dataKey: "blue",
13089
+ fill: "url(#blueGradient)",
13090
+ shape: CustomBarShape,
13091
+ onMouseEnter: (e) => handleMouseEnter(e, "blue"),
13092
+ onMouseLeave: handleMouseLeave
13093
+ }
13094
+ ),
13095
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13096
+ import_recharts3.Bar,
13097
+ {
13098
+ dataKey: "green",
13099
+ fill: "url(#greenGradient)",
13100
+ shape: CustomBarShape,
13101
+ onMouseEnter: (e) => handleMouseEnter(e, "green"),
13102
+ onMouseLeave: handleMouseLeave
13103
+ }
13104
+ ),
13105
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13106
+ import_recharts3.Bar,
13107
+ {
13108
+ dataKey: "pink",
13109
+ fill: "url(#pinkGradient)",
13110
+ shape: CustomBarShape,
13111
+ onMouseEnter: (e) => handleMouseEnter(e, "pink"),
13112
+ onMouseLeave: handleMouseLeave
13113
+ }
13114
+ )
13115
+ ]
13116
+ }
13117
+ ) }),
13118
+ tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13119
+ "div",
13120
+ {
13121
+ ref: tooltipRef,
13122
+ style: {
13123
+ position: "absolute",
13124
+ left: tooltipLeft + 10,
13125
+ top: (tooltipState == null ? void 0 : tooltipState.barY) || 0,
13126
+ pointerEvents: "none",
13127
+ zIndex: 10,
13128
+ opacity: tooltipState ? 1 : 0,
13129
+ transition: "opacity 0.1s ease-out",
13130
+ visibility: tooltipState ? "visible" : "hidden",
13131
+ width: "fit-content",
13132
+ whiteSpace: "nowrap"
13133
+ },
13134
+ children: tooltipState && tooltipFormatter(tooltipState)
13135
+ }
13136
+ )
13137
+ ]
13138
+ }
13139
+ );
13120
13140
  });
13121
13141
  BarChartComponent.displayName = "barChart";
13122
13142
  var barChart_default = BarChartComponent;
@@ -13299,8 +13319,8 @@ var SimpleBarChartComponent = (0, import_react43.forwardRef)((originalProps, ref
13299
13319
  const { payload, x, y } = e;
13300
13320
  if (!payload) return;
13301
13321
  setTooltipState({
13302
- x,
13303
- y,
13322
+ barX: x,
13323
+ barY: y - 20,
13304
13324
  value: payload.value,
13305
13325
  label: payload.title
13306
13326
  });
@@ -13343,7 +13363,7 @@ var SimpleBarChartComponent = (0, import_react43.forwardRef)((originalProps, ref
13343
13363
  const tooltipRect = tooltipRef.current.getBoundingClientRect();
13344
13364
  const chartWidth = chartRect.width;
13345
13365
  const tooltipWidth = tooltipRect.width;
13346
- let left = tooltipState.x - tooltipWidth / 2;
13366
+ let left = tooltipState.barX - tooltipWidth / 2;
13347
13367
  const padding2 = 8;
13348
13368
  if (left < padding2) {
13349
13369
  left = padding2;
@@ -13352,82 +13372,96 @@ var SimpleBarChartComponent = (0, import_react43.forwardRef)((originalProps, ref
13352
13372
  }
13353
13373
  setTooltipLeft(left);
13354
13374
  }, [tooltipState]);
13355
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { ref: chartRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: [
13356
- label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13357
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts5.ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13358
- import_recharts5.BarChart,
13359
- {
13360
- data,
13361
- margin: { left: 0, right: 0, top: 0, bottom: 0 },
13362
- barSize: 10,
13363
- barGap,
13364
- className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13365
- children: [
13366
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13367
- import_recharts5.CartesianGrid,
13368
- {
13369
- vertical: true,
13370
- horizontal: false,
13371
- strokeDasharray: "4 4",
13372
- className: "stroke-neutral-light",
13373
- verticalPoints: tickPositions
13374
- }
13375
- ),
13376
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13377
- import_recharts5.CartesianGrid,
13378
- {
13379
- vertical: true,
13380
- horizontal: false,
13381
- strokeDasharray: "0",
13382
- strokeWidth: 2,
13383
- className: "stroke-neutral-light",
13384
- verticalPoints: [0]
13385
- }
13386
- ),
13387
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13388
- import_recharts5.XAxis,
13389
- {
13390
- dataKey: "title",
13391
- axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
13392
- tickLine: false,
13393
- tick: CustomTick,
13394
- padding: { left: 0, right: 0 }
13395
- }
13396
- ),
13397
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts5.YAxis, { hide: true, ticks: yAxisTicks, domain: yAxisDomain }),
13398
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13399
- import_recharts5.Bar,
13400
- {
13401
- dataKey: "value",
13402
- fill: "#C7E5FA",
13403
- shape: CustomBarShape,
13404
- onMouseEnter: handleMouseEnter,
13405
- onMouseLeave: handleMouseLeave
13406
- }
13407
- )
13408
- ]
13409
- }
13410
- ) }),
13411
- tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13412
- "div",
13413
- {
13414
- ref: tooltipRef,
13415
- style: {
13416
- position: "absolute",
13417
- left: tooltipLeft + 5,
13418
- top: (tooltipState == null ? void 0 : tooltipState.y) ? tooltipState.y - 20 : 0,
13419
- pointerEvents: "none",
13420
- zIndex: 10,
13421
- opacity: tooltipState ? 1 : 0,
13422
- transition: "opacity 0.1s ease-out",
13423
- visibility: tooltipState ? "visible" : "hidden",
13424
- width: "fit-content",
13425
- whiteSpace: "nowrap"
13426
- },
13427
- children: tooltipState && tooltipFormatter(tooltipState)
13428
- }
13429
- )
13430
- ] });
13375
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13376
+ "div",
13377
+ {
13378
+ ref: chartRef,
13379
+ className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
13380
+ onMouseLeave: handleMouseLeave,
13381
+ onMouseMove: (e) => {
13382
+ const target = e.target;
13383
+ if (!target.closest('[data-testid="recharts-bar-rectangle"]') && !target.closest(".recharts-bar-rectangle") && target.tagName !== "path") {
13384
+ setTooltipState(null);
13385
+ }
13386
+ },
13387
+ children: [
13388
+ label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13389
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts5.ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13390
+ import_recharts5.BarChart,
13391
+ {
13392
+ data,
13393
+ margin: { left: 0, right: 0, top: 0, bottom: 0 },
13394
+ barSize: 10,
13395
+ barGap,
13396
+ className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13397
+ children: [
13398
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13399
+ import_recharts5.CartesianGrid,
13400
+ {
13401
+ vertical: true,
13402
+ horizontal: false,
13403
+ strokeDasharray: "4 4",
13404
+ className: "stroke-neutral-light",
13405
+ verticalPoints: tickPositions
13406
+ }
13407
+ ),
13408
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13409
+ import_recharts5.CartesianGrid,
13410
+ {
13411
+ vertical: true,
13412
+ horizontal: false,
13413
+ strokeDasharray: "0",
13414
+ strokeWidth: 2,
13415
+ className: "stroke-neutral-light",
13416
+ verticalPoints: [0]
13417
+ }
13418
+ ),
13419
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13420
+ import_recharts5.XAxis,
13421
+ {
13422
+ dataKey: "title",
13423
+ axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
13424
+ tickLine: false,
13425
+ tick: CustomTick,
13426
+ padding: { left: 0, right: 0 }
13427
+ }
13428
+ ),
13429
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts5.YAxis, { hide: true, ticks: yAxisTicks, domain: yAxisDomain }),
13430
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13431
+ import_recharts5.Bar,
13432
+ {
13433
+ dataKey: "value",
13434
+ fill: "#C7E5FA",
13435
+ shape: CustomBarShape,
13436
+ onMouseEnter: handleMouseEnter,
13437
+ onMouseLeave: handleMouseLeave
13438
+ }
13439
+ )
13440
+ ]
13441
+ }
13442
+ ) }),
13443
+ tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13444
+ "div",
13445
+ {
13446
+ ref: tooltipRef,
13447
+ style: {
13448
+ position: "absolute",
13449
+ left: tooltipLeft + 5,
13450
+ top: (tooltipState == null ? void 0 : tooltipState.barY) || 0,
13451
+ pointerEvents: "none",
13452
+ zIndex: 10,
13453
+ opacity: tooltipState ? 1 : 0,
13454
+ transition: "opacity 0.1s ease-out",
13455
+ visibility: tooltipState ? "visible" : "hidden",
13456
+ width: "fit-content",
13457
+ whiteSpace: "nowrap"
13458
+ },
13459
+ children: tooltipState && tooltipFormatter(tooltipState)
13460
+ }
13461
+ )
13462
+ ]
13463
+ }
13464
+ );
13431
13465
  });
13432
13466
  SimpleBarChartComponent.displayName = "simpleBarChart";
13433
13467
  var simpleBarChart_default = SimpleBarChartComponent;