@deepnoid/ui 0.1.205 → 0.1.207

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 (63) hide show
  1. package/.turbo/turbo-build.log +495 -485
  2. package/dist/chunk-3FOLYC6R.mjs +285 -0
  3. package/dist/chunk-3IBJXQTJ.mjs +42 -0
  4. package/dist/chunk-I4YRN4UE.mjs +79 -0
  5. package/dist/{chunk-636SQLHK.mjs → chunk-JPNMYMDN.mjs} +7 -7
  6. package/dist/chunk-QBWQHWNV.mjs +81 -0
  7. package/dist/{chunk-PRNE3U26.mjs → chunk-RNMD44IQ.mjs} +3 -2
  8. package/dist/components/breadcrumb/breadcrumb.mjs +2 -2
  9. package/dist/components/breadcrumb/index.mjs +2 -2
  10. package/dist/components/button/index.mjs +3 -3
  11. package/dist/components/charts/index.mjs +6 -6
  12. package/dist/components/fileUpload/fileUpload.mjs +1 -1
  13. package/dist/components/fileUpload/index.mjs +1 -1
  14. package/dist/components/modal/index.mjs +1 -1
  15. package/dist/components/modal/modal.mjs +1 -1
  16. package/dist/components/picker/datePicker.mjs +3 -3
  17. package/dist/components/picker/index.d.mts +1 -1
  18. package/dist/components/picker/index.d.ts +1 -1
  19. package/dist/components/picker/index.js +266 -679
  20. package/dist/components/picker/index.mjs +8 -8
  21. package/dist/components/picker/timePicker/Panel.d.mts +11 -0
  22. package/dist/components/picker/timePicker/Panel.d.ts +11 -0
  23. package/dist/components/picker/timePicker/Panel.js +740 -0
  24. package/dist/components/picker/timePicker/Panel.mjs +26 -0
  25. package/dist/components/picker/timePicker/WheelColumn.d.mts +10 -0
  26. package/dist/components/picker/timePicker/WheelColumn.d.ts +10 -0
  27. package/dist/components/picker/timePicker/WheelColumn.js +98 -0
  28. package/dist/components/picker/timePicker/WheelColumn.mjs +8 -0
  29. package/dist/components/picker/{timePicker.d.ts → timePicker/index.d.mts} +41 -52
  30. package/dist/components/picker/{timePicker.d.mts → timePicker/index.d.ts} +41 -52
  31. package/dist/components/picker/{timePicker.js → timePicker/index.js} +702 -1003
  32. package/dist/components/picker/timePicker/index.mjs +29 -0
  33. package/dist/components/picker/utils.d.mts +11 -1
  34. package/dist/components/picker/utils.d.ts +11 -1
  35. package/dist/components/picker/utils.js +28 -2
  36. package/dist/components/picker/utils.mjs +7 -3
  37. package/dist/components/radio/index.js +3 -2
  38. package/dist/components/radio/index.mjs +1 -1
  39. package/dist/components/radio/radio.d.mts +1 -0
  40. package/dist/components/radio/radio.d.ts +1 -0
  41. package/dist/components/radio/radio.js +3 -2
  42. package/dist/components/radio/radio.mjs +1 -1
  43. package/dist/components/select/index.mjs +1 -1
  44. package/dist/components/select/select.mjs +1 -1
  45. package/dist/components/table/index.mjs +3 -3
  46. package/dist/components/table/table-body.mjs +3 -3
  47. package/dist/components/table/table-head.mjs +3 -3
  48. package/dist/components/table/table.mjs +3 -3
  49. package/dist/components/timePicker/calendar.mjs +1 -1
  50. package/dist/components/timePicker/useDateTimePicker.mjs +1 -1
  51. package/dist/components/toast/index.mjs +2 -2
  52. package/dist/components/toast/use-toast.mjs +2 -2
  53. package/dist/index.d.mts +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.js +482 -399
  56. package/dist/index.mjs +55 -53
  57. package/package.json +1 -1
  58. package/dist/chunk-COGGK5Q6.mjs +0 -365
  59. package/dist/chunk-FWFEKWWD.mjs +0 -18
  60. package/dist/components/picker/timePicker.mjs +0 -26
  61. package/dist/{chunk-OUPCXZCP.mjs → chunk-EMQML6YB.mjs} +3 -3
  62. package/dist/{chunk-L3A3IEKZ.mjs → chunk-SSGCTWWW.mjs} +3 -3
  63. package/dist/{chunk-334UN473.mjs → chunk-W3V4SZV5.mjs} +3 -3
package/dist/index.js CHANGED
@@ -9993,8 +9993,8 @@ var import_react23 = require("react");
9993
9993
  var import_jsx_runtime25 = require("react/jsx-runtime");
