@deepnoid/ui 0.1.29 → 0.1.30

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 (102) hide show
  1. package/.turbo/turbo-build.log +179 -169
  2. package/dist/chunk-6PN3DGOE.mjs +77 -0
  3. package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
  4. package/dist/chunk-CEZQCD6Z.mjs +79 -0
  5. package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
  6. package/dist/{chunk-RCJOJPRS.mjs → chunk-GLMM253Q.mjs} +40 -30
  7. package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
  8. package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
  9. package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
  10. package/dist/chunk-MZ76AA76.mjs +1 -0
  11. package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
  12. package/dist/{chunk-3KVZDFMV.mjs → chunk-NKH3OF6I.mjs} +3 -3
  13. package/dist/chunk-P7YYNA6L.mjs +67 -0
  14. package/dist/{chunk-KXA73VTJ.mjs → chunk-QM4ZSQYX.mjs} +4 -4
  15. package/dist/components/backdrop/backdrop.mjs +2 -2
  16. package/dist/components/backdrop/index.mjs +2 -2
  17. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  18. package/dist/components/breadcrumb/index.mjs +5 -5
  19. package/dist/components/button/button.mjs +2 -2
  20. package/dist/components/button/icon-button.mjs +2 -2
  21. package/dist/components/button/index.mjs +4 -4
  22. package/dist/components/button/text-button.mjs +2 -2
  23. package/dist/components/checkbox/checkbox.mjs +2 -2
  24. package/dist/components/checkbox/index.mjs +2 -2
  25. package/dist/components/chip/chip.mjs +2 -2
  26. package/dist/components/chip/index.mjs +2 -2
  27. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  28. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  29. package/dist/components/dateTimePicker/index.mjs +6 -6
  30. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  31. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  32. package/dist/components/fileUpload/index.mjs +6 -6
  33. package/dist/components/input/index.mjs +2 -2
  34. package/dist/components/input/input.mjs +2 -2
  35. package/dist/components/list/index.mjs +3 -3
  36. package/dist/components/list/list.mjs +2 -2
  37. package/dist/components/list/listItem.mjs +2 -2
  38. package/dist/components/modal/index.mjs +6 -6
  39. package/dist/components/modal/modal.mjs +6 -6
  40. package/dist/components/pagination/index.mjs +3 -3
  41. package/dist/components/pagination/pagination.mjs +3 -3
  42. package/dist/components/radio/index.mjs +2 -2
  43. package/dist/components/radio/radio.mjs +2 -2
  44. package/dist/components/select/index.mjs +2 -2
  45. package/dist/components/select/select.mjs +2 -2
  46. package/dist/components/skeleton/index.d.mts +2 -0
  47. package/dist/components/skeleton/index.d.ts +2 -0
  48. package/dist/components/skeleton/index.js +141 -0
  49. package/dist/components/skeleton/index.mjs +10 -0
  50. package/dist/components/skeleton/skeleton.d.mts +14 -0
  51. package/dist/components/skeleton/skeleton.d.ts +14 -0
  52. package/dist/components/skeleton/skeleton.js +135 -0
  53. package/dist/components/skeleton/skeleton.mjs +9 -0
  54. package/dist/components/table/index.js +692 -614
  55. package/dist/components/table/index.mjs +11 -9
  56. package/dist/components/table/table-body.d.mts +6 -4
  57. package/dist/components/table/table-body.d.ts +6 -4
  58. package/dist/components/table/table-body.js +115 -64
  59. package/dist/components/table/table-body.mjs +5 -3
  60. package/dist/components/table/table-head.d.mts +3 -1
  61. package/dist/components/table/table-head.d.ts +3 -1
  62. package/dist/components/table/table-head.js +107 -21
  63. package/dist/components/table/table-head.mjs +5 -3
  64. package/dist/components/table/table.d.mts +1 -0
  65. package/dist/components/table/table.d.ts +1 -0
  66. package/dist/components/table/table.js +683 -605
  67. package/dist/components/table/table.mjs +9 -7
  68. package/dist/components/tabs/index.mjs +2 -2
  69. package/dist/components/tabs/tabs.mjs +2 -2
  70. package/dist/components/toast/index.mjs +3 -3
  71. package/dist/components/toast/toast.mjs +2 -2
  72. package/dist/components/toast/use-toast.mjs +3 -3
  73. package/dist/components/tooltip/index.mjs +2 -2
  74. package/dist/components/tooltip/tooltip.mjs +2 -2
  75. package/dist/components/tree/index.js +33 -11
  76. package/dist/components/tree/index.mjs +2 -2
  77. package/dist/components/tree/tree.d.mts +10 -8
  78. package/dist/components/tree/tree.d.ts +10 -8
  79. package/dist/components/tree/tree.js +33 -11
  80. package/dist/components/tree/tree.mjs +2 -2
  81. package/dist/index.d.mts +1 -0
  82. package/dist/index.d.ts +1 -0
  83. package/dist/index.js +515 -413
  84. package/dist/index.mjs +52 -47
  85. package/package.json +1 -1
  86. package/dist/chunk-26MNALVL.mjs +0 -47
  87. package/dist/chunk-A5KQHWS3.mjs +0 -94
  88. package/dist/{chunk-KLUC2BV6.mjs → chunk-272FMLIL.mjs} +3 -3
  89. package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
  90. package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
  91. package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
  92. package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
  93. package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
  94. package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
  95. package/dist/{chunk-7W2ZI2DD.mjs → chunk-MEY4IL7D.mjs} +3 -3
  96. package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
  97. package/dist/{chunk-W45H2ZMW.mjs → chunk-RT3S3VVJ.mjs} +3 -3
  98. package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
  99. package/dist/{chunk-EHRFXDSN.mjs → chunk-VCVQMPC7.mjs} +3 -3
  100. package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
  101. package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
  102. package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
package/dist/index.js CHANGED
@@ -122,6 +122,7 @@ __export(index_exports, {
122
122
  Radio: () => radio_default,
123
123
  ScrollArea: () => scrollArea_default,
124
124
  Select: () => select_default,
125
+ Skeleton: () => skeleton_default,
125
126
  Switch: () => switch_default,
126
127
  Table: () => table_default,
127
128
  Tabs: () => tabs_default,
@@ -6614,8 +6615,8 @@ var textareaStyle = (0, import_tailwind_variants11.tv)({
6614
6615
  });
6615
6616
 
6616
6617
  // src/components/table/table.tsx
6617
- var import_react17 = require("react");
6618
- var import_tailwind_variants15 = require("tailwind-variants");
6618
+ var import_react15 = require("react");
6619
+ var import_tailwind_variants16 = require("tailwind-variants");
6619
6620
 
6620
6621
  // src/components/checkbox/checkbox.tsx
6621
6622
  var import_react12 = require("react");
@@ -6824,138 +6825,206 @@ var checkboxStyle = tv({
6824
6825
  }
6825
6826
  });
6826
6827
 
6827
- // src/components/table/table-head.tsx
6828
+ // src/components/skeleton/skeleton.tsx
6829
+ var import_tailwind_variants13 = require("tailwind-variants");
6828
6830
  var import_jsx_runtime15 = require("react/jsx-runtime");
6829
- var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames, onCheckAll }) => {
6831
+ var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
6832
+ const speedMap = {
6833
+ fast: "0.7s",
6834
+ normal: "1.2s",
6835
+ slow: "2s"
6836
+ };
6837
+ const slots = skeletonStyle();
6838
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6839
+ "div",
6840
+ {
6841
+ className: clsx(slots.base({ color, rounded }), className),
6842
+ style: {
6843
+ "--shimmer-duration": speedMap[speed]
6844
+ },
6845
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("style", { children: `@keyframes shimmer {
6846
+ 100% {
6847
+ transform: translateX(100%);
6848
+ }
6849
+ }
6850
+ .skeleton-shimmer::before {
6851
+ animation: shimmer var(--shimmer-duration) infinite linear;
6852
+ }
6853
+ ` })
6854
+ }
6855
+ );
6856
+ };
6857
+ Skeleton.displayName = "Skeleton";
6858
+ var skeleton_default = Skeleton;
6859
+ var skeletonStyle = (0, import_tailwind_variants13.tv)({
6860
+ slots: {
6861
+ base: [
6862
+ "relative",
6863
+ "overflow-hidden",
6864
+ "w-full",
6865
+ "h-[18px]",
6866
+ "skeleton-shimmer",
6867
+ "before:absolute",
6868
+ "before:inset-0",
6869
+ "before:-translate-x-full",
6870
+ "before:bg-gradient-to-r",
6871
+ "before:from-transparent",
6872
+ "before:via-white/40",
6873
+ "before:to-transparent",
6874
+ "before:content-['']"
6875
+ ]
6876
+ },
6877
+ variants: {
6878
+ color: {
6879
+ primary: { base: "bg-primary-soft" },
6880
+ secondary: { base: "bg-secondary-soft" },
6881
+ neutral: { base: "bg-neutral-soft" }
6882
+ },
6883
+ rounded: {
6884
+ sm: { base: "rounded-sm" },
6885
+ md: { base: "rounded-md" },
6886
+ lg: { base: "rounded-lg" },
6887
+ xl: { base: "rounded-xl" },
6888
+ full: { base: "rounded-full" }
6889
+ }
6890
+ },
6891
+ defaultVariants: {
6892
+ color: "primary",
6893
+ rounded: "md"
6894
+ }
6895
+ });
6896
+
6897
+ // src/components/table/table-head.tsx
6898
+ var import_jsx_runtime16 = require("react/jsx-runtime");
6899
+ var TableHead = ({
6900
+ slots,
6901
+ columns,
6902
+ color,
6903
+ size,
6904
+ rowCheckbox = false,
6905
+ isCheckedAll,
6906
+ isLoading = false,
6907
+ classNames,
6908
+ onCheckAll
6909
+ }) => {
6830
6910
  const handleClickCheckAll = (e) => {
6831
6911
  e.preventDefault();
6832
6912
  onCheckAll(!isCheckedAll);
6833
6913
  };
6834
- const renderColumnHeaders = () => columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6914
+ const renderTh = (content, key, column) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6835
6915
  "th",
6836
6916
  {
6837
6917
  className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column),
6838
6918
  style: {
6839
- width: column.width ? `${column.width}px` : void 0,
6840
- minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
6841
- maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
6842
- height: column.height ? `${column.height}px` : void 0
6919
+ width: (column == null ? void 0 : column.width) ? `${column.width}px` : void 0,
6920
+ minWidth: (column == null ? void 0 : column.minWidth) ? `${column.minWidth}px` : void 0,
6921
+ maxWidth: (column == null ? void 0 : column.maxWidth) ? `${column.maxWidth}px` : void 0,
6922
+ height: (column == null ? void 0 : column.height) ? `${column.height}px` : void 0
6843
6923
  },
6844
- children: column.headerName
6924
+ children: content
6845
6925
  },