9994
9994
  var Radio = (0, import_react23.forwardRef)((originalProps, ref) => {
9995
9995
  const [props, variantProps] = mapPropsVariants(originalProps, radioStyle.variantKeys);
9996
- const { children, classNames, labelPosition = "end", ...inputProps } = props;
9997
- const slots = (0, import_react23.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
9996
+ const { children, classNames, labelPosition = "end", error, ...inputProps } = props;
9997
+ const slots = (0, import_react23.useMemo)(() => radioStyle({ ...variantProps, isInvalid: error }), [variantProps, error]);
9998
9998
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
9999
9999
  "label",
10000
10000
  {
@@ -10118,6 +10118,7 @@ var radioStyle = tv({
10118
10118
  true: {
10119
10119
  outerDot: [
10120
10120
  "border-danger-main",
10121
+ "bg-danger-soft",
10121
10122
  "group-has-[:checked]/radio:border-danger-main",
10122
10123
  "group-hover/radio:border-danger-light",
10123
10124
  "group-hover/radio:bg-danger-soft"
@@ -11399,6 +11400,28 @@ var formatStringToDate = (date) => {
11399
11400
  const formattedDate = new Date(date);
11400
11401
  return formattedDate;
11401
11402
  };
11403
+ var convert24To12 = (time24) => {
11404
+ const [HH, MM] = time24.split(":");
11405
+ let h = Number(HH);
11406
+ const minute = MM || "";
11407
+ const meridiem = h >= 12 ? "PM" : "AM";
11408
+ let hour12 = h % 12;
11409
+ if (hour12 === 0) hour12 = 12;
11410
+ const hour = String(hour12).padStart(2, "0");
11411
+ return { hour, minute, meridiem };
11412
+ };
11413
+ var getCurrent12Hour = () => {
11414
+ const now = /* @__PURE__ */ new Date();
11415
+ let hour = now.getHours();
11416
+ const minute = String(now.getMinutes()).padStart(2, "0");
11417
+ const meridiem = hour >= 12 ? "PM" : "AM";
11418
+ hour = hour % 12 || 12;
11419
+ return {
11420
+ hour: String(hour).padStart(2, "0"),
11421
+ minute,
11422
+ meridiem
11423
+ };
11424
+ };
11402
11425
 
11403
11426
  // src/components/picker/datePicker.tsx
11404
11427
  var import_jsx_runtime35 = require("react/jsx-runtime");
@@ -11885,217 +11908,262 @@ var datePickerStyle = tv({
11885
11908
  }
11886
11909
  });
11887
11910
 
11888
- // src/components/picker/timePicker.tsx
11889
- var import_react35 = require("react");
11911
+ // src/components/picker/timePicker/index.tsx
11912
+ var import_react37 = require("react");
11890
11913
  var import_react_dom6 = require("react-dom");
11914
+
11915
+ // src/components/picker/timePicker/Panel.tsx
11916
+ var import_react36 = require("react");
11917
+
11918
+ // src/components/picker/timePicker/WheelColumn.tsx
11919
+ var import_react35 = require("react");
11891
11920
  var import_jsx_runtime36 = require("react/jsx-runtime");
11892
- var TimePicker = (0, import_react35.forwardRef)((originalProps, ref) => {
11921
+ var ITEM_HEIGHT = 30;
11922
+ var ACTIVE_HEIGHT = 34;
11923
+ function WheelColumn({ list, value, onChange }) {
11924
+ const ref = (0, import_react35.useRef)(null);
11925
+ const internalChangeRef = (0, import_react35.useRef)(false);
11926
+ const [currentIndex, setCurrentIndex] = (0, import_react35.useState)(0);
11927
+ const scrollToIndex = (index, behavior = "smooth") => {
11928
+ if (!ref.current) return;
11929
+ const diff = ACTIVE_HEIGHT - ITEM_HEIGHT;
11930
+ let centerOffset = index > 0 && behavior === "auto" ? diff : 0;
11931
+ if (behavior === "auto" && currentIndex !== 0) centerOffset -= 4;
11932
+ const top = index * ITEM_HEIGHT + centerOffset;
11933
+ ref.current.scrollTo({ top, behavior });
11934
+ };
11935
+ const finalizeScroll = (index) => {
11936
+ internalChangeRef.current = true;
11937
+ const v = list[index];
11938
+ setCurrentIndex(index);
11939
+ scrollToIndex(index, "smooth");
11940
+ if (v) onChange(v);
11941
+ };
11942
+ const handleClick = (index) => finalizeScroll(index);
11943
+ (0, import_react35.useEffect)(() => {
11944
+ if (!ref.current || !value) return;
11945
+ const idx = list.indexOf(value);
11946
+ if (idx < 0) return;
11947
+ if (internalChangeRef.current) {
11948
+ internalChangeRef.current = false;
11949
+ return;
11950
+ }
11951
+ setCurrentIndex(idx);
11952
+ scrollToIndex(idx, "auto");
11953
+ }, [value]);
11954
+ (0, import_react35.useEffect)(() => {
11955
+ const el = ref.current;
11956
+ if (!el) return;
11957
+ const handleWheel = (e) => {
11958
+ e.preventDefault();
11959
+ let newIndex = currentIndex;
11960
+ if (e.deltaY > 0) {
11961
+ newIndex = Math.min(currentIndex + 1, list.length - 1);
11962
+ } else if (e.deltaY < 0) {
11963
+ newIndex = Math.max(currentIndex - 1, 0);
11964
+ }
11965
+ finalizeScroll(newIndex);
11966
+ };
11967
+ el.addEventListener("wheel", handleWheel, { passive: false });
11968
+ return () => el.removeEventListener("wheel", handleWheel);
11969
+ }, [currentIndex, list, onChange]);
11970
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "relative h-[94px] w-[40px]", children: [
11971
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "pointer-events-none absolute left-1/2 top-[30px] h-[34px] w-[40px] -translate-x-1/2 rounded-[10px] shadow-[inset_0_0_0_1.5px_var(--dn-primary-light)]" }),
11972
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref, className: "scrollbar-none relative h-full select-none overflow-y-scroll py-[0]", children: [
11973
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { height: ITEM_HEIGHT } }),
11974
+ list.map((v, i) => {
11975
+ const isActive = i === currentIndex;
11976
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11977
+ "div",
11978
+ {
11979
+ onClick: () => handleClick(i),
11980
+ className: `flex items-center justify-center text-sm font-bold transition-all ${isActive ? "text-body-foreground" : "text-neutral-light"}`,
11981
+ style: { height: isActive ? ACTIVE_HEIGHT : ITEM_HEIGHT },
11982
+ children: v
11983
+ },
11984
+ i
11985
+ );
11986
+ }),
11987
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { height: list.length >= 3 ? ITEM_HEIGHT + 4 : ITEM_HEIGHT } })
11988
+ ] })
11989
+ ] });
11990
+ }
11991
+
11992
+ // src/components/picker/timePicker/Panel.tsx
11993
+ var import_jsx_runtime37 = require("react/jsx-runtime");
11994
+ var hours = [...Array(12)].map((_, i) => String(i + 1).padStart(2, "0"));
11995
+ var minutes = [...Array(60)].map((_, i) => String(i).padStart(2, "0"));
11996
+ var meridiemList = ["AM", "PM"];
11997
+ var TimePickerPanel = (0, import_react36.forwardRef)(
11998
+ ({ value, onChange, nowTitle, confirmTitle }, ref) => {
11999
+ const [time, setTime] = (0, import_react36.useState)({ hour: "", minute: "", meridiem: "" });
12000
+ const handleNow = () => {
12001
+ setTime(getCurrent12Hour());
12002
+ };
12003
+ const handleConfirm = (time2) => {
12004
+ const { hour, minute, meridiem } = time2;
12005
+ let h = Number(hour);
12006
+ if (meridiem === "AM") {
12007
+ if (h === 12) h = 0;
12008
+ } else {
12009
+ if (h !== 12) h += 12;
12010
+ }
12011
+ const HH = String(h).padStart(2, "0");
12012
+ const MM = minute.padStart(2, "0");
12013
+ const SS = "00";
12014
+ onChange(`${HH}:${MM}:${SS}`);
12015
+ };
12016
+ (0, import_react36.useEffect)(() => {
12017
+ setTime(value ? convert24To12(value) : getCurrent12Hour());
12018
+ }, [value]);
12019
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
12020
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref, className: "flex gap-[10px]", children: [
12021
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-center gap-[5px]", children: [
12022
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(WheelColumn, { list: hours, value: time.hour, onChange: (v) => setTime({ ...time, hour: v }) }),
12023
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "w-[5px] text-sm font-bold", children: ":" }),
12024
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(WheelColumn, { list: minutes, value: time.minute, onChange: (v) => setTime({ ...time, minute: v }) })
12025
+ ] }),
12026
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(WheelColumn, { list: meridiemList, value: time.meridiem, onChange: (v) => setTime({ ...time, meridiem: v }) })
12027
+ ] }),
12028
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex justify-between px-1 text-sm", children: [
12029
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12030
+ text_button_default,
12031
+ {
12032
+ variant: "underline",
12033
+ color: "neutral",
12034
+ size: "sm",
12035
+ classNames: { base: "font-bold" },
12036
+ onClick: handleNow,
12037
+ children: nowTitle
12038
+ }
12039
+ ),
12040
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12041
+ text_button_default,
12042
+ {
12043
+ variant: "underline",
12044
+ size: "sm",
12045
+ classNames: { base: "font-bold" },
12046
+ onClick: () => handleConfirm(time),
12047
+ children: confirmTitle
12048
+ }
12049
+ )
12050
+ ] })
12051
+ ] });
12052
+ }
12053
+ );
12054
+ var Panel_default = TimePickerPanel;
12055
+
12056
+ // src/components/picker/timePicker/index.tsx
12057
+ var import_jsx_runtime38 = require("react/jsx-runtime");
12058
+ var TimePicker = (0, import_react37.forwardRef)((originalProps, ref) => {
11893
12059
  const [props, variantProps] = mapPropsVariants(originalProps, timePickerStyle.variantKeys);
11894
12060
  const {
11895
12061
  classNames,
11896
12062
  label,
11897
12063
  errorMessage,
11898
- valueRange,
11899
- onChangeRange,
11900
- size,
11901
- selectClassNames,
12064
+ value,
12065
+ onChange,
12066
+ size = "md",
12067
+ variant = "solid",
12068
+ full = false,
12069
+ disabled = false,
11902
12070
  placeholder = "",
12071
+ nowTitle,
12072
+ confirmTitle,
11903
12073
  ...inputProps
11904
- } = props;
11905
- const [selectedRange, setSelectedRange] = (0, import_react35.useState)(
11906
- valueRange || { start: "", end: "" }
11907
- );
11908
- const [isPanelOpen, setIsPanelOpen] = (0, import_react35.useState)(false);
11909
- const inputWrapperRef = (0, import_react35.useRef)(null);
11910
- const panelWrapperRef = (0, import_react35.useRef)(null);
11911
- const [panelPos, setPanelPos] = (0, import_react35.useState)({ top: -9999, left: -9999 });
11912
- const displayValue = (0, import_react35.useMemo)(() => {
11913
- if (selectedRange.start && selectedRange.end) {
11914
- return `${selectedRange.start} ~ ${selectedRange.end}`;
11915
- }
11916
- return "";
11917
- }, [selectedRange]);
11918
- const calculatePosition = (0, import_react35.useCallback)(() => {
12074
+ } = { ...props, ...variantProps };
12075
+ const slots = (0, import_react37.useMemo)(() => timePickerStyle({ ...variantProps }), [variantProps]);
12076
+ const [isPanelOpen, setIsPanelOpen] = (0, import_react37.useState)(false);
12077
+ const inputWrapperRef = (0, import_react37.useRef)(null);
12078
+ const panelWrapperRef = (0, import_react37.useRef)(null);
12079
+ const [panelPos, setPanelPos] = (0, import_react37.useState)({
12080
+ top: -9999,
12081
+ left: -9999
12082
+ });
12083
+ const displayValue = (0, import_react37.useMemo)(() => {
12084
+ if (!value) return "";
12085
+ const { hour, minute, meridiem } = convert24To12(value);
12086
+ return `${hour}:${minute} ${meridiem}`;
12087
+ }, [value]);
12088
+ const calculatePosition = (0, import_react37.useCallback)(() => {
11919
12089
  if (inputWrapperRef.current) {
11920
12090
  const rect = inputWrapperRef.current.getBoundingClientRect();
11921
- setPanelPos({ top: rect.bottom + window.scrollY + 6, left: rect.left + window.scrollX });
12091
+ setPanelPos({
12092
+ top: rect.bottom + window.scrollY + 6,
12093
+ left: rect.left + window.scrollX
12094
+ });
11922
12095
  }
11923
12096
  }, []);
11924
- const handleFocusInput = () => {
12097
+ const openPanel = () => {
11925
12098
  calculatePosition();
11926
12099
  setIsPanelOpen(true);
11927
12100
  };
11928
- const handleInputBlur = () => {
11929
- setTimeout(() => setIsPanelOpen(false), 150);
12101
+ const handleInputFocus = () => {
12102
+ openPanel();
11930
12103
  };
11931
12104
  const handleInputKeyDown = (e) => {
11932
12105
  if (e.key === "Enter" || e.key === " ") {
11933
12106
  e.preventDefault();
11934
12107
  calculatePosition();
11935
12108
  setIsPanelOpen((prev) => !prev);
11936
- } else if (e.key === "Escape") {
11937
- setIsPanelOpen(false);
11938
- }
11939
- };
11940
- const slots = (0, import_react35.useMemo)(() => timePickerStyle({ ...variantProps }), [variantProps]);
11941
- const renderHourOptions = () => {
11942
- return Array.from({ length: 24 }, (_, i) => {
11943
- const value = String(i).padStart(2, "0");
11944
- return { label: value, value };
11945
- });
11946
- };
11947
- const renderMinuteOptions = () => {
11948
- return Array.from({ length: 60 }, (_, i) => {
11949
- const value = String(i).padStart(2, "0");
11950
- return { label: value, value };
11951
- });
12109
+ } else if (e.key === "Escape") setIsPanelOpen(false);
11952
12110
  };
11953
- const defaultSelectClassNames = {
11954
- selectWrapper: "!w-[80px]",
11955
- optionsWrapper: "max-h-[300px]"
12111
+ const handleChange = (time) => {
12112
+ onChange(time);
12113
+ setIsPanelOpen(false);
11956
12114
  };
11957
- const handleRangeChange = (type, option) => {
11958
- const [shRaw, smRaw] = selectedRange.start.split(":");
11959
- const [ehRaw, emRaw] = selectedRange.end.split(":");
11960
- const sh = (shRaw != null ? shRaw : "00").padStart(2, "0");
11961
- const sm = (smRaw != null ? smRaw : "00").padStart(2, "0");
11962
- const eh = (ehRaw != null ? ehRaw : "00").padStart(2, "0");
11963
- const em = (emRaw != null ? emRaw : "00").padStart(2, "0");
11964
- const range = {
11965
- start: `${type === "startHour" ? option.value : sh}:${type === "startMinute" ? option.value : sm}`,
11966
- end: `${type === "endHour" ? option.value : eh}:${type === "endMinute" ? option.value : em}`
12115
+ (0, import_react37.useEffect)(() => {
12116
+ const handleClickOutside = (e) => {
12117
+ var _a, _b;
12118
+ const target = e.target;
12119
+ if ((_a = inputWrapperRef.current) == null ? void 0 : _a.contains(target)) return;
12120
+ if ((_b = panelWrapperRef.current) == null ? void 0 : _b.contains(target)) return;
12121
+ setIsPanelOpen(false);
11967
12122
  };
11968
- setSelectedRange(range);
11969
- onChangeRange == null ? void 0 : onChangeRange(range);
11970
- };
11971
- const mergedSelectClassNames = {
11972
- selectWrapper: (selectClassNames == null ? void 0 : selectClassNames.selectWrapper) || defaultSelectClassNames.selectWrapper,
11973
- optionsWrapper: (selectClassNames == null ? void 0 : selectClassNames.optionsWrapper) || defaultSelectClassNames.optionsWrapper
11974
- };
11975
- const getSelectValue = (timeString, part) => {
11976
- if (!timeString) return "00";
11977
- const [hour, minute] = timeString.split(":");
11978
- return part === "hour" ? hour || "00" : minute || "00";
11979
- };
11980
- const handleClearRange = () => {
11981
- const emptyRange = { start: "", end: "" };
11982
- setSelectedRange(emptyRange);
11983
- onChangeRange == null ? void 0 : onChangeRange(emptyRange);
11984
- };
11985
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
11986
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
11987
- label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
11988
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
11989
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref: inputWrapperRef, className: slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }), children: [
11990
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11991
- "input",
11992
- {
11993
- ...inputProps,
11994
- ref,
11995
- className: slots.input({ class: classNames == null ? void 0 : classNames.input }),
11996
- type: "text",
11997
- value: displayValue,
11998
- placeholder,
11999
- readOnly: true,
12000
- onFocus: handleFocusInput,
12001
- onBlur: handleInputBlur,
12002
- onKeyDown: handleInputKeyDown
12003
- }
12004
- ),
12005
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), children: [
12006
- displayValue && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12007
- Icon_default,
12008
- {
12009
- name: "close",
12010
- className: "text-neutral-light hover:text-neutral-main mr-[5px] cursor-pointer",
12011
- onClick: (e) => {
12012
- e.stopPropagation();
12013
- handleClearRange();
12014
- }
12015
- }
12016
- ),
12017
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12018
- Icon_default,
12019
- {
12020
- name: "clock",
12021
- className: "cursor-pointer",
12022
- onClick: () => {
12023
- calculatePosition();
12024
- setIsPanelOpen((v) => !v);
12025
- }
12026
- }
12027
- )
12028
- ] })
12029
- ] }),
12030
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
12031
- ] })
12032
- ] }),
12123
+ document.addEventListener("mousedown", handleClickOutside);
12124
+ return () => document.removeEventListener("mousedown", handleClickOutside);
12125
+ }, []);
12126
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
12127
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref: inputWrapperRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onClick: openPanel, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12128
+ input_default,
12129
+ {
12130
+ ...inputProps,
12131
+ autoComplete: "off",
12132
+ ref,
12133
+ label,
12134
+ value: displayValue,
12135
+ placeholder,
12136
+ errorMessage,
12137
+ size,
12138
+ variant,
12139
+ full,
12140
+ disabled,
12141
+ endContent: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon_default, { name: "clock", size, className: "cursor-pointer" }),
12142
+ onFocus: handleInputFocus,
12143
+ onKeyDown: handleInputKeyDown,
12144
+ onChange: () => {
12145
+ },
12146
+ classNames: {
12147
+ inputWrapper: classNames == null ? void 0 : classNames.inputWrapper,
12148
+ input: classNames == null ? void 0 : classNames.input,
12149
+ label: classNames == null ? void 0 : classNames.label,
12150
+ errorMessage: classNames == null ? void 0 : classNames.errorMessage
12151
+ }
12152
+ }
12153
+ ) }),
12033
12154
  isPanelOpen && (0, import_react_dom6.createPortal)(
12034
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12155
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12035
12156
  "div",
12036
12157
  {
12037
12158
  ref: panelWrapperRef,
12038
- className: slots.optionsWrapper({ class: classNames == null ? void 0 : classNames.optionsWrapper }),
12159
+ onMouseDown: (e) => e.preventDefault(),
12160
+ className: slots.portalWrapper({ class: classNames == null ? void 0 : classNames.portalWrapper }),
12039
12161
  style: {
12040
12162
  position: "absolute",
12041
12163
  top: panelPos.top,
12042
- left: panelPos.left,
12043
- zIndex: 1e3
12164
+ left: panelPos.left
12044
12165
  },
12045
- onMouseDown: (e) => e.preventDefault(),
12046
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-body-background text-neutral-main flex items-center gap-[5px] p-[10px]", children: [
12047
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-[5px]", children: [
12048
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12049
- select_default,
12050
- {
12051
- options: renderHourOptions(),
12052
- value: getSelectValue(selectedRange.start, "hour"),
12053
- onChange: (options) => {
12054
- if (options[0]) handleRangeChange("startHour", options[0]);
12055
- },
12056
- classNames: mergedSelectClassNames
12057
- }
12058
- ),
12059
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: ":" }),
12060
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12061
- select_default,
12062
- {
12063
- options: renderMinuteOptions(),
12064
- value: getSelectValue(selectedRange.start, "minute"),
12065
- onChange: (options) => {
12066
- if (options[0]) handleRangeChange("startMinute", options[0]);
12067
- },
12068
- classNames: mergedSelectClassNames
12069
- }
12070
- )
12071
- ] }),
12072
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "~" }),
12073
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-[5px]", children: [
12074
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12075
- select_default,
12076
- {
12077
- options: renderHourOptions(),
12078
- value: getSelectValue(selectedRange.end, "hour"),
12079
- onChange: (options) => {
12080
- if (options[0]) handleRangeChange("endHour", options[0]);
12081
- },
12082
- classNames: mergedSelectClassNames
12083
- }
12084
- ),
12085
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: ":" }),
12086
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12087
- select_default,
12088
- {
12089
- options: renderMinuteOptions(),
12090
- value: getSelectValue(selectedRange.end, "minute"),
12091
- onChange: (options) => {
12092
- if (options[0]) handleRangeChange("endMinute", options[0]);
12093
- },
12094
- classNames: mergedSelectClassNames
12095
- }
12096
- )
12097
- ] })
12098
- ] })
12166
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Panel_default, { nowTitle, confirmTitle, value, onChange: handleChange })
12099
12167
  }