6846
- `${column.field}${index}thead`
6847
- ));
6848
- const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6849
- checkbox_default,
6850
- {
6851
- size,
6852
- checked: isCheckedAll,
6853
- onChange: (e) => onCheckAll(e.target.checked)
6854
- }
6855
- ) }) });
6856
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
6857
- renderColumnHeaders(),
6858
- renderSelectAllCheckbox()
6926
+ key
6927
+ );
6928
+ const renderSkeletonRow = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "[&>th]:border-0"), children: [
6929
+ columns.map((_, idx) => renderTh(/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(skeleton_default, { color, rounded: "lg", speed: "fast" }), `skeleton-${idx}`)),
6930
+ rowCheckbox && renderTh(/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(skeleton_default, { color, rounded: "lg", speed: "fast" }), "checkbox-skeleton")
6931
+ ] }) });
6932
+ const renderContentRow = () => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
6933
+ columns.map((column, idx) => renderTh(column.headerName, `${column.field}-${idx}`, column)),
6934
+ rowCheckbox && renderTh(
6935
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6936
+ checkbox_default,
6937
+ {
6938
+ size,
6939
+ checked: isCheckedAll,
6940
+ onChange: (e) => onCheckAll(e.target.checked)
6941
+ }
6942
+ ) }),
6943
+ "checkbox"
6944
+ )
6859
6945
  ] }) });
6946
+ return isLoading ? renderSkeletonRow() : renderContentRow();
6860
6947
  };
6861
6948
  var table_head_default = TableHead;
6862
6949
 
6863
6950
  // src/components/table/table-body.tsx
6864
- var import_react13 = require("react");
6865
- var import_jsx_runtime16 = require("react/jsx-runtime");
6866
- var import_react14 = require("react");
6951
+ var import_jsx_runtime17 = require("react/jsx-runtime");
6867
6952
  var TableBody = ({
6868
6953
  slots,
6869
- columns,
6870
6954
  rows,
6955
+ columns,
6871
6956
  size,
6872
- rowCheckbox,
6957
+ color,
6958
+ rowCheckbox = false,
6873
6959
  checkedRows,
6874
6960
  onCheckRow,
6875
6961
  onRowClick,
6962
+ isLoading = false,
6876
6963
  emptyContent,
6877
- isLoading,
6964
+ skeletonRow,
6878
6965
  classNames,
6879
6966
  className
6880
6967
  }) => {
6881
- const generateColumnStyles = (0, import_react13.useCallback)((column) => {
6882
- const alignClass = column.align ? `text-${column.align}` : "text-left";
6883
- return clsx(alignClass, column.className);
6884
- }, []);
6885
- const getCellProps = (0, import_react13.useCallback)(
6886
- (column, row) => {
6887
- if (!column || !row) {
6888
- return {
6889
- className: slots.td({ class: classNames == null ? void 0 : classNames.td })
6890
- };
6891
- }
6892
- const value = row[column.field];
6893
- const formattedValue = column.valueFormatter ? column.valueFormatter({ id: column.field, field: column.field, value }) : value;
6894
- const children = column.renderCell ? column.renderCell({
6895
- id: column.field,
6896
- field: column.field,
6897
- value,
6898
- formattedValue,
6899
- row
6900
- }) : formattedValue;
6901
- const columnStyles = generateColumnStyles(column);
6902
- return {
6903
- children,
6904
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), columnStyles),
6905
- style: {
6906
- width: column.width ? `${column.width}px` : void 0,
6907
- minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
6908
- maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
6909
- height: column.height ? `${column.height}px` : void 0
6910
- }
6911
- };
6912
- },
6913
- [classNames == null ? void 0 : classNames.td, generateColumnStyles, slots]
6914
- );
6915
- const hasRows = rows.length > 0;
6916
- const colSpan = (columns.length || 1) + (rowCheckbox ? 1 : 0);
6917
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tbody", { className: clsx(slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }), className), children: [
6918
- !isLoading && hasRows && rows.map((row, rowIndex) => {
6919
- const isRowChecked = checkedRows.has(rowIndex);
6920
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
6921
- "tr",
6968
+ const getCellStyle = (col) => ({
6969
+ width: col.width ? `${col.width}px` : void 0,
6970
+ minWidth: col.minWidth ? `${col.minWidth}px` : void 0,
6971
+ maxWidth: col.maxWidth ? `${col.maxWidth}px` : void 0,
6972
+ height: col.height ? `${col.height}px` : void 0
6973
+ });
6974
+ const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
6975
+ const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6976
+ checkbox_default,
6977
+ {
6978
+ size,
6979
+ checked: checkedRows.has(rowIndex),
6980
+ onChange: (e) => onCheckRow(rowIndex, e.target.checked)
6981
+ }
6982
+ ) });
6983
+ const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
6984
+ columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
6985
+ rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
6986
+ ] }, `skeleton-${rowIndex}`);
6987
+ const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
6988
+ const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
6989
+ columns.map((col, colIdx) => {
6990
+ var _a;
6991
+ const value = row[col.field];
6992
+ const formattedValue = ((_a = col.valueFormatter) == null ? void 0 : _a.call(col, { value, field: col.field })) || value;
6993
+ const content = col.renderCell ? col.renderCell({ id: row.id, field: col.field, value, formattedValue, row }) : formattedValue;
6994
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6995
+ "td",
6922
6996
  {
6923
- className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }),
6924
- "aria-checked": isRowChecked,
6925
- onClick: () => onRowClick ? onRowClick(row) : void 0,
6926
- children: [
6927
- columns.map((column) => /* @__PURE__ */ (0, import_react14.createElement)("td", { ...getCellProps(column, row), key: column.field })),
6928
- rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6929
- checkbox_default,
6930
- {
6931
- size,
6932
- checked: isRowChecked,
6933
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
6934
- }
6935
- ) }) })
6936
- ]
6997
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), col.className),
6998
+ style: getCellStyle(col),
6999
+ children: content
6937
7000
  },
6938
- rowIndex
7001
+ `${rowIndex}-${colIdx}`
6939
7002
  );
6940
7003
  }),
6941
- !isLoading && !hasRows && emptyContent && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "border-none"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { colSpan, className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) })
6942
- ] });
7004
+ rowCheckbox && renderCheckboxCell(rowIndex)
7005
+ ] }, rowIndex);
7006
+ const renderRows = () => {
7007
+ if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {});
7008
+ if (!rows.length && emptyContent) return renderEmptyRow();
7009
+ return rows.map((row, index) => renderDataRow(row, index));
7010
+ };
7011
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { className: `${slots.tbody({ class: classNames == null ? void 0 : classNames.tbody })} ${className || ""}`, children: renderRows() });
6943
7012
  };
6944
7013
  var table_body_default = TableBody;
6945
7014
 
6946
7015
  // src/components/pagination/pagination.tsx
6947
- var import_react16 = require("react");
7016
+ var import_react14 = require("react");
6948
7017
 
6949
7018
  // src/components/pagination/usePagination.ts
6950
- var import_react15 = require("react");
7019
+ var import_react13 = require("react");
6951
7020
  var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) => {
6952
- const startPage = (0, import_react15.useMemo)(() => Math.floor((currentPage - 1) / groupSize) * groupSize + 1, [currentPage, groupSize]);
6953
- const endPage = (0, import_react15.useMemo)(() => Math.min(startPage + groupSize - 1, totalPage), [startPage, groupSize, totalPage]);
6954
- const pageList = (0, import_react15.useMemo)(
7021
+ const startPage = (0, import_react13.useMemo)(() => Math.floor((currentPage - 1) / groupSize) * groupSize + 1, [currentPage, groupSize]);
7022
+ const endPage = (0, import_react13.useMemo)(() => Math.min(startPage + groupSize - 1, totalPage), [startPage, groupSize, totalPage]);
7023
+ const pageList = (0, import_react13.useMemo)(
6955
7024
  () => Array.from({ length: endPage - startPage + 1 }, (_, i) => startPage + i),
6956
7025
  [startPage, endPage]
6957
7026
  );
6958
- const handleClickMovePage = (0, import_react15.useCallback)(
7027
+ const handleClickMovePage = (0, import_react13.useCallback)(
6959
7028
  (page) => (event) => {
6960
7029
  event.preventDefault();
6961
7030
  handleChangePage == null ? void 0 : handleChangePage(page);
@@ -6972,8 +7041,8 @@ var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) =>
6972
7041
  var usePagination_default = usePagination;
6973
7042
 
6974
7043
  // src/components/pagination/pagination.tsx
6975
- var import_jsx_runtime17 = require("react/jsx-runtime");
6976
- var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
7044
+ var import_jsx_runtime18 = require("react/jsx-runtime");
7045
+ var Pagination = (0, import_react14.forwardRef)((originalProps, ref) => {
6977
7046
  const [props, variantProps] = mapPropsVariants(originalProps, paginationStyle.variantKeys);
6978
7047
  const {
6979
7048
  classNames,
@@ -6987,8 +7056,8 @@ var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
6987
7056
  variant,
6988
7057
  size
6989
7058
  } = { ...props, ...variantProps };
6990
- const [inputPage, setInputPage] = (0, import_react16.useState)(currentPage);
6991
- const slots = (0, import_react16.useMemo)(() => paginationStyle(variantProps), [variantProps]);
7059
+ const [inputPage, setInputPage] = (0, import_react14.useState)(currentPage);
7060
+ const slots = (0, import_react14.useMemo)(() => paginationStyle(variantProps), [variantProps]);
6992
7061
  const { pageList, handleClickMovePage } = usePagination_default({
6993
7062
  currentPage,
6994
7063
  totalPage,
@@ -7003,29 +7072,29 @@ var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
7003
7072
  }
7004
7073
  }
7005
7074
  };
7006
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), ref, children: [
7007
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
7008
- showFirstLastButtons && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7075
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), ref, children: [
7076
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
7077
+ showFirstLastButtons && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7009
7078
  "div",
7010
7079
  {
7011
7080
  "aria-label": "firstPage",
7012
7081
  "data-is-active": currentPage > 1,
7013
7082
  className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
7014
7083
  onClick: currentPage > 1 ? handleClickMovePage(1) : void 0,
7015
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: "left-double-chevron" })
7084
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon_default, { name: "left-double-chevron" })
7016
7085
  }
7017
7086
  ),
7018
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7087
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7019
7088
  "div",
7020
7089
  {
7021
7090
  "aria-label": "prevPage",
7022
7091
  "data-is-active": currentPage > 1,
7023
7092
  className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
7024
7093
  onClick: currentPage > 1 ? handleClickMovePage(currentPage - 1) : void 0,
7025
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: "left-chevron" })
7094
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon_default, { name: "left-chevron" })
7026
7095
  }
7027
7096
  ),
7028
- showPageNumber && pageList.map((page, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7097
+ showPageNumber && pageList.map((page, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7029
7098
  "div",
7030
7099
  {
7031
7100
  className: slots.button({ class: classNames == null ? void 0 : classNames.button }),
@@ -7035,29 +7104,29 @@ var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
7035
7104
  },
7036
7105
  index
7037
7106
  )),
7038
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7107
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7039
7108
  "div",
7040
7109
  {
7041
7110
  "aria-label": "nextPage",
7042
7111
  "data-is-active": currentPage < totalPage,
7043
7112
  className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
7044
7113
  onClick: currentPage < totalPage ? handleClickMovePage(currentPage + 1) : void 0,
7045
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: "right-chevron" })
7114
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon_default, { name: "right-chevron" })
7046
7115
  }
7047
7116
  ),
7048
- showFirstLastButtons && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7117
+ showFirstLastButtons && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7049
7118
  "div",
7050
7119
  {
7051
7120
  "aria-label": "lastPage",
7052
7121
  "data-is-active": currentPage < totalPage,
7053
7122
  className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
7054
7123
  onClick: currentPage < totalPage ? handleClickMovePage(totalPage) : void 0,
7055
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: "right-double-chevron" })
7124
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon_default, { name: "right-double-chevron" })
7056
7125
  }
7057
7126
  )
7058
7127
  ] }),
7059
- showPageLabel && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: [
7060
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
7128
+ showPageLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: [
7129
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7061
7130
  input_default,
7062
7131
  {
7063
7132
  value: inputPage || 1,
@@ -7230,14 +7299,14 @@ var paginationStyle = tv(
7230
7299
  );
7231
7300
 
7232
7301
  // src/components/scroll/scrollArea.tsx
7233
- var import_tailwind_variants14 = require("tailwind-variants");
7234
- var import_jsx_runtime18 = require("react/jsx-runtime");
7302
+ var import_tailwind_variants15 = require("tailwind-variants");
7303
+ var import_jsx_runtime19 = require("react/jsx-runtime");
7235
7304
  var ScrollArea = ({ children, className, direction, size }) => {
7236
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: clsx(scrollAreaStyle({ direction, size }), className), children });
7305
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: clsx(scrollAreaStyle({ direction, size }), className), children });
7237
7306
  };
7238
7307
  ScrollArea.displayName = "ScrollArea";
7239
7308
  var scrollArea_default = ScrollArea;
7240
- var scrollAreaStyle = (0, import_tailwind_variants14.tv)({
7309
+ var scrollAreaStyle = (0, import_tailwind_variants15.tv)({
7241
7310
  base: [
7242
7311
  "h-full",
7243
7312
  "x-full",
@@ -7266,95 +7335,105 @@ var scrollAreaStyle = (0, import_tailwind_variants14.tv)({
7266
7335
  });
7267
7336
 
7268
7337
  // src/components/table/table.tsx
7269
- var import_jsx_runtime19 = require("react/jsx-runtime");
7270
- var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7338
+ var import_jsx_runtime20 = require("react/jsx-runtime");
7339
+ var Table = (0, import_react15.forwardRef)((originalProps, ref) => {
7271
7340
  const [props, variantProps] = mapPropsVariants(originalProps, tableStyle.variantKeys);
7272
7341
  const {
7273
- classNames,
7274
7342
  rows,
7275
7343
  columns,
7276
- size,
7277
- rowCheckbox,
7344
+ rowCheckbox = false,
7278
7345
  onRowClick,
7279
7346
  totalData,
7280
7347
  pagination,
7281
7348
  onPageChange,
7282
7349
  emptyContent,
7283
- isLoading,
7284
- className,
7285
- color
7350
+ isLoading = false,
7351
+ classNames,
7352
+ color,
7353
+ size,
7354
+ skeletonRow
7286
7355
  } = { ...props, ...variantProps };
7287
- const [checkedRows, setCheckedRows] = (0, import_react17.useState)(/* @__PURE__ */ new Set());
7288
- const divRef = (0, import_react17.useRef)(null);
7289
- const { page, perPage } = pagination || { page: 1, perPage: 10 };
7356
+ const { page = 1, perPage = 10 } = pagination || {};
7290
7357
  const showPagination = pagination && typeof totalData === "number" && !isLoading;
7291
- (0, import_react17.useImperativeHandle)(ref, () => ({
7292
- checkedRows,
7293
- setCheckedRows
7294
- }));
7295
- (0, import_react17.useEffect)(() => {
7358
+ const [checkedRows, setCheckedRows] = (0, import_react15.useState)(/* @__PURE__ */ new Set());
7359
+ const divRef = (0, import_react15.useRef)(null);
7360
+ (0, import_react15.useImperativeHandle)(
7361
+ ref,
7362
+ () => ({
7363
+ checkedRows,
7364
+ setCheckedRows
7365
+ }),
7366
+ [checkedRows]
7367
+ );
7368
+ (0, import_react15.useEffect)(() => {
7296
7369
  setCheckedRows(/* @__PURE__ */ new Set());
7297
7370
  }, [rows]);
7298
- const handleCheckAll = (isChecked) => {
7299
- const newCheckedRows = isChecked ? new Set(rows.map((_, index) => index)) : /* @__PURE__ */ new Set();
7300
- setCheckedRows(newCheckedRows);
7371
+ const handleAllRowCheck = (checked) => {
7372
+ const updated = checked ? new Set(rows.map((_, i) => i)) : /* @__PURE__ */ new Set();
7373
+ setCheckedRows(updated);
7301
7374
  };
7302
- const handleCheck = (rowIndex, isChecked) => {
7303
- const newChecked = new Set(checkedRows);
7304
- isChecked ? newChecked.add(rowIndex) : newChecked.delete(rowIndex);
7305
- setCheckedRows(newChecked);
7375
+ const handleRowCheck = (index, checked) => {
7376
+ setCheckedRows((prev) => {
7377
+ const updated = new Set(prev);
7378
+ checked ? updated.add(index) : updated.delete(index);
7379
+ return updated;
7380
+ });
7306
7381
  };
7307
- const slots = (0, import_react17.useMemo)(() => tableStyle(variantProps), [variantProps]);
7308
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: divRef, "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
7309
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
7310
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
7382
+ const slots = (0, import_react15.useMemo)(() => tableStyle(variantProps), [variantProps]);
7383
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref: divRef, "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
7384
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
7385
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7311
7386
  table_head_default,
7312
7387
  {
7313
7388
  columns,
7314
7389
  size,
7390
+ color,
7315
7391
  rowCheckbox,
7316
7392
  isCheckedAll: checkedRows.size === rows.length && rows.length > 0,
7317
- onCheckAll: handleCheckAll,
7393
+ onCheckAll: handleAllRowCheck,
7394
+ isLoading,
7318
7395
  classNames,
7319
7396
  slots
7320
7397
  }
7321
7398
  ),
7322
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
7399
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7323
7400
  table_body_default,
7324
7401
  {
7325
7402
  slots,
7326
7403
  rows,
7327
7404
  columns,
7328
7405
  size,
7406
+ color,
7329
7407
  rowCheckbox,
7330
7408
  checkedRows,
7331
7409
  onRowClick,
7332
- onCheckRow: handleCheck,
7410
+ onCheckRow: handleRowCheck,
7333
7411
  emptyContent,
7334
7412
  isLoading,
7335
- classNames,
7413
+ skeletonRow,
7336
7414
  className: clsx(
7337
7415
  "transition-all duration-150 ease-out",
7338
- isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
7416
+ isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100",
7417
+ classNames
7339
7418
  )
7340
7419
  }
7341
7420
  )
7342
7421
  ] }) }),
7343
- showPagination && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
7422
+ showPagination && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7344
7423
  pagination_default,
7345
7424
  {
7346
7425
  color,
7347
7426
  currentPage: page,
7348
7427
  totalPage: Math.ceil(totalData / perPage),
7349
7428
  groupSize: 10,
7350
- handleChangePage: (currentPage) => onPageChange && onPageChange({ page: currentPage, perPage })
7429
+ handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
7351
7430
  }
7352
7431
  ) })
7353
7432
  ] });
7354
7433
  });
7355
7434
  Table.displayName = "Table";
7356
7435
  var table_default = Table;
7357
- var tableStyle = (0, import_tailwind_variants15.tv)({
7436
+ var tableStyle = (0, import_tailwind_variants16.tv)({
7358
7437
  slots: {
7359
7438
  base: ["flex", "flex-col", "relative", "select-none", "gap-[20px]"],
7360
7439
  table: ["w-full", "h-auto"],
@@ -7571,21 +7650,21 @@ var tableStyle = (0, import_tailwind_variants15.tv)({
7571
7650
  });
7572
7651
 
7573
7652
  // src/components/table/definition-table.tsx
7574
- var import_react18 = require("react");
7575
- var import_jsx_runtime20 = require("react/jsx-runtime");
7653
+ var import_react16 = require("react");
7654
+ var import_jsx_runtime21 = require("react/jsx-runtime");
7576
7655
  var DEFAULT_COLUMN_CLASSES = [
7577
7656
  "w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
7578
7657
  "px-[10px] py-[9.5px]"
7579
7658
  ];
7580
- var DefinitionTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
7659
+ var DefinitionTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
7581
7660
  var _a;
7582
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
7661
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
7583
7662
  }) });
7584
- var DefinitionTable = (0, import_react18.forwardRef)(({ rows, footer, classNames }, ref) => {
7585
- const slots = (0, import_react18.useMemo)(() => DefinitionTableStyle(), []);
7586
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
7587
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DefinitionTableRow, { ...row }, i)) }) }),
7588
- footer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: footer })
7663
+ var DefinitionTable = (0, import_react16.forwardRef)(({ rows, footer, classNames }, ref) => {
7664
+ const slots = (0, import_react16.useMemo)(() => DefinitionTableStyle(), []);
7665
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
7666
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DefinitionTableRow, { ...row }, i)) }) }),
7667
+ footer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: footer })
7589
7668
  ] });
7590
7669
  });
7591
7670
  DefinitionTable.displayName = "DefinitionTable";
@@ -7598,10 +7677,10 @@ var DefinitionTableStyle = tv({
7598
7677
  });
7599
7678
 
7600
7679
  // src/components/select/select.tsx
7601
- var import_react19 = require("react");
7680
+ var import_react17 = require("react");
7602
7681
  var import_react_dom = require("react-dom");
7603
- var import_jsx_runtime21 = require("react/jsx-runtime");
7604
- var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7682
+ var import_jsx_runtime22 = require("react/jsx-runtime");
7683
+ var Select = (0, import_react17.forwardRef)((originalProps, ref) => {
7605
7684
  var _a;
7606
7685
  const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
7607
7686
  const {
@@ -7615,14 +7694,14 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7615
7694
  multiple,
7616
7695
  ...inputProps
7617
7696
  } = props;
7618
- const slots = (0, import_react19.useMemo)(() => select({ ...variantProps }), [variantProps]);
7619
- const [selectedOptions, setSelectedOptions] = (0, import_react19.useState)(defaultSelectedOptions);
7620
- const [targetRect, setTargetRect] = (0, import_react19.useState)(null);
7621
- const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react19.useState)(0);
7622
- const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
7623
- const [isOpen, setIsOpen] = (0, import_react19.useState)(false);
7624
- const selectWrapperRef = (0, import_react19.useRef)(null);
7625
- const optionWrapperRef = (0, import_react19.useRef)(null);
7697
+ const slots = (0, import_react17.useMemo)(() => select({ ...variantProps }), [variantProps]);
7698
+ const [selectedOptions, setSelectedOptions] = (0, import_react17.useState)(defaultSelectedOptions);
7699
+ const [targetRect, setTargetRect] = (0, import_react17.useState)(null);
7700
+ const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react17.useState)(0);
7701
+ const [isVisible, setIsVisible] = (0, import_react17.useState)(false);
7702
+ const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
7703
+ const selectWrapperRef = (0, import_react17.useRef)(null);
7704
+ const optionWrapperRef = (0, import_react17.useRef)(null);
7626
7705
  const handleToggleSelect = () => {
7627
7706
  if (isOpen) {
7628
7707
  setIsOpen(false);
@@ -7660,7 +7739,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7660
7739
  setSelectedOptions(nextOptions);
7661
7740
  onChange == null ? void 0 : onChange(nextOptions);
7662
7741
  };
7663
- (0, import_react19.useEffect)(() => {
7742
+ (0, import_react17.useEffect)(() => {
7664
7743
  const handleClickOutside = (e) => {
7665
7744
  var _a2;
7666
7745
  if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target) && !((_a2 = selectWrapperRef.current) == null ? void 0 : _a2.contains(e.target))) {
@@ -7671,7 +7750,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7671
7750
  window.addEventListener("mousedown", handleClickOutside);
7672
7751
  return () => window.removeEventListener("mousedown", handleClickOutside);
7673
7752
  }, []);
7674
- (0, import_react19.useEffect)(() => {
7753
+ (0, import_react17.useEffect)(() => {
7675
7754
  if (optionWrapperRef.current) {
7676
7755
  setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
7677
7756
  }
@@ -7684,13 +7763,13 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7684
7763
  onClick
7685
7764
  }) => {
7686
7765
  const slot = select({ ...variantProps, isSelected });
7687
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { title: option.value, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
7766
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { title: option.value, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
7688
7767
  option.value,
7689
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: "check", size: originalProps.size })
7768
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name: "check", size: originalProps.size })
7690
7769
  ] });
7691
7770
  };