12100
12168
  ),
12101
12169
  document.body
@@ -12132,24 +12200,44 @@ var timePickerStyle = tv({
12132
12200
  "group-has-[p.error]/timepicker:placeholder:text-danger-main",
12133
12201
  "cursor-pointer"
12134
12202
  ],
12135
- icon: [
12203
+ portalWrapper: [
12204
+ "rounded-[10px]",
12205
+ "bg-body-background",
12206
+ "shadow-drop-md",
12207
+ "overflow-auto",
12208
+ "p-[10px]",
12209
+ "w-[165px]",
12210
+ "h-[137px]",
12136
12211
  "flex",
12137
- "items-center",
12138
- "select-none",
12139
- "text-body-foreground",
12140
- "group-has-[p.error]/timepicker:text-danger-main"
12212
+ "flex-col",
12213
+ "gap-[5px]"
12141
12214
  ],
12142
- optionsWrapper: ["border", "rounded", "bg-body-background", "shadow", "overflow-auto"],
12143
- errorMessage: ["text-danger-main", "text-sm"],
12144
- selectWrapper: []
12215
+ errorMessage: ["text-danger-main", "text-sm"]
12145
12216
  },
12146
12217
  variants: {
12147
- color: {
12148
- primary: {
12149
- icon: ["text-primary-main"]
12218
+ variant: {
12219
+ solid: {
12220
+ inputWrapper: ["border-transparent", "bg-trans-soft"],
12221
+ readonlyWrapper: ["!bg-trans-light"]
12150
12222
  },
12151
- secondary: {
12152
- icon: ["text-secondary-main"]
12223
+ outline: {
12224
+ inputWrapper: [
12225
+ "border-neutral-light",
12226
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:bg-trans-soft",
12227
+ "group-has-[:focus:not(:read-only)]/input:bg-body-background",
12228
+ "group-has-[p.error]/input:border-danger-main"
12229
+ ],
12230
+ readonlyWrapper: ["!bg-trans-soft"]
12231
+ },
12232
+ underline: {
12233
+ inputWrapper: [
12234
+ "bg-transparent",
12235
+ "rounded-none",
12236
+ "group-has-[:hover:not(:read-only):not(:focus)]/input:bg-trans-soft",
12237
+ "group-has-[:focus:not(:read-only)]/input:bg-body-background",
12238
+ "group-has-[p.error]/input:border-danger-main"
12239
+ ],
12240
+ readonlyWrapper: ["!bg-trans-soft"]
12153
12241
  }
12154
12242
  },
12155
12243
  size: {
@@ -12159,7 +12247,6 @@ var timePickerStyle = tv({
12159
12247
  wrapper: ["gap-[4px]"],
12160
12248
  inputWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]"],
12161
12249
  input: ["text-sm"],
12162
- icon: ["text-sm"],
12163
12250
  errorMessage: ["text-sm"]
12164
12251
  },
12165
12252
  md: {
@@ -12168,7 +12255,6 @@ var timePickerStyle = tv({
12168
12255
  wrapper: ["gap-[6px]"],
12169
12256
  inputWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]"],
12170
12257
  input: ["text-md"],
12171
- icon: ["text-md"],
12172
12258
  errorMessage: ["text-sm"]
12173
12259
  },
12174
12260
  lg: {
@@ -12177,7 +12263,6 @@ var timePickerStyle = tv({
12177
12263
  wrapper: ["gap-[8px]"],
12178
12264
  inputWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]"],
12179
12265
  input: ["text-lg"],
12180
- icon: ["text-lg"],
12181
12266
  errorMessage: ["text-md"]
12182
12267
  },
12183
12268
  xl: {
@@ -12186,7 +12271,6 @@ var timePickerStyle = tv({
12186
12271
  wrapper: ["gap-[10px]"],
12187
12272
  inputWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]"],
12188
12273
  input: ["text-xl"],
12189
- icon: ["text-xl"],
12190
12274
  errorMessage: ["text-md"]
12191
12275
  }
12192
12276
  },
@@ -12216,7 +12300,6 @@ var timePickerStyle = tv({
12216
12300
  "group-has-[p.error]/timepicker:placeholder:text-danger-light",
12217
12301
  "cursor-not-allowed"
12218
12302
  ],
12219
- icon: ["text-neutral-light"],
12220
12303
  errorMessage: ["text-danger-light"]
12221
12304
  }
12222
12305
  }
@@ -12230,30 +12313,30 @@ var timePickerStyle = tv({
12230
12313
  });
12231
12314
 
12232
12315
  // src/components/tree/tree.tsx
12233
- var import_react36 = require("react");
12234
- var import_jsx_runtime37 = require("react/jsx-runtime");
12235
- var TreeNodeItemBase = (0, import_react36.forwardRef)(
12316
+ var import_react38 = require("react");
12317
+ var import_jsx_runtime39 = require("react/jsx-runtime");
12318
+ var TreeNodeItemBase = (0, import_react38.forwardRef)(
12236
12319
  ({ node, depth, fileIcon, selectedName, classNames, onExpand }, ref) => {
12237
- const slots = (0, import_react36.useMemo)(() => treeStyle(), []);
12238
- const hasSelectedInChildren = (0, import_react36.useCallback)(
12320
+ const slots = (0, import_react38.useMemo)(() => treeStyle(), []);
12321
+ const hasSelectedInChildren = (0, import_react38.useCallback)(
12239
12322
  (children2) => {
12240
12323
  if (!children2 || !selectedName) return false;
12241
12324
  return children2.some((child) => child.selectedName === selectedName || hasSelectedInChildren(child.children));
12242
12325
  },
12243
12326
  [selectedName]
12244
12327
  );
12245
- const [children, setChildren] = (0, import_react36.useState)(node.children);
12246
- const [isOpen, setIsOpen] = (0, import_react36.useState)(() => {
12328
+ const [children, setChildren] = (0, import_react38.useState)(node.children);
12329
+ const [isOpen, setIsOpen] = (0, import_react38.useState)(() => {
12247
12330
  if (!selectedName) return false;
12248
12331
  return hasSelectedInChildren(node.children);
12249
12332
  });
12250
- const hasOpenedInitially = (0, import_react36.useRef)(false);
12251
- const hasMore = (0, import_react36.useMemo)(() => {
12333
+ const hasOpenedInitially = (0, import_react38.useRef)(false);
12334
+ const hasMore = (0, import_react38.useMemo)(() => {
12252
12335
  if (node.isLeaf) return false;
12253
12336
  if (Array.isArray(children)) return children.length > 0;
12254
12337
  return typeof onExpand === "function";
12255
12338
  }, [node.isLeaf, children, onExpand]);
12256
- const toggleOpen = (0, import_react36.useCallback)(async () => {
12339
+ const toggleOpen = (0, import_react38.useCallback)(async () => {
12257
12340
  if (!isOpen && !children && onExpand && !node.isLeaf) {
12258
12341
  try {
12259
12342
  const result = await onExpand(node);
@@ -12274,7 +12357,7 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
12274
12357
  e.preventDefault();
12275
12358
  (_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
12276
12359
  };
12277
- (0, import_react36.useEffect)(() => {
12360
+ (0, import_react38.useEffect)(() => {
12278
12361
  if (!selectedName) return;
12279
12362
  if (!hasOpenedInitially.current) {
12280
12363
  const shouldOpen = hasSelectedInChildren(children);
@@ -12282,7 +12365,7 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
12282
12365
  hasOpenedInitially.current = true;
12283
12366
  }
12284
12367
  }, [selectedName, children, hasSelectedInChildren]);
12285
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12368
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
12286
12369
  "div",
12287
12370
  {
12288
12371
  ref,
@@ -12291,7 +12374,7 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
12291
12374
  slots.gap({ class: classNames == null ? void 0 : classNames.gap })
12292
12375
  ),
12293
12376
  children: [
12294
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12377
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
12295
12378
  "div",
12296
12379
  {
12297
12380
  className: clsx(
@@ -12302,7 +12385,7 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
12302
12385
  onClick: handleClick,
12303
12386
  onContextMenu: handleRightClick,
12304
12387
  children: [
12305
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12388
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12306
12389
  Icon_default,
12307
12390
  {
12308
12391
  name: "right-chevron",
@@ -12317,7 +12400,7 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
12317
12400
  ]
12318
12401
  }
12319
12402
  ),
12320
- isOpen && hasMore && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12403
+ isOpen && hasMore && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12321
12404
  TreeNodeItem,
12322
12405
  {
12323
12406
  node: child,
@@ -12335,9 +12418,9 @@ var TreeNodeItemBase = (0, import_react36.forwardRef)(
12335
12418
  }
12336
12419
  );
12337
12420
  TreeNodeItemBase.displayName = "TreeNodeItem";
12338
- var TreeNodeItem = (0, import_react36.memo)(TreeNodeItemBase);
12421
+ var TreeNodeItem = (0, import_react38.memo)(TreeNodeItemBase);
12339
12422
  var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedName, classNames, onExpand }) => {
12340
- const slots = (0, import_react36.useMemo)(() => treeStyle(), []);
12423
+ const slots = (0, import_react38.useMemo)(() => treeStyle(), []);
12341
12424
  const handleClick = (e) => {
12342
12425
  var _a;
12343
12426
  (_a = group.onClick) == null ? void 0 : _a.call(group, e);
@@ -12347,10 +12430,10 @@ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedName, className
12347
12430
  e.preventDefault();
12348
12431
  (_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
12349
12432
  };
12350
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
12351
- headerContent && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: headerContent }),
12352
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
12353
- group.content && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12433
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
12434
+ headerContent && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: headerContent }),
12435
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
12436
+ group.content && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
12354
12437
  "div",
12355
12438
  {
12356
12439
  className: clsx(
@@ -12366,7 +12449,7 @@ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedName, className
12366
12449
  ]
12367
12450
  }
12368
12451
  ),
12369
- group.data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: slots.itemWrapper({ class: classNames == null ? void 0 : classNames.itemWrapper }), children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12452
+ group.data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: slots.itemWrapper({ class: classNames == null ? void 0 : classNames.itemWrapper }), children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12370
12453
  TreeNodeItem,
12371
12454
  {
12372
12455
  node,
@@ -12405,19 +12488,19 @@ var treeStyle = tv({
12405
12488
  });
12406
12489
 
12407
12490
  // src/components/fileUpload/fileUpload.tsx
12408
- var import_react39 = require("react");
12491
+ var import_react41 = require("react");
12409
12492
  var import_tailwind_variants34 = require("tailwind-variants");
12410
12493
 
12411
12494
  // src/components/progress/progress.tsx
12412
- var import_react38 = require("react");
12495
+ var import_react40 = require("react");
12413
12496
 
12414
12497
  // src/hooks/useIsMounted.ts
12415
- var import_react37 = require("react");
12498
+ var import_react39 = require("react");
12416
12499
  function useIsMounted(props = {}) {
12417
12500
  const { rerender = false, delay = 0 } = props;
12418
- const isMountedRef = (0, import_react37.useRef)(false);
12419
- const [isMounted, setIsMounted] = (0, import_react37.useState)(false);
12420
- (0, import_react37.useEffect)(() => {
12501
+ const isMountedRef = (0, import_react39.useRef)(false);
12502
+ const [isMounted, setIsMounted] = (0, import_react39.useState)(false);
12503
+ (0, import_react39.useEffect)(() => {
12421
12504
  isMountedRef.current = true;
12422
12505
  let timer = null;
12423
12506
  if (rerender) {
@@ -12439,11 +12522,11 @@ function useIsMounted(props = {}) {
12439
12522
  }
12440
12523
  };
12441
12524
  }, [rerender]);
12442
- return [(0, import_react37.useCallback)(() => isMountedRef.current, []), isMounted];
12525
+ return [(0, import_react39.useCallback)(() => isMountedRef.current, []), isMounted];
12443
12526
  }
12444
12527
 
12445
12528
  // src/components/progress/progress.tsx
12446
- var import_jsx_runtime38 = require("react/jsx-runtime");
12529
+ var import_jsx_runtime40 = require("react/jsx-runtime");
12447
12530
  var Progress = (originalProps) => {
12448
12531
  const [props, variantProps] = mapPropsVariants(originalProps, progressStyle.variantKeys);
12449
12532
  const { children, classNames, value = 0, minValue = 0, maxValue = 100, ...progressProps } = props;
@@ -12453,12 +12536,12 @@ var Progress = (originalProps) => {
12453
12536
  delay: 100
12454
12537
  });
12455
12538
  const selfMounted = variantProps.disableAnimation ? true : isMounted;
12456
- const percentage = (0, import_react38.useMemo)(
12539
+ const percentage = (0, import_react40.useMemo)(
12457
12540
  () => isIndeterminate || !selfMounted ? void 0 : clampPercentage((value - minValue) / (maxValue - minValue) * 100),
12458
12541
  [selfMounted, isIndeterminate, value, minValue, maxValue]
12459
12542
  );
12460
- const slots = (0, import_react38.useMemo)(() => progressStyle({ ...variantProps }), [variantProps]);
12461
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: slots.track({ class: classNames == null ? void 0 : classNames.track }), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
12543
+ const slots = (0, import_react40.useMemo)(() => progressStyle({ ...variantProps }), [variantProps]);
12544
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: slots.track({ class: classNames == null ? void 0 : classNames.track }), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12462
12545
  "div",
12463
12546
  {
12464
12547
  className: slots.indicator({ class: classNames == null ? void 0 : classNames.indicator }),
@@ -12557,7 +12640,7 @@ var clampPercentage = (value) => {
12557
12640
  };
12558
12641
 
12559
12642
  // src/components/fileUpload/fileUpload.tsx
12560
- var import_jsx_runtime39 = require("react/jsx-runtime");
12643
+ var import_jsx_runtime41 = require("react/jsx-runtime");
12561
12644
  function FileUpload({
12562
12645
  buttonText,
12563
12646
  cancelText,
@@ -12576,16 +12659,16 @@ function FileUpload({
12576
12659
  classNames,
12577
12660
  defaultFile
12578
12661
  }) {
12579
- const fileInputRef = (0, import_react39.useRef)(null);
12580
- const uploadIntervalRef = (0, import_react39.useRef)(null);
12581
- const [currentFile, setCurrentFile] = (0, import_react39.useState)(null);
12582
- const [uploadProgress, setUploadProgress] = (0, import_react39.useState)(0);
12583
- const [message, setMessage] = (0, import_react39.useState)(errorMessage);
12584
- const [displayFileName, setDisplayFileName] = (0, import_react39.useState)("");
12585
- const [hasUploadedFile, setHasUploadedFile] = (0, import_react39.useState)(false);
12586
- const [isUploading, setIsUploading] = (0, import_react39.useState)(false);
12662
+ const fileInputRef = (0, import_react41.useRef)(null);
12663
+ const uploadIntervalRef = (0, import_react41.useRef)(null);
12664
+ const [currentFile, setCurrentFile] = (0, import_react41.useState)(null);
12665
+ const [uploadProgress, setUploadProgress] = (0, import_react41.useState)(0);
12666
+ const [message, setMessage] = (0, import_react41.useState)(errorMessage);
12667
+ const [displayFileName, setDisplayFileName] = (0, import_react41.useState)("");
12668
+ const [hasUploadedFile, setHasUploadedFile] = (0, import_react41.useState)(false);
12669
+ const [isUploading, setIsUploading] = (0, import_react41.useState)(false);
12587
12670
  const slots = fileUploadStyle();
12588
- (0, import_react39.useEffect)(() => {
12671
+ (0, import_react41.useEffect)(() => {
12589
12672
  if (defaultFile == null ? void 0 : defaultFile.name) {
12590
12673
  setDisplayFileName(defaultFile.name);
12591
12674
  setHasUploadedFile(true);
@@ -12659,21 +12742,21 @@ function FileUpload({
12659
12742
  }
12660
12743
  if (onCancelUpload) onCancelUpload();
12661
12744
  };
12662
- (0, import_react39.useEffect)(() => {
12745
+ (0, import_react41.useEffect)(() => {
12663
12746
  return () => {
12664
12747
  if (uploadIntervalRef.current) {
12665
12748
  clearInterval(uploadIntervalRef.current);
12666
12749
  }
12667
12750
  };
12668
12751
  }, []);
12669
- (0, import_react39.useEffect)(() => {
12752
+ (0, import_react41.useEffect)(() => {
12670
12753
  if (errorMessage !== void 0) {
12671
12754
  setMessage(errorMessage);
12672
12755
  }
12673
12756
  }, [errorMessage]);
12674
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
12675
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
12676
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: slots.inputWrapper(), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12757
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
12758
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
12759
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: slots.inputWrapper(), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12677
12760
  input_default,
12678
12761
  {
12679
12762
  name,
@@ -12685,14 +12768,14 @@ function FileUpload({
12685
12768
  errorMessage: message && (message == null ? void 0 : message.length) > 0 ? message : void 0
12686
12769
  }
12687
12770
  ) }),
12688
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-[10px]", children: [
12689
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(button_default, { type: "button", variant: "outline", onClick: handleButtonClick, isLoading: isUploading, children: buttonText }),
12690
- cancelText && (hasUploadedFile || displayFileName) && !isUploading && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(button_default, { type: "button", variant: "soft", color: "danger", onClick: handleCancelUpload, children: cancelText })
12771
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-[10px]", children: [
12772
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(button_default, { type: "button", variant: "outline", onClick: handleButtonClick, isLoading: isUploading, children: buttonText }),
12773
+ cancelText && (hasUploadedFile || displayFileName) && !isUploading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(button_default, { type: "button", variant: "soft", color: "danger", onClick: handleCancelUpload, children: cancelText })
12691
12774
  ] }),
12692
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { ref: fileInputRef, type: "file", hidden: true, accept: accept.join(","), onChange: handleFileChange })
12775
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("input", { ref: fileInputRef, type: "file", hidden: true, accept: accept.join(","), onChange: handleFileChange })
12693
12776
  ] }),
12694
- showProgress && currentFile && hasUploadedFile && uploadProgress < 100 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(progress_default, { value: uploadProgress }),
12695
- !message && helperMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: slots.helperMessage(), children: helperMessage })
12777
+ showProgress && currentFile && hasUploadedFile && uploadProgress < 100 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(progress_default, { value: uploadProgress }),
12778
+ !message && helperMessage && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: slots.helperMessage(), children: helperMessage })
12696
12779
  ] });
12697
12780
  }
12698
12781
  FileUpload.displayName = "FileUpload";
@@ -12710,7 +12793,7 @@ var fileUploadStyle = (0, import_tailwind_variants34.tv)({
12710
12793
 
12711
12794
  // src/components/skeleton/skeleton.tsx
12712
12795
  var import_tailwind_variants35 = require("tailwind-variants");
12713
- var import_jsx_runtime40 = require("react/jsx-runtime");
12796
+ var import_jsx_runtime42 = require("react/jsx-runtime");
12714
12797
  var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
12715
12798
  const speedMap = {
12716
12799
  fast: "0.7s",
@@ -12718,14 +12801,14 @@ var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md"
12718
12801
  slow: "2s"
12719
12802
  };
12720
12803
  const slots = skeletonStyle();
12721
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12804
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12722
12805
  "div",
12723
12806
  {
12724
12807
  className: clsx(slots.base({ color, rounded }), className),
12725
12808
  style: {
12726
12809
  "--shimmer-duration": speedMap[speed]
12727
12810
  },
12728
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("style", { children: `@keyframes shimmer {
12811
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: `@keyframes shimmer {
12729
12812
  100% {
12730
12813
  transform: translateX(100%);
12731
12814
  }
@@ -12779,12 +12862,12 @@ var skeletonStyle = (0, import_tailwind_variants35.tv)({
12779
12862
 
12780
12863
  // src/components/charts/circularProgress.tsx
12781
12864
  var import_recharts = require("recharts");
12782
- var import_react40 = require("react");
12783
- var import_jsx_runtime41 = require("react/jsx-runtime");
12784
- var CircularProgress = (0, import_react40.forwardRef)((originalProps, ref) => {
12865
+ var import_react42 = require("react");
12866
+ var import_jsx_runtime43 = require("react/jsx-runtime");
12867
+ var CircularProgress = (0, import_react42.forwardRef)((originalProps, ref) => {
12785
12868
  const [props, variantProps] = mapPropsVariants(originalProps, circularProgressStyle.variantKeys);
12786
12869
  const { label, size = 150, percentage, innerContent, classNames } = { ...props, ...variantProps };
12787
- const slots = (0, import_react40.useMemo)(() => circularProgressStyle({ ...variantProps }), [variantProps]);
12870
+ const slots = (0, import_react42.useMemo)(() => circularProgressStyle({ ...variantProps }), [variantProps]);
12788
12871
  const data = [
12789
12872
  {
12790
12873
  name: label,
@@ -12816,12 +12899,12 @@ var CircularProgress = (0, import_react40.forwardRef)((originalProps, ref) => {
12816
12899
  const colorValue = originalProps.color;
12817
12900
  const colorKey = colorValue || "blue";
12818
12901
  const currentGradient = gradientColors[colorKey];
12819
- const wrappedInnerContent = (0, import_react40.useMemo)(() => {
12902
+ const wrappedInnerContent = (0, import_react42.useMemo)(() => {
12820
12903
  return wrapSpanWithClass(innerContent);
12821
12904
  }, [innerContent]);
12822
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
12823
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
12824
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
12905
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
12906
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative", style: { width: size, height: size }, children: [
12907
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12825
12908
  import_recharts.RadialBarChart,
12826
12909
  {
12827
12910
  width: size,
@@ -12833,11 +12916,11 @@ var CircularProgress = (0, import_react40.forwardRef)((originalProps, ref) => {
12833
12916
  startAngle: 90,
12834
12917
  endAngle: -270,
12835
12918
  children: [
12836
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
12837
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { offset: "0%", stopColor: currentGradient.start }),
12838
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("stop", { offset: "100%", stopColor: currentGradient.end })
12919
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
12920
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: currentGradient.start }),
12921
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: currentGradient.end })
12839
12922
  ] }) }),
12840
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12923
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12841
12924
  "circle",
12842
12925
  {
12843
12926
  cx: size / 2,
@@ -12848,7 +12931,7 @@ var CircularProgress = (0, import_react40.forwardRef)((originalProps, ref) => {
12848
12931
  strokeWidth: "1"
12849
12932
  }
12850
12933
  ),
12851
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12934
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12852
12935
  "circle",
12853
12936
  {
12854
12937
  cx: size / 2,
@@ -12859,14 +12942,14 @@ var CircularProgress = (0, import_react40.forwardRef)((originalProps, ref) => {
12859
12942
  strokeWidth: BAR_SIZE
12860
12943
  }
12861
12944
  ),
12862
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_recharts.PolarAngleAxis, { type: "number", domain: [0, 100], angleAxisId: 0, tick: false }),
12863
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_recharts.RadialBar, { dataKey: "value", cornerRadius: 12, animationDuration: 1e3, fill: `url(#${gradientId})` })
12945
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_recharts.PolarAngleAxis, { type: "number", domain: [0, 100], angleAxisId: 0, tick: false }),
12946
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_recharts.RadialBar, { dataKey: "value", cornerRadius: 12, animationDuration: 1e3, fill: `url(#${gradientId})` })
12864
12947
  ]
12865
12948
  }
12866
12949
  ),
12867
- innerContent && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: slots.inner({ class: classNames == null ? void 0 : classNames.inner }), children: wrappedInnerContent })
12950
+ innerContent && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: slots.inner({ class: classNames == null ? void 0 : classNames.inner }), children: wrappedInnerContent })
12868
12951
  ] }),
12869
- label && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })
12952
+ label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label })
12870
12953
  ] });
12871
12954
  });
12872
12955
  CircularProgress.displayName = "CircularProgress";
@@ -12910,16 +12993,16 @@ function wrapSpanWithClass(node) {
12910
12993
  if (Array.isArray(node)) {
12911
12994
  return node.map(wrapSpanWithClass);
12912
12995
  }
12913
- if ((0, import_react40.isValidElement)(node)) {
12996
+ if ((0, import_react42.isValidElement)(node)) {
12914
12997
  const element = node;
12915
12998
  if (element.type === "span") {
12916
12999
  const existing = (_a = element.props.className) != null ? _a : "";
12917
- return (0, import_react40.cloneElement)(element, {
13000
+ return (0, import_react42.cloneElement)(element, {
12918
13001
  className: `text-xl font-bold ${existing}`.trim()
12919
13002
  });
12920
13003
  }
12921
13004
  if (element.props.children) {
12922
- return (0, import_react40.cloneElement)(element, {
13005
+ return (0, import_react42.cloneElement)(element, {
12923
13006
  children: wrapSpanWithClass(element.props.children)
12924
13007
  });
12925
13008
  }
@@ -12929,11 +13012,11 @@ function wrapSpanWithClass(node) {
12929
13012
  }
12930
13013
 
12931
13014
  // src/components/charts/areaChart.tsx
12932
- var import_react41 = require("react");
13015
+ var import_react43 = require("react");
12933
13016
  var import_recharts2 = require("recharts");
12934
- var import_jsx_runtime42 = require("react/jsx-runtime");
12935
- var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) => {
12936
- const uniqueId = (0, import_react41.useId)();
13017
+ var import_jsx_runtime44 = require("react/jsx-runtime");
13018
+ var AreaChartComponent = (0, import_react43.forwardRef)((originalProps, ref) => {
13019
+ const uniqueId = (0, import_react43.useId)();
12937
13020
  const [props, variantProps] = mapPropsVariants(originalProps, areaChartStyle.variantKeys);
12938
13021
  const {
12939
13022
  data,
@@ -12945,34 +13028,34 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
12945
13028
  chartHeight = 240,
12946
13029
  classNames
12947
13030
  } = { ...props, ...variantProps };
12948
- const slots = (0, import_react41.useMemo)(() => areaChartStyle({ ...variantProps }), [variantProps]);
13031
+ const slots = (0, import_react43.useMemo)(() => areaChartStyle({ ...variantProps }), [variantProps]);
12949
13032
  const COLOR_MAP = {
12950
13033
  primary: "#3F9CF2",
12951
13034
  danger: "#FF4684"
12952
13035
  };
12953
- const colorHex = (0, import_react41.useMemo)(() => COLOR_MAP[color], [color]);
12954
- const totalChartWidth = (0, import_react41.useMemo)(() => {
13036
+ const colorHex = (0, import_react43.useMemo)(() => COLOR_MAP[color], [color]);
13037
+ const totalChartWidth = (0, import_react43.useMemo)(() => {
12955
13038
  if (!data || !itemWidth) return void 0;
12956
13039
  const dataLength = startFromZero ? data.length + 1 : data.length;
12957
13040
  return dataLength * itemWidth;
12958
13041
  }, [data, itemWidth, startFromZero]);
12959
- const needsScroll = (0, import_react41.useMemo)(() => {
13042
+ const needsScroll = (0, import_react43.useMemo)(() => {
12960
13043
  return totalChartWidth;
12961
13044
  }, [totalChartWidth]);
12962
- const processedData = (0, import_react41.useMemo)(() => {
13045
+ const processedData = (0, import_react43.useMemo)(() => {
12963
13046
  if (!data) return [];
12964
13047
  return data;
12965
13048
  }, [data, startFromZero]);
12966
- const [tickPositions, setTickPositions] = (0, import_react41.useState)([]);
12967
- const tickRef = (0, import_react41.useRef)([]);
13049
+ const [tickPositions, setTickPositions] = (0, import_react43.useState)([]);
13050
+ const tickRef = (0, import_react43.useRef)([]);
12968
13051
  const CustomTick = ({ x, y, payload }) => {
12969
13052
  if (x !== void 0) {
12970
13053
  tickRef.current.push(x);
12971
13054
  }
12972
13055
  if (startFromZero && payload.value === "") {
12973
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("g", {});
13056
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("g", {});
12974
13057
  }
12975
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
13058
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12976
13059
  "text",
12977
13060
  {
12978
13061
  x,
@@ -12986,7 +13069,7 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
12986
13069
  }
12987
13070
  );
12988
13071
  };
12989
- (0, import_react41.useEffect)(() => {
13072
+ (0, import_react43.useEffect)(() => {
12990
13073
  const raf = requestAnimationFrame(() => {
12991
13074
  const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
12992
13075
  const mids = [];
@@ -13004,19 +13087,19 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13004
13087
  if (startFromZero && (payload == null ? void 0 : payload.name) === "") {
13005
13088
  return null;
13006
13089
  }
13007
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
13008
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("circle", { cx, cy, r: 8, fill, opacity: 0.2 }),
13009
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("circle", { cx, cy, r: 3.5, fill, stroke, strokeWidth: 2 })
13090
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
13091
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx, cy, r: 8, fill, opacity: 0.2 }),
13092
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx, cy, r: 3.5, fill, stroke, strokeWidth: 2 })
13010
13093
  ] });
13011
13094
  };
13012
- const chartContent = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
13095
+ const chartContent = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13013
13096
  "div",
13014
13097
  {
13015
13098
  style: {
13016
13099
  width: totalChartWidth || "100%",
13017
13100
  minWidth: totalChartWidth || "100%"
13018
13101
  },
13019
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
13102
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
13020
13103
  import_recharts2.AreaChart,
13021
13104
  {
13022
13105
  width: totalChartWidth || 400,
@@ -13025,11 +13108,11 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13025
13108
  margin: { left: -30 },
13026
13109
  className: "bg-body-background [&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13027
13110
  children: [
13028
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
13029
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
13030
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
13111
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("linearGradient", { id: `colorGradient-${uniqueId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
13112
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("stop", { offset: "5%", stopColor: colorHex, stopOpacity: 0.3 }),
13113
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("stop", { offset: "95%", stopColor: colorHex, stopOpacity: 0 })
13031
13114
  ] }) }),
13032
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
13115
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13033
13116
  import_recharts2.CartesianGrid,
13034
13117
  {
13035
13118
  vertical: true,
@@ -13039,7 +13122,7 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13039
13122
  verticalPoints: tickPositions
13040
13123
  }
13041
13124
  ),
13042
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
13125
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13043
13126
  import_recharts2.XAxis,
13044
13127
  {
13045
13128
  dataKey: "name",
@@ -13049,7 +13132,7 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13049
13132
  padding: { left: 35.5, right: 35.5 }
13050
13133
  }
13051
13134
  ),
13052
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
13135
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13053
13136
  import_recharts2.YAxis,
13054
13137
  {
13055
13138
  axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
@@ -13065,7 +13148,7 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13065
13148
  domain: [-6, 110]
13066
13149
  }
13067
13150
  ),
13068
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
13151
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13069
13152
  import_recharts2.Area,
13070
13153
  {
13071
13154
  type: "monotone",
@@ -13073,7 +13156,7 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13073
13156
  stroke: colorHex,
13074
13157
  strokeWidth: 2,
13075
13158
  fill: `url(#colorGradient-${uniqueId})`,
13076
- dot: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
13159
+ dot: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CustomDotWithShadow, { stroke: colorHex, fill: colorHex }),
13077
13160
  activeDot: false
13078
13161
  }
13079
13162
  )
@@ -13082,10 +13165,10 @@ var AreaChartComponent = (0, import_react41.forwardRef)((originalProps, ref) =>
13082
13165
  )
13083
13166
  }
13084
13167
  );
13085
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
13086
- label && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13168
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
13169
+ label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13087
13170
  headerContent,
13088
- needsScroll ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(scrollArea_default, { direction: "x", size: "sm", children: chartContent }) : chartContent
13171
+ needsScroll ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(scrollArea_default, { direction: "x", size: "sm", children: chartContent }) : chartContent
13089
13172
  ] });
13090
13173
  });
13091
13174
  AreaChartComponent.displayName = "AreaChart";
@@ -13113,10 +13196,10 @@ var areaChartStyle = tv({
13113
13196
  });
13114
13197
 
13115
13198
  // src/components/charts/barChart.tsx
13116
- var import_react42 = require("react");
13199
+ var import_react44 = require("react");
13117
13200
  var import_recharts3 = require("recharts");
13118
- var import_jsx_runtime43 = require("react/jsx-runtime");
13119
- var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13201
+ var import_jsx_runtime45 = require("react/jsx-runtime");
13202
+ var BarChartComponent = (0, import_react44.forwardRef)((originalProps, ref) => {
13120
13203
  const [props, variantProps] = mapPropsVariants(originalProps, barChartStyle.variantKeys);
13121
13204
  const {
13122
13205
  data = [],
@@ -13128,13 +13211,13 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13128
13211
  barGap = 20,
13129
13212
  tooltipFormatter
13130
13213
  } = { ...props, ...variantProps };
13131
- const slots = (0, import_react42.useMemo)(() => barChartStyle({ ...variantProps }), [variantProps]);
13132
- const chartRef = (0, import_react42.useRef)(null);
13133
- const tooltipRef = (0, import_react42.useRef)(null);
13134
- const [tooltipLeft, setTooltipLeft] = (0, import_react42.useState)(0);
13135
- const [tickPositions, setTickPositions] = (0, import_react42.useState)([]);
13136
- const tickRef = (0, import_react42.useRef)([]);
13137
- const [tooltipState, setTooltipState] = (0, import_react42.useState)(null);
13214
+ const slots = (0, import_react44.useMemo)(() => barChartStyle({ ...variantProps }), [variantProps]);
13215
+ const chartRef = (0, import_react44.useRef)(null);
13216
+ const tooltipRef = (0, import_react44.useRef)(null);
13217
+ const [tooltipLeft, setTooltipLeft] = (0, import_react44.useState)(0);
13218
+ const [tickPositions, setTickPositions] = (0, import_react44.useState)([]);
13219
+ const tickRef = (0, import_react44.useRef)([]);
13220
+ const [tooltipState, setTooltipState] = (0, import_react44.useState)(null);
13138
13221
  const handleMouseEnter = (e, dataKey) => {
13139
13222
  if (!tooltipFormatter || !chartRef.current) return;
13140
13223
  const { payload, x, y } = e;
@@ -13163,17 +13246,17 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13163
13246
  const adjustedHeight = height + extraHeight;
13164
13247
  const adjustedY = y;
13165
13248
  const bottomY = adjustedY + adjustedHeight;
13166
- return height ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13249
+ return height ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13167
13250
  "path",
13168
13251
  {
13169
13252
  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`,
13170
13253
  fill
13171
13254
  }
13172
- ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("rect", { x, y, width, height: 0, fill });
13255
+ ) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("rect", { x, y, width, height: 0, fill });
13173
13256
  };
13174
13257
  const CustomTick = ({ x, y, payload }) => {
13175
13258
  if (x !== void 0) tickRef.current.push(x);
13176
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13259
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13177
13260
  "text",
13178
13261
  {
13179
13262
  x,
@@ -13187,7 +13270,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13187
13270
  }
13188
13271
  );
13189
13272
  };
13190
- const CustomYAxisTick = ({ x, y, payload }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13273
+ const CustomYAxisTick = ({ x, y, payload }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13191
13274
  "text",
13192
13275
  {
13193
13276
  x: x - 10,
@@ -13201,7 +13284,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13201
13284
  children: yAxisTickFormatter(payload.value)
13202
13285
  }
13203
13286
  );
13204
- (0, import_react42.useEffect)(() => {
13287
+ (0, import_react44.useEffect)(() => {
13205
13288
  const raf = requestAnimationFrame(() => {
13206
13289
  const unique = [...new Set(tickRef.current)].sort((a, b) => a - b);
13207
13290
  const mids = [];
@@ -13213,7 +13296,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13213
13296
  });
13214
13297
  return () => cancelAnimationFrame(raf);
13215
13298
  }, [data]);
13216
- (0, import_react42.useLayoutEffect)(() => {
13299
+ (0, import_react44.useLayoutEffect)(() => {
13217
13300
  if (!tooltipState || !chartRef.current || !tooltipRef.current) return;
13218
13301
  const chartRect = chartRef.current.getBoundingClientRect();
13219
13302
  const tooltipRect = tooltipRef.current.getBoundingClientRect();
@@ -13228,7 +13311,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13228
13311
  }
13229
13312
  setTooltipLeft(left);
13230
13313
  }, [tooltipState]);
13231
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
13314
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13232
13315
  "div",
13233
13316
  {
13234
13317
  ref: chartRef,
@@ -13241,8 +13324,8 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13241
13324
  }
13242
13325
  },
13243
13326
  children: [
13244
- label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13245
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
13327
+ label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13328
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13246
13329
  import_recharts3.BarChart,
13247
13330
  {
13248
13331
  data,
@@ -13251,21 +13334,21 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13251
13334
  barGap,
13252
13335
  className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13253
13336
  children: [
13254
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("defs", { children: [
13255
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13256
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#DEC1FA" }),
13257
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#3F9CF2" })
13337
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("defs", { children: [
13338
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id: "blueGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13339
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "0%", stopColor: "#DEC1FA" }),
13340
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "100%", stopColor: "#3F9CF2" })
13258
13341
  ] }),
13259
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13260
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#C2E59C" }),
13261
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#64B3F4" })
13342
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id: "greenGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13343
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "0%", stopColor: "#C2E59C" }),
13344
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "100%", stopColor: "#64B3F4" })
13262
13345
  ] }),
13263
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13264
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "0%", stopColor: "#DDD6F3" }),
13265
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("stop", { offset: "100%", stopColor: "#FAACA8" })
13346
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id: "pinkGradient", x1: "0", y1: "0", x2: "0", y2: "1", children: [
13347
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "0%", stopColor: "#DDD6F3" }),
13348
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "100%", stopColor: "#FAACA8" })
13266
13349
  ] })
13267
13350
  ] }),
13268
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13351
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13269
13352
  import_recharts3.CartesianGrid,
13270
13353
  {
13271
13354
  vertical: true,
@@ -13275,7 +13358,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13275
13358
  verticalPoints: tickPositions
13276
13359
  }
13277
13360
  ),
13278
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13361
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13279
13362
  import_recharts3.XAxis,
13280
13363
  {
13281
13364
  dataKey: "title",
@@ -13285,7 +13368,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13285
13368
  padding: { left: 0, right: 0 }
13286
13369
  }
13287
13370
  ),
13288
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13371
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13289
13372
  import_recharts3.YAxis,
13290
13373
  {
13291
13374
  axisLine: { stroke: "#DFE2E7", strokeWidth: 1 },
@@ -13295,7 +13378,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13295
13378
  domain: yAxisDomain
13296
13379
  }
13297
13380
  ),
13298
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13381
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13299
13382
  import_recharts3.Bar,
13300
13383
  {
13301
13384
  dataKey: "blue",
@@ -13305,7 +13388,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13305
13388
  onMouseLeave: handleMouseLeave
13306
13389
  }
13307
13390
  ),
13308
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13391
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13309
13392
  import_recharts3.Bar,
13310
13393
  {
13311
13394
  dataKey: "green",
@@ -13315,7 +13398,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13315
13398
  onMouseLeave: handleMouseLeave
13316
13399
  }
13317
13400
  ),
13318
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13401
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13319
13402
  import_recharts3.Bar,
13320
13403
  {
13321
13404
  dataKey: "pink",
@@ -13328,7 +13411,7 @@ var BarChartComponent = (0, import_react42.forwardRef)((originalProps, ref) => {
13328
13411
  ]
13329
13412
  }
13330
13413
  ) }),
13331
- tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13414
+ tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13332
13415
  "div",
13333
13416
  {
13334
13417
  ref: tooltipRef,
@@ -13362,7 +13445,7 @@ var barChartStyle = tv({
13362
13445
  defaultVariants: {}
13363
13446
  });
13364
13447
  function BarChartTooltip({ className = "", children }) {
13365
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
13448
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13366
13449
  "div",
13367
13450
  {
13368
13451
  className: `text-md text-common-white bg-common-black flex max-w-[160px] whitespace-nowrap rounded-[5px] px-[10px] py-[6px] text-center font-bold ${className}`,
@@ -13373,13 +13456,13 @@ function BarChartTooltip({ className = "", children }) {
13373
13456
 
13374
13457
  // src/components/charts/radarChart.tsx
13375
13458
  var import_recharts4 = require("recharts");
13376
- var import_react43 = require("react");
13377
- var import_jsx_runtime44 = require("react/jsx-runtime");
13378
- var RadarChart = (0, import_react43.forwardRef)((originalProps, ref) => {
13459
+ var import_react45 = require("react");
13460
+ var import_jsx_runtime46 = require("react/jsx-runtime");
13461
+ var RadarChart = (0, import_react45.forwardRef)((originalProps, ref) => {
13379
13462
  const [props, variantProps] = mapPropsVariants(originalProps, radarChartStyle.variantKeys);
13380
13463
  const { data, label, classNames, tooltipFormatter } = { ...props, ...variantProps };
13381
- const slots = (0, import_react43.useMemo)(() => radarChartStyle({ ...variantProps }), [variantProps]);
13382
- const normalizedData = (0, import_react43.useMemo)(() => {
13464
+ const slots = (0, import_react45.useMemo)(() => radarChartStyle({ ...variantProps }), [variantProps]);
13465
+ const normalizedData = (0, import_react45.useMemo)(() => {
13383
13466
  if (!data || data.length === 0) return [];
13384
13467
  return data.map((item) => ({
13385
13468
  ...item,
@@ -13388,25 +13471,25 @@ var RadarChart = (0, import_react43.forwardRef)((originalProps, ref) => {
13388
13471
  originalFullMark: item.fullMark || 100
13389
13472
  }));
13390
13473
  }, [data]);
13391
- const containerHeight = (0, import_react43.useMemo)(() => {
13474
+ const containerHeight = (0, import_react45.useMemo)(() => {
13392
13475
  if (!data || data.length === 0) return 250;
13393
13476
  return data.length === 3 ? 245 : 306;
13394
13477
  }, [data]);
13395
- const chartMargin = (0, import_react43.useMemo)(() => {
13478
+ const chartMargin = (0, import_react45.useMemo)(() => {
13396
13479
  return { top: 0, right: 0, bottom: 0, left: 0 };
13397
13480
  }, [data]);
13398
- const outerRadius = (0, import_react43.useMemo)(() => {
13481
+ const outerRadius = (0, import_react45.useMemo)(() => {
13399
13482
  if (!data || data.length === 0) return 125;
13400
13483
  return data.length === 3 ? 135 : 125;
13401
13484
  }, [data]);
13402
- const chartCenter = (0, import_react43.useMemo)(() => {
13485
+ const chartCenter = (0, import_react45.useMemo)(() => {
13403
13486
  if (!data || data.length === 0) return {};
13404
13487
  if (data.length === 3) return { cx: "50%", cy: "65%" };
13405
13488
  return {};
13406
13489
  }, [data]);
13407
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
13408
- label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13409
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_recharts4.ResponsiveContainer, { width: "100%", height: containerHeight, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
13490
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
13491
+ label && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13492
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_recharts4.ResponsiveContainer, { width: "100%", height: containerHeight, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13410
13493
  import_recharts4.RadarChart,
13411
13494
  {
13412
13495
  data: normalizedData,
@@ -13415,8 +13498,8 @@ var RadarChart = (0, import_react43.forwardRef)((originalProps, ref) => {
13415
13498
  ...chartCenter,
13416
13499
  className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13417
13500
  children: [
13418
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_recharts4.PolarGrid, { stroke: "#DFE2E7", strokeWidth: 1.75 }),
13419
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13501
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_recharts4.PolarGrid, { stroke: "#DFE2E7", strokeWidth: 1.75 }),
13502
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13420
13503
  import_recharts4.PolarAngleAxis,
13421
13504
  {
13422
13505
  dataKey: "name",
@@ -13425,8 +13508,8 @@ var RadarChart = (0, import_react43.forwardRef)((originalProps, ref) => {
13425
13508
  tickSize: 15
13426
13509
  }
13427
13510
  ),
13428
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_recharts4.PolarRadiusAxis, { domain: [0, 100], tick: false, tickCount: 6, axisLine: false }),
13429
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13511
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_recharts4.PolarRadiusAxis, { domain: [0, 100], tick: false, tickCount: 6, axisLine: false }),
13512
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13430
13513
  import_recharts4.Radar,
13431
13514
  {
13432
13515
  name: label,
@@ -13438,7 +13521,7 @@ var RadarChart = (0, import_react43.forwardRef)((originalProps, ref) => {
13438
13521
  activeDot: false
13439
13522
  }
13440
13523
  ),
13441
- tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13524
+ tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13442
13525
  import_recharts4.Tooltip,
13443
13526
  {
13444
13527
  content: ({ active, payload, label: tooltipLabel }) => {
@@ -13446,7 +13529,7 @@ var RadarChart = (0, import_react43.forwardRef)((originalProps, ref) => {
13446
13529
  const currentData = data == null ? void 0 : data.find((item) => item.name === tooltipLabel);
13447
13530
  const shouldShowTooltip = active && payload && payload.length > 0 && tooltipLabel && currentData && ((_b = (_a = payload[0]) == null ? void 0 : _a.payload) == null ? void 0 : _b.value) !== void 0;
13448
13531
  if (!shouldShowTooltip) return null;
13449
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: tooltipFormatter({
13532
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: tooltipFormatter({
13450
13533
  label: String(tooltipLabel),
13451
13534
  data: currentData
13452
13535
  }) });
@@ -13476,10 +13559,10 @@ var radarChartStyle = tv({
13476
13559
  });
13477
13560
 
13478
13561
  // src/components/charts/simpleBarChart.tsx
13479
- var import_react44 = require("react");
13562
+ var import_react46 = require("react");
13480
13563
  var import_recharts5 = require("recharts");
13481
- var import_jsx_runtime45 = require("react/jsx-runtime");
13482
- var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref) => {
13564
+ var import_jsx_runtime47 = require("react/jsx-runtime");
13565
+ var SimpleBarChartComponent = (0, import_react46.forwardRef)((originalProps, ref) => {
13483
13566
  const [props, variantProps] = mapPropsVariants(originalProps, simpleBarChartStyle.variantKeys);
13484
13567
  const {
13485
13568
  data = [],
@@ -13490,13 +13573,13 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13490
13573
  barGap = 20,
13491
13574
  tooltipFormatter
13492
13575
  } = { ...props, ...variantProps };
13493
- const slots = (0, import_react44.useMemo)(() => simpleBarChartStyle({ ...variantProps }), [variantProps]);
13494
- const chartRef = (0, import_react44.useRef)(null);
13495
- const tooltipRef = (0, import_react44.useRef)(null);
13496
- const [tooltipLeft, setTooltipLeft] = (0, import_react44.useState)(0);
13497
- const [tickPositions, setTickPositions] = (0, import_react44.useState)([]);
13498
- const [tooltipState, setTooltipState] = (0, import_react44.useState)(null);
13499
- (0, import_react44.useEffect)(() => {
13576
+ const slots = (0, import_react46.useMemo)(() => simpleBarChartStyle({ ...variantProps }), [variantProps]);
13577
+ const chartRef = (0, import_react46.useRef)(null);
13578
+ const tooltipRef = (0, import_react46.useRef)(null);
13579
+ const [tooltipLeft, setTooltipLeft] = (0, import_react46.useState)(0);
13580
+ const [tickPositions, setTickPositions] = (0, import_react46.useState)([]);
13581
+ const [tooltipState, setTooltipState] = (0, import_react46.useState)(null);
13582
+ (0, import_react46.useEffect)(() => {
13500
13583
  if (!chartRef.current || !data.length) return;
13501
13584
  const updateDimensions = () => {
13502
13585
  if (!chartRef.current) return;
@@ -13547,16 +13630,16 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13547
13630
  const adjustedHeight = height + extraHeight;
13548
13631
  const adjustedY = y - extraHeight;
13549
13632
  const bottomY = adjustedY + adjustedHeight;
13550
- return height > 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13633
+ return height > 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13551
13634
  "path",
13552
13635
  {
13553
13636
  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`,
13554
13637
  fill
13555
13638
  }
13556
- ) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("rect", { x, y, width, height: 0, fill });
13639
+ ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("rect", { x, y, width, height: 0, fill });
13557
13640
  };
13558
13641
  const CustomTick = ({ x, y, payload }) => {
13559
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13642
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13560
13643
  "text",
13561
13644
  {
13562
13645
  x,
@@ -13570,7 +13653,7 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13570
13653
  }
13571
13654
  );
13572
13655
  };
13573
- (0, import_react44.useLayoutEffect)(() => {
13656
+ (0, import_react46.useLayoutEffect)(() => {
13574
13657
  if (!tooltipState || !chartRef.current || !tooltipRef.current) return;
13575
13658
  const chartRect = chartRef.current.getBoundingClientRect();
13576
13659
  const tooltipRect = tooltipRef.current.getBoundingClientRect();
@@ -13585,7 +13668,7 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13585
13668
  }
13586
13669
  setTooltipLeft(left);
13587
13670
  }, [tooltipState]);
13588
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13671
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13589
13672
  "div",
13590
13673
  {
13591
13674
  ref: chartRef,
@@ -13598,8 +13681,8 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13598
13681
  }
13599
13682
  },
13600
13683
  children: [
13601
- label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13602
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts5.ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13684
+ label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
13685
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_recharts5.ResponsiveContainer, { width: "100%", height: 140, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13603
13686
  import_recharts5.BarChart,
13604
13687
  {
13605
13688
  data,
@@ -13608,7 +13691,7 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13608
13691
  barGap,
13609
13692
  className: "[&_.recharts-surface]:outline-none [&_.recharts-surface]:focus:outline-none",
13610
13693
  children: [
13611
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13694
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13612
13695
  import_recharts5.CartesianGrid,
13613
13696
  {
13614
13697
  vertical: true,
@@ -13618,7 +13701,7 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13618
13701
  verticalPoints: tickPositions
13619
13702
  }
13620
13703
  ),
13621
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13704
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13622
13705
  import_recharts5.CartesianGrid,
13623
13706
  {
13624
13707
  vertical: true,
@@ -13629,7 +13712,7 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13629
13712
  verticalPoints: [0]
13630
13713
  }
13631
13714
  ),
13632
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13715
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13633
13716
  import_recharts5.XAxis,
13634
13717
  {
13635
13718
  dataKey: "title",
@@ -13639,8 +13722,8 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13639
13722
  padding: { left: 0, right: 0 }
13640
13723
  }
13641
13724
  ),
13642
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_recharts5.YAxis, { hide: true, ticks: yAxisTicks, domain: yAxisDomain }),
13643
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13725
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_recharts5.YAxis, { hide: true, ticks: yAxisTicks, domain: yAxisDomain }),
13726
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13644
13727
  import_recharts5.Bar,
13645
13728
  {
13646
13729
  dataKey: "value",
@@ -13653,7 +13736,7 @@ var SimpleBarChartComponent = (0, import_react44.forwardRef)((originalProps, ref
13653
13736
  ]
13654
13737
  }
13655
13738
  ) }),
13656
- tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13739
+ tooltipFormatter && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13657
13740
  "div",
13658
13741
  {
13659
13742
  ref: tooltipRef,
@@ -13688,9 +13771,9 @@ var simpleBarChartStyle = tv({
13688
13771
  });
13689
13772
 
13690
13773
  // src/components/starRating/starRating.tsx
13691
- var import_react45 = require("react");
13692
- var import_jsx_runtime46 = require("react/jsx-runtime");
13693
- var StarRating = (0, import_react45.forwardRef)((originalProps, ref) => {
13774
+ var import_react47 = require("react");
13775
+ var import_jsx_runtime48 = require("react/jsx-runtime");
13776
+ var StarRating = (0, import_react47.forwardRef)((originalProps, ref) => {
13694
13777
  const [props, variantProps] = mapPropsVariants(originalProps, starRatingStyle.variantKeys);
13695
13778
  const {
13696
13779
  stars,
@@ -13703,8 +13786,8 @@ var StarRating = (0, import_react45.forwardRef)((originalProps, ref) => {
13703
13786
  filledColor = "text-primary-main",
13704
13787
  emptyColor = "text-neutral-soft"
13705
13788
  } = { ...props, ...variantProps };
13706
- const slots = (0, import_react45.useMemo)(() => starRatingStyle({ ...variantProps }), [variantProps]);
13707
- const [hoverRating, setHoverRating] = (0, import_react45.useState)(0);
13789
+ const slots = (0, import_react47.useMemo)(() => starRatingStyle({ ...variantProps }), [variantProps]);
13790
+ const [hoverRating, setHoverRating] = (0, import_react47.useState)(0);
13708
13791
  const handleStarClick = (starIndex, isHalf = false) => {
13709
13792
  if (readOnly || !onChange) return;
13710
13793
  let newRating;
@@ -13738,9 +13821,9 @@ var StarRating = (0, import_react45.forwardRef)((originalProps, ref) => {
13738
13821
  const isEmpty = currentRating < starIndex - 1;
13739
13822
  const isPartial = !isFull && !isEmpty;
13740
13823
  const fillPercentage = isPartial ? (currentRating - (starIndex - 1)) * 100 : 0;
13741
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: slots.starWrapper({ class: classNames == null ? void 0 : classNames.starWrapper }), children: [
13742
- !readOnly && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
13743
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13824
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: slots.starWrapper({ class: classNames == null ? void 0 : classNames.starWrapper }), children: [
13825
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
13826
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13744
13827
  "div",
13745
13828
  {
13746
13829
  className: slots.star({ class: classNames == null ? void 0 : classNames.star }),
@@ -13748,7 +13831,7 @@ var StarRating = (0, import_react45.forwardRef)((originalProps, ref) => {
13748
13831
  onMouseEnter: () => handleStarHover(starIndex)
13749
13832
  }
13750
13833
  ),
13751
- allowHalf && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13834
+ allowHalf && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13752
13835
  "div",
13753
13836
  {
13754
13837
  className: slots.starHalf({ class: classNames == null ? void 0 : classNames.starHalf }),
@@ -13757,25 +13840,25 @@ var StarRating = (0, import_react45.forwardRef)((originalProps, ref) => {
13757
13840
  }
13758
13841
  )
13759
13842
  ] }),
13760
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative", children: [
13761
- (isFull || isPartial) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
13762
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon_default, { name: "star", fill: true, className: emptyColor, size }),
13763
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13843
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative", children: [
13844
+ (isFull || isPartial) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
13845
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon_default, { name: "star", fill: true, className: emptyColor, size }),
13846
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13764
13847
  "div",
13765
13848
  {
13766
13849
  className: "absolute left-0 top-0 overflow-hidden",
13767
13850
  style: {
13768
13851
  width: isFull ? "100%" : `${fillPercentage}%`
13769
13852
  },
13770
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon_default, { name: "star", fill: true, className: filledColor, size })
13853
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon_default, { name: "star", fill: true, className: filledColor, size })
13771
13854
  }
13772
13855
  )
13773
13856
  ] }),
13774
- isEmpty && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon_default, { name: "star", fill: true, className: emptyColor, size })
13857
+ isEmpty && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon_default, { name: "star", fill: true, className: emptyColor, size })
13775
13858
  ] })
13776
13859
  ] }, starIndex);
13777
13860
  };
13778
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: createRange(stars).map(renderStar) });
13861
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onMouseLeave: handleMouseLeave, children: createRange(stars).map(renderStar) });
13779
13862
  });
13780
13863
  StarRating.displayName = "StarRating";
13781
13864
  var starRating_default = StarRating;