7692
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
7693
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7771
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
7772
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7694
7773
  "div",
7695
7774
  {
7696
7775
  className: clsx(
@@ -7698,9 +7777,9 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7698
7777
  variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
7699
7778
  ),
7700
7779
  children: [
7701
- label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
7702
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
7703
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7780
+ label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
7781
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
7782
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7704
7783
  "div",
7705
7784
  {
7706
7785
  "data-expanded": isOpen,
@@ -7711,7 +7790,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7711
7790
  ref: selectWrapperRef,
7712
7791
  onClick: handleToggleSelect,
7713
7792
  children: [
7714
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7793
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7715
7794
  "input",
7716
7795
  {
7717
7796
  ...inputProps,
@@ -7725,7 +7804,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7725
7804
  size: 0
7726
7805
  }
7727
7806
  ),
7728
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7807
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7729
7808
  Icon_default,
7730
7809
  {
7731
7810
  name: "brace-up",
@@ -7736,14 +7815,14 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7736
7815
  ]
7737
7816
  }
7738
7817
  ),
7739
- helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
7740
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
7818
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
7819
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
7741
7820
  ] })
7742
7821
  ]
7743
7822
  }
7744
7823
  ),
7745
7824
  isVisible && (0, import_react_dom.createPortal)(
7746
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7825
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7747
7826
  "div",
7748
7827
  {
7749
7828
  ref: optionWrapperRef,
@@ -7760,7 +7839,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7760
7839
  },
7761
7840
  children: options.map((option) => {
7762
7841
  const isSelected = selectedOptions.some((o) => o.key === option.key);
7763
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7842
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7764
7843
  Option,
7765
7844
  {
7766
7845
  option,
@@ -7929,16 +8008,16 @@ var select = tv({
7929
8008
  });
7930
8009
 
7931
8010
  // src/components/chip/chip.tsx
7932
- var import_react20 = require("react");
7933
- var import_jsx_runtime22 = require("react/jsx-runtime");
7934
- var Chip = (0, import_react20.forwardRef)((originalProps, ref) => {
8011
+ var import_react18 = require("react");
8012
+ var import_jsx_runtime23 = require("react/jsx-runtime");
8013
+ var Chip = (0, import_react18.forwardRef)((originalProps, ref) => {
7935
8014
  var _a;
7936
8015
  const [rawProps, variantProps] = mapPropsVariants(originalProps, chipStyle.variantKeys);
7937
8016
  const props = { ...rawProps, ...variantProps };
7938
8017
  const Component = props.onClick ? "button" : "div";
7939
- const slots = (0, import_react20.useMemo)(() => chipStyle({ ...variantProps }), [variantProps]);
7940
- const renderIcon = (name) => name ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name, fill: true, size: props.size, className: slots.icon() }) : null;
7941
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
8018
+ const slots = (0, import_react18.useMemo)(() => chipStyle({ ...variantProps }), [variantProps]);
8019
+ const renderIcon = (name) => name ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name, fill: true, size: props.size, className: slots.icon() }) : null;
8020
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7942
8021
  Component,
7943
8022
  {
7944
8023
  ref,
@@ -8114,13 +8193,13 @@ var chipStyle = tv({
8114
8193
  });
8115
8194
 
8116
8195
  // src/components/radio/radio.tsx
8117
- var import_react21 = require("react");
8118
- var import_jsx_runtime23 = require("react/jsx-runtime");
8119
- var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
8196
+ var import_react19 = require("react");
8197
+ var import_jsx_runtime24 = require("react/jsx-runtime");
8198
+ var Radio = (0, import_react19.forwardRef)((originalProps, ref) => {
8120
8199
  const [props, variantProps] = mapPropsVariants(originalProps, radioStyle.variantKeys);
8121
8200
  const { children, classNames, labelPosition = "end", ...inputProps } = props;
8122
- const slots = (0, import_react21.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
8123
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
8201
+ const slots = (0, import_react19.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
8202
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
8124
8203
  "label",
8125
8204
  {
8126
8205
  className: clsx(
@@ -8128,9 +8207,9 @@ var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
8128
8207
  labelPosition === "start" && slots.labelReverse({ class: classNames == null ? void 0 : classNames.labelReverse })
8129
8208
  ),
8130
8209
  children: [
8131
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { ...inputProps, type: "radio", ref }) }),
8132
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.outerDot({ class: classNames == null ? void 0 : classNames.outerDot }), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.innerDot({ class: classNames == null ? void 0 : classNames.innerDot }) }) }),
8133
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: slots.labelWrapper({ class: classNames == null ? void 0 : classNames.labelWrapper }), children: children && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children }) })
8210
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...inputProps, type: "radio", ref }) }),
8211
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.outerDot({ class: classNames == null ? void 0 : classNames.outerDot }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.innerDot({ class: classNames == null ? void 0 : classNames.innerDot }) }) }),
8212
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: slots.labelWrapper({ class: classNames == null ? void 0 : classNames.labelWrapper }), children: children && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children }) })
8134
8213
  ]
8135
8214
  }
8136
8215
  );
@@ -8270,21 +8349,21 @@ var radioStyle = tv({
8270
8349
  });
8271
8350
 
8272
8351
  // src/components/switch/switch.tsx
8273
- var import_react22 = require("react");
8274
- var import_tailwind_variants20 = require("tailwind-variants");
8275
- var import_jsx_runtime24 = require("react/jsx-runtime");
8276
- var Switch = (0, import_react22.forwardRef)((originalProps, ref) => {
8352
+ var import_react20 = require("react");
8353
+ var import_tailwind_variants21 = require("tailwind-variants");
8354
+ var import_jsx_runtime25 = require("react/jsx-runtime");
8355
+ var Switch = (0, import_react20.forwardRef)((originalProps, ref) => {
8277
8356
  const [rawProps, variantProps] = mapPropsVariants(originalProps, switchStyle.variantKeys);
8278
8357
  const { size, color, isDisabled, disableAnimation, id, classNames, ...inputProps } = { ...rawProps, ...variantProps };
8279
- const slots = (0, import_react22.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
8280
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
8281
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
8282
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
8358
+ const slots = (0, import_react20.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
8359
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
8360
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
8361
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
8283
8362
  ] });
8284
8363
  });
8285
8364
  Switch.displayName = "Switch";
8286
8365
  var switch_default = Switch;
8287
- var switchStyle = (0, import_tailwind_variants20.tv)({
8366
+ var switchStyle = (0, import_tailwind_variants21.tv)({
8288
8367
  slots: {
8289
8368
  base: ["group/switch", "relative", "max-w-fit", "inline-flex", "items-center", "justify-start", "cursor-pointer"],
8290
8369
  outerWrapper: [
@@ -8389,7 +8468,7 @@ var switchStyle = (0, import_tailwind_variants20.tv)({
8389
8468
  });
8390
8469
 
8391
8470
  // src/components/tooltip/tooltip.tsx
8392
- var import_react24 = require("react");
8471
+ var import_react22 = require("react");
8393
8472
  var import_react_dom2 = require("react-dom");
8394
8473
 
8395
8474
  // src/components/tooltip/tooltip-utils.ts
@@ -8512,11 +8591,11 @@ var getTailStyles = (placement) => {
8512
8591
  };
8513
8592
 
8514
8593
  // src/components/tooltip/useTooltip.ts
8515
- var import_react23 = require("react");
8594
+ var import_react21 = require("react");
8516
8595
  var useTooltip = ({ placement, offset, targetRect }) => {
8517
- const [tooltipPosition, setTooltipPosition] = (0, import_react23.useState)({ x: 0, y: 0 });
8518
- const tooltipRef = (0, import_react23.useRef)(null);
8519
- (0, import_react23.useEffect)(() => {
8596
+ const [tooltipPosition, setTooltipPosition] = (0, import_react21.useState)({ x: 0, y: 0 });
8597
+ const tooltipRef = (0, import_react21.useRef)(null);
8598
+ (0, import_react21.useEffect)(() => {
8520
8599
  if (targetRect && tooltipRef.current) {
8521
8600
  const { width, height } = tooltipRef.current.getBoundingClientRect();
8522
8601
  const scrollX = window.scrollX;
@@ -8546,29 +8625,29 @@ var useTooltip = ({ placement, offset, targetRect }) => {
8546
8625
  };
8547
8626
 
8548
8627
  // src/components/tooltip/tooltip.tsx
8549
- var import_jsx_runtime25 = require("react/jsx-runtime");
8550
- var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
8628
+ var import_jsx_runtime26 = require("react/jsx-runtime");
8629
+ var Tooltip = (0, import_react22.forwardRef)((originalProps, ref) => {
8551
8630
  const [props, variantProps] = mapPropsVariants(originalProps, tooltipStyle.variantKeys);
8552
8631
  const { placement = "top", offset = 5, delay = 100, persistent = false, classNames } = props;
8553
- const slots = (0, import_react24.useMemo)(() => tooltipStyle({ ...variantProps }), [variantProps]);
8554
- const [targetRect, setTargetRect] = (0, import_react24.useState)(null);
8632
+ const slots = (0, import_react22.useMemo)(() => tooltipStyle({ ...variantProps }), [variantProps]);
8633
+ const [targetRect, setTargetRect] = (0, import_react22.useState)(null);
8555
8634
  const { tooltipPosition, tooltipRef } = useTooltip({
8556
8635
  placement,
8557
8636
  offset,
8558
8637
  delay,
8559
8638
  targetRect
8560
8639
  });
8561
- const childrenRef = (0, import_react24.useRef)(null);
8562
- const delayTimeoutRef = (0, import_react24.useRef)(null);
8563
- const getProps = (0, import_react24.useCallback)(
8640
+ const childrenRef = (0, import_react22.useRef)(null);
8641
+ const delayTimeoutRef = (0, import_react22.useRef)(null);
8642
+ const getProps = (0, import_react22.useCallback)(
8564
8643
  (slotKey, classNameKey) => ({
8565
8644
  className: slots[slotKey]({ class: classNames == null ? void 0 : classNames[classNameKey] })
8566
8645
  }),
8567
8646
  [slots, classNames]
8568
8647
  );
8569
- const getBaseProps = (0, import_react24.useCallback)(() => getProps("base", "base"), [getProps]);
8570
- const getContentProps = (0, import_react24.useCallback)(() => getProps("content", "content"), [getProps]);
8571
- const showTooltip = (0, import_react24.useCallback)(() => {
8648
+ const getBaseProps = (0, import_react22.useCallback)(() => getProps("base", "base"), [getProps]);
8649
+ const getContentProps = (0, import_react22.useCallback)(() => getProps("content", "content"), [getProps]);
8650
+ const showTooltip = (0, import_react22.useCallback)(() => {
8572
8651
  if (childrenRef.current) {
8573
8652
  const rect = childrenRef.current.getBoundingClientRect();
8574
8653
  setTargetRect({
@@ -8581,16 +8660,16 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
8581
8660
  });
8582
8661
  }
8583
8662
  }, []);
8584
- const hideTooltip = (0, import_react24.useCallback)(() => {
8663
+ const hideTooltip = (0, import_react22.useCallback)(() => {
8585
8664
  if (!persistent) {
8586
8665
  delayTimeoutRef.current = window.setTimeout(() => setTargetRect(null), delay);
8587
8666
  }
8588
8667
  }, [persistent, delay]);
8589
- (0, import_react24.useEffect)(() => {
8668
+ (0, import_react22.useEffect)(() => {
8590
8669
  if (persistent) showTooltip();
8591
8670
  }, [persistent, showTooltip]);
8592
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
8593
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8671
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
8672
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8594
8673
  "div",
8595
8674
  {
8596
8675
  ref: (node) => {
@@ -8607,7 +8686,7 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
8607
8686
  }
8608
8687
  ),
8609
8688
  targetRect && (0, import_react_dom2.createPortal)(
8610
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
8689
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
8611
8690
  "div",
8612
8691
  {
8613
8692
  ref: tooltipRef,
@@ -8620,7 +8699,7 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
8620
8699
  },
8621
8700
  children: [
8622
8701
  props.content,
8623
- variantProps.tail && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8702
+ variantProps.tail && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8624
8703
  "div",
8625
8704
  {
8626
8705
  className: `absolute h-2 w-2 rotate-45 bg-inherit ${getTailClassName(placement)}`,
@@ -8671,10 +8750,10 @@ var tooltipStyle = tv({
8671
8750
  });
8672
8751
 
8673
8752
  // src/components/modal/modal.tsx
8674
- var import_react25 = require("react");
8753
+ var import_react23 = require("react");
8675
8754
  var import_react_dom3 = require("react-dom");
8676
- var import_jsx_runtime26 = require("react/jsx-runtime");
8677
- var Modal = (0, import_react25.forwardRef)((props, ref) => {
8755
+ var import_jsx_runtime27 = require("react/jsx-runtime");
8756
+ var Modal = (0, import_react23.forwardRef)((props, ref) => {
8678
8757
  const [localProps, variantProps] = mapPropsVariants(props, modal.variantKeys);
8679
8758
  const {
8680
8759
  classNames,
@@ -8688,8 +8767,8 @@ var Modal = (0, import_react25.forwardRef)((props, ref) => {
8688
8767
  onConfirm,
8689
8768
  onCancel
8690
8769
  } = localProps;
8691
- const slots = (0, import_react25.useMemo)(() => modal(variantProps), [variantProps]);
8692
- (0, import_react25.useEffect)(() => {
8770
+ const slots = (0, import_react23.useMemo)(() => modal(variantProps), [variantProps]);
8771
+ (0, import_react23.useEffect)(() => {
8693
8772
  document.body.classList.toggle("overflow-hidden", !!isOpen);
8694
8773
  if (!isOpen || isKeyboardDismissDisabled) return;
8695
8774
  const handleKeyDown = (e) => {
@@ -8703,10 +8782,10 @@ var Modal = (0, import_react25.forwardRef)((props, ref) => {
8703
8782
  }, [isOpen, isKeyboardDismissDisabled, onCancel]);
8704
8783
  if (!isOpen) return null;
8705
8784
  return (0, import_react_dom3.createPortal)(
8706
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
8707
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(backdrop_default, { open: true }),
8708
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }), children: [
8709
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8785
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
8786
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(backdrop_default, { open: true }),
8787
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }), children: [
8788
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
8710
8789
  Icon_default,
8711
8790
  {
8712
8791
  size: "xl",
@@ -8715,12 +8794,12 @@ var Modal = (0, import_react25.forwardRef)((props, ref) => {
8715
8794
  onClick: onCancel
8716
8795
  }
8717
8796
  ),
8718
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8719
- title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8720
- typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children: content }) : content,
8721
- (cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.footer({ class: classNames == null ? void 0 : classNames.footer }), children: [
8722
- cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { variant: "soft", color: "neutral", fullWidth: true, onClick: onCancel, children: cancelButtonText }),
8723
- confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { color: props.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
8797
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8798
+ title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8799
+ typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children: content }) : content,
8800
+ (cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: slots.footer({ class: classNames == null ? void 0 : classNames.footer }), children: [
8801
+ cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(button_default, { variant: "soft", color: "neutral", fullWidth: true, onClick: onCancel, children: cancelButtonText }),
8802
+ confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(button_default, { color: props.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
8724
8803
  ] })
8725
8804
  ] })
8726
8805
  ] }) })
@@ -8786,15 +8865,15 @@ var modal = tv({
8786
8865
  });
8787
8866
 
8788
8867
  // src/components/list/list.tsx
8789
- var import_react26 = require("react");
8790
- var import_jsx_runtime27 = require("react/jsx-runtime");
8791
- var List = (0, import_react26.forwardRef)((originalProps, ref) => {
8868
+ var import_react24 = require("react");
8869
+ var import_jsx_runtime28 = require("react/jsx-runtime");
8870
+ var List = (0, import_react24.forwardRef)((originalProps, ref) => {
8792
8871
  const [props, variantProps] = mapPropsVariants(originalProps, listStyle.variantKeys);
8793
8872
  const { children, classNames } = props;
8794
- const slots = (0, import_react26.useMemo)(() => listStyle(variantProps), [variantProps]);
8795
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: import_react26.Children.map(children, (child) => {
8796
- if (!(0, import_react26.isValidElement)(child)) return child;
8797
- return (0, import_react26.cloneElement)(child, {
8873
+ const slots = (0, import_react24.useMemo)(() => listStyle(variantProps), [variantProps]);
8874
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: import_react24.Children.map(children, (child) => {
8875
+ if (!(0, import_react24.isValidElement)(child)) return child;
8876
+ return (0, import_react24.cloneElement)(child, {
8798
8877
  ...variantProps,
8799
8878
  ...child.props
8800
8879
  });
@@ -8831,9 +8910,9 @@ var listStyle = tv({
8831
8910
  });
8832
8911
 
8833
8912
  // src/components/list/listItem.tsx
8834
- var import_react27 = require("react");
8835
- var import_jsx_runtime28 = require("react/jsx-runtime");
8836
- var ListItem = (0, import_react27.forwardRef)((props, ref) => {
8913
+ var import_react25 = require("react");
8914
+ var import_jsx_runtime29 = require("react/jsx-runtime");
8915
+ var ListItem = (0, import_react25.forwardRef)((props, ref) => {
8837
8916
  const [rawProps, variantProps] = mapPropsVariants(props, listItemStyle.variantKeys);
8838
8917
  const {
8839
8918
  title,
@@ -8845,19 +8924,19 @@ var ListItem = (0, import_react27.forwardRef)((props, ref) => {
8845
8924
  classNames,
8846
8925
  onClick
8847
8926
  } = { ...rawProps, ...variantProps };
8848
- const slots = (0, import_react27.useMemo)(() => listItemStyle(variantProps), [variantProps]);
8927
+ const slots = (0, import_react25.useMemo)(() => listItemStyle(variantProps), [variantProps]);
8849
8928
  const iconSize = ["lg", "xl"].includes(size) ? "lg" : "md";
8850
8929
  const avatarSize = iconSize;
8851
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "data-selected": selected, onClick, children: [
8852
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8853
- avatar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(avatar_default, { ...avatar, variant: "round", size: avatarSize }),
8854
- startIconName && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon_default, { name: startIconName, fill: true, size, className: slots.startIcon({ class: classNames == null ? void 0 : classNames.startIcon }) }),
8855
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper }), children: [
8856
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8857
- subTitle && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle }), children: subTitle })
8930
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "data-selected": selected, onClick, children: [
8931
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8932
+ avatar && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(avatar_default, { ...avatar, variant: "round", size: avatarSize }),
8933
+ startIconName && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: startIconName, fill: true, size, className: slots.startIcon({ class: classNames == null ? void 0 : classNames.startIcon }) }),
8934
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper }), children: [
8935
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8936
+ subTitle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle }), children: subTitle })
8858
8937
  ] })
8859
8938
  ] }),
8860
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon_default, { name: "right-chevron", size: iconSize, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }) })
8939
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "right-chevron", size: iconSize, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }) })
8861
8940
  ] });
8862
8941
  });
8863
8942
  ListItem.displayName = "ListItem";
@@ -9025,9 +9104,9 @@ var listItemStyle = tv({
9025
9104
  });
9026
9105
 
9027
9106
  // src/components/toast/toast.tsx
9028
- var import_react28 = require("react");
9029
- var import_jsx_runtime29 = require("react/jsx-runtime");
9030
- var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
9107
+ var import_react26 = require("react");
9108
+ var import_jsx_runtime30 = require("react/jsx-runtime");
9109
+ var Toast = (0, import_react26.forwardRef)((originalProps, ref) => {
9031
9110
  const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
9032
9111
  const {
9033
9112
  title,
@@ -9041,9 +9120,9 @@ var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
9041
9120
  disableAnimation,
9042
9121
  onClose
9043
9122
  } = { ...props, ...variantProps };
9044
- const slots = (0, import_react28.useMemo)(() => toast({ ...variantProps }), [variantProps]);
9045
- const toastRef = (0, import_react28.useRef)(null);
9046
- (0, import_react28.useImperativeHandle)(
9123
+ const slots = (0, import_react26.useMemo)(() => toast({ ...variantProps }), [variantProps]);
9124
+ const toastRef = (0, import_react26.useRef)(null);
9125
+ (0, import_react26.useImperativeHandle)(
9047
9126
  ref,
9048
9127
  () => ({
9049
9128
  getWidth: () => {
@@ -9054,7 +9133,7 @@ var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
9054
9133
  []
9055
9134
  );
9056
9135
  const animationClass = (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom";
9057
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
9136
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
9058
9137
  "div",
9059
9138
  {
9060
9139
  ref: toastRef,
@@ -9066,12 +9145,12 @@ var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
9066
9145
  ),
9067
9146
  style: hasShadow ? { boxShadow: "0px 6px 18px rgba(0, 0, 0, 0.10)" } : {},
9068
9147
  children: [
9069
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
9070
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
9071
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
9072
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "close", className: "cursor-pointer", onClick: onClose })
9148
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
9149
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
9150
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
9151
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon_default, { name: "close", className: "cursor-pointer", onClick: onClose })
9073
9152
  ] }),
9074
- content && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: content })
9153
+ content && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: content })
9075
9154
  ]
9076
9155
  }
9077
9156
  );
@@ -9176,7 +9255,7 @@ var toast = tv({
9176
9255
  });
9177
9256
 
9178
9257
  // src/components/toast/use-toast.tsx
9179
- var import_react29 = require("react");
9258
+ var import_react27 = require("react");
9180
9259
 
9181
9260
  // src/components/toast/toast-utils.ts
9182
9261
  var getToastPosition = (placement, width, offset) => {
@@ -9215,10 +9294,10 @@ var getToastPosition = (placement, width, offset) => {
9215
9294
  };
9216
9295
 
9217
9296
  // src/components/toast/use-toast.tsx
9218
- var import_jsx_runtime30 = require("react/jsx-runtime");
9219
- var ToastContext = (0, import_react29.createContext)(null);
9297
+ var import_jsx_runtime31 = require("react/jsx-runtime");
9298
+ var ToastContext = (0, import_react27.createContext)(null);
9220
9299
  var useToast = () => {
9221
- const context = (0, import_react29.useContext)(ToastContext);
9300
+ const context = (0, import_react27.useContext)(ToastContext);
9222
9301
  if (!context) {
9223
9302
  throw new Error("useToast must be used within a ToastProvider");
9224
9303
  }
@@ -9228,10 +9307,10 @@ var ToastProvider = ({
9228
9307
  globalOptions,
9229
9308
  children
9230
9309
  }) => {
9231
- const [toasts, setToasts] = (0, import_react29.useState)([]);
9232
- const [containerStyle, setContainerStyle] = (0, import_react29.useState)({});
9233
- const toastRef = (0, import_react29.useRef)(null);
9234
- const addToast = (0, import_react29.useCallback)(
9310
+ const [toasts, setToasts] = (0, import_react27.useState)([]);
9311
+ const [containerStyle, setContainerStyle] = (0, import_react27.useState)({});
9312
+ const toastRef = (0, import_react27.useRef)(null);
9313
+ const addToast = (0, import_react27.useCallback)(
9235
9314
  (title, options = {}) => {
9236
9315
  const id = Date.now() + Math.floor(Math.random() * 1e5);
9237
9316
  const newToast = {
@@ -9248,11 +9327,11 @@ var ToastProvider = ({
9248
9327
  },
9249
9328
  [globalOptions]
9250
9329
  );
9251
- const removeToast = (0, import_react29.useCallback)((id) => {
9330
+ const removeToast = (0, import_react27.useCallback)((id) => {
9252
9331
  setToasts((prevToasts) => prevToasts.filter((toast2) => toast2.id !== id));
9253
9332
  }, []);
9254
9333
  const contextValue = addToast;
9255
- (0, import_react29.useEffect)(() => {
9334
+ (0, import_react27.useEffect)(() => {
9256
9335
  var _a;
9257
9336
  const width = (globalOptions == null ? void 0 : globalOptions.width) ? globalOptions.width : typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : 300;
9258
9337
  const offset = 20;
@@ -9266,18 +9345,18 @@ var ToastProvider = ({
9266
9345
  right: right !== void 0 ? `${right}px` : void 0
9267
9346
  });
9268
9347
  }, [globalOptions == null ? void 0 : globalOptions.placement, globalOptions == null ? void 0 : globalOptions.width]);
9269
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ToastContext.Provider, { value: contextValue, children: [
9348
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(ToastContext.Provider, { value: contextValue, children: [
9270
9349
  children,
9271
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
9350
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
9272
9351
  ] });
9273
9352
  };
9274
9353
 
9275
9354
  // src/components/dateTimePicker/dateTimePicker.tsx
9276
- var import_react33 = __toESM(require("react"));
9355
+ var import_react31 = __toESM(require("react"));
9277
9356
  var import_react_dom4 = require("react-dom");
9278
9357
 
9279
9358
  // src/components/dateTimePicker/useDateTimePicker.tsx
9280
- var import_react30 = require("react");
9359
+ var import_react28 = require("react");
9281
9360
 
9282
9361
  // src/components/dateTimePicker/util.ts
9283
9362
  var formatDateToString = (date) => {
@@ -9293,17 +9372,17 @@ var formatStringToDate = (date) => {
9293
9372
 
9294
9373
  // src/components/dateTimePicker/useDateTimePicker.tsx
9295
9374
  var useDatePicker = ({ initialDate, initialTime }) => {
9296
- const [selectedDate, setSelectedDate] = (0, import_react30.useState)(
9375
+ const [selectedDate, setSelectedDate] = (0, import_react28.useState)(
9297
9376
  initialDate ? formatDateToString(initialDate) : ""
9298
9377
  );
9299
- const [selectedTime, setSelectedTime] = (0, import_react30.useState)(initialTime ? initialTime : "");
9300
- const [targetRect, setTargetRect] = (0, import_react30.useState)(null);
9301
- const [popupWidth, setPopupWidth] = (0, import_react30.useState)(0);
9302
- const [popupHeight, setPopupHeight] = (0, import_react30.useState)(0);
9303
- const [isFocusInput, setIsFocusInput] = (0, import_react30.useState)(false);
9304
- const dateInputRef = (0, import_react30.useRef)(null);
9305
- const datePickerWrapperRef = (0, import_react30.useRef)(null);
9306
- const datePickerRef = (0, import_react30.useRef)(null);
9378
+ const [selectedTime, setSelectedTime] = (0, import_react28.useState)(initialTime ? initialTime : "");
9379
+ const [targetRect, setTargetRect] = (0, import_react28.useState)(null);
9380
+ const [popupWidth, setPopupWidth] = (0, import_react28.useState)(0);
9381
+ const [popupHeight, setPopupHeight] = (0, import_react28.useState)(0);
9382
+ const [isFocusInput, setIsFocusInput] = (0, import_react28.useState)(false);
9383
+ const dateInputRef = (0, import_react28.useRef)(null);
9384
+ const datePickerWrapperRef = (0, import_react28.useRef)(null);
9385
+ const datePickerRef = (0, import_react28.useRef)(null);
9307
9386
  const DATE_PICKER_GAP = 4;
9308
9387
  const calculatePositionWithScroll = (targetRect2) => {
9309
9388
  if (targetRect2 && popupWidth && popupHeight) {
@@ -9336,7 +9415,7 @@ var useDatePicker = ({ initialDate, initialTime }) => {
9336
9415
  const handleBlueInput = () => {
9337
9416
  setIsFocusInput(false);
9338
9417
  };
9339
- (0, import_react30.useEffect)(() => {
9418
+ (0, import_react28.useEffect)(() => {
9340
9419
  const onClickOutside = (e) => {
9341
9420
  if (datePickerRef.current && !datePickerRef.current.contains(e.target) && datePickerWrapperRef.current && !datePickerWrapperRef.current.contains(e.target)) {
9342
9421
  setTargetRect(null);
@@ -9345,7 +9424,7 @@ var useDatePicker = ({ initialDate, initialTime }) => {
9345
9424
  window.addEventListener("mousedown", onClickOutside);
9346
9425
  return () => window.removeEventListener("mousedown", onClickOutside);
9347
9426
  }, []);
9348
- (0, import_react30.useEffect)(() => {
9427
+ (0, import_react28.useEffect)(() => {
9349
9428
  if (datePickerWrapperRef.current) {
9350
9429
  setPopupHeight(datePickerWrapperRef.current.getBoundingClientRect().height);
9351
9430
  setPopupWidth(datePickerWrapperRef.current.getBoundingClientRect().width);
@@ -9370,19 +9449,19 @@ var useDatePicker = ({ initialDate, initialTime }) => {
9370
9449
  };
9371
9450
 
9372
9451
  // src/components/dateTimePicker/calendar.tsx
9373
- var import_react31 = __toESM(require("react"));
9374
- var import_jsx_runtime31 = require("react/jsx-runtime");
9375
- var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
9452
+ var import_react29 = __toESM(require("react"));
9453
+ var import_jsx_runtime32 = require("react/jsx-runtime");
9454
+ var Calendar = (0, import_react29.forwardRef)((originalProps, ref) => {
9376
9455
  const [props, variantProps] = mapPropsVariants(originalProps, calendarStyle.variantKeys);
9377
9456
  const { selectedDate, classNames, highlightWeekend = true, onChangeDate, ...inputProps } = props;
9378
- const [currentDate, setCurrentDate] = (0, import_react31.useState)(selectedDate ? new Date(selectedDate) : /* @__PURE__ */ new Date());
9457
+ const [currentDate, setCurrentDate] = (0, import_react29.useState)(selectedDate ? new Date(selectedDate) : /* @__PURE__ */ new Date());
9379
9458
  const daysOfWeek = ["S", "M", "T", "W", "T", "F", "S"];
9380
- (0, import_react31.useEffect)(() => {
9459
+ (0, import_react29.useEffect)(() => {
9381
9460
  if (selectedDate) {
9382
9461
  setCurrentDate(new Date(selectedDate));
9383
9462
  }
9384
9463
  }, [selectedDate]);
9385
- const getCalendarDates = (0, import_react31.useCallback)(() => {
9464
+ const getCalendarDates = (0, import_react29.useCallback)(() => {
9386
9465
  const year = currentDate.getFullYear();
9387
9466
  const month = currentDate.getMonth();
9388
9467
  const firstDayOfMonth = new Date(year, month, 1).getDay();
@@ -9428,17 +9507,17 @@ var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
9428
9507
  onChangeDate(formatted);
9429
9508
  }
9430
9509
  };
9431
- (0, import_react31.useImperativeHandle)(ref, () => ({
9510
+ (0, import_react29.useImperativeHandle)(ref, () => ({
9432
9511
  getSelectedDate: () => selectedDate
9433
9512
  }));
9434
- const slots = (0, import_react31.useMemo)(() => calendarStyle({ ...variantProps }), [variantProps]);
9435
- const getBaseProps = (0, import_react31.useCallback)(
9513
+ const slots = (0, import_react29.useMemo)(() => calendarStyle({ ...variantProps }), [variantProps]);
9514
+ const getBaseProps = (0, import_react29.useCallback)(
9436
9515
  () => ({
9437
9516
  className: `${slots.base({ class: classNames == null ? void 0 : classNames.base })}`
9438
9517
  }),
9439
9518
  [slots, classNames]
9440
9519
  );
9441
- const getDateTitleProps = (0, import_react31.useCallback)(
9520
+ const getDateTitleProps = (0, import_react29.useCallback)(
9442
9521
  (index) => {
9443
9522
  return {
9444
9523
  className: `${slots.dateTitle({
@@ -9450,7 +9529,7 @@ var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
9450
9529
  },
9451
9530
  [slots, classNames, highlightWeekend]
9452
9531
  );
9453
- const getDateProps = (0, import_react31.useCallback)(
9532
+ const getDateProps = (0, import_react29.useCallback)(
9454
9533
  (dateObj) => {
9455
9534
  const today = /* @__PURE__ */ new Date();
9456
9535
  const isToday = today.getDate() === dateObj.date && today.getMonth() === currentDate.getMonth() && today.getFullYear() === currentDate.getFullYear();
@@ -9472,18 +9551,18 @@ var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
9472
9551
  [slots, classNames, selectedDate, currentDate, highlightWeekend]
9473
9552
  );
9474
9553
  const calendarDates = getCalendarDates();
9475
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ...getBaseProps(), children: [
9476
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "calendar-header flex justify-between items-center mb-4", children: [
9477
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "brace-left", size: "md", className: "cursor-pointer", onClick: handlePrevMonth }),
9478
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-h6 font-semibold", children: currentDate.toLocaleString("default", { year: "numeric", month: "2-digit" }) }),
9479
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "brace-right", size: "md", className: "cursor-pointer", onClick: handleNextMonth })
9554
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { ...getBaseProps(), children: [
9555
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "calendar-header flex justify-between items-center mb-4", children: [
9556
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon_default, { name: "brace-left", size: "md", className: "cursor-pointer", onClick: handlePrevMonth }),
9557
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-h6 font-semibold", children: currentDate.toLocaleString("default", { year: "numeric", month: "2-digit" }) }),
9558
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon_default, { name: "brace-right", size: "md", className: "cursor-pointer", onClick: handleNextMonth })
9480
9559
  ] }),
9481
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-7 gap-2 text-center", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ...getDateTitleProps(index), children: day }, `${day}-${index}`)) }),
9482
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center mt-2", children: calendarDates.map((week, weekIndex) => {
9560
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grid grid-cols-7 gap-2 text-center", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ...getDateTitleProps(index), children: day }, `${day}-${index}`)) }),
9561
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center mt-2", children: calendarDates.map((week, weekIndex) => {
9483
9562
  const hasCurrentMonthDates = week.some((dateObj) => dateObj.currentMonth);
9484
9563
  if (!hasCurrentMonthDates) return null;
9485
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react31.default.Fragment, { children: week.map((dateObj, index) => {
9486
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ...getDateProps(dateObj), children: dateObj.date }, index);
9564
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react29.default.Fragment, { children: week.map((dateObj, index) => {
9565
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ...getDateProps(dateObj), children: dateObj.date }, index);
9487
9566
  }) }, weekIndex);
9488
9567
  }) })
9489
9568
  ] }) });
@@ -9554,22 +9633,22 @@ var calendarStyle = tv({
9554
9633
  });
9555
9634
 
9556
9635
  // src/components/dateTimePicker/timePicker.tsx
9557
- var import_react32 = require("react");
9558
- var import_jsx_runtime32 = require("react/jsx-runtime");
9636
+ var import_react30 = require("react");
9637
+ var import_jsx_runtime33 = require("react/jsx-runtime");
9559
9638
  var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime }) => {
9560
9639
  const TOTAL_HOURS = 12;
9561
9640
  const TOTAL_MINUTES = 60;
9562
9641
  const ITEM_HEIGHT = 30;
9563
9642
  const PERIODS = ["AM", "PM"];
9564
- const [selectedHour, setSelectedHour] = (0, import_react32.useState)("01");
9565
- const [selectedMinute, setSelectedMinute] = (0, import_react32.useState)("00");
9566
- const [selectedPeriod, setSelectedPeriod] = (0, import_react32.useState)("AM");
9567
- const hourRef = (0, import_react32.useRef)(null);
9568
- const minuteRef = (0, import_react32.useRef)(null);
9569
- const periodRef = (0, import_react32.useRef)(null);
9643
+ const [selectedHour, setSelectedHour] = (0, import_react30.useState)("01");
9644
+ const [selectedMinute, setSelectedMinute] = (0, import_react30.useState)("00");
9645
+ const [selectedPeriod, setSelectedPeriod] = (0, import_react30.useState)("AM");
9646
+ const hourRef = (0, import_react30.useRef)(null);
9647
+ const minuteRef = (0, import_react30.useRef)(null);
9648
+ const periodRef = (0, import_react30.useRef)(null);
9570
9649
  const hoursArray = [...Array(TOTAL_HOURS).keys()].map((i) => (i + 1).toString().padStart(2, "0"));
9571
9650
  const minutesArray = [...Array(TOTAL_MINUTES).keys()].map((i) => i.toString().padStart(2, "0"));
9572
- (0, import_react32.useEffect)(() => {
9651
+ (0, import_react30.useEffect)(() => {
9573
9652
  if (selectedTime) {
9574
9653
  const { formattedHour, minute, period } = parseAndFormatTime(selectedTime);
9575
9654
  setSelectedHour(formattedHour);
@@ -9580,7 +9659,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9580
9659
  scrollToSelectedTime();
9581
9660
  }
9582
9661
  }, [selectedTime, isFocusInput]);
9583
- (0, import_react32.useEffect)(() => {
9662
+ (0, import_react30.useEffect)(() => {
9584
9663
  scrollToSelectedTime();
9585
9664
  }, []);
9586
9665
  const parseAndFormatTime = (time) => {
@@ -9617,8 +9696,8 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9617
9696
  onChangeTime(formattedTime);
9618
9697
  }
9619
9698
  };
9620
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex h-[200px] p-[10px] gap-[5px] border border-neutral-main rounded-md bg-background shadow-lg", children: [
9621
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: periodRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: PERIODS.map((period, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9699
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex h-[200px] p-[10px] gap-[5px] border border-neutral-main rounded-md bg-background shadow-lg", children: [
9700
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(list_default, { ref: periodRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: PERIODS.map((period, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9622
9701
  listItem_default,
9623
9702
  {
9624
9703
  color,
@@ -9632,7 +9711,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9632
9711
  },
9633
9712
  `${period}-${index}`
9634
9713
  )) }),
9635
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: hourRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: hoursArray.map((hour, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9714
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(list_default, { ref: hourRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: hoursArray.map((hour, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9636
9715
  listItem_default,
9637
9716
  {
9638
9717
  color,
@@ -9646,7 +9725,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9646
9725
  },
9647
9726
  `${hour}-${index}`
9648
9727
  )) }),
9649
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: minuteRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: minutesArray.map((minute, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9728
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(list_default, { ref: minuteRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: minutesArray.map((minute, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9650
9729
  listItem_default,
9651
9730
  {
9652
9731
  color,
@@ -9665,8 +9744,8 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9665
9744
  var timePicker_default = TimePicker;
9666
9745
 
9667
9746
  // src/components/dateTimePicker/dateTimePicker.tsx
9668
- var import_jsx_runtime33 = require("react/jsx-runtime");
9669
- var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9747
+ var import_jsx_runtime34 = require("react/jsx-runtime");
9748
+ var DatePicker = (0, import_react31.forwardRef)((originalProps, ref) => {
9670
9749
  const [props, variantProps] = mapPropsVariants(originalProps, dateTimePickerStyle.variantKeys);
9671
9750
  const {
9672
9751
  classNames,
@@ -9680,7 +9759,7 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9680
9759
  onChangeTime,
9681
9760
  ...inputProps
9682
9761
  } = props;
9683
- const slots = (0, import_react33.useMemo)(() => dateTimePickerStyle({ ...variantProps }), [variantProps]);
9762
+ const slots = (0, import_react31.useMemo)(() => dateTimePickerStyle({ ...variantProps }), [variantProps]);
9684
9763
  const {
9685
9764
  selectedDate,
9686
9765
  selectedTime,
@@ -9701,32 +9780,32 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9701
9780
  initialTime: typeof value === "string" ? value : void 0
9702
9781
  });
9703
9782
  const position = targetRect ? calculatePositionWithScroll(targetRect) : null;
9704
- const getBaseProps = (0, import_react33.useCallback)(
9783
+ const getBaseProps = (0, import_react31.useCallback)(
9705
9784
  () => ({
9706
9785
  className: slots.base({ class: classNames == null ? void 0 : classNames.base })
9707
9786
  }),
9708
9787
  [slots, classNames]
9709
9788
  );
9710
- const getLabelProps = (0, import_react33.useCallback)(
9789
+ const getLabelProps = (0, import_react31.useCallback)(
9711
9790
  () => ({
9712
9791
  className: slots.label({ class: classNames == null ? void 0 : classNames.label })
9713
9792
  }),
9714
9793
  [slots, classNames]
9715
9794
  );
9716
- const getInnerWrapperProps = (0, import_react33.useCallback)(
9795
+ const getInnerWrapperProps = (0, import_react31.useCallback)(
9717
9796
  () => ({
9718
9797
  className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
9719
9798
  }),
9720
9799
  [slots, classNames]
9721
9800
  );
9722
- const getInputWrapperProps = (0, import_react33.useCallback)(
9801
+ const getInputWrapperProps = (0, import_react31.useCallback)(
9723
9802
  () => ({
9724
9803
  className: slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }),
9725
9804
  ref: datePickerRef
9726
9805
  }),
9727
9806
  [slots, classNames]
9728
9807
  );
9729
- const getInputProps = (0, import_react33.useCallback)(
9808
+ const getInputProps = (0, import_react31.useCallback)(
9730
9809
  () => ({
9731
9810
  ...inputProps,
9732
9811
  ref: ref || dateInputRef,
@@ -9757,33 +9836,33 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9757
9836
  }),
9758
9837
  [inputProps, ref, dateInputRef, slots, classNames == null ? void 0 : classNames.input, selectedDate, selectedTime, type, value]
9759
9838
  );
9760
- const getContentProps = (0, import_react33.useCallback)(
9839
+ const getContentProps = (0, import_react31.useCallback)(
9761
9840
  () => ({
9762
9841
  className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
9763
9842
  size: originalProps.size
9764
9843
  }),
9765
9844
  [slots, classNames, originalProps.size]
9766
9845
  );
9767
- const getErrorMessageProps = (0, import_react33.useCallback)(
9846
+ const getErrorMessageProps = (0, import_react31.useCallback)(
9768
9847
  () => ({
9769
9848
  className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
9770
9849
  }),
9771
9850
  [slots, classNames]
9772
9851
  );
9773
9852
  const renderStartContent = () => {
9774
- if (import_react33.default.isValidElement(startContent)) {
9853
+ if (import_react31.default.isValidElement(startContent)) {
9775
9854
  const existingProps = startContent.props;
9776
9855
  const mergedProps = {
9777
9856
  ...getContentProps(),
9778
9857
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
9779
9858
  };
9780
- return import_react33.default.cloneElement(startContent, mergedProps);
9859
+ return import_react31.default.cloneElement(startContent, mergedProps);
9781
9860
  } else {
9782
9861
  const contentProps = getContentProps();
9783
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...contentProps, children: startContent });
9862
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...contentProps, children: startContent });
9784
9863
  }
9785
9864
  };
9786
- const renderDateTimePickerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...getContentProps(), onClick: handleToggleDatePicker, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9865
+ const renderDateTimePickerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...getContentProps(), onClick: handleToggleDatePicker, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9787
9866
  Icon_default,
9788
9867
  {
9789
9868
  name: type === "time" ? "clock" : "calendar",
@@ -9793,18 +9872,18 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9793
9872
  }
9794
9873
  ) });
9795
9874
  const renderContentWithIcon = () => {
9796
- if (import_react33.default.isValidElement(endContent)) {
9875
+ if (import_react31.default.isValidElement(endContent)) {
9797
9876
  const existingProps = endContent.props;
9798
9877
  const mergedProps = {
9799
9878
  ...getContentProps(),
9800
9879
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
9801
9880
  };
9802
- return import_react33.default.cloneElement(endContent, mergedProps);
9881
+ return import_react31.default.cloneElement(endContent, mergedProps);
9803
9882
  } else if (errorMessage) {
9804
9883
  const iconProps = { ...getContentProps(), className: getContentProps().className };
9805
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
9884
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
9806
9885
  } else {
9807
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, {});
9886
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, {});
9808
9887
  }
9809
9888
  };
9810
9889
  const renderEndContent = () => {
@@ -9819,20 +9898,20 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9819
9898
  return renderContentWithIcon();
9820
9899
  }
9821
9900
  };
9822
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
9823
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getBaseProps(), children: [
9824
- label && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("label", { ...getLabelProps(), children: label }),
9825
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getInnerWrapperProps(), children: [
9826
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getInputWrapperProps(), children: [
9901
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
9902
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ...getBaseProps(), children: [
9903
+ label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { ...getLabelProps(), children: label }),
9904
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ...getInnerWrapperProps(), children: [
9905
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ...getInputWrapperProps(), children: [
9827
9906
  startContent && renderStartContent(),
9828
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("input", { ...getInputProps() }),
9907
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("input", { ...getInputProps() }),
9829
9908
  renderEndContent()
9830
9909
  ] }),
9831
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { ...getErrorMessageProps(), children: errorMessage })
9910
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { ...getErrorMessageProps(), children: errorMessage })
9832
9911
  ] })
9833
9912
  ] }),
9834
- targetRect && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: (0, import_react_dom4.createPortal)(
9835
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
9913
+ targetRect && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: (0, import_react_dom4.createPortal)(
9914
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9836
9915
  "div",
9837
9916
  {
9838
9917
  ref: datePickerWrapperRef,
@@ -9843,7 +9922,7 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9843
9922
  zIndex: 1e3
9844
9923
  },
9845
9924
  children: [
9846
- type === "date" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9925
+ type === "date" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9847
9926
  calendar_default,
9848
9927
  {
9849
9928
  color: originalProps.color,
@@ -9855,7 +9934,7 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9855
9934
  }
9856
9935
  }
9857
9936
  ),
9858
- type === "time" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9937
+ type === "time" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9859
9938
  timePicker_default,
9860
9939
  {
9861
9940
  color: originalProps.color,
@@ -10005,20 +10084,20 @@ var dateTimePickerStyle = tv({
10005
10084
  });
10006
10085
 
10007
10086
  // src/components/tree/tree.tsx
10008
- var import_react34 = require("react");
10009
- var import_jsx_runtime34 = require("react/jsx-runtime");
10010
- var TreeNodeItem = (0, import_react34.forwardRef)(
10087
+ var import_react32 = require("react");
10088
+ var import_jsx_runtime35 = require("react/jsx-runtime");
10089
+ var TreeNodeItem = (0, import_react32.forwardRef)(
10011
10090
  ({ node, depth, fileIcon, selectedId, isLoading, classNames, onExpand }, ref) => {
10012
- const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
10013
- const [children, setChildren] = (0, import_react34.useState)(node.children);
10014
- const [isLoadingChildren, setIsLoadingChildren] = (0, import_react34.useState)(false);
10015
- const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
10016
- const hasMore = (0, import_react34.useMemo)(() => {
10091
+ const [isOpen, setIsOpen] = (0, import_react32.useState)(false);
10092
+ const [children, setChildren] = (0, import_react32.useState)(node.children);
10093
+ const [isLoadingChildren, setIsLoadingChildren] = (0, import_react32.useState)(false);
10094
+ const slots = (0, import_react32.useMemo)(() => treeStyle(), []);
10095
+ const hasMore = (0, import_react32.useMemo)(() => {
10017
10096
  if (node.isLeaf) return false;
10018
10097
  if (Array.isArray(children)) return children.length > 0;
10019
10098
  return typeof onExpand === "function";
10020
10099
  }, [node.isLeaf, children, onExpand]);
10021
- const toggleOpen = (0, import_react34.useCallback)(async () => {
10100
+ const toggleOpen = (0, import_react32.useCallback)(async () => {
10022
10101
  if (!isOpen && !children && onExpand && !node.isLeaf) {
10023
10102
  setIsLoadingChildren(true);
10024
10103
  try {
@@ -10043,7 +10122,7 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
10043
10122
  (_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
10044
10123
  };
10045
10124
  const marginClass = depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]";
10046
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
10125
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10047
10126
  "div",
10048
10127
  {
10049
10128
  ref,
@@ -10053,14 +10132,18 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
10053
10132
  isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
10054
10133
  ),
10055
10134
  children: [
10056
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
10135
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10057
10136
  "div",
10058
10137
  {
10059
- className: clsx(slots.node({ class: classNames == null ? void 0 : classNames.node }), selectedId == node.id ? "bg-neutral-soft" : ""),
10138
+ className: clsx(
10139
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
10140
+ slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
10141
+ selectedId == node.id ? "bg-neutral-soft" : ""
10142
+ ),
10060
10143
  onClick: handleClick,
10061
10144
  onContextMenu: handleRightClick,
10062
10145
  children: [
10063
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10146
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10064
10147
  Icon_default,
10065
10148
  {
10066
10149
  name: "right-chevron",
@@ -10071,13 +10154,13 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
10071
10154
  }
10072
10155
  ),
10073
10156
  fileIcon,
10074
- node.label
10157
+ node.content
10075
10158
  ]
10076
10159
  }
10077
10160
  ),
10078
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
10079
- isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
10080
- children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10161
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
10162
+ isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
10163
+ children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10081
10164
  TreeNodeItem,
10082
10165
  {
10083
10166
  node: child,
@@ -10106,15 +10189,35 @@ var Tree = ({
10106
10189
  classNames,
10107
10190
  onExpand
10108
10191
  }) => {
10109
- const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
10110
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
10111
- headerContent && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: headerContent }),
10112
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
10113
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.group({ class: classNames == null ? void 0 : classNames.group }), children: [
10114
- groupIcon,
10115
- group.label
10116
- ] }),
10117
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10192
+ const slots = (0, import_react32.useMemo)(() => treeStyle(), []);
10193
+ const handleClick = (e) => {
10194
+ var _a;
10195
+ (_a = group.onClick) == null ? void 0 : _a.call(group, e);
10196
+ };
10197
+ const handleRightClick = (e) => {
10198
+ var _a;
10199
+ e.preventDefault();
10200
+ (_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
10201
+ };
10202
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
10203
+ headerContent && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: headerContent }),
10204
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
10205
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10206
+ "div",
10207
+ {
10208
+ className: clsx(
10209
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
10210
+ group.onClick || group.onRightClick ? slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }) : ""
10211
+ ),
10212
+ onClick: handleClick,
10213
+ onContextMenu: handleRightClick,
10214
+ children: [
10215
+ groupIcon,
10216
+ group.content
10217
+ ]
10218
+ }
10219
+ ),
10220
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10118
10221
  TreeNodeItem,
10119
10222
  {
10120
10223
  node,
@@ -10136,7 +10239,6 @@ var treeStyle = tv({
10136
10239
  slots: {
10137
10240
  base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
10138
10241
  wrapper: ["flex", "flex-col", "gap-[5px]"],
10139
- group: ["flex", "items-center", "gap-[5px]", "text-md", "font-bold", "text-body-foreground", "p-[5px]"],
10140
10242
  node: [
10141
10243
  "flex",
10142
10244
  "items-center",
@@ -10144,18 +10246,17 @@ var treeStyle = tv({
10144
10246
  "text-md",
10145
10247
  "font-bold",
10146
10248
  "text-body-foreground",
10147
- "hover:bg-neutral-soft",
10148
- "p-[5px]",
10149
10249
  "rounded-[5px]",
10150
- "cursor-pointer"
10151
- ]
10250
+ "p-[5px]"
10251
+ ],
10252
+ clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
10152
10253
  }
10153
10254
  });
10154
10255
 
10155
10256
  // src/components/fileUpload/fileUpload.tsx
10156
- var import_react35 = require("react");
10157
- var import_tailwind_variants29 = require("tailwind-variants");
10158
- var import_jsx_runtime35 = require("react/jsx-runtime");
10257
+ var import_react33 = require("react");
10258
+ var import_tailwind_variants30 = require("tailwind-variants");
10259
+ var import_jsx_runtime36 = require("react/jsx-runtime");
10159
10260
  function FileUpload({
10160
10261
  buttonText,
10161
10262
  maxSizeMB = 10,
@@ -10168,11 +10269,11 @@ function FileUpload({
10168
10269
  showProgress,
10169
10270
  classNames
10170
10271
  }) {
10171
- const fileInputRef = (0, import_react35.useRef)(null);
10172
- const uploadIntervalRef = (0, import_react35.useRef)(null);
10173
- const [file, setFile] = (0, import_react35.useState)(null);
10174
- const [uploadProgress, setUploadProgress] = (0, import_react35.useState)(0);
10175
- const [errorMessage, setErrorMessage] = (0, import_react35.useState)("");
10272
+ const fileInputRef = (0, import_react33.useRef)(null);
10273
+ const uploadIntervalRef = (0, import_react33.useRef)(null);
10274
+ const [file, setFile] = (0, import_react33.useState)(null);
10275
+ const [uploadProgress, setUploadProgress] = (0, import_react33.useState)(0);
10276
+ const [errorMessage, setErrorMessage] = (0, import_react33.useState)("");
10176
10277
  const slots = fileUploadStyle();
10177
10278
  const handleButtonClick = () => {
10178
10279
  var _a;
@@ -10222,18 +10323,18 @@ function FileUpload({
10222
10323
  setUploadProgress(0);
10223
10324
  setErrorMessage("");
10224
10325
  };
10225
- (0, import_react35.useEffect)(() => {
10326
+ (0, import_react33.useEffect)(() => {
10226
10327
  return () => {
10227
10328
  if (uploadIntervalRef.current) {
10228
10329
  clearInterval(uploadIntervalRef.current);
10229
10330
  }
10230
10331
  };
10231
10332
  }, []);
10232
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
10233
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
10234
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.inputWrapper(), children: [
10235
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(input_default, { name: "file", readOnly: true, variant: "outline", full: true, placeholder, defaultValue: file == null ? void 0 : file.name }),
10236
- file && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10333
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
10334
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
10335
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.inputWrapper(), children: [
10336
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(input_default, { name: "file", readOnly: true, variant: "outline", full: true, placeholder, defaultValue: file == null ? void 0 : file.name }),
10337
+ file && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10237
10338
  icon_button_default,
10238
10339
  {
10239
10340
  name: "close",
@@ -10245,17 +10346,17 @@ function FileUpload({
10245
10346
  }
10246
10347
  )
10247
10348
  ] }),
10248
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(button_default, { type: "button", variant: "outline", onClick: handleButtonClick, children: buttonText }),
10249
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("input", { ref: fileInputRef, type: "file", hidden: true, accept: accept.join(","), onChange: handleFileChange })
10349
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(button_default, { type: "button", variant: "outline", onClick: handleButtonClick, children: buttonText }),
10350
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { ref: fileInputRef, type: "file", hidden: true, accept: accept.join(","), onChange: handleFileChange })
10250
10351
  ] }),
10251
- showProgress && file && uploadProgress < 100 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: slots.progressBarContainer(), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: slots.progressBar(), style: { width: `${uploadProgress}%` } }) }),
10252
- !errorMessage && helperMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: slots.helperMessage(), children: helperMessage }),
10253
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: slots.errorMessage(), children: errorMessage })
10352
+ showProgress && file && uploadProgress < 100 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: slots.progressBarContainer(), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: slots.progressBar(), style: { width: `${uploadProgress}%` } }) }),
10353
+ !errorMessage && helperMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: slots.helperMessage(), children: helperMessage }),
10354
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: slots.errorMessage(), children: errorMessage })
10254
10355
  ] });
10255
10356
  }
10256
10357
  FileUpload.displayName = "FileUpload";
10257
10358
  var fileUpload_default = FileUpload;
10258
- var fileUploadStyle = (0, import_tailwind_variants29.tv)({
10359
+ var fileUploadStyle = (0, import_tailwind_variants30.tv)({
10259
10360
  slots: {
10260
10361
  base: ["flex", "flex-col", "gap-[5px]"],
10261
10362
  container: ["flex", "items-center", "gap-[10px]"],
@@ -10289,6 +10390,7 @@ var fileUploadStyle = (0, import_tailwind_variants29.tv)({
10289
10390
  Radio,
10290
10391
  ScrollArea,
10291
10392
  Select,
10393
+ Skeleton,
10292
10394
  Switch,
10293
10395
  Table,
10294
10396
  Tabs